This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Mainline merge as of 2003-11-11
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 12 Nov 2003 21:37:34 -0500
- Subject: [tree-ssa] Mainline merge as of 2003-11-11
- Organization: Red Hat Canada
Bootstrapped and tested on x86, amd64 and ia64.
The only notable bug exposed by the merge was the inliner not marking
new variables as 'seen_in_bind_expr'. Fixed with:
(declare_inlined_vars): New local function.
(initialize_inlined_parameters): Call it.
(expand_call_inline): Call it.
*** tree-inline.c 2003/11/12 18:45:14 1.1
--- tree-inline.c 2003/11/12 19:11:20
*************** static tree add_stmt_to_compound (tree,
*** 136,141 ****
--- 136,142 ----
static void copy_bind_expr (tree *, int *, inline_data *);
static tree mark_local_for_remap_r (tree *, int *, void *);
static tree unsave_r (tree *, int *, void *);
+ static void declare_inline_vars (tree bind_expr, tree vars);
/* Remap DECL during the copying of the BLOCK tree for the function. */
*************** initialize_inlined_parameters (inline_da
*** 791,797 ****
if (gimplify_init_stmts_p && lang_hooks.gimple_before_inlining)
gimplify_body (&init_stmts, fn);
! add_var_to_bind_expr (bind_expr, vars);
return init_stmts;
}
--- 792,798 ----
if (gimplify_init_stmts_p && lang_hooks.gimple_before_inlining)
gimplify_body (&init_stmts, fn);
! declare_inline_vars (bind_expr, vars);
return init_stmts;
}
*************** expand_call_inline (tree *tp, int *walk_
*** 1474,1480 ****
/* Declare the return variable for the function. */
decl = declare_return_variable (id, return_slot_addr, &use_retvar);
if (decl)
! add_var_to_bind_expr (expr, decl);
/* After we've initialized the parameters, we insert the body of the
function itself. */
--- 1475,1481 ----
/* Declare the return variable for the function. */
decl = declare_return_variable (id, return_slot_addr, &use_retvar);
if (decl)
! declare_inline_vars (expr, decl);
/* After we've initialized the parameters, we insert the body of the
function itself. */
*************** debug_find_tree (tree top, tree search)
*** 2274,2276 ****
--- 2275,2294 ----
{
return walk_tree_without_duplicates (&top, debug_find_tree_1, search) != 0;
}
+
+
+ /* Declare the variables created by the inliner. Add all the variables in
+ VARS to BIND_EXPR. */
+
+ static void
+ declare_inline_vars (tree bind_expr, tree vars)
+ {
+ if (lang_hooks.gimple_before_inlining)
+ {
+ tree t;
+ for (t = vars; t; t = TREE_CHAIN (t))
+ vars->decl.seen_in_bind_expr = 1;
+ }
+
+ add_var_to_bind_expr (bind_expr, vars);
+ }