summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-08 23:01:40 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-08 23:01:40 +0000
commit40463847db454e793f46a7fe2a2d7683d7e34ced (patch)
treef1c5454ba13ad564e707268d461dc545286230f7 /gcc/tree-ssa-copy.c
parent74d2efbc4a85bb0f44935ce2fa8b2f4161069563 (diff)
downloadgcc-40463847db454e793f46a7fe2a2d7683d7e34ced.tar.gz
Fix PR45230, PR45231, and PR45370: fold_stmt_inplace after replace_exp.
2010-12-08 Richard Guenther <rguenther@suse.de> Sebastian Pop <sebastian.pop@amd.com> PR tree-optimization/45230 PR tree-optimization/45231 PR tree-optimization/45370 * sese.c (rename_uses): Returns a bool. Call recompute_tree_invariant_for_addr_expr only on the RHS of a GIMPLE_ASSIGN. (graphite_copy_stmts_from_block): Call fold_stmt_inplace when rename_uses returns true. * tree-ssa-copy.c (replace_exp): Add a comment about calling fold_stmt_inplace after replace_exp. * gcc.dg/graphite/id-pr45230-1.c: New. * gcc.dg/graphite/id-pr45231.c: New. * gfortran.dg/graphite/id-pr45370.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167609 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index d552c3ab61b..88972750b04 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -191,7 +191,10 @@ propagate_value (use_operand_p op_p, tree val)
Use this version when not const/copy propagating values. For example,
PRE uses this version when building expressions as they would appear
- in specific blocks taking into account actions of PHI nodes. */
+ in specific blocks taking into account actions of PHI nodes.
+
+ The statement in which an expression has been replaced should be
+ folded using fold_stmt_inplace. */
void
replace_exp (use_operand_p op_p, tree val)