LLVM: include/llvm/CodeGen/MachineRegionInfo.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_CODEGEN_MACHINEREGIONINFO_H
10#define LLVM_CODEGEN_MACHINEREGIONINFO_H
11
21#include
22
23namespace llvm {
24
25class MachinePostDominatorTree;
26class MachineRegion;
27class MachineRegionNode;
28class MachineRegionInfo;
29
43
46 }
47};
48
50public:
55
58 }
59};
60
62public:
67
70 }
71};
72
74public:
77
78
80
83};
84
87
88public:
90
93
95
97
98
99
105 void dump() const;
106
107};
108
109template <>
110template <>
113 const {
114 assert(!isSubRegion() && "This is not a MachineBasicBlock RegionNode!");
115 return getEntry();
116}
117
118template <>
119template <>
122 const {
123 assert(isSubRegion() && "This is not a subregion RegionNode!");
124 auto Unconst =
126 return reinterpret_cast<MachineRegion *>(Unconst);
127}
128
132
135
136template <>
141
145 }
146
148 return nodes_iterator::begin(getEntryNode(RI));
149 }
150
152 return nodes_iterator::end(getEntryNode(RI));
153 }
154};
155
156template <>
161
164 }
165
168 }
169
172 }
173};
174
175extern template class RegionBase<RegionTraits>;
176extern template class RegionNodeBase<RegionTraits>;
177extern template class RegionInfoBase<RegionTraits>;
178
179}
180
181#endif
This file builds on the ADT/GraphTraits.h file to build generic depth first graph iterator.
#define RegionNodeGraphTraits(NodeT, BlockT, RegionT)
#define RegionGraphTraits(RegionT, NodeT)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Represent the analysis usage information of a pass.
Base class for the actual dominator tree node.
unsigned succ_size() const
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Representation of each machine instruction.
MachinePostDominatorTree - an analysis pass wrapper for DominatorTree used to compute the post-domina...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
MachineRegionInfo & getRegionInfo()
~MachineRegionInfoPass() override
const MachineRegionInfo & getRegionInfo() const
void verifyAnalysis() const override
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void print(raw_ostream &OS, const Module *) const override
print - Print out the internal state of the pass.
~MachineRegionInfo() override
void recalculate(MachineFunction &F, MachineDominatorTree *DT, MachinePostDominatorTree *PDT, MachineDominanceFrontier *DF)
void updateStatistics(MachineRegion *R) final
bool operator==(const MachineRegion &RN) const
MachineRegionNode(MachineRegion *Parent, MachineBasicBlock *Entry, bool isSubRegion=false)
bool operator==(const MachineRegionNode &RN) const
A Module instance is used to store all the information related to an LLVM module.
A single entry single exit Region.
Analysis that detects all canonical Regions.
RegionT * getTopLevelRegion() const
A RegionNode represents a subregion or a BasicBlock that is part of a Region.
bool isSubRegion() const
Is this RegionNode a subregion?
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.
DomTreeNodeBase< MachineBasicBlock > MachineDomTreeNode
static NodeRef getEntryNode(MachineRegionInfoPass *RI)
static nodes_iterator nodes_end(MachineRegionInfoPass *RI)
static nodes_iterator nodes_begin(MachineRegionInfoPass *RI)
static nodes_iterator nodes_end(MachineRegionInfo *RI)
static NodeRef getEntryNode(MachineRegionInfo *RI)
static nodes_iterator nodes_begin(MachineRegionInfo *RI)
typename GraphType::UnknownGraphTypeError NodeRef
static unsigned getNumSuccessors(MachineBasicBlock *BB)