[PATCH] D76838: [LV][LoopInfo] Transform counting-down loops to counting-up loop

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 12:28:40 PDT 2020


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Analysis/LoopInfo.cpp:220
+//
+PHINode *Loop::reverseInductionVariable(ScalarEvolution &SE) {
+  BasicBlock *Preheader = getLoopPreheader();
----------------
Meinersbur wrote:
>  `Loop` is part of the `LLVMAnalysis` library. Transformations should be in the `LLVMTransform` library.
> 
> Also, it is untypical for the analysis results to have methods for modification as well. These are typically found in the LLVMTransform library such as `LoopUtils.cpp`
Thanks for the suggestion, I'm happy to move this to LoopUtils.cpp. Also checking with @Ayal, is this something we can all live with? 


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

https://reviews.llvm.org/D76838





More information about the llvm-commits mailing list