MLIR
22.0.0git
|
#include "mlir/IR/Remarks.h"
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< Arg > | getArgs () 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... | |
|
inline |
Definition at line 91 of file Remarks.h.
References categoryName, fullCategoryName, and subCategoryName.
llvm::remarks::Remark Remark::generateRemark | ( | ) | const |
Diagnostic -> Remark.
Definition at line 132 of file Remarks.cpp.
References getArgs(), getFullCategoryName(), getFunction(), getLocation(), getRemarkName(), and getRemarkType().
Referenced by mlir::remark::detail::LLVMRemarkStreamer::streamOptimizationRemark().
Definition at line 165 of file Remarks.h.
References args.
Referenced by generateRemark(), and print().
|
inline |
Definition at line 145 of file Remarks.h.
References categoryName.
Referenced by mlir::remark::detail::LLVMRemarkStreamer::streamOptimizationRemark().
|
inline |
Definition at line 147 of file Remarks.h.
References categoryName, fullCategoryName, and subCategoryName.
Referenced by generateRemark(), and print().
|
inline |
Definition at line 139 of file Remarks.h.
References functionName.
Referenced by generateRemark(), and print().
|
inline |
Definition at line 135 of file Remarks.h.
References loc.
Referenced by generateRemark(), and print().
std::string Remark::getMsg | ( | ) | const |
Definition at line 92 of file Remarks.cpp.
References print().
|
inline |
llvm::remarks::Type Remark::getRemarkType | ( | ) | const |
Definition at line 116 of file Remarks.cpp.
References Failure, mlir::remark::RemarkAnalysis, mlir::remark::RemarkFailure, remarkKind, mlir::remark::RemarkMissed, mlir::remark::RemarkPassed, and mlir::remark::RemarkUnknown.
Referenced by generateRemark().
llvm::StringRef Remark::getRemarkTypeString | ( | ) | const |
Definition at line 100 of file Remarks.cpp.
References mlir::remark::RemarkAnalysis, mlir::remark::RemarkFailure, remarkKind, mlir::remark::RemarkMissed, mlir::remark::RemarkPassed, and mlir::remark::RemarkUnknown.
Referenced by print().
void Remark::insert | ( | Arg | a | ) |
Definition at line 35 of file Remarks.cpp.
References args.
void Remark::insert | ( | llvm::StringRef | s | ) |
Definition at line 34 of file Remarks.cpp.
References args.
Referenced by mlir::remark::detail::operator<<().
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().
|
protected |
Args collected via the streaming interface.
Definition at line 192 of file Remarks.h.
Referenced by getArgs(), insert(), and printArgs().
|
protected |
Sub category passname e.g., "Unroll" or "UnrollAndJam".
Definition at line 180 of file Remarks.h.
Referenced by getCategoryName(), getFullCategoryName(), print(), and Remark().
|
protected |
Combined name for category and sub-category.
Definition at line 186 of file Remarks.h.
Referenced by getFullCategoryName(), and Remark().
|
protected |
Name of the convering function like interface.
Definition at line 176 of file Remarks.h.
Referenced by getFunction(), and print().
|
protected |
Definition at line 178 of file Remarks.h.
Referenced by mlir::remark::detail::RemarkEngine::emitOptimizationRemark(), mlir::remark::detail::RemarkEngine::emitOptimizationRemarkAnalysis(), mlir::remark::detail::RemarkEngine::emitOptimizationRemarkFailure(), mlir::remark::detail::RemarkEngine::emitOptimizationRemarkMiss(), and getLocation().
|
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().
|
protected |
Remark identifier.
Definition at line 189 of file Remarks.h.
Referenced by getRemarkName(), and print().
|
protected |
Sub category name "Loop Optimizer".
Definition at line 183 of file Remarks.h.
Referenced by getFullCategoryName(), and Remark().