[llvm] 59a6ab2 - [GVN] small improvements to comments

Jameson Nash via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 10:22:04 PST 2020


Author: Jameson Nash
Date: 2020-11-03T13:21:48-05:00
New Revision: 59a6ab28c42bd0330232415178ed8cc97206a209

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

LOG: [GVN] small improvements to comments

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/GVN.cpp
    llvm/lib/Transforms/Utils/VNCoercion.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index d5fc02058a11..f2c12f2bae77 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1042,7 +1042,7 @@ bool GVN::AnalyzeLoadAvailability(LoadInst *LI, MemDepResult DepInfo,
 
   if (StoreInst *S = dyn_cast<StoreInst>(DepInst)) {
     // Reject loads and stores that are to the same address but are of
-    // 
diff erent types if we have to. If the stored value is larger or equal to
+    // 
diff erent types if we have to. If the stored value is convertable to
     // the loaded value, we can reuse it.
     if (!canCoerceMustAliasedValueToLoad(S->getValueOperand(), LI->getType(),
                                          DL))

diff  --git a/llvm/lib/Transforms/Utils/VNCoercion.cpp b/llvm/lib/Transforms/Utils/VNCoercion.cpp
index 11b42eca4960..3adb9d40b4ff 100644
--- a/llvm/lib/Transforms/Utils/VNCoercion.cpp
+++ b/llvm/lib/Transforms/Utils/VNCoercion.cpp
@@ -50,12 +50,12 @@ bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy,
 
 
   // The implementation below uses inttoptr for vectors of unequal size; we
-  // can't allow this for non integral pointers.  Wecould teach it to extract
+  // can't allow this for non integral pointers. We could teach it to extract
   // exact subvectors if desired. 
   if (DL.isNonIntegralPointerType(StoredTy->getScalarType()) &&
       StoreSize != DL.getTypeSizeInBits(LoadTy).getFixedSize())
     return false;
-  
+
   return true;
 }
 


        


More information about the llvm-commits mailing list