RFR: 8370220: C2: rename methods and improve documentation around get_ctrl and idom lazy updating/forwarding of ctrl and idom via dead ctrl nodes [v8]

Emanuel Peter epeter at openjdk.org
Tue Oct 21 15:57:16 UTC 2025


On Tue, 21 Oct 2025 12:17:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> When working on https://github.com/openjdk/jdk/pull/27889, I was irritated by the lack of documentation and suboptimal naming.
>> 
>> Here, I'm doing the following:
>> - Add more documentation, and improve it in other cases.
>> - Rename "lazy" methods: "lazy" could indicate that we delay it somehow until later, but it is unclear what is delayed.
>>   - `lazy_replace` -> `replace_ctrl_node_and_forward_ctrl_and_idom`
>>   - `lazy_update` -> `install_lazy_ctrl_and_idom_forwarding`
>> - Made some methods private, and added some additional asserts.
>> 
>> I'd be more than happy for even better names, and suggestions how to improve the documentation further :)
>> 
>> Related issues:
>> https://github.com/openjdk/jdk/pull/27889
>> https://github.com/openjdk/jdk/pull/15720
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Apply suggestions from code review
>   
>   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>

Seems GHA is giving me some failures I did not see in our internal testing:

`compiler.lib.ir_framework.flag.FlagVM compiler.gcbarriers.TestShenandoahBarrierExpansion
`

#  Internal Error (/home/runner/work/jdk/jdk/src/hotspot/share/opto/loopnode.hpp:1168), pid=5884, tid=5904
#  assert(!has_ctrl(old_node) && old_node->is_CFG() && old_node->in(0) == nullptr) failed: must be dead ctrl (CFG) node


This is part of the assert I added. Will have to investigate.

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

PR Comment: https://git.openjdk.org/jdk/pull/27892#issuecomment-3427379718


More information about the shenandoah-dev mailing list