Commit 5d7cefe5 by Michael Matz Committed by Michael Matz

re PR middle-end/38474 (compile time explosion in dataflow_set_preserve_mem_locs at -O3)

	PR middle-end/38474
	* function.c (free_temp_slots): Only walk the temp slot
	addresses and combine slots if we actually changes something.
	(pop_temp_slots): Ditto.

From-SVN: r155087
parent 41a394bb
2009-12-08 Michael Matz <matz@suse.de>
PR middle-end/38474
* function.c (free_temp_slots): Only walk the temp slot
addresses and combine slots if we actually changes something.
(pop_temp_slots): Ditto.
2009-12-08 Olga Golovanevsky <olga@il.ibm.com> 2009-12-08 Olga Golovanevsky <olga@il.ibm.com>
PR middle-end/41843 PR middle-end/41843
...@@ -1164,17 +1164,24 @@ void ...@@ -1164,17 +1164,24 @@ void
free_temp_slots (void) free_temp_slots (void)
{ {
struct temp_slot *p, *next; struct temp_slot *p, *next;
bool some_available = false;
for (p = *temp_slots_at_level (temp_slot_level); p; p = next) for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
{ {
next = p->next; next = p->next;
if (!p->keep) if (!p->keep)
{
make_slot_available (p); make_slot_available (p);
some_available = true;
}
} }
if (some_available)
{
remove_unused_temp_slot_addresses (); remove_unused_temp_slot_addresses ();
combine_temp_slots (); combine_temp_slots ();
}
} }
/* Push deeper into the nesting level for stack temporaries. */ /* Push deeper into the nesting level for stack temporaries. */
...@@ -1192,15 +1199,20 @@ void ...@@ -1192,15 +1199,20 @@ void
pop_temp_slots (void) pop_temp_slots (void)
{ {
struct temp_slot *p, *next; struct temp_slot *p, *next;
bool some_available = false;
for (p = *temp_slots_at_level (temp_slot_level); p; p = next) for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
{ {
next = p->next; next = p->next;
make_slot_available (p); make_slot_available (p);
some_available = true;
} }
if (some_available)
{
remove_unused_temp_slot_addresses (); remove_unused_temp_slot_addresses ();
combine_temp_slots (); combine_temp_slots ();
}
temp_slot_level--; temp_slot_level--;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment