[MLIR][LLVMDialect] Added volatile and nontemporal attributes to load/store
authorGeorge Mitenkov <georgemitenk0v@gmail.com>
Mon, 27 Jul 2020 07:19:48 +0000 (10:19 +0300)
committerGeorge Mitenkov <georgemitenk0v@gmail.com>
Mon, 27 Jul 2020 07:55:56 +0000 (10:55 +0300)
commit36618274f3e2cdea98cd8202204b8ad2913aae46
tree4a73b1fc29d92c1e8ef9e32a379a75c3caf2c22e
parent590dd73c6ebdc9fe1314dfa5bda5c2367d866574
[MLIR][LLVMDialect] Added volatile and nontemporal attributes to load/store

This patch introduces 2 new optional attributes to `llvm.load`
and `llvm.store` ops: `volatile` and `nontemporal`. These attributes
are translated into proper LLVM as a `volatile` marker and a metadata node
respectively. They are also helpful with SPIR-V to LLVM dialect conversion
since they are the mappings for `Volatile` and `NonTemporal` Memory Operands.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D84396
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/test/Target/llvmir.mlir