Added isValidRewrite() to check the result of ScalarEvolutionExpander.
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolution.h
index 651f989fe61219d86e18ee7e425f2d8f16bed57e..6df543393f247c3fbeb7a208c796c1345cf8a945 100644 (file)
@@ -618,6 +618,12 @@ namespace llvm {
     const SCEV *getUMinFromMismatchedTypes(const SCEV *LHS,
                                            const SCEV *RHS);
 
+    /// getPointerBase - Transitively follow the chain of pointer-type operands
+    /// until reaching a SCEV that does not have a single pointer operand. This
+    /// returns a SCEVUnknown pointer for well-formed pointer-type expressions,
+    /// but corner cases do exist.
+    const SCEV *getPointerBase(const SCEV *V);
+
     /// getSCEVAtScope - Return a SCEV expression for the specified value
     /// at the specified scope in the program.  The L value specifies a loop
     /// nest to evaluate the expression at, where null is the top-level or a