aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-10-09 10:14:45 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-10-09 10:14:45 +0200
commitcc2a64dd80513c1155fad3370bc639daa97b7404 (patch)
tree1599f2d75e2a457f0aed00567cfc9d802c798435 /gcc/gimple-low.c
parenta3d3c0f5fa9cd88e6285f60c593cb753cc53d4c2 (diff)
downloadgcc-cc2a64dd80513c1155fad3370bc639daa97b7404.zip
gcc-cc2a64dd80513c1155fad3370bc639daa97b7404.tar.gz
gcc-cc2a64dd80513c1155fad3370bc639daa97b7404.tar.bz2
tree-ssa-live.c (remove_unused_locals): Mark all edge's goto_block as used.
* tree-ssa-live.c (remove_unused_locals): Mark all edge's goto_block as used. * gimple-low.c (lower_function_body, lower_gimple_return, lower_builtin_setjmp): Set gimple_block on the newly created stmts. * tree-cfg.c (make_cond_expr_edges, make_goto_expr_edges): Only set goto_block on edges if goto_locus is known. From-SVN: r141002
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 99f8754..197ba35 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -133,6 +133,7 @@ lower_function_body (void)
{
x = gimple_build_return (NULL);
gimple_set_location (x, cfun->function_end_locus);
+ gimple_set_block (x, DECL_INITIAL (current_function_decl));
gsi_insert_after (&i, x, GSI_CONTINUE_LINKING);
}
@@ -659,6 +660,7 @@ lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
found:
t = gimple_build_goto (tmp_rs.label);
gimple_set_location (t, gimple_location (stmt));
+ gimple_set_block (t, gimple_block (stmt));
gsi_insert_before (gsi, t, GSI_SAME_STMT);
gsi_remove (gsi, false);
}
@@ -736,6 +738,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
t = implicit_built_in_decls[BUILT_IN_SETJMP_SETUP];
g = gimple_build_call (t, 2, gimple_call_arg (stmt, 0), arg);
gimple_set_location (g, gimple_location (stmt));
+ gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
/* Build 'DEST = 0' and insert. */
@@ -744,6 +747,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
g = gimple_build_assign (dest, fold_convert (TREE_TYPE (dest),
integer_zero_node));
gimple_set_location (g, gimple_location (stmt));
+ gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
}
@@ -760,6 +764,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
t = implicit_built_in_decls[BUILT_IN_SETJMP_RECEIVER];
g = gimple_build_call (t, 1, arg);
gimple_set_location (g, gimple_location (stmt));
+ gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
/* Build 'DEST = 1' and insert. */
@@ -768,6 +773,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
g = gimple_build_assign (dest, fold_convert (TREE_TYPE (dest),
integer_one_node));
gimple_set_location (g, gimple_location (stmt));
+ gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
}