aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2021-09-29 17:25:50 -0400
committerAndrew MacLeod <amacleod@redhat.com>2021-10-06 09:18:09 -0400
commit3ca950c3525527846f13e8c547368ef432547a23 (patch)
tree84156fb071b8bf136365d9ddfce681ef78a181b3 /gcc/doc
parente828f4b5898896240b2ae5d5030c539aff28ea24 (diff)
downloadgcc-3ca950c3525527846f13e8c547368ef432547a23.zip
gcc-3ca950c3525527846f13e8c547368ef432547a23.tar.gz
gcc-3ca950c3525527846f13e8c547368ef432547a23.tar.bz2
Introduce a param-switch-limit for EVRP.
Very large switches cause a lot of range calculations with multiple subranges to happen. This can cause quadratic or even exponetial time increases in large testcases. This patch introduces a param variable to limit the size of switches EVRP will process. * gimple-range-edge.cc (gimple_outgoing_range::gimple_outgoing_range): Add parameter to limit size when recognizing switches. (gimple_outgoing_range::edge_range_p): Check size limit. * gimple-range-edge.h (gimple_outgoing_range): Add size field. * gimple-range-gori.cc (gori_map::calculate_gori): Ignore switches that exceed the size limit. (gori_compute::gori_compute): Add initializer. * params.opt (evrp-switch-limit): New. * doc/invoke.texi: Update docs.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b4eaa77..80bc7fe 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14505,6 +14505,9 @@ Maximum number of basic blocks before EVRP uses a sparse cache.
@item evrp-mode
Specifies the mode Early VRP should operate in.
+@item evrp-switch-limit
+Specifies the maximum number of switch cases before EVRP ignores a switch.
+
@item unroll-jam-min-percent
The minimum percentage of memory references that must be optimized
away for the unroll-and-jam transformation to be considered profitable.