Displaying 1 result from an estimated 1 matches for "newbr".
Did you mean:
newbb
2004 Dec 07
1
[LLVMdev] Question adding dummy basic blocks
...the following
if( TI->getNumSuccessors() ==1){
BasicBlock *TIBB=TI->getParent();
BasicBlock *DestBB=TI->getSuccessor(0);
BasicBlock *NewBB = new BasicBlock(TIBB->getName()+DestBB->getName()+"dummy_bb",&F);
new BranchInst(DestBB, NewBB);
BranchInst *NewBr = new BranchInst(DestBB, NewBB, V_dummy);
ReplaceInstWithInst(TI, NewBr);
// the following code, we are trying to change value of PHINODE, and trying to find some examples to solve, but we failed
// Since the DestBB is added to one more predecessor, and we need addIncoming value.
// TIBB got...