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]
Other format: [Raw text]

Re: What to do with new-ra for GCC 4.0


    I agree with all you say above, except that the things the existing
    allocator does shouldn't be replicated, but moved to an earlier point
    in the compilation process.  Specifically, "instruction selection",
    or in GCC terms alternative selection, should happen before regalloc
    as much as possible, 

But you can't.  It's fairly common (especially on DSP-like machines)
to have a pseudo used in multiple instructions, each of which require
a different register class for that operand.  If you define "register
allocation" as producing a single register to be allocated to a pseudo
(and I recognize that we may want to do splitting earlier), then you can't
do instruction selection too early.  Consider the 68k, which has two add
instructions, one which operates only on data registers and one which
operates only on address register.  You can't possibly decide which one to
use until you've allocate all the pseudos, though you certainly can (and
we do) use knowlege of those possibilities in deciding how to allocate the
pseudos.

    and in general machine descriptions should not
    rely on reload to fix all the silly insns that look nothing like the
    actual machine instructions.

No debate on that.  Indeed, making machine descriptions have
constraints that match predicates as closely as possible was perhaps
the major change between GCC 1 and GCC 2.  The newer ports do this,
but the older ones tend not to.


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