[Mlir-commits] [mlir] [Flang] [OpenMP] [Lowering] Add lowering support for IS_DEVICE_PTR and HAS_DEVICE_ADDR clauses on OMP TARGET directive. (PR #67752)

Akash Banerjee llvmlistbot at llvm.org
Wed Oct 25 08:19:10 PDT 2023


================
@@ -2411,6 +2451,10 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
   mlir::Value ifClauseOperand, deviceOperand, threadLimitOperand;
   mlir::UnitAttr nowaitAttr;
   llvm::SmallVector<mlir::Value> mapOperands;
+  llvm::SmallVector<mlir::Value> devicePtrOperands, deviceAddrOperands;
+  llvm::SmallVector<mlir::Type> useDeviceTypes;
+  llvm::SmallVector<mlir::Location> useDeviceLocs;
+  llvm::SmallVector<const Fortran::semantics::Symbol *> useDeviceSymbols;
----------------
TIFitis wrote:

These variables are currently unused from what I can see.

For the use_device_ptr/addr clauses for the target data directive. These were used to create block_arguments for these variables, because we wanted to replace all of their uses with new values generated by OMPIRBuilder.

If we are looking for a similar behaviour here then, and we want to add them as block_arguments as well. Then probably this change would be easier once #67164 is merged as that would already have the base code for doing this.

https://github.com/llvm/llvm-project/pull/67752


More information about the Mlir-commits mailing list