diff options
author | Martin Liska <mliska@suse.cz> | 2020-08-28 10:26:13 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-12-01 11:43:25 +0100 |
commit | 03eb09292ef228d1d12b5168cdd748583b1f992a (patch) | |
tree | 8e41919c16c723251463ac59666965cbd82e0f6e /gcc/dbgcnt.def | |
parent | 58f71a34c68711c4432b45086bfcccb78be7ace5 (diff) | |
download | gcc-03eb09292ef228d1d12b5168cdd748583b1f992a.zip gcc-03eb09292ef228d1d12b5168cdd748583b1f992a.tar.gz gcc-03eb09292ef228d1d12b5168cdd748583b1f992a.tar.bz2 |
Add if-chain to switch conversion pass.
gcc/ChangeLog:
PR tree-optimization/14799
PR ipa/88702
* Makefile.in: Add gimple-if-to-switch.o.
* dbgcnt.def (DEBUG_COUNTER): Add new debug counter.
* passes.def: Include new pass_if_to_switch pass.
* timevar.def (TV_TREE_IF_TO_SWITCH): New timevar.
* tree-pass.h (make_pass_if_to_switch): New.
* tree-ssa-reassoc.c (struct operand_entry): Move to the header.
(dump_range_entry): Move to header file.
(debug_range_entry): Likewise.
(no_side_effect_bb): Make it global.
* tree-switch-conversion.h (simple_cluster::simple_cluster):
Add inline for couple of functions in order to prevent error
about multiple defined symbols.
* gimple-if-to-switch.cc: New file.
* tree-ssa-reassoc.h: New file.
gcc/testsuite/ChangeLog:
PR tree-optimization/14799
PR ipa/88702
* gcc.dg/tree-ssa/pr96480.c: Disable if-to-switch conversion.
* gcc.dg/tree-ssa/reassoc-32.c: Likewise.
* g++.dg/tree-ssa/if-to-switch-1.C: New test.
* gcc.dg/tree-ssa/if-to-switch-1.c: New test.
* gcc.dg/tree-ssa/if-to-switch-2.c: New test.
* gcc.dg/tree-ssa/if-to-switch-3.c: New test.
* gcc.dg/tree-ssa/if-to-switch-4.c: New test.
* gcc.dg/tree-ssa/if-to-switch-5.c: New test.
* gcc.dg/tree-ssa/if-to-switch-6.c: New test.
* gcc.dg/tree-ssa/if-to-switch-7.c: New test.
* gcc.dg/tree-ssa/if-to-switch-8.c: New test.
Diffstat (limited to 'gcc/dbgcnt.def')
-rw-r--r-- | gcc/dbgcnt.def | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index a5b6bb6..c0744b2 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -170,6 +170,7 @@ DEBUG_COUNTER (if_after_combine) DEBUG_COUNTER (if_after_reload) DEBUG_COUNTER (if_conversion) DEBUG_COUNTER (if_conversion_tree) +DEBUG_COUNTER (if_to_switch) DEBUG_COUNTER (ipa_cp_bits) DEBUG_COUNTER (ipa_cp_values) DEBUG_COUNTER (ipa_cp_vr) |