[PATCH] D110234: [LoopFlatten] Updating Phi nodes after IV widening

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 06:39:27 PDT 2021


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:725
   if (!CreateWideIV({FI.OuterInductionPHI, MaxLegalType, false }, Deleted))
     return false;
 
----------------
xbolva00 wrote:
> Deleted is now unused?
Thanks for taking a look at this.

Function `CreateWideIV` takes and sets a bool if the phi node was trivially deleted. Above, on line 720, we pass `FI.IsTriviallyDeletedPhi`. We want to record this state  for the inner induction phi, because it's the inner loop that gets removed. But here, for the outer loop, we don't really care about this. So it's not really used, and we pass in a dummy Deleted boolean.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110234/new/

https://reviews.llvm.org/D110234



More information about the llvm-commits mailing list