[LLVMdev] Regarding BasicBlock Cloning
Frits van Bommel
fvbommel at gmail.com
Sat Apr 16 16:50:32 PDT 2011
On Sun, Apr 17, 2011 at 1:32 AM, tarun agrawal <tarun at cse.iitb.ac.in> wrote:
> I am writing a pass for constant propagation using graph restructuring (
> code duplication). I am facing following difficulties..
>
> 1) I need to replicate the basic block but without phi function in the
> replicated block. How can I do this.
>
> 2) I need to insert that basic block after and before some particular basic
> block.
This sounds a lot like jump threading, so you might want to take a
look at LLVM's lib/Transforms/Scalar/JumpThreading.cpp.
More information about the llvm-dev
mailing list