29 "MachineDominator Tree Construction",
true,
true)
39 CriticalEdgesToSplit.
clear();
64 void MachineDominatorTree::applySplitCriticalEdges()
const {
66 if (CriticalEdgesToSplit.
empty())
78 for (CriticalEdge &Edge : CriticalEdgesToSplit) {
84 if (PredBB == Edge.NewBB)
98 if (NewBBs.count(PredBB)) {
99 assert(PredBB->pred_size() == 1 &&
"A basic block resulting from a "
100 "critical edge split has more "
101 "than one predecessor!");
102 PredBB = *PredBB->pred_begin();
104 if (!
DT->dominates(SuccDTNode,
DT->getNode(PredBB))) {
105 IsNewIDom[Idx] =
false;
114 for (CriticalEdge &Edge : CriticalEdgesToSplit) {
122 DT->changeImmediateDominator(
DT->getNode(Edge.ToBB), NewDTNode);
126 CriticalEdgesToSplit.clear();
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
SmallBitVector - This is a 'bitvector' (really, a variable-sized bit array), optimized for the case w...
A Module instance is used to store all the information related to an LLVM module. ...
char & MachineDominatorsID
MachineDominators - This pass is a machine dominators analysis pass.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
Base class for the actual dominator tree node.
Core dominator tree base class.
void initializeMachineDominatorTreePass(PassRegistry &)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
Represent the analysis usage information of a pass.
iterator_range< pred_iterator > predecessors()
~MachineDominatorTree() override
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
DominatorTreeBase< MachineBasicBlock > * DT
This class implements an extremely fast bulk output stream that can only output to a stream...
void print(raw_ostream &OS, const Module *) const override
print - Print out the internal state of the pass.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...