[PATCH] D79159: [MLIR] Add complex numbers to standard dialect

Frederik Gossen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 04:32:00 PDT 2020


frgossen marked an inline comment as done.
frgossen added a comment.

Thanks for the many helpful comments. 
There is one comment for which I'd like clarification.



================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:1016
+  let assemblyFormat = [{
+    $real `,` $imag attr-dict `:` type($real) `,` type($imag) `->` type($cplx)
+  }];
----------------
ftynse wrote:
> Do we want to support "mixed" types, e.g. f32, f64 -> complex<f64>?  If not, I would just keep the `type($cplx)` here.
I would love to have only `type($cplx)` here. 
The reason for the current format is that `tablegen` complained when I dropped the other types. 
I can fix this with a hand-written parser and printer but before I do that I want to ask if this is also possible with the `assemblyFormat` thingy. 
What is the elegant way to do this? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79159





More information about the llvm-commits mailing list