[llvm-dev] IR with no optimization

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 9 08:25:02 PST 2016


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


More information about the llvm-dev mailing list