opts.c (decode_options): Disable whpr incompatible passes.
* opts.c (decode_options): Disable whpr incompatible passes. * lto/lto.c (lto_1_to_1_map): Skip clones. (read_cgraph_and_symbols): Do not mark everything as needed. (do_whole_program_analysis): Do map only after optimizing; set proper cgraph_state; use passmanager. From-SVN: r158533
This commit is contained in:
parent
576319a79a
commit
3ee2243c06
|
@ -1,3 +1,11 @@
|
|||
2010-04-19 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* opts.c (decode_options): Disable whpr incompatible passes.
|
||||
* lto/lto.c (lto_1_to_1_map): Skip clones.
|
||||
(read_cgraph_and_symbols): Do not mark everything as needed.
|
||||
(do_whole_program_analysis): Do map only after optimizing;
|
||||
set proper cgraph_state; use passmanager.
|
||||
|
||||
2010-04-19 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* cfgexpand.c (expand_debug_expr): Check for mismatched modes in
|
||||
|
|
|
@ -554,6 +554,10 @@ lto_1_to_1_map (void)
|
|||
|
||||
for (node = cgraph_nodes; node; node = node->next)
|
||||
{
|
||||
/* We will get proper partition based on function they are inlined to or
|
||||
cloned from. */
|
||||
if (node->global.inlined_to || node->clone_of)
|
||||
continue;
|
||||
/* We only need to partition the nodes that we read from the
|
||||
gimple bytecode files. */
|
||||
file_data = node->local.lto_file_data;
|
||||
|
@ -1881,19 +1885,9 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
|
|||
/* Finally merge the cgraph according to the decl merging decisions. */
|
||||
lto_symtab_merge_cgraph_nodes ();
|
||||
|
||||
/* Mark cgraph nodes needed in the merged cgraph
|
||||
This normally happens in whole-program pass, but for
|
||||
ltrans the pass was already run at WPA phase.
|
||||
|
||||
FIXME: This is not valid way to do so; nodes can be needed
|
||||
for non-obvious reasons. We should stream the flags from WPA
|
||||
phase. */
|
||||
if (flag_ltrans)
|
||||
for (node = cgraph_nodes; node; node = node->next)
|
||||
{
|
||||
if (!node->global.inlined_to
|
||||
&& cgraph_decide_is_function_needed (node, node->decl))
|
||||
cgraph_mark_needed_node (node);
|
||||
/* FIXME: ipa_transforms_to_apply holds list of passes that have optimization
|
||||
summaries computed and needs to apply changes. At the moment WHOPR only
|
||||
supports inlining, so we can push it here by hand. In future we need to stream
|
||||
|
@ -1986,9 +1980,6 @@ do_whole_program_analysis (void)
|
|||
{
|
||||
char **output_files;
|
||||
size_t i;
|
||||
struct cgraph_node *node;
|
||||
|
||||
lto_1_to_1_map ();
|
||||
|
||||
/* Note that since we are in WPA mode, materialize_cgraph will not
|
||||
actually read in all the function bodies. It only materializes
|
||||
|
@ -1998,20 +1989,12 @@ do_whole_program_analysis (void)
|
|||
/* Reading in the cgraph uses different timers, start timing WPA now. */
|
||||
timevar_push (TV_WHOPR_WPA);
|
||||
|
||||
/* FIXME lto. Hack. We should use the IPA passes. There are a
|
||||
number of issues with this now. 1. There is no convenient way to
|
||||
do this. 2. Some passes may depend on properties that requires
|
||||
the function bodies to compute. */
|
||||
cgraph_function_flags_ready = true;
|
||||
bitmap_obstack_initialize (NULL);
|
||||
ipa_register_cgraph_hooks ();
|
||||
cgraph_state = CGRAPH_STATE_IPA_SSA;
|
||||
|
||||
/* Reset inlining information before running IPA inliner. */
|
||||
for (node = cgraph_nodes; node; node = node->next)
|
||||
reset_inline_failed (node);
|
||||
|
||||
/* FIXME lto. We should not call this function directly. */
|
||||
pass_ipa_inline.pass.execute ();
|
||||
execute_ipa_pass_list (all_regular_ipa_passes);
|
||||
|
||||
verify_cgraph ();
|
||||
bitmap_obstack_release (NULL);
|
||||
|
@ -2019,6 +2002,8 @@ do_whole_program_analysis (void)
|
|||
/* We are about to launch the final LTRANS phase, stop the WPA timer. */
|
||||
timevar_pop (TV_WHOPR_WPA);
|
||||
|
||||
lto_1_to_1_map ();
|
||||
|
||||
output_files = lto_wpa_write_files ();
|
||||
|
||||
/* Show the LTO report before launching LTRANS. */
|
||||
|
|
10
gcc/opts.c
10
gcc/opts.c
|
@ -1120,6 +1120,16 @@ decode_options (unsigned int argc, const char **argv)
|
|||
if (!PARAM_SET_P (PARAM_STACK_FRAME_GROWTH))
|
||||
PARAM_VALUE (PARAM_STACK_FRAME_GROWTH) = 40;
|
||||
}
|
||||
if (flag_wpa || flag_ltrans)
|
||||
{
|
||||
/* These passes are not WHOPR compatible yet. */
|
||||
flag_ipa_cp = 0;
|
||||
flag_ipa_reference = 0;
|
||||
flag_ipa_pure_const = 0;
|
||||
flag_ipa_type_escape = 0;
|
||||
flag_ipa_pta = 0;
|
||||
flag_ipa_struct_reorg = 0;
|
||||
}
|
||||
|
||||
if (flag_lto || flag_whopr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue