Go to file
Bernd Schmidt 36b85e4328 re PR tree-optimization/52171 (memcmp/strcmp/strncmp can be optimized when the result is tested for [in]equality with 0)
PR tree-optimization/52171
        * builtins.c (expand_cmpstrn_or_cmpmem): Delete, moved elsewhere.
        (expand_builtin_memcmp): New arg RESULT_EQ.  All callers changed.
        Look for constant strings.  Move some code to emit_block_cmp_hints
        and use it.
        * builtins.def (BUILT_IN_MEMCMP_EQ): New.
        * defaults.h (COMPARE_MAX_PIECES): New macro.
        * expr.c (move_by_pieces_d, store_by_pieces_d): Remove old structs.
        (move_by_pieces_1, store_by_pieces_1, store_by_pieces_2): Remvoe.
        (clear_by_pieces_1): Don't declare.  Move definition before use.
        (can_do_by_pieces): New static function.
        (can_move_by_pieces): Use it.  Return bool.
        (by_pieces_ninsns): Renamed from move_by_pieces_ninsns.  New arg
        OP.  All callers changed.  Handle COMPARE_BY_PIECES.
        (class pieces_addr); New.
        (pieces_addr::pieces_addr, pieces_addr::decide_autoinc,
        pieces_addr::adjust, pieces_addr::increment_address,
        pieces_addr::maybe_predec, pieces_addr::maybe_postinc): New member
        functions for it.
        (class op_by_pieces_d): New.
        (op_by_pieces_d::op_by_pieces_d, op_by_pieces_d::run): New member
        functions for it.
        (class move_by_pieces_d, class compare_by_pieces_d,
        class store_by_pieces_d): New subclasses of op_by_pieces_d.
        (move_by_pieces_d::prepare_mode, move_by_pieces_d::generate,
        move_by_pieces_d::finish_endp, store_by_pieces_d::prepare_mode,
        store_by_pieces_d::generate, store_by_pieces_d::finish_endp,
        compare_by_pieces_d::generate, compare_by_pieces_d::prepare_mode,
        compare_by_pieces_d::finish_mode): New member functions.
        (compare_by_pieces, emit_block_cmp_via_cmpmem): New static
        functions.
        (expand_cmpstrn_or_cmpmem): Moved here from builtins.c.
        (emit_block_cmp_hints): New function.
        (move_by_pieces, store_by_pieces, clear_by_pieces): Rewrite to just
        use the newly defined classes.
        * expr.h (by_pieces_constfn): New typedef.
        (can_store_by_pieces, store_by_pieces): Use it in arg declarations.
        (emit_block_cmp_hints, expand_cmpstrn_or_cmpmem): Declare.
        (move_by_pieces_ninsns): Don't declare.
        (can_move_by_pieces): Change return value to bool.
        * target.def (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Update docs.
        (compare_by_pieces_branch_ratio): New hook.
        * target.h (enum by_pieces_operation): Add COMPARE_BY_PIECES.
        (by_pieces_ninsns): Declare.
        * targethooks.c (default_use_by_pieces_infrastructure_p): Handle
        COMPARE_BY_PIECES.
        (default_compare_by_pieces_branch_ratio): New function.
        * targhooks.h (default_compare_by_pieces_branch_ratio): Declare.
        * doc/tm.texi.in (STORE_MAX_PIECES, COMPARE_MAX_PIECES): Document.
        * doc/tm.texi: Regenerate.
        * tree-ssa-strlen.c: Include "builtins.h".
        (handle_builtin_memcmp): New static function.
        (strlen_optimize_stmt): Call it for BUILT_IN_MEMCMP.
        * tree.c (build_common_builtin_nodes): Create __builtin_memcmp_eq.

testsuite/
        PR tree-optimization/52171
        * gcc.dg/pr52171.c: New test.
        * gcc.target/i386/pr52171.c: New test.

From-SVN: r237069
2016-06-03 14:20:53 +00:00
INSTALL
boehm-gc
config config.guess: Remove SH5 support. 2016-04-30 09:11:03 +00:00
contrib Make analyze_brprob.py executable. 2016-05-31 08:52:31 +00:00
fixincludes
gcc re PR tree-optimization/52171 (memcmp/strcmp/strncmp can be optimized when the result is tested for [in]equality with 0) 2016-06-03 14:20:53 +00:00
gnattools configure.ac: Add ACX_NONCANONICAL_HOST. 2016-05-16 08:55:12 +00:00
gotools
include gomp-constants.h (GOMP_VERSION): Increment to 1... 2016-05-26 09:12:59 +00:00
intl
libada config.guess: Remove SH5 support. 2016-04-30 09:11:03 +00:00
libatomic [libatomic] Add missing files for RTEMS support 2016-05-10 06:52:48 +00:00
libbacktrace re PR target/71161 (Lots of ASAN and libgo runtime FAILs after r236090) 2016-05-18 16:40:54 +02:00
libcc1 tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. 2016-04-18 20:36:27 +00:00
libcilkrts configure.ac: Move AC_USE_SYSTEM_EXTENSIONS behind AM_ENABLE_MULTILIB. 2016-05-10 16:44:19 +00:00
libcpp c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. 2016-06-01 16:42:41 +00:00
libdecnumber
libffi [PR libffi/65567] libffi: Fix, and simply libffi_feature_test 2016-05-23 16:54:04 +02:00
libgcc On behalf of Aaron Conole <aconole@redhat.com> 2016-06-02 12:22:01 +00:00
libgfortran re PR libfortran/71123 (Namelist read failure on Windows) 2016-05-24 06:16:00 +00:00
libgo cmd/go: bring in final version of gccgo pkg-config support 2016-04-23 00:41:03 +00:00
libgomp re PR c/70688 (bogus OpenACC data clause errors involving reductions) 2016-06-01 13:37:44 -07:00
libiberty Don't needlessly clear xmemdup allocated memory. 2016-05-31 20:38:54 +09:30
libitm Allocate memory on cache line if requested 2016-04-19 10:01:11 -07:00
libjava libtool-version: Bump soversion. 2016-06-01 20:10:48 +00:00
libmpx
libobjc
liboffloadmic target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
libquadmath
libsanitizer re PR sanitizer/71160 (libasan: Backport support for malloc within dlsym) 2016-05-17 11:17:54 +02:00
libssp
libstdc++-v3 backwards_compatibility.xml: Adjust lists.debian.org link to https. 2016-05-29 08:03:35 +00:00
libvtv Don't install libvtv without --enable-vtable-verify 2016-05-02 18:10:17 +00:00
lto-plugin
maintainer-scripts * crontab: Enable snapshots from gcc-6-branch. 2016-04-15 17:33:15 +02:00
zlib
.dir-locals.el
.gitattributes add basic .gitattributes files to notice whitespace issues 2016-04-23 02:37:43 +00:00
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog * MAINTAINERS (Write After Approval): Add myself. 2016-06-03 10:35:24 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS * MAINTAINERS (Write After Approval): Add myself. 2016-06-03 10:35:24 +02:00
Makefile.def configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
Makefile.in Add dependencies to configure rule 2016-05-28 22:38:47 +09:30
Makefile.tpl Add dependencies to configure rule 2016-05-28 22:38:47 +09:30
README
compile
config-ml.in
config.guess config.guess: Import version 2016-04-02 (newest). 2016-05-16 16:13:37 -06:00
config.rpath
config.sub config.guess: Import version 2016-04-02 (newest). 2016-05-16 16:13:37 -06:00
configure configure.ac: Add ARC support to libgloss. 2016-05-16 14:37:43 -06:00
configure.ac configure.ac: Add ARC support to libgloss. 2016-05-16 14:37:43 -06:00
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
symlink-tree
ylwrap

README

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.