RFR: JDK-8258603 c1 IR::verify is expensive [v5]
Vladimir Kozlov
kvn at openjdk.java.net
Thu Dec 23 01:18:15 UTC 2021
On Mon, 20 Dec 2021 09:28:30 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> > So the whole block of code in `c1_IR.cpp` is under `#ifndef PRODUCT`. But is it used in **optimized** build or only in debug?
> > I suggest to change `#ifndef PRODUCT` at line 1224 to `#ifdef ASSERT` and try to build optimized VM to see if it is used in it. I see only prints and asserts.
>
> Shouldn't we leave `BlockPrinter` and `IR::print()` under `#ifndef PRODUCT`? These seem to be about printing things only which is probably good to have in optimized builds as well. We could instead just add an `#ifdef ASSERT` on L1263 for the validators and the IR verification and change the places using this code accordingly to `#ifdef ASSERT/DEBUG_ONLY()`. Then we would have everything under `ASSERT` instead of `!PRODUCT`. This would be in line with the original code which used `#ifdef ASSERT` in `IR::verify()`.
I agree with christian's suggestion.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6850
More information about the hotspot-compiler-dev
mailing list