]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/Makefile.in
* stmt.c (emit_case_bit_tests): New routine to implement suitable
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jan 2003 17:30:29 +0000 (17:30 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jan 2003 17:30:29 +0000 (17:30 +0000)
commit315e4c10f9ffea1a45962cb21e291b1afcf7f00c
tree9c8023e7b287c57e4f064213bda30e0016c032ec
parent1aa28b70b113229b29424a86ea919e6f875bdd4b
* stmt.c (emit_case_bit_tests): New routine to implement suitable
switch statements using the equivalent of "if ((1<<x) & cst) ... ".
(case_bit_test_cmp): New comparison function for "qsort" to order
case_bit_tests by decreasing number of destination nodes.
(lshift_cheap_p): New function to determine if "1 << x" is cheap.
(expand_end_case_type): Use emit_case_bit_tests to implement
suitable switch statments.
(CASE_USE_BIT_TESTS): New target macro to disable the above.
* Makefile.in (stmt.o): Add dependency on optab.h.
* doc/tm.texi (CASE_USE_BIT_TESTS): Document new target macro.

* gcc.c-torture/execute/switch-1.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61784 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/Makefile.in
gcc/doc/tm.texi
gcc/stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/switch-1.c [new file with mode: 0644]