This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: extra machine-dependent passes
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: PATCH: extra machine-dependent passes
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 19 Jun 2001 13:14:58 -0700
- Cc: geoffk at geoffk dot org, gcc at gcc dot gnu dot org
- References: <32548.992637245@localhost.localdomain> <200106152108.RAA22241@greed.delorie.com> <jmhexh4csv.fsf@geoffk.org> <200106182046.QAA00612@greed.delorie.com>
On Mon, Jun 18, 2001 at 04:46:20PM -0400, DJ Delorie wrote:
> + /* Opaque pointer used by get_func_hard_reg_initial_val and
> + has_func_hard_reg_initial_val (see integrate.[hc]). */
> + void *hard_reg_initial_vals;
I don't like using void* here. Use a struct tag. You don't have to
declare the structure itself, which leaves the value just as opaque,
but provides documentation and avoids ...
> + #define IVS(fun) ((initial_value_struct *)((fun)->hard_reg_initial_vals))
... this big of ugliness.
> + ivs->pseudos = (rtx *) xrealloc (ivs->pseudos, 5 * sizeof (rtx));
Thinko on the realloc. I don't like parallel arrays either. Put
the two data elements into a struct.
That aside, I don't see how this is supposed to work. Yes, I see how
a substitution happens during inlining, but I don't see how the value
gets initialized in the main function, nor how the target is supposed
to use it.
Is there some piece missing that's supposed to run _after_ inlining
that emits the copy from hard reg to pseudo?
How about a target for which the initialization is not a simple move,
but is actually a small bit of arithmetic?
r~