RFA: reload infrastructure to fix PR target/21623

Ian Lance Taylor ian@airs.com
Fri Sep 30 20:02:00 GMT 2005


Joern RENNECKE <joern.rennecke@st.com> writes:

> >  P.S.: We could make it a target hook, and have the default
> > definition use reload_{in,out} optab.
> > Then we add the use of reload_{in,out}<mode> patterns to our list of
> > obsolescent port features.
> 
> P.P.S.:
> We can't actually do that easily, because when we only need a simple
> temporary registers, we
> currently name the register class, without there being a pattern.  Now
> we'll need patterns
> that guide us to find the right class.

Seems like there must be some way to make this work.  Why can't we
just also return a mode, for example?  The existing code can locate
the pattern using only the mode.  I'm sure I'm missing something
obvious, but let's not get too hung up on making existing targets work
with the new mechanism.

> So since the distinction between in and out would get in the way, the
> pseudo patterns
> would be reload__ with the class name appended, e.g. for GENERAL_REGS
> roughly
> equivalent to:
> 
> (define_expand "reload__GENERAL_REGS"
>   [(set (match_operand 0 "" "=r") (match_operand 1 "" "r")]
>   ""
>   "")
> 
> Would a patch along these lines be acceptable?

If I'd followed everything, this isn't something we expect people to
actually write, yes?  Instead of using a name, can we just provide a
table indexed by register class?

Ian



More information about the Gcc-patches mailing list