RFR: 8367341: C2: apply KnownBits and unsigned bounds to And / Or operations [v2]

Johan Sjölen jsjolen at openjdk.org
Wed Oct 15 15:39:11 UTC 2025


On Wed, 15 Oct 2025 14:54:18 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> 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.

Use `RBTreeCHeap`, if going the RBTree route. It's just the easiest way of using it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27618#discussion_r2433060235


More information about the hotspot-compiler-dev mailing list