LLVM: include/llvm/Analysis/HashRecognize.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_ANALYSIS_HASHRECOGNIZE_H
16#define LLVM_ANALYSIS_HASHRECOGNIZE_H
17
23#include
24
25namespace llvm {
26
28
29
30struct CRCTable : public std::array<APInt, 256> {
32
33#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
35#endif
36};
37
38
39
41
43
44
45
46
47
48
49
51
52
53
55
56
57
59
60
62
63
64
65
67
71};
72
73
75 const Loop &L;
77
78public:
80
81
82 std::variant<PolynomialInfo, StringRef> recognizeCRC() const;
83 std::optional getResult() const;
84
85
86
88
90
91#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
93#endif
94};
95
97 : public PassInfoMixin {
99
100public:
104};
105}
106
107#endif
This file implements a class to represent arbitrary precision integral constant values and operations...
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This header defines various interfaces for pass management in LLVM.
This header provides classes for managing per-loop analyses.
Class for arbitrary precision integers.
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &)
HashRecognizePrinterPass(raw_ostream &OS)
Definition HashRecognize.h:101
static CRCTable genSarwateTable(const APInt &GenPoly, bool ByteOrderSwapped)
Generate a lookup table of 256 entries by interleaving the generating polynomial.
std::optional< PolynomialInfo > getResult() const
LLVM_DUMP_METHOD void dump() const
HashRecognize(const Loop &L, ScalarEvolution &SE)
void print(raw_ostream &OS) const
std::variant< PolynomialInfo, StringRef > recognizeCRC() const
The main entry point for analyzing a loop and recognizing the CRC algorithm.
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
Represents a single loop in the control flow graph.
A set of analyses that are preserved following a run of a transformation pass.
The main scalar evolution driver.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< Loop, LoopStandardAnalysisResults & > LoopAnalysisManager
The loop analysis manager.
A custom std::array with 256 entries, that also has a print function.
Definition HashRecognize.h:30
LLVM_DUMP_METHOD void dump() const
void print(raw_ostream &OS) const
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
A CRTP mix-in to automatically provide informational APIs needed for passes.
PolynomialInfo(unsigned TripCount, Value *LHS, const APInt &RHS, Value *ComputedValue, bool ByteOrderSwapped, Value *LHSAux=nullptr)
Value * LHS
Definition HashRecognize.h:50
unsigned TripCount
Definition HashRecognize.h:42
APInt RHS
Definition HashRecognize.h:54
bool ByteOrderSwapped
Definition HashRecognize.h:61
Value * ComputedValue
Definition HashRecognize.h:58
Value * LHSAux
Definition HashRecognize.h:66