MLIR 22.0.0git
DIScopeForLLVMFuncOp.cpp File Reference
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/Support/Path.h"
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"

Go to the source code of this file.

Classes

struct  mlir::LLVM::DIScopeForLLVMFuncOpPassOptions
class  mlir::LLVM::impl::DIScopeForLLVMFuncOpPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::LLVM
namespace  mlir::LLVM::impl

Macros

#define GEN_PASS_DEF_DISCOPEFORLLVMFUNCOPPASS
#define GEN_PASS_DECL_DISCOPEFORLLVMFUNCOPPASS
#define GEN_PASS_DECL_LLVMADDCOMDATS
#define GEN_PASS_DECL_LLVMLEGALIZEFOREXPORTPASS
#define GEN_PASS_DECL_LLVMREQUESTCWRAPPERSPASS
#define GEN_PASS_DECL_NVVMOPTIMIZEFORTARGETPASS
#define GEN_PASS_REGISTRATION_DISCOPEFORLLVMFUNCOPPASS
#define GEN_PASS_REGISTRATION_LLVMADDCOMDATS
#define GEN_PASS_REGISTRATION_LLVMLEGALIZEFOREXPORTPASS
#define GEN_PASS_REGISTRATION_LLVMREQUESTCWRAPPERSPASS
#define GEN_PASS_REGISTRATION_NVVMOPTIMIZEFORTARGETPASS

Functions

std::unique_ptr<::mlir::Passmlir::LLVM::createDIScopeForLLVMFuncOpPass ()
std::unique_ptr<::mlir::Passmlir::LLVM::createDIScopeForLLVMFuncOpPass (DIScopeForLLVMFuncOpPassOptions options)
std::unique_ptr<::mlir::Passmlir::LLVM::impl::createDIScopeForLLVMFuncOpPass ()
std::unique_ptr<::mlir::Passmlir::LLVM::impl::createDIScopeForLLVMFuncOpPass (DIScopeForLLVMFuncOpPassOptions options)
std::unique_ptr<::mlir::Passmlir::LLVM::createLLVMAddComdats ()
std::unique_ptr<::mlir::Passmlir::LLVM::createLLVMLegalizeForExportPass ()
std::unique_ptr<::mlir::Passmlir::LLVM::createLLVMRequestCWrappersPass ()
std::unique_ptr<::mlir::Passmlir::LLVM::createNVVMOptimizeForTargetPass ()
void mlir::LLVM::registerDIScopeForLLVMFuncOpPass ()
void mlir::LLVM::registerDIScopeForLLVMFuncOpPassPass ()
void mlir::LLVM::registerLLVMAddComdats ()
void mlir::LLVM::registerLLVMAddComdatsPass ()
void mlir::LLVM::registerLLVMLegalizeForExportPass ()
void mlir::LLVM::registerLLVMLegalizeForExportPassPass ()
void mlir::LLVM::registerLLVMRequestCWrappersPass ()
void mlir::LLVM::registerLLVMRequestCWrappersPassPass ()
void mlir::LLVM::registerNVVMOptimizeForTargetPass ()
void mlir::LLVM::registerNVVMOptimizeForTargetPassPass ()
void mlir::LLVM::registerLLVMPasses ()
static FileLineColLoc extractFileLoc (Location loc)
 Attempt to extract a filename for the given loc.
static void addScopeToFunction (LLVM::LLVMFuncOp llvmFunc, LLVM::DICompileUnitAttr compileUnitAttr)
 Creates a DISubprogramAttr with the provided compile unit and attaches it to the function.
static Location getNestedLoc (Operation *op, LLVM::DIScopeAttr scopeAttr, Location calleeLoc)
static void setLexicalBlockFileAttr (Operation *op)

Macro Definition Documentation

◆ GEN_PASS_DECL_DISCOPEFORLLVMFUNCOPPASS

#define GEN_PASS_DECL_DISCOPEFORLLVMFUNCOPPASS

◆ GEN_PASS_DECL_LLVMADDCOMDATS

#define GEN_PASS_DECL_LLVMADDCOMDATS

◆ GEN_PASS_DECL_LLVMLEGALIZEFOREXPORTPASS

#define GEN_PASS_DECL_LLVMLEGALIZEFOREXPORTPASS

◆ GEN_PASS_DECL_LLVMREQUESTCWRAPPERSPASS

#define GEN_PASS_DECL_LLVMREQUESTCWRAPPERSPASS

◆ GEN_PASS_DECL_NVVMOPTIMIZEFORTARGETPASS

#define GEN_PASS_DECL_NVVMOPTIMIZEFORTARGETPASS

◆ GEN_PASS_DEF_DISCOPEFORLLVMFUNCOPPASS

#define GEN_PASS_DEF_DISCOPEFORLLVMFUNCOPPASS

Definition at line 17 of file DIScopeForLLVMFuncOp.cpp.

◆ GEN_PASS_REGISTRATION_DISCOPEFORLLVMFUNCOPPASS

#define GEN_PASS_REGISTRATION_DISCOPEFORLLVMFUNCOPPASS

◆ GEN_PASS_REGISTRATION_LLVMADDCOMDATS

#define GEN_PASS_REGISTRATION_LLVMADDCOMDATS

◆ GEN_PASS_REGISTRATION_LLVMLEGALIZEFOREXPORTPASS

#define GEN_PASS_REGISTRATION_LLVMLEGALIZEFOREXPORTPASS

◆ GEN_PASS_REGISTRATION_LLVMREQUESTCWRAPPERSPASS

#define GEN_PASS_REGISTRATION_LLVMREQUESTCWRAPPERSPASS

◆ GEN_PASS_REGISTRATION_NVVMOPTIMIZEFORTARGETPASS

#define GEN_PASS_REGISTRATION_NVVMOPTIMIZEFORTARGETPASS

Function Documentation

◆ addScopeToFunction()

void addScopeToFunction ( LLVM::LLVMFuncOp llvmFunc,
LLVM::DICompileUnitAttr compileUnitAttr )
static

Creates a DISubprogramAttr with the provided compile unit and attaches it to the function.

Does nothing when the function already has an attached subprogram.

Definition at line 46 of file DIScopeForLLVMFuncOp.cpp.

◆ extractFileLoc()

FileLineColLoc extractFileLoc ( Location loc)
static

Attempt to extract a filename for the given loc.

Definition at line 25 of file DIScopeForLLVMFuncOp.cpp.

References extractFileLoc().

Referenced by mlir::LLVM::impl::DIScopeForLLVMFuncOpPassBase< DerivedT >::createDIScopeForLLVMFuncOpPass, and extractFileLoc().

◆ getNestedLoc()

Location getNestedLoc ( Operation * op,
LLVM::DIScopeAttr scopeAttr,
Location calleeLoc )
static

◆ setLexicalBlockFileAttr()

void setLexicalBlockFileAttr ( Operation * op)
static