[LLVMdev] vmkit variables internal representation

Alexandru Ionut Diaconescu cyrusthevirus001x at yahoo.com
Wed Jun 26 06:04:32 PDT 2013



Hello Tim,

I attached the assembly file, the java file and the running script file. I hope the variable names can be identified.
Thanks




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


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.



_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu        http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/eced6551/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.bc
Type: application/octet-stream
Size: 12160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/eced6551/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.java
Type: text/x-java
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/eced6551/attachment.java>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main_assembly
Type: application/octet-stream
Size: 58318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/eced6551/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run.sh
Type: application/x-sh
Size: 516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/eced6551/attachment.sh>


More information about the llvm-dev mailing list