diff options
author | Jan Hubicka <jh@suse.cz> | 2013-09-06 12:13:37 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-09-06 10:13:37 +0000 |
commit | fc11f321bbffb92287ee4f25aa70eab40f66a163 (patch) | |
tree | e167b438c335f3bc2a8367366839e99f406f78e4 /gcc/ipa-pure-const.c | |
parent | 9a6af4504b8bc9b03020b1e96a3bad56d9929916 (diff) | |
download | gcc-fc11f321bbffb92287ee4f25aa70eab40f66a163.zip gcc-fc11f321bbffb92287ee4f25aa70eab40f66a163.tar.gz gcc-fc11f321bbffb92287ee4f25aa70eab40f66a163.tar.bz2 |
re PR middle-end/58094 (IPA devirt testsuite errors)
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.
From-SVN: r202316
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 7a29365..ed4deae 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -541,7 +541,8 @@ check_call (funct_state local, gimple call, bool ipa) } /* When not in IPA mode, we can still handle self recursion. */ - if (!ipa && callee_t == current_function_decl) + if (!ipa && callee_t + && recursive_call_p (current_function_decl, callee_t)) { if (dump_file) fprintf (dump_file, " Recursive call can loop.\n"); @@ -1079,8 +1080,9 @@ ignore_edge (struct cgraph_edge *e) } /* Return true if NODE is self recursive function. - ??? self recursive and indirectly recursive funcions should - be the same, so this function seems unnecessary. */ + Indirectly recursive functions appears as non-trivial strongly + connected components, so we need to care about self recursion + only. */ static bool self_recursive_p (struct cgraph_node *node) |