| 
    LLVM 22.0.0git
    
   | 
 
The analysis. More...
#include "llvm/Analysis/HashRecognize.h"
Public Member Functions | |
| HashRecognize (const Loop &L, ScalarEvolution &SE) | |
| std::variant< PolynomialInfo, StringRef > | recognizeCRC () const | 
| The main entry point for analyzing a loop and recognizing the CRC algorithm.   | |
| std::optional< PolynomialInfo > | getResult () const | 
| void | print (raw_ostream &OS) const | 
| LLVM_DUMP_METHOD void | dump () const | 
Static Public Member Functions | |
| static CRCTable | genSarwateTable (const APInt &GenPoly, bool ByteOrderSwapped) | 
| Generate a lookup table of 256 entries by interleaving the generating polynomial.   | |
The analysis.
Definition at line 74 of file HashRecognize.h.
| HashRecognize::HashRecognize | ( | const Loop & | L, | 
| ScalarEvolution & | SE ) | 
Definition at line 582 of file HashRecognize.cpp.
Referenced by getResult().
| void HashRecognize::dump | ( | ) | const | 
Definition at line 572 of file HashRecognize.cpp.
References llvm::dbgs(), and print().
Generate a lookup table of 256 entries by interleaving the generating polynomial.
The optimization technique of table-lookup for CRC is also called the Sarwate algorithm.
Definition at line 353 of file HashRecognize.cpp.
References llvm::APInt::getBitWidth(), llvm::APInt::getSignedMinValue(), llvm::APInt::getZero(), I, llvm::APInt::isSignBitSet(), llvm::APInt::lshr(), and llvm::APInt::shl().
Referenced by print().
| std::optional< PolynomialInfo > HashRecognize::getResult | ( | ) | const | 
Definition at line 575 of file HashRecognize.cpp.
References HashRecognize().
| void HashRecognize::print | ( | raw_ostream & | OS | ) | const | 
Definition at line 535 of file HashRecognize.cpp.
References genSarwateTable(), llvm::raw_ostream::indent(), llvm::CRCTable::print(), and recognizeCRC().
Referenced by dump(), and llvm::HashRecognizePrinterPass::run().
| std::variant< PolynomialInfo, StringRef > HashRecognize::recognizeCRC | ( | ) | const | 
The main entry point for analyzing a loop and recognizing the CRC algorithm.
Returns a PolynomialInfo on success, and a StringRef on failure.
Definition at line 440 of file HashRecognize.cpp.
References assert(), llvm::cast(), containsUnreachable(), llvm::PHINode::getIncomingValueForBlock(), llvm::Type::getIntegerBitWidth(), getRecurrences(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), isBigEndianBitShift(), isConditionalOnXorOfPHIs(), isSignificantBitCheckWellFormed(), llvm::none_of(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by print().