[llvm-dev] API to Differentiate between SSA and non SSA form

James Courtier-Dutton via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 21 05:18:25 PDT 2017


On 19 April 2017 at 16:50, Pushpinder Singh via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello everyone,
>
> We are working on a particular points-to analysis. The final output of
> that analysis should not have the LLVM SSA temporaries (like, %0, %1).
> My doubt is that whether we can extract the normal C variables from
> LLVM IR or is there any way to differentiate between SSA temporary and
> local C variable?
>
>
SSA does not directly map onto C variables.
C variables vary. SSA labels do not vary.
If you wish to raise LLVM to C, a general approach could take all the SSA
labels that are linked with a PHI statement, and give them all the same C
variable name.
It is unclear what you mean by "points-to analysis".  You might wish to
look into "alias analysis" as it might be similar to what you are trying to
do.

The "alloca" statement can represent a C local variable, but due to
optimisations, not all C local variables are stored on the stack.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170421/c7f6b2f3/attachment.html>


More information about the llvm-dev mailing list