Request for reviews (L): 6894779: Loop Predication for Loop Optimizer in C2

Changpeng Fang Changpeng.Fang at Sun.COM
Mon Jan 11 15:50:21 PST 2010

Thank you, Tom!



On 01/11/10 14:22, Tom Rodriguez wrote:
> The only comment I'd make is that are some formatting problems.  "if(foo)" should be "if (foo)" and // should always have at least a space before and after it.  Also don't replicate the style "if ( foo )" in your new code.  Use "if (foo)".  Otherwise this looks good.
> tom
> On Jan 8, 2010, at 11:06 AM, Changpeng Fang wrote:
>> 6894779: Loop Predication for Loop Optimizer in C2
>> Loop Predication Description:
>> The idea is to insert a predicate on the entry path to a loop, and raise a uncommon trap
>> if the check of the condition(s) fails. The condition checks are promoted from inside the
>> loop body, and thus the checks inside the loop could be eliminated.
>> Currently implementation works for array range checks and (loop) invariant checks (null
>> checks, array checks, etc.)
>> Loop Predication Advantages:
>> (1) No pre- and post-loops required. As a result, the optimization applies to the whole loop
>>    body. In addition, the code size increase due to the optimization is very limited (we don't
>>    need three copies of the loop)
>> (2) In this implementation, we apply loop predication to each level of the loop, so that additional
>>    optimization opportunities have been explored.
>> (3) Because it doesn't create pre- and post-loops, loop predication can be applied to loops with calls.
>> Reviewed by:
>> This work was initiated by Ross Knippel and has been directed and pre-reviewed by
>> Thomas Rodriguez and Vladimir Kozlov (many thanks)
>> Tests:
>> JPRT, refworkload, CTW, specjvm2008
>> Thanks,
>> Changpeng

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-compiler-dev mailing list