search for: getlastblock

Displaying 4 results from an estimated 4 matches for "getlastblock".

2006 Jul 09
2
[LLVMdev] Critical edges
...new MachineBasicBlock(src_bb); /// modify the llvm control flow graph src.addSuccessor(crit_mbb); crit_mbb->addSuccessor(& dst); src.removeSuccessor(& dst); /// insert the new block into the machine function. ilist<MachineBasicBlock>::iterator mbb_it = mf.getLastBlock(); ++mbb_it; mf.getBasicBlockList().insert(mbb_it, crit_mbb); /// insert a unconditional branch linking the new block to dst const TargetMachine & tm = mf.getTarget(); const TargetInstrInfo * tii = tm.getInstrInfo(); tii->insertGoto(*crit_mbb, dst); /// modify e...
2006 Jul 09
0
[LLVMdev] Critical edges
The problem is that you are inserting block 9 in the wrong spot. mf.getLastBlock() returns the block with the greatest number which may have nothing to do with the ordering. Why not use the end iterator (mf.end) to insert? -Tanya On Sat, 8 Jul 2006, Fernando Magno Quintao Pereira wrote: > > Dear guys, > > I am having problem to split edges correctly. Mostly...
2006 Jul 05
0
[LLVMdev] Critical edges
...icBlock(); const BasicBlock * dst_bb = dst.getBasicBlock(); MachineBasicBlock * crit_mbb = new MachineBasicBlock(src_bb); src.addSuccessor(crit_mbb); crit_mbb->addSuccessor(& dst); src.removeSuccessor(& dst); ilist<MachineBasicBlock>::iterator mbb_it = mf.getLastBlock(); ++mbb_it; mf.getBasicBlockList().insert(mbb_it, crit_mbb); }
2006 Jul 04
2
[LLVMdev] Critical edges
On Tue, 4 Jul 2006, Fernando Magno Quintao Pereira wrote: > However, it does not remove all the critical edges. I am getting a very > weird dataflow graph (even without the Break Critical edges pass). The > dataflow generated by MachineFunction::dump() for the program below is > given here: > http://compilers.cs.ucla.edu/fernando/projects/soc/images/loop_no_crit2.pdf ... > The