Skip to content

Commit

Permalink
fix warnings in link_with function in convert to air pass (Xilinx#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvedhmeshram authored Mar 11, 2024
1 parent b332bc0 commit ba8d563
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mlir/lib/Conversion/ConvertToAIRPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,7 @@ void InsertEmptyLaunchOverHerd(air::HerdOp op) {
// Walk through all the func.call operations (immediate/nested children)
// within parallel loop. Currently we only assume and enforce that we relay
// `link_with` information from just one func.call op.
static LogicalResult propagateLinkWith(Operation *op, air::HerdOp herdOp) {
static void propagateLinkWith(Operation *op, air::HerdOp herdOp) {
auto moduleOp = op->getParentOfType<ModuleOp>();
op->walk([&](func::CallOp callOp) {
// Fetch name.
Expand All @@ -1884,7 +1884,6 @@ static LogicalResult propagateLinkWith(Operation *op, air::HerdOp herdOp) {
herdOp->setAttr("link_with", fnDecl->getAttr("link_with"));
return WalkResult::interrupt();
});
return success();
}

class ScfParToHerdConversion : public OpRewritePattern<scf::ParallelOp> {
Expand Down Expand Up @@ -1966,7 +1965,6 @@ class ScfParToHerdConversion : public OpRewritePattern<scf::ParallelOp> {
rewriter.create<arith::ConstantIndexOp>(loc, bounds[idx0]),
rewriter.create<arith::ConstantIndexOp>(loc, bounds[idx1])};
auto herdOp = rewriter.create<air::HerdOp>(op.getLoc(), dims, args);
auto moduleOp = SymbolTable::getNearestSymbolTable(op);
auto &body = op.getBody()->getOperations();

propagateLinkWith(op, herdOp);
Expand Down

0 comments on commit ba8d563

Please sign in to comment.