forked from OSchip/llvm-project
This is supposed to be a preorder numbering of the dominator tree, not the CFG.
llvm-svn: 73257
This commit is contained in:
parent
d0428da398
commit
eaac7a42fe
|
@ -62,13 +62,14 @@ bool LazyLiveness::runOnMachineFunction(MachineFunction &mf) {
|
|||
preorder.clear();
|
||||
|
||||
MRI = &mf.getRegInfo();
|
||||
MachineDominatorTree& MDT = getAnalysis<MachineDominatorTree>();
|
||||
|
||||
// Step 0: Compute preorder numbering for all MBBs.
|
||||
unsigned num = 0;
|
||||
for (df_iterator<MachineBasicBlock*> DI = df_begin(&*mf.begin());
|
||||
DI != df_end(&*mf.begin()); ++DI) {
|
||||
preorder[*DI] = num++;
|
||||
rev_preorder.push_back(*DI);
|
||||
for (df_iterator<MachineDomTreeNode*> DI = df_begin(MDT.getRootNode());
|
||||
DI != df_end(MDT.getRootNode()); ++DI) {
|
||||
preorder[(*DI)->getBlock()] = num++;
|
||||
rev_preorder.push_back((*DI)->getBlock());
|
||||
}
|
||||
|
||||
// Step 1: Compute the transitive closure of the CFG, ignoring backedges.
|
||||
|
|
Loading…
Reference in New Issue