[PATCH] Add iterator for PHINode value/BB pair

Pete Cooper peter_cooper at apple.com
Tue Jul 21 21:20:58 PDT 2015


Thanks for all the feedback.  This is a patch which addresses all of it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: phinode.diff
Type: application/octet-stream
Size: 4028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150721/960b453c/attachment.obj>
-------------- next part --------------


*snip*
> On Jul 21, 2015, at 8:21 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> 
> 
> If you drop the requirements from `forward_iterator` to
> `input_iterator`, then you're allowed to return a `PHINodeEdge` by-value
> here instead of by-reference (unfortunately this makes it illegal to use
> a bunch of STL algorithms; STL iterator traits are completely broken
> IMO).
I’m fine with this.  David, Chandler, please let me know how you feel about this.

Also, i forgot to say that I considered doing a zip iterator and inheriting this from it.  This is something I think Chandler or David mentioned a few months ago.  If there’s been any progress in the C++ committee on that then i’m happy to try implement something better.  If not, then i don’t think what I have here should be difficult to change in future.

Pete


More information about the llvm-commits mailing list