diff options
author | carrot <carrot@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 09:06:36 +0000 |
---|---|---|
committer | carrot <carrot@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 09:06:36 +0000 |
commit | 751d3ba7628c0ba64205673988ee5f7a93b1d4c5 (patch) | |
tree | 5ae128336a4b205cba9a2852606f3947295a32f3 /gcc/final.c | |
parent | 64152da056aefc2919f5c17c55c7fcd340236d05 (diff) | |
download | gcc-751d3ba7628c0ba64205673988ee5f7a93b1d4c5.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/final.c b/gcc/final.c index b8f5e513817..ef450d2fe3e 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -204,10 +204,8 @@ rtx final_sequence; static int dialect_number; #endif -#ifdef HAVE_conditional_execution /* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */ rtx current_insn_predicate; -#endif #ifdef HAVE_ATTR_length static int asm_insn_count (rtx); @@ -2102,10 +2100,9 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, const char *templ; bool is_stmt; -#ifdef HAVE_conditional_execution /* Reset this early so it is correct for ASM statements. */ current_insn_predicate = NULL_RTX; -#endif + /* An INSN, JUMP_INSN or CALL_INSN. First check for special kinds that recog doesn't recognize. */ @@ -2590,10 +2587,9 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, FINAL_PRESCAN_INSN (insn, recog_data.operand, recog_data.n_operands); #endif -#ifdef HAVE_conditional_execution - if (GET_CODE (PATTERN (insn)) == COND_EXEC) + if (targetm.have_conditional_execution () + && GET_CODE (PATTERN (insn)) == COND_EXEC) current_insn_predicate = COND_EXEC_TEST (PATTERN (insn)); -#endif #ifdef HAVE_cc0 cc_prev_status = cc_status; |