|
MLIR 24.0.0git
|
#include "mlir/Remark/LLVMRemarkImport.h"#include "mlir/IR/Diagnostics.h"#include "mlir/IR/MLIRContext.h"#include "mlir/IR/Operation.h"#include "mlir/IR/SymbolTable.h"#include "llvm/ADT/Twine.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/DiagnosticPrinter.h"#include "llvm/IR/Function.h"#include "llvm/IR/GlobalValue.h"#include "llvm/Remarks/Remark.h"#include "llvm/Remarks/RemarkParser.h"#include "llvm/Support/Error.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Functions | |
| static Location | getFunctionLocation (Operation *anchor, llvm::StringMap< Location > &cache, StringRef functionName) |
| Returns the location of the symbol functionName inside anchor, or the location of anchor if there is no such symbol. | |
| static Location | resolveLocation (Operation *anchor, llvm::StringMap< Location > &cache, StringRef file, unsigned line, unsigned column, StringRef functionName) |
| static Location | resolveLocation (Operation *anchor, llvm::StringMap< Location > &cache, const llvm::DiagnosticInfoWithLocationBase &diag) |
| static remark::RemarkKind | getRemarkKind (llvm::DiagnosticKind kind) |
| static remark::RemarkKind | getRemarkKind (llvm::remarks::Type type) |
| static std::string | getCategory (StringRef passName) |
| Returns the MLIR remark category of the LLVM pass passName. | |
| static std::string | getArgKey (StringRef key) |
| Renames the argument keys that the remark engine uses itself. | |
| static void | emitImportedRemark (remark::detail::RemarkEngine &engine, Location loc, const ImportedRemark &imported) |
| static void | importLLVMRemark (remark::detail::RemarkEngine &engine, Location loc, const llvm::DiagnosticInfoOptimizationBase &diag) |
| static void | importLLVMRemark (remark::detail::RemarkEngine &engine, Location loc, const llvm::remarks::Remark &remark) |
|
static |
Definition at line 137 of file LLVMRemarkImport.cpp.
References mlir::remark::RemarkOpts::category(), mlir::remark::detail::RemarkEngine::emitOptimizationRemark(), mlir::remark::detail::RemarkEngine::emitOptimizationRemarkAnalysis(), mlir::remark::detail::RemarkEngine::emitOptimizationRemarkFailure(), mlir::remark::detail::RemarkEngine::emitOptimizationRemarkMiss(), mlir::remark::RemarkOpts::function(), getArgKey(), getCategory(), mlir::remark::RemarkOpts::name(), mlir::remark::RemarkAnalysis, mlir::remark::RemarkFailure, mlir::remark::RemarkMissed, mlir::remark::RemarkPassed, and mlir::remark::RemarkUnknown.
Referenced by importLLVMRemark(), and importLLVMRemark().
|
static |
Renames the argument keys that the remark engine uses itself.
Definition at line 131 of file LLVMRemarkImport.cpp.
Referenced by emitImportedRemark().
|
static |
Returns the MLIR remark category of the LLVM pass passName.
Definition at line 126 of file LLVMRemarkImport.cpp.
References mlir::remark::llvmRemarkCategoryPrefix.
Referenced by emitImportedRemark(), mlir::remark::LLVMToMLIRDiagnosticHandler::handleDiagnostics(), mlir::remark::LLVMToMLIRDiagnosticHandler::isAnalysisRemarkEnabled(), mlir::remark::LLVMToMLIRDiagnosticHandler::isMissedOptRemarkEnabled(), and mlir::remark::LLVMToMLIRDiagnosticHandler::isPassedOptRemarkEnabled().
|
static |
Returns the location of the symbol functionName inside anchor, or the location of anchor if there is no such symbol.
Definition at line 34 of file LLVMRemarkImport.cpp.
References mlir::Operation::getLoc(), mlir::Operation::hasTrait(), and mlir::SymbolTable::lookupSymbolIn().
Referenced by resolveLocation().
|
static |
Definition at line 87 of file LLVMRemarkImport.cpp.
References mlir::remark::RemarkAnalysis, mlir::remark::RemarkFailure, mlir::remark::RemarkMissed, mlir::remark::RemarkPassed, and mlir::remark::RemarkUnknown.
Referenced by mlir::remark::LLVMToMLIRDiagnosticHandler::handleDiagnostics(), importLLVMRemark(), and importLLVMRemark().
|
static |
Definition at line 107 of file LLVMRemarkImport.cpp.
References mlir::remark::RemarkAnalysis, mlir::remark::RemarkFailure, mlir::remark::RemarkMissed, mlir::remark::RemarkPassed, and mlir::remark::RemarkUnknown.
|
static |
Definition at line 174 of file LLVMRemarkImport.cpp.
References diag(), emitImportedRemark(), and getRemarkKind().
Referenced by mlir::remark::LLVMToMLIRDiagnosticHandler::handleDiagnostics(), and mlir::remark::importLLVMRemarks().
|
static |
Definition at line 191 of file LLVMRemarkImport.cpp.
References emitImportedRemark(), and getRemarkKind().
|
static |
Definition at line 59 of file LLVMRemarkImport.cpp.
References diag(), and resolveLocation().
|
static |
Definition at line 49 of file LLVMRemarkImport.cpp.
References mlir::FileLineColLoc::get(), mlir::Operation::getContext(), and getFunctionLocation().
Referenced by mlir::remark::LLVMToMLIRDiagnosticHandler::handleDiagnostics(), mlir::remark::importLLVMRemarks(), and resolveLocation().