]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-switch-conversion: don't apply switch size limit on jump tables
authorMark Wielaard <mark@klomp.org>
Sun, 5 Jan 2025 17:00:36 +0000 (18:00 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 6 Jan 2025 09:49:53 +0000 (10:49 +0100)
commit668cad04b16fc044142474232ac072fcc5f94433
treef361b5745a32105ce7bcfca1bc576b3142bf2dfd
parent830bead4859cd00da87e1304ba249cf0d3eb5a5a
tree-switch-conversion: don't apply switch size limit on jump tables

commit 56946c801a7c ("gimple: Add limit after which slower switchlower
algs are used [PR117091] [PR117352]") introduced a limit on the number
of cases of a switch. It also bails out on finding jump tables if the
switch is too large. This introduces a compile time regression during
bootstrap. A riscv bootstrap takes hours longer. Particularly
insn-attrtab.cc will take hours instead of minutes. Fix this by not
applying the switch size limit on jump tables.

An alternative would be to implement greedy switch clustering for jump
tables as is done for switch bitmap clustering.

gcc/ChangeLog:

PR tree-optimization/118032
* tree-switch-conversion.cc (jump_table_cluster::find_jump_tables):
Remove param_switch_lower_slow_alg_max_cases check.
gcc/tree-switch-conversion.cc