r230492 - in /trunk/gcc: ChangeLog internal-fn....

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Tue Nov 17 18:55:00 GMT 2015


Author: rsandifo
Date: Tue Nov 17 18:55:55 2015
New Revision: 230492

URL: https://gcc.gnu.org/viewcvs?rev=230492&root=gcc&view=rev
Log:
Vectorize internal functions

This patch tries to vectorize built-in and internal functions as
internal functions first, falling back on the current built-in
target hooks otherwise.

This means that we'll automatically pick up vector versions of optabs
without the target having to implement any special hooks.  E.g. we'll
use V4SF sqrt if the target defines a "sqrtv4sf2" optab.  As well as
being simpler, it means that the target-independent code has more
idea what the vectorized function does.

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

gcc/
	* internal-fn.h (direct_internal_fn_info): Add vectorizable flag.
	* internal-fn.c (direct_internal_fn_array): Update accordingly.
	* tree-vectorizer.h (vectorizable_function): Delete.
	* tree-vect-stmts.c: Include internal-fn.h.
	(vectorizable_internal_function): New function.
	(vectorizable_function): Inline into...
	(vectorizable_call): ...here.  Explicitly reject calls that read
	from or write to memory.  Try using an internal function before
	falling back on the old vectorizable_function behavior.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/internal-fn.c
    trunk/gcc/internal-fn.h
    trunk/gcc/tree-vect-stmts.c
    trunk/gcc/tree-vectorizer.h



More information about the Gcc-cvs mailing list