21 llvm::StringRef name) {
23 llvm::StringRef moduleName =
28 if (
auto gpuMod = symTab.
lookup<gpu::GPUModuleOp>(moduleName))
35 auto *ctx = mod.getContext();
36 mod->setAttr(gpu::GPUDialect::getContainerModuleAttrName(),
40 auto gpuMod = gpu::GPUModuleOp::create(builder, mod.getLoc(), moduleName);
42 symTab.
insert(gpuMod, insertPt);
OpListType::iterator iterator
This class helps build Operations.
This class allows for representing and managing the symbol table used by operations with the 'SymbolT...
Operation * lookup(StringRef name) const
Look up a symbol with the specified name, returning null if no such name exists.
StringAttr insert(Operation *symbol, Block::iterator insertPt={})
Insert a new symbol into the table, and rename it as necessary to avoid collisions.
std::optional< gpu::GPUModuleOp > getOrCreateGPUModule(ModuleOp mod, bool create=true, llvm::StringRef name=kDefaultGPUModuleName)
Get or create a GPU module in the given module.
constexpr llvm::StringLiteral kDefaultGPUModuleName
Default GPU module name used by OpenACC.
Include the generated interface declarations.