This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Disable sibcall optimization when -Os
- From: Dale Johannesen <dalej at apple dot com>
- To: tm_gccmail at mail dot kloo dot net
- Cc: Dale Johannesen <dalej at apple dot com>, geoffk at geoffk dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Apr 2003 12:44:57 -0700
- Subject: Re: Disable sibcall optimization when -Os
On Monday, April 14, 2003, at 12:51 PM, tm_gccmail at mail dot kloo dot net wrote:
This sounds like a SH-specific issue; on powerpc, there's generally a
small (ok, 4 bytes) space saving. The place to put such things is in
OPTIMIZATION_OPTIONS.
No. This problem exists for all processors.
[examples which show: when some exits can use the sibcall opt and
others
cannot, there is bloat. This is also true when there are multiple
sibcall exits, even if all exits can use sibcalls. In effect we are
duplicating the epilog code in several places.]
...because it still needs to provide a raw exit point due to the label,
and this causes a significant bloating of the code size.
Therefore, I would like to see sibcall optimization disabled at -Os
I think that's too big a hammer; it's often useful.
or
at least prevented from triggering when a label exists between the
function call and the epilogue.
This is a a reasonable approach IMO, at least on the processors I know
about, but that's not what your patch does. (And I have no authority.)