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

Daniel Lundén dlunden at openjdk.org
Wed Jun 18 16:19:32 UTC 2025


On Tue, 17 Jun 2025 14:10:26 GMT, Saranya Natarajan <snatarajan at openjdk.org> wrote:

>> src/hotspot/share/opto/macro.cpp line 2554:
>> 
>>> 2552: bool PhaseMacroExpand::expand_macro_nodes() {
>>> 2553:   // Do not allow new macro nodes once we started to expand
>>> 2554:   C->reset_allow_macro_nodes();
>> 
>> Same here, this call is later compared to before (it is at the top of the old `expand_macro_nodes`, before `eliminate_macro_nodes`). Is this a safe move?
>
> I believe, this is also fine. However, I have moved it to `compile.cpp` to mimic the scenario as done previously before this PR.

Good! Better safe than sorry, especially if there is no strong reason to move it.

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

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


More information about the hotspot-compiler-dev mailing list