|
MLIR 24.0.0git
|
Namespaces | |
| namespace | detail |
Classes | |
| class | LLVMToMLIRDiagnosticHandler |
| Diagnostic handler forwarding LLVM diagnostics to MLIR. More... | |
| struct | RemarkCategories |
| Define an the set of categories to accept. More... | |
| class | RemarkEmittingPolicyAll |
| Policy that emits all remarks. More... | |
| class | RemarkEmittingPolicyFinal |
| Policy that emits only the last remark reported for each identity, see DenseMapInfo<Remark>. More... | |
| class | RemarkId |
| A unique identifier for a remark, used to link related remarks together. More... | |
| struct | RemarkOpts |
| Options to create a Remark. More... | |
Enumerations | |
| enum class | RemarkKind { RemarkUnknown = 0 , RemarkPassed , RemarkMissed , RemarkFailure , RemarkAnalysis } |
| Categories describe the outcome of an transformation, not the mechanics of emitting/serializing remarks. More... | |
Functions | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &os, RemarkId id) |
| template<class... Ts> | |
| detail::LazyTextBuild | reason (const char *fmt, Ts &&...ts) |
| Create a Reason with llvm::formatv formatting. | |
| template<class... Ts> | |
| detail::LazyTextBuild | suggest (const char *fmt, Ts &&...ts) |
| Create a Suggestion with llvm::formatv formatting. | |
| template<class... Ts> | |
| detail::LazyTextBuild | add (const char *fmt, Ts &&...ts) |
| Create a Remark with llvm::formatv formatting. | |
| template<class V> | |
| detail::LazyTextBuild | metric (StringRef key, V &&v) |
| detail::InFlightRemark | passed (Location loc, RemarkOpts opts) |
| Report an optimization remark that was passed. | |
| detail::InFlightRemark | missed (Location loc, RemarkOpts opts) |
| Report an optimization remark that was missed. | |
| detail::InFlightRemark | failed (Location loc, RemarkOpts opts) |
| Report an optimization remark that failed. | |
| detail::InFlightRemark | analysis (Location loc, RemarkOpts opts) |
| Report an optimization analysis remark. | |
| LogicalResult | enableOptimizationRemarks (MLIRContext &ctx, std::unique_ptr< remark::detail::MLIRRemarkStreamerBase > streamer, std::unique_ptr< remark::detail::RemarkEmittingPolicyBase > remarkEmittingPolicy, const remark::RemarkCategories &cats, bool printAsEmitRemarks=false) |
| Setup remarks for the context. | |
| LogicalResult | importLLVMRemarks (Operation *anchor, StringRef buffer, llvm::remarks::Format format) |
| Parses buffer, a serialized LLVM remark file, and reports its remarks into the remark engine of the context of anchor, the operation the remarks refer to. | |
| LogicalResult | enableOptimizationRemarksWithLLVMStreamer (MLIRContext &ctx, StringRef filePath, llvm::remarks::Format fmt, std::unique_ptr< detail::RemarkEmittingPolicyBase > remarkEmittingPolicy, const RemarkCategories &cat, bool printAsEmitRemarks=false) |
| Enable optimization remarks to a file with the given path and format. | |
Variables | |
| constexpr llvm::StringLiteral | llvmRemarkCategoryPrefix = "llvm-" |
| Prefix of the category of remarks imported from LLVM. | |
|
strong |
Categories describe the outcome of an transformation, not the mechanics of emitting/serializing remarks.
|
inline |
|
inline |
Report an optimization analysis remark.
Definition at line 739 of file Remarks.h.
References mlir::remark::detail::RemarkEngine::emitOptimizationRemarkAnalysis().
| LogicalResult mlir::remark::enableOptimizationRemarks | ( | MLIRContext & | ctx, |
| std::unique_ptr< remark::detail::MLIRRemarkStreamerBase > | streamer, | ||
| std::unique_ptr< remark::detail::RemarkEmittingPolicyBase > | remarkEmittingPolicy, | ||
| const remark::RemarkCategories & | cats, | ||
| bool | printAsEmitRemarks = false ) |
Setup remarks for the context.
This function will enable the remark engine and set the streamer to be used for optimization remarks. The remark categories are used to filter the remarks that will be emitted by the remark engine. If a category is not specified, it will not be emitted. If printAsEmitRemarks is true, the remarks will be printed as mlir::emitRemarks. 'streamer' must inherit from MLIRRemarkStreamerBase and will be used to stream the remarks.
Referenced by enableOptimizationRemarksWithLLVMStreamer(), and performActions().
| LogicalResult mlir::remark::enableOptimizationRemarksWithLLVMStreamer | ( | MLIRContext & | ctx, |
| StringRef | filePath, | ||
| llvm::remarks::Format | fmt, | ||
| std::unique_ptr< detail::RemarkEmittingPolicyBase > | remarkEmittingPolicy, | ||
| const RemarkCategories & | cat, | ||
| bool | printAsEmitRemarks = false ) |
Enable optimization remarks to a file with the given path and format.
The remark categories are used to filter the remarks that are emitted. If the printAsEmitRemarks flag is set, remarks will also be printed using mlir::emitRemarks.
Definition at line 61 of file RemarkStreamer.cpp.
References mlir::remark::detail::LLVMRemarkStreamer::createToFile(), enableOptimizationRemarks(), and failed().
Referenced by performActions().
|
inline |
Report an optimization remark that failed.
Definition at line 733 of file Remarks.h.
References mlir::remark::detail::RemarkEngine::emitOptimizationRemarkFailure().
Referenced by enableOptimizationRemarksWithLLVMStreamer().
| LogicalResult mlir::remark::importLLVMRemarks | ( | Operation * | anchor, |
| StringRef | buffer, | ||
| llvm::remarks::Format | format ) |
Parses buffer, a serialized LLVM remark file, and reports its remarks into the remark engine of the context of anchor, the operation the remarks refer to.
The category is the prefixed LLVM pass name, the LLVM remark name becomes the remark name and the message is stored under the "Remark" argument. A remark is attached to its debug location if it has one, otherwise to the symbol named after its LLVM function inside anchor, otherwise to anchor. Fails if the buffer cannot be parsed.
Definition at line 205 of file LLVMRemarkImport.cpp.
References mlir::Operation::getContext(), mlir::MLIRContext::getRemarkEngine(), importLLVMRemark(), resolveLocation(), and success().
|
inline |
Definition at line 709 of file Remarks.h.
References mlir::remark::detail::Remark::Arg::val.
|
inline |
Report an optimization remark that was missed.
Definition at line 727 of file Remarks.h.
References mlir::remark::detail::RemarkEngine::emitOptimizationRemarkMiss().
|
inline |
|
inline |
Report an optimization remark that was passed.
Definition at line 722 of file Remarks.h.
References mlir::remark::detail::RemarkEngine::emitOptimizationRemark().
|
inline |
|
inline |
|
constexpr |
Prefix of the category of remarks imported from LLVM.
The category is the prefix followed by the LLVM pass name, e.g. llvm-inline, so that remark filters can select LLVM remarks (llvm-.*) or a single LLVM pass.
Definition at line 31 of file LLVMRemarkImport.h.
Referenced by getCategory().