38 I.
getName()+
".reg2mem", AllocaPoint);
47 if (
InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
48 if (!II->getNormalDest()->getSinglePredecessor()) {
52 assert(BB &&
"Unable to split critical edge.");
60 if (
PHINode *PN = dyn_cast<PHINode>(U)) {
71 for (
unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
72 if (PN->getIncomingValue(i) == &
I) {
73 Value *&V = Loads[PN->getIncomingBlock(i)];
77 PN->getIncomingBlock(i)->getTerminator());
79 PN->setIncomingValue(i, V);
95 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
121 P->
getName()+
".reg2mem", AllocaPoint);
133 "Invoke edge not supported yet"); (void)II;
142 for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt)
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
A parsed version of the target data layout string in and methods for querying it. ...
AllocaInst * DemoteRegToStack(Instruction &X, bool VolatileLoads=false, Instruction *AllocaPoint=nullptr)
This function takes a virtual register computed by an Instruction and replaces it with a slot in the ...
This class represents lattice values for constants.
bool isTerminator() const
An instruction for reading from memory.
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
unsigned getAllocaAddrSpace() const
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
Type * getType() const
All values are typed, get the type of this value.
BasicBlock * SplitCriticalEdge(Instruction *TI, unsigned SuccNum, const CriticalEdgeSplittingOptions &Options=CriticalEdgeSplittingOptions())
If this edge is a critical edge, insert a new node to split the critical edge.
An instruction for storing to memory.
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
void replaceUsesOfWith(Value *From, Value *To)
Replace uses of one Value with another.
const BasicBlock & getEntryBlock() const
const_iterator getFirstInsertionPt() const
Returns an iterator to the first instruction in this block that is suitable for inserting a non-PHI i...
LLVM Basic Block Representation.
const Instruction & front() const
self_iterator getIterator()
bool isCriticalEdge(const Instruction *TI, unsigned SuccNum, bool AllowIdenticalEdges=false)
Return true if the specified edge is a critical edge.
Value * getIncomingValue(unsigned i) const
Return incoming value number x.
BasicBlock * getNormalDest() const
Iterator for intrusive lists based on ilist_node.
Instruction * user_back()
Specialize the methods defined in Value, as we know that an instruction can only be used by other ins...
unsigned getNumIncomingValues() const
Return the number of incoming edges.
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ)
Search for the specified successor of basic block BB and return its position in the terminator instru...
StringRef getName() const
Return a constant reference to the value's name.
BasicBlock * getIncomingBlock(unsigned i) const
Return incoming basic block number i.
const Function * getParent() const
Return the enclosing method, or null if none.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
AllocaInst * DemotePHIToStack(PHINode *P, Instruction *AllocaPoint=nullptr)
This function takes a virtual register computed by a phi node and replaces it with a slot in the stac...
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
const BasicBlock * getParent() const
an instruction to allocate memory on the stack