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: [PATCH, cleanup] Remove PowerPC -mupper-regs-* options


On Mon, Jul 24, 2017 at 05:21:15AM -0500, Segher Boessenkool wrote:
> Hi Mike,
> 
> On Sat, Jul 22, 2017 at 02:46:04AM -0400, Michael Meissner wrote:
> > One thing that I did was continue to define __UPPER_REGS_{DF,SF,DI}__ that were
> > previously defined.  I can delete them if desired and perhaps poison the names
> > so that any use if flaged.
> 
> I don't think anything uses it.  Certainly nothing *should* use it: it
> isn't documented anywhere :-)  (Google doesn't find anything either, fwiw).
> 
> You can delete them I think.  Poisoning is overkill.

Ok, deleted.

> > Future patches will include removal of the TARGET_UPPER_REGS_* macros in the
> > various files.  I also plan to remove -mvsx-small-integer, and the various
> > -mpower9-dform* options.
> 
> Yay!  Thank you.
> 
> > Is this ok for trunk?  At present, I do not intend to back port this to GCC 7
> > (but if the maintainers want that, I can do it).
> 
> I don't think that would help much, so yeah, let's not.
> 
> > @@ -58,7 +56,6 @@
> >  				 | OPTION_MASK_HTM			\
> >  				 | OPTION_MASK_QUAD_MEMORY		\
> >    				 | OPTION_MASK_QUAD_MEMORY_ATOMIC	\
> > -				 | OPTION_MASK_UPPER_REGS_SF		\
> >  				 | OPTION_MASK_VSX_SMALL_INTEGER)
> >  
> >  /* Add ISEL back into ISA 3.0, since it is supposed to be a win.  Do not add
> 
> The OPTION_MASK_QUAD_MEMORY_ATOMIC line has errant leading spaces, maybe
> you could fix that while at it.

Fixed.

> > +  /* Note, previously __UPPER_REGS_DF__ was defined if the option
> > +     -mupper-regs-df was used and it was on by default for -mvsx.  That option
> > +     is now eliminated, so set __UPPER_REGS_DF__ based on whether VSX was
> > +     set.  */
> 
> "That option" reads as refering to -mvsx.
> 
> > --- gcc/config/rs6000/rs6000.c	(.../svn+ssh://meissner@gcc.gnu.org/svn/gcc/trunk/gcc/config/rs6000)	(revision 250405)
> > +++ gcc/config/rs6000/rs6000.c	(.../gcc/config/rs6000)	(working copy)
> > @@ -2908,8 +2908,7 @@ rs6000_setup_reg_addr_masks (void)
> >  		  && !FLOAT128_VECTOR_P (m2)
> >  		  && !complex_p
> >  		  && !small_int_vsx_p
> > -		  && (m2 != DFmode || !TARGET_UPPER_REGS_DF)
> > -		  && (m2 != SFmode || !TARGET_UPPER_REGS_SF))
> > +		  && (m2 != DFmode || !TARGET_UPPER_REGS_DF))
> >  		{
> >  		  addr_mask |= RELOAD_REG_PRE_INCDEC;
> >  
> Why are you leaving DF here?  (A later patch will take care of it, but
> is it more than an oversight?)


While this likely would be removed in the next patch, I deleted it now for
consistancy.

 
> > +/* { dg-final { scan-assembler-times {\mfctidz\M|\mxscvdpsxds\M} 2 } } */
> 
> You could write   {\m(fctidz|xscvdpsxds)\M}  which may be easier to read.
> Come to think of it, we could do e.g. {\m(lwz)\M} as well.  Not sure
> which is nicer.
> 
> Looks good, please commit!  Thanks again,

I wasn't sure which form of regex (shell, grep, egrep) was used, and what
levels of quoting was needed, so I wrote it the other way.

Here is the patch I committed:

[gcc]
2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
	upper-regs options.
	(ISA_2_7_MASKS_SERVER): Likewise.
	(ISA_3_0_MASKS_IEEE): Likewise.
	(OTHER_P8_VECTOR_MASKS): Likewise.
	(OTHER_VSX_VECTOR_MASKS): Likewise.
	(POWERPC_MASKS): Likewise.
	(power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
	duplicate list of options.
	* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
	explicit -mupper-regs options.
	* config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
	-mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
	alias for -mupper-regs-df.
	* config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
	(rs6000_init_hard_regno_mode_ok): Likewise.
	(rs6000_option_override_internal): Likewise.
	(rs6000_opt_masks): Likewise.
	* config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
	options in terms of whether -mvsx or -mpower8-vector was used.
	(TARGET_UPPER_REGS_DI): Likewise.
	(TARGET_UPPER_REGS_SF): Likewise.
	* doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
	-mupper-regs-* options.

[gcc/testsuite]
2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/pr65849-1.c: Delete, test no longer valid
	since the upper-regs options have been deleted.
	* gcc.target/powerpc/pr65849-2.c: Likewise.
	* gcc.target/powerpc/pr80099-1.c: Likewise.
	* gcc.target/powerpc/pr80099-2.c: Likewise.
	* gcc.target/powerpc/pr80099-3.c: Likewise.
	* gcc.target/powerpc/pr80099-4.c: Likewise.
	* gcc.target/powerpc/pr80099-5.c: Likewise.
	* gcc.target/powerpc/builtins-2-p9-runnable.c: Update test to
	support removal of the upper-regs options.
	* gcc.target/powerpc/p8vector-fp.c: Likewise.
	* gcc.target/powerpc/p8vector-ldst.c: Likewise.
	* gcc.target/powerpc/p9-dimode1.c: Likewise.
	* gcc.target/powerpc/p9-dimode2.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-1.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-10.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-5.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-9.c: Likewise.
	* gcc.target/powerpc/ppc-round.c: Likewise.
	* gcc.target/powerpc/pr71720.c: Likewise.
	* gcc.target/powerpc/pr72853.c: Likewise.
	* gcc.target/powerpc/pr79907.c: Likewise.
	* gcc.target/powerpc/pr78953.c: Likewise.
	* gcc.target/powerpc/upper-regs-df.c: Likewise.
	* gcc.target/powerpc/upper-regs-sf.c: Likewise.
	* gcc.target/powerpc/vec-extract-1.c: Likewise.
	* gcc.target/powerpc/vec-init-3.c: Likewise.
	* gcc.target/powerpc/vec-init-6.c: Likewise.
	* gcc.target/powerpc/vec-init-7.c: Likewise.
	* gcc.target/powerpc/vec-set-char.c: Likewise.
	* gcc.target/powerpc/vec-set-int.c: Likewise.
	* gcc.target/powerpc/vec-set-short.c: Likewise.

Now to remove the remaining TARGET_UPPER_REGS_* references.

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

Attachment: cleanup.patch002b
Description: Text document


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