15#ifndef MLIR_LIB_DIALECT_LLVMIR_IR_NVVMOPS_H
16#define MLIR_LIB_DIALECT_LLVMIR_IR_NVVMOPS_H
21#include "llvm/IR/Intrinsics.h"
22#include "llvm/Support/Casting.h"
35 auto ptrTy = llvm::cast<LLVM::LLVMPointerType>(
ptr.getType());
36 return ptrTy.getAddressSpace() ==
static_cast<unsigned>(targetAS);
46 llvm::IRBuilderBase &builder);
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
The OpAsmOpInterface, see OpAsmInterface.td for more details.
llvm::Value * getParamCastedAddr(llvm::Value *addr, llvm::IRBuilderBase &builder)
Returns addr cast to the kernel parameter address space.
constexpr unsigned notIntrinsic
The ID of no intrinsic, used in the intrinsic tables of the ops.
bool isPtrInAddrSpace(mlir::Value ptr, NVVMMemorySpace targetAS)
Returns whether ptr is a pointer into the address space targetAS.
bool isPtrInSharedCTASpace(mlir::Value ptr)
Returns whether ptr is a pointer into the shared memory of the CTA.