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/ifcvt.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/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index d8d15a59be1..4417e6e6b87 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -47,9 +47,6 @@ #include "vecprim.h" #include "dbgcnt.h" -#ifndef HAVE_conditional_execution -#define HAVE_conditional_execution 0 -#endif #ifndef HAVE_conditional_move #define HAVE_conditional_move 0 #endif @@ -2426,7 +2423,7 @@ noce_process_if_block (struct noce_if_info *if_info) if (HAVE_conditional_move && noce_try_cmove (if_info)) goto success; - if (! HAVE_conditional_execution) + if (! targetm.have_conditional_execution ()) { if (noce_try_store_flag_constants (if_info)) goto success; @@ -3070,7 +3067,7 @@ find_if_header (basic_block test_bb, int pass) && noce_find_if_block (test_bb, then_edge, else_edge, pass)) goto success; - if (HAVE_conditional_execution && reload_completed + if (targetm.have_conditional_execution () && reload_completed && cond_exec_find_if_block (&ce_info)) goto success; @@ -3080,7 +3077,7 @@ find_if_header (basic_block test_bb, int pass) goto success; if (dom_info_state (CDI_POST_DOMINATORS) >= DOM_NO_FAST_QUERY - && (! HAVE_conditional_execution || reload_completed)) + && (! targetm.have_conditional_execution () || reload_completed)) { if (find_if_case_1 (test_bb, then_edge, else_edge)) goto success; @@ -3187,7 +3184,7 @@ cond_exec_find_if_block (struct ce_if_block * ce_info) /* We only ever should get here after reload, and only if we have conditional execution. */ - gcc_assert (HAVE_conditional_execution && reload_completed); + gcc_assert (targetm.have_conditional_execution () && reload_completed); /* Discover if any fall through predecessors of the current test basic block were && tests (which jump to the else block) or || tests (which jump to @@ -3865,7 +3862,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb, /* Disable handling dead code by conditional execution if the machine needs to do anything funny with the tests, etc. */ #ifndef IFCVT_MODIFY_TESTS - if (HAVE_conditional_execution) + if (targetm.have_conditional_execution ()) { /* In the conditional execution case, we have things easy. We know the condition is reversible. We don't have to check life info |