Go to file
Richard Sandiford ab23f5d974 Add basic support for direct_optab internal functions
This patch adds a concept of internal functions that map directly to an
optab (here called "direct internal functions").  The function can only
be used if the associated optab can be used.

We currently have four functions like that:

- LOAD_LANES
- STORE_LANES
- MASK_LOAD
- MASK_STORE

so the patch converts them to the new infrastructure.  These four
all need different types of optabs, but future patches will add
regular unary and binary ones.

In general we need one or two modes to decide whether an optab is
supported, depending on whether it's a convert_optab or not.
This in turn means that we need up to two types to decide whether
an internal function is supported.  The patch records which types
are needed for each internal function, using -1 if the return type
should be used and N>=0 if the type of argument N should be used.

(LOAD_LANES and STORE_LANES are unusual in that both optab modes
come from the same array type.)

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
	* coretypes.h (tree_pair): New type.
	* internal-fn.def (DEF_INTERNAL_OPTAB_FN): New macro.  Use it
	for MASK_LOAD, LOAD_LANES, MASK_STORE and STORE_LANES.
	* internal-fn.h (direct_internal_fn_info): New structure.
	(direct_internal_fn_array): Declare.
	(direct_internal_fn_p, direct_internal_fn): New functions.
	(direct_internal_fn_types, direct_internal_fn_supported_p): Declare.
	* internal-fn.c (not_direct, mask_load_direct, load_lanes_direct)
	(mask_store_direct, store_lanes_direct): New macros.
	(direct_internal_fn_array) New array.
	(get_multi_vector_move): Return the optab handler without asserting
	that it is available.
	(expand_LOAD_LANES): Rename to...
	(expand_load_lanes_optab_fn): ...this and add an optab argument.
	(expand_STORE_LANES): Rename to...
	(expand_store_lanes_optab_fn): ...this and add an optab argument.
	(expand_MASK_LOAD): Rename to...
	(expand_mask_load_optab_fn): ...this and add an optab argument.
	(expand_MASK_STORE): Rename to...
	(expand_mask_store_optab_fn): ...this and add an optab argument.
	(direct_internal_fn_types, direct_optab_supported_p)
	(multi_vector_optab_supported_p, direct_internal_fn_supported_p)
	(direct_internal_fn_supported_p): New functions.
	(direct_mask_load_optab_supported_p): New macro.
	(direct_load_lanes_optab_supported_p): Likewise.
	(direct_mask_store_optab_supported_p): Likewise.
	(direct_store_lanes_optab_supported_p): Likewise.

From-SVN: r230473
2015-11-17 18:37:45 +00:00
INSTALL
boehm-gc Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
config libsanitizer merge from upstream r250806, compiler part. 2015-10-21 10:40:54 +03:00
contrib count-headers: Initial file. 2015-11-11 14:28:46 +00:00
fixincludes inclhack.def (aix_stdio_inline): New fix. 2015-08-14 07:17:29 -04:00
gcc Add basic support for direct_optab internal functions 2015-11-17 18:37:45 +00:00
gnattools configure.ac (*-*-dragonfly*): New configuration. 2015-06-08 07:27:56 +00:00
gotools Makefile.am (go_cmd_go_files): Update to Go 1.5.1 library by adding alldocs.go, doc.go, note.go. 2015-10-31 21:29:38 +00:00
include c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 22:20:41 +00:00
intl Makefile.def (libiconv): Define bootstrap=true. 2015-08-07 01:13:52 -04:00
libada
libatomic Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
libbacktrace posix.c (backtrace_open): Cast second argument of open() to int. 2015-09-17 13:08:04 -04:00
libcc1 hash-traits.h (free_ptr_hash): New class. 2015-06-25 17:06:24 +00:00
libcilkrts re PR target/66326 (Floating point exception with -mfpmath=387 and -fcilkplus.) 2015-11-09 10:12:34 +00:00
libcpp Source range tracking in libcpp and C FE, with bit-packing optimization 2015-11-13 16:29:59 +00:00
libdecnumber IA MCU psABI support: changes to libraries 2015-06-30 09:42:07 -07:00
libffi re PR libffi/65441 (FAIL: libffi.call/float2.c -W -Wall -Wno-psabi (test for excess errors)) 2015-10-27 00:39:32 +00:00
libgcc on_exit.c: New file. 2015-11-15 18:41:44 -05:00
libgfortran re PR libfortran/67527 (io.h sanitizer complains on 1 << 31) 2015-09-12 12:05:44 +00:00
libgo libgo: use Solaris sendfile lib, fix Solaris _in6_addr_t fields 2015-11-10 21:38:30 +00:00
libgomp priority_queue.c: New file. 2015-11-17 09:29:34 -08:00
libiberty * Makefile.in (etags tags TAGS): Use && instead of ;. 2015-11-12 19:18:54 +00:00
libitm Support sized delete. 2015-11-09 17:30:24 +00:00
libjava libjava: fix locale handling when sorting JNI methods 2015-10-26 18:32:41 +00:00
libmpx re PR other/66887 (trunk/libmpx/mpxrt/mpxrt.c:158: possible performance problem) 2015-10-15 09:26:39 +00:00
libobjc replace BITS_PER_UNIT with __CHAR_BIT__ in target libs 2015-11-07 19:36:26 +00:00
liboffloadmic omp-low.c (lower_omp_ordered): Add argument to GOMP_SMD_ORDERED_* internal calls - 0 if... 2015-11-14 19:42:13 +01:00
libquadmath Makefile.am (libquadmath_la_SOURCES): Add math/logbq.c. 2015-08-09 08:46:52 +00:00
libsanitizer Update libsanitizer obstack interceptors 2015-11-09 14:53:25 +10:30
libssp libssp: Bump to automake 1.11.6 2015-05-13 11:12:39 +00:00
libstdc++-v3 re PR libstdc++/67440 (pretty-printing of a const set<foo> fails) 2015-11-16 21:32:26 +00:00
libvtv Correct libvtv obstack use 2015-11-09 14:49:43 +10:30
lto-plugin configure.ac: Add AC_USE_SYSTEM_EXTENSIONS. 2015-07-02 10:30:07 +02:00
maintainer-scripts update_version_svn: Add gcc-4_8-branch to IGNORE_BRANCHES. 2015-06-23 07:48:06 +00:00
zlib zlib: Bump to automake 1.11.6 2015-05-13 11:31:32 +00:00
.dir-locals.el
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog configure.ac: Enable libmpx by default. 2015-11-13 06:48:20 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Update email address. 2015-10-23 17:06:07 +00:00
Makefile.def re PR libfortran/54572 (Use libbacktrace library) 2015-08-23 21:50:30 +00:00
Makefile.in re PR libfortran/54572 (Use libbacktrace library) 2015-08-23 21:50:30 +00:00
Makefile.tpl revert: configure.ac: Add -std=c++98 to stage1_cxxflags. 2015-05-21 13:05:33 -04:00
README
compile
config-ml.in re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
config.guess * config.sub, config.guess: Import from upstream. 2015-07-28 10:57:40 +10:00
config.rpath
config.sub * config.sub, config.guess: Import from upstream. 2015-07-28 10:57:40 +10:00
configure configure.ac: Enable libmpx by default. 2015-11-13 06:48:20 +00:00
configure.ac configure.ac: Enable libmpx by default. 2015-11-13 06:48:20 +00: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.