RFR: 8367341: C2: apply KnownBits and unsigned bounds to And / Or operations [v2]
Kim Barrett
kbarrett at openjdk.org
Wed Oct 15 14:57:24 UTC 2025
On Wed, 15 Oct 2025 12:32:28 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> It surely would be very easy, and not affect the product. But let's see what they say.
>
> They tell me it is fine, and we are already doing similar things here:
> `test/hotspot/gtest/jfr/test_networkUtilization.cpp`
Not a review, just a drive-by comment, following up on @eme64 "They tell me its fine".
I do not think it's okay to use most standard library headers. Doing so can run into issues with things
like our forbidden function mechanism, assert macro collision, and others. My opinion is the uses in
`jfr/test_networkUtilization.cpp` shouldn't be there, and aren't actually necessary. I just did a spot check,
and the only "good" case I found is `test_codestrings.cpp` using `<regex>`, where there isn't any similar
functionality available in hotspot. The suggestion in the discussion @eme64 for a set is `RBTree`. The O(1)
lookup by a hashtable is unlikely to matter to a gtest.
There is ongoing work updating our usage (see, for example, https://bugs.openjdk.org/browse/JDK-8369186)
and how to do that in a safe and consistent manner.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27618#discussion_r2432895220
More information about the hotspot-compiler-dev
mailing list