[LLVMdev] vmkit variables internal representation

Gaël Thomas gael.thomas00 at gmail.com
Wed Jun 26 07:30:08 PDT 2013


Hi Alexandru,

The Java bytecode does not give and use the name of the local variables. We
can find them in an attribute used for debugging, but currently, vmkit do
not use this attribute. It means that the llvm bitcode that vmjc emit does
not contain these names. Finding local variables names could be useful, but
we don't plane to implement this feature for the moment... If you are
interested, we can help you to implement this feature, it should not take
too many time,

Gaël

PS: also, even if you can use the java names for locals, you will have to
disable some of the compilation passes because they could promote these
variables into machine registers.
Le 26 juin 2013 15:59, "Alexandru Ionut Diaconescu" <
cyrusthevirus001x at yahoo.com> a écrit :

> Yes ! Thank you a lot :)
>
> It seems vmkit bytecode is quite close to the classic LLVM, but still
> adaptations to the passes have to be done
>
>
>   ------------------------------
>  *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:* Wednesday, June 26, 2013 3:32 PM
> *Subject:* Re: [LLVMdev] vmkit variables internal representation
>
> > I attached the assembly file, the java file and the running script file.
> I
> > hope the variable names can be identified.
>
> Well, I'm afraid I know no more about the Java ABI than you, but Java
> strings can be identified by the type {i32, [N x i16]} where the first
> entry is the length and the array is UTF-16. Running the attached
> hacked-together script on your bitcode file gives the following:
>
> @41 contains string "MYGL"
> @42 contains string "P"
> @43 contains string "balance"
>
> How these fit into the structures defined used is left as an exercise
> to the interested reader. ;-)
>
> 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/e8d4d42b/attachment.html>


More information about the llvm-dev mailing list