[APInt] Remove the mul/urem/srem/udiv/sdiv functions from the APIntOps namespace...
authorCraig Topper <craig.topper@gmail.com>
Sat, 1 Apr 2017 05:08:57 +0000 (05:08 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 1 Apr 2017 05:08:57 +0000 (05:08 +0000)
llvm-svn: 299292

llvm/include/llvm/ADT/APInt.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Support/APInt.cpp

index 8adbfdf..f2d4390 100644 (file)
@@ -1984,31 +1984,6 @@ inline APInt RoundFloatToAPInt(float Float, unsigned width) {
   return RoundDoubleToAPInt(double(Float), width);
 }
 
-/// \brief Signed division function for APInt.
-///
-/// Signed divide APInt LHS by APInt RHS.
-inline APInt sdiv(const APInt &LHS, const APInt &RHS) { return LHS.sdiv(RHS); }
-
-/// \brief Unsigned division function for APInt.
-///
-/// Unsigned divide APInt LHS by APInt RHS.
-inline APInt udiv(const APInt &LHS, const APInt &RHS) { return LHS.udiv(RHS); }
-
-/// \brief Function for signed remainder operation.
-///
-/// Signed remainder operation on APInt.
-inline APInt srem(const APInt &LHS, const APInt &RHS) { return LHS.srem(RHS); }
-
-/// \brief Function for unsigned remainder operation.
-///
-/// Unsigned remainder operation on APInt.
-inline APInt urem(const APInt &LHS, const APInt &RHS) { return LHS.urem(RHS); }
-
-/// \brief Function for multiplication operation.
-///
-/// Performs multiplication on APInt values.
-inline APInt mul(const APInt &LHS, const APInt &RHS) { return LHS * RHS; }
-
 } // End of APIntOps namespace
 
 // See friend declaration above. This additional declaration is required in
index 659a1e5..986209a 100644 (file)
@@ -7221,7 +7221,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) {
     // Convert from chrec coefficients to polynomial coefficients AX^2+BX+C
     // The B coefficient is M-N/2
     APInt B(M);
-    B -= sdiv(N,Two);
+    B -= N.sdiv(Two);
 
     // The A coefficient is N/2
     APInt A(N.sdiv(Two));
index 8ac881e..d613950 100644 (file)
@@ -881,7 +881,7 @@ APInt llvm::APIntOps::GreatestCommonDivisor(const APInt& API1,
   APInt A = API1, B = API2;
   while (!!B) {
     APInt T = B;
-    B = APIntOps::urem(A, B);
+    B = A.urem(B);
     A = T;
   }
   return A;