[llvm-dev] IR with no optimization

Kai Wang via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 9 09:36:12 PST 2016

Thanks for the reply.

I'm trying to do points-to analysis actually. I care about whether pointer
values point to the same memory location.
I'm not sure if this is better to be done by Clang or LLVM?

I guess I can get variable name "zone" and "pgdat "from debug meta data?
But how can I know "zone" and "pgdat" point to same memory location?
Thank you.

On Tue, Feb 9, 2016 at 8:25 AM, Joerg Sonnenberger via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Tue, Feb 09, 2016 at 08:09:00AM -0800, Kai Wang via llvm-dev wrote:
> > Since kernel can only be compiled with -O2, IR has been optimized a lot.
> The former is mostly irrelevant unless they use the optimizer-specific
> preprocessor flags. Initial IR optimisations can be disabled with
> -disable-llvm-optzns.
> > Is there any way I can know the variable name and there is an assignment
> > from "zone" to "pgdat"?
> Variable names in IR are syntactical sugar. They serve no real purpose
> except making it more human readable. What you want should be derived
> from debug meta data. On the same line, assignment is a C language
> concept that doesn't really map well to IR -- where subexpressions can
> be indistinguishable from assignment.
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160209/86a0cbc7/attachment.html>

More information about the llvm-dev mailing list