This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Local optimization on i386 ?
- To: hubicka at horac dot ta dot jcu dot cz
- Subject: Re: Local optimization on i386 ?
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Wed, 1 Dec 1999 14:04:46 +0100
- Cc: Richard Henderson <rth at cygnus dot com>, Marc Espie <espie at quatramaran dot ens dot fr>, law at cygnus dot com, egcs at egcs dot cygnus dot com
- References: <26996.943919594@upchuck> <199911301338.OAA04341@quatramaran.ens.fr> <19991201005538.B21063@pcep-jamie.cern.ch> <19991130165644.C5414@cygnus.com> <19991201142202.A20663@horac.ta.jcu.cz>
hubicka@horac.ta.jcu.cz wrote:
> I would like to do some simple interfunction optimization stuff
At the moment the default stack alignment is 16 and everyone has to
stick with that otherwise something that needs it may be called without
it. That's unfortunate: everyone has to align stacks even though it's
rarely useful, and it's quite easy to end up calling a function with a
misaligned stack (say if you use a library that's uses a lesser
alignment).
I would like to see functions that need large stack alignment do the
alignment within themselves, using `and'. Those functions can use %ebp
for arguments and locals that don't need the alignment, and %esp for
local slots that need the larger alignment. The other way around is
also possible.
Result: the alignments can be omitted from most code, and code that
benefits from the alignments will always get it.
What do you think?
-- Jamie