This is supposed to be a preorder numbering of the dominator tree, not the CFG.

llvm-svn: 73257
This commit is contained in:
Owen Anderson 2009-06-12 21:50:22 +00:00
parent d0428da398
commit eaac7a42fe
1 changed files with 5 additions and 4 deletions

View File

@ -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.