RFR: 8364757: Missing Store nodes caused by bad wiring in PhaseIdealLoop::insert_post_loop [v7]

Benoît Maillard bmaillard at openjdk.org
Mon Sep 29 08:55:00 UTC 2025


On Mon, 29 Sep 2025 08:47:13 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:

>> src/hotspot/share/opto/loopnode.hpp line 1384:
>> 
>>> 1382: 
>>> 1383:   // Find the last store in the body of an OuterStripMinedLoop when following memory uses
>>> 1384:   Node *find_last_store_in_outer_loop(Node* store, IdealLoopTree* outer_loop);
>> 
>> If I am not mistaken, this could be `const` since you are only using `PhaseIdealLoop::get_loop()`, which is also `const`.
>> Suggestion:
>> 
>>   Node *find_last_store_in_outer_loop(Node* store, IdealLoopTree* outer_loop) const;
>
> Unfortunately we also use `PhaseIdealLoop::get_ctrl`, which is not `const`, so it doesn't work.

This made me realize that we can make `outer_loop` const though.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27225#discussion_r2387174417


More information about the hotspot-compiler-dev mailing list