aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-03-15 11:09:09 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-03-15 11:09:09 +0000
commite106efc7801f8607c3453673a8c261cb59c3afb0 (patch)
tree676bfe35c1401333a3e6069eaf9dfdb1c6b71af8 /gcc/tree-ssa-operands.c
parent17dea42fc45256b06cb19bc36b18e77fdc0f20a6 (diff)
downloadgcc-e106efc7801f8607c3453673a8c261cb59c3afb0.zip
gcc-e106efc7801f8607c3453673a8c261cb59c3afb0.tar.gz
gcc-e106efc7801f8607c3453673a8c261cb59c3afb0.tar.bz2
re PR tree-optimization/41490 (tree-ssa-sink does not really work)
2011-03-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/41490 * tree-ssa-dce.c (propagate_necessity): Handle returns without value but with VUSE. * tree-ssa-operands.c (parse_ssa_operands): Add a VUSE on all return statements. * tree-ssa-sink.c (statement_sink_location): Fix store sinking. * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Handle virtual PHIs. * tree-tailcall.c (find_tail_calls): Ignore returns. * gcc.dg/tree-ssa/ssa-sink-6.c: New testcase. * gcc.dg/tree-ssa/ssa-sink-7.c: Likewise. * gcc.dg/tree-ssa/ssa-sink-8.c: Likewise. * gcc.dg/tree-ssa/ssa-sink-9.c: Likewise. * g++.dg/tree-ssa/pr33604.C: Adjust. From-SVN: r170984
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index d05f814..7e2600d 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1065,6 +1065,9 @@ parse_ssa_operands (gimple stmt)
/* Add call-clobbered operands, if needed. */
if (code == GIMPLE_CALL)
maybe_add_call_vops (stmt);
+
+ if (code == GIMPLE_RETURN)
+ append_vuse (gimple_vop (cfun));
}
}