Your Jan 8th, 2001 rtlanal.c:note_stores change
David S. Miller
davem@redhat.com
Mon Apr 15 09:38:00 GMT 2002
From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
Date: Mon, 15 Apr 02 12:09:49 EDT
It sounds like we need a construct that says "I'm setting this register to
something, but I don't know what it is". For almost all purposes except
in those functions you mention, this is *precisely* what CLOBBER means, which
is why I used it. This works fine because register life is computed by an
entirely different mechanism.
What would you suggest as the mechanism to say the above?
I don't like the idea of lying to the compiler, we know what
the registers are being set to :-)
SUBREGs provide a mechanism to refer to an object composed of multiple
hard registers. That is really what is happening here.
We could just provide a generalized form of this. Perhaps call it a
SUPERREG:
(superreg (reg:MODE BASEREG) NUM)
The reg must be of a MODE which is the largest mode that hard
register, BASEREG is the first hard register being described. NUM is
the number of such registers being described by this superreg object.
(All uses of this PARALLEL reg thing use it for consequetive hard
registers, there is not reason to generalize it to allow arbitray
disjoint sets of registers to be described).
So on Sparc64 for a function returning a 16-byte structure
we'd see something like this:
(set (superreg (reg:DI %o0) 2) (call ...))
Comments?
Another way to go about this is to just bite the bullet and teach all
of this code to handle PARALLELs just like they do "big" SUBREGs.
More information about the Gcc-bugs
mailing list