Quantcast

help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

help

vikash kumar-9
Hi,

We are trying to do build a pass with constant propagation and graph restructuring.

We are not able to find a suitable function for basic block cloning. We have found CloneBasicBlock function but it includes the phi of the original block in the replicated block. We don't want phi of original block in the replicated basic block.

Also we need to change the successor and predecessor of the replicated basic block. We are also not able to do that.


Regards
Vikash Kumar.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: help

Bill Wendling-2
On Apr 15, 2011, at 11:44 AM, vikash kumar wrote:

> Hi,
>
> We are trying to do build a pass with constant propagation and graph restructuring.
>
> We are not able to find a suitable function for basic block cloning. We have found CloneBasicBlock function but it includes the phi of the original block in the replicated block. We don't want phi of original block in the replicated basic block.
>
> Also we need to change the successor and predecessor of the replicated basic block. We are also not able to do that.
>
Hi Vikash,

It might be better for you to simply create a new BasicBlock and loop through the old BB and copy over the instructions from there that you want. It allows you the ultimate in flexibility. :-)

-bw

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Loading...