Go to file
H.J. Lu 087146caa7 Extend STV pass to 64-bit mode
128-bit SSE load and store instructions can be used for load and store
of 128-bit integers if they are the only operations on 128-bit integers.
To convert load and store of 128-bit integers to 128-bit SSE load and
store, the original STV pass, which is designed to convert 64-bit integer
operations to SSE2 operations in 32-bit mode, is extended to 64-bit mode
in the following ways:

1. Class scalar_chain is turned into base class.  The 32-bit specific
member functions are moved to the new derived class, dimode_scalar_chain.
The new derived class, timode_scalar_chain, is added to convert oad and
store of 128-bit integers to 128-bit SSE load and store.
2. Add the 64-bit version of scalar_to_vector_candidate_p and
remove_non_convertible_regs.  Only TImode load and store are allowed
for conversion.  If one instruction on the chain of dependent
instructions aren't TImode load or store, the chain of instructions
won't be converted.
3. In 64-bit, we only convert from TImode to V1TImode, which have the
same size.  The difference is only vector registers are allowed in
TImode so that 128-bit SSE load and store instructions will be used
for load and store of 128-bit integers.
4. Put the 64-bit STV pass before the CSE pass so that instructions
changed or generated by the STV pass can be CSEed.

convert_scalars_to_vector calls free_dominance_info in 64-bit mode to
work around ICE in fwprop pass:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70807

when building libgcc on Linux/x86-64.

gcc/

	PR target/70155
	* config/i386/i386.c (scalar_to_vector_candidate_p): Renamed
	to ...
	(dimode_scalar_to_vector_candidate_p): This.
	(timode_scalar_to_vector_candidate_p): New function.
	(scalar_to_vector_candidate_p): Likewise.
	(timode_check_non_convertible_regs): Likewise.
	(timode_remove_non_convertible_regs): Likewise.
	(remove_non_convertible_regs): Likewise.
	(remove_non_convertible_regs): Renamed to ...
	(dimode_remove_non_convertible_regs): This.
	(scalar_chain::~scalar_chain): Make it virtual.
	(scalar_chain::compute_convert_gain): Make it pure virtual.
	(scalar_chain::mark_dual_mode_def): Likewise.
	(scalar_chain::convert_insn): Likewise.
	(scalar_chain::convert_registers): Likewise.
	(scalar_chain::add_to_queue): Make it protected.
	(scalar_chain::emit_conversion_insns): Likewise.
	(scalar_chain::replace_with_subreg): Likewise.
	(scalar_chain::replace_with_subreg_in_insn): Likewise.
	(scalar_chain::convert_op): Likewise.
	(scalar_chain::convert_reg): Likewise.
	(scalar_chain::make_vector_copies): Likewise.
	(scalar_chain::convert_registers): New pure virtual function.
	(class dimode_scalar_chain): New class.
	(class timode_scalar_chain): Likewise.
	(scalar_chain::mark_dual_mode_def): Renamed to ...
	(dimode_scalar_chain::mark_dual_mode_def): This.
	(timode_scalar_chain::mark_dual_mode_def): New function.
	(timode_scalar_chain::convert_insn): Likewise.
	(dimode_scalar_chain::convert_registers): Likewise.
	(scalar_chain::compute_convert_gain): Renamed to ...
	(dimode_scalar_chain::compute_convert_gain): This.
	(scalar_chain::replace_with_subreg): Renamed to ...
	(dimode_scalar_chain::replace_with_subreg): This.
	(scalar_chain::replace_with_subreg_in_insn): Renamed to ...
	(dimode_scalar_chain::replace_with_subreg_in_insn): This.
	(scalar_chain::make_vector_copies): Renamed to ...
	(dimode_scalar_chain::make_vector_copies): This.
	(scalar_chain::convert_reg): Renamed to ...
	(dimode_scalar_chain::convert_reg ): This.
	(scalar_chain::convert_op): Renamed to ...
	(dimode_scalar_chain::convert_op): This.
	(scalar_chain::convert_insn): Renamed to ...
	(dimode_scalar_chain::convert_insn): This.
	(scalar_chain::convert): Call convert_registers.
	(convert_scalars_to_vector): Change to scalar_chain pointer to
	use timode_scalar_chain in 64-bit mode and dimode_scalar_chain
	in 32-bit mode.  Delete scalar_chain pointer.  Call
	free_dominance_info in 64-bit mode.
	(pass_stv::gate): Remove TARGET_64BIT check.
	(ix86_option_override): Put the 64-bit STV pass before the CSE
	pass.

