On Thu, Mar 22, 2018 at 11:41:48AM -0500, Segher Boessenkool wrote:
> On Thu, Mar 22, 2018 at 11:18:05AM -0400, Michael Meissner wrote:
> > On Thu, Mar 22, 2018 at 10:03:55AM -0500, Segher Boessenkool wrote:
> > > >         callers to pass in the RELOAD_REG_VMX class explicitly.
> > > >         (rs6000_secondary_reload): Likewise.
> > > >         (rs6000_preferred_reload_class): Likewise.
> > > >         (rs6000_secondary_reload_class): Likewise.
> > > 
> > > So it is called "mode_supports_d_form" but it actually returns true for
> > > *any* offset form?
> > 
> > Yes, the intention is to say whether some form of offset is available.  
> > Other
> > parts need to know whether the offset is D-form, DS-form, DQ-form, and 
> > perhaps
> > other forms in the future.
> 
> So you may want a better name.

It all depends on where you are in the compilation process.

> > > > +mode_supports_d_form (machine_mode mode,
> > > > +                     enum rs6000_reload_reg_type rt = RELOAD_REG_ANY)
> > > 
> > > Does the default argument make the interface simpler, or more complex?
> > 
> > The intention is for things like go if legitimate address, where you don't 
> > have
> > context of which register to use, you will use the default second argument.
> > 
> > However, when you are in the middle of secondary reload and friends, and you
> > are wanting to know what a specific reload register class (GPR, FPR, VMX)
> > constraints are, you will add the second argument.  It makes it easier to 
> > use
> > the function if you don't need to specify the second argument.  With the 79
> > character limit, the 2nd argument would often force a line break.
> 
> Maybe it is better to have two functions then?  One for each behaviour.

I don't really see the need, but I can do it if you insist.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797

Reply via email to