This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch of Jan's to fix obstack initialization problem committed totree-profiling branch


tested on darwin with no regressions. Jan said to commit it if it worked.

2005-01-18 Jan Hubicka <jh@suse.cz> (committed by Kenneth Zadeck <zadeck@naturalbridge.com>)
* cgraphunit.c (cgraph_optimize): fixed improperly initialized bitmap obstack.
* tree-optimize.c (tree_lowering_passes, tree_early_local_passes):
fixed improperly initialized bitmap obstack.


kenny



Jan Hubicka wrote:

Hi,
a better version of the patch ;)

Index: cgraphunit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
retrieving revision 1.1.4.35.2.39
diff -c -3 -p -r1.1.4.35.2.39 cgraphunit.c
*** cgraphunit.c 15 Jan 2005 21:14:34 -0000 1.1.4.35.2.39
--- cgraphunit.c 18 Jan 2005 13:31:47 -0000
*************** cgraph_optimize (void)
*** 1194,1200 ****
--- 1194,1202 ----
dump_varpool (cgraph_dump_file);
}
+ bitmap_obstack_initialize (NULL);
ipa_passes ();
+ bitmap_obstack_release (NULL);
/* FIXME: this should be unnecesary if inliner took care of removing dead
functions. */
cgraph_remove_unreachable_nodes (false, dump_file); Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.122.2.32
diff -c -3 -p -r1.1.4.122.2.32 tree-optimize.c
*** tree-optimize.c 15 Jan 2005 21:14:34 -0000 1.1.4.122.2.32
--- tree-optimize.c 18 Jan 2005 13:31:47 -0000
*************** tree_lowering_passes (tree fn)
*** 694,702 ****
current_function_decl = fn;
push_cfun (DECL_STRUCT_FUNCTION (fn));
tree_register_cfg_hooks ();
execute_pass_list (all_lowering_passes, EXECUTE_HOOK, NULL, NULL);
! current_function_decl = saved_current_function_decl;
compact_blocks ();
pop_cfun ();
}
--- 694,705 ----
current_function_decl = fn;
push_cfun (DECL_STRUCT_FUNCTION (fn));
tree_register_cfg_hooks ();
+ bitmap_obstack_initialize (NULL);
execute_pass_list (all_lowering_passes, EXECUTE_HOOK, NULL, NULL);
! free_dominance_info (CDI_POST_DOMINATORS);
compact_blocks ();
+ current_function_decl = saved_current_function_decl;
+ bitmap_obstack_release (NULL);
pop_cfun ();
}
*************** tree_early_local_passes (tree fn)
*** 707,716 ****
current_function_decl = fn;
push_cfun (DECL_STRUCT_FUNCTION (fn));
tree_register_cfg_hooks ();
execute_pass_list (all_early_local_passes, EXECUTE_HOOK, NULL, NULL);
! current_function_decl = saved_current_function_decl;
compact_blocks ();
pop_cfun ();
}
--- 710,723 ----
current_function_decl = fn;
push_cfun (DECL_STRUCT_FUNCTION (fn));
+ bitmap_obstack_initialize (NULL);
tree_register_cfg_hooks ();
execute_pass_list (all_early_local_passes, EXECUTE_HOOK, NULL, NULL);
! free_dominance_info (CDI_DOMINATORS);
! free_dominance_info (CDI_POST_DOMINATORS);
compact_blocks ();
+ current_function_decl = saved_current_function_decl;
+ bitmap_obstack_release (NULL);
pop_cfun ();
}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]