RFR: 8307927: C2: "malformed control flow" with irreducible loop

Emanuel Peter epeter at openjdk.org
Fri Jun 23 08:44:16 UTC 2023


On Fri, 23 Jun 2023 08:41:09 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/loopnode.cpp line 3515:
>> 
>>> 3513: // Allpaths backwards scan from loop tail, terminating each path at first safepoint
>>> 3514: // encountered.  Helper for check_safepts.
>>> 3515: void IdealLoopTree::allpaths_check_safepts(VectorSet &visited, Node_List &stack) {
>> 
>> @rwestrel you should update the description here. Suggestion:
>> 
>> Allpaths backwards scan. Starting at the head, traversing all backedges, and the body. Terminating each path at first safepoint encountered.  Helper for check_safepts.
>
> Also the line above is not accurate enough anymore:
> `_required_safept->push(n);  // save the one closest to the tail`
> 
> For one: could there not be multiple such SafePoints? If so: what does it mean to take "the closest"? And we may have multiple backedges / tails, now that we allow irreducible loops.

Other than that the fix looks reasonable to me, thanks for the fix @rwestrel !

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14522#discussion_r1239541231


More information about the hotspot-compiler-dev mailing list