aboutsummaryrefslogtreecommitdiff
path: root/gcc/ssa.c
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>2002-01-12 04:14:50 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>2002-01-12 04:14:50 +0000
commitcdb574d383b485bbee692ab4763fb1ac4be5e34d (patch)
tree47df6508da9cc82385c9decb1dd19e83285dd868 /gcc/ssa.c
parentcf11ac5596a2a5f7ebb0f8269e45aac2f85954df (diff)
downloadgcc-cdb574d383b485bbee692ab4763fb1ac4be5e34d.zip
gcc-cdb574d383b485bbee692ab4763fb1ac4be5e34d.tar.gz
gcc-cdb574d383b485bbee692ab4763fb1ac4be5e34d.tar.bz2
conflict.c (conflict_graph_compute): Free regsets when finished.
* conflict.c (conflict_graph_compute): Free regsets when finished. * ssa.c (compute_coalesced_reg_partition): Likewise. From-SVN: r48792
Diffstat (limited to 'gcc/ssa.c')
-rw-r--r--gcc/ssa.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ssa.c b/gcc/ssa.c
index bb71706..503d1a7 100644
--- a/gcc/ssa.c
+++ b/gcc/ssa.c
@@ -1850,6 +1850,8 @@ compute_coalesced_reg_partition ()
{
int bb;
int changed = 0;
+ regset_head phi_set_head;
+ regset phi_set = &phi_set_head;
partition p =
partition_new (ssa_definition->num_elements);
@@ -1861,20 +1863,21 @@ compute_coalesced_reg_partition ()
for (bb = n_basic_blocks; --bb >= 0; )
make_regs_equivalent_over_bad_edges (bb, p);
+ INIT_REG_SET (phi_set);
+
do
{
- regset_head phi_set;
conflict_graph conflicts;
changed = 0;
/* Build the set of registers involved in phi nodes, either as
arguments to the phi function or as the target of a set. */
- INITIALIZE_REG_SET (phi_set);
- mark_phi_and_copy_regs (&phi_set);
+ CLEAR_REG_SET (phi_set);
+ mark_phi_and_copy_regs (phi_set);
/* Compute conflicts. */
- conflicts = conflict_graph_compute (&phi_set, p);
+ conflicts = conflict_graph_compute (phi_set, p);
/* FIXME: Better would be to process most frequently executed
blocks first, so that most frequently executed copies would
@@ -1892,6 +1895,8 @@ compute_coalesced_reg_partition ()
}
while (changed > 0);
+ FREE_REG_SET (phi_set);
+
return p;
}