CIRCT
20.0.0git
|
#include <OpCountAnalysis.h>
Public Member Functions | |
OpCountAnalysis (Operation *moduleOp, mlir::AnalysisManager &am) | |
size_t | getOpCount (OperationName opName) |
Get the frequency of operations of a specific name. More... | |
SmallVector< OperationName > | getFoundOpNames () |
Get the names of all distinct operations found by the analysis. More... | |
DenseMap< size_t, size_t > | getOperandCountMap (OperationName opName) |
Get a map from number of operands to corresponding frequency for the given operation. More... | |
Private Attributes | |
DenseMap< OperationName, size_t > | opCounts |
DenseMap< OperationName, DenseMap< size_t, size_t > > | operandCounts |
Definition at line 28 of file OpCountAnalysis.h.
OpCountAnalysis::OpCountAnalysis | ( | Operation * | moduleOp, |
mlir::AnalysisManager & | am | ||
) |
Definition at line 21 of file OpCountAnalysis.cpp.
References opCounts, and operandCounts.
SmallVector< OperationName > OpCountAnalysis::getFoundOpNames | ( | ) |
Get the names of all distinct operations found by the analysis.
Definition at line 33 of file OpCountAnalysis.cpp.
References opCounts.
size_t OpCountAnalysis::getOpCount | ( | OperationName | opName | ) |
Get the frequency of operations of a specific name.
Definition at line 40 of file OpCountAnalysis.cpp.
References opCounts.
DenseMap< size_t, size_t > OpCountAnalysis::getOperandCountMap | ( | OperationName | opName | ) |
Get a map from number of operands to corresponding frequency for the given operation.
Definition at line 45 of file OpCountAnalysis.cpp.
References operandCounts.
|
private |
Definition at line 43 of file OpCountAnalysis.h.
Referenced by getFoundOpNames(), getOpCount(), and OpCountAnalysis().
|
private |
Definition at line 44 of file OpCountAnalysis.h.
Referenced by getOperandCountMap(), and OpCountAnalysis().