diff options
author | Richard Biener <rguenther@suse.de> | 2016-04-19 12:13:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-04-19 12:13:04 +0000 |
commit | d247f8e23afb71d88a38105d3bdc342b5ecd9edc (patch) | |
tree | 221ac9b3dfe9da860699b5550f4d105eeac0c368 /gcc/tree-inline.c | |
parent | 987b67f17c8759c47f83732b9336fbe0795d2baf (diff) | |
download | gcc-d247f8e23afb71d88a38105d3bdc342b5ecd9edc.zip gcc-d247f8e23afb71d88a38105d3bdc342b5ecd9edc.tar.gz gcc-d247f8e23afb71d88a38105d3bdc342b5ecd9edc.tar.bz2 |
gimple-walk.h (struct walk_stmt_info): Add stmt member.
2016-04-19 Richard Biener <rguenther@suse.de>
* gimple-walk.h (struct walk_stmt_info): Add stmt member.
* gimple-walk.c (walk_gimple_op): Initialize it.
(walk_gimple_asm): Set wi->is_lhs before each callback invocation.
* tree-inline.c (remap_gimple_op_r): Set SSA_NAME_DEF_STMT when
remapping SSA names of defs.
(copy_bb): Remove walk over all SSA defs and SSA_NAME_DEF_STMT
adjustment.
From-SVN: r235190
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index a4e044c..015a907 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -863,10 +863,16 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data) copy_body_data *id = (copy_body_data *) wi_p->info; tree fn = id->src_fn; + /* For recursive invocations this is no longer the LHS itself. */ + bool is_lhs = wi_p->is_lhs; + wi_p->is_lhs = false; + if (TREE_CODE (*tp) == SSA_NAME) { *tp = remap_ssa_name (*tp, id); *walk_subtrees = 0; + if (is_lhs) + SSA_NAME_DEF_STMT (*tp) = wi_p->stmt; return NULL; } else if (auto_var_in_fn_p (*tp, fn)) @@ -2095,16 +2101,6 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, maybe_duplicate_eh_stmt_fn (cfun, stmt, id->src_cfun, orig_stmt, id->eh_map, id->eh_lp_nr); - if (gimple_in_ssa_p (cfun) && !is_gimple_debug (stmt)) - { - ssa_op_iter i; - tree def; - - FOR_EACH_SSA_TREE_OPERAND (def, stmt, i, SSA_OP_DEF) - if (TREE_CODE (def) == SSA_NAME) - SSA_NAME_DEF_STMT (def) = stmt; - } - gsi_next (©_gsi); } while (!gsi_end_p (copy_gsi)); |