summaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-07 12:11:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-08-07 12:11:43 +0000
commit5f33a4fc3ebcee4a661ed760d037ecfdbb00cfc5 (patch)
tree02e3ec579b10a719a3d7f4d2ad5c2cdc6cc883c1 /gcc/tree-nested.c
parentdcc748dd77c692eb3ef01043a8fed55c796f6f0e (diff)
downloadgcc-5f33a4fc3ebcee4a661ed760d037ecfdbb00cfc5.tar.gz
tree-into-ssa.c (rewrite_stmt): Remove clobbers for variables we rewrite into SSA form.
2012-08-07 Richard Guenther <rguenther@suse.de> * tree-into-ssa.c (rewrite_stmt): Remove clobbers for variables we rewrite into SSA form. (rewrite_enter_block): Adjust. * gimple-iterator.c (gsi_replace): Also allow replacement with a stmt without a lhs. * tree-ssa-live.c (remove_unused_locals): Remove code handling clobbers of SSA names. * tree-nested.c (convert_local_reference_stmt): Remove clobbers for variables we access through the local chain. * tree-cfg.c (verify_gimple_assign_single): Verify clobbers clobber full decls only. From-SVN: r190200
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index c0a6250fe58..0b99803615d 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1727,6 +1727,20 @@ convert_local_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
*handled_ops_p = false;
return NULL_TREE;
+ case GIMPLE_ASSIGN:
+ if (gimple_clobber_p (stmt))
+ {
+ tree lhs = gimple_assign_lhs (stmt);
+ if (!use_pointer_in_frame (lhs)
+ && lookup_field_for_decl (info, lhs, NO_INSERT))
+ {
+ gsi_replace (gsi, gimple_build_nop (), true);
+ break;
+ }
+ }
+ *handled_ops_p = false;
+ return NULL_TREE;
+
default:
/* For every other statement that we are not interested in
handling here, let the walker traverse the operands. */