Rename expand_powcabs pass to expand_pow
Since cabs expansion was removed from this pass, it would be good to rename it. Bootstrapped and tested on x86_64-linux-gnu gcc/ChangeLog: * passes.def (expand_pow): Renamed from expand_powcabs. * timevar.def (TV_TREE_POWCABS): Remove. (TV_TREE_POW): Add * tree-pass.h (make_pass_expand_powcabs): Rename to ... (make_pass_expand_pow): This. * tree-ssa-math-opts.cc (class pass_expand_powcabs): Rename to ... (class pass_expand_pow): This. (pass_expand_powcabs::execute): Rename to ... (pass_expand_pow::execute): This. (make_pass_expand_powcabs): Rename to ... (make_pass_expand_pow): This. gcc/testsuite/ChangeLog: * gcc.dg/pow-sqrt-synth-1.c: Update testcase for renamed pass. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
This commit is contained in:
parent
a17ce10c97
commit
36852a189a
5 changed files with 17 additions and 18 deletions
|
@ -265,7 +265,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
NEXT_PASS (pass_ccp, true /* nonzero_p */);
|
||||
/* After CCP we rewrite no longer addressed locals into SSA
|
||||
form if possible. */
|
||||
NEXT_PASS (pass_expand_powcabs);
|
||||
NEXT_PASS (pass_expand_pow);
|
||||
NEXT_PASS (pass_optimize_bswap);
|
||||
NEXT_PASS (pass_laddress);
|
||||
NEXT_PASS (pass_lim);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile { target sqrt_insn } } */
|
||||
/* { dg-options "-fdump-tree-powcabs -Ofast --param max-pow-sqrt-depth=8" } */
|
||||
/* { dg-options "-fdump-tree-pow -Ofast --param max-pow-sqrt-depth=8" } */
|
||||
/* { dg-additional-options "-mfloat-abi=softfp -mfpu=neon-vfpv4" { target arm*-*-* } } */
|
||||
|
||||
double
|
||||
|
@ -34,4 +34,4 @@ vecfoo (double *a)
|
|||
a[i] = __builtin_pow (a[i], 1.25);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "synthesizing" 7 "powcabs" } } */
|
||||
/* { dg-final { scan-tree-dump-times "synthesizing" 7 "pow" } } */
|
||||
|
|
|
@ -223,7 +223,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_POW , "gimple expand pow")
|
||||
DEFTIMEVAR (TV_TREE_WIDEN_MUL , "gimple widening/fma detection")
|
||||
DEFTIMEVAR (TV_TRANS_MEM , "transactional memory")
|
||||
DEFTIMEVAR (TV_TREE_STRLEN , "tree strlen optimization")
|
||||
|
|
|
@ -451,7 +451,7 @@ extern gimple_opt_pass *make_pass_early_warn_uninitialized (gcc::context *ctxt);
|
|||
extern gimple_opt_pass *make_pass_late_warn_uninitialized (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_cse_reciprocals (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_cse_sincos (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_expand_powcabs (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_expand_pow (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_optimize_bswap (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_store_merging (gcc::context *ctxt);
|
||||
extern gimple_opt_pass *make_pass_optimize_widening_mul (gcc::context *ctxt);
|
||||
|
|
|
@ -2272,17 +2272,16 @@ make_pass_cse_sincos (gcc::context *ctxt)
|
|||
return new pass_cse_sincos (ctxt);
|
||||
}
|
||||
|
||||
/* Expand powi(x,n) into an optimal number of multiplies, when n is a constant.
|
||||
Note the name is powcabs but cabs expansion was moved to the lower complex
|
||||
pass. */
|
||||
/* Expand powi(x,n) into an optimal number of multiplies, when n is a
|
||||
constant. */
|
||||
namespace {
|
||||
|
||||
const pass_data pass_data_expand_powcabs =
|
||||
const pass_data pass_data_expand_pow =
|
||||
{
|
||||
GIMPLE_PASS, /* type */
|
||||
"powcabs", /* name */
|
||||
"pow", /* name */
|
||||
OPTGROUP_NONE, /* optinfo_flags */
|
||||
TV_TREE_POWCABS, /* tv_id */
|
||||
TV_TREE_POW, /* tv_id */
|
||||
PROP_ssa, /* properties_required */
|
||||
PROP_gimple_opt_math, /* properties_provided */
|
||||
0, /* properties_destroyed */
|
||||
|
@ -2290,11 +2289,11 @@ const pass_data pass_data_expand_powcabs =
|
|||
TODO_update_ssa, /* todo_flags_finish */
|
||||
};
|
||||
|
||||
class pass_expand_powcabs : public gimple_opt_pass
|
||||
class pass_expand_pow : public gimple_opt_pass
|
||||
{
|
||||
public:
|
||||
pass_expand_powcabs (gcc::context *ctxt)
|
||||
: gimple_opt_pass (pass_data_expand_powcabs, ctxt)
|
||||
pass_expand_pow (gcc::context *ctxt)
|
||||
: gimple_opt_pass (pass_data_expand_pow, ctxt)
|
||||
{}
|
||||
|
||||
/* opt_pass methods: */
|
||||
|
@ -2305,10 +2304,10 @@ public:
|
|||
|
||||
unsigned int execute (function *) final override;
|
||||
|
||||
}; // class pass_expand_powcabs
|
||||
}; // class pass_expand_pow
|
||||
|
||||
unsigned int
|
||||
pass_expand_powcabs::execute (function *fun)
|
||||
pass_expand_pow::execute (function *fun)
|
||||
{
|
||||
basic_block bb;
|
||||
bool cfg_changed = false;
|
||||
|
@ -2421,9 +2420,9 @@ pass_expand_powcabs::execute (function *fun)
|
|||
} // anon namespace
|
||||
|
||||
gimple_opt_pass *
|
||||
make_pass_expand_powcabs (gcc::context *ctxt)
|
||||
make_pass_expand_pow (gcc::context *ctxt)
|
||||
{
|
||||
return new pass_expand_powcabs (ctxt);
|
||||
return new pass_expand_pow (ctxt);
|
||||
}
|
||||
|
||||
/* Return true if stmt is a type conversion operation that can be stripped
|
||||
|
|
Loading…
Add table
Reference in a new issue