diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-06 10:13:37 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-06 10:13:37 +0000 |
commit | e9de52cc3cd2a99d4962779add31ebc9243a98ad (patch) | |
tree | e167b438c335f3bc2a8367366839e99f406f78e4 /gcc/tree-tailcall.c | |
parent | ea03e543c51716b7e3e868ca8c54f308cdf59fd5 (diff) | |
download | gcc-e9de52cc3cd2a99d4962779add31ebc9243a98ad.tar.gz |
PR middle-end/58094
* cgraph.h (symtab_semantically_equivalent_p): Declare.
* tree-tailcall.c: Include ipa-utils.h.
(find_tail_calls): Use it.
* ipa-pure-const.c (check_call): Likewise.
* ipa-utils.c (recursive_call_p): New function.
* ipa-utils.h (recursive_call_p): Dclare.
* symtab.c (symtab_nonoverwritable_alias): Fix formatting.
(symtab_semantically_equivalent_p): New function.
* Makefile.in (tree-tailcall.o): Update dependencies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202316 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 96940467181..289b75a09bc 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "cfgloop.h" #include "common/common-target.h" +#include "ipa-utils.h" /* The file implements the tail recursion elimination. It is also used to analyze the tail calls in general, passing the results to the rtl level @@ -445,7 +446,7 @@ find_tail_calls (basic_block bb, struct tailcall **ret) /* We found the call, check whether it is suitable. */ tail_recursion = false; func = gimple_call_fndecl (call); - if (func == current_function_decl) + if (func && recursive_call_p (current_function_decl, func)) { tree arg; |