This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -O0 dead code


On Tue, Aug 08, 2000 at 02:14:00AM -0700, Geoff Keating wrote:
> We already do some dead code elimination at -O0.

No we don't.  Or at least nothing not completely and utterly
nonsensically trivial.  And even then the code fragment I
posted contained 60% nonsensically trivial garbage.

> 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?

Perhaps you didn't read my proposal.


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]