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: Local optimization on i386 ?


On Tue, Nov 30, 1999 at 02:38:09PM +0100, Marc Espie <espie@quatramaran.ens.fr> wrote:
> So this looks like a misoptimization bug... 
> Hum... I believe I could coerce gas into peep-holing that :)
> 
> Isn't there a peep-hole pass or equivalent in gcc that could handle this ?

A define_peephole would just do this, pgcc does this to replace sub $4/8
by equivalent pushes,a nd it also did this for the case you mentioned (I
remember that it was buggy so I removed it again ;)

the problem I see is that gcc will schedule the two stack manipulations so

(I might be wrong but it seems that these kinds of superfluous subs are
introduced late in the compilation, so a peephole might be the most
worthwhile thing to implement). they are not longer consecutive.


-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@opengroup.org |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |


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