RFR: 8325478: Restructure the macro expansion compiler phase to not include macro elimination [v2]

Daniel Lundén dlunden at openjdk.org
Wed Jun 25 09:51:31 UTC 2025


On Wed, 25 Jun 2025 08:44:53 GMT, Saranya Natarajan <snatarajan at openjdk.org> wrote:

>> Could you elaborate a bit on why this is the case? Just looking briefly at `OuterStripMinedLoopNode::adjust_strip_mined_loop` (called from `refine_strip_mined_loop_macro_nodes`), I'm not convinced there are no other interactions.
>
> Before https://github.com/openjdk/jdk/pull/24890, `OuterStripMinedLoopNode::adjust_strip_mined_loop` was called just before   `C->remove_macro_node(n) `inside the condition `n->Opcode() == Op_OuterStripMinedLoop` [(line 2523)](https://github.com/openjdk/jdk/pull/25682/commits/f42ec1a27ad1767580ef4d480ded846a5ea9fc6a#diff-2faebd05d08f9115f8d9ef771644cf05087a6986c2f9013d7163c6aa720169c3R2523). This lead to assert failure as ` OuterStripMinedLoopNode::adjust_strip_mined_loop` added a new node to the macro list. The conclusion from https://github.com/openjdk/jdk/pull/24890 was that ` OuterStripMinedLoopNode::adjust_strip_mined_loop` should be called before we start the macro elimination and remove macro nodes with Opcode `Op_OuterStripMinedLoop`. This is my reasoning for its current placement to be okay.

OK, good!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25682#discussion_r2166304222


More information about the hotspot-compiler-dev mailing list