@@ -469,8 +469,8 @@ struct MergeAssumingAllOps : public OpRewritePattern<AssumingAllOp> {
469
469
SmallVector<Value> operands;
470
470
471
471
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 ());
474
474
else
475
475
operands.push_back (operand);
476
476
}
@@ -530,8 +530,8 @@ struct AssumingAllOfCstrBroadcastable : public OpRewritePattern<AssumingAllOp> {
530
530
// Collect shapes checked by `cstr_broadcastable` operands.
531
531
SmallVector<std::pair<CstrBroadcastableOp, DenseSet<Value>>> shapes;
532
532
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 ));
535
535
}
536
536
537
537
// Sort by the number of shape operands (larger to smaller).
@@ -543,7 +543,7 @@ struct AssumingAllOfCstrBroadcastable : public OpRewritePattern<AssumingAllOp> {
543
543
// shape operands, and remove redundant `cst_broadcastable` operations. We
544
544
// do this until we find a set of `cst_broadcastable` operations with
545
545
// non-overlapping constraints.
546
- SmallVector<CstrBroadcastableOp> marked_for_erase ;
546
+ SmallVector<CstrBroadcastableOp> markedForErase ;
547
547
548
548
for (unsigned i = 0 ; i < shapes.size (); ++i) {
549
549
auto isSubset = [&](auto pair) {
@@ -553,24 +553,24 @@ struct AssumingAllOfCstrBroadcastable : public OpRewritePattern<AssumingAllOp> {
553
553
// Keep redundant `cstr_broadcastable` operations to be erased.
554
554
auto *it = std::remove_if (shapes.begin () + i + 1 , shapes.end (), isSubset);
555
555
for (auto *it0 = it; it0 < shapes.end (); ++it0)
556
- marked_for_erase .push_back (it0->first );
556
+ markedForErase .push_back (it0->first );
557
557
shapes.erase (it, shapes.end ());
558
558
}
559
559
560
560
// We didn't find any operands that could be removed.
561
- if (marked_for_erase .empty ())
561
+ if (markedForErase .empty ())
562
562
return failure ();
563
563
564
564
// Collect non-overlapping `cst_broadcastable` constraints.
565
- SmallVector<Value> unique_constraints ;
565
+ SmallVector<Value> uniqueConstraints ;
566
566
for (auto &shape : shapes)
567
- unique_constraints .push_back (shape.first .getResult ());
567
+ uniqueConstraints .push_back (shape.first .getResult ());
568
568
569
569
// Replace with a new `assuming_all` operation ...
570
- rewriter.replaceOpWithNewOp <AssumingAllOp>(op, unique_constraints );
570
+ rewriter.replaceOpWithNewOp <AssumingAllOp>(op, uniqueConstraints );
571
571
572
572
// ... and maybe erase `cstr_broadcastable` ops without uses.
573
- for (auto &op : marked_for_erase )
573
+ for (auto &op : markedForErase )
574
574
if (op->use_empty ())
575
575
rewriter.eraseOp (op);
576
576
0 commit comments