4adfcea0a1
Currently the __builtin_clear_padding expansion code emits no code for full words that don't have any padding bits, and most of the time if the only padding bytes are from the start of the word it attempts to merge them with previous padding store (via {}) or if the only padding bytes are from the end of the word, it attempts to merge it with following padding bytes. For everything else it was using a RMW, except when it found an aligned char/short/int covering all the padding bytes and all those padding bytes were all ones in that store. The following patch changes it, such that we only use RMW if the padding has any bytes which have some padding and some non-padding bits (i.e. bitfields are involved), often it is the same amount of instructions in the end and avoids being thread-unsafe unless necessary (and avoids having to wait for the reads to make it into the CPU). So, if there are no bitfields, the function will just store some zero bytes, shorts, ints, long longs etc. where needed. 2020-11-24 Jakub Jelinek <jakub@redhat.com> * gimple-fold.c (clear_padding_flush): If a word contains only 0 or 0xff bytes of padding other than all set, all clear, all set followed by all clear or all clear followed by all set, don't emit a RMW operation on the whole word or parts of it, but instead clear the individual bytes of padding. For paddings of one byte size, don't use char[1] and {}, but instead just char and 0. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
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 | ||
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.