[PATCH] D73137: [mlir] Swap use of to_vector() with lookupValues() in LLVMIRIntrinsicGen

Marcello Maggioni via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 08:02:34 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG04a151710e8b: [mlir] Swap use of to_vector() with lookupValues() in LLVMIRIntrinsicGen (authored by kariddi).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73137

Files:
  mlir/test/mlir-tblgen/llvm-intrinsics.td
  mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp


Index: mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp
===================================================================
--- mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp
+++ mlir/tools/mlir-tblgen/LLVMIRIntrinsicGen.cpp
@@ -181,9 +181,9 @@
   if (overloadedRes.any() || overloadedOps.any())
     os << "\n  ";
   os << "});\n";
-  os << "    auto operands = llvm::to_vector<8, Value *>(\n";
-  os << "        opInst.operand_begin(), opInst.operand_end());\n";
-  os << "    " << (intr.getNumResults() > 0 ? "$res = " : "")
+  os << "    auto operands =\n";
+  os << "        lookupValues(opInst.getOperands());\n";
+  os << "  " << (intr.getNumResults() > 0 ? "$res = " : "")
      << "builder.CreateCall(fn, operands);\n";
   os << "  ";
 }
Index: mlir/test/mlir-tblgen/llvm-intrinsics.td
===================================================================
--- mlir/test/mlir-tblgen/llvm-intrinsics.td
+++ mlir/test/mlir-tblgen/llvm-intrinsics.td
@@ -21,6 +21,7 @@
 // CHECK:        module, llvm::Intrinsic::is_constant, {
 // CHECK:        opInst.getOperand(0).getType().cast<LLVM::LLVMType>().getUnderlyingType(),
 // CHECK: });
+// CHECK:        lookupValues(opInst.getOperands());
 
 //---------------------------------------------------------------------------//
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73137.239601.patch
Type: text/x-patch
Size: 1272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200122/b9c85ebe/attachment.bin>


More information about the llvm-commits mailing list