[libcxx-commits] [PATCH] D100730: [libc++] Simplify debug iterators, and fix a couple of non-explicit constructors.

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 19 09:01:25 PDT 2021


EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.

I would need to see analysis of the cost of always passing an additional parameter to these iterators constructors before I approve this.



================
Comment at: libcxx/include/list:297
     _LIBCPP_INLINE_VISIBILITY
     explicit __list_iterator(__link_pointer __p, const void* __c) _NOEXCEPT
         : __ptr_(__p)
----------------
We're now always passing another parameter to the constructor, eating a register.
We don't want to pay that cost in non-debug mode.

There was a reason this code was written in this ugly manner.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100730/new/

https://reviews.llvm.org/D100730



More information about the libcxx-commits mailing list