LLVM
8.0.1
|
Instances of this class are used to represent loops that are detected in the flow graph. More...
#include "llvm/Analysis/LoopInfo.h"
Public Types | |
typedef std::vector< LoopT * >::const_iterator | iterator |
typedef std::vector< LoopT * >::const_reverse_iterator | reverse_iterator |
typedef ArrayRef< BlockT * >::const_iterator | block_iterator |
typedef std::pair< const BlockT *, const BlockT * > | Edge |
Edge type. More... | |
Public Member Functions | |
unsigned | getLoopDepth () const |
Return the nesting level of this loop. More... | |
BlockT * | getHeader () const |
LoopT * | getParentLoop () const |
void | setParentLoop (LoopT *L) |
This is a raw interface for bypassing addChildLoop. More... | |
bool | contains (const LoopT *L) const |
Return true if the specified loop is contained within in this loop. More... | |
bool | contains (const BlockT *BB) const |
Return true if the specified basic block is in this loop. More... | |
template<class InstT > | |
bool | contains (const InstT *Inst) const |
Return true if the specified instruction is in this loop. More... | |
const std::vector< LoopT * > & | getSubLoops () const |
Return the loops contained entirely within this loop. More... | |
std::vector< LoopT * > & | getSubLoopsVector () |
iterator | begin () const |
iterator | end () const |
reverse_iterator | rbegin () const |
reverse_iterator | rend () const |
bool | empty () const |
ArrayRef< BlockT * > | getBlocks () const |
Get a list of the basic blocks which make up this loop. More... | |
block_iterator | block_begin () const |
block_iterator | block_end () const |
iterator_range< block_iterator > | blocks () const |
unsigned | getNumBlocks () const |
Get the number of blocks in this loop in constant time. More... | |
std::vector< BlockT * > & | getBlocksVector () |
Return a direct, mutable handle to the blocks vector so that we can mutate it efficiently with techniques like std::remove . More... | |
SmallPtrSetImpl< const BlockT * > & | getBlocksSet () |
Return a direct, mutable handle to the blocks set so that we can mutate it efficiently. More... | |
const SmallPtrSetImpl< const BlockT * > & | getBlocksSet () const |
Return a direct, immutable handle to the blocks set. More... | |
bool | isInvalid () const |
Return true if this loop is no longer valid. More... | |
bool | isLoopExiting (const BlockT *BB) const |
True if terminator in the block can branch to another block that is outside of the current loop. More... | |
bool | isLoopLatch (const BlockT *BB) const |
unsigned | getNumBackEdges () const |
Calculate the number of back edges to the loop header. More... | |
void | getExitingBlocks (SmallVectorImpl< BlockT *> &ExitingBlocks) const |
Return all blocks inside the loop that have successors outside of the loop. More... | |
BlockT * | getExitingBlock () const |
If getExitingBlocks would return exactly one block, return that block. More... | |
void | getExitBlocks (SmallVectorImpl< BlockT *> &ExitBlocks) const |
Return all of the successor blocks of this loop. More... | |
BlockT * | getExitBlock () const |
If getExitBlocks would return exactly one block, return that block. More... | |
bool | hasDedicatedExits () const |
Return true if no exit block for the loop has a predecessor that is outside the loop. More... | |
void | getUniqueExitBlocks (SmallVectorImpl< BlockT *> &ExitBlocks) const |
Return all unique successor blocks of this loop. More... | |
BlockT * | getUniqueExitBlock () const |
If getUniqueExitBlocks would return exactly one block, return that block. More... | |
void | getExitEdges (SmallVectorImpl< Edge > &ExitEdges) const |
Return all pairs of (inside_block,outside_block). More... | |
BlockT * | getLoopPreheader () const |
If there is a preheader for this loop, return it. More... | |
BlockT * | getLoopPredecessor () const |
If the given loop's header has exactly one unique predecessor outside the loop, return it. More... | |
BlockT * | getLoopLatch () const |
If there is a single latch block for this loop, return it. More... | |
void | getLoopLatches (SmallVectorImpl< BlockT *> &LoopLatches) const |
Return all loop latch blocks of this loop. More... | |
void | addBasicBlockToLoop (BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI) |
This method is used by other analyses to update loop information. More... | |
void | replaceChildLoopWith (LoopT *OldChild, LoopT *NewChild) |
This is used when splitting loops up. More... | |
void | addChildLoop (LoopT *NewChild) |
Add the specified loop to be a child of this loop. More... | |
LoopT * | removeChildLoop (iterator I) |
This removes the specified child from being a subloop of this loop. More... | |
LoopT * | removeChildLoop (LoopT *Child) |
This removes the specified child from being a subloop of this loop. More... | |
void | addBlockEntry (BlockT *BB) |
This adds a basic block directly to the basic block list. More... | |
void | reverseBlock (unsigned from) |
interface to reverse Blocks[from, end of loop] in this loop More... | |
void | reserveBlocks (unsigned size) |
interface to do reserve() for Blocks More... | |
void | moveToHeader (BlockT *BB) |
This method is used to move BB (which must be part of this loop) to be the loop header of the loop (the block that dominates all others). More... | |
void | removeBlockFromLoop (BlockT *BB) |
This removes the specified basic block from the current loop, updating the Blocks as appropriate. More... | |
void | verifyLoop () const |
Verify loop structure. More... | |
void | verifyLoopNest (DenseSet< const LoopT *> *Loops) const |
Verify loop structure of this loop and all nested loops. More... | |
bool | isAnnotatedParallel () const |
Returns true if the loop is annotated parallel. More... | |
void | print (raw_ostream &OS, unsigned Depth=0, bool Verbose=false) const |
Print loop with all the BBs inside it. More... | |
Protected Member Functions | |
LoopBase () | |
This creates an empty loop. More... | |
LoopBase (BlockT *BB) | |
~LoopBase () | |
Friends | |
class | LoopInfoBase< BlockT, LoopT > |
Instances of this class are used to represent loops that are detected in the flow graph.
Definition at line 63 of file LoopInfo.h.
typedef ArrayRef<BlockT *>::const_iterator llvm::LoopBase< BlockT, LoopT >::block_iterator |
Definition at line 153 of file LoopInfo.h.
typedef std::pair<const BlockT *, const BlockT *> llvm::LoopBase< BlockT, LoopT >::Edge |
Edge type.
Definition at line 279 of file LoopInfo.h.
typedef std::vector<LoopT *>::const_iterator llvm::LoopBase< BlockT, LoopT >::iterator |
Definition at line 139 of file LoopInfo.h.
typedef std::vector<LoopT *>::const_reverse_iterator llvm::LoopBase< BlockT, LoopT >::reverse_iterator |
Definition at line 141 of file LoopInfo.h.
|
inlineprotected |
This creates an empty loop.
Definition at line 424 of file LoopInfo.h.
|
inlineexplicitprotected |
Definition at line 426 of file LoopInfo.h.
|
inlineprotected |
Definition at line 440 of file LoopInfo.h.
void llvm::LoopBase< BlockT, LoopT >::addBasicBlockToLoop | ( | BlockT * | NewBB, |
LoopInfoBase< BlockT, LoopT > & | LIB | ||
) |
This method is used by other analyses to update loop information.
addBasicBlockToLoop - This method is used by other analyses to update loop information.
NewBB is set to be a new member of the current loop. Because of this, it is added as a member of all parent loops, and is added to the specified LoopInfo object as being in the current basic block. It is not valid to replace the loop header with this method.
Definition at line 251 of file LoopInfoImpl.h.
Referenced by llvm::addClonedBlockToLoopInfo(), buildClonedLoops(), CloneLoop(), cloneLoopBlocks(), llvm::cloneLoopWithPreheader(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::InnerLoopVectorizer::emitMemRuntimeChecks(), llvm::InnerLoopVectorizer::emitMinimumIterationCountCheck(), llvm::InnerLoopVectorizer::emitSCEVChecks(), llvm::VPBasicBlock::execute(), llvm::VPlan::execute(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), insertUniqueBackedgeBlock(), isImmValidForOpcode(), mayLoopAccessLocation(), llvm::sinkRegion(), turnGuardIntoBranch(), llvm::UnrollAndJamLoop(), and UpdateAnalysisInformation().
|
inline |
This adds a basic block directly to the basic block list.
This should only be used by transformations that create new loops. Other transformations should use addBasicBlockToLoop.
Definition at line 359 of file LoopInfo.h.
Referenced by isProfitableForVectorization(), and separateNestedLoop().
|
inline |
Add the specified loop to be a child of this loop.
This updates the loop depth of the new child.
Definition at line 331 of file LoopInfo.h.
Referenced by llvm::addClonedBlockToLoopInfo(), CloneLoop(), cloneLoopNest(), llvm::cloneLoopWithPreheader(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), getOnlyLiveSuccessor(), hoistLoopToNewParent(), isProfitableForVectorization(), rebuildLoopAfterUnswitch(), and separateNestedLoop().
|
inline |
Definition at line 142 of file LoopInfo.h.
Referenced by llvm::internal::appendLoopsToWorklist(), appendLoopsToWorklist(), asmClobbersCTR(), llvm::GraphTraits< const MachineLoop * >::child_begin(), llvm::GraphTraits< MachineLoop * >::child_begin(), llvm::GraphTraits< const Loop * >::child_begin(), llvm::GraphTraits< Loop * >::child_begin(), llvm::createCodeGenPreparePass(), deleteLoopIfDead(), llvm::LoopInfo::erase(), INITIALIZE_PASS(), isProfitableForVectorization(), LoopIsOuterMostWithPredecessor(), pointerInvalidatedByLoop(), llvm::LoopBase< BasicBlock, Loop >::removeChildLoop(), llvm::LoopInfoBase< BasicBlock, Loop >::removeLoop(), llvm::LoopFullUnrollPass::run(), llvm::LoopSimplifyPass::run(), llvm::simplifyLoop(), llvm::UnrollAndJamLoop(), and llvm::ScalarEvolution::verify().
|
inline |
Definition at line 154 of file LoopInfo.h.
Referenced by asmClobbersCTR(), llvm::LoopBase< BasicBlock, Loop >::blocks(), CloneLoop(), llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(), llvm::deleteDeadLoop(), detectPopcountIdiom(), detectShiftUntilZeroIdiom(), EqualityPropUnSafe(), llvm::LoopInfo::erase(), getLayoutSuccessorProbThreshold(), GetPointerOperand(), llvm::PPCTargetLowering::getPrefLoopAlignment(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences(), mayLoopAccessLocation(), partitionOuterLoopBlocks(), separateNestedLoop(), and simplifyOneLoop().
|
inline |
Definition at line 155 of file LoopInfo.h.
Referenced by asmClobbersCTR(), llvm::LoopBase< BasicBlock, Loop >::blocks(), CloneLoop(), llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(), llvm::deleteDeadLoop(), EqualityPropUnSafe(), llvm::LoopInfo::erase(), getLayoutSuccessorProbThreshold(), GetPointerOperand(), llvm::PPCTargetLowering::getPrefLoopAlignment(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences(), mayLoopAccessLocation(), partitionOuterLoopBlocks(), separateNestedLoop(), and simplifyOneLoop().
|
inline |
Definition at line 156 of file LoopInfo.h.
Referenced by llvm::ApproximateLoopSize(), areLoopExitPHIsSupported(), asmClobbersCTR(), buildClonedLoopBlocks(), buildClonedLoops(), cloneLoopNest(), llvm::ICFLoopSafetyInfo::computeLoopSafetyInfo(), ConvertToSInt(), countToEliminateCompares(), llvm::createFalkorMarkStridedAccessesPass(), deleteDeadBlocksFromLoop(), deleteDeadClonedBlocks(), llvm::deleteDeadLoop(), EqualityPropUnSafe(), llvm::formDedicatedExitBlocks(), getFalkorUnrollingPreferences(), getOnlyLiveSuccessor(), llvm::SystemZTTIImpl::getUnrollingPreferences(), hoistLoopToNewParent(), isLoopDead(), isProfitableForVectorization(), mayLoopAccessLocation(), mergeBlocksIntoPredecessors(), partitionOuterLoopBlocks(), populateDependencyMatrix(), llvm::MemoryDepChecker::Dependence::print(), llvm::printLoop(), llvm::promoteLoopAccessesToScalars(), rebuildLoopAfterUnswitch(), llvm::LoopDataPrefetchPass::run(), sinkLoopInvariantInstructions(), llvm::VPRecipeBuilder::tryToCreateRecipe(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), and unswitchBestCondition().
|
inline |
Return true if the specified loop is contained within in this loop.
Definition at line 110 of file LoopInfo.h.
Referenced by llvm::DivergenceAnalysis::addUniformOverride(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), allPhiOperandsUndefined(), analyzeLoopUnrollCost(), llvm::PredicatedScalarEvolution::areAddRecsEqualWithPreds(), asmClobbersCTR(), llvm::LoopAccessInfo::blockNeedsPredication(), buildClonedLoops(), BuildConstantFromSCEV(), calculateUnswitchCostMultiplier(), canConstantEvolve(), canFoldIVIncExpr(), CanProveNotTakenFirstIteration(), llvm::canSinkOrHoistInst(), CloneLoop(), cloneLoopBlocks(), collectCastsToIgnore(), llvm::collectChildrenInLoop(), llvm::CodeMetrics::collectEphemeralValues(), collectTransitivePredecessors(), computeBlocksDominatingExits(), llvm::DivergencePropagator::computeJoinPoints(), computeUnlikelySuccessors(), ConnectEpilog(), ConnectProlog(), llvm::LoopBase< BasicBlock, Loop >::contains(), ConvertToSInt(), llvm::VPRecipeBuilder::createBlockInMask(), llvm::createHexagonHardwareLoops(), llvm::createSIFixWWMLivenessPass(), llvm::deleteDeadLoop(), DeleteTriviallyDeadInstructions(), dependsOnLocalPhi(), llvm::ICFLoopSafetyInfo::doesNotWriteMemoryBefore(), llvm::Loop::dumpVerbose(), expandBounds(), llvm::findDefsUsedOutsideOfLoop(), findPHIToPartitionLoops(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::ScalarEvolution::forgetValue(), llvm::formDedicatedExitBlocks(), genLoopLimit(), llvm::ScalarEvolution::getAddRecExpr(), getLayoutSuccessorProbThreshold(), llvm::ScalarEvolution::getLoopDisposition(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), getOnlyLiveSuccessor(), getSingleSchedPred(), llvm::hasOutsideLoopUser(), hasUsesOutsideLoop(), hoistLoopToNewParent(), llvm::DivergenceAnalysis::inRegion(), llvm::InsertPreheaderForLoop(), inSubLoop(), IsAvailableOnEntry(), isBlockInLCSSAForm(), isCopyFeedingInvariantStore(), isExitingLoop(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isFPInductionPHI(), isFreeInLoop(), IsIncrementNUW(), isInteresting(), llvm::LoopBase< BasicBlock, Loop >::isLoopExiting(), llvm::LoopBase< BasicBlock, Loop >::isLoopLatch(), isNotUsedOrFreeInLoop(), isSafeToExecuteUnconditionally(), llvm::isSafeToUnrollAndJam(), isTrivialLoopExitBlockHelper(), llvm::isUniformLoop(), IVUseShouldUsePostIncValue(), llvm::LPPassManager::markLoopAsDeleted(), llvm::LPMUpdater::markLoopAsDeleted(), mayUsePostIncMode(), llvm::LoopInfo::movementPreservesLCSSAForm(), llvm::InnerLoopVectorizer::needsScalarInduction(), needToInsertPhisForLCSSA(), llvm::LoopBodyTraits::LoopBodyFilter::operator()(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), partitionOuterLoopBlocks(), llvm::peelLoop(), PickMostRelevantLoop(), placeSplitBlockCarefully(), pointerInvalidatedByLoopWithMSSA(), llvm::promoteLoopAccessesToScalars(), pushIVUsers(), PushLoopPHIs(), rebuildLoopAfterUnswitch(), recomputeLoopBlockSet(), replaceLoopInvariantUses(), llvm::LoopInfo::replacementPreservesLCSSAForm(), ReplaceUsesOfWith(), llvm::GuardWideningPass::run(), separateNestedLoop(), shouldRotateLoopExitingLatch(), simplifyLoopInst(), simplifyOneLoop(), sink(), sinkInstruction(), llvm::sinkRegion(), splitPredecessorsOfLoopExit(), truncateIVUse(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), unswitchAllTrivialConditions(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), unswitchTrivialSwitch(), UpdateAnalysisInformation(), llvm::LoopVersioning::versionLoop(), llvm::LoopBlocksTraversal::visitPreorder(), and llvm::DivergencePropagator::visitSuccessor().
|
inline |
Return true if the specified basic block is in this loop.
Definition at line 120 of file LoopInfo.h.
|
inline |
Return true if the specified instruction is in this loop.
Definition at line 126 of file LoopInfo.h.
|
inline |
Definition at line 146 of file LoopInfo.h.
Referenced by analyzeLoopUnrollCost(), llvm::LoopVectorizationLegality::blockNeedsPredication(), cloneLoopNest(), collectSupportedLoops(), llvm::computePeelCount(), llvm::createFalkorMarkStridedAccessesPass(), eliminateLoadsAcrossLoops(), emitBasicBlockLoopComments(), llvm::LoopInfo::erase(), GetPointerOperand(), getTag(), llvm::HexagonTTIImpl::getUnrollingPreferences(), isExplicitVecOuterLoop(), isProfitableForVectorization(), mayUsePostIncMode(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), llvm::MemoryDepChecker::Dependence::print(), llvm::LoopVectorizePass::processLoop(), llvm::LoopDataPrefetchPass::run(), runImpl(), and llvm::VPRecipeBuilder::tryToCreateRecipe().
|
inline |
Definition at line 143 of file LoopInfo.h.
Referenced by llvm::internal::appendLoopsToWorklist(), appendLoopsToWorklist(), asmClobbersCTR(), llvm::GraphTraits< const MachineLoop * >::child_end(), llvm::GraphTraits< MachineLoop * >::child_end(), llvm::GraphTraits< const Loop * >::child_end(), llvm::GraphTraits< Loop * >::child_end(), llvm::createCodeGenPreparePass(), deleteLoopIfDead(), llvm::LoopInfo::erase(), INITIALIZE_PASS(), LoopIsOuterMostWithPredecessor(), pointerInvalidatedByLoop(), llvm::promoteLoopAccessesToScalars(), llvm::LoopInfoBase< BasicBlock, Loop >::removeLoop(), llvm::LoopFullUnrollPass::run(), llvm::LoopSimplifyPass::run(), llvm::simplifyLoop(), and llvm::ScalarEvolution::verify().
|
inline |
Get a list of the basic blocks which make up this loop.
Definition at line 149 of file LoopInfo.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::block_begin(), llvm::LoopBase< BasicBlock, Loop >::block_end(), CloneLoop(), llvm::cloneLoopWithPreheader(), llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(), computeUnrollAndJamCount(), llvm::findDefsUsedOutsideOfLoop(), llvm::LoopBase< BasicBlock, Loop >::getHeader(), getLayoutSuccessorProbThreshold(), getRangeForAffineARHelper(), getTag(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::ARMTTIImpl::getUnrollingPreferences(), InstructionStoresToFI(), isLoadInvariantInLoop(), mayLoopAccessLocation(), pointerInvalidatedByLoop(), llvm::PredicatedScalarEvolution::print(), llvm::IRCEPass::run(), llvm::MachinePipeliner::runOnMachineFunction(), separateNestedLoop(), shouldRotateLoopExitingLatch(), llvm::simplifyLoopAfterUnroll(), truncateIVUse(), llvm::UnrollAndJamLoop(), and llvm::UnrollLoop().
|
inline |
Return a direct, mutable handle to the blocks set so that we can mutate it efficiently.
Definition at line 176 of file LoopInfo.h.
Referenced by rebuildLoopAfterUnswitch().
|
inline |
Return a direct, immutable handle to the blocks set.
Definition at line 182 of file LoopInfo.h.
|
inline |
Return a direct, mutable handle to the blocks vector so that we can mutate it efficiently with techniques like std::remove
.
Definition at line 170 of file LoopInfo.h.
Referenced by rebuildLoopAfterUnswitch().
BlockT * llvm::LoopBase< BlockT, LoopT >::getExitBlock | ( | ) | const |
If getExitBlocks would return exactly one block, return that block.
getExitBlock - If getExitBlocks would return exactly one block, return that block.
Otherwise return null.
Definition at line 76 of file LoopInfoImpl.h.
Referenced by containsSafePHI(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::InnerLoopVectorizer::fixupIVUsers(), getInductionVariable(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), llvm::LoopVersioning::LoopVersioning(), and llvm::LoopVersioning::versionLoop().
void llvm::LoopBase< BlockT, LoopT >::getExitBlocks | ( | SmallVectorImpl< BlockT *> & | ExitBlocks | ) | const |
Return all of the successor blocks of this loop.
getExitBlocks - Return all of the successor blocks of this loop.
These are the blocks outside of the current loop which are branched to.
Definition at line 63 of file LoopInfoImpl.h.
Referenced by llvm::formLCSSA(), llvm::formLCSSAForInstructions(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), getOnlyLiveSuccessor(), hoistLoopToNewParent(), INITIALIZE_PASS(), llvm::SyncDependenceAnalysis::join_blocks(), LoopIsOuterMostWithPredecessor(), llvm::printLoop(), and llvm::UnrollLoop().
void llvm::LoopBase< BlockT, LoopT >::getExitEdges | ( | SmallVectorImpl< Edge > & | ExitEdges | ) | const |
Return all pairs of (inside_block,outside_block).
getExitEdges - Return all pairs of (inside_block,outside_block).
Definition at line 155 of file LoopInfoImpl.h.
BlockT * llvm::LoopBase< BlockT, LoopT >::getExitingBlock | ( | ) | const |
If getExitingBlocks would return exactly one block, return that block.
getExitingBlock - If getExitingBlocks would return exactly one block, return that block.
Otherwise return null.
Definition at line 50 of file LoopInfoImpl.h.
Referenced by llvm::LoopVectorizationLegality::blockNeedsPredication(), canExpandBackedgeTakenCount(), llvm::canPeel(), containsSafePHI(), FindLoopCounter(), llvm::ScalarEvolution::forgetValue(), genLoopLimit(), getInductionVariable(), llvm::getLoopEstimatedTripCount(), getLoopTest(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), getRangeForAffineARHelper(), llvm::SCEVExpander::getRelatedExistingExpansion(), llvm::ScalarEvolution::getSmallConstantTripCount(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), llvm::isSafeToUnrollAndJam(), llvm::MemoryDepChecker::Dependence::print(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), and llvm::LoopVersioning::versionLoop().
void llvm::LoopBase< BlockT, LoopT >::getExitingBlocks | ( | SmallVectorImpl< BlockT *> & | ExitingBlocks | ) | const |
Return all blocks inside the loop that have successors outside of the loop.
getExitingBlocks - Return all blocks inside the loop that have successors outside of the loop.
These are the blocks inside of the current loop which branch out. The returned list is always unique.
Definition at line 35 of file LoopInfoImpl.h.
Referenced by asmClobbersCTR(), canProfitablyUnrollMultiExitLoop(), ConvertToSInt(), deleteLoopIfDead(), llvm::ScalarEvolution::forgetValue(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), llvm::SCEVExpander::getRelatedExistingExpansion(), llvm::ARMTTIImpl::getUnrollingPreferences(), InstructionStoresToFI(), isAlwaysFoldable(), mayUsePostIncMode(), llvm::LoopSimplifyPass::run(), and simplifyOneLoop().
|
inline |
Definition at line 100 of file LoopInfo.h.
Referenced by llvm::addClonedBlockToLoopInfo(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::LoopAccessInfo::addRuntimeChecks(), AddRuntimeUnrollDisableMetaData(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), llvm::LoopVectorizeHints::allowVectorization(), allPhiOperandsUndefined(), analyzeLoopUnrollCost(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::PredicatedScalarEvolution::areAddRecsEqualWithPreds(), areLoopExitPHIsSupported(), asmClobbersCTR(), llvm::LoopBlocksTraversal::begin(), llvm::LoopAccessInfo::blockNeedsPredication(), buildClonedLoops(), BuildConstantFromSCEV(), calculateIterationsToInvariance(), canConstantEvolve(), canFoldIVIncExpr(), CanProveNotTakenFirstIteration(), CheckMACMemory(), CloneLoop(), CloneLoopBlocks(), cloneLoopBlocks(), llvm::cloneLoopWithPreheader(), collectTransitivePredecessors(), llvm::LoopSafetyInfo::computeBlockColors(), computeBlocksDominatingExits(), llvm::DivergencePropagator::computeJoinPoints(), llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(), llvm::computePeelCount(), computeUnlikelySuccessors(), llvm::computeUnrollCount(), containsSafePHI(), ConvertToSInt(), llvm::VPRecipeBuilder::createBlockInMask(), llvm::createHexagonHardwareLoops(), llvm::createLICMPass(), llvm::createLVMissedAnalysis(), llvm::createSIFixWWMLivenessPass(), createStringMetadata(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), deleteDeadInstruction(), llvm::deleteDeadLoop(), DisableAllLoopOptsOnLoop(), llvm::LoopVectorizationRequirements::doesNotMeet(), llvm::ICFLoopSafetyInfo::doesNotWriteMemoryBefore(), DoInitialMatch(), emitBasicBlockLoopComments(), llvm::LoopBlocksTraversal::end(), llvm::SystemZPostRASchedStrategy::enterMBB(), EqualityPropUnSafe(), EvaluateConstantChrecAtConstant(), llvm::SCEVExpander::expandCodeFor(), findInnerReductionPhi(), FindLIVLoopCondition(), FindLoopCounter(), llvm::MachineLoopInfo::findLoopPreheader(), findPHIToPartitionLoops(), llvm::InnerLoopVectorizer::fixCrossIterationPHIs(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::gatherUnrollingPreferences(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAddRecExpr(), llvm::ScalarEvolution::getBlockDisposition(), getDebugLocString(), llvm::LoopBodyTraits::getEntryNode(), getInductionVariable(), getLayoutSuccessorProbThreshold(), llvm::ScalarEvolution::getLoopDisposition(), llvm::getLoopEstimatedTripCount(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), getLoopPhiForCounter(), llvm::Loop::getName(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), getOnlyLiveSuccessor(), llvm::InnerLoopVectorizer::getOrCreateTripCount(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), getOtherIncomingValue(), GetPointerOperand(), llvm::getPtrStride(), getRangeForAffineARHelper(), llvm::SCEVExpander::getRelatedExistingExpansion(), getSingleSchedPred(), getUnderlyingObjects(), llvm::ARMTTIImpl::getUnrollingPreferences(), hasUsesOutsideLoop(), INITIALIZE_PASS(), llvm::DivergenceAnalysis::inRegion(), llvm::InsertPreheaderForLoop(), insertUniqueBackedgeBlock(), InstructionStoresToFI(), isAlwaysFoldable(), llvm::ScalarEvolution::isAvailableAtLoopEntry(), isCopyFeedingInvariantStore(), isEpilogProfitable(), isExistingPhi(), isExitingLoop(), isExplicitVecOuterLoop(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isFPInductionPHI(), llvm::SimpleLoopSafetyInfo::isGuaranteedToExecute(), llvm::isGuaranteedToExecuteForEveryIteration(), isIgnorableInst(), isImmValidForOpcode(), IsIncrementNUW(), isIntegerLoopHeaderPHI(), llvm::ScalarEvolution::isKnownViaInduction(), isLoadConditional(), isLoadInvariantInLoop(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), isLoopIncrement(), isLoopInvariant(), llvm::LoopBase< BasicBlock, Loop >::isLoopLatch(), isNoWrap(), isProfitableChain(), isProfitableForVectorization(), llvm::RecurrenceDescriptor::isReductionPHI(), llvm::isSafeToUnrollAndJam(), isSimplifiedLoopNest(), isTrivialLoopExitBlock(), llvm::IVUsers::IVUsers(), llvm::SyncDependenceAnalysis::join_blocks(), LoopIsOuterMostWithPredecessor(), mayLoopAccessLocation(), mayUsePostIncMode(), mergeOperations(), moveLCSSAPhis(), llvm::LoopBodyTraits::LoopBodyFilter::operator()(), llvm::peelLoop(), PickMostRelevantLoop(), llvm::LoopVectorizationPlanner::plan(), populateWorklist(), preheader(), llvm::LoopVersioning::prepareNoAliasMetadata(), llvm::SCEV::print(), llvm::IVUsers::print(), llvm::MemoryDepChecker::Dependence::print(), llvm::printLoop(), PrintParentLoopComment(), llvm::LoopVectorizePass::processLoop(), processLoopInVPlanNativePath(), profitImm(), PushDefUseChildren(), pushDepHeight(), PushLoopPHIs(), recomputeLoopBlockSet(), ReduceLoopStrength(), llvm::SCEVExpander::replaceCongruentIVs(), ReplaceUsesOfWith(), llvm::LoopAccessInfoPrinterPass::run(), llvm::IRCEPass::run(), llvm::GuardWideningPass::run(), llvm::LoopPredicationPass::run(), llvm::LoopRotatePass::run(), llvm::LoopDataPrefetchPass::run(), llvm::IndVarSimplifyPass::run(), llvm::LoopIdiomRecognizePass::run(), llvm::LoopSimplifyPass::run(), llvm::SimpleLoopUnswitchPass::run(), llvm::LPPassManager::runOnFunction(), llvm::IVUsersWrapperPass::runOnLoop(), llvm::MachinePipeliner::runOnMachineFunction(), separateNestedLoop(), shouldRotateLoopExitingLatch(), llvm::ScalarEvolution::SimplifyICmpOperands(), llvm::simplifyLoopAfterUnroll(), simplifyLoopInst(), llvm::simplifyLoopIVs(), simplifyOneLoop(), llvm::sinkRegion(), llvm::LoopPass::skipLoop(), SortCallTargets(), truncateIVUse(), llvm::VPRecipeBuilder::tryToBlend(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), unswitchAllTrivialConditions(), unswitchBestCondition(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), unswitchTrivialSwitch(), llvm::LoopVersioning::versionLoop(), visitIVCast(), warnAboutLeftoverTransformations(), llvm::InnerLoopVectorizer::widenIntOrFpInduction(), and llvm::InnerLoopVectorizer::widenPHIInstruction().
|
inline |
Return the nesting level of this loop.
An outer-most loop has depth 1, for consistency with loop depth values used for basic blocks, where depth 0 is used for blocks not inside any loops.
Definition at line 92 of file LoopInfo.h.
Referenced by buildClonedLoops(), checkDependencies(), emitBasicBlockLoopComments(), llvm::ScalarEvolution::getAddRecExpr(), getOnlyLiveSuccessor(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::AArch64TTIImpl::getUnrollingPreferences(), isLoadOrStore(), mayUsePostIncMode(), PrintParentLoopComment(), and UpdateAnalysisInformation().
BlockT * llvm::LoopBase< BlockT, LoopT >::getLoopLatch | ( | ) | const |
If there is a single latch block for this loop, return it.
getLoopLatch - If there is a single latch block for this loop, return it.
A latch block is a block that contains a branch back to the header.
Definition at line 225 of file LoopInfoImpl.h.
Referenced by analyzeLoopUnrollCost(), areLoopExitPHIsSupported(), llvm::LoopVectorizationLegality::blockNeedsPredication(), llvm::LoopAccessInfo::blockNeedsPredication(), calculateIterationsToInvariance(), calculateUnswitchCostMultiplier(), llvm::canPeel(), CloneLoopBlocks(), cloneLoopBlocks(), llvm::LoopVectorizationPlanner::collectTriviallyDeadInstructions(), llvm::computePeelCount(), ConnectEpilog(), ConnectProlog(), constantFoldTerminators(), containsSafePHI(), countToEliminateCompares(), llvm::createHexagonHardwareLoops(), EvaluateConstantChrecAtConstant(), findInnerReductionPhi(), FindLoopCounter(), llvm::MachineLoopInfo::findLoopPreheader(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::InnerLoopVectorizer::fixReduction(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::ScalarEvolution::forgetValue(), genLoopLimit(), getInductionVariable(), llvm::getLoopEstimatedTripCount(), getLoopTest(), getOnlyLiveSuccessor(), getOtherIncomingValue(), GetPointerOperand(), getRangeForAffineARHelper(), getReductionValue(), llvm::hasIterationCountInvariantInParent(), isAlwaysFoldable(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), isImmValidForOpcode(), IsIncrementNUW(), isLoadConditional(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), isProfitableChain(), isProfitableForVectorization(), llvm::isSafeToUnrollAndJam(), llvm::isUniformLoop(), IVUseShouldUsePostIncValue(), MatchReductions(), mayUsePostIncMode(), moveLCSSAPhis(), needsLFTR(), partitionOuterLoopBlocks(), llvm::peelLoop(), llvm::MemoryDepChecker::Dependence::print(), profitImm(), PushDefUseChildren(), llvm::SCEVExpander::replaceCongruentIVs(), ReplaceUsesOfWith(), llvm::LoopPredicationPass::run(), llvm::LoopSimplifyPass::run(), shouldRotateLoopExitingLatch(), simplifyOneLoop(), truncateIVUse(), llvm::VPRecipeBuilder::tryToCreateRecipe(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), and llvm::InnerLoopVectorizer::updateAnalysis().
|
inline |
Return all loop latch blocks of this loop.
A latch block is a block that contains a branch back to the header.
Definition at line 304 of file LoopInfo.h.
Referenced by doesStoreDominatesAllLatches().
BlockT * llvm::LoopBase< BlockT, LoopT >::getLoopPredecessor | ( | ) | const |
If the given loop's header has exactly one unique predecessor outside the loop, return it.
getLoopPredecessor - If the given loop's header has exactly one unique predecessor outside the loop, return it.
Otherwise return null. This is less strict that the loop "preheader" concept, which requires the predecessor to have exactly one successor.
Definition at line 202 of file LoopInfoImpl.h.
Referenced by EvaluateConstantChrecAtConstant(), findInnerReductionPhi(), getInductionVariable(), GetPointerOperand(), isCopyFeedingInvariantStore(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), and llvm::GuardWideningPass::run().
BlockT * llvm::LoopBase< BlockT, LoopT >::getLoopPreheader | ( | ) | const |
If there is a preheader for this loop, return it.
getLoopPreheader - If there is a preheader for this loop, return it.
A loop has a preheader if there is only one edge to the header of the loop from outside of the loop. If this is the case, the block branching to the header of the loop is the preheader node.
This method returns null if there is no preheader for the loop.
A loop has a preheader if there is only one edge to the header of the loop from outside of the loop and it is legal to hoist instructions into the predecessor. If this is the case, the block branching to the header of the loop is the preheader node.
This method returns null if there is no preheader for the loop.
Definition at line 174 of file LoopInfoImpl.h.
Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), analyzeLoopUnrollCost(), asmClobbersCTR(), llvm::LoopVectorizationLegality::blockNeedsPredication(), buildClonedLoops(), CanProveNotTakenFirstIteration(), cloneLoopBlocks(), llvm::cloneLoopWithPreheader(), containsSafePHI(), ConvertToSInt(), llvm::createCodeGenPreparePass(), llvm::createLICMPass(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), deleteDeadInstruction(), llvm::deleteDeadLoop(), deleteLoopIfDead(), detectPopcountIdiom(), detectShiftUntilZeroIdiom(), llvm::InnerLoopVectorizer::emitMemRuntimeChecks(), llvm::InnerLoopVectorizer::emitMinimumIterationCountCheck(), llvm::InnerLoopVectorizer::emitSCEVChecks(), llvm::SCEVExpander::expandCodeFor(), findBBsToSinkInto(), llvm::MachineLoopInfo::findLoopPreheader(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), genLoopLimit(), getInductionVariable(), GetLoopInvariantInsertPosition(), getOnlyLiveSuccessor(), llvm::InnerLoopVectorizer::getOrCreateTripCount(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::SCEVExpander::hoistIVInc(), llvm::hoistRegion(), isAlwaysFoldable(), isCopyFeedingInvariantStore(), isEpilogProfitable(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), IsIncrementNUW(), llvm::InductionDescriptor::isInductionPHI(), isIntersect(), isLoadConditional(), isLoopInvariant(), isLoopNeverExecuted(), isProfitableForVectorization(), MatchReductions(), mayLoopAccessLocation(), mayUsePostIncMode(), moveLCSSAPhis(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), partitionOuterLoopBlocks(), llvm::peelLoop(), preheader(), llvm::printLoop(), llvm::promoteLoopAccessesToScalars(), rebuildLoopAfterUnswitch(), recomputeLoopBlockSet(), llvm::IRCEPass::run(), llvm::LoopSimplifyPass::run(), llvm::MachinePipeliner::runOnMachineFunction(), shouldRotateLoopExitingLatch(), simplifyOneLoop(), sinkLoopInvariantInstructions(), llvm::sinkRegion(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), unswitchTrivialSwitch(), and llvm::LoopVersioning::versionLoop().
|
inline |
Calculate the number of back edges to the loop header.
Definition at line 227 of file LoopInfo.h.
Referenced by llvm::LoopVectorizationLegality::blockNeedsPredication(), getInductionVariable(), insertUniqueBackedgeBlock(), llvm::MemoryDepChecker::Dependence::print(), and simplifyOneLoop().
|
inline |
Get the number of blocks in this loop in constant time.
Invalidate the loop, indicating that it is no longer a loop.
Definition at line 163 of file LoopInfo.h.
Referenced by llvm::LoopBlocksTraversal::begin(), buildClonedLoopBlocks(), cloneLoopNest(), getLayoutSuccessorProbThreshold(), getOnlyLiveSuccessor(), llvm::ARMTTIImpl::getUnrollingPreferences(), llvm::LoopBlocksDFS::isComplete(), isIgnorableInst(), llvm::LoopBlocksDFS::LoopBlocksDFS(), and llvm::MachinePipeliner::runOnMachineFunction().
|
inline |
Definition at line 101 of file LoopInfo.h.
Referenced by llvm::addClonedBlockToLoopInfo(), llvm::LPPassManager::addLoop(), llvm::DivergenceAnalysis::addUniformOverride(), buildClonedLoops(), BuildConstantFromSCEV(), calculateUnswitchCostMultiplier(), canSafelyUnrollMultiExitLoop(), CloneLoop(), CloneLoopBlocks(), cloneLoopBlocks(), llvm::cloneLoopWithPreheader(), ConvertToSInt(), llvm::createLICMPass(), llvm::createPPCCTRLoopsVerify(), llvm::createSIFixWWMLivenessPass(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), deleteDeadBlocksFromLoop(), llvm::Loop::dumpVerbose(), emitBasicBlockLoopComments(), llvm::InnerLoopVectorizer::emitMemRuntimeChecks(), llvm::InnerLoopVectorizer::emitMinimumIterationCountCheck(), llvm::InnerLoopVectorizer::emitSCEVChecks(), llvm::LoopInfo::erase(), llvm::SCEVExpander::expandCodeFor(), llvm::ScalarEvolution::forgetTopmostLoop(), getInductionVariable(), getOnlyLiveSuccessor(), getOutermostLoop(), llvm::hasIterationCountInvariantInParent(), hoistLoopToNewParent(), INITIALIZE_PASS(), llvm::DivergenceAnalysis::inRegion(), isImmValidForOpcode(), isLoadOrStore(), isLoopInvariant(), isMustExecuteIn(), isProfitableForVectorization(), llvm::SyncDependenceAnalysis::join_blocks(), LoopIsOuterMostWithPredecessor(), mayLoopAccessLocation(), llvm::peelLoop(), llvm::ScalarEvolution::print(), PrintParentLoopComment(), rebuildLoopAfterUnswitch(), llvm::LoopUnrollPass::run(), llvm::FunctionToLoopPassAdaptor< LoopPassT >::run(), separateNestedLoop(), llvm::sinkRegion(), SolveQuadraticAddRecRange(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), unswitchNontrivialInvariants(), and UpdateAnalysisInformation().
|
inline |
Return the loops contained entirely within this loop.
Definition at line 131 of file LoopInfo.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::begin(), llvm::cloneLoopWithPreheader(), dependsOnLocalPhi(), llvm::LoopBase< BasicBlock, Loop >::empty(), llvm::LoopBase< BasicBlock, Loop >::end(), llvm::formLCSSARecursively(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), isProfitableForVectorization(), llvm::isSafeToUnrollAndJam(), populateWorklist(), llvm::promoteLoopAccessesToScalars(), llvm::LoopBase< BasicBlock, Loop >::rbegin(), llvm::LoopBase< BasicBlock, Loop >::rend(), separateNestedLoop(), tryToUnrollAndJamLoop(), and llvm::UnrollAndJamLoop().
|
inline |
Definition at line 135 of file LoopInfo.h.
Referenced by deleteDeadBlocksFromLoop(), and rebuildLoopAfterUnswitch().
BlockT * llvm::LoopBase< BlockT, LoopT >::getUniqueExitBlock | ( | ) | const |
If getUniqueExitBlocks would return exactly one block, return that block.
Otherwise return null.
Definition at line 145 of file LoopInfoImpl.h.
Referenced by areLoopExitPHIsSupported(), llvm::canPeel(), llvm::deleteDeadLoop(), deleteLoopIfDead(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), and llvm::peelLoop().
void llvm::LoopBase< BlockT, LoopT >::getUniqueExitBlocks | ( | SmallVectorImpl< BlockT *> & | ExitBlocks | ) | const |
Return all unique successor blocks of this loop.
These are the blocks outside of the current loop which are branched to. This assumes that loop exits are in canonical form, i.e. all exits are dedicated exits.
Definition at line 100 of file LoopInfoImpl.h.
Referenced by canSafelyUnrollMultiExitLoop(), CloneLoop(), ConvertToSInt(), llvm::createLICMPass(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), mayLoopAccessLocation(), sink(), splitPredecessorsOfLoopExit(), and unswitchBestCondition().
bool llvm::LoopBase< BlockT, LoopT >::hasDedicatedExits | ( | ) | const |
Return true if no exit block for the loop has a predecessor that is outside the loop.
Definition at line 86 of file LoopInfoImpl.h.
Referenced by llvm::createLICMPass(), llvm::deleteDeadLoop(), deleteLoopIfDead(), EqualityPropUnSafe(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), llvm::LoopSimplifyPass::run(), and shouldRotateLoopExitingLatch().
|
inline |
Returns true if the loop is annotated parallel.
Derived classes can override this method using static template polymorphism.
Definition at line 415 of file LoopInfo.h.
|
inline |
Return true if this loop is no longer valid.
The only valid use of this helper is "assert(L.isInvalid())" or equivalent, since IsInvalid is set to true by the destructor. In other words, if this accessor returns true, the caller has already triggered UB by calling this accessor; and so it can only be called in a context where a return value of true indicates a programmer error.
Definition at line 193 of file LoopInfo.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::addBlockEntry(), llvm::LoopBase< BasicBlock, Loop >::addChildLoop(), llvm::LoopBase< BasicBlock, Loop >::blocks(), llvm::LoopBase< BasicBlock, Loop >::contains(), llvm::LoopInfo::erase(), llvm::LoopBase< BasicBlock, Loop >::getBlocks(), llvm::LoopBase< BasicBlock, Loop >::getBlocksSet(), llvm::LoopBase< BasicBlock, Loop >::getBlocksVector(), llvm::LoopBase< BasicBlock, Loop >::getLoopDepth(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), llvm::LoopBase< BasicBlock, Loop >::getNumBlocks(), llvm::LoopBase< BasicBlock, Loop >::getSubLoops(), llvm::LoopBase< BasicBlock, Loop >::getSubLoopsVector(), llvm::LoopBase< BasicBlock, Loop >::isLoopExiting(), llvm::LoopBase< BasicBlock, Loop >::isLoopLatch(), llvm::LoopBase< BasicBlock, Loop >::moveToHeader(), llvm::LoopBase< BasicBlock, Loop >::removeBlockFromLoop(), llvm::LoopBase< BasicBlock, Loop >::removeChildLoop(), llvm::LoopBase< BasicBlock, Loop >::reserveBlocks(), llvm::LoopBase< BasicBlock, Loop >::reverseBlock(), and llvm::LoopBase< BasicBlock, Loop >::setParentLoop().
|
inline |
True if terminator in the block can branch to another block that is outside of the current loop.
Definition at line 203 of file LoopInfo.h.
Referenced by llvm::ScalarEvolution::getSmallConstantTripCount(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), mustBeFiniteCountedLoop(), shouldRotateLoopExitingLatch(), tryToUnrollLoop(), and llvm::VirtRegAuxInfo::weightCalcHelper().
|
inline |
Definition at line 216 of file LoopInfo.h.
|
inline |
This method is used to move BB (which must be part of this loop) to be the loop header of the loop (the block that dominates all others).
Definition at line 379 of file LoopInfo.h.
Referenced by separateNestedLoop(), shouldRotateLoopExitingLatch(), and UpdateAnalysisInformation().
void llvm::LoopBase< BlockT, LoopT >::print | ( | raw_ostream & | OS, |
unsigned | Depth = 0 , |
||
bool | Verbose = false |
||
) | const |
Print loop with all the BBs inside it.
Definition at line 393 of file LoopInfoImpl.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::isAnnotatedParallel(), llvm::LoopInfoBase< BasicBlock, Loop >::isNotAlreadyContainedIn(), llvm::operator<<(), llvm::LoopInfoWrapperPass::releaseMemory(), and llvm::IRCEPass::run().
|
inline |
Definition at line 144 of file LoopInfo.h.
|
inline |
This removes the specified basic block from the current loop, updating the Blocks as appropriate.
This does not update the mapping in the LoopInfo class.
Definition at line 396 of file LoopInfo.h.
Referenced by isProfitableForVectorization(), and separateNestedLoop().
|
inline |
This removes the specified child from being a subloop of this loop.
The loop is not deleted, as it will presumably be inserted into another loop.
Definition at line 340 of file LoopInfo.h.
Referenced by llvm::Loop::dumpVerbose(), llvm::LoopInfo::erase(), hoistLoopToNewParent(), isProfitableForVectorization(), rebuildLoopAfterUnswitch(), llvm::LoopBase< BasicBlock, Loop >::removeChildLoop(), and separateNestedLoop().
|
inline |
This removes the specified child from being a subloop of this loop.
The loop is not deleted, as it will presumably be inserted into another loop.
Definition at line 352 of file LoopInfo.h.
|
inline |
Definition at line 145 of file LoopInfo.h.
void llvm::LoopBase< BlockT, LoopT >::replaceChildLoopWith | ( | LoopT * | OldChild, |
LoopT * | NewChild | ||
) |
This is used when splitting loops up.
replaceChildLoopWith - This is used when splitting loops up.
It replaces the OldChild entry in our children list with NewChild, and updates the parent pointer of OldChild to be null and the NewChild to be this loop. This updates the loop depth of the new child.
Definition at line 281 of file LoopInfoImpl.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), and separateNestedLoop().
|
inline |
interface to do reserve() for Blocks
Definition at line 372 of file LoopInfo.h.
Referenced by buildClonedLoops().
|
inline |
interface to reverse Blocks[from, end of loop] in this loop
Definition at line 366 of file LoopInfo.h.
|
inline |
This is a raw interface for bypassing addChildLoop.
Definition at line 104 of file LoopInfo.h.
void llvm::LoopBase< BlockT, LoopT >::verifyLoop | ( | ) | const |
Verify loop structure.
verifyLoop - Verify loop structure
Definition at line 295 of file LoopInfoImpl.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::removeBlockFromLoop(), llvm::LoopFullUnrollPass::run(), llvm::LoopUnrollPass::run(), llvm::FunctionToLoopPassAdaptor< LoopPassT >::run(), and llvm::LPPassManager::runOnFunction().
void llvm::LoopBase< BlockT, LoopT >::verifyLoopNest | ( | DenseSet< const LoopT *> * | Loops | ) | const |
Verify loop structure of this loop and all nested loops.
verifyLoop - Verify loop structure of this loop and all nested loops.
Definition at line 381 of file LoopInfoImpl.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::removeBlockFromLoop().
|
friend |
Definition at line 421 of file LoopInfo.h.