summaryrefslogtreecommitdiff
path: root/gcc/params.def
diff options
context:
space:
mode:
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-13 15:26:14 +0000
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-13 15:26:14 +0000
commitc3206272a57bf11384e4bfc1e8a2539903dbeda1 (patch)
treee2d5e277b402d4d751638756eee12266bbada3e9 /gcc/params.def
parentdebb7e7af1863e2da8f3ef61432f0fc16b2a928e (diff)
downloadgcc-c3206272a57bf11384e4bfc1e8a2539903dbeda1.tar.gz
[tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible
* params.def (PARAM_MAX_POW_SQRT_DEPTH): New param. * tree-ssa-math-opts.c: Include params.h (pow_synth_sqrt_info): New struct. (representable_as_half_series_p): New function. (get_fn_chain): Likewise. (print_nested_fn): Likewise. (dump_fractional_sqrt_sequence): Likewise. (dump_integer_part): Likewise. (expand_pow_as_sqrts): Likewise. (gimple_expand_builtin_pow): Use above to attempt to expand pow as series of square roots. Removed now unused variables. * gcc.target/aarch64/pow-sqrt-synth-1.c: New test. * gcc.dg/pow-sqrt.x: New file. * gcc.dg/pow-sqrt-1.c: New test. * gcc.dg/pow-sqrt-2.c: Likewise. * gcc.dg/pow-sqrt-3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223167 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/params.def')
-rw-r--r--gcc/params.def8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/params.def b/gcc/params.def
index 48b39a25041..3e4ba3ad6ce 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -262,6 +262,14 @@ DEFPARAM(PARAM_MAX_HOIST_DEPTH,
"Maximum depth of search in the dominator tree for expressions to hoist",
30, 0, 0)
+
+/* When synthesizing expnonentiation by a real constant operations using square
+ roots, this controls how deep sqrt chains we are willing to generate. */
+DEFPARAM(PARAM_MAX_POW_SQRT_DEPTH,
+ "max-pow-sqrt-depth",
+ "Maximum depth of sqrt chains to use when synthesizing exponentiation by a real constant",
+ 5, 1, 32)
+
/* This parameter limits the number of insns in a loop that will be unrolled,
and by how much the loop is unrolled.