[llvm-dev] distinguish program and temporary variables

Mohammad Norouzi via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 8 09:17:40 PST 2016


I'm writing a pass that eliminates some variables. To show the effect of
the pass i need to show that I deleted the variables that originally appear
in the user code, not temporary variables added by llvm.

On Mon, Feb 8, 2016 at 5:59 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:

>
> > On Feb 8, 2016, at 6:39 AM, Mohammad Norouzi via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >
> > Hi,
> >
> > I need to check if a variable belongs to the program originally.
> Consider the following code line:
> >
> > y = x + 4
> >
> > and its corresponding llvm ir (roughly):
> >
> > %16 = load i32 %x
> > %add = add i32 %16, i32 4
> > store i32 %add, %y
> >
> > I need to distinguish between %16, %add and %x, %y.
>
>
> This look like it will quickly degrades with optimization to a point where
> it won't be meaningful.
> Why are you needing this? What are you trying to accomplish?
>
> --
> Mehdi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160208/a6e4aa43/attachment.html>


More information about the llvm-dev mailing list