[LLVMdev] vmkit variables internal representation

Alexandru Ionut Diaconescu cyrusthevirus001x at yahoo.com
Tue Jun 25 08:58:05 PDT 2013


Hi Tim,

Thank you for your answer. Tomorrow morning I will update my question after further investigation based on your advice and with the .ll. 




________________________________
 From: Tim Northover <t.p.northover at gmail.com>
To: Alexandru Ionut Diaconescu <cyrusthevirus001x at yahoo.com> 
Cc: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu> 
Sent: Tuesday, June 25, 2013 5:50 PM
Subject: Re: [LLVMdev] vmkit variables internal representation
 

Hi Alexandru,

> For the local variable Q, it seems that the compiler is optimizing and
> considering store i32 10691, i32* .... (into balance). Do you know how I can
> compile the code for preserving Q?

You've probably got to convince the compiler not to optimise since
eliminating those variables is probably one of the simpler things that
goes on during optimisation. I'd expect the unoptimised code to have
"alloca" instructions inside the function which represent those
variables.

I'm afraid I don't know the javac command-line option to do that
though. Your questions may be better answered on a Java list dealing
with that compiler.

> Ok, in the bytecode there is no string "P", "balance" etc. I assume they are
> preserved in internal globals.

Could be. Doesn't java use UTF-16 for its strings? If so, I'd be
looking for arrays of i16 for my names. Assuming they're there at all,
of course (depends on Java API, ABI and possibly optimisations LLVM
was able to perform).

If you post a full .ll file we may be able to say more. Or someone may
be along who knows the Java LLVM compiler off the top of their head.

Cheers.

Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130625/bcea779d/attachment.html>


More information about the llvm-dev mailing list