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?


On Sun, Oct 25, 1998 at 10:18:57AM -0800, Colin Douglas Howell wrote:
> As you said in a
> thread started by one of Jan's messages, many insns are output as a
> series of machine instructions; this must be fixed in order to
> schedule instructions effectively.

Running a very close second in importance is to give the scheduler
an accurate description of how the instruction to be emitted should
be scheduled.  It does little good to tell the scheduler that the
instruction is of one type when for some case something entirely
different is emitted. 

A good example here is movsi+1, wherein we have 3 alternatives,
which are randomly mushed into one of 4 different instructions,
all with very different scheduling characteristics.

One of Jan's patches attempts to add issue information for the
pentium to the paterns.  However, the approach he took is not
particularly accurate, and I fear not to be scalable to even 3 
ia32 variants -- there are probably at least 7 extant now, and
more to come.  I hadn't had the heart to tell Jan eariler, since
I didn't know what to do about it.

As a consequence of a bit of nagging from some quarters, I've been
thinking about this a lot recently.  The only way I can see to get
this right is to move all of the final instruction selection logic
out of the large output code blocks, and put it somewhere visible
to the scheduler -- namely, tied to attribute type.  Furthermore,
the instruction output patterns must be based exclusively on the
external selection code.  Otherwise we can't prove convergance and
will have lost out on that hard work.

This is a huge amount of work, amounting to a near complete rewrite
of the .md file.  I can't see that anything less will result in
anything other than mass confusion though.


r~


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