diff options
author | liuhongt <hongtao.liu@intel.com> | 2022-07-19 11:22:24 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2022-07-20 16:11:21 +0800 |
commit | 78d5e125c008d87cb2e1c08a9ff2a02d4214ffcf (patch) | |
tree | c5c1c2fd8e3ec2b012da79e5fe88185d7fcc453f /gcc/timevar.def | |
parent | f9d4c3b45c5ed5f45c8089c990dbd4e181929c3d (diff) | |
download | gcc-78d5e125c008d87cb2e1c08a9ff2a02d4214ffcf.zip gcc-78d5e125c008d87cb2e1c08a9ff2a02d4214ffcf.tar.gz gcc-78d5e125c008d87cb2e1c08a9ff2a02d4214ffcf.tar.bz2 |
Move pass_cse_sincos after vectorizer.
__builtin_cexpi can't be vectorized since there's gap between it and
vectorized sincos version(In libmvec, it passes a double and two
double pointer and returns nothing.) And it will lose some
vectorization opportunity if sin & cos are optimized to cexpi before
vectorizer.
I'm trying to add vect_recog_cexpi_pattern to split cexpi to sin and
cos, but it failed vectorizable_simd_clone_call since NULL is returned
by cgraph_node::get (fndecl). So alternatively, the patch try to move
pass_cse_sincos after vectorizer, just before pas_cse_reciprocals.
Also original pass_cse_sincos additionaly expands pow&cabs, this patch
split that part into a separate pass named pass_expand_powcabs which
remains the old pass position.
gcc/ChangeLog:
* passes.def: (Split pass_cse_sincos to pass_expand_powcabs
and pass_cse_sincos, and move pass_cse_sincos after vectorizer).
* timevar.def (TV_TREE_POWCABS): New timevar.
* tree-pass.h (make_pass_expand_powcabs): Split from pass_cse_sincos.
* tree-ssa-math-opts.cc (gimple_expand_builtin_cabs): Ditto.
(class pass_expand_powcabs): Ditto.
(pass_expand_powcabs::execute): Ditto.
(make_pass_expand_powcabs): Ditto.
(pass_cse_sincos::execute): Remove pow/cabs expand part.
(make_pass_cse_sincos): Ditto.
gcc/testsuite/ChangeLog:
* gcc.dg/pow-sqrt-synth-1.c: Adjust testcase.
Diffstat (limited to 'gcc/timevar.def')
-rw-r--r-- | gcc/timevar.def | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/timevar.def b/gcc/timevar.def index 2dae5e1..651af19 100644 --- a/gcc/timevar.def +++ b/gcc/timevar.def @@ -220,6 +220,7 @@ DEFTIMEVAR (TV_TREE_SWITCH_CONVERSION, "tree switch conversion") DEFTIMEVAR (TV_TREE_SWITCH_LOWERING, "tree switch lowering") DEFTIMEVAR (TV_TREE_RECIP , "gimple CSE reciprocals") DEFTIMEVAR (TV_TREE_SINCOS , "gimple CSE sin/cos") +DEFTIMEVAR (TV_TREE_POWCABS , "gimple expand pow/cabs") DEFTIMEVAR (TV_TREE_WIDEN_MUL , "gimple widening/fma detection") DEFTIMEVAR (TV_TRANS_MEM , "transactional memory") DEFTIMEVAR (TV_TREE_STRLEN , "tree strlen optimization") |