Hi:
I hope to cut all backedges of MachineFunction CFG, then topological sort
MachineBasicBlocks.
1. MachineDominatorTree *domintree = new MachineDominatorTree();
domintree->runOnMachineFunction(mf);
2. Then travel mf one by one.
When domintree->dominates(next,current) is true, there is a backedge from
current node to next node. move this backedge form CFG.
But I find A LOOP in some CFG, there is backedge from current to next,
dominates function reture "FALSE". So my algorithm find Graph can not
be
toplogical sort.
Is there a bug in MachineDominatorTree?? or MachineDominatorTree can not find
all backedges???
Thanks
renkun
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/