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

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Fri Jan 8 12:14:58 PST 2010


This version looks good.

Vladimir

Changpeng Fang wrote:
> http://cr.openjdk.java.net/~cfang/6894778/webrev.03/
> 
> 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


More information about the hotspot-compiler-dev mailing list