[mlir][OpenMP] Change the syntax of omp.atomic.read op
authorShraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Mon, 10 Jan 2022 09:56:20 +0000 (15:26 +0530)
committerShraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Mon, 10 Jan 2022 10:49:45 +0000 (16:19 +0530)
commita8586b573e07ec428d03cd4f05eb15b28f742482
tree6d974fb5d06893508e4ce4343390f3951f1d5295
parent8e773f4491419c84276d9abdfef09aa2f818498a
[mlir][OpenMP] Change the syntax of omp.atomic.read op

This patch changes the syntax of omp.atomic.read to take the address of
destination, instead of having the value in a result. This will allow
using omp.atomic.read operation within an omp.atomic.capture operation
thus making its implementation less complex.

Reviewed By: peixin

Differential Revision: https://reviews.llvm.org/D116396
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
mlir/test/Dialect/OpenMP/invalid.mlir
mlir/test/Dialect/OpenMP/ops.mlir
mlir/test/Target/LLVMIR/openmp-llvm.mlir