[PATCH] D109257: [SimpleLoopUnswitch] Inform pass manager when child loops are deleted
    Bjorn Pettersson via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Sep  3 14:17:39 PDT 2021
    
    
  
bjope added a comment.
In D109257#2983151 <https://reviews.llvm.org/D109257#2983151>, @aeubanks wrote:
> Do we need to do the same at the end of `rebuildLoopAfterUnswitch()`? Looks like another loop is getting destroyed there.
I actually added a similar DestroyedLoopCB callback in `rebuildLoopAfterUnswitch()` in an earlier draft of the patch. But then I realized that the destroy call in that place is for the base loop that is being unswitched. And as far as I could tell that boils down to `rebuildLoopAfterUnswitch()' returning false, and then `unswitchNontrivialInvariants()` will pass on information in the UnswitchCB call that the loops has been destroyed, and the `markLoopAsDeleted` call is made from that call back.
I was thinking that it would be nice to have a code comment explaining that next to the `LI.destroy(&L)` call. Seems like I forgot about adding such a comment.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109257/new/
https://reviews.llvm.org/D109257
    
    
More information about the llvm-commits
mailing list