CIRCT  20.0.0git
Public Member Functions | Private Attributes | List of all members
circt::analysis::OpCountAnalysis Class Reference

#include <OpCountAnalysis.h>

Collaboration diagram for circt::analysis::OpCountAnalysis:
Collaboration graph
[legend]

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
 

Detailed Description

Definition at line 28 of file OpCountAnalysis.h.

Constructor & Destructor Documentation

◆ OpCountAnalysis()

OpCountAnalysis::OpCountAnalysis ( Operation *  moduleOp,
mlir::AnalysisManager &  am 
)

Definition at line 21 of file OpCountAnalysis.cpp.

References opCounts, and operandCounts.

Member Function Documentation

◆ getFoundOpNames()

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.

◆ getOpCount()

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.

◆ getOperandCountMap()

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.

Member Data Documentation

◆ opCounts

DenseMap<OperationName, size_t> circt::analysis::OpCountAnalysis::opCounts
private

Definition at line 43 of file OpCountAnalysis.h.

Referenced by getFoundOpNames(), getOpCount(), and OpCountAnalysis().

◆ operandCounts

DenseMap<OperationName, DenseMap<size_t, size_t> > circt::analysis::OpCountAnalysis::operandCounts
private

Definition at line 44 of file OpCountAnalysis.h.

Referenced by getOperandCountMap(), and OpCountAnalysis().


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