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: PATCH: extra machine-dependent passes


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~


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