RFR: 8288078: linux-aarch64-optimized build fails in Tier5 after JDK-8287567
Andrew Dinn
adinn at openjdk.java.net
Thu Jun 9 10:10:36 UTC 2022
On Thu, 9 Jun 2022 09:33:24 GMT, Andrew Haley <aph at openjdk.org> wrote:
> Because PRODUCT is defined in 'optimized' builds, this needs to be surrounded by ASSERT ifdefs, not PRODUCT.
Patch looks good.
@theRealAph
> Because PRODUCT is defined in 'optimized' builds, this needs to be surrounded by ASSERT ifdefs, not PRODUCT.
I am not sure that comment is correct even though I agree the fix is right. I'll provide my explanation just to be sure I have understood the fix. The error is happening because:
1. `PRODUCT` is *not* defined in 'optimized' builds
2. `assert` is defined as an empty macro in 'optimized' builds
This means that when doing an 'optimized' build the declaration of `is_movk_to_zr` is included but the uses of it inside the call to `assert` gets elided.
The fix works because:
1. ASSERT is not defined in 'optimized' builds
2. `assert` is defined as an empty macro in 'optimized' builds
3. A fortiori the call to `assert` is not compiled in anyway.
So, with the patch the net result is that both the declaration of `is_movk_to_zr` and its use are omitted in 'optimized' builds.
I'm approving the patch on that basis. can you confirm I have understood it correctly?
-------------
Marked as reviewed by adinn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/9103
More information about the hotspot-compiler-dev
mailing list