<div dir="ltr">Hi all,<br><br clear="all"><div><div class="">
<pre><code> 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);
</code></pre>
<p>Is this code enough to remove the predecessor for each basic block As I read in documentation that this <code>removePredecessor()</code> doesn't update the predecessor list.</p>
<p>So, how could I update the predecessor list ?</p>
<p>Is it also by changing the terminator instruction of the predecessor? </p><p>Thanks<br></p><p></p></div><br>-- <br><div dir="ltr"><b style="color:rgb(32,18,77)"><span> </span>Rasha Salah Omar<br><span> </span> Msc Student at E-JUST<br>
<span> </span> Demonestrator at Faculty of Computers and Informatics<br><span> </span> Benha University</b>
<p style="color:rgb(32,18,77);font-size:13px;font-family:arial,helvetica,clean,sans-serif;background-color:transparent;font-style:normal"><b><span> e-mail: <a href="mailto:rasha.omar@ejust.edu.eg" target="_blank">rasha.omar@ejust.edu.eg</a></span></b></p>
<font size="4"><span style="font-family:Arial,Helvetica,sans-serif;font-size:12px;border-collapse:collapse;color:rgb(69,69,69)"><div style="padding:0px;display:block;line-height:normal">
<span style="font-size:20pt;color:rgb(0,176,80);font-family:Webdings">P</span><b><span style="font-size:11pt;color:rgb(0,176,80);font-family:sans-serif"> Please consider the environment before printing this email.</span></b></div>
</span></font><br></div>
</div></div>