diff options
| author | River Riddle <riverriddle@google.com> | 2019-12-07 10:35:01 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-07 10:35:41 -0800 |
| commit | d6ee6a031063cb99ca9828f1698a60536ffbb38a (patch) | |
| tree | b8b1b6ecf500d93818366914f56dc818054339f3 /mlir/test/lib/TestDialect | |
| parent | 9d1a0c72b4ae54b97809966257bd1b9cb3140dfe (diff) | |
| download | bcm5719-llvm-d6ee6a031063cb99ca9828f1698a60536ffbb38a.tar.gz bcm5719-llvm-d6ee6a031063cb99ca9828f1698a60536ffbb38a.zip | |
Update the builder API to take ValueRange instead of ArrayRef<Value *>
This allows for users to provide operand_range and result_range in builder.create<> calls, instead of requiring an explicit copy into a separate data structure like SmallVector/std::vector.
PiperOrigin-RevId: 284360710
Diffstat (limited to 'mlir/test/lib/TestDialect')
| -rw-r--r-- | mlir/test/lib/TestDialect/TestDialect.cpp | 2 | ||||
| -rw-r--r-- | mlir/test/lib/TestDialect/TestPatterns.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/mlir/test/lib/TestDialect/TestDialect.cpp b/mlir/test/lib/TestDialect/TestDialect.cpp index 8b9f9a9874a..f470e6ab674 100644 --- a/mlir/test/lib/TestDialect/TestDialect.cpp +++ b/mlir/test/lib/TestDialect/TestDialect.cpp @@ -290,7 +290,7 @@ LogicalResult TestOpWithVariadicResultsAndFolder::fold( } LogicalResult mlir::OpWithInferTypeInterfaceOp::inferReturnTypes( - llvm::Optional<Location> location, ArrayRef<Value *> operands, + llvm::Optional<Location> location, ValueRange operands, ArrayRef<NamedAttribute> attributes, ArrayRef<Region> regions, SmallVectorImpl<Type> &inferedReturnTypes) { if (operands[0]->getType() != operands[1]->getType()) { diff --git a/mlir/test/lib/TestDialect/TestPatterns.cpp b/mlir/test/lib/TestDialect/TestPatterns.cpp index 06911d2b833..9d85c7d93f8 100644 --- a/mlir/test/lib/TestDialect/TestPatterns.cpp +++ b/mlir/test/lib/TestDialect/TestPatterns.cpp @@ -230,8 +230,7 @@ struct TestSplitReturnType : public ConversionPattern { // results directly. auto *defOp = operands[0]->getDefiningOp(); if (auto packerOp = llvm::dyn_cast_or_null<TestCastOp>(defOp)) { - SmallVector<Value *, 2> returnOperands(packerOp.getOperands()); - rewriter.replaceOpWithNewOp<TestReturnOp>(op, returnOperands); + rewriter.replaceOpWithNewOp<TestReturnOp>(op, packerOp.getOperands()); return matchSuccess(); } |

