MLIR 24.0.0git
LLVMModuleOps.cpp File Reference
#include "mlir/Dialect/LLVMIR/LLVMModuleOps.h"
#include "IR/LLVMOps.h"
#include "mlir/Dialect/LLVMIR/LLVMCallOps.h"
#include "mlir/Dialect/LLVMIR/LLVMConstantOps.h"
#include "mlir/Dialect/LLVMIR/LLVMMemoryOps.h"
#include "mlir/Dialect/LLVMIR/LLVMTerminatorOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include <optional>
#include "mlir/Dialect/LLVMIR/LLVMModuleOps.cpp.inc"

Go to the source code of this file.

Macros

#define GET_OP_CLASSES

Functions

static LogicalResult verifySymbolAttrUse (FlatSymbolRefAttr symbol, Operation *op, SymbolTableCollection &symbolTable)
 Verifies symbol's use in op to ensure the symbol is a valid and fully defined llvm.func.
template<typename OpType>
static void printCommonGlobalAndAlias (OpAsmPrinter &p, OpType op)
static LogicalResult verifyComdat (Operation *op, std::optional< SymbolRefAttr > attr, SymbolTableCollection &symbolTable)
static LogicalResult verifyBlockTags (LLVMFuncOp funcOp)
template<typename OpType>
static ParseResult parseCommonGlobalAndAlias (OpAsmParser &parser, OperationState &result)
 Parse common attributes that might show up in the same order in both GlobalOp and AliasOp.
static bool isZeroAttribute (Attribute value)
static LogicalResult checkGlobalXtorData (Operation *op, ArrayAttr data)
static Type buildLLVMFunctionType (OpAsmParser &parser, SMLoc loc, ArrayRef< Type > inputs, ArrayRef< Type > outputs, function_interface_impl::VariadicFlag variadicFlag)

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1191 of file LLVMModuleOps.cpp.

Function Documentation

◆ buildLLVMFunctionType()

◆ checkGlobalXtorData()

LogicalResult checkGlobalXtorData ( Operation * op,
ArrayAttr data )
static

Definition at line 505 of file LLVMModuleOps.cpp.

References ArrayAttr(), mlir::Operation::emitError(), and success().

◆ isZeroAttribute()

bool isZeroAttribute ( Attribute value)
static

Definition at line 378 of file LLVMModuleOps.cpp.

References isZeroAttribute().

Referenced by isZeroAttribute().

◆ parseCommonGlobalAndAlias()

template<typename OpType>
ParseResult parseCommonGlobalAndAlias ( OpAsmParser & parser,
OperationState & result )
static

◆ printCommonGlobalAndAlias()

template<typename OpType>
void printCommonGlobalAndAlias ( OpAsmPrinter & p,
OpType op )
static

Definition at line 165 of file LLVMModuleOps.cpp.

◆ verifyBlockTags()

LogicalResult verifyBlockTags ( LLVMFuncOp funcOp)
static

◆ verifyComdat()

LogicalResult verifyComdat ( Operation * op,
std::optional< SymbolRefAttr > attr,
SymbolTableCollection & symbolTable )
static

◆ verifySymbolAttrUse()

LogicalResult verifySymbolAttrUse ( FlatSymbolRefAttr symbol,
Operation * op,
SymbolTableCollection & symbolTable )
static

Verifies symbol's use in op to ensure the symbol is a valid and fully defined llvm.func.

Definition at line 56 of file LLVMModuleOps.cpp.

References mlir::Operation::emitOpError(), mlir::FlatSymbolRefAttr::getAttr(), mlir::FlatSymbolRefAttr::getValue(), mlir::SymbolTableCollection::lookupNearestSymbolFrom(), and success().