aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-10-02 14:12:06 +0200
committerMartin Liska <mliska@suse.cz>2020-11-06 16:54:26 +0100
commit9b11203e33f999933aaa99bba779ffd7cd329849 (patch)
tree9548666f7f0212fc2d34759af7ae0ff2ea21e730 /gcc/tree-switch-conversion.h
parentd398949230786a4d678677fab0070ad779cc1c84 (diff)
downloadgcc-9b11203e33f999933aaa99bba779ffd7cd329849.zip
gcc-9b11203e33f999933aaa99bba779ffd7cd329849.tar.gz
gcc-9b11203e33f999933aaa99bba779ffd7cd329849.tar.bz2
Add -fbit-tests option.
gcc/ChangeLog: * common.opt: Add new -fbit-tests option. * doc/invoke.texi: Document the option. * tree-switch-conversion.c (bit_test_cluster::find_bit_tests): Use the option. * tree-switch-conversion.h (is_enabled): New function. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/switch-4.c: New test.
Diffstat (limited to 'gcc/tree-switch-conversion.h')
-rw-r--r--gcc/tree-switch-conversion.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h
index dbfd9ee..7515e95 100644
--- a/gcc/tree-switch-conversion.h
+++ b/gcc/tree-switch-conversion.h
@@ -411,6 +411,12 @@ public:
basic_block case_bb,
profile_probability prob);
+ /* Return whether bit test expansion is allowed. */
+ static inline bool is_enabled (void)
+ {
+ return flag_bit_tests;
+ }
+
/* True when the jump table handles an entire switch statement. */
bool m_handles_entire_switch;