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: How to clean up i386 machine description?


> Joern Rennecke writes:
> > 
> > > Special patterns for inc/dec is ok, but which_alternative cannot
> > > handle implementation specific instruction selection.
> > 
> > special patterns for inc/dec are actually a problem; they should not be
> > enabled before reload.
> 
> May I ask why not?  I'm not yet familiar with the details of reload.

There be a sequence that sets a register to one and then adds/subtracts
that value from another register.  Reload might know about the equivalence
and decide to replace the register with the constant one in the add / subtract.
The instruction number is not recalculated in reload.
If you general add / subtract pattern rejects an increment, the compiler
will then abort.
Likewise if your increment / decrement pattern only works on registers
and global / reload changes a register into a stack slot.


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