[LLVMdev] llvm-java

Andrew Haley aph at redhat.com
Tue May 19 02:43:22 PDT 2009


Nicolas Geoffray wrote:
> Andrew Haley wrote:
>> 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...
>>
>>   
> 
> Trivial bounds check elimination already work, such as tab[2] = 1; 
> tab[1] = 2 (the second affectation won't have a bounds checks). Although 
> I don't know the details,  I believe Andre also targets less trivial 
> eliminations.

I should have asked a better question.  By "does it work" I meant something
like

  for (int i = 0; i < a.length; i++)
    System.out.println(a[i]);

in which the autogenerated check should trivially be removed, but only if
LLVM knows that a.length is invariant.

Andrew.



More information about the llvm-dev mailing list