[LLVMdev] llvm-java

Andrew Haley aph at redhat.com
Mon May 18 09:35:51 PDT 2009


Nicolas Geoffray wrote:
> Hi Andrew,
> 
> Andrew Haley wrote:
>> Also, if you can make the capability generic enough to use in Shark
>> (more at http://gbenson.net/) that would be very useful.
 >
> Agree.
> 
>> The key, I suspect, is to allow the Java front end mark an array.length
>> field in such a way that LLVM knows that field doesn't alias anything else
>> and is constant, so it can be hoisted out of loops.
> 
> For that matter, VMKit already has this optimization. Instead of 
> emitting an LLVM load of the size field, VMKit emits a GetArrayLength 
> call, flagged readnone. The GVN pass will merge all GetArrayLength of a 
> same array and the LICM pass will hoist the call. Once theses passes are 
> complete, VMKit lowers the call to
> the actual load.

Right, so that part should be trivial.  So, does the array bounds check
elimination already work?    If it does, that will considerably reduce
the work that Andre needs to do.  To say the least...

Andrew.



More information about the llvm-dev mailing list