LLVM: lib/Transforms/Utils/LoopUtils.cpp File Reference (original) (raw)

Go to the source code of this file.

Classes
struct RewritePhi
struct PointerBounds
IR Values for the lower and upper bounds of a pointer evolution. More...
Functions
static MDNode * createStringMetadata (Loop *TheLoop, StringRef Name, unsigned V)
Create MDNode for input string.
static BranchInst * getExpectedExitLoopLatchBranch (Loop *L)
Checks if L has an exiting latch branch.
static std::optional< uint64_t > getEstimatedTripCount (BranchInst *ExitingBranch, Loop *L, uint64_t &OrigExitWeight)
Return the estimated trip count for any exiting branch which dominates the loop latch.
static bool hasHardUserWithinLoop (const Loop *L, const Instruction *I)
static bool canLoopBeDeleted (Loop *L, SmallVector< RewritePhi, 8 > &RewritePhiSet)
static bool checkIsIndPhi (PHINode *Phi, Loop *L, ScalarEvolution *SE, InductionDescriptor &ID)
Checks if it is safe to call InductionDescriptor::isInductionPHI for Phi, and returns true if this Phi is an induction phi in the loop.
static PointerBounds expandBounds (const RuntimeCheckingPtrGroup *CG, Loop *TheLoop, Instruction *Loc, SCEVExpander &Exp, bool HoistRuntimeChecks)
Expand code for the lower and upper bound of the pointer group CG in TheLoop.
static SmallVector< std::pair< PointerBounds, PointerBounds >, 4 > expandBounds (const SmallVectorImpl< RuntimePointerCheck > &PointerChecks, Loop *L, Instruction *Loc, SCEVExpander &Exp, bool HoistRuntimeChecks)
Turns a collection of checks into a collection of expanded upper and lower bounds for both pointers in the check.

DEBUG_TYPE

#define DEBUG_TYPE "loop-utils"

canLoopBeDeleted()

checkIsIndPhi()

createStringMetadata()

expandBounds() [1/2]

Expand code for the lower and upper bound of the pointer group CG in TheLoop.

Returns

the values for the bounds.

Definition at line 1866 of file LoopUtils.cpp.

References llvm::RuntimeCheckingPtrGroup::AddressSpace, llvm::ScalarEvolution::applyLoopGuards(), llvm::IRBuilderBase::CreateFreeze(), llvm::dbgs(), End, llvm::Value::getContext(), llvm::ScalarEvolution::getExitCount(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), llvm::SCEV::getType(), llvm::RuntimeCheckingPtrGroup::High, High, HoistRuntimeChecks, llvm::Type::isIntegerTy(), llvm::ScalarEvolution::isKnownNonNegative(), LLVM_DEBUG, llvm::RuntimeCheckingPtrGroup::Low, llvm::Low, and llvm::RuntimeCheckingPtrGroup::NeedsFreeze.

Referenced by llvm::addRuntimeChecks(), and expandBounds().

expandBounds() [2/2]

getEstimatedTripCount()

getExpectedExitLoopLatchBranch()

hasHardUserWithinLoop()

LLVMLoopDisableLICM

const char* LLVMLoopDisableLICM = "llvm.licm.disable" static

LLVMLoopDisableNonforced

const char* LLVMLoopDisableNonforced = "llvm.loop.disable_nonforced" static