[PATCH] D103948: [llvm] Make Sequence reverse-iterable

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 01:41:00 PDT 2021


gchatelet created this revision.
gchatelet added reviewers: mehdi_amini, Quuxplusone.
Herald added subscribers: ormris, dcaballe, cota, mravishankar, teijeong, dexonsmith, rdzhabarov, tatianashp, jdoerfert, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, steven_wu, hiraditya.
Herald added a reviewer: rriddle.
Herald added a reviewer: aartbik.
gchatelet requested review of this revision.
Herald added a reviewer: nicolasvasilache.
Herald added subscribers: llvm-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: MLIR, LLVM.

This is a roll forward of D102679 <https://reviews.llvm.org/D102679>.
This patch simplifies the implementation of Sequence and makes it compatible with llvm::reverse.
It exposes the reverse iterators through rbegin/rend which prevents a dangling reference in std::reverse_iterator::operator++().

Note: Compared to D102679 <https://reviews.llvm.org/D102679>, this patch introduces a `asSmallVector()` member function and fixes compilation issue with GCC 5.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103948

Files:
  llvm/include/llvm/ADT/Sequence.h
  llvm/unittests/ADT/SequenceTest.cpp
  mlir/include/mlir/IR/BuiltinAttributes.td
  mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp
  mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103948.350816.patch
Type: text/x-patch
Size: 11955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210609/0437e23d/attachment.bin>


More information about the llvm-commits mailing list