From: Mehdi Amini Date: Thu, 22 Dec 2022 22:30:51 +0000 (+0000) Subject: Apply clang-tidy fixes for readability-identifier-naming in TestBackwardDataFlowAnaly... X-Git-Tag: upstream/17.0.6~22265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ede7cf842e1ce83bab98e85d3711fa5c104df5b;p=platform%2Fupstream%2Fllvm.git Apply clang-tidy fixes for readability-identifier-naming in TestBackwardDataFlowAnalysis.cpp (NFC) --- diff --git a/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp b/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp index c326fd2..a9ed3efe 100644 --- a/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp +++ b/mlir/test/lib/Analysis/DataFlow/TestBackwardDataFlowAnalysis.cpp @@ -31,11 +31,11 @@ struct WrittenTo : public AbstractSparseLattice { os << "]"; } ChangeResult addWrites(const SetVector &writes) { - int size_before = this->writes.size(); + int sizeBefore = this->writes.size(); this->writes.insert(writes.begin(), writes.end()); - int size_after = this->writes.size(); - return size_before == size_after ? ChangeResult::NoChange - : ChangeResult::Change; + int sizeAfter = this->writes.size(); + return sizeBefore == sizeAfter ? ChangeResult::NoChange + : ChangeResult::Change; } ChangeResult meet(const AbstractSparseLattice &other) override { const auto *rhs = reinterpret_cast(&other); @@ -64,9 +64,9 @@ void WrittenToAnalysis::visitOperation(Operation *op, ArrayRef operands, ArrayRef results) { if (auto store = dyn_cast(op)) { - SetVector new_writes; - new_writes.insert(op->getAttrOfType("tag_name")); - propagateIfChanged(operands[0], operands[0]->addWrites(new_writes)); + SetVector newWrites; + newWrites.insert(op->getAttrOfType("tag_name")); + propagateIfChanged(operands[0], operands[0]->addWrites(newWrites)); return; } // By default, every result of an op depends on every operand. for (const WrittenTo *r : results) { @@ -80,11 +80,11 @@ void WrittenToAnalysis::visitOperation(Operation *op, void WrittenToAnalysis::visitBranchOperand(OpOperand &operand) { // Mark branch operands as "brancharg%d", with %d the operand number. WrittenTo *lattice = getLatticeElement(operand.get()); - SetVector new_writes; - new_writes.insert( + SetVector newWrites; + newWrites.insert( StringAttr::get(operand.getOwner()->getContext(), "brancharg" + Twine(operand.getOperandNumber()))); - propagateIfChanged(lattice, lattice->addWrites(new_writes)); + propagateIfChanged(lattice, lattice->addWrites(newWrites)); } } // end anonymous namespace