LLVM: include/llvm/CodeGen/MachineLoopInfo.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29#ifndef LLVM_CODEGEN_MACHINELOOPINFO_H
30#define LLVM_CODEGEN_MACHINELOOPINFO_H
31
39
40namespace llvm {
41
43
47
48class MachineLoop : public LoopBase<MachineBasicBlock, MachineLoop> {
49public:
50
51
52
54
55
56
57
59
60
61
62
63
65
66
67
68
69
70
72
73
74
75
76
77
78
80
81
82
83
84
85
86
87
89 const Register ExcludeReg = 0) const;
90
92
93private:
95
96
97 bool isLoopInvariantImplicitPhysReg(Register Reg) const;
98
101
103};
104
105
108
109class MachineLoopInfo : public LoopInfoBase<MachineBasicBlock, MachineLoop> {
112
113public:
119
120
122 MachineFunctionAnalysisManager::Invalidator &);
123
124
125
126
127
128
129
130
133 bool FindMultiLoopPreheader = false) const;
134
135
137};
138
139
149
150
160
163
164public:
166
168
170
172
173 void getAnalysisUsage(AnalysisUsage &AU) const override;
174
176};
177
178
187
196
197}
198
199#endif
#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.
typename 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.
Definition MachineLoopInfo.h:140
MachineLoopInfo Result
Definition MachineLoopInfo.h:145
LLVM_ABI Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
static char ID
Definition MachineLoopInfo.h:165
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...
Definition MachineLoopInfo.h:171
MachineLoopInfoWrapperPass()
MachineLoopInfo & getLI()
Definition MachineLoopInfo.h:175
Definition MachineLoopInfo.h:109
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
Definition MachineLoopInfo.h:111
MachineLoopInfo & operator=(const MachineLoopInfo &)=delete
MachineLoopInfo(MachineDominatorTree &MDT)
Definition MachineLoopInfo.h:115
MachineLoopPrinterPass(raw_ostream &OS)
Definition MachineLoopInfo.h:155
static bool isRequired()
Definition MachineLoopInfo.h:158
Definition MachineLoopInfo.h:48
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
Definition MachineLoopInfo.h:190
static ChildIteratorType child_end(NodeRef N)
Definition MachineLoopInfo.h:194
static NodeRef getEntryNode(MachineLoop *L)
Definition MachineLoopInfo.h:192
static ChildIteratorType child_begin(NodeRef N)
Definition MachineLoopInfo.h:193
MachineLoop * NodeRef
Definition MachineLoopInfo.h:189
MachineLoopInfo::iterator ChildIteratorType
Definition MachineLoopInfo.h:181
static ChildIteratorType child_begin(NodeRef N)
Definition MachineLoopInfo.h:184
const MachineLoop * NodeRef
Definition MachineLoopInfo.h:180
static NodeRef getEntryNode(const MachineLoop *L)
Definition MachineLoopInfo.h:183
static ChildIteratorType child_end(NodeRef N)
Definition MachineLoopInfo.h:185
A CRTP mix-in to automatically provide informational APIs needed for passes.