On 06/30/2015 02:58 PM, Richard Sandiford wrote:
This patch uses target-insns.def to define casesi and tablejump.
It's the first point in the series at which we need access to the
instruction code, so the patch adds that to targetm as well.
Bootstrapped & regression-tested on x86_64-linux-gnu and aarch64-linux-gnu.
Also tested via config-list.mk. OK to install?
Thanks,
Richard
gcc/
* target.def: Add code_for_* hooks.
* gentarget-def.c (def_target_insn): Add TARGET_CODE_FOR_* macros.
* defaults.h (HAVE_tablejump, gen_tablejump): Delete.
* target-insns.def (casesi, tablejump): New targetm instruction
patterns.
* expr.c (try_casesi): Use them instead of HAVE_*/gen_* interface.
(do_tablejump): Likewise.
* stmt.c (expand_switch_as_decision_tree_p): Likewise.
(expand_sjlj_dispatch_table): Likewise.
* targhooks.c (default_case_values_threshold): Likewise.
OK.
jeff