summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-19 23:33:21 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-19 23:33:21 +0000
commite7eaba7b345f1e5620084876bf00628f5666ae5f (patch)
tree1d6021fe1d646d929e1b51598497ba71d3a24003
parentaf3d13d65649d3f6be184ad691382f31e6c5b674 (diff)
downloadppe42-gcc-e7eaba7b345f1e5620084876bf00628f5666ae5f.tar.gz
ppe42-gcc-e7eaba7b345f1e5620084876bf00628f5666ae5f.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158533 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/lto/lto.c31
-rw-r--r--gcc/opts.c10
3 files changed, 26 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5fc2dfcca46..bf3c1b115d7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index de53a09f87d..dc6ccb50af8 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -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. */
diff --git a/gcc/opts.c b/gcc/opts.c
index 19d56348e2e..0e86ab065d7 100644
--- a/gcc/opts.c
+++ b/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)
{
OpenPOWER on IntegriCloud