]> gcc.gnu.org Git - gcc.git/commit
Add if-chain to switch conversion pass.
authorMartin Liska <mliska@suse.cz>
Fri, 28 Aug 2020 08:26:13 +0000 (10:26 +0200)
committerMartin Liska <mliska@suse.cz>
Fri, 2 Oct 2020 12:13:33 +0000 (14:13 +0200)
commit3c4a7081e273827eb494f287b53efa097098e4cd
treef7bfbe44e0e01279a99bdefbc6a17c54dfea4663
parent3acbcc15f1eeea4a2a81614bbbf41ea3158ab8ac
Add if-chain to switch conversion pass.

gcc/ChangeLog:

PR tree-optimization/14799
PR ipa/88702
* Makefile.in: Add new gimple-if-to-switch.o.
* common.opt: Add new option.
* dbgcnt.def (DEBUG_COUNTER): Add new debug counter.
* doc/invoke.texi: Document -fconvert-if-to-switch.
* opts.c: Add -fconvert-if-to-switch at OPT_LEVELS_2_PLUS.
* passes.def: Register new pass.
* timevar.def (TV_TREE_IF_TO_SWITCH): Add new time variable.
* tree-pass.h (make_pass_if_to_switch): New.
* tree-switch-conversion.h: New file.
* gimple-if-to-switch.cc: New file.

gcc/testsuite/ChangeLog:

PR tree-optimization/14799
PR ipa/88702
* gcc.dg/tree-ssa/reassoc-32.c: Add -fno-convert-if-to-switch.
* gcc.dg/tree-ssa/if-to-switch-1.c: New test.
* gcc.dg/tree-ssa/if-to-switch-2.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-3.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-4.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-5.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-6.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-7.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-8.c: Likewise.
19 files changed:
gcc/Makefile.in
gcc/common.opt
gcc/dbgcnt.def
gcc/doc/invoke.texi
gcc/gimple-if-to-switch.cc [new file with mode: 0644]
gcc/opts.c
gcc/passes.def
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/reassoc-32.c
gcc/timevar.def
gcc/tree-pass.h
gcc/tree-switch-conversion.h
This page took 0.195113 seconds and 6 git commands to generate.