diff options
| author | River Riddle <riverriddle@google.com> | 2020-01-11 08:54:04 -0800 |
|---|---|---|
| committer | River Riddle <riverriddle@google.com> | 2020-01-11 08:54:39 -0800 |
| commit | 2bdf33cc4c733342fc83081bc7410ac5e9a24f55 (patch) | |
| tree | 3306d769c2bbabda1060928e0cea79d021ea9da2 /mlir/lib/Dialect/FxpMathOps/Transforms | |
| parent | 1d641daf260308815d014d1bf1b424a1ed1e7277 (diff) | |
| download | bcm5719-llvm-2bdf33cc4c733342fc83081bc7410ac5e9a24f55.tar.gz bcm5719-llvm-2bdf33cc4c733342fc83081bc7410ac5e9a24f55.zip | |
[mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is properly value-typed.
Summary: These were temporary methods used to simplify the transition.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D72548
Diffstat (limited to 'mlir/lib/Dialect/FxpMathOps/Transforms')
| -rw-r--r-- | mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp | 10 | ||||
| -rw-r--r-- | mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp b/mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp index df6015de1b9..1dfa2460b61 100644 --- a/mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp +++ b/mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp @@ -47,8 +47,8 @@ static Value emitUniformPerLayerDequantize(Location loc, Value input, return nullptr; } - Type storageType = elementType.castToStorageType(input->getType()); - Type realType = elementType.castToExpressedType(input->getType()); + Type storageType = elementType.castToStorageType(input.getType()); + Type realType = elementType.castToExpressedType(input.getType()); Type intermediateType = castElementType(storageType, IntegerType::get(32, rewriter.getContext())); assert(storageType && "cannot cast to storage type"); @@ -90,7 +90,7 @@ emitUniformPerAxisDequantize(Location loc, Value input, static Value emitDequantize(Location loc, Value input, PatternRewriter &rewriter) { - Type inputType = input->getType(); + Type inputType = input.getType(); QuantizedType qElementType = QuantizedType::getQuantizedElementType(inputType); if (auto uperLayerElementType = @@ -113,8 +113,8 @@ struct UniformDequantizePattern : public OpRewritePattern<DequantizeCastOp> { PatternMatchResult matchAndRewrite(DequantizeCastOp op, PatternRewriter &rewriter) const override { - Type inputType = op.arg()->getType(); - Type outputType = op.getResult()->getType(); + Type inputType = op.arg().getType(); + Type outputType = op.getResult().getType(); QuantizedType inputElementType = QuantizedType::getQuantizedElementType(inputType); diff --git a/mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h b/mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h index 8cea97c693c..5eb7492c424 100644 --- a/mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h +++ b/mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h @@ -53,11 +53,11 @@ struct UniformBinaryOpInfo { UniformBinaryOpInfo(Operation *op, Value lhs, Value rhs, Optional<APFloat> clampMin, Optional<APFloat> clampMax) : op(op), lhs(lhs), rhs(rhs), clampMin(clampMin), clampMax(clampMax), - lhsType(getUniformElementType(lhs->getType())), - rhsType(getUniformElementType(rhs->getType())), + lhsType(getUniformElementType(lhs.getType())), + rhsType(getUniformElementType(rhs.getType())), resultType(getUniformElementType(*op->result_type_begin())), - lhsStorageType(quant::QuantizedType::castToStorageType(lhs->getType())), - rhsStorageType(quant::QuantizedType::castToStorageType(rhs->getType())), + lhsStorageType(quant::QuantizedType::castToStorageType(lhs.getType())), + rhsStorageType(quant::QuantizedType::castToStorageType(rhs.getType())), resultStorageType( quant::QuantizedType::castToStorageType(*op->result_type_begin())) { } |

