[PATCH] D108087: [SimpleLoopUnswitch] Create SimpleLoopNestUnswitch pass

toshiki maekawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 20:06:23 PDT 2021


uint256_t marked 2 inline comments as done.
uint256_t added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2973
+  Instruction *BestUnswitchTI =
+      findBestUnswitchTI(L, DT, LI, AC, AA, TTI, SE, MSSAU, PartialIVInfo,
+                         ExitBlocks, BestUnswitchInvariants);
----------------
Whitney wrote:
> When given BestUnswitchTIForLoopNest, why do we want to findBestUnswitchTI?
> 
> When given BestUnswitchTIForLoopNest, this code only unswitch if BestUnswitchTIForLoopNest == findBestUnswitchTI. Is it possible that BestUnswitchTIForLoopNest != findBestUnswitchTI only have some loop level?
We want to `findBestUnswitchTI` to obtain `PartialIVInfo`, `ExitBlocks`, and `BestUnswitchInvariants`. However it seems we can remove some code.
I'll change the code soon.


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

https://reviews.llvm.org/D108087



More information about the llvm-commits mailing list