[mlir][llvm] Add atomic support to the LoadOp.
authorTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 17 Feb 2023 08:20:08 +0000 (09:20 +0100)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 17 Feb 2023 08:29:40 +0000 (09:29 +0100)
commit6f4af64b7422942959ab128e89a24dffc83bc054
tree6e61036d121abfb98c0249a0e8b03632e615ccb0
parent55a18bfe9b659328728456dce5495beb6f76688d
[mlir][llvm] Add atomic support to the LoadOp.

This revision adds atomic support to the LoadOp. It chooses
to print the atomic keywords together with the syncscope and
ordering arguments, which simplifies parsing and printing compared
to the LLVM IR printer that puts the atomic keyword at the beginning.
It uses the ordering attribute to check if the load is atomic.

The revision also implements verifiers to ensure the constraints
that apply to atomic load operations are checked.

Reviewed By: Dinistro

Differential Revision: https://reviews.llvm.org/D144112
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/test/Dialect/LLVMIR/invalid.mlir
mlir/test/Dialect/LLVMIR/roundtrip.mlir
mlir/test/Target/LLVMIR/Import/instructions.ll
mlir/test/Target/LLVMIR/llvmir.mlir