[all-commits] [llvm/llvm-project] f22a57: [mlir][vector] Clean up use of `llvm::zip` in `Vec...
Jakub Kuderski via All-commits
all-commits at lists.llvm.org
Wed Nov 30 14:13:23 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f22a573b2b8afaee88001168eeeb70c77f28a03e
https://github.com/llvm/llvm-project/commit/f22a573b2b8afaee88001168eeeb70c77f28a03e
Author: Jakub Kuderski <kubak at google.com>
Date: 2022-11-30 (Wed, 30 Nov 2022)
Changed paths:
M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
Log Message:
-----------
[mlir][vector] Clean up use of `llvm::zip` in `VectorOps.cpp`
- Use `zip_equal` where iteratees are supposted to have equal lenght.
- Use `zip_first` where the first iteratee is supposed to be the
shortest.
- Use `llvm::enumerate` instead of calculating index manually.
- Use structured bindings to unpack tuples where appropriate.
- Fix a bug in a comparison in `intersectsWhereNonNegative`.
Both `zip_first` (after D138858) and `zip_equal` (introduced in D138865)
assert interatee lengths, which allows us to more precisely convey
whether we want to iterate over the common prefix (`zip`), or expect all
lengths to be the same (`zip_equal`).
Reviewed By: dcaballe, antiagainst
Differential Revision: https://reviews.llvm.org/D139022
More information about the All-commits
mailing list