LLVM: lib/Transforms/Scalar/Sink.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
STATISTIC (NumSunk, "Number of instructions sunk")
STATISTIC (NumSinkIter, "Number of sinking iterations")
static bool isSafeToMove (Instruction *Inst, AliasAnalysis &AA, SmallPtrSetImpl< Instruction * > &Stores)
static bool IsAcceptableTarget (Instruction *Inst, BasicBlock *SuccToSinkTo, DominatorTree &DT, LoopInfo &LI)
IsAcceptableTarget - Return true if it is possible to sink the instruction in the specified basic block.
static bool SinkInstruction (Instruction *Inst, SmallPtrSetImpl< Instruction * > &Stores, DominatorTree &DT, LoopInfo &LI, AAResults &AA)
SinkInstruction - Determine whether it is safe to sink the specified machine instruction out of its current block into a successor.
static bool ProcessBlock (BasicBlock &BB, DominatorTree &DT, LoopInfo &LI, AAResults &AA)
static bool iterativelySinkInstructions (Function &F, DominatorTree &DT, LoopInfo &LI, AAResults &AA)

DEBUG_TYPE

#define DEBUG_TYPE "sink"

IsAcceptableTarget()

isSafeToMove()

iterativelySinkInstructions()

ProcessBlock()

SinkInstruction()

SinkInstruction - Determine whether it is safe to sink the specified machine instruction out of its current block into a successor.

Definition at line 102 of file Sink.cpp.

References llvm::dbgs(), llvm::DominatorTree::dominates(), llvm::DominatorTree::findNearestCommonDominator(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::BasicBlock::getFirstInsertionPt(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::PHINode::getIncomingValueNumForOperand(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), IsAcceptableTarget(), llvm::DominatorTree::isReachableFromEntry(), isSafeToMove(), LLVM_DEBUG, llvm::Instruction::moveBefore(), llvm::Value::printAsOperand(), and llvm::Value::uses().

Referenced by ProcessBlock().

STATISTIC() [1/2]

STATISTIC ( NumSinkIter ,
"Number of sinking iterations"
)

STATISTIC() [2/2]