diff options
author | River Riddle <riverriddle@google.com> | 2019-12-22 21:59:55 -0800 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-22 22:00:23 -0800 |
commit | 35807bc4c5c9d8abc31ba0b2f955a82abf276e12 (patch) | |
tree | d083d37d993a774239081509a50e3e6c65366421 /mlir/lib/EDSC/Intrinsics.cpp | |
parent | 22954a0e408afde1d8686dffb3a3dcab107a2cd3 (diff) | |
download | bcm5719-llvm-35807bc4c5c9d8abc31ba0b2f955a82abf276e12.tar.gz bcm5719-llvm-35807bc4c5c9d8abc31ba0b2f955a82abf276e12.zip |
NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to Value being value-typed.
This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ
This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics.
PiperOrigin-RevId: 286844725
Diffstat (limited to 'mlir/lib/EDSC/Intrinsics.cpp')
-rw-r--r-- | mlir/lib/EDSC/Intrinsics.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/EDSC/Intrinsics.cpp b/mlir/lib/EDSC/Intrinsics.cpp index 1b19f9aa0bf..c6738c42993 100644 --- a/mlir/lib/EDSC/Intrinsics.cpp +++ b/mlir/lib/EDSC/Intrinsics.cpp @@ -29,7 +29,7 @@ OperationHandle mlir::edsc::intrinsics::br(BlockHandle bh, (void)o; assert(o && "Expected already captured ValueHandle"); } - SmallVector<Value *, 4> ops(operands.begin(), operands.end()); + SmallVector<ValuePtr, 4> ops(operands.begin(), operands.end()); return OperationHandle::create<BranchOp>(bh.getBlock(), ops); } static void enforceEmptyCapturesMatchOperands(ArrayRef<ValueHandle *> captures, @@ -52,7 +52,7 @@ OperationHandle mlir::edsc::intrinsics::br(BlockHandle *bh, assert(!*bh && "Unexpected already captured BlockHandle"); enforceEmptyCapturesMatchOperands(captures, operands); BlockBuilder(bh, captures)(/* no body */); - SmallVector<Value *, 4> ops(operands.begin(), operands.end()); + SmallVector<ValuePtr, 4> ops(operands.begin(), operands.end()); return OperationHandle::create<BranchOp>(bh->getBlock(), ops); } @@ -61,8 +61,8 @@ mlir::edsc::intrinsics::cond_br(ValueHandle cond, BlockHandle trueBranch, ArrayRef<ValueHandle> trueOperands, BlockHandle falseBranch, ArrayRef<ValueHandle> falseOperands) { - SmallVector<Value *, 4> trueOps(trueOperands.begin(), trueOperands.end()); - SmallVector<Value *, 4> falseOps(falseOperands.begin(), falseOperands.end()); + SmallVector<ValuePtr, 4> trueOps(trueOperands.begin(), trueOperands.end()); + SmallVector<ValuePtr, 4> falseOps(falseOperands.begin(), falseOperands.end()); return OperationHandle::create<CondBranchOp>( cond, trueBranch.getBlock(), trueOps, falseBranch.getBlock(), falseOps); } @@ -78,8 +78,8 @@ OperationHandle mlir::edsc::intrinsics::cond_br( enforceEmptyCapturesMatchOperands(falseCaptures, falseOperands); BlockBuilder(trueBranch, trueCaptures)(/* no body */); BlockBuilder(falseBranch, falseCaptures)(/* no body */); - SmallVector<Value *, 4> trueOps(trueOperands.begin(), trueOperands.end()); - SmallVector<Value *, 4> falseOps(falseOperands.begin(), falseOperands.end()); + SmallVector<ValuePtr, 4> trueOps(trueOperands.begin(), trueOperands.end()); + SmallVector<ValuePtr, 4> falseOps(falseOperands.begin(), falseOperands.end()); return OperationHandle::create<CondBranchOp>( cond, trueBranch->getBlock(), trueOps, falseBranch->getBlock(), falseOps); } |