Skip to content

Commit 03e6d10

Browse files
committed
Apply clang-tidy fixes for readability-identifier-naming to MLIR (NFC)
1 parent 51894cb commit 03e6d10

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

mlir/lib/Dialect/Shape/IR/Shape.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ struct MergeAssumingAllOps : public OpRewritePattern<AssumingAllOp> {
469469
SmallVector<Value> operands;
470470

471471
for (Value operand : op.getInputs()) {
472-
if (auto assume_all = operand.getDefiningOp<AssumingAllOp>())
473-
operands.append(assume_all.operand_begin(), assume_all->operand_end());
472+
if (auto assumeAll = operand.getDefiningOp<AssumingAllOp>())
473+
operands.append(assumeAll.operand_begin(), assumeAll->operand_end());
474474
else
475475
operands.push_back(operand);
476476
}
@@ -530,8 +530,8 @@ struct AssumingAllOfCstrBroadcastable : public OpRewritePattern<AssumingAllOp> {
530530
// Collect shapes checked by `cstr_broadcastable` operands.
531531
SmallVector<std::pair<CstrBroadcastableOp, DenseSet<Value>>> shapes;
532532
for (auto cstr : operands) {
533-
DenseSet<Value> shapes_set(cstr->operand_begin(), cstr->operand_end());
534-
shapes.emplace_back(cstr, std::move(shapes_set));
533+
DenseSet<Value> shapesSet(cstr->operand_begin(), cstr->operand_end());
534+
shapes.emplace_back(cstr, std::move(shapesSet));
535535
}
536536

537537
// Sort by the number of shape operands (larger to smaller).
@@ -543,7 +543,7 @@ struct AssumingAllOfCstrBroadcastable : public OpRewritePattern<AssumingAllOp> {
543543
// shape operands, and remove redundant `cst_broadcastable` operations. We
544544
// do this until we find a set of `cst_broadcastable` operations with
545545
// non-overlapping constraints.
546-
SmallVector<CstrBroadcastableOp> marked_for_erase;
546+
SmallVector<CstrBroadcastableOp> markedForErase;
547547

548548
for (unsigned i = 0; i < shapes.size(); ++i) {
549549
auto isSubset = [&](auto pair) {
@@ -553,24 +553,24 @@ struct AssumingAllOfCstrBroadcastable : public OpRewritePattern<AssumingAllOp> {
553553
// Keep redundant `cstr_broadcastable` operations to be erased.
554554
auto *it = std::remove_if(shapes.begin() + i + 1, shapes.end(), isSubset);
555555
for (auto *it0 = it; it0 < shapes.end(); ++it0)
556-
marked_for_erase.push_back(it0->first);
556+
markedForErase.push_back(it0->first);
557557
shapes.erase(it, shapes.end());
558558
}
559559

560560
// We didn't find any operands that could be removed.
561-
if (marked_for_erase.empty())
561+
if (markedForErase.empty())
562562
return failure();
563563

564564
// Collect non-overlapping `cst_broadcastable` constraints.
565-
SmallVector<Value> unique_constraints;
565+
SmallVector<Value> uniqueConstraints;
566566
for (auto &shape : shapes)
567-
unique_constraints.push_back(shape.first.getResult());
567+
uniqueConstraints.push_back(shape.first.getResult());
568568

569569
// Replace with a new `assuming_all` operation ...
570-
rewriter.replaceOpWithNewOp<AssumingAllOp>(op, unique_constraints);
570+
rewriter.replaceOpWithNewOp<AssumingAllOp>(op, uniqueConstraints);
571571

572572
// ... and maybe erase `cstr_broadcastable` ops without uses.
573-
for (auto &op : marked_for_erase)
573+
for (auto &op : markedForErase)
574574
if (op->use_empty())
575575
rewriter.eraseOp(op);
576576

mlir/lib/ExecutionEngine/CRunnerUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ memrefCopy(int64_t elemSize, UnrankedMemRefType<char> *srcArg,
101101
}
102102

103103
/// Prints GFLOPS rating.
104-
extern "C" void print_flops(double flops) {
104+
extern "C" void printFlops(double flops) {
105105
fprintf(stderr, "%lf GFLOPS\n", flops / 1.0E9);
106106
}
107107

0 commit comments

Comments
 (0)