Skip to content

Commit

Permalink
clang tidy/format
Browse files Browse the repository at this point in the history
  • Loading branch information
nsmithtt committed Feb 27, 2025
1 parent e7993d9 commit 7b686f4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Dialect/TTIR/Transforms/GenericLinearizeMemref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ namespace mlir::tt::ttir {
#include "ttmlir/Dialect/TTIR/Transforms/Passes.h.inc"

namespace {
class TTIRGenericLinearizeMemrefRewriter
: public OpRewritePattern<GenericOp> {
class TTIRGenericLinearizeMemrefRewriter : public OpRewritePattern<GenericOp> {
public:
using OpRewritePattern<GenericOp>::OpRewritePattern;

Expand All @@ -38,8 +37,8 @@ class TTIRGenericLinearizeMemrefRewriter
}

static mlir::AffineMap linearizeAffineMap(::mlir::MLIRContext *context,
mlir::AffineMap map,
ArrayRef<int64_t> shape) {
mlir::AffineMap map,
ArrayRef<int64_t> shape) {
auto evaledShape = ttmlir::utils::evalShape(map, shape);
mlir::AffineExpr indexing = getAffineConstantExpr(0, context);
mlir::AffineExpr volumeExpr = getAffineConstantExpr(1, context);
Expand Down Expand Up @@ -80,7 +79,7 @@ class TTIRGenericLinearizeMemrefRewriter
arg.getLoc(), arg, collapsedDims);
rewriter.replaceAllUsesExcept(arg, linearizedArg->getResult(0),
linearizedArg);
for (auto user : linearizedArg->getUsers()) {
for (auto *user : linearizedArg->getUsers()) {
if (auto load = mlir::dyn_cast<affine::AffineLoadOp>(user)) {
load.setMap(linearMap.compose(load.getMap()));
} else if (auto store = mlir::dyn_cast<affine::AffineStoreOp>(user)) {
Expand Down

0 comments on commit 7b686f4

Please sign in to comment.