MLIR  22.0.0git
Public Member Functions | List of all members
mlir::remark::detail::RemarkEngine Class Reference

#include "mlir/IR/Remarks.h"

Public Member Functions

 RemarkEngine ()=delete
 Default constructor is deleted, use the other constructor. More...
 
 RemarkEngine (bool printAsEmitRemarks, const RemarkCategories &cats)
 Constructs Remark engine with optional category names. More...
 
 ~RemarkEngine ()
 Destructor that will close the output file and reset the main remark streamer. More...
 
LogicalResult initialize (std::unique_ptr< MLIRRemarkStreamerBase > streamer, std::string *errMsg)
 Setup the remark engine with the given output path and format. More...
 
void report (const Remark &&remark)
 Report a remark. More...
 
InFlightRemark emitOptimizationRemark (Location loc, RemarkOpts opts)
 Report a successful remark, this will create an InFlightRemark that can be used to build the remark using the << operator. More...
 
InFlightRemark emitOptimizationRemarkMiss (Location loc, RemarkOpts opts)
 Report a missed optimization remark that can be used to build the remark using the << operator. More...
 
InFlightRemark emitOptimizationRemarkFailure (Location loc, RemarkOpts opts)
 Report a failed optimization remark, this will create an InFlightRemark that can be used to build the remark using the << operator. More...
 
InFlightRemark emitOptimizationRemarkAnalysis (Location loc, RemarkOpts opts)
 Report an analysis remark, this will create an InFlightRemark that can be used to build the remark using the << operator. More...
 

Detailed Description

Definition at line 345 of file Remarks.h.

Constructor & Destructor Documentation

◆ RemarkEngine() [1/2]

mlir::remark::detail::RemarkEngine::RemarkEngine ( )
delete

Default constructor is deleted, use the other constructor.

◆ RemarkEngine() [2/2]

RemarkEngine::RemarkEngine ( bool  printAsEmitRemarks,
const RemarkCategories cats 
)

Constructs Remark engine with optional category names.

If a category name is not provided, it is not enabled. The category names are used to filter the remarks that are emitted.

Definition at line 251 of file Remarks.cpp.

References mlir::remark::RemarkCategories::analysis, mlir::remark::RemarkCategories::failed, mlir::remark::RemarkCategories::missed, and mlir::remark::RemarkCategories::passed.

◆ ~RemarkEngine()

RemarkEngine::~RemarkEngine ( )

Destructor that will close the output file and reset the main remark streamer.

Definition at line 238 of file Remarks.cpp.

Member Function Documentation

◆ emitOptimizationRemark()

InFlightRemark RemarkEngine::emitOptimizationRemark ( Location  loc,
RemarkOpts  opts 
)

Report a successful remark, this will create an InFlightRemark that can be used to build the remark using the << operator.

Definition at line 200 of file Remarks.cpp.

References mlir::remark::detail::Remark::loc.

Referenced by mlir::remark::passed().

◆ emitOptimizationRemarkAnalysis()

InFlightRemark RemarkEngine::emitOptimizationRemarkAnalysis ( Location  loc,
RemarkOpts  opts 
)

Report an analysis remark, this will create an InFlightRemark that can be used to build the remark using the << operator.

Definition at line 218 of file Remarks.cpp.

References mlir::remark::detail::Remark::loc.

Referenced by mlir::remark::analysis().

◆ emitOptimizationRemarkFailure()

InFlightRemark RemarkEngine::emitOptimizationRemarkFailure ( Location  loc,
RemarkOpts  opts 
)

Report a failed optimization remark, this will create an InFlightRemark that can be used to build the remark using the << operator.

Definition at line 212 of file Remarks.cpp.

References mlir::remark::detail::Remark::loc.

Referenced by mlir::remark::failed().

◆ emitOptimizationRemarkMiss()

InFlightRemark RemarkEngine::emitOptimizationRemarkMiss ( Location  loc,
RemarkOpts  opts 
)

Report a missed optimization remark that can be used to build the remark using the << operator.

Definition at line 206 of file Remarks.cpp.

References mlir::remark::detail::Remark::loc.

Referenced by mlir::remark::missed().

◆ initialize()

llvm::LogicalResult RemarkEngine::initialize ( std::unique_ptr< MLIRRemarkStreamerBase streamer,
std::string *  errMsg 
)

Setup the remark engine with the given output path and format.

Definition at line 244 of file Remarks.cpp.

◆ report()

void RemarkEngine::report ( const Remark &&  remark)

Report a remark.

Definition at line 228 of file Remarks.cpp.

References mlir::emitRemark().


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