<DIV id=RTEContent><FONT size=2> <div>Hi ,</div> <div>I am trying to clone a BasicBlock. I want both to co-exist and I have introduced</div> <div>a conditional branch to the original or the cloned BB. </div> <div>I tried mapping the original instruction and the clone as below :</div> <div> Instruction *NewInst = II->clone();</div> <div> if (II->hasName())</div> <div> NewInst->setName(II->getName());</div> <div> NewBB->getInstList().push_back(NewInst);</div> <div> ValueMap[II] = NewInst; </div> <div>what I got from this is ,</div> <div> --> eventhough I have set the same name , a new name is set for the clone.</div> <div> original :</div>
<div> %CS1 = call fastcc int %add( int %tmp.5, int %tmp.6 ) ; <int> [#uses=1]</div> <div> clone :</div> <div> %CS11 = call fastcc int %add( int %tmp.5, int %tmp.6 ) ; <int> [#uses=1]</div> <div> --> the verifier gives the following error</div> <div> Instruction does not dominate all uses!</div> <div> &n!
bsp; for
the original instruction.</div> <div>Is it possible to have the instructions in the clone to have the same name </div> <div>as the original BB ?</div> <div>Is it possible to make the uses of the original instruction to be the </div> <div>uses of the cloned instruction at the same time ? </div> <div>What makes the above error ?</div> <div>Is it because of SSA ? </div> <div> </div> <div> </div> <div>Thanks in advance for any help,</div> <div>Sandra</div> <div> </div> <div> </div></FONT></DIV><p>
<hr size=1> <a href="http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/">Yahoo! FareChase - Search multiple travel sites in one click.</a>