switch lowering: limit number of cluster attemps
authorMartin Liska <mliska@suse.cz>
Tue, 22 Sep 2020 10:23:35 +0000 (12:23 +0200)
committerMartin Liska <mliska@suse.cz>
Tue, 22 Sep 2020 12:38:46 +0000 (14:38 +0200)
commitc6df6039e9180c580945266302ec14047d358364
treeea9ad4ba2f0a9a04b8b9e39e9a553b12366b9cb6
parent1a84651d164e9ebf080e0b64f0ad300eaae46297
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.
gcc/doc/invoke.texi
gcc/params.opt
gcc/testsuite/g++.dg/tree-ssa/pr96979.C [new file with mode: 0644]
gcc/tree-switch-conversion.c