This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/38056] Missed tail calls on ia64



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]