[llvm] f03f3a8 - [MachineLICM] Fix wrong and confusing comment. NFC.

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 05:39:28 PST 2021


Author: Sjoerd Meijer
Date: 2021-01-29T13:39:07Z
New Revision: f03f3a84747c788f0f196b309785d322fa4e91a1

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

LOG: [MachineLICM] Fix wrong and confusing comment. NFC.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineLICM.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 5a0f0bf40c0a..883299c452b7 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -964,11 +964,11 @@ bool MachineLICMBase::IsLICMCandidate(MachineInstr &I) {
     return false;
   }
 
-  // If it is load then check if it is guaranteed to execute by making sure that
-  // it dominates all exiting blocks. If it doesn't, then there is a path out of
-  // the loop which does not execute this load, so we can't hoist it. Loads
-  // from constant memory are not safe to speculate all the time, for example
-  // indexed load from a jump table.
+  // If it is a load then check if it is guaranteed to execute by making sure
+  // that it dominates all exiting blocks. If it doesn't, then there is a path
+  // out of the loop which does not execute this load, so we can't hoist it.
+  // Loads from constant memory are safe to speculate, for example indexed load
+  // from a jump table.
   // Stores and side effects are already checked by isSafeToMove.
   if (I.mayLoad() && !mayLoadFromGOTOrConstantPool(I) &&
       !IsGuaranteedToExecute(I.getParent())) {


        


More information about the llvm-commits mailing list