MLIR 24.0.0git
OpenACCUtils.cpp File Reference
#include "mlir/Dialect/OpenACC/OpenACCUtils.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/OpenACC/OpenACC.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dominance.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Interfaces/ViewLikeInterface.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Support/Casting.h"

Go to the source code of this file.

Functions

template<typename OpTy>
static bool isOnlyUsedByOpClauses (mlir::Value val, mlir::Region &region)
static mlir::OperationlookupSymbolInGPUModules (mlir::Operation *user, mlir::SymbolRefAttr symbol)
 Look up symbol in the gpu.modules of the enclosing module.

Function Documentation

◆ isOnlyUsedByOpClauses()

template<typename OpTy>
bool isOnlyUsedByOpClauses ( mlir::Value val,
mlir::Region & region )
static

◆ lookupSymbolInGPUModules()

mlir::Operation * lookupSymbolInGPUModules ( mlir::Operation * user,
mlir::SymbolRefAttr symbol )
static

Look up symbol in the gpu.modules of the enclosing module.

A gpu.module is its own symbol table, so lookupNearestSymbolFrom from a user outside of it does not find definitions placed inside.

Definition at line 202 of file OpenACCUtils.cpp.

References mlir::Operation::getParentOfType(), and mlir::SymbolTable::lookupSymbolIn().

Referenced by mlir::acc::isValidSymbolUse().