[llvm-dev] distinguish program and temporary variables

Mohammad Norouzi via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 8 10:07:04 PST 2016


On Mon, Feb 8, 2016 at 6:36 PM, mats petersson <mats at planetcatfish.com>
wrote:

> That REALLY sounds like something that should be done at an earlier stage
> in the compilation - at LLVM level, you can't really know whether something
> was produced by the compiler itself, or as a consequence of something in
> the source code.
>

I guess the compiler should know about it. It is inserting these new
variables into the ir code. And the pattern for temporary variables in llvm
is somehow instruction-dependent, e.g. "add" instructions have temporary
variables like %add, %add2 etc.


>
> Unless there is some very specific pattern to those varibles (e.g. "they
> are always called XYZ_abc_kerflunk_billy_bob_*" - it is unlikely that the
> compiler will call a generated variable that).
>

Best,
Mohammad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160208/3728e0b0/attachment.html>


More information about the llvm-dev mailing list