]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Rename expand_powcabs pass to expand_pow
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 30 Jun 2024 21:17:00 +0000 (21:17 +0000)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 2 Jul 2024 21:38:23 +0000 (14:38 -0700)
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>
gcc/passes.def
gcc/testsuite/gcc.dg/pow-sqrt-synth-1.c
gcc/timevar.def
gcc/tree-pass.h
gcc/tree-ssa-math-opts.cc

index 13c9dc34ddf553c513b237fcef946f725724da48..b8c21b1e435171f795952fb859ba5fa2c41f915d 100644 (file)
@@ -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);
index 484b29a8fc8118c3d29d1caa8dbda3e9ed93a9fb..be81e43ad9a4b1d20750836f9bb5170160f759bc 100644 (file)
@@ -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" } } */
index 6fc368591387ffa9d427e12535a152a48ff1dd1a..0f9d2c0b032478c2d2029c36f869cdab99ffc4aa 100644 (file)
@@ -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")
index 38902b1b01b8dfc494a3d5cc9420f785827aa82c..9843d189d27d2815c8effc6e3d13632c6e63c620 100644 (file)
@@ -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);
index 71f896a97900a25ea0a918e99eec4f961650b1dd..a35caf5f0588ee180e32e36be9263b0de29d619e 100644 (file)
@@ -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