search for: crit_mbb

Displaying 14 results from an estimated 14 matches for "crit_mbb".

2006 Jul 09
2
[LLVMdev] Critical edges
...;no_exit LBB1_4: ;no_exit.loopexit_llvm_crit_edge The code is this one below: void CriticalEdgeRemoval_Fer::split_critical_edge (MachineBasicBlock & src, MachineBasicBlock & dst, MachineFunction & mf) { const BasicBlock * src_bb = src.getBasicBlock(); MachineBasicBlock * crit_mbb = 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 = m...
2007 Aug 19
1
[LLVMdev] MBB Critical edges
...gt; TargetInstrInfo::tii.isIndirectJump(opcode). When that is the case, I >> update the jump table using: >> >> // Change jumps to go to the new basic block: >> if(isJumpTable) { >> mf.getJumpTableInfo()->ReplaceMBBInJumpTables(& dst, >> crit_mbb); >> } >> >> where dst was the old basic block, and crit_mbb is the new one, >> created to >> remove a critical edge. I think this should solve the problem. If you >> want, I can give you the pass to break critical edges of machine >> blocks, >>...
2008 Jan 27
0
[LLVMdev] BreakCriticalMachineEdge.h
Fernando, The code there should be more or less functional, though it's not currently used by anything. Eventually it should probably be moved to a method on MachineBasicBlock. The API breakage you're seeing is because some methods moved around. Feel free to fix it. :-) --Owen On Jan 26, 2008, at 6:31 PM, Fernando Magno Quintao Pereira wrote: > > Hi LLVMers, > >
2008 Jan 27
2
[LLVMdev] BreakCriticalMachineEdge.h
Hi LLVMers, what is the status of breaking critical edges in machine functions? I just compiled the top of the LLVM tree, and I found llvm/CodeGen/BreakCriticalMachineEdge.h. But this file seems not to be up-to-date with the other classes in the top of the tree. For instance, it calls isTerminatorInstr on llvm::TargetInstrInfo, but this method is no longer there. If I want to break
2006 Jul 05
0
[LLVMdev] Critical edges
...p;& dst_has_many_pred; } void CriticalEdgeRemoval_Fer::split_critical_edge (MachineBasicBlock & src, MachineBasicBlock & dst, MachineFunction & mf) { const BasicBlock * src_bb = src.getBasicBlock(); 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); }
2008 Sep 30
2
[LLVMdev] Inserting MachineBasicBlock(s) before a MachineBasicBlock
I want to be able to do two things with LLVM (both just before code emission): 1. Insert a MachineBasicBlock just before a MachineBasicBlock. There is a function called AddPredecessor(). However, the comment says that it does not update the actual CFG. I want to redirect all CFG edges that are incoming to this MachineBasicBlock to the new one I create, and add just one outgoing edge (no branch)
2007 Aug 10
2
[LLVMdev] MBB Critical edges
...te the jump table, and the actual branch keeps jumping to the old basic block, instead of the new. Could someone help me to fix this? If it works fine, I can send a patch for this pass. /// modify every branch in src that points to dst to point /// to the new machine basic block "crit_mbb" instead: MachineBasicBlock::iterator mii = src.end(); bool found_branch = false; while (mii != src.begin()) { mii--; // if there are no more branches, finish the loop if (!tii->isTerminatorInstr(mii->getOpcode())) { break;...
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
2007 Aug 17
2
[LLVMdev] MBB Critical edges
...o to tell me when an instruction is an indirect jump - TargetInstrInfo::tii.isIndirectJump(opcode). When that is the case, I update the jump table using: // Change jumps to go to the new basic block: if(isJumpTable) { mf.getJumpTableInfo()->ReplaceMBBInJumpTables(& dst, crit_mbb); } where dst was the old basic block, and crit_mbb is the new one, created to remove a critical edge. I think this should solve the problem. If you want, I can give you the pass to break critical edges of machine blocks, so that you guys can see if it is worth adding to LLVM's main br...
2007 Aug 17
0
[LLVMdev] MBB Critical edges
...actual branch keeps jumping to the old basic block, > instead > of the new. Could someone help me to fix this? If it works fine, I can > send a patch for this pass. > > /// modify every branch in src that points to dst to point > /// to the new machine basic block "crit_mbb" instead: > MachineBasicBlock::iterator mii = src.end(); > bool found_branch = false; > while (mii != src.begin()) { > mii--; > // if there are no more branches, finish the loop > if (!tii->isTerminatorInstr(mii->getOpcode())) { >...
2006 Jul 09
0
[LLVMdev] Critical edges
..._crit_edge > > The code is this one below: > > void CriticalEdgeRemoval_Fer::split_critical_edge > (MachineBasicBlock & src, MachineBasicBlock & dst, MachineFunction & > mf) { > > const BasicBlock * src_bb = src.getBasicBlock(); > MachineBasicBlock * crit_mbb = 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<MachineBas...
2006 Oct 03
0
[LLVMdev] Out of range address
On Tue, 3 Oct 2006, Fernando Magno Quintao Pereira wrote: > I am having some problems when compiling huge programs (like gcc). > I have a machine pass to destroy critical edges, and I have to add > new basic blocks, but sometimes the program is too big, and the new > basic block gets out of addressing range. What is the proper way to > address this problem? I am producing code
2006 Oct 03
2
[LLVMdev] Out of range address
Dear guys, I am having some problems when compiling huge programs (like gcc). I have a machine pass to destroy critical edges, and I have to add new basic blocks, but sometimes the program is too big, and the new basic block gets out of addressing range. What is the proper way to address this problem? I am producing code for the PowerPC, and I had to implement the insert go-to method. I am
2007 Aug 18
0
[LLVMdev] MBB Critical edges
...s an indirect jump - > TargetInstrInfo::tii.isIndirectJump(opcode). When that is the case, I > update the jump table using: > > // Change jumps to go to the new basic block: > if(isJumpTable) { > mf.getJumpTableInfo()->ReplaceMBBInJumpTables(& dst, > crit_mbb); > } > > where dst was the old basic block, and crit_mbb is the new one, > created to > remove a critical edge. I think this should solve the problem. If you > want, I can give you the pass to break critical edges of machine > blocks, > so that you guys can see if...