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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 19 09:41:50 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/include/list:297
     _LIBCPP_INLINE_VISIBILITY
     explicit __list_iterator(__link_pointer __p, const void* __c) _NOEXCEPT
         : __ptr_(__p)
----------------
EricWF wrote:
> 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.
@EricWF: What compiler/target are you concerned about? I'm sure Clang/LLVM on x86 is smart enough to inline these inline functions — I can work on getting evidence for that — but I'm guessing you had something more obscure in mind?


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