[SCCP] Remove unused toLatticeValue helper (NFC).
authorFlorian Hahn <flo@fhahn.com>
Sat, 28 Mar 2020 15:18:12 +0000 (15:18 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sat, 28 Mar 2020 15:40:24 +0000 (15:40 +0000)
LatticeVal is an alias for ValueLatticeElement and the function is not
used any longer.

llvm/lib/Transforms/Scalar/SCCP.cpp

index fcd7ed1..8bb437e 100644 (file)
@@ -441,24 +441,6 @@ private:
     return LV;
   }
 
-  LatticeVal toLatticeVal(const ValueLatticeElement &V, Type *T) {
-    LatticeVal Res;
-    if (V.isUnknownOrUndef())
-      return Res;
-
-    if (V.isConstant()) {
-      Res.markConstant(V.getConstant());
-      return Res;
-    }
-    if (V.isConstantRange() && V.getConstantRange().isSingleElement()) {
-      Res.markConstant(
-          ConstantInt::get(T, *V.getConstantRange().getSingleElement()));
-      return Res;
-    }
-    Res.markOverdefined();
-    return Res;
-  }
-
   /// getStructValueState - Return the LatticeVal object that corresponds to the
   /// value/field pair.  This function handles the case when the value hasn't
   /// been seen yet by properly seeding constants etc.