[PATCH] D72974: [mlir] Fix LLVM intrinsic convesion generator for overloadable types.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 10:48:59 PST 2020


rriddle accepted this revision.
rriddle added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp:34
 
+using IndicesTy = llvm::SmallVector<int, 4>;
+
----------------
rriddle wrote:
> nit: Can you just use a SmallBitVector instead?
Please add a comment for this using directive.


================
Comment at: mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp:167
+  auto overloadedOps = intr.getOverloadableOperandsIdxs();
+  auto overloadedRes = intr.getOverloadableResultsIdxs();
   os << "    llvm::Module *module = builder.GetInsertBlock()->getModule();\n";
----------------
nit: Swap these two variables to match the loop order below.


================
Comment at: mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp:180
+  }
+  if (!overloadedRes.empty() || !overloadedOps.empty())
+    os << "\n  ";
----------------
These  !empty() checks need to be changed to 'any' now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72974





More information about the llvm-commits mailing list