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: Projects for beginners


On Wed, Jan 31, 2001 at 10:16:44PM -0500, Daniel Berlin wrote:
> Has anyone actually written down the work taken to create a mid level rtl,
> and do lowering (maybe right before combine) on it?

Perhaps it has been mentioned on the lists, but I don't recall for sure.

The first step is modifying the middle-end interface such that there
is one single hand-off point from the front-end, so that the front-end
is not creating any rtl whatsoever.  If we don't do this, we'll have
the front-end creating low-level rtl behind our backs.

This requires that we define language independant tree codes capable of
describing entire functions.  Currently we rely too much on language
dependant tree codes for this.  I know there has been discussion of this
point on the lists, but not action taken yet.

I would think that we'd do at least up to gcse as mid-level rtl.

What to do with loop is an open question.  Depending on what we allow
as "mid-level rtl", it may be *much* easier to identify induction 
variables given higher level constructs.  We're particularly bad at
this when mixing arithmetic sizes (e.g. 64-bit pointers and 32-bit ints).
On the other hand, the lowering process may well generate code that
we can move outside the loop, or create additional induction varaibles.

Actually, now that I think about it, we currently run loop twice.
Perhaps the most correct option is to run one pass with mid-level rtl
and one pass with low-level rtl.

> And how much would it really buy us?

Well, we'd be able to do CSE (of all flavours) on things like
(mult:DI (reg:DI foo) (reg:DI bar)) instead of a big hairy
libcall sequence.

Note that in Cygnus-local sources we have patches to GCSE that
work on libcall sequences.  I.e. they move the entire function
call sequence around.  We go through a lot of work to do this,
and even still we run into problems with it now and again.



r~

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