RFR: JDK-8258603 c1 IR::verify is expensive [v5]
Christian Hagedorn
chagedorn at openjdk.java.net
Mon Dec 20 09:31:28 UTC 2021
On Fri, 17 Dec 2021 19:50:05 GMT, Vladimir Kozlov <kvn 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()`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6850
More information about the hotspot-compiler-dev
mailing list