[PATCH] D75645: {MLIR} Added llvm.fence

Sagar Jain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 14:37:52 PST 2020


Sagar created this revision.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, jfb.
Herald added a project: LLVM.

This patch adds llvm.fence. I tried not to change the syntax much.

syntax:

LLVM IR
`fence [syncscope("<target-scope>")] <ordering>`

MLIR LLVM Dialect

`llvm.fence [syncscope("<target-scope>")] <ordering>`

example:
LLVM IR: `fence syncscope("agent") seq_cst`
MLIR: `llvm.fence syncscope("agent") seq_cst`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75645

Files:
  mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
  mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
  mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
  mlir/test/Dialect/LLVMIR/roundtrip.mlir
  mlir/test/Target/import.ll
  mlir/test/Target/llvmir.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75645.248312.patch
Type: text/x-patch
Size: 6919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/871aff9e/attachment.bin>


More information about the llvm-commits mailing list