RFR: 8336726: C2: assert(!do_asserts || projs->fallthrough_ioproj != nullptr) failed: must be found
Christian Hagedorn
chagedorn at openjdk.org
Fri Oct 11 13:40:11 UTC 2024
On Thu, 10 Oct 2024 13:29:11 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Post-parse call devirtualization asserts when calling `CallNode::extract_projections` on a virtual call that does not have the `fallthrough_ioproj` anymore. The projection was removed because the call is followed by an endless loop that does not have any IO uses.
>
> Similar to incremental inlining, we should not assert that all call projections are still there for post-parse call devirtualization because parts of the graph might have been removed already:
> https://github.com/openjdk/jdk/blob/580eb62dc097efeb51c76b095c1404106859b673/src/hotspot/share/opto/callnode.cpp#L963-L965
>
> Thanks,
> Tobias
That looks reasonable to me. As we have discussed offline, it's probably not worth/too complex to verify that we always end in an infinite loop afterwards.
test/hotspot/jtreg/compiler/c2/TestCallDevirtualizationWithInfiniteLoop.java line 53:
> 51: public static void test(boolean flag) {
> 52: // Avoid executing endless loop
> 53: if (flag) return;
You should add braces here:
Suggestion:
if (flag) {
return;
}
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21450#pullrequestreview-2362827732
PR Review Comment: https://git.openjdk.org/jdk/pull/21450#discussion_r1796968384
More information about the hotspot-compiler-dev
mailing list