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: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: How to clean up i386 machine description?
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 19 Nov 1998 20:54:48 -0700
- cc: Colin Douglas Howell <howell at cs dot stanford dot edu>, amylaar at cygnus dot co dot uk (Joern Rennecke), hubicka at horac dot ta dot jcu dot cz, rth at cygnus dot com, pcg at goof dot com, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <13903.43029.876619.202723@ongaonga.elec.canterbury.ac.nz>you writ
e:
> Hmmm, this looks like a pattern explosion! I haven't been following
> this thread too closely so I might have the wrong end of the stick.
> I gather you're wanting to tighten up the operand predicates for the
> x86 and are having trouble with the weird combination of valid
> operands.
Having additional pattern is not necessarily bad. Particularly when those
patterns have simple and well understood purposes.
For example, take a look at how we've rearranged the extensions from SImode to
DImode in the x86 port. We've got several new patterns/splitters, but I
believe the resulting code is actually *easier* to understand than the old
code. And it generates more efficient code.
> If this is the case, what I suggest you do is to use the extra
> condition field of the patterns to reject invalid combinations of the
> operands. I did this with the C4x target where I wanted to minimise
> the amount of reloading. On the x86 you'll probably find that the
> predicates match almost anything but that there are limited
> combinations of valid operands.
We do that in some cases too. We use a combination of tighter predicates and
conditions.
Note that you have to be careful about using conditions in named patterns that
the tree->rtl converter knows about. Conditions on those patterns can only
check TARGET_XXX stuff, they can not be dependent on the operands. Easy tidbit
to forget.
jeff