diff options
author | Richard Guenther <rguenther@suse.de> | 2011-03-15 11:09:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-03-15 11:09:09 +0000 |
commit | e106efc7801f8607c3453673a8c261cb59c3afb0 (patch) | |
tree | 676bfe35c1401333a3e6069eaf9dfdb1c6b71af8 /gcc/tree-tailcall.c | |
parent | 17dea42fc45256b06cb19bc36b18e77fdc0f20a6 (diff) | |
download | gcc-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-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 85aa82b..c94d6ca 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -399,8 +399,10 @@ find_tail_calls (basic_block bb, struct tailcall **ret) { stmt = gsi_stmt (gsi); - /* Ignore labels. */ - if (gimple_code (stmt) == GIMPLE_LABEL || is_gimple_debug (stmt)) + /* Ignore labels, returns and debug stmts. */ + if (gimple_code (stmt) == GIMPLE_LABEL + || gimple_code (stmt) == GIMPLE_RETURN + || is_gimple_debug (stmt)) continue; /* Check for a call. */ |