[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-05-18 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 523303. TIFitis added a comment. Done migrating from Clang. This makes use of the clang functions now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: llvm/i

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-28 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis planned changes to this revision. TIFitis added a comment. @kiranchandramohan I am in the process of submitting a new patch for review which moves the map processing from Clang Codegen to OMPIRBuilder. Once that is moved we can just use that for dealing with the map operands. Thus puttin

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-28 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 517921. TIFitis added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp llvm/include/llvm/Frontend/O

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-27 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. In D146557#4301955 , @TIFitis wrote: > In D146557#4295550 , > @kiranchandramohan wrote: > >> In D146557#4292223 , @TIFitis >> wrote: >

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-27 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 517548. TIFitis added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp llvm/include/llvm/Frontend/O

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-27 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis added a comment. In D146557#4295550 , @kiranchandramohan wrote: > In D146557#4292223 , @TIFitis wrote: > >> Cleaned up how IsBegin argument is passed for createTargetData call. > > Please submit this dire

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-25 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. In D146557#4292223 , @TIFitis wrote: > Cleaned up how IsBegin argument is passed for createTargetData call. Please submit this directly as an NFC patch. We should always work towards simple patches that are easy to rev

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-24 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 516379. TIFitis marked an inline comment as done. TIFitis added a comment. Cleaned up how IsBegin argument is passed for createTargetData call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-21 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis marked 2 inline comments as done. TIFitis added inline comments. Comment at: mlir/test/Target/LLVMIR/omptarget-llvm.mlir:4-5 -llvm.func @_QPopenmp_target_data() { - %0 = llvm.mlir.constant(1 : i64) : i64 - %1 = llvm.alloca %0 x i32 {bindc_name = "i", in_type = i32, ope

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-21 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 515805. TIFitis marked an inline comment as done. TIFitis edited the summary of this revision. TIFitis added a comment. Updated tests. Addressed reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-20 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. Would it be possible to break this into a few patches like suggested below or similar? 1. Changed to using inlineConvertOmpRegions to generate target data associated region code inline in same block if possible. 2. Changed to calculating map_operand size from

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-20 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added inline comments. Comment at: mlir/test/Target/LLVMIR/omptarget-llvm.mlir:4-5 -llvm.func @_QPopenmp_target_data() { - %0 = llvm.mlir.constant(1 : i64) : i64 - %1 = llvm.alloca %0 x i32 {bindc_name = "i", in_type = i32, operand_segment_sizes = array, uniq

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-20 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis added a comment. In D146557#4283149 , @kiranchandramohan wrote: > Please update the summary to convey all the changes introduced in the patch. > > From the tests, it looks like there is a substantial change in the IR. I was > hoping this to be a

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-20 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. Please update the summary to convey all the changes introduced in the patch. From the tests, it looks like there is a substantial change in the IR. I was hoping this to be an NFC change. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBui

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-17 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis added a comment. ping for reviews. Thanks :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-14 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 513599. TIFitis added a comment. Updated to use opaque pointers, removed BitCast Insts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: clang/lib/CodeGen/CGO

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-11 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis added a comment. Herald added a subscriber: bviyer. ping for reviews. Thanks :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 ___ cfe-commits mailing

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-03 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis marked 2 inline comments as not done. TIFitis added a comment. Polite request for reviews. Thanks :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 ___

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-30 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 509725. TIFitis added a comment. Updated unit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp llvm/include/llvm

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-30 Thread Akash Banerjee via Phabricator via cfe-commits
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(type)) +return DL.getTypeSize(cast(type).getElementType()); + + return -1; +

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-30 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 509698. TIFitis marked an inline comment as done. TIFitis added a comment. Changed how size is calculated. Updated tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D1465

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-23 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis marked 2 inline comments as done. TIFitis added inline comments. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4064-4077 +Value *BaseGEPPtr = Builder.CreateInBoundsGEP( +ArrI8PtrTy, MapperAllocas.ArgsBase, +{Builder.getInt32(0), Builder.getInt3

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4261 + bool Temp; + return Val->getPointerDereferenceableBytes(M.getDataLayout(), Temp, Temp); } TIFitis wrote: > `getPointerDereferenceableBytes` doesn't fully support `Arg

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-22 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis marked 3 inline comments as done. TIFitis added inline comments. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4181-4191 +for (auto &UseDeviceOp : UseDeviceInfos) { + auto *UseDeviceVal = UseDeviceOp.first; + auto &UseDeviceInfo = UseDeviceOp.second;

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-03-22 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 507430. TIFitis added a comment. Updated tests. All tests pass now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp l