RFR: 8260650: test failed with "assert(false) failed: infinite loop in PhaseIterGVN::optimize" [v2]
Igor Veresov
iveresov at openjdk.java.net
Tue Mar 16 16:22:12 UTC 2021
On Tue, 16 Mar 2021 16:04:28 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Igor Veresov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address Tobias' comments.
>
> src/hotspot/share/opto/phaseX.cpp line 850:
>
>> 848: k = i;
>> 849: #ifdef ASSERT
>> 850: if (loop_count >= K * C->live_nodes()) {
>
> This should be `K + C->live_nodes()` instead of `*`.
> The code in `optimize()` uses `*` because it goes over all nodes. But here you iterate only one node.
It's not very obvious to me. I think the limits should actually be the same everywhere because in the edge case, when all the nodes are connected and you start with the right one, all the same optimizations can happen within the loop in `transform_old`. Imagine a graph that is a huge foldable one-side-leaning expression tree. Its processing can either fully happen in the loop in `transform_old` if you start from the top, or it can happen in `optimize` when you start from the bottom and do the worklist-based processing one by one. Depends whether you can go forward in the graph or need to backtrack, but the amount of computation is kind of the same. Or am I wrong?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3022
More information about the hotspot-compiler-dev
mailing list