summaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-07 12:11:43 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-07 12:11:43 +0000
commiteb54054d68ce7a732815f0450c67f3ff76ac9ad4 (patch)
tree02e3ec579b10a719a3d7f4d2ad5c2cdc6cc883c1 /gcc/tree-nested.c
parent9c06f2609ecb5c30d82d103ad5492983e3393392 (diff)
downloadgcc-eb54054d68ce7a732815f0450c67f3ff76ac9ad4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190200 138bc75d-0d04-0410-961f-82ee72b054a4
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. */