[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 10:15:09 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:94
+ // can remove this loop.
+ return hasMustProgress(L) || L->getHeader()->getParent()->hasMustProgress();
}
----------------
Check this earlier. It is cheaper than the check before.
================
Comment at: llvm/test/Analysis/ScalarEvolution/2012-03-26-LoadConstant.ll:1
-; RUN: opt < %s -basic-aa -globalopt -instcombine -loop-rotate -licm -instcombine -indvars -loop-deletion -constmerge -S | FileCheck %s
+; RUN: opt < %s -basic-aa -globalopt -instcombine -loop-rotate -licm -instcombine -indvars -loop-deletion -constmerge -simplifycfg -S | FileCheck %s
; PR11882: ComputeLoadConstantCompareExitLimit crash.
----------------
Why?
================
Comment at: llvm/test/Transforms/LoopDeletion/mustprogress.ll:46
+; CHECK: br label %[[FOR_COND1]]
+; CHECK: }
+
----------------
The result is the same as above because the function attribute is still present. Is that intended?
================
Comment at: llvm/test/Transforms/LoopDeletion/mustprogress.ll:193
+; CHECK: ret void
+; CHECK: }
+
----------------
Why is this not deleted?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86844/new/
https://reviews.llvm.org/D86844
More information about the llvm-commits
mailing list