[PATCH] D110973: [DA] Handle mismatching loop levels by considering them non-linear

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 10:33:30 PDT 2022


congzhe added inline comments.


================
Comment at: llvm/lib/Analysis/DependenceAnalysis.cpp:917
+  DispositionTy Disposition = SE->getLoopDisposition(AddRec, LoopNest);
+  if (Disposition != DispositionTy::LoopInvariant &&
+      Disposition != DispositionTy::LoopComputable)
----------------
congzhe wrote:
> Thanks for the change, It looks good to me. I don't know if Micheal has further comments?
> 
> [nit] I'm wondering if it would be better to simplify the code like this?
> ```
> if (SE->getLoopDisposition(AddRec, LoopNest) == ScalarEvolution::LoopDisposition::LoopVariant )
>   return false;
> ```
> Thanks for the change, It looks good to me. I don't know if Micheal has further comments?
> 
> [nit] I'm wondering if it would be better to simplify the code like this?
> ```
> if (SE->getLoopDisposition(AddRec, LoopNest) == ScalarEvolution::LoopDisposition::LoopVariant )
>   return false;
> ```

Actually could be futher simplified to 
```
if (SE->getLoopDisposition(AddRec, LoopNest) == ScalarEvolution::LoopVariant )
  return false;
```



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110973



More information about the llvm-commits mailing list