[llvm] r208757 - Update the comments for ComputeMaskedBits, which lost its Mask parameter

Jay Foad jay.foad at gmail.com
Wed May 14 01:00:07 PDT 2014


Author: foad
Date: Wed May 14 03:00:07 2014
New Revision: 208757

URL: http://llvm.org/viewvc/llvm-project?rev=208757&view=rev
Log:
Update the comments for ComputeMaskedBits, which lost its Mask parameter
in r154011.

Modified:
    llvm/trunk/include/llvm/Analysis/ValueTracking.h
    llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
    llvm/trunk/lib/Analysis/ValueTracking.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/include/llvm/Analysis/ValueTracking.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ValueTracking.h?rev=208757&r1=208756&r2=208757&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ValueTracking.h (original)
+++ llvm/trunk/include/llvm/Analysis/ValueTracking.h Wed May 14 03:00:07 2014
@@ -27,14 +27,13 @@ namespace llvm {
   class MDNode;
   class TargetLibraryInfo;
 
-  /// ComputeMaskedBits - Determine which of the bits specified in Mask are
+  /// ComputeMaskedBits - Determine which bits of V are
   /// known to be either zero or one and return them in the KnownZero/KnownOne
-  /// bit sets.  This code only analyzes bits in Mask, in order to short-circuit
-  /// processing.
+  /// bit sets.
   ///
   /// This function is defined on values with integer type, values with pointer
   /// type (but only if TD is non-null), and vectors of integers.  In the case
-  /// where V is a vector, the mask, known zero, and known one values are the
+  /// where V is a vector, the known zero and known one values are the
   /// same width as the vector element, and the bit is set only if it is true
   /// for all of the elements in the vector.
   void ComputeMaskedBits(Value *V,  APInt &KnownZero, APInt &KnownOne,

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=208757&r1=208756&r2=208757&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Wed May 14 03:00:07 2014
@@ -1079,10 +1079,9 @@ public:
   bool MaskedValueIsZero(SDValue Op, const APInt &Mask, unsigned Depth = 0)
     const;
 
-  /// ComputeMaskedBits - Determine which of the bits specified in Mask are
+  /// ComputeMaskedBits - Determine which bits of Op are
   /// known to be either zero or one and return them in the KnownZero/KnownOne
-  /// bitsets.  This code only analyzes bits in Mask, in order to short-circuit
-  /// processing.  Targets can implement the computeMaskedBitsForTargetNode
+  /// bitsets.  Targets can implement the computeMaskedBitsForTargetNode
   /// method in the TargetLowering class to allow target nodes to be understood.
   void ComputeMaskedBits(SDValue Op, APInt &KnownZero, APInt &KnownOne,
                          unsigned Depth = 0) const;

Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=208757&r1=208756&r2=208757&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Wed May 14 03:00:07 2014
@@ -211,7 +211,7 @@ void llvm::computeMaskedBitsLoad(const M
 
   KnownZero = APInt::getHighBitsSet(BitWidth, MinLeadingZeros);
 }
-/// ComputeMaskedBits - Determine which of the bits are known to be either zero
+/// ComputeMaskedBits - Determine which bits of V are known to be either zero
 /// or one and return them in the KnownZero/KnownOne bit sets.
 ///
 /// NOTE: we cannot consider 'undef' to be "IsZero" here.  The problem is that
@@ -241,7 +241,7 @@ void llvm::ComputeMaskedBits(Value *V, A
           V->getType()->getScalarSizeInBits() == BitWidth) &&
          KnownZero.getBitWidth() == BitWidth &&
          KnownOne.getBitWidth() == BitWidth &&
-         "V, Mask, KnownOne and KnownZero should have same BitWidth");
+         "V, KnownOne and KnownZero should have same BitWidth");
 
   if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
     // We know all of the bits for a constant!

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=208757&r1=208756&r2=208757&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed May 14 03:00:07 2014
@@ -1812,10 +1812,9 @@ bool SelectionDAG::MaskedValueIsZero(SDV
   return (KnownZero & Mask) == Mask;
 }
 
-/// ComputeMaskedBits - Determine which of the bits specified in Mask are
+/// ComputeMaskedBits - Determine which bits of Op are
 /// known to be either zero or one and return them in the KnownZero/KnownOne
-/// bitsets.  This code only analyzes bits in Mask, in order to short-circuit
-/// processing.
+/// bitsets.
 void SelectionDAG::ComputeMaskedBits(SDValue Op, APInt &KnownZero,
                                      APInt &KnownOne, unsigned Depth) const {
   const TargetLowering *TLI = TM.getTargetLowering();





More information about the llvm-commits mailing list