RFR(XS): 8030976: untaken paths should be more vigorously pruned at highest optimization level

Rickard Bäckman rickard.backman at oracle.com
Tue Jun 3 09:54:04 UTC 2014


Updated webrev: http://cr.openjdk.java.net/~rbackman/8030976.1/

Thanks
/R

On 05/22, Rickard Bäckman wrote:
> Roland pointed out a problem with the Reason used. New webrev coming
> shortly.
> 
> Thanks Roland.
> 
> On 05/22, Rickard Bäckman wrote:
> > Hi all,
> > 
> > can I please have reviews for this change.
> > The patch makes C2 place uncommon traps on previously untaken branches
> > much more aggressively (we are simply trusting the profiling more). 
> > This improves performance for a couple of different patterns.
> > 
> > Example:
> > 
> > class Test {
> >   public int[] array = new int[] = { 1, 1, 2, 3, 5, 8, 13 };
> > 
> >   public void some_method() {
> >     for (int i = 0; i < array.length; i++) {
> >       if (array[i] < 255) {
> >         some_call();
> >       } else {
> >         some_other_call();
> >       }
> >     }
> >   }
> > }
> > 
> > Where we previously if the else branch had never been taken rarely would
> > inline the some_other_call and when array escapes we can't make
> > assumptions on non-changing lengths, call killing registers, etc.
> > 
> > On some of the Nashorn benchmark this patch increases score by 35%,
> > others don't see any change at all. No difference on SpecJBB 2005.
> > More performance numbers / microbenchmark in the comments of the bug.
> > 
> > Webrev: http://cr.openjdk.java.net/~rbackman/8030976/
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8030976
> > 
> > Thanks
> > /R
> 
> 
> /R
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140603/36b65626/signature.asc>


More information about the hotspot-compiler-dev mailing list