[LLVMdev] removePredecessor() and update predecessor list

Rasha Omar rasha.sala7 at gmail.com
Sat Aug 24 17:15:27 PDT 2013


Hi all,

    for(pred_iterator PI=pred_begin(BB); PI!=pred_end(BB); PI++)
  {
    BasicBlock *Pres = *PI;
    pred.insert(Pres);
  }
for(predit = pred.begin(); predit!=pred.end();predit++)
  (BB)->removePredecessor(*predit);

Is this code enough to remove the predecessor for each basic block As I
read in documentation that this removePredecessor() doesn't update the
predecessor list.

So, how could I update the predecessor list ?

Is it also by changing the terminator instruction of the predecessor?

Thanks


-- 
*     Rasha Salah Omar
     Msc Student at E-JUST
     Demonestrator  at Faculty of Computers and Informatics
     Benha University*

*     e-mail: rasha.omar at ejust.edu.eg*
 P* Please consider the environment before printing this email.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130825/4f9a95bd/attachment.html>


More information about the llvm-dev mailing list