LLVM 22.0.0git
llvm::HashRecognize Class Reference

The analysis. More...

#include "llvm/Analysis/HashRecognize.h"

Public Member Functions

 HashRecognize (const Loop &L, ScalarEvolution &SE)
std::variant< PolynomialInfo, StringRefrecognizeCRC () const
 The main entry point for analyzing a loop and recognizing the CRC algorithm.
std::optional< PolynomialInfogetResult () 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.

Detailed Description

The analysis.

Definition at line 74 of file HashRecognize.h.

Constructor & Destructor Documentation

◆ HashRecognize()

HashRecognize::HashRecognize ( const Loop & L,
ScalarEvolution & SE )

Definition at line 579 of file HashRecognize.cpp.

Referenced by getResult().

Member Function Documentation

◆ dump()

void HashRecognize::dump ( ) const

Definition at line 569 of file HashRecognize.cpp.

References llvm::dbgs(), and print().

◆ genSarwateTable()

CRCTable HashRecognize::genSarwateTable ( const APInt & GenPoly,
bool ByteOrderSwapped )
static

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().

◆ getResult()

std::optional< PolynomialInfo > HashRecognize::getResult ( ) const

Definition at line 572 of file HashRecognize.cpp.

References HashRecognize().

◆ print()

void HashRecognize::print ( raw_ostream & OS) const

◆ recognizeCRC()


The documentation for this class was generated from the following files: