RFR(XS): 8030976: untaken paths should be more vigorously pruned at highest optimization level
Christian Thalinger
christian.thalinger at oracle.com
Thu May 22 16:39:15 UTC 2014
On May 22, 2014, at 4:53 AM, Rickard Bäckman <rickard.backman at oracle.com> 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.
One comment says:
"Trying to get numbers from some bigger benchmarks as well.”
Did you only run SPECjbb2005 or others as well?
>
> Webrev: http://cr.openjdk.java.net/~rbackman/8030976/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8030976
>
> Thanks
> /R
More information about the hotspot-compiler-dev
mailing list