summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Quantizer
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Quantizer')
-rw-r--r--mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp2
-rw-r--r--mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp2
-rw-r--r--mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp14
3 files changed, 9 insertions, 9 deletions
diff --git a/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp b/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
index d38c76255f0..13fed0f9b1c 100644
--- a/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
+++ b/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
@@ -102,7 +102,7 @@ void CAGSlice::enumerateImpliedConnections(
std::vector<std::pair<CAGAnchorNode *, CAGAnchorNode *>> impliedPairs;
for (auto &resultAnchorPair : resultAnchors) {
CAGResultAnchor *resultAnchor = resultAnchorPair.second;
- Value *resultValue = resultAnchor->getValue();
+ ValuePtr resultValue = resultAnchor->getValue();
for (auto &use : resultValue->getUses()) {
Operation *operandOp = use.getOwner();
unsigned operandIdx = use.getOperandNumber();
diff --git a/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp b/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
index a32bb2c9b3c..a3cbe214040 100644
--- a/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
+++ b/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
@@ -74,7 +74,7 @@ void AddDefaultStatsPass::runWithConfig(SolverContext &solverContext,
auto func = getFunction();
// Insert stats for each argument.
- for (auto *arg : func.getArguments()) {
+ for (auto arg : func.getArguments()) {
if (!config.isHandledType(arg->getType()))
continue;
OpBuilder b(func.getBody());
diff --git a/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp b/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
index 511df0a463f..68c263bc423 100644
--- a/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
+++ b/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
@@ -181,17 +181,17 @@ void InferQuantizedTypesPass::runWithConfig(SolverContext &solverContext,
void InferQuantizedTypesPass::transformOperandType(CAGOperandAnchor *anchor,
Type newType) {
- Value *inputValue = anchor->getValue();
+ ValuePtr inputValue = anchor->getValue();
Operation *op = anchor->getOp();
OpBuilder b(op->getBlock(), Block::iterator(op));
- SmallVector<Value *, 1> removeValuesIfDead;
+ SmallVector<ValuePtr, 1> removeValuesIfDead;
// Because we've already run the result transforms at this phase, it is
// very likely that inputValue points to a dcast op whose input matches
// our type. We detect that situation and route around just to save some
// bulk in the IR.
- Value *newTypedInputValue = inputValue;
+ ValuePtr newTypedInputValue = inputValue;
auto inputDcastOp =
dyn_cast_or_null<DequantizeCastOp>(inputValue->getDefiningOp());
if (inputDcastOp && inputDcastOp.arg()->getType() == newType) {
@@ -228,7 +228,7 @@ void InferQuantizedTypesPass::transformOperandType(CAGOperandAnchor *anchor,
break;
}
- for (Value *removeValueIfDead : removeValuesIfDead) {
+ for (ValuePtr removeValueIfDead : removeValuesIfDead) {
if (removeValueIfDead->use_empty()) {
removeValueIfDead->getDefiningOp()->erase();
}
@@ -237,12 +237,12 @@ void InferQuantizedTypesPass::transformOperandType(CAGOperandAnchor *anchor,
void InferQuantizedTypesPass::transformResultType(CAGResultAnchor *anchor,
Type newType) {
- Value *origResultValue = anchor->getValue();
+ ValuePtr origResultValue = anchor->getValue();
Operation *op = origResultValue->getDefiningOp();
OpBuilder b(op->getBlock(), ++Block::iterator(op));
- Value *replacedResultValue = nullptr;
- Value *newResultValue = nullptr;
+ ValuePtr replacedResultValue = nullptr;
+ ValuePtr newResultValue = nullptr;
switch (anchor->getTypeTransformRule()) {
case CAGAnchorNode::TypeTransformRule::Direct:
origResultValue->setType(newType);
OpenPOWER on IntegriCloud