[11u] RFR: Fix non-Shenandoah builds
Roman Kennke
rkennke at redhat.com
Fri Jul 19 15:36:32 UTC 2019
I am not sure that the fix is quite right. We do want to exclude this
stuff from non-Shenandoah builds methinks. Maybe just move the whole
block up a little, so that the trailing || here:
> (bol->in(1)->Opcode() == Op_CompareAndSwapN ) ||
... doesn't end up being the last one?
Roman
> Recent backports broke 11u builds that disable Shenandoah, like this:
>
> /home/buildbot/worker/shenandoah-jdk11-linux/build/src/hotspot/share/opto/loopTransform.cpp: In
> member function ‘void IdealLoopTree::adjust_loop_exit_prob(PhaseIdealLoop*)’:
> /home/buildbot/worker/shenandoah-jdk11-linux/build/src/hotspot/share/opto/loopTransform.cpp:2807:14:
> error: expected primary-expression before ‘)’ token
> ))
>
> The reason is added INCLUDE_SHENANDOAHGC here:
> http://hg.openjdk.java.net/shenandoah/jdk11/file/tip/src/hotspot/share/opto/loopTransform.cpp#l2799
>
> Note there is no #if in later releases:
> http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/share/opto/loopTransform.cpp#l2976
>
> I think we just need to remove the guard:
>
> diff -r 04950e09d7f5 src/hotspot/share/opto/loopTransform.cpp
> --- a/src/hotspot/share/opto/loopTransform.cpp Thu May 23 17:01:38 2019 +0200
> +++ b/src/hotspot/share/opto/loopTransform.cpp Fri Jul 19 17:23:34 2019 +0200
> @@ -2796,14 +2796,12 @@
> (bol->in(1)->Opcode() == Op_CompareAndSwapL ) ||
> (bol->in(1)->Opcode() == Op_CompareAndSwapP ) ||
> (bol->in(1)->Opcode() == Op_CompareAndSwapN ) ||
> -#if INCLUDE_SHENANDOAHGC
> (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeP ) ||
> (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeN ) ||
> (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapP ) ||
> (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapN ) ||
> (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapP ) ||
> (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapN )
> -#endif
> ))
> return; // Allocation loops RARELY take backedge
> // Find the OTHER exit path from the IF
>
> Testing: {x86_32, x86_64} builds
>
More information about the shenandoah-dev
mailing list