aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-03-26 14:56:30 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-03-26 14:56:30 +0000
commitcf66c831c1e05bbea0ef859ed3ae0027c476c618 (patch)
tree31b1a9089a51542a6f00d1b9233f09e2a5a8ff29 /gcc/gimple-low.c
parentecbb1530e317e8b405d29dead5b080fe2ef9f50c (diff)
downloadgcc-cf66c831c1e05bbea0ef859ed3ae0027c476c618.zip
gcc-cf66c831c1e05bbea0ef859ed3ae0027c476c618.tar.gz
gcc-cf66c831c1e05bbea0ef859ed3ae0027c476c618.tar.bz2
tree-inline.c (remap_gimple_stmt): Cache gimple_block.
2019-03-26 Richard Biener <rguenther@suse.de> * tree-inline.c (remap_gimple_stmt): Cache gimple_block. (copy_debug_stmt): Likewise. (expand_call_inline): Likewise. (copy_bb): Avoid redundant lookup & set of gimple_block. * gimple-low.c (lower_gimple_return): Likewise. (lower_builtin_setjmp): Likewise. From-SVN: r269946
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 056b0cb..1ae3db0 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -723,8 +723,8 @@ lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
if (!optimize && gimple_has_location (stmt))
DECL_ARTIFICIAL (tmp_rs.label) = 0;
t = gimple_build_goto (tmp_rs.label);
+ /* location includes block. */
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);
}
@@ -806,8 +806,8 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
arg = build_addr (next_label);
t = builtin_decl_implicit (BUILT_IN_SETJMP_SETUP);
g = gimple_build_call (t, 2, gimple_call_arg (stmt, 0), arg);
+ /* location includes block. */
gimple_set_location (g, loc);
- gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
/* Build 'DEST = 0' and insert. */
@@ -815,7 +815,6 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
{
g = gimple_build_assign (dest, build_zero_cst (TREE_TYPE (dest)));
gimple_set_location (g, loc);
- gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
}
@@ -832,7 +831,6 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
t = builtin_decl_implicit (BUILT_IN_SETJMP_RECEIVER);
g = gimple_build_call (t, 1, arg);
gimple_set_location (g, loc);
- gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
/* Build 'DEST = 1' and insert. */
@@ -841,7 +839,6 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
g = gimple_build_assign (dest, fold_convert_loc (loc, TREE_TYPE (dest),
integer_one_node));
gimple_set_location (g, loc);
- gimple_set_block (g, gimple_block (stmt));
gsi_insert_before (gsi, g, GSI_SAME_STMT);
}