[llvm] 9dbc687 - NFC: [LICM] Update some stale comments

Djordje Todorovic via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 06:37:54 PDT 2022


Author: Djordje Todorovic
Date: 2022-03-24T14:37:20+01:00
New Revision: 9dbc687a5ec94dacab00557d3dec74a4e71db529

URL: https://github.com/llvm/llvm-project/commit/9dbc687a5ec94dacab00557d3dec74a4e71db529
DIFF: https://github.com/llvm/llvm-project/commit/9dbc687a5ec94dacab00557d3dec74a4e71db529.diff

LOG: NFC: [LICM] Update some stale comments

After removing the MaybePromotable, some comments
became stale. This improves them.

Differential Revision: https://reviews.llvm.org/D122319

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/LICM.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index b463ce478b40f..af11109d671c3 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -482,8 +482,7 @@ bool LoopInvariantCodeMotion::runOnLoop(
       PredIteratorCache PIC;
 
       // Promoting one set of accesses may make the pointers for another set
-      // loop invariant, so run this in a loop (with the MaybePromotable set
-      // decreasing in size over time).
+      // loop invariant, so run this in a loop.
       bool Promoted = false;
       bool LocalPromoted;
       do {
@@ -2276,8 +2275,7 @@ collectPromotionCandidates(MemorySSA *MSSA, AliasAnalysis *AA, Loop *L) {
     return false;
   };
 
-  // Populate AST with potentially promotable accesses and remove them from
-  // MaybePromotable, so they will not be checked again on the next iteration.
+  // Populate AST with potentially promotable accesses.
   SmallPtrSet<Value *, 16> AttemptingPromotion;
   foreachMemoryAccess(MSSA, L, [&](Instruction *I) {
     if (IsPotentiallyPromotable(I)) {


        


More information about the llvm-commits mailing list