MLIR 24.0.0git
mlir::remark::LLVMToMLIRDiagnosticHandler Class Reference

Diagnostic handler forwarding LLVM diagnostics to MLIR. More...

#include "mlir/Remark/LLVMRemarkImport.h"

Inheritance diagram for mlir::remark::LLVMToMLIRDiagnosticHandler:

Public Member Functions

 LLVMToMLIRDiagnosticHandler (Operation *anchor)
bool handleDiagnostics (const llvm::DiagnosticInfo &diag) override
bool isAnalysisRemarkEnabled (StringRef passName) const override
bool isMissedOptRemarkEnabled (StringRef passName) const override
bool isPassedOptRemarkEnabled (StringRef passName) const override
bool isAnyRemarkEnabled () const override

Detailed Description

Diagnostic handler forwarding LLVM diagnostics to MLIR.

Optimization remarks enabled in the remark engine of the context of anchor are imported as described for importLLVMRemarks, so the remark filters of the engine select LLVM remarks by their prefixed pass name. Other remarks are left to LLVM, which prints those enabled with its own -pass-remarks flags. All other diagnostics are reported as MLIR diagnostics. Install the handler with RespectFilters set, so that LLVM only forwards enabled remarks.

Definition at line 50 of file LLVMRemarkImport.h.

Constructor & Destructor Documentation

◆ LLVMToMLIRDiagnosticHandler()

remark::LLVMToMLIRDiagnosticHandler::LLVMToMLIRDiagnosticHandler ( Operation * anchor)
explicit

Definition at line 246 of file LLVMRemarkImport.cpp.

References getContext().

Member Function Documentation

◆ handleDiagnostics()

bool remark::LLVMToMLIRDiagnosticHandler::handleDiagnostics ( const llvm::DiagnosticInfo & diag)
override

◆ isAnalysisRemarkEnabled()

bool remark::LLVMToMLIRDiagnosticHandler::isAnalysisRemarkEnabled ( StringRef passName) const
override

Definition at line 250 of file LLVMRemarkImport.cpp.

References getCategory().

◆ isAnyRemarkEnabled()

bool remark::LLVMToMLIRDiagnosticHandler::isAnyRemarkEnabled ( ) const
override

Definition at line 269 of file LLVMRemarkImport.cpp.

◆ isMissedOptRemarkEnabled()

bool remark::LLVMToMLIRDiagnosticHandler::isMissedOptRemarkEnabled ( StringRef passName) const
override

Definition at line 257 of file LLVMRemarkImport.cpp.

References getCategory().

◆ isPassedOptRemarkEnabled()

bool remark::LLVMToMLIRDiagnosticHandler::isPassedOptRemarkEnabled ( StringRef passName) const
override

Definition at line 263 of file LLVMRemarkImport.cpp.

References getCategory().


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