[PATCH] D47604: [Polly] Add isl C++ list iterators

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 03:25:15 PDT 2018


philip.pfaffe added a comment.

In https://reviews.llvm.org/D47604#1120577, @bollu wrote:

> This might be too much to ask for, but is it possible to `report_fatal_error()` at the earliest when accessing out of bounds using the iterator? If ISL performs inbounds checks, then disregard this.


Actually I'd prefer not to report an error here at all, at least not outside of `LLVM_DEBUG`. Dereferencing a past-the-end iterator is UB.

> When did we settle on getting a list out of a set, map, etc. and then iterating over the list?

This is not as simple as it looks, since a `union_set` doesn't allow you to enumerate or access the individual sets. So you can choose between `USet.get_set_list()` or something like `range(USet)` which returns an appropriate iterator range that holds the list.


Repository:
  rPLO Polly

https://reviews.llvm.org/D47604





More information about the llvm-commits mailing list