This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [RFC Patch], PowerPC memory support pre-gcc9, Version 2, Patch #3


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.

> > > +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.


Segher


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