Commit 63a00e0d by Duncan Sands Committed by Duncan Sands

IPA passes are bigger than other passes...

IPA passes are bigger than other passes, so more memory needs to be allocated
for them (and more copied) in make_pass_instance.

From-SVN: r155161
parent 9cf10655
2009-12-11 Duncan Sands <baldrick@free.fr>
* passes.c (make_pass_instance): Allocate and copy the right amount of
memory for ipa passes, which are not the same size as other passes.
2009-12-11 Joern Rennecke <amylaar@spamcop.net> 2009-12-11 Joern Rennecke <amylaar@spamcop.net>
* plugin.c (get_named_event_id): Fix hash table rebuild to include * plugin.c (get_named_event_id): Fix hash table rebuild to include
...@@ -460,8 +460,21 @@ make_pass_instance (struct opt_pass *pass, bool track_duplicates) ...@@ -460,8 +460,21 @@ make_pass_instance (struct opt_pass *pass, bool track_duplicates)
{ {
struct opt_pass *new_pass; struct opt_pass *new_pass;
new_pass = XNEW (struct opt_pass); if (pass->type == GIMPLE_PASS
memcpy (new_pass, pass, sizeof (*new_pass)); || pass->type == RTL_PASS
|| pass->type == SIMPLE_IPA_PASS)
{
new_pass = XNEW (struct opt_pass);
memcpy (new_pass, pass, sizeof (struct opt_pass));
}
else if (pass->type == IPA_PASS)
{
new_pass = (struct opt_pass *)XNEW (struct ipa_opt_pass_d);
memcpy (new_pass, pass, sizeof (struct ipa_opt_pass_d));
}
else
gcc_unreachable ();
new_pass->next = NULL; new_pass->next = NULL;
new_pass->todo_flags_start &= ~TODO_mark_first_instance; new_pass->todo_flags_start &= ~TODO_mark_first_instance;
......
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