LLVM 22.0.0git
RandomIRBuilder.cpp File Reference

Go to the source code of this file.

Functions

static std::vector< BasicBlock * > getDominators (BasicBlock *BB)
 Return a vector of Blocks that dominates this block, excluding current block.
static std::vector< BasicBlock * > getDominatees (BasicBlock *BB)
 Return a vector of Blocks that is dominated by this block, excluding current block.
static ValuebuildTargetLegalPtr (Module *M, Value *Ptr, InsertPosition IP, const Twine &Name, SmallVector< Instruction * > *NewInsts)
static InstructionbuildTargetLegalStore (Value *Val, Value *Ptr, InsertPosition IP, Module *M)
static std::pair< Instruction *, SmallVector< Instruction * > > buildTargetLegalLoad (Type *AccessTy, Value *Ptr, InsertPosition IP, Module *M, const Twine &LoadName)
static void eraseNewInstructions (SmallVector< Instruction * > &NewInsts)
static bool isCompatibleReplacement (const Instruction *I, const Use &Operand, const Value *Replacement)

Function Documentation

◆ buildTargetLegalLoad()

std::pair< Instruction *, SmallVector< Instruction * > > buildTargetLegalLoad ( Type * AccessTy,
Value * Ptr,
InsertPosition IP,
Module * M,
const Twine & LoadName )
static

◆ buildTargetLegalPtr()

Value * buildTargetLegalPtr ( Module * M,
Value * Ptr,
InsertPosition IP,
const Twine & Name,
SmallVector< Instruction * > * NewInsts )
static

◆ buildTargetLegalStore()

Instruction * buildTargetLegalStore ( Value * Val,
Value * Ptr,
InsertPosition IP,
Module * M )
static

◆ eraseNewInstructions()

◆ getDominatees()

std::vector< BasicBlock * > getDominatees ( BasicBlock * BB)
static

Return a vector of Blocks that is dominated by this block, excluding current block.

Definition at line 45 of file RandomIRBuilder.cpp.

References llvm::DomTreeNodeBase< NodeT >::children(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), and llvm::BasicBlock::getParent().

Referenced by llvm::RandomIRBuilder::connectToSink().

◆ getDominators()

std::vector< BasicBlock * > getDominators ( BasicBlock * BB)
static

Return a vector of Blocks that dominates this block, excluding current block.

Definition at line 26 of file RandomIRBuilder.cpp.

References llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), and llvm::BasicBlock::getParent().

Referenced by llvm::RandomIRBuilder::connectToSink(), and llvm::RandomIRBuilder::findOrCreateSource().

◆ isCompatibleReplacement()

bool isCompatibleReplacement ( const Instruction * I,
const Use & Operand,
const Value * Replacement )
static