Add a new utility function SimplifyICmpOperands. Much of this code is
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolution.h
index 837ed40f50554553c82bb12b1a6aa3b399807da5..56dc8f8eeaec4d7c35d930e0776e030e961abd55 100644 (file)
@@ -650,6 +650,13 @@ namespace llvm {
     bool isKnownPredicate(ICmpInst::Predicate Pred,
                           const SCEV *LHS, const SCEV *RHS);
 
+    /// SimplifyICmpOperands - Simplify LHS and RHS in a comparison with
+    /// predicate Pred. Return true iff any changes were made.
+    ///
+    bool SimplifyICmpOperands(ICmpInst::Predicate &Pred,
+                              const SCEV *&LHS,
+                              const SCEV *&RHS);
+
     virtual bool runOnFunction(Function &F);
     virtual void releaseMemory();
     virtual void getAnalysisUsage(AnalysisUsage &AU) const;