The clone llvm:CloneBasicBlock copies the phi function in the replicated
 basic block from the original basic block. <br>I don't want the copy of
 phi in relplicated block. For now I am creating .bc file with -O0 
option so that it doesn't generate phi function in first place. Is this a
 good approach or there are some other function available for it. <br><br>Tarun<br><br><div class="gmail_quote">On Sun, Apr 17, 2011 at 5:22 AM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">On Sat, Apr 16, 2011 at 4:32 PM, tarun agrawal <<a href="mailto:tarun@cse.iitb.ac.in">tarun@cse.iitb.ac.in</a>> wrote:<br>


> Hi,<br>
><br>
> I am writing a pass for constant propagation using graph restructuring (<br>
> code duplication). I am facing following difficulties..<br>
><br>
> 1) I need to replicate the basic block but without phi function in the<br>
> replicated block. How can I do this.<br>
><br>
> 2) I need to insert that basic block after and before some particular basic<br>
> block.<br>
<br>
</div></div>You probably want to use llvm::CloneBasicBlock from<br>
Transforms/Utils/Cloning.h to get a cloned version of a block.<br>
BasicBlock::splitBasicBlock might be useful as well.<br>
<font color="#888888"><br>
-Eli<br>
</font></blockquote></div><br>