MLIR 22.0.0git
mlir::remark::detail::Remark Class Reference

#include "mlir/IR/Remarks.h"

Inheritance diagram for mlir::remark::detail::Remark:

Classes

struct  Arg

Public Member Functions

 Remark (RemarkKind remarkKind, DiagnosticSeverity severity, Location loc, RemarkOpts opts)
void insert (llvm::StringRef s)
void insert (Arg a)
void print (llvm::raw_ostream &os, bool printLocation=false) const
 Print the remark to the given output stream.
Location getLocation () const
llvm::remarks::Remark generateRemark () const
 Diagnostic -> Remark.
StringRef getFunction () const
llvm::StringRef getCategoryName () const
llvm::StringRef getCombinedCategoryName () const
StringRef getRemarkName () const
std::string getMsg () const
ArrayRef< ArggetArgs () const
llvm::remarks::Type getRemarkType () const
StringRef getRemarkTypeString () const

Protected Attributes

RemarkKind remarkKind
 Keeps the MLIR diagnostic kind, which is used to determine the diagnostic kind in the LLVM remark streamer.
StringRef functionName
 Name of the convering function like interface.
Location loc
StringRef categoryName
 Sub category passname e.g., "Unroll" or "UnrollAndJam".
StringRef subCategoryName
 Sub category name "Loop Optimizer".
SmallString< 64 > fullCategoryName
 Combined name for category and sub-category.
StringRef remarkName
 Remark identifier.
SmallVector< Arg, 4 > args
 Args collected via the streaming interface.

Detailed Description

Definition at line 87 of file Remarks.h.

Constructor & Destructor Documentation

◆ Remark()

mlir::remark::detail::Remark::Remark ( RemarkKind remarkKind,
DiagnosticSeverity severity,
Location loc,
RemarkOpts opts )
inline

Member Function Documentation

◆ generateRemark()

llvm::remarks::Remark Remark::generateRemark ( ) const

◆ getArgs()

ArrayRef< Arg > mlir::remark::detail::Remark::getArgs ( ) const
inline

Definition at line 164 of file Remarks.h.

References args.

Referenced by generateRemark(), and print().

◆ getCategoryName()

llvm::StringRef mlir::remark::detail::Remark::getCategoryName ( ) const
inline

Definition at line 144 of file Remarks.h.

References categoryName.

◆ getCombinedCategoryName()

llvm::StringRef mlir::remark::detail::Remark::getCombinedCategoryName ( ) const
inline

◆ getFunction()

StringRef mlir::remark::detail::Remark::getFunction ( ) const
inline

Definition at line 138 of file Remarks.h.

References functionName.

Referenced by generateRemark(), and print().

◆ getLocation()

Location mlir::remark::detail::Remark::getLocation ( ) const
inline

◆ getMsg()

std::string Remark::getMsg ( ) const

Definition at line 93 of file Remarks.cpp.

References print().

◆ getRemarkName()

StringRef mlir::remark::detail::Remark::getRemarkName ( ) const
inline

◆ getRemarkType()

llvm::remarks::Type Remark::getRemarkType ( ) const

◆ getRemarkTypeString()

llvm::StringRef Remark::getRemarkTypeString ( ) const

◆ insert() [1/2]

void Remark::insert ( Arg a)

Definition at line 35 of file Remarks.cpp.

References args.

◆ insert() [2/2]

void Remark::insert ( llvm::StringRef s)

◆ print()

void Remark::print ( llvm::raw_ostream & os,
bool printLocation = false ) const

Print the remark to the given output stream.

Example output: [Missed] Category: Loop | Pass:Unroller | Function=main | Reason="tripCount=4 < threshold=256" [Failure] LoopOptimizer | Reason="failed due to unsupported pattern"

Definition at line 70 of file Remarks.cpp.

References categoryName, functionName, getArgs(), getCombinedCategoryName(), getFunction(), getLocation(), getRemarkTypeString(), printArgs(), and remarkName.

Referenced by getMsg().

Member Data Documentation

◆ args

SmallVector<Arg, 4> mlir::remark::detail::Remark::args
protected

Args collected via the streaming interface.

Definition at line 191 of file Remarks.h.

Referenced by getArgs(), insert(), insert(), and printArgs().

◆ categoryName

StringRef mlir::remark::detail::Remark::categoryName
protected

Sub category passname e.g., "Unroll" or "UnrollAndJam".

Definition at line 179 of file Remarks.h.

Referenced by getCategoryName(), getCombinedCategoryName(), print(), and Remark().

◆ fullCategoryName

SmallString<64> mlir::remark::detail::Remark::fullCategoryName
protected

Combined name for category and sub-category.

Definition at line 185 of file Remarks.h.

Referenced by getCombinedCategoryName().

◆ functionName

StringRef mlir::remark::detail::Remark::functionName
protected

Name of the convering function like interface.

Definition at line 175 of file Remarks.h.

Referenced by getFunction(), print(), and Remark().

◆ loc

◆ remarkKind

RemarkKind mlir::remark::detail::Remark::remarkKind
protected

Keeps the MLIR diagnostic kind, which is used to determine the diagnostic kind in the LLVM remark streamer.

Definition at line 173 of file Remarks.h.

Referenced by getRemarkType(), getRemarkTypeString(), and Remark().

◆ remarkName

StringRef mlir::remark::detail::Remark::remarkName
protected

Remark identifier.

Definition at line 188 of file Remarks.h.

Referenced by getRemarkName(), print(), and Remark().

◆ subCategoryName

StringRef mlir::remark::detail::Remark::subCategoryName
protected

Sub category name "Loop Optimizer".

Definition at line 182 of file Remarks.h.

Referenced by getCombinedCategoryName(), and Remark().


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