RFR: 8337660: C2: basic blocks with only BoxLock nodes are wrongly treated as empty

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Wed Nov 13 11:18:30 UTC 2024


On Tue, 12 Nov 2024 13:58:31 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> May I ask what's wrong with making `BoxLock` a subclass of `MachNode`?

Thanks for the suggestion, this might also address the issue, but would break C2's "no Mach nodes before matching" invariant, require pretty invasive code changes, and incur a higher risk of introducing regressions. A more principled solution (out of scope for this bug fix IMO) would be to extend ADL with stack location operands, as hinted [here](https://github.com/openjdk/jdk/blob/79345bbbae2564f9f523859d1227a1784293b20f/src/hotspot/share/opto/matcher.cpp#L2278). This would make it possible to treat BoxLock as any other Ideal node and define platform-specific Mach nodes to replace it after matching.

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

PR Comment: https://git.openjdk.org/jdk/pull/22038#issuecomment-2473269283


More information about the hotspot-compiler-dev mailing list