Go to file
Patrick Palka 361e32eeaa libstdc++: Rearrange some range adaptors' data members
Since the standard range adaptors are specified to derive from the empty
class view_base, having their first data member store the underlying
view is suboptimal, for if the underlying view also derives from
view_base then the two view_base subobjects will be adjacent; this
prevents the compiler from applying the empty base optimization to elide
away the storage for these two empty bases.

This patch improves the situation by declaring the _M_base data member
last instead of first in each range adaptor that has more than one data
member, so that the empty base optimization can apply in more cases.

libstdc++-v3/ChangeLog:

	* include/std/ranges (filter_view): Declare the data member
	_M_base last instead of first, and adjust constructors' member
	initializer lists accordingly.
	(transform_view): Likewise.
	(take_view): Likewise.
	(take_while_view): Likewise.
	(drop_view): Likewise.
	(drop_while_view): Likewise.
	(join_view): Likewise.
	(split_view): Likewise (and tweak nearby formatting).
	(reverse_view): Likewise.
	* testsuite/std/ranges/adaptors/sizeof.cc: Update expected
	sizes.
2020-09-28 12:05:32 -04:00
config Fixup config/ChangeLog. 2020-09-10 10:17:51 +02:00
contrib Daily bump. 2020-09-22 00:16:31 +00:00
fixincludes Daily bump. 2020-09-27 00:16:24 +00:00
gcc rs6000: Add tests for _mm_insert_epi{8,32,64} 2020-09-28 08:11:52 -05:00
gnattools
gotools
include Daily bump. 2020-09-25 00:16:27 +00:00
INSTALL
intl
libada
libatomic Daily bump. 2020-09-28 00:16:21 +00:00
libbacktrace Daily bump. 2020-09-24 00:16:31 +00:00
libcc1 Daily bump. 2020-09-26 00:16:25 +00:00
libcpp Daily bump. 2020-09-27 00:16:24 +00:00
libdecnumber
libffi Daily bump. 2020-09-25 00:16:27 +00:00
libgcc aarch64: Add HF routines to libgcc_s.so 2020-09-28 11:26:53 +01:00
libgfortran Daily bump. 2020-09-28 00:16:21 +00:00
libgo runtime: remove __go_ptrace on AIX 2020-09-24 11:31:12 -07:00
libgomp Daily bump. 2020-09-28 00:16:21 +00:00
libhsail-rt
libiberty Daily bump. 2020-09-25 00:16:27 +00:00
libitm
libobjc
liboffloadmic
libphobos Daily bump. 2020-09-11 00:16:28 +00:00
libquadmath
libsanitizer Daily bump. 2020-09-22 00:16:31 +00:00
libssp
libstdc++-v3 libstdc++: Rearrange some range adaptors' data members 2020-09-28 12:05:32 -04:00
libvtv
lto-plugin Daily bump. 2020-09-11 00:16:28 +00:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2020-09-19 00:16:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Add myself for write after approval. 2020-09-18 15:31:46 +01:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.