[LLVMdev] llvm-java

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon May 18 09:17:58 PDT 2009


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.

:)

Cheers,
Nicolas

> Andrew.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>   




More information about the llvm-dev mailing list