diff options
author | River Riddle <riverriddle@google.com> | 2019-12-23 14:45:01 -0800 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-23 16:36:53 -0800 |
commit | e62a69561fb9d7b1013d2853da68d79a7907fead (patch) | |
tree | 0dd059094cbfb8d904513abcdc1fbe8cfa89bb09 /mlir/lib/Dialect/LoopOps/LoopOps.cpp | |
parent | 5d5bd2e1da29d976cb125dbb3cd097a5e42b2be4 (diff) | |
download | bcm5719-llvm-e62a69561fb9d7b1013d2853da68d79a7907fead.tar.gz bcm5719-llvm-e62a69561fb9d7b1013d2853da68d79a7907fead.zip |
NFC: Replace ValuePtr with Value and remove it now that Value is value-typed.
ValuePtr was a temporary typedef during the transition to a value-typed Value.
PiperOrigin-RevId: 286945714
Diffstat (limited to 'mlir/lib/Dialect/LoopOps/LoopOps.cpp')
-rw-r--r-- | mlir/lib/Dialect/LoopOps/LoopOps.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mlir/lib/Dialect/LoopOps/LoopOps.cpp b/mlir/lib/Dialect/LoopOps/LoopOps.cpp index 8e19eba911a..acbab01df79 100644 --- a/mlir/lib/Dialect/LoopOps/LoopOps.cpp +++ b/mlir/lib/Dialect/LoopOps/LoopOps.cpp @@ -60,8 +60,8 @@ LoopOpsDialect::LoopOpsDialect(MLIRContext *context) // ForOp //===----------------------------------------------------------------------===// -void ForOp::build(Builder *builder, OperationState &result, ValuePtr lb, - ValuePtr ub, ValuePtr step) { +void ForOp::build(Builder *builder, OperationState &result, Value lb, Value ub, + Value step) { result.addOperands({lb, ub, step}); Region *bodyRegion = result.addRegion(); ForOp::ensureTerminator(*bodyRegion, *builder, result.location); @@ -125,7 +125,7 @@ static ParseResult parseForOp(OpAsmParser &parser, OperationState &result) { Region &ForOp::getLoopBody() { return region(); } -bool ForOp::isDefinedOutsideOfLoop(ValuePtr value) { +bool ForOp::isDefinedOutsideOfLoop(Value value) { return !region().isAncestor(value->getParentRegion()); } @@ -135,7 +135,7 @@ LogicalResult ForOp::moveOutOfLoop(ArrayRef<Operation *> ops) { return success(); } -ForOp mlir::loop::getForInductionVarOwner(ValuePtr val) { +ForOp mlir::loop::getForInductionVarOwner(Value val) { auto ivArg = val.dyn_cast<BlockArgument>(); if (!ivArg) return ForOp(); @@ -148,7 +148,7 @@ ForOp mlir::loop::getForInductionVarOwner(ValuePtr val) { // IfOp //===----------------------------------------------------------------------===// -void IfOp::build(Builder *builder, OperationState &result, ValuePtr cond, +void IfOp::build(Builder *builder, OperationState &result, Value cond, bool withElseRegion) { result.addOperands(cond); Region *thenRegion = result.addRegion(); |