[PATCH] D79479: [MLIR] Add complex addition and substraction to the standard dialect

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 12:29:43 PDT 2020


rriddle added inline comments.
Herald added a subscriber: jurahul.


================
Comment at: mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp:1388
+struct BinaryComplexOperands {
+  Value lhsReal, lhsImag, rhsReal, rhsImag;
+};
----------------
I would prefer you just use std::complex<Value> instead.


================
Comment at: mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp:1443
+                  ConversionPatternRewriter &rewriter) const override {
+    auto op = cast<SubCFOp>(operation);
+    auto loc = op.getLoc();
----------------
Side note, why is ConvertOpToLLVMPattern even templated if it doesn't do this for you? We should fix that,


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79479





More information about the llvm-commits mailing list