This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.3
> On Tue, 2003-04-29 at 12:00, Jan Hubicka wrote:
> > > I don't understand your new patch:
> > >
> > > ! /* Do not delete instructions initializing operands needed by dead
> > > ! instruction with side effects. */
> > > ! || (!counts[REGNO (x)] && incr > 0
> > > ! && insn_live_p (insn, NULL)))
> > >
> > > First, INSN is live -- not dead, given that insn_live_p holds.
> >
> > It is not live, just it is undeletable because it has side effects or
> > something else. insn_live_p checks that.
>
> The bottom line is that I think this new code needs considerably more
> explanation; something like:
>
> /* If the instruction is live -- or if it has side effects that must be
> preserved -- and ..., then we update COUNTS, even if the register in use
> is the destination register because ... */
>
> That last part is still in conflict with the heading for the function,
> which says "Don't count a usage of DEST," so that needs to be changed as
> well.
Yes, the original code was in conflict as well, so I didn't noticed that
when doing the patch.
>
> If checking counts[REGNO(x)] is an optimization, then the actual count
> doesn't seem to matter much; it's just whether or not it's zero.
> (Because you're only going to adding INCR sometimes.) If that's true,
> then the whole function ought to be changed so that rather than adding
> incr, you're just setting a flag.
On the deeper tought this is probably wrong - some other instruction
that did use the counter may get removed but we still should not remove
the induction variable.
>
> > OK. My CVS access is deadly slow here in Barcelona, but I will try to
> > do it tonight.
>
> If you cannot, please let me know so that I can do it.
Somehow the net is in good shape today.
I will prepare updated patch...
Honza
>
> Thanks,
>
> --
> Mark Mitchell
> CodeSourcery, LLC
> mark@codesourcery.com