[llvm] 1704127 - [ValueTracking] Remove unused computeKnownBits() overload (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 03:51:21 PST 2023


Author: Nikita Popov
Date: 2023-11-28T12:51:11+01:00
New Revision: 17041276d4c0a988da48361eb25b3271bcca8602

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

LOG: [ValueTracking] Remove unused computeKnownBits() overload (NFC)

If you need this, use one of the variants returning KnownBits
instead.

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/ValueTracking.h
    llvm/lib/Analysis/ValueTracking.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h
index 01eb8532d1f56d2..8c6bea76a87d10b 100644
--- a/llvm/include/llvm/Analysis/ValueTracking.h
+++ b/llvm/include/llvm/Analysis/ValueTracking.h
@@ -60,21 +60,6 @@ void computeKnownBits(const Value *V, KnownBits &Known, const DataLayout &DL,
                       const DominatorTree *DT = nullptr,
                       bool UseInstrInfo = true);
 
-/// Determine which bits of V are known to be either zero or one and return
-/// them in the KnownZero/KnownOne bit sets.
-///
-/// This function is defined on values with integer type, values with pointer
-/// type, and vectors of integers.  In the case
-/// 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 demanded elements in the vector.
-void computeKnownBits(const Value *V, const APInt &DemandedElts,
-                      KnownBits &Known, const DataLayout &DL,
-                      unsigned Depth = 0, AssumptionCache *AC = nullptr,
-                      const Instruction *CxtI = nullptr,
-                      const DominatorTree *DT = nullptr,
-                      bool UseInstrInfo = true);
-
 /// Returns the known bits rather than passing by reference.
 KnownBits computeKnownBits(const Value *V, const DataLayout &DL,
                            unsigned Depth = 0, AssumptionCache *AC = nullptr,

diff  --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 19af949e5216e15..3e9323185f47e50 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -169,16 +169,6 @@ void llvm::computeKnownBits(const Value *V, KnownBits &Known,
       SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
 }
 
-void llvm::computeKnownBits(const Value *V, const APInt &DemandedElts,
-                            KnownBits &Known, const DataLayout &DL,
-                            unsigned Depth, AssumptionCache *AC,
-                            const Instruction *CxtI, const DominatorTree *DT,
-                            bool UseInstrInfo) {
-  ::computeKnownBits(
-      V, DemandedElts, Known, Depth,
-      SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
-}
-
 KnownBits llvm::computeKnownBits(const Value *V, const DataLayout &DL,
                                  unsigned Depth, AssumptionCache *AC,
                                  const Instruction *CxtI,


        


More information about the llvm-commits mailing list