This is an archive of the discontinued LLVM Phabricator instance.

Apply shortened printing/parsing form to linalg.reduce.
ClosedPublic

Authored by khasanovaa on Dec 23 2022, 4:53 AM.

Diff Detail

Event Timeline

khasanovaa created this revision.Dec 23 2022, 4:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 23 2022, 4:53 AM
khasanovaa requested review of this revision.Dec 23 2022, 4:53 AM
olegshyshkov accepted this revision.Dec 23 2022, 5:07 AM

Awesome! Thank you!

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
1033

You can use a range-based loop over block.getArguments().drop_back() to avoid index computations. Or maybe even llvm::copy with std::back_inserter

1034

nit: you can use here and in other places below:

block.getArgument(i)
1101

nit: getOperand(i - 1)

1101

nit: getArgument(i)

This revision is now accepted and ready to land.Dec 23 2022, 5:07 AM

Resolve comments.

Replace getArguments()[] with getArgument().

This revision was landed with ongoing or failed builds.Dec 23 2022, 5:47 AM
This revision was automatically updated to reflect the committed changes.

Looks like this added a failure to the already red mlir windows buildbot: https://lab.llvm.org/buildbot/#/builders/13/builds/30167

If you can't address this today, can you please revert it, so we don't go into the weekend with a red bot?