Commit 575b1925 by Eric Botcazou Committed by Eric Botcazou

tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of…

tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of create_tmp_var_for to create the FRAME decl.

	* tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
	create_tmp_var_for to create the FRAME decl.
	(finalize_nesting_tree_1): Do not unchain the FRAME decl.

From-SVN: r261854
parent 29cbd18b
2018-06-21 Eric Botcazou <ebotcazou@adacore.com> 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
* tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
create_tmp_var_for to create the FRAME decl.
(finalize_nesting_tree_1): Do not unchain the FRAME decl.
2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.c (copy_edges_for_bb): Minor tweak. * tree-inline.c (copy_edges_for_bb): Minor tweak.
(maybe_move_debug_stmts_to_successors): Also reset the locus of the (maybe_move_debug_stmts_to_successors): Also reset the locus of the
debug statement when resetting its value. debug statement when resetting its value.
......
...@@ -223,8 +223,15 @@ get_frame_type (struct nesting_info *info) ...@@ -223,8 +223,15 @@ get_frame_type (struct nesting_info *info)
free (name); free (name);
info->frame_type = type; info->frame_type = type;
info->frame_decl = create_tmp_var_for (info, type, "FRAME");
/* Do not put info->frame_decl on info->new_local_var_chain,
so that we can declare it in the lexical blocks, which
makes sure virtual regs that end up appearing in its RTL
expression get substituted in instantiate_virtual_regs. */
info->frame_decl = create_tmp_var_raw (type, "FRAME");
DECL_CONTEXT (info->frame_decl) = info->context;
DECL_NONLOCAL_FRAME (info->frame_decl) = 1; DECL_NONLOCAL_FRAME (info->frame_decl) = 1;
DECL_SEEN_IN_BIND_EXPR_P (info->frame_decl) = 1;
/* ??? Always make it addressable for now, since it is meant to /* ??? Always make it addressable for now, since it is meant to
be pointed to by the static chain pointer. This pessimizes be pointed to by the static chain pointer. This pessimizes
...@@ -234,6 +241,7 @@ get_frame_type (struct nesting_info *info) ...@@ -234,6 +241,7 @@ get_frame_type (struct nesting_info *info)
local frame structure in the first place. */ local frame structure in the first place. */
TREE_ADDRESSABLE (info->frame_decl) = 1; TREE_ADDRESSABLE (info->frame_decl) = 1;
} }
return type; return type;
} }
...@@ -3117,18 +3125,6 @@ finalize_nesting_tree_1 (struct nesting_info *root) ...@@ -3117,18 +3125,6 @@ finalize_nesting_tree_1 (struct nesting_info *root)
gimple_seq_add_stmt (&stmt_list, gimple_seq_add_stmt (&stmt_list,
gimple_build_assign (fb_ref, fb_tmp)); gimple_build_assign (fb_ref, fb_tmp));
/* Remove root->frame_decl from root->new_local_var_chain, so
that we can declare it also in the lexical blocks, which
helps ensure virtual regs that end up appearing in its RTL
expression get substituted in instantiate_virtual_regs(). */
tree *adjust;
for (adjust = &root->new_local_var_chain;
*adjust != root->frame_decl;
adjust = &DECL_CHAIN (*adjust))
gcc_assert (DECL_CHAIN (*adjust));
*adjust = DECL_CHAIN (*adjust);
DECL_CHAIN (root->frame_decl) = NULL_TREE;
declare_vars (root->frame_decl, declare_vars (root->frame_decl,
gimple_seq_first_stmt (gimple_body (context)), true); gimple_seq_first_stmt (gimple_body (context)), true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment