aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJames E Wilson <wilson@tuliptree.org>2017-10-10 20:23:41 -0700
committerJim Wilson <wilson@gcc.gnu.org>2017-10-10 20:23:41 -0700
commite9593da8cc07949e85354d1ff316438e63be076d (patch)
treeb694fe13b1d924eedb3c12f322ea83171115c328 /gcc
parent9ef8d30e92371923a3f5e0c788fc93604f02ccb7 (diff)
downloadgcc-e9593da8cc07949e85354d1ff316438e63be076d.zip
gcc-e9593da8cc07949e85354d1ff316438e63be076d.tar.gz
gcc-e9593da8cc07949e85354d1ff316438e63be076d.tar.bz2
Allow 2 insns from sched group to issue in same cycle, if no stalls needed.
gcc/ PR rtl-optimization/81434 * haifa-sched.c (prune_ready_list): Init min_cost_group to 0. Update comment for main loop. In sched_group_found if, also add checks for pass and min_cost_group. From-SVN: r253628
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/haifa-sched.c9
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e42eb50..61ec983 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-10 Jim Wilson <wilson@tuliptree.org>
+
+ PR rtl-optimization/81434
+ * haifa-sched.c (prune_ready_list): Init min_cost_group to 0. Update
+ comment for main loop. In sched_group_found if, also add checks for
+ pass and min_cost_group.
+
2017-10-10 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (TARGET_INSN_COST): New.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index e7014cb..d6dab57 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -6303,7 +6303,7 @@ prune_ready_list (state_t temp_state, bool first_cycle_insn_p,
{
int i, pass;
bool sched_group_found = false;
- int min_cost_group = 1;
+ int min_cost_group = 0;
if (sched_fusion)
return;
@@ -6319,8 +6319,8 @@ prune_ready_list (state_t temp_state, bool first_cycle_insn_p,
}
/* Make two passes if there's a SCHED_GROUP_P insn; make sure to handle
- such an insn first and note its cost, then schedule all other insns
- for one cycle later. */
+ such an insn first and note its cost. If at least one SCHED_GROUP_P insn
+ gets queued, then all other insns get queued for one cycle later. */
for (pass = sched_group_found ? 0 : 1; pass < 2; )
{
int n = ready.n_ready;
@@ -6333,7 +6333,8 @@ prune_ready_list (state_t temp_state, bool first_cycle_insn_p,
if (DEBUG_INSN_P (insn))
continue;
- if (sched_group_found && !SCHED_GROUP_P (insn))
+ if (sched_group_found && !SCHED_GROUP_P (insn)
+ && ((pass == 0) || (min_cost_group >= 1)))
{
if (pass == 0)
continue;