MLIR 24.0.0git
ACCToLLVMUtils.cpp File Reference
#include "mlir/Conversion/OpenACCToLLVM/ACCToLLVMUtils.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include <iterator>

Go to the source code of this file.

Functions

static LLVM::GlobalOp getOrCreateGlobalStringOp (Location loc, OpBuilder &builder, StringRef name, StringRef value, Region &globalSymbolRegion, SymbolTable *symbolTable)
 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,
Region & globalSymbolRegion,
SymbolTable * symbolTable )
static

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

Definition at line 89 of file ACCToLLVMUtils.cpp.

References mlir::Region::front(), mlir::Builder::getI8Type(), mlir::Builder::getStringAttr(), mlir::SymbolTable::insert(), mlir::SymbolTable::lookup(), and mlir::OpBuilder::setInsertionPointToStart().

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