LLVM  12.0.0git
Macros | Functions
Sink.cpp File Reference
#include "llvm/Transforms/Scalar/Sink.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
Include dependency graph for Sink.cpp:

Go to the source code of this file.


#define DEBUG_TYPE   "sink"


 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. More...
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. More...
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


#define DEBUG_TYPE   "sink"

Definition at line 30 of file Sink.cpp.

Function Documentation

◆ IsAcceptableTarget()

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

◆ isSafeToMove()

static bool isSafeToMove ( Instruction Inst,
AliasAnalysis AA,
SmallPtrSetImpl< Instruction * > &  Stores 

◆ iterativelySinkInstructions()

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

Definition at line 219 of file Sink.cpp.

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

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

◆ ProcessBlock()

static bool ProcessBlock ( BasicBlock BB,
DominatorTree DT,
LoopInfo LI,
AAResults AA 

◆ SinkInstruction()

static bool SinkInstruction ( Instruction Inst,
SmallPtrSetImpl< Instruction * > &  Stores,
DominatorTree DT,
LoopInfo LI,
AAResults AA 

◆ STATISTIC() [1/2]

STATISTIC ( NumSunk  ,
"Number of instructions sunk"   

◆ STATISTIC() [2/2]

STATISTIC ( NumSinkIter  ,
"Number of sinking iterations"