summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-21 14:17:11 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-21 14:17:11 +0000
commitcf31ba88c8a04467a9989120c7b4dc91c884eeab (patch)
tree23e177b54c091472acd392ed87007fb1e4b2678b /gcc/tree-sra.c
parent89ac8ba1010f80f10f55ffe9d9445a25163266af (diff)
downloadgcc-cf31ba88c8a04467a9989120c7b4dc91c884eeab.tar.gz
2010-07-21 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44900 * tree-sra.c (load_assign_lhs_subreplacements): Updated comments. (sra_modify_assign): Move gsi to the next statmenent unconditionally. * testsuite/g++.dg/torture/pr44900.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162375 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index e4971d2385b..9fd6d2cc592 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2416,9 +2416,11 @@ handle_unscalarized_data_in_subtree (struct access *top_racc, tree lhs,
(sub)tree. If that is not possible, refresh the TOP_RACC base aggregate and
load the accesses from it. LEFT_OFFSET is the offset of the left whole
subtree being copied, RIGHT_OFFSET is the same thing for the right subtree.
- GSI is stmt iterator used for statement insertions. *REFRESHED is true iff
- the rhs top aggregate has already been refreshed by contents of its scalar
- reductions and is set to true if this function has to do it. */
+ NEW_GSI is stmt iterator used for statement insertions after the original
+ assignment, OLD_GSI is used to insert statements before the assignment.
+ *REFRESHED keeps the information whether we have needed to refresh
+ replacements of the LHS and from which side of the assignments this takes
+ place. */
static void
load_assign_lhs_subreplacements (struct access *lacc, struct access *top_racc,
@@ -2722,9 +2724,7 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
&orig_gsi, gsi, &refreshed, lhs);
if (refreshed != SRA_UDH_RIGHT)
{
- if (*stmt == gsi_stmt (*gsi))
- gsi_next (gsi);
-
+ gsi_next (gsi);
unlink_stmt_vdef (*stmt);
gsi_remove (&orig_gsi, true);
sra_stats.deleted++;