RFR: 8312980: C2: "malformed control flow" created during incremental inlining [v4]
Roland Westrelin
roland at openjdk.org
Tue Oct 10 09:42:12 UTC 2023
On Tue, 10 Oct 2023 08:47:00 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review
>
> src/hotspot/share/opto/replacednodes.cpp line 239:
>
>> 237: // limit search depth
>> 238: if (depth >= 100 || n == nullptr) {
>> 239: return false;
>
> How did you chose the value `100`? Could your bug be reproduced with a much more complicated case this way?
> I imagine just adding 100 diamonds with some ifs.
> @TobiHartmann pointed out to me that you just copied it. Fair enough. But if we "bailout" this way, then can this not trigger the inconsistencies that your reproducer experiences before your fix?
Yes the `100` limit is not new. The inconsistency in this bug is when the input of a `Cast` that's on a if projection is replaced but not the input of the if. The `Cast` node is further away than the `If`. Doing the replacement in the `If` but not the `Cast` wouldn't result in a broken graph. And if replacement happens in the `Cast` then it must happen in the `If` because it's closer to the call that's being replaced.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15905#discussion_r1352027525
More information about the hotspot-compiler-dev
mailing list