On Thu, May 10, 2018 at 04:55:02PM -0500, Segher Boessenkool wrote: > Hi, > > On Thu, May 03, 2018 at 01:23:24PM -0400, Michael Meissner wrote: > > -/* Helper function to say whether a mode supports PRE_INC or PRE_DEC. */ > > +/* Helper function to say whether a mode supports PRE_INC or PRE_DEC in a > > given > > + reload register class or if some reload register class supports it. */ > > static inline bool > > -mode_supports_pre_incdec_p (machine_mode mode) > > +mode_supports_pre_incdec_p (machine_mode mode, > > + enum rs6000_reload_reg_type rt = RELOAD_REG_ANY) > > { > > - return ((reg_addr[mode].addr_mask[RELOAD_REG_ANY] & > > RELOAD_REG_PRE_INCDEC) > > - != 0); > > + return ((reg_addr[mode].addr_mask[rt] & RELOAD_REG_PRE_INCDEC) != 0); > > } > > Same issue here: does the default argument help, or hurt? The function > names now do not describe what the function does, either :-/
I dunno, to me it describes it because each of the 3 reload register classes can have different constraints. So when you are in secondary reload and after wards, you will want the specific register class. Before register allocation, you just want to know if any register class supports the access type for the mode. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797