diff options
author | Wei Guozhi <carrot@google.com> | 2009-10-27 09:06:36 +0000 |
---|---|---|
committer | Wei Guozhi <carrot@gcc.gnu.org> | 2009-10-27 09:06:36 +0000 |
commit | 2929029c50e34fdc22da8b8b029daa880dd70359 (patch) | |
tree | 5ae128336a4b205cba9a2852606f3947295a32f3 /gcc/config/arm | |
parent | 9c67ec2204d7db5ad689b2b4728c8816bbbe6c3e (diff) | |
download | gcc-2929029c50e34fdc22da8b8b029daa880dd70359.zip gcc-2929029c50e34fdc22da8b8b029daa880dd70359.tar.gz gcc-2929029c50e34fdc22da8b8b029daa880dd70359.tar.bz2 |
target.h (have_conditional_execution): Add a new target hook function.
* target.h (have_conditional_execution): Add a new target hook function.
* target-def.h (TARGET_HAVE_CONDITIONAL_EXECUTION): Likewise.
* targhooks.h (default_have_conditional_execution): Likewise.
* targhooks.c (default_have_conditional_execution): Likewise.
* doc/tm.texi (TARGET_HAVE_CONDITIONAL_EXECUTION): Document it.
* config/arm/arm.c (TARGET_HAVE_CONDITIONAL_EXECUTION): Define it.
(arm_have_conditional_execution): New function.
* ifcvt.c (noce_process_if_block, find_if_header,
cond_exec_find_if_block, dead_or_predicable): Change the usage of macro
HAVE_conditional_execution to a target hook call.
* recog.c (peephole2_optimize): Likewise.
* sched-rgn.c (add_branch_dependences): Likewise.
* final.c (asm_insn_count, final_scan_insn): Likewise.
* bb-reorder.c (HAVE_conditional_execution): Remove it.
From-SVN: r153584
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 93c3590..35bd394 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -138,6 +138,7 @@ static rtx arm_libcall_value (enum machine_mode, const_rtx); static void arm_internal_label (FILE *, const char *, unsigned long); static void arm_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); +static bool arm_have_conditional_execution (void); static bool arm_rtx_costs_1 (rtx, enum rtx_code, int*, bool); static bool arm_size_rtx_costs (rtx, enum rtx_code, enum rtx_code, int *); static bool arm_slowmul_rtx_costs (rtx, enum rtx_code, enum rtx_code, int *, bool); @@ -445,6 +446,9 @@ static const struct attribute_spec arm_attribute_table[] = #define TARGET_HAVE_TLS true #endif +#undef TARGET_HAVE_CONDITIONAL_EXECUTION +#define TARGET_HAVE_CONDITIONAL_EXECUTION arm_have_conditional_execution + #undef TARGET_CANNOT_FORCE_CONST_MEM #define TARGET_CANNOT_FORCE_CONST_MEM arm_cannot_force_const_mem @@ -21183,4 +21187,12 @@ arm_frame_pointer_required (void) || (TARGET_ARM && TARGET_APCS_FRAME && ! leaf_function_p ())); } +/* Only thumb1 can't support conditional execution, so return true if + the target is not thumb1. */ +static bool +arm_have_conditional_execution (void) +{ + return !TARGET_THUMB1; +} + #include "gt-arm.h" |