MLIR 24.0.0git
ACCToLLVMUtils.cpp File Reference
#include "mlir/Conversion/OpenACCToLLVM/ACCToLLVMUtils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallString.h"

Go to the source code of this file.

Functions

static LLVM::GlobalOp getOrCreateGlobalStringOp (Location loc, OpBuilder &builder, StringRef name, StringRef value, ModuleOp module)
 Creates or reuses a module-internal null-terminated string global and returns the GlobalOp.

Function Documentation

◆ getOrCreateGlobalStringOp()

LLVM::GlobalOp getOrCreateGlobalStringOp ( Location loc,
OpBuilder & builder,
StringRef name,
StringRef value,
ModuleOp module )
static

Creates or reuses a module-internal null-terminated string global and returns the GlobalOp.

Definition at line 72 of file ACCToLLVMUtils.cpp.

References mlir::Builder::getI8Type(), mlir::Builder::getStringAttr(), and mlir::OpBuilder::setInsertionPointToStart().

Referenced by mlir::acc::createIdent(), and mlir::acc::getOrCreateGlobalString().