diff --git a/llvm/include/llvm/Analysis/HashRecognize.h b/llvm/include/llvm/Analysis/HashRecognize.h index 8ab68a5dc2cb1..c169383bf7b08 100644 --- a/llvm/include/llvm/Analysis/HashRecognize.h +++ b/llvm/include/llvm/Analysis/HashRecognize.h @@ -53,7 +53,7 @@ struct PolynomialInfo { // division in the case of CRC. Since polynomial division is an XOR in // GF(2^m), this variable must be XOR'ed with RHS in a loop to yield the // ComputedValue. - const Value *LHS; + Value *LHS; // The generating polynomial, or the RHS of the polynomial division in the // case of CRC. @@ -61,7 +61,7 @@ struct PolynomialInfo { // The final computed value. This is a remainder of a polynomial division in // the case of CRC, which must be zero. - const Value *ComputedValue; + Value *ComputedValue; // Set to true in the case of big-endian. bool ByteOrderSwapped; @@ -69,11 +69,11 @@ struct PolynomialInfo { // An optional auxiliary checksum that augments the LHS. In the case of CRC, // it is XOR'ed with the LHS, so that the computation's final remainder is // zero. - const Value *LHSAux; + Value *LHSAux; - PolynomialInfo(unsigned TripCount, const Value *LHS, const APInt &RHS, - const Value *ComputedValue, bool ByteOrderSwapped, - const Value *LHSAux = nullptr); + PolynomialInfo(unsigned TripCount, Value *LHS, const APInt &RHS, + Value *ComputedValue, bool ByteOrderSwapped, + Value *LHSAux = nullptr); }; /// The analysis. diff --git a/llvm/lib/Analysis/HashRecognize.cpp b/llvm/lib/Analysis/HashRecognize.cpp index 1edb8b3bdc9a8..f7ac02be2e039 100644 --- a/llvm/lib/Analysis/HashRecognize.cpp +++ b/llvm/lib/Analysis/HashRecognize.cpp @@ -442,9 +442,9 @@ getRecurrences(BasicBlock *LoopLatch, const PHINode *IndVar, const Loop &L) { return std::make_pair(SimpleRecurrence, ConditionalRecurrence); } -PolynomialInfo::PolynomialInfo(unsigned TripCount, const Value *LHS, - const APInt &RHS, const Value *ComputedValue, - bool ByteOrderSwapped, const Value *LHSAux) +PolynomialInfo::PolynomialInfo(unsigned TripCount, Value *LHS, const APInt &RHS, + Value *ComputedValue, bool ByteOrderSwapped, + Value *LHSAux) : TripCount(TripCount), LHS(LHS), RHS(RHS), ComputedValue(ComputedValue), ByteOrderSwapped(ByteOrderSwapped), LHSAux(LHSAux) {} @@ -623,7 +623,7 @@ HashRecognize::recognizeCRC() const { if (!checkExtractBits(ResultBits, TC, IsZero, *ByteOrderSwapped)) return ErrBits(ResultBits, TC, *ByteOrderSwapped); - const Value *LHSAux = SimpleRecurrence ? SimpleRecurrence.Start : nullptr; + Value *LHSAux = SimpleRecurrence ? SimpleRecurrence.Start : nullptr; return PolynomialInfo(TC, ConditionalRecurrence.Start, GenPoly, ComputedValue, *ByteOrderSwapped, LHSAux); }