RFR: 8359344: C2: Malformed control flow after intrinsic bailout [v4]

Marc Chevalier mchevalier at openjdk.org
Wed Jul 9 12:40:42 UTC 2025


On Tue, 8 Jul 2025 20:23:08 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Somehow intellij doesn't remove empty indented line
>
> src/hotspot/share/opto/library_call.hpp line 150:
> 
>> 148:   void restore_state(const SavedState&);
>> 149:   void destruct_map_clone(const SavedState& sfp);
>> 150: 
> 
> Can this be a class instead of struct? These methods could be members. Initialization can be done through constructor. The destructor can do restoration by default unless `destruct_map_clone()` was called before.
> I don't like name  `destruct_map_clone()` for this. How about `SavedState::remove()` or something.

I like it. Since intrinsic implementations have mostly bailing out returns, and few success paths, it's nice to say when we are good, rather than every path that ends with bailing out.

I've called the member function `discard`. It gives as `old_state.discard()`, which reads well, I think.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25936#discussion_r2194921677


More information about the graal-dev mailing list