This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to clean up i386 machine description?
- To: howell at cs dot stanford dot edu (Colin Douglas Howell)
- Subject: Re: How to clean up i386 machine description?
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 12 Nov 1998 21:57:36 +0000 (GMT)
- Cc: amylaar at cygnus dot co dot uk, rth at cygnus dot com, hubicka at horac dot ta dot jcu dot cz, howell at cs dot stanford dot edu, law at cygnus dot com, pcg at goof dot com, egcs at cygnus dot com
> 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.