This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Useless assembly
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: sam124 at operamail dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 28 Nov 2004 16:35:44 -0500 (EST)
- Subject: Re: Useless assembly
- References: <20041128212717.4590B2B2B86@ws5-7.us4.outblaze.com>
Hi Sam,
> Optimizing it at -O3 (which I'm sure includes SSA, DCE, and CCP)
> just made the compilation take longer and generate more assembly
> then the first time.
-O3 does not enable SSA-based optimizations.
> Also, when I just compiled a "return 0;", I would expect that to
> just generate main and the instruction "ret" (or is it
> "retn?"). Instead, it generated a lot of extra instructions, then
> finally "ret".
Add an option -fomit-frame-pointer.
Kazu Hirata