21 #include "llvm/Config/llvm-config.h" 32 "Machine Natural Loop Construction",
true,
true)
41 LI.analyze(getAnalysis<MachineDominatorTree>().getBase());
83 if (isLoopExiting(Latch))
86 return getExitingBlock();
94 if (
const BasicBlock *PHeadBB = PHeadMBB->getBasicBlock())
95 if (
DebugLoc DL = PHeadBB->getTerminator()->getDebugLoc())
101 if (
const BasicBlock *HeadBB = HeadMBB->getBasicBlock())
102 return HeadBB->getTerminator()->getDebugLoc();
109 bool SpeculativePreheader)
const {
113 if (!SpeculativePreheader)
142 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) BlockT * getLoopLatch() const
If there is a single latch block for this loop, return it.
This class represents lattice values for constants.
DebugLoc getStartLoc() const
Return the debug location of the start of this loop.
BlockT * getLoopPreheader() const
If there is a preheader for this loop, return it.
machine Machine Natural Loop true
return AArch64::GPR64RegClass contains(Reg)
iterator_range< succ_iterator > successors()
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
MachineBasicBlock * getTopBlock()
Return the "top" block in the loop, which is the first block in the linear layout, ignoring any parts of the loop not contiguous with the part that contains the header.
char & MachineLoopInfoID
MachineLoopInfo - This pass is a loop analysis pass.
MachineBasicBlock * getBottomBlock()
Return the "bottom" block in the loop, which is the last block in the linear layout, ignoring any parts of the loop not contiguous with the part that contains the header.
BlockT * getHeader() const
MachineBasicBlock * findLoopControlBlock()
Find the block that contains the loop control variable and the loop test.
COFF::MachineTypes Machine
LLVM Basic Block Representation.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
self_iterator getIterator()
iterator_range< pred_iterator > predecessors()
bool hasAddressTaken() const
Test whether this block is potentially the target of an indirect branch.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
Iterator for intrusive lists based on ilist_node.
unsigned pred_size() const
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void setPreservesAll()
Set by analyses that do not transform their input at all.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
Represents a single loop in the control flow graph.
INITIALIZE_PASS_BEGIN(MachineLoopInfo, "machine-loops", "Machine Natural Loop Construction", true, true) INITIALIZE_PASS_END(MachineLoopInfo
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
MachineBasicBlock * findLoopPreheader(MachineLoop *L, bool SpeculativePreheader=false) const
Find the block that either is the loop preheader, or could speculatively be used as the preheader...
machine Machine Natural Loop Construction
MachineLoop * getLoopFor(const MachineBasicBlock *BB) const
Return the innermost loop that BB lives in.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
This class builds and contains all of the top-level loop structures in the specified function...