aboutsummaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2013-12-03 18:35:24 +0000
committerWei Mi <wmi@gcc.gnu.org>2013-12-03 18:35:24 +0000
commitba4fa5819f91c7e82eb08ff33fd61b106715a54e (patch)
treec7fa75151c5a9cc592c2871ba91390f22dffed86 /gcc/haifa-sched.c
parent05db108d6b1f073795f7aae33a30791f343c2f60 (diff)
downloadgcc-ba4fa5819f91c7e82eb08ff33fd61b106715a54e.zip
gcc-ba4fa5819f91c7e82eb08ff33fd61b106715a54e.tar.gz
gcc-ba4fa5819f91c7e82eb08ff33fd61b106715a54e.tar.bz2
re PR rtl-optimization/59020 (internal compiler error: in maybe_add_or_update_dep_1, at sched-deps.c:933)
2013-12-03 Wei Mi <wmi@google.com> PR rtl-optimization/59020 * sched-deps.c (try_group_insn): Move it from haifa-sched.c to here. (sched_analyze_insn): Call try_group_insn. (sched_analyze): Cleanup SCHED_GROUP_P before start the analysis. * haifa-sched.c (try_group_insn): Moved to sched-deps.c. (group_insns_for_macro_fusion): Removed. (sched_init): Remove calling group_insns_for_macro_fusion. 2013-12-03 Wei Mi <wmi@google.com> PR rtl-optimization/59020 * testsuite/gcc.dg/pr59020.c: New. * testsuite/gcc.dg/macro-fusion-1.c: New. * testsuite/gcc.dg/macro-fusion-2.c: New. From-SVN: r205644
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index d96d16c..8d47eb9 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -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. */
@@ -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);