Go to the documentation of this file.
26 #ifdef EXPENSIVE_CHECKS
35 cl::desc(
"Verify machine dominator info (time consuming)"));
45 "MachineDominator Tree Construction",
true,
true)
60 CriticalEdgesToSplit.
clear();
72 CriticalEdgesToSplit.
clear();
79 errs() <<
"MachineDominatorTree verification failed\n";
89 void MachineDominatorTree::applySplitCriticalEdges()
const {
91 if (CriticalEdgesToSplit.empty())
103 for (CriticalEdge &Edge : CriticalEdgesToSplit) {
109 if (PredBB == Edge.NewBB)
123 if (NewBBs.count(PredBB)) {
124 assert(PredBB->pred_size() == 1 &&
"A basic block resulting from a "
125 "critical edge split has more "
126 "than one predecessor!");
127 PredBB = *PredBB->pred_begin();
129 if (!DT->dominates(SuccDTNode, DT->getNode(PredBB))) {
130 IsNewIDom[Idx] =
false;
139 for (CriticalEdge &Edge : CriticalEdgesToSplit) {
147 DT->changeImmediateDominator(DT->getNode(Edge.ToBB), NewDTNode);
151 CriticalEdgesToSplit.clear();
This is an optimization pass for GlobalISel generic memory operations.
bool VerifyMachineDomInfo
LocationClass< Ty > location(Ty &L)
static cl::opt< bool, true > VerifyMachineDomInfoX("verify-machine-dom-info", cl::location(VerifyMachineDomInfo), cl::Hidden, cl::desc("Verify machine dominator info (time consuming)"))
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
This is a 'bitvector' (really, a variable-sized bit array), optimized for the case when the array is ...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
Represent the analysis usage information of a pass.
This class implements an extremely fast bulk output stream that can only output to a stream.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
void print(raw_ostream &OS, const Module *) const override
print - Print out the internal state of the pass.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A Module instance is used to store all the information related to an LLVM module.
iterator_range< pred_iterator > predecessors()
void initializeMachineDominatorTreePass(PassRegistry &)
Core dominator tree base class.
Base class for the actual dominator tree node.
void verifyAnalysis() const override
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...
void calculate(MachineFunction &F)
char & MachineDominatorsID
MachineDominators - This pass is a machine dominators analysis pass.
*Add support for compiling functions in both ARM and Thumb then taking the smallest *Add support for compiling individual basic blocks in thumb when in a larger ARM function This can be used for presumed cold like paths to abort(failure path of asserts)
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...