<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt">Hi Gaël,<br><br>Thank you for clearing the problem ! If I will have time in future, I will contact you to try to implement that. However, how can I identify the local variables in the internal representation? I identified the global variables (and Tim showed me how to get their names), but how can I just identify the local variables (not by name, but by structure - internal vmkit representation)? In the example that I gave, I assume that javac is optimizing the code, so "Q" is lost, not even replaced by a constant. However, that constant is used in other computations, but not kept somewhere?<br><br>Thanks!<br>Alexandru<br><br><br> <div><span><br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif;
 font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Gaël Thomas <gael.thomas00@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Alexandru Ionut Diaconescu <cyrusthevirus001x@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> llvmdev@cs.uiuc.edu <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, June 26, 2013 4:30 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [LLVMdev] vmkit variables internal representation<br> </font> </div> <div class="y_msg_container"><br><div id="yiv4247097612"><div>Hi Alexandru,</div>
<div>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,</div>

<div>Gaël </div>
<div>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.</div>
<div class="yiv4247097612gmail_quote">Le 26 juin 2013 15:59, "Alexandru Ionut Diaconescu" <<a rel="nofollow" ymailto="mailto:cyrusthevirus001x@yahoo.com" target="_blank" href="mailto:cyrusthevirus001x@yahoo.com">cyrusthevirus001x@yahoo.com</a>> a écrit :<br><blockquote class="yiv4247097612gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size:10pt;font-family:times new roman, new york, times, serif;">Yes ! Thank you a lot :) <br><br>It seems vmkit bytecode is quite close to the classic LLVM, but still adaptations to the passes have to be done<br>
<div><span><br></span></div><div><br></div>  <div style="font-family:times new roman, new york, times, serif;font-size:10pt;"> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"> <div dir="ltr"> <hr size="1">
  <font face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Tim Northover <<a rel="nofollow" ymailto="mailto:t.p.northover@gmail.com" target="_blank" href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>><br> <b><span style="font-weight:bold;">To:</span></b> Alexandru Ionut Diaconescu <<a rel="nofollow" ymailto="mailto:cyrusthevirus001x@yahoo.com" target="_blank" href="mailto:cyrusthevirus001x@yahoo.com">cyrusthevirus001x@yahoo.com</a>> <br>
<b><span style="font-weight:bold;">Cc:</span></b> "<a rel="nofollow" ymailto="mailto:llvmdev@cs.uiuc.edu" target="_blank" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>" <<a rel="nofollow" ymailto="mailto:llvmdev@cs.uiuc.edu" target="_blank" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>> <br>
 <b><span style="font-weight:bold;">Sent:</span></b> Wednesday, June 26, 2013 3:32 PM<br>
 <b><span style="font-weight:bold;">Subject:</span></b> Re: [LLVMdev] vmkit variables internal representation<br> </font> </div> <div><br>
> I attached the assembly file, the java file and the running script file. I<br>> hope the variable names can be identified.<br><br>Well, I'm afraid I know no more about the Java ABI than you, but Java<br>strings can be identified by the type {i32, [N x i16]} where the first<br>
entry is the length and the array is UTF-16. Running the attached<br>hacked-together script on your bitcode file gives the following:<br><br>@41 contains string "MYGL"<br>@42 contains string "P"<br>@43 contains string "balance"<br>
<br>How these fit into the structures defined used is left as an exercise<br>to the interested reader. ;-)<br><br>Tim.<br><br><br></div> </div> </div>  </div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a rel="nofollow" ymailto="mailto:LLVMdev@cs.uiuc.edu" target="_blank" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a rel="nofollow" target="_blank" href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br>
<a rel="nofollow" target="_blank" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div></div><br><br></div> </div> </div>  </div></body></html>