diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -482,8 +482,7 @@ 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 @@ 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 AttemptingPromotion; foreachMemoryAccess(MSSA, L, [&](Instruction *I) { if (IsPotentiallyPromotable(I)) {