aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-17 16:18:24 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-17 16:18:24 +0000
commit649597afddfe936498abe475a23f709ced1942d5 (patch)
treea5366c0ffa8ef61e2d0da52de00aa6d5a7cf2871 /gcc/cgraphunit.c
parentc146feabc2b4f55da94365a816c48e015b6ba037 (diff)
PR debug/47106
PR debug/47402 * cfgexpand.c (account_used_vars_for_block): Remove. (estimated_stack_frame_size): Use referenced vars. * tree-inline.c (remap_decl): Only mark VAR_DECLs as referenced that were referenced in the original function. Test src_fn rather than cfun. Drop redundant get_var_ann. (setup_one_parameter): Drop redundant get_var_ann. (declare_return_variable): Likewise. (copy_decl_for_dup_finish): Mark VAR_DECLs referenced in src_fn. (copy_arguments_for_versioning): Drop redundant get_var_ann. * ipa-inline.c (compute_inline_parameters): Do not compute disregard_inline_limits here. are not available. (compute_inlinable_for_current, pass_inlinable): New. (pass_inline_parameters): Require PROP_referenced_vars. * cgraphunit.c (cgraph_process_new_functions): Don't run compute_inline_parameters explicitly unless function is in SSA form. (cgraph_analyze_function): Set .disregard_inline_limits. * tree-sra.c (convert_callers): Compute inliner parameters only for functions already in SSA form. * g++.dg/debug/pr47106.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170249 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 7a10ef44e6b..049d1b9f7b6 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -246,13 +246,14 @@ cgraph_process_new_functions (void)
cgraph_analyze_function (node);
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
current_function_decl = fndecl;
- compute_inline_parameters (node);
if ((cgraph_state == CGRAPH_STATE_IPA_SSA
&& !gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
/* When not optimizing, be sure we run early local passes anyway
to expand OMP. */
|| !optimize)
execute_pass_list (pass_early_local_passes.pass.sub);
+ else
+ compute_inline_parameters (node);
free_dominance_info (CDI_POST_DOMINATORS);
free_dominance_info (CDI_DOMINATORS);
pop_cfun ();
@@ -783,6 +784,11 @@ cgraph_analyze_function (struct cgraph_node *node)
assign_assembler_name_if_neeeded (node->decl);
+ /* disregard_inline_limits affects topological order of the early optimization,
+ so we need to compute it ahead of rest of inline parameters. */
+ node->local.disregard_inline_limits
+ = DECL_DISREGARD_INLINE_LIMITS (node->decl);
+
/* Make sure to gimplify bodies only once. During analyzing a
function we lower it, which will require gimplified nested
functions, so we can end up here with an already gimplified