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: Bruce Korb <bkorb at sco dot COM>
- Date: Tue, 08 Aug 2000 09:25:16 -0700
- CC: law at cygnus dot com, gcc at gcc dot gnu dot org
- Organization: The Santa Cruz Operation
- References: <18070.965747759@upchuck>
Jeffrey A Law wrote:
>
> In message <20000808005643.A6080@cygnus.com>you write:
> > So how do people feel about the notion of dead code elimination at -O0?
> > If we exclude the bits that that detect dead stores, we shouldn't be
> > affecting any user-visible state, since all user variables live in
> > memory at -O0.
> >
> > It shouldn't (though I've not checked) take any more compile time than
> > we're using now, since flow1 is used to collect lifetimes for register
> > allocation. Normal dead code elimination happens concurrent to that.
> Sounds good to me. I've always been a believer in generating unoptimized
> code, not stupid code at -O0 :-)
It sounds good to me, IFF you can be sure to *not* eliminate
code that one would expect to see from a debugger. If it is
possible that you would, then absolutely not. (Or, "absoultely
not" in the absence of a compiler compile time flag that says
otherwise. Don't we need another configurable option anyway?)