LLVM 22.0.0git
Sink.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "sink"

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)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "sink"

Definition at line 25 of file Sink.cpp.

Function Documentation

◆ IsAcceptableTarget()

bool IsAcceptableTarget ( Instruction * Inst,
BasicBlock * SuccToSinkTo,
DominatorTree & DT,
LoopInfo & LI )
static

◆ isSafeToMove()

◆ iterativelySinkInstructions()

bool iterativelySinkInstructions ( Function & F,
DominatorTree & DT,
LoopInfo & LI,
AAResults & AA )
static

Definition at line 210 of file Sink.cpp.

References llvm::dbgs(), F, I, LLVM_DEBUG, and ProcessBlock().

Referenced by llvm::SinkingPass::run().

◆ ProcessBlock()

◆ SinkInstruction()

◆ STATISTIC() [1/2]

STATISTIC ( NumSinkIter ,
"Number of sinking iterations"  )

◆ STATISTIC() [2/2]

STATISTIC ( NumSunk ,
"Number of instructions sunk"  )