MLIR  22.0.0git
Classes | Public Member Functions | Protected Attributes | List of all members
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. More...
 
Location getLocation () const
 
llvm::remarks::Remark generateRemark () const
 Diagnostic -> Remark. More...
 
StringRef getFunction () const
 
llvm::StringRef getCategoryName () const
 
llvm::StringRef getFullCategoryName () 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. More...
 
StringRef functionName
 Name of the convering function like interface. More...
 
Location loc
 
StringRef categoryName
 Sub category passname e.g., "Unroll" or "UnrollAndJam". More...
 
StringRef subCategoryName
 Sub category name "Loop Optimizer". More...
 
SmallString< 64 > fullCategoryName
 Combined name for category and sub-category. More...
 
StringRef remarkName
 Remark identifier. More...
 
SmallVector< Arg, 4 > args
 Args collected via the streaming interface. More...
 

Detailed Description

Definition at line 88 of file Remarks.h.

Constructor & Destructor Documentation

◆ Remark()

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

Definition at line 91 of file Remarks.h.

References categoryName, fullCategoryName, and subCategoryName.

Member Function Documentation

◆ generateRemark()

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

◆ getArgs()

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

Definition at line 165 of file Remarks.h.

References args.

Referenced by generateRemark(), and print().

◆ getCategoryName()

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

◆ getFullCategoryName()

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

Definition at line 147 of file Remarks.h.

References categoryName, fullCategoryName, and subCategoryName.

Referenced by generateRemark(), and print().

◆ getFunction()

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

Definition at line 139 of file Remarks.h.

References functionName.

Referenced by generateRemark(), and print().

◆ getLocation()

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

Definition at line 135 of file Remarks.h.

References loc.

Referenced by generateRemark(), and print().

◆ getMsg()

std::string Remark::getMsg ( ) const

Definition at line 92 of file Remarks.cpp.

References print().

◆ getRemarkName()

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

Definition at line 157 of file Remarks.h.

References remarkName.

Referenced by generateRemark().

◆ 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)

Definition at line 34 of file Remarks.cpp.

References args.

Referenced by mlir::remark::detail::operator<<().

◆ 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(), getFullCategoryName(), 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 192 of file Remarks.h.

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

◆ categoryName

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

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

Definition at line 180 of file Remarks.h.

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

◆ fullCategoryName

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

Combined name for category and sub-category.

Definition at line 186 of file Remarks.h.

Referenced by getFullCategoryName(), and Remark().

◆ functionName

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

Name of the convering function like interface.

Definition at line 176 of file Remarks.h.

Referenced by getFunction(), and print().

◆ loc

Location mlir::remark::detail::Remark::loc
protected

◆ 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 174 of file Remarks.h.

Referenced by getRemarkType(), and getRemarkTypeString().

◆ remarkName

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

Remark identifier.

Definition at line 189 of file Remarks.h.

Referenced by getRemarkName(), and print().

◆ subCategoryName

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

Sub category name "Loop Optimizer".

Definition at line 183 of file Remarks.h.

Referenced by getFullCategoryName(), and Remark().


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