diff options
author | Martin Liska <mliska@suse.cz> | 2020-09-22 12:23:35 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-09-22 14:38:46 +0200 |
commit | c6df6039e9180c580945266302ec14047d358364 (patch) | |
tree | ea9ad4ba2f0a9a04b8b9e39e9a553b12366b9cb6 /gcc/params.opt | |
parent | 1a84651d164e9ebf080e0b64f0ad300eaae46297 (diff) | |
download | gcc-c6df6039e9180c580945266302ec14047d358364.zip gcc-c6df6039e9180c580945266302ec14047d358364.tar.gz gcc-c6df6039e9180c580945266302ec14047d358364.tar.bz2 |
switch lowering: limit number of cluster attemps
gcc/ChangeLog:
PR tree-optimization/96979
* doc/invoke.texi: Document new param max-switch-clustering-attempts.
* params.opt: Add new parameter.
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
Limit number of attempts.
(bit_test_cluster::find_bit_tests): Likewise.
gcc/testsuite/ChangeLog:
PR tree-optimization/96979
* g++.dg/tree-ssa/pr96979.C: New test.
Diffstat (limited to 'gcc/params.opt')
-rw-r--r-- | gcc/params.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/params.opt b/gcc/params.opt index dcf5e02..5f2e11d 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -82,6 +82,10 @@ The maximum length of a constant string for a builtin string cmp call eligible f Common Joined UInteger Var(param_case_values_threshold) Param Optimization The smallest number of different values for which it is best to use a jump-table instead of a tree of conditional branches, if 0, use the default for the machine. +-param=max-switch-clustering-attempts= +Common Joined UInteger Var(param_max_switch_clustering_attempts) Param Optimization Init(10000) +The maximum number of clustering attempts used in bit-test and jump-table switch expansion. + -param=comdat-sharing-probability= Common Joined UInteger Var(param_comdat_sharing_probability) Init(20) Param Optimization Probability that COMDAT function will be shared with different compilation unit. |