[PATCH] D77523: Add CanonicalizeFreezeInLoops pass

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 12:31:33 PDT 2020


aqjune marked 9 inline comments as done.
aqjune added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp:84
+
+  void getIndPHIInfo(PHINode *PHI, FrozenIndPHIInfo &Info) {
+    auto *StepInst = dyn_cast<BinaryOperator>(
----------------
fhahn wrote:
> fhahn wrote:
> > nit: I think it would be slightly more straight forward to have this function return  a new FrozenIndPHIInfo.
> On second look, this seems very similar to InductionDescriptor::isInductionPHI. Can we use that instead? isInductionPHI should also be able to subsume the call to isAuxiliaryInductionVariable
Yes, InductionDescriptor::isInductionPHI works as well. Thank you for the information.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77523





More information about the llvm-commits mailing list