This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -O0 dead code
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: -O0 dead code
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: 08 Aug 2000 02:14:00 -0700
- CC: gcc at gcc dot gnu dot org
- References: <20000808005643.A6080@cygnus.com>
Richard Henderson <rth@cygnus.com> writes:
> So how do people feel about the notion of dead code elimination at -O0?
We already do some dead code elimination at -O0. It seems likely that
this would actually make compiles faster (less I/O, which is the
limiting factor at -O0).
The only thing to worry about would be the possibility of affecting
debugging information; someone might write
int foo(int a, int b);
{
int c;
c = a + b;
/* c is not used */
}
and might expect to be able to put a breakpoint on the } and examine
the value of c. Perhaps you could do the elimination only for
non-user variables?
--
- Geoffrey Keating <geoffk@cygnus.com>