summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authormkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-06 21:49:07 +0000
committermkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-06 21:49:07 +0000
commitfd27912fe22aded3d2ce2b234822ff7108c294a7 (patch)
tree60dc0f53dee19449b88f58b49e331407b4b3a60b /gcc/haifa-sched.c
parent2521f35f9132bb59f321a72ac3096f3c4091236d (diff)
downloadgcc-fd27912fe22aded3d2ce2b234822ff7108c294a7.tar.gz
2006-10-06 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* sched-int.h (IS_SPECULATION_CHECK_P, IS_SPECULATION_SIMPLE_CHECK_P): New macros. * sched-ebb.c (begin_schedule_ready): Use them. * haifa-sched.c (schedule_insn, move_insn, try_ready, add_to_speculative_block, create_check_block_twin, speculate_insn, fix_jump_move, move_block_after_check): Ditto. * sched-rgn.c (new_ready): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 78adee5723a..ebe7f24ebb5 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1190,8 +1190,7 @@ schedule_insn (rtx insn)
resolve_dep (next, insn);
- if (!RECOVERY_BLOCK (insn)
- || RECOVERY_BLOCK (insn) == EXIT_BLOCK_PTR)
+ if (!IS_SPECULATION_BRANCHY_CHECK_P (insn))
{
int effective_cost;
@@ -1960,8 +1959,7 @@ move_insn (rtx insn)
gcc_assert (!jump_p
|| ((current_sched_info->flags & SCHED_RGN)
- && RECOVERY_BLOCK (insn)
- && RECOVERY_BLOCK (insn) != EXIT_BLOCK_PTR)
+ && IS_SPECULATION_BRANCHY_CHECK_P (insn))
|| (current_sched_info->flags & SCHED_EBB));
gcc_assert (BLOCK_FOR_INSN (PREV_INSN (insn)) == bb);
@@ -3115,8 +3113,7 @@ try_ready (rtx next)
or we simply don't care (*ts & HARD_DEP). */
gcc_assert (!ORIG_PAT (next)
- || !RECOVERY_BLOCK (next)
- || RECOVERY_BLOCK (next) == EXIT_BLOCK_PTR);
+ || !IS_SPECULATION_BRANCHY_CHECK_P (next));
if (*ts & HARD_DEP)
{
@@ -3128,11 +3125,11 @@ try_ready (rtx next)
change_queue_index (next, QUEUE_NOWHERE);
return -1;
}
- else if (!(*ts & BEGIN_SPEC) && ORIG_PAT (next) && !RECOVERY_BLOCK (next))
+ else if (!(*ts & BEGIN_SPEC) && ORIG_PAT (next) && !IS_SPECULATION_CHECK_P (next))
/* We should change pattern of every previously speculative
instruction - and we determine if NEXT was speculative by using
- ORIG_PAT field. Except one case - simple checks have ORIG_PAT
- pat too, hence we also check for the RECOVERY_BLOCK. */
+ ORIG_PAT field. Except one case - speculation checks have ORIG_PAT
+ pat too, so skip them. */
{
change_pattern (next, ORIG_PAT (next));
ORIG_PAT (next) = 0;
@@ -3444,7 +3441,7 @@ add_to_speculative_block (rtx insn)
check = XEXP (link, 0);
- if (RECOVERY_BLOCK (check))
+ if (IS_SPECULATION_SIMPLE_CHECK_P (check))
{
create_check_block_twin (check, true);
link = LOG_LINKS (insn);
@@ -3466,7 +3463,8 @@ add_to_speculative_block (rtx insn)
&& (DEP_STATUS (link) & DEP_TYPES) == DEP_TRUE);
check = XEXP (link, 0);
- gcc_assert (!RECOVERY_BLOCK (check) && !ORIG_PAT (check)
+
+ gcc_assert (!IS_SPECULATION_CHECK_P (check) && !ORIG_PAT (check)
&& QUEUE_INDEX (check) == QUEUE_NOWHERE);
rec = BLOCK_FOR_INSN (check);
@@ -3718,7 +3716,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
gcc_assert (ORIG_PAT (insn)
&& (!mutate_p
- || (RECOVERY_BLOCK (insn) == EXIT_BLOCK_PTR
+ || (IS_SPECULATION_SIMPLE_CHECK_P (insn)
&& !(TODO_SPEC (insn) & SPECULATIVE))));
/* Create recovery block. */
@@ -4091,7 +4089,7 @@ speculate_insn (rtx insn, ds_t request, rtx *new_pat)
|| (request & spec_info->mask) != request)
return -1;
- gcc_assert (!RECOVERY_BLOCK (insn));
+ gcc_assert (!IS_SPECULATION_CHECK_P (insn));
if (request & BE_IN_SPEC)
{
@@ -4299,8 +4297,7 @@ fix_jump_move (rtx jump)
jump_bb_next = jump_bb->next_bb;
gcc_assert (current_sched_info->flags & SCHED_EBB
- || (RECOVERY_BLOCK (jump)
- && RECOVERY_BLOCK (jump) != EXIT_BLOCK_PTR));
+ || IS_SPECULATION_BRANCHY_CHECK_P (jump));
if (!NOTE_INSN_BASIC_BLOCK_P (BB_END (jump_bb_next)))
/* if jump_bb_next is not empty. */
@@ -4333,8 +4330,8 @@ move_block_after_check (rtx jump)
update_bb_for_insn (jump_bb);
- gcc_assert (RECOVERY_BLOCK (jump)
- || RECOVERY_BLOCK (BB_END (jump_bb_next)));
+ gcc_assert (IS_SPECULATION_CHECK_P (jump)
+ || IS_SPECULATION_CHECK_P (BB_END (jump_bb_next)));
unlink_block (jump_bb_next);
link_block (jump_bb_next, bb);