Un-SSA pass and cloning basic blocks

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

Un-SSA pass and cloning basic blocks

Prakash Prabhu-2
Hi,

Sorry if this question has been asked earlier:

Is the -reg2mem the pass to convert SSA form of LLVM IR to non-SSA
form (ie, eliminate all phi-functions from LLVM IR) ? I tried it with
a small example and it did remove all the phi function, I just wanted
to confirm that the pass guarantees to remove all phi functions. Also,
assuming I have this pass as a required pass, is it safe to clone
basic blocks within a function (while respecting dominance property of
existing blocks) to help for example, path-specific optimizations that
might be benefited by node splitting ?

thanks,
Prakash
_______________________________________________
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
|

Re: Un-SSA pass and cloning basic blocks

Patrick Meredith
-reg2mem is the un-SSA pass. I believe it is guaranteed to remove all  
phi nodes (in fact, I'm pretty sure it works by iterating over all phi  
nodes).  Andrew Lenharth will correct me if I'm wrong.

On Aug 25, 2008, at 3:38 PM, Prakash Prabhu wrote:

> Hi,
>
> Sorry if this question has been asked earlier:
>
> Is the -reg2mem the pass to convert SSA form of LLVM IR to non-SSA
> form (ie, eliminate all phi-functions from LLVM IR) ? I tried it with
> a small example and it did remove all the phi function, I just wanted
> to confirm that the pass guarantees to remove all phi functions. Also,
> assuming I have this pass as a required pass, is it safe to clone
> basic blocks within a function (while respecting dominance property of
> existing blocks) to help for example, path-specific optimizations that
> might be benefited by node splitting ?
>
> thanks,
> Prakash
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

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