[lworld] RFR: 8367242: [lworld] C2 compilation asserts with "dead loop detected" [v2]
Tobias Hartmann
thartmann at openjdk.org
Wed Oct 1 07:23:27 UTC 2025
On Tue, 30 Sep 2025 08:51:25 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> src/hotspot/share/opto/cfgnode.cpp line 1482:
>>
>>> 1480: }
>>> 1481: {
>>> 1482: Node* uin = unique_constant_input_recursive(phase);
>>
>> I think the original format was fine but I have no strong opinion.
>
> I wouldn't fight too hard for it, but when trying things, it was necessary (since I wanted different types for `uin`), but I also think it helps to see that it is not useful too long, and I can mess with it without having to look at what comes after. In this case, indeed, it feels a bit coming out of nowhere at the end...
>
> In C++17, I'd do:
> ```c++
> if (Node* uin = unique_constant_input_recursive(phase); uin != nullptr) {
> return uin;
> }
>
> one could also do
> ```c++
> if (Node* uin = unique_constant_input_recursive(phase)) {
> return uin;
> }
>
> if we are not afraid of implicit conditions (but we are, and I'm fine with it!).
Right but now that both `uin` have the same type, the scoping seems unnecessary.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1640#discussion_r2393507487
More information about the valhalla-dev
mailing list