diff options
author | Richard Henderson <rth@redhat.com> | 2004-06-09 16:48:56 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-06-09 16:48:56 -0700 |
commit | 4b5b961390cde313cc983f4cbffb954eeaf078e3 (patch) | |
tree | 93531239041220e62b624b138bb2d8e5cdc5e162 | |
parent | 313679b0b954e72f851877fb2d4d23afb149b47a (diff) | |
download | gcc-4b5b961390cde313cc983f4cbffb954eeaf078e3.zip gcc-4b5b961390cde313cc983f4cbffb954eeaf078e3.tar.gz gcc-4b5b961390cde313cc983f4cbffb954eeaf078e3.tar.bz2 |
re PR tree-optimization/15108 ([tree-ssa] [regression] missed sib-calling for pointer changes)
PR opt/15108
* tree-tailcall.c (find_tail_calls): Don't check early for
tail_recursion failure.
From-SVN: r82866
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-tailcall.c | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 637a9bf..4eda0b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-06-09 Richard Henderson <rth@redhat.com> + + PR opt/15108 + * tree-tailcall.c (find_tail_calls): Don't check early for + tail_recursion failure. + 2004-06-09 Diego Novillo <dnovillo@redhat.com> Move SSA_NAME annotations into tree_ssa_name. diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 5027c2b..47d7076 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -460,11 +460,6 @@ find_tail_calls (basic_block bb, struct tailcall **ret) if (TREE_CODE (stmt) != MODIFY_EXPR) return; - /* Unless this is a tail recursive call, we cannot do anything with - the statement anyway. */ - if (!tail_recursion) - return; - if (!process_assignment (stmt, stmt, bsi, &m, &a, &ass_var)) return; } @@ -491,6 +486,11 @@ find_tail_calls (basic_block bb, struct tailcall **ret) && (ret_var != ass_var)) return; + /* If this is not a tail recursive call, we cannot handle addends or + multiplicands. */ + if (!tail_recursion && (m || a)) + return; + nw = xmalloc (sizeof (struct tailcall)); nw->call_block = bb; |