search for: replacembbinjumpt

Displaying 7 results from an estimated 7 matches for "replacembbinjumpt".

2007 Aug 19
1
[LLVMdev] MBB Critical edges
...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...
2007 Aug 17
2
[LLVMdev] MBB Critical edges
...add one method to TargetInstrInfo 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 add...
2009 Feb 19
0
[LLVMdev] Bug in BranchFolding.cpp:OptimizeBlock
...ineBasicBlock *Pred = *(MBB->pred_end()-1); Pred->ReplaceUsesOfBlockWith(MBB, FallThrough); } // If MBB was the target of a jump table, update jump tables to go to the // fallthrough instead. MBB->getParent()->getJumpTableInfo()-> ReplaceMBBInJumpTables(MBB, FallThrough); MadeChange = true; } return; } The problem with this section of code is that FallThrough is not guaranteed to be a successor of MBB or even a descendent of MBB. The bitcode I've attached is a case where there are 5 basic blocks, where the first f...
2007 Aug 13
1
[LLVMdev] jump tables
Guys, two questions: 1) where, in the LLVM source tree, is the code that creates jump tables? 2) is it possible to change the destiny of a jump table with a MachineFunction pass? best, Fernando
2007 Aug 18
0
[LLVMdev] MBB Critical edges
...nstrInfo 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, &...
2007 Aug 17
0
[LLVMdev] MBB Critical edges
Sorry about the tardiness of my reply. My mail client has playing tricks with me. :-) I am assuming the issue has nothing to do the branch to jumptable instructions but rather the MachineJumpTableInfo associated with every MachineFunction? If so, please take a look at BranchFoldiing.cpp for an example. Evan On Aug 10, 2007, at 12:30 PM, Fernando Magno Quintao Pereira wrote: > >
2007 Aug 10
2
[LLVMdev] MBB Critical edges
Hi all, I have a pass to break critical edges of Machine Basic Blocks, but I just discovered a bug (when compiling code for x86). The problem is 'jumpl *%reg'. I don't know how to update the jump table for this type of instruction. The code that I had (see below) does not update the jump table, and the actual branch keeps jumping to the old basic block, instead of the new.