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 [8 of 8], rs6000, add support for scalar floating point in Altivec registers


On Fri, Nov 14, 2014 at 3:16 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> I tracked down the regression in the spec benchmarks, and it was due to turning
> off pre-increment/pre-decrement for floating point values, and these two
> benchmarks use pre-increment/pre-decrement quite a bit.  My secondary reload
> handlers are capable of adding in the pre-increment/pre-decrement if such an
> operation is attempted on an Altivec register.
>
> I am also including a patch to make the compiler work with -ffast-math.  If you
> use -ffast-math, the easy_fp_constant predicate says that all constants are
> easy in order to enable using the reciprocal approximation instructions for
> division.  I put in a define_split to move the constants to the constant pool
> after the reciprocal approximation work has been done but before reload
> starts.  I had had this patch in when I was doing the development, but I
> thought I did not need it when making up the patches, but perhaps recent
> changes to the register allocator need it again.
>
> I added an option (-mupper-regs) to simplify setting both -mupper-regs-sf and
> -mupper-regs-df.  It will only set the options that the particular machine
> supports.
>
> Finally, I made the default to turn on -mupper-regs-df on power7/power8
> systems, and -mupper-regs-sf on power8 systems.  I have run the regression test
> suite with these options on, and there were no regressions.  Once all of the
> other patches go in, can I check in these patches?
>
> If you would prefer the default for GCC 5.0 not to enable the upper register
> support, let me know, and I can remove the lines in rs6000-cpu.def that sets
> the default.
>
> 2014-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>         * config/rs6000/predicates.md (memory_fp_constant): New predicate
>         to return true if the operand is a floating point constant that
>         must be put into the constant pool, before register allocation
>         occurs.
>
>         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Enable
>         -mupper-regs-df by default.
>         (ISA_2_7_MASKS_SERVER): Enable -mupper-regs-sf by default.
>         (POWERPC_MASKS): Add -mupper-regs-{sf,df} as options set by the
>         various -mcpu=... options.
>         (power7 cpu): Enable -mupper-regs-df by default.
>
>         * config/rs6000/rs6000.opt (-mupper-regs): New combination option
>         that sets -mupper-regs-sf and -mupper-regs-df by default if the
>         cpu supports the instructions.
>
>         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Allow
>         pre-increment and pre-decrement on floating point, even if the
>         -mupper-regs-{sf,df} options were used.
>         (rs6000_option_override_internal): If -mupper-regs, set both
>         -mupper-regs-sf and -mupper-regs-df, depending on the underlying
>         cpu.
>
>         * config/rs6000/rs6000.md (DFmode splitter): Add a define_split to
>         move floating point constants to the constant pool before register
>         allocation.  Normally constants are put into the pool immediately,
>         but -ffast-math delays putting them into the constant pool for the
>         reciprocal approximation support.
>         (SFmode splitter): Likewise.
>
>         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
>         -mupper-regs.

Okay.

Thanks, David


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