This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/38056] Missed tail calls on ia64
- From: "sje at cup dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Feb 2009 19:04:33 -0000
- Subject: [Bug target/38056] Missed tail calls on ia64
- References: <bug-38056-10397@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from sje at cup dot hp dot com 2009-02-11 19:04 -------
This behaviour changed with the patch to fix PR 10907 and I believe that GCC is
correct in not doing the tail call optimization. The optimization is not done
because ia64_function_ok_for_sibcall returns false and it returns false because
bar is defined in a different object file. That object could be in a shared
library and could change the GP. Thus GCC needs to save and restore the GP
when making calls to another object file and that inhibits the tail call
optimization. If bar were defined in the same file GCC could and does do the
tail call optimization.
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38056