LLVM 23.0.0git
LoopBoundSplit.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loop-bound-split"

Functions

static void analyzeICmp (ScalarEvolution &SE, ICmpInst *ICmp, ConditionInfo &Cond, const Loop &L)
static bool calculateUpperBound (const Loop &L, ScalarEvolution &SE, ConditionInfo &Cond, bool IsExitCond)
static bool hasProcessableCondition (const Loop &L, ScalarEvolution &SE, ICmpInst *ICmp, ConditionInfo &Cond, bool IsExitCond)
static bool isProcessableCondBI (const ScalarEvolution &SE, const CondBrInst *BI)
static bool canSplitLoopBound (const Loop &L, const DominatorTree &DT, ScalarEvolution &SE, ConditionInfo &Cond)
static bool isProfitableToTransform (const Loop &L, const CondBrInst *BI)
static CondBrInstfindSplitCandidate (const Loop &L, ScalarEvolution &SE, ConditionInfo &ExitingCond, ConditionInfo &SplitCandidateCond)
static bool splitLoopBound (Loop &L, DominatorTree &DT, LoopInfo &LI, ScalarEvolution &SE, LPMUpdater &U)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "loop-bound-split"

Definition at line 22 of file LoopBoundSplit.cpp.

Function Documentation

◆ analyzeICmp()

◆ calculateUpperBound()

◆ canSplitLoopBound()

◆ findSplitCandidate()

CondBrInst * findSplitCandidate ( const Loop & L,
ScalarEvolution & SE,
ConditionInfo & ExitingCond,
ConditionInfo & SplitCandidateCond )
static

◆ hasProcessableCondition()

◆ isProcessableCondBI()

◆ isProfitableToTransform()

bool isProfitableToTransform ( const Loop & L,
const CondBrInst * BI )
static

◆ splitLoopBound()

bool splitLoopBound ( Loop & L,
DominatorTree & DT,
LoopInfo & LI,
ScalarEvolution & SE,
LPMUpdater & U )
static

Definition at line 286 of file LoopBoundSplit.cpp.

References llvm::PHINode::addIncoming(), assert(), llvm::BasicBlock::begin(), canSplitLoopBound(), llvm::cast(), llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(), llvm::cloneLoopWithPreheader(), Cond, llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), llvm::SCEVExpander::expandCodeFor(), findSplitCandidate(), llvm::ScalarEvolution::forgetLoop(), llvm::BasicBlock::front(), llvm::BasicBlock::getContext(), llvm::LoopBase< BlockT, LoopT >::getExitBlock(), llvm::LoopBase< BlockT, LoopT >::getExitingBlock(), llvm::ConstantInt::getFalse(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::ScalarEvolution::getSCEV(), llvm::ScalarEvolution::getSMinExpr(), llvm::CondBrInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::ConstantInt::getTrue(), llvm::SCEV::getType(), llvm::ScalarEvolution::getUMinExpr(), llvm::CmpInst::ICMP_NE, isProfitableToTransform(), llvm::ScalarEvolution::isSCEVable(), llvm::CmpInst::isSigned(), llvm::BasicBlock::phis(), llvm::remapInstructionsInBlocks(), llvm::seq(), llvm::CondBrInst::setCondition(), llvm::Instruction::setDebugLoc(), llvm::PHINode::setIncomingValueForBlock(), llvm::Value::setName(), llvm::User::setOperand(), llvm::CondBrInst::setSuccessor(), llvm::simplifyLoop(), llvm::SplitEdge(), llvm::DominatorTreeBase< NodeT, IsPostDom >::verify(), and llvm::LoopInfoBase< BlockT, LoopT >::verify().

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