aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-12-11 15:38:55 +0100
committerDuncan Sands <baldrick@gcc.gnu.org>2009-12-11 14:38:55 +0000
commit63a00e0d9139428cec7f5b5471ae036ee3d73db4 (patch)
tree7e2fd62095299f4918b903dffa1b8bd2df81d455 /gcc/passes.c
parent9cf10655bb78b500581f2e3e9bfd0d44cbee7d5c (diff)
downloadgcc-63a00e0d9139428cec7f5b5471ae036ee3d73db4.zip
gcc-63a00e0d9139428cec7f5b5471ae036ee3d73db4.tar.gz
gcc-63a00e0d9139428cec7f5b5471ae036ee3d73db4.tar.bz2
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
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 818adde..a373a00 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -460,8 +460,21 @@ make_pass_instance (struct opt_pass *pass, bool track_duplicates)
{
struct opt_pass *new_pass;
- new_pass = XNEW (struct opt_pass);
- memcpy (new_pass, pass, sizeof (*new_pass));
+ if (pass->type == GIMPLE_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->todo_flags_start &= ~TODO_mark_first_instance;