summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c57
1 files changed, 4 insertions, 53 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 380244094fb..4d51984f023 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1,5 +1,5 @@
/* Instruction scheduling pass.
- Copyright (C) 1992-2013 Free Software Foundation, Inc.
+ Copyright (C) 1992-2014 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
and currently maintained by, Jim Wilson (wilson@cygnus.com)
@@ -6553,50 +6553,6 @@ setup_sched_dump (void)
? stderr : dump_file);
}
-/* Try to group comparison and the following conditional jump INSN if
- they're already adjacent. This is to prevent scheduler from scheduling
- them apart. */
-
-static void
-try_group_insn (rtx insn)
-{
- unsigned int condreg1, condreg2;
- rtx cc_reg_1;
- rtx prev;
-
- if (!any_condjump_p (insn))
- return;
-
- targetm.fixed_condition_code_regs (&condreg1, &condreg2);
- cc_reg_1 = gen_rtx_REG (CCmode, condreg1);
- prev = prev_nonnote_nondebug_insn (insn);
- if (!reg_referenced_p (cc_reg_1, PATTERN (insn))
- || !prev
- || !modified_in_p (cc_reg_1, prev))
- return;
-
- /* Different microarchitectures support macro fusions for different
- combinations of insn pairs. */
- if (!targetm.sched.macro_fusion_pair_p
- || !targetm.sched.macro_fusion_pair_p (prev, insn))
- return;
-
- SCHED_GROUP_P (insn) = 1;
-}
-
-/* If the last cond jump and the cond register defining insn are consecutive
- before scheduling, we want them to be in a schedule group. This is good
- for performance on microarchitectures supporting macro-fusion. */
-
-static void
-group_insns_for_macro_fusion ()
-{
- basic_block bb;
-
- FOR_EACH_BB (bb)
- try_group_insn (BB_END (bb));
-}
-
/* Initialize some global state for the scheduler. This function works
with the common data shared between all the schedulers. It is called
from the scheduler specific initialization routine. */
@@ -6623,7 +6579,7 @@ sched_init (void)
sched_pressure = SCHED_PRESSURE_NONE;
if (sched_pressure != SCHED_PRESSURE_NONE)
- ira_setup_eliminable_regset (false);
+ ira_setup_eliminable_regset ();
/* Initialize SPEC_INFO. */
if (targetm.sched.set_sched_flags)
@@ -6725,11 +6681,6 @@ sched_init (void)
}
curr_state = xmalloc (dfa_state_size);
-
- /* Group compare and branch insns for macro-fusion. */
- if (targetm.sched.macro_fusion_p
- && targetm.sched.macro_fusion_p ())
- group_insns_for_macro_fusion ();
}
static void haifa_init_only_bb (basic_block, basic_block);
@@ -6758,7 +6709,7 @@ haifa_sched_init (void)
sched_init_bbs ();
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
bbs.quick_push (bb);
sched_init_luids (bbs);
sched_deps_init (true);
@@ -8124,7 +8075,7 @@ unlink_bb_notes (basic_block first, basic_block last)
if (first == last)
return;
- bb_header = XNEWVEC (rtx, last_basic_block);
+ bb_header = XNEWVEC (rtx, last_basic_block_for_fn (cfun));
/* Make a sentinel. */
if (last->next_bb != EXIT_BLOCK_PTR_FOR_FN (cfun))