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
Could you keep arguments in the same order as LLVM's builder (ordering, then scope).