summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-29 22:11:09 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-29 22:11:09 +0000
commitd922644ae1702b8554ddfbc5c76969f825065db2 (patch)
treef1ec78e8399786f4f666db63dd8c402e57174ae6 /gcc
parentc0a5a33abd00f4d14fa0a9b055b681723967de3c (diff)
downloadgcc-d922644ae1702b8554ddfbc5c76969f825065db2.tar.gz
* sched-int.h (struct deps_reg): Add uses_length, clobbers_length.
* sched-rgn.c (propagate_deps): Update them. * sched-deps.c (sched_analyze_insn): Update them. Flush the clobbers list when either gets too long. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/sched-deps.c68
-rw-r--r--gcc/sched-int.h2
-rw-r--r--gcc/sched-rgn.c2
4 files changed, 64 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fc8ce5c39cc..cedff732fa1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2002-01-29 Richard Henderson <rth@redhat.com>
+
+ * sched-int.h (struct deps_reg): Add uses_length, clobbers_length.
+ * sched-rgn.c (propagate_deps): Update them.
+ * sched-deps.c (sched_analyze_insn): Update them. Flush the
+ clobbers list when either gets too long.
+
2002-01-29 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.h (LIMIT_RELOAD_CLASS): Handle LEGACY_REGS
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index ef38b8bc0cd..384bab7db81 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -1058,6 +1058,8 @@ sched_analyze_insn (deps, x, insn, loop_notes)
REG_DEP_ANTI);
add_dependence_list_and_free (insn, &reg_last->sets, 0);
add_dependence_list_and_free (insn, &reg_last->clobbers, 0);
+ reg_last->uses_length = 0;
+ reg_last->clobbers_length = 0;
});
}
@@ -1073,25 +1075,26 @@ sched_analyze_insn (deps, x, insn, loop_notes)
}
else
{
- EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i,
- {
- struct deps_reg *reg_last = &deps->reg_last[i];
- add_dependence_list (insn, reg_last->sets, 0);
- add_dependence_list (insn, reg_last->clobbers, 0);
- reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
- });
- EXECUTE_IF_SET_IN_REG_SET (reg_pending_clobbers, 0, i,
- {
- struct deps_reg *reg_last = &deps->reg_last[i];
- add_dependence_list (insn, reg_last->sets, REG_DEP_OUTPUT);
- add_dependence_list (insn, reg_last->uses, REG_DEP_ANTI);
- reg_last->clobbers = alloc_INSN_LIST (insn, reg_last->clobbers);
- });
-
/* If the current insn is conditional, we can't free any
of the lists. */
if (GET_CODE (PATTERN (insn)) == COND_EXEC)
{
+ EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i,
+ {
+ struct deps_reg *reg_last = &deps->reg_last[i];
+ add_dependence_list (insn, reg_last->sets, 0);
+ add_dependence_list (insn, reg_last->clobbers, 0);
+ reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
+ reg_last->uses_length++;
+ });
+ EXECUTE_IF_SET_IN_REG_SET (reg_pending_clobbers, 0, i,
+ {
+ struct deps_reg *reg_last = &deps->reg_last[i];
+ add_dependence_list (insn, reg_last->sets, REG_DEP_OUTPUT);
+ add_dependence_list (insn, reg_last->uses, REG_DEP_ANTI);
+ reg_last->clobbers = alloc_INSN_LIST (insn, reg_last->clobbers);
+ reg_last->clobbers_length++;
+ });
EXECUTE_IF_SET_IN_REG_SET (reg_pending_sets, 0, i,
{
struct deps_reg *reg_last = &deps->reg_last[i];
@@ -1103,6 +1106,39 @@ sched_analyze_insn (deps, x, insn, loop_notes)
}
else
{
+ EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i,
+ {
+ struct deps_reg *reg_last = &deps->reg_last[i];
+ add_dependence_list (insn, reg_last->sets, 0);
+ add_dependence_list (insn, reg_last->clobbers, 0);
+ reg_last->uses_length++;
+ reg_last->uses = alloc_INSN_LIST (insn, reg_last->uses);
+ });
+ EXECUTE_IF_SET_IN_REG_SET (reg_pending_clobbers, 0, i,
+ {
+ struct deps_reg *reg_last = &deps->reg_last[i];
+ add_dependence_list (insn, reg_last->sets, REG_DEP_OUTPUT);
+ add_dependence_list (insn, reg_last->uses, REG_DEP_ANTI);
+ if (reg_last->uses_length > MAX_PENDING_LIST_LENGTH
+ || reg_last->clobbers_length > MAX_PENDING_LIST_LENGTH)
+ {
+ add_dependence_list_and_free (insn, &reg_last->sets,
+ REG_DEP_OUTPUT);
+ add_dependence_list_and_free (insn, &reg_last->uses,
+ REG_DEP_ANTI);
+ add_dependence_list_and_free (insn, &reg_last->clobbers,
+ REG_DEP_OUTPUT);
+ reg_last->clobbers_length = 0;
+ reg_last->uses_length = 0;
+ }
+ else
+ {
+ add_dependence_list (insn, reg_last->sets, REG_DEP_OUTPUT);
+ add_dependence_list (insn, reg_last->uses, REG_DEP_ANTI);
+ }
+ reg_last->clobbers_length++;
+ reg_last->clobbers = alloc_INSN_LIST (insn, reg_last->clobbers);
+ });
EXECUTE_IF_SET_IN_REG_SET (reg_pending_sets, 0, i,
{
struct deps_reg *reg_last = &deps->reg_last[i];
@@ -1113,6 +1149,8 @@ sched_analyze_insn (deps, x, insn, loop_notes)
add_dependence_list_and_free (insn, &reg_last->uses,
REG_DEP_ANTI);
reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
+ reg_last->uses_length = 0;
+ reg_last->clobbers_length = 0;
});
}
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index 851d058c74d..47910a0c2d5 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -96,6 +96,8 @@ struct deps
rtx uses;
rtx sets;
rtx clobbers;
+ int uses_length;
+ int clobbers_length;
} *reg_last;
/* Element N is set for each register that has any non-zero element
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index b7193aaf604..e5a241b6327 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -2427,6 +2427,8 @@ propagate_deps (bb, pred_deps)
succ_rl->sets = concat_INSN_LIST (pred_rl->sets, succ_rl->sets);
succ_rl->clobbers = concat_INSN_LIST (pred_rl->clobbers,
succ_rl->clobbers);
+ succ_rl->uses_length += pred_rl->uses_length;
+ succ_rl->clobbers_length += pred_rl->clobbers_length;
});
IOR_REG_SET (&succ_deps->reg_last_in_use, &pred_deps->reg_last_in_use);