Skip to content

Commit

Permalink
Coverity fixes (#922)
Browse files Browse the repository at this point in the history
* Coverity fixes
* Update SubviewOp.cpp
* Update BlockingAnalysis.h
* Update WgToSg.cpp
* Update SubviewOp.cpp - pre-commit
  • Loading branch information
Garra1980 authored Oct 11, 2024
1 parent 15c3691 commit 0fc4bb2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/Dialect/Dist/Transforms/DistCoalesce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ struct DistCoalescePass
loc, nProcs, pRank, _sizes);
tOffs = defPart.getLOffsets();
tSizes = defPart.getLShape();
bbIPnt = defPart;
auto nop = updateTargetPart(builder, e, tOffs, tSizes);
assert(!nop);
}
Expand Down
2 changes: 0 additions & 2 deletions lib/Dialect/NDArray/IR/SubviewOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,6 @@ findImmutableInsertSliceSource(::imex::ndarray::ImmutableInsertSliceOp iisOp,
laterOffs.emplace_back(iisOffs);
laterSizes.emplace_back(iisSizes);
};

return {};
}
} // namespace

Expand Down
1 change: 1 addition & 0 deletions lib/Dialect/XeTile/Transforms/BlockingAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class BlockingAnalysis {
public:
explicit BlockingAnalysis(std::shared_ptr<XeuArchInterface> uArch) {
this->uArch = uArch;
this->target = nullptr;
};

mlir::LogicalResult run(mlir::Operation *op);
Expand Down
2 changes: 1 addition & 1 deletion lib/Dialect/XeTile/Transforms/WgToSg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class WGToSGArithConstantOpPattern
value.value_end<mlir::Attribute>());

llvm::SmallVector<mlir::Attribute> newValues;
for (int64_t i = 0; i < sgData[0] * sgData[1]; i++) {
for (int64_t i = 0; i < static_cast<int64_t>(sgData[0]) * sgData[1]; i++) {
newValues.push_back(elems[i]);
}

Expand Down

0 comments on commit 0fc4bb2

Please sign in to comment.