29#ifndef LLVM_CODEGEN_MACHINELOOPINFO_H
30#define LLVM_CODEGEN_MACHINELOOPINFO_H
48class MachineLoop :
public LoopBase<MachineBasicBlock, MachineLoop> {
89 const Register ExcludeReg = 0)
const;
97 bool isLoopInvariantImplicitPhysReg(
Register Reg)
const;
122 MachineFunctionAnalysisManager::Invalidator &);
133 bool FindMultiLoopPreheader =
false)
const;
#define LLVM_TEMPLATE_ABI
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
Represent the analysis usage information of a pass.
Instances of this class are used to represent loops that are detected in the flow graph.
This class builds and contains all of the top-level loop structures in the specified function.
std::vector< MachineLoop * >::const_iterator iterator
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
MachineFunctionPass(char &ID)
Representation of each machine instruction.
Analysis pass that exposes the MachineLoopInfo for a machine function.
LLVM_ABI Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
MachineLoopInfoWrapperPass()
MachineLoopInfo & getLI()
MachineLoopInfo(MachineLoopInfo &&)=default
LLVM_ABI void calculate(MachineDominatorTree &MDT)
Calculate the natural loop information.
MachineLoopInfo()=default
LLVM_ABI bool invalidate(MachineFunction &, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &)
Handle invalidation explicitly.
LLVM_ABI MachineBasicBlock * findLoopPreheader(MachineLoop *L, bool SpeculativePreheader=false, bool FindMultiLoopPreheader=false) const
Find the block that either is the loop preheader, or could speculatively be used as the preheader.
MachineLoopInfo(const MachineLoopInfo &)=delete
friend class MachineLoopInfoWrapperPass
MachineLoopInfo & operator=(const MachineLoopInfo &)=delete
MachineLoopInfo(MachineDominatorTree &MDT)
MachineLoopPrinterPass(raw_ostream &OS)
LLVM_ABI MachineBasicBlock * findLoopControlBlock() const
Find the block that contains the loop control variable and the loop test.
LLVM_ABI MDNode * getLoopID() const
Find the llvm.loop metadata for this loop.
LLVM_ABI DebugLoc getStartLoc() const
Return the debug location of the start of this loop.
LLVM_ABI MachineBasicBlock * getBottomBlock()
Return the "bottom" block in the loop, which is the last block in the linear layout,...
LLVM_ABI bool isLoopInvariant(MachineInstr &I, const Register ExcludeReg=0) const
Returns true if the instruction is loop invariant.
LLVM_ABI MachineBasicBlock * getTopBlock()
Return the "top" block in the loop, which is the first block in the linear layout,...
A set of analyses that are preserved following a run of a transformation pass.
Wrapper class representing virtual and physical registers.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
MachineLoopInfo::iterator ChildIteratorType
static ChildIteratorType child_end(NodeRef N)
static NodeRef getEntryNode(MachineLoop *L)
static ChildIteratorType child_begin(NodeRef N)
MachineLoopInfo::iterator ChildIteratorType
static ChildIteratorType child_begin(NodeRef N)
const MachineLoop * NodeRef
static NodeRef getEntryNode(const MachineLoop *L)
static ChildIteratorType child_end(NodeRef N)
A CRTP mix-in to automatically provide informational APIs needed for passes.