[PATCH] D72741: [MLIR] LLVM dialect: Add llvm.atomicrmw

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 11:39:51 PST 2020


mehdi_amini added a comment.

In D72741#1827039 <https://reviews.llvm.org/D72741#1827039>, @jfb wrote:

> You're making a new IR, and that's exactly the right time to revisit basic things like this instead of copying LLVM IR.


Maybe what is causing confusion is that we also have the MLIR standard dialect, which is more of a new IR itself. We are actually quite careful about things going in the standard dialect and it isn't bound by LLVM IR (other that we try to think about how to map down to LLVM).

Another way to put it is that the LLVM Dialect is only a layer intended to be hiding the LLVM IR Builders: while in MLIR you lower down to the LLVM Dialect instead of emitting directly LLVM IR. The reason is that this composes better (you can lower progressively to LLVM and not as a one shot conversion). So the LLVM dialect "embeds" the LLVM IR inside MLIR.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72741/new/

https://reviews.llvm.org/D72741





More information about the llvm-commits mailing list