[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Martin Liška  ---
Implemented in master.

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Martin Liska :

https://gcc.gnu.org/g:03eb09292ef228d1d12b5168cdd748583b1f992a

commit r11-5605-g03eb09292ef228d1d12b5168cdd748583b1f992a
Author: Martin Liska 
Date:   Fri Aug 28 10:26:13 2020 +0200

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.

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2019-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |11.0

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2019-10-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #6 from Martin Liška  ---
I'm working on the optimization.

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2018-11-09 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

Andrew Pinski  changed:

   What|Removed |Added

 CC||eyalroz at technion dot ac.il

--- Comment #5 from Andrew Pinski  ---
*** Bug 87925 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

Andrew Pinski  changed:

   What|Removed |Added

 CC||timshen at gcc dot gnu.org

--- Comment #4 from Andrew Pinski  ---
*** Bug 78484 has been marked as a duplicate of this bug. ***