summaryrefslogtreecommitdiff
path: root/gcc/tree-optimize.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-19 17:48:14 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-19 17:48:14 +0000
commitf366e311f9186b9c92c6978e47746056e034b2be (patch)
treefd4ad357e824025e7c4b4e847e0e68e03bbfd48b /gcc/tree-optimize.c
parent21991e41915ce568aa0fb3e873a64790916f4925 (diff)
downloadgcc-f366e311f9186b9c92c6978e47746056e034b2be.tar.gz
* tree-optimize.c (execute_early_local_optimizations): Set
cgraph_state only at first invocation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r--gcc/tree-optimize.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 84e1e9d9db3..35feaa1be5b 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -111,7 +111,11 @@ struct simple_ipa_opt_pass pass_early_local_passes =
static unsigned int
execute_early_local_optimizations (void)
{
- if (flag_unit_at_a_time)
+ /* First time we start with early optimization we need to advance
+ cgraph state so newly inserted functions are also early optimized.
+ However we execute early local optimizations for lately inserted
+ functions, in that case don't reset cgraph state back to IPA_SSA. */
+ if (flag_unit_at_a_time && cgraph_state < CGRAPH_STATE_IPA_SSA)
cgraph_state = CGRAPH_STATE_IPA_SSA;
return 0;
}