aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-09-16 16:30:02 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-11-08 17:35:15 +0000
commit9d549401ae8ab334c8cba1c1339dbd3c8e695685 (patch)
tree871bdaa17e2c143edf9f663aa2d3d450e5ac2aa0 /gcc
parent3f1519eef5cbdcea2f18445852f5482798e3936a (diff)
downloadgcc-9d549401ae8ab334c8cba1c1339dbd3c8e695685.zip
gcc-9d549401ae8ab334c8cba1c1339dbd3c8e695685.tar.gz
gcc-9d549401ae8ab334c8cba1c1339dbd3c8e695685.tar.bz2
libstdc++: Add always_inline to most allocator functions
This reduces the abstraction penalty for allocator support in unoptimized code. Constructing and using allocators in containers calls many one-line (or completely empty) inline functions. Those can all be inlined to reduce code size and function call overhead for -O0. libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h (allocator_traits): Add always_inline attribute to all member functions. (__do_alloc_on_copy, __alloc_on_copy, __do_alloc_on_move) (__alloc_on_move, __do_alloc_on_swap, __alloc_on_swap) (_Destroy(FwdIter, FwdIter, allocator<T>&)): : Add always_inline attribute. * include/bits/allocator.h (allocator): Add always_inline attribute to all member functions and equality operators. * include/bits/new_allocator.h (__new_allocator): Likewise. * include/ext/alloc_traits.h (__gnu_cxx::__alloc_traits): Likewise.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions