Resolve a terrible hack in tblgen: instead of hardcoding
[oota-llvm.git] / include / llvm / Analysis / ValueTracking.h
index 05968914b94d39049fe65cfc4b5bf01b626b3f3b..7b6026fea0a60d0a8c643195514c30e957654e2e 100644 (file)
@@ -24,7 +24,6 @@ namespace llvm {
   class Instruction;
   class APInt;
   class TargetData;
-  class LLVMContext;
   
   /// ComputeMaskedBits - Determine which of the bits specified in Mask are
   /// known to be either zero or one and return them in the KnownZero/KnownOne
@@ -78,21 +77,8 @@ namespace llvm {
   ///
   bool CannotBeNegativeZero(const Value *V, unsigned Depth = 0);
 
-  /// DecomposeGEPExpression - If V is a symbolic pointer expression, decompose
-  /// it into a base pointer with a constant offset and a number of scaled
-  /// symbolic offsets.
-  ///
-  /// When TargetData is around, this function is capable of analyzing
-  /// everything that Value::getUnderlyingObject() can look through.  When not,
-  /// it just looks through pointer casts.
-  ///
-  const Value *DecomposeGEPExpression(const Value *V, int64_t &BaseOffs,
-                 SmallVectorImpl<std::pair<const Value*, int64_t> > &VarIndices,
-                                      const TargetData *TD);
-    
-  
   
-  /// FindScalarValue - Given an aggregrate and an sequence of indices, see if
+  /// FindInsertedValue - Given an aggregrate and an sequence of indices, see if
   /// the scalar value indexed is already around as a register, for example if
   /// it were inserted directly into the aggregrate.
   ///
@@ -117,8 +103,13 @@ namespace llvm {
   /// StopAtNul is set to true (the default), the returned string is truncated
   /// by a nul character in the global.  If StopAtNul is false, the nul
   /// character is included in the result string.
-  bool GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset = 0,
+  bool GetConstantStringInfo(const Value *V, std::string &Str,
+                             uint64_t Offset = 0,
                              bool StopAtNul = true);
+                        
+  /// GetStringLength - If we can compute the length of the string pointed to by
+  /// the specified pointer, return 'len+1'.  If we can't, return 0.
+  uint64_t GetStringLength(Value *V);
 } // end namespace llvm
 
 #endif