gcc/testsuite/

	PR target/70155
	* gcc.target/i386/pr55247-2.c: Updated to check movti_internal
	and movv1ti_internal patterns
	* gcc.target/i386/pr70155-1.c: New test.
	* gcc.target/i386/pr70155-2.c: Likewise.
	* gcc.target/i386/pr70155-3.c: Likewise.
	* gcc.target/i386/pr70155-4.c: Likewise.
	* gcc.target/i386/pr70155-5.c: Likewise.
	* gcc.target/i386/pr70155-6.c: Likewise.
	* gcc.target/i386/pr70155-7.c: Likewise.
	* gcc.target/i386/pr70155-8.c: Likewise.
	* gcc.target/i386/pr70155-9.c: Likewise.
	* gcc.target/i386/pr70155-10.c: Likewise.
	* gcc.target/i386/pr70155-11.c: Likewise.
	* gcc.target/i386/pr70155-12.c: Likewise.
	* gcc.target/i386/pr70155-13.c: Likewise.
	* gcc.target/i386/pr70155-14.c: Likewise.
	* gcc.target/i386/pr70155-15.c: Likewise.
	* gcc.target/i386/pr70155-16.c: Likewise.
	* gcc.target/i386/pr70155-17.c: Likewise.
	* gcc.target/i386/pr70155-18.c: Likewise.
	* gcc.target/i386/pr70155-19.c: Likewise.
	* gcc.target/i386/pr70155-20.c: Likewise.
	* gcc.target/i386/pr70155-21.c: Likewise.
	* gcc.target/i386/pr70155-22.c: Likewise.

From-SVN: r235518
2016-04-27 10:32:40 -07:00
boehm-gc [Hurd, kFreeBSD] boehm-gc: Use mmap instead of brk 2016-03-29 23:05:07 +02:00
config document that isl-0.16 is supported 2016-01-29 20:26:04 +00:00
contrib * gennews (files): Add files for GCC 6. 2016-04-27 09:48:34 +02:00
fixincludes re PR target/68741 (FAIL: tr1/8_c_compatibility/cstdio/functions.cc (test for excess errors)) 2016-02-01 00:54:22 +00:00
gcc Extend STV pass to 64-bit mode 2016-04-27 10:32:40 -07:00
gnattools gnattools: Clean config.cache (PR70173) 2016-04-04 18:37:58 +02:00
gotools libgo: Update to go1.6rc1. 2016-02-03 21:58:02 +00:00
include Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE 2016-03-17 16:07:54 +01:00
INSTALL
intl
libada Update copyright years. 2016-01-04 15:30:50 +01:00
libatomic [libatomic] Add RTEMS support 2016-04-27 07:14:42 +00:00
libbacktrace elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash. 2016-03-02 18:32:55 +02:00
libcc1 tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. 2016-04-18 20:36:27 +00:00
libcilkrts Compile libcilkrts with -funwind-tables (PR target/60290) 2016-04-26 08:55:02 +00:00
libcpp Regenerate .pot files. 2016-04-21 16:23:29 +01:00
libdecnumber Update copyright years. 2016-01-04 15:30:50 +01:00
libffi Summary: libffi: define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32 2016-03-17 10:47:58 +00:00
libgcc cmpd.c (__mspabi_cmpf): Add prototype. 2016-04-25 11:13:35 +00:00
libgfortran re PR libfortran/70684 (incorrect reading of values from file on Windows) 2016-04-19 19:24:28 +00:00
libgo cmd/go: bring in final version of gccgo pkg-config support 2016-04-23 00:41:03 +00:00
libgomp libgomp nvptx plugin: make cuMemFreeHost error non-fatal 2016-04-21 16:11:47 +03:00
libiberty Fix PR number in ChangeLog 2016-04-08 12:17:03 +00:00
libitm Allocate memory on cache line if requested 2016-04-19 10:01:11 -07:00
libjava Attach PR number to most recent entry. 2016-04-20 10:44:21 +10:00
libmpx libtool-version: Remove. 2016-01-21 00:17:37 +00:00
libobjc Update copyright years. 2016-01-04 15:30:50 +01:00
liboffloadmic libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_run): Pass extra NULL to GOMP_OFFLOAD_async_run. 2016-01-20 13:40:22 +00:00
libquadmath gcc.c (process_command): Update copyright notice dates. 2016-01-04 14:03:35 +01:00
libsanitizer Cherry-pick r266868 from upstream. 2016-04-21 15:19:54 +03:00
libssp re PR target/65867 (bootstrap fails for mingw32 due to missing header in ssp.c) 2016-02-09 12:16:30 -07:00
libstdc++-v3 libstdc++/70767 Define std::numeric_limits<cv T> in C++98 mode 2016-04-27 12:57:58 +01:00
libvtv
lto-plugin re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without) 2016-02-25 12:23:52 +00:00
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
ChangeLog re PR bootstrap/70704 (AIX bootstrap comparison failure) 2016-04-26 08:10:43 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure re PR bootstrap/70704 (AIX bootstrap comparison failure) 2016-04-26 08:10:43 +02:00
configure.ac re PR bootstrap/70704 (AIX bootstrap comparison failure) 2016-04-26 08:10:43 +02:00
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 Add myself as maintainer for the PowerPC port 2016-04-22 23:18:49 +02:00
Makefile.def re PR bootstrap/69134 (building a mips-cross compiler with in-tree mpfr-2.4.2 fails) 2016-01-12 15:13:02 +00:00
Makefile.in Make distclean clean up more (PR70173) 2016-04-13 20:02:08 +02:00
Makefile.tpl Make distclean clean up more (PR70173) 2016-04-13 20:02:08 +02:00
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
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.