[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 15:34:50 PST 2020


jonpa added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:132
 /// A loop is considered dead if it does not impact the observable behavior of
 /// the program other than finite running time. This never removes a loop that
 /// might be infinite (unless it is never executed), as doing so could change
----------------
Seems like it would be nice to update this comment.


================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:211
   // Don't remove loops for which we can't solve the trip count.
   // They could be infinite, in which case we'd be changing program behavior.
   const SCEV *S = SE.getConstantMaxBackedgeTakenCount(L);
----------------
and also this comment..?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86844



More information about the llvm-commits mailing list