[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed
Akash Banerjee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 30 09:25:22 PDT 2023
TIFitis added inline comments.
================
Comment at: mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:1357-1362
+int64_t getSizeInBytes(DataLayout &DL, const mlir::Type &type) {
+ if (isa<LLVM::LLVMPointerType>(type))
+ return DL.getTypeSize(cast<LLVM::LLVMPointerType>(type).getElementType());
+
+ return -1;
+}
----------------
@jdoerfert Is this way of getting the size correct? It seems to work for basic types and arrays which is what we support for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146557/new/
https://reviews.llvm.org/D146557
More information about the cfe-commits
mailing list