@@ -442,13 +442,11 @@ getRecurrences(BasicBlock *LoopLatch, const PHINode *IndVar, const Loop &L) {
442442 return std::make_pair (SimpleRecurrence, ConditionalRecurrence);
443443}
444444
445- PolynomialInfo::PolynomialInfo (
446- unsigned TripCount, Value *LHS, const APInt &RHS, Value *ComputedValue,
447- bool ByteOrderSwapped,
448- function_ref<CRCTable(const APInt &, bool )> GenSarwateTable, Value *LHSAux)
445+ PolynomialInfo::PolynomialInfo (unsigned TripCount, Value *LHS, const APInt &RHS,
446+ Value *ComputedValue, bool ByteOrderSwapped,
447+ Value *LHSAux)
449448 : TripCount(TripCount), LHS(LHS), RHS(RHS), ComputedValue(ComputedValue),
450- ByteOrderSwapped(ByteOrderSwapped), GenSarwateTable(GenSarwateTable),
451- LHSAux(LHSAux) {}
449+ ByteOrderSwapped(ByteOrderSwapped), LHSAux(LHSAux) {}
452450
453451// / In the big-endian case, checks the bottom N bits against CheckFn, and that
454452// / the rest are unknown. In the little-endian case, checks the top N bits
@@ -473,7 +471,8 @@ static bool checkExtractBits(const KnownBits &Known, unsigned N,
473471// / Generate a lookup table of 256 entries by interleaving the generating
474472// / polynomial. The optimization technique of table-lookup for CRC is also
475473// / called the Sarwate algorithm.
476- static CRCTable genSarwateTable (const APInt &GenPoly, bool ByteOrderSwapped) {
474+ CRCTable HashRecognize::genSarwateTable (const APInt &GenPoly,
475+ bool ByteOrderSwapped) {
477476 unsigned BW = GenPoly.getBitWidth ();
478477 CRCTable Table;
479478 Table[0 ] = APInt::getZero (BW);
@@ -626,7 +625,7 @@ HashRecognize::recognizeCRC() const {
626625
627626 Value *LHSAux = SimpleRecurrence ? SimpleRecurrence.Start : nullptr ;
628627 return PolynomialInfo (TC, ConditionalRecurrence.Start , GenPoly, ComputedValue,
629- *ByteOrderSwapped, genSarwateTable, LHSAux);
628+ *ByteOrderSwapped, LHSAux);
630629}
631630
632631void CRCTable::print (raw_ostream &OS) const {
@@ -680,7 +679,7 @@ void HashRecognize::print(raw_ostream &OS) const {
680679 OS << " \n " ;
681680 }
682681 OS.indent (2 ) << " Computed CRC lookup table:\n " ;
683- Info. GenSarwateTable (Info.RHS , Info.ByteOrderSwapped ).print (OS);
682+ genSarwateTable (Info.RHS , Info.ByteOrderSwapped ).print (OS);
684683}
685684
686685#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
0 commit comments