public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/30] [ARM] Reworking the -mcpu, -march and -mfpu options
@ 2017-06-09 12:54 Richard Earnshaw
  2017-06-09 12:54 ` [PATCH 25/30] [arm][phoenix] reset all multilib variables Richard Earnshaw
                   ` (34 more replies)
  0 siblings, 35 replies; 62+ messages in thread
From: Richard Earnshaw @ 2017-06-09 12:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Earnshaw

[-- Attachment #1: Type: text/plain, Size: 6145 bytes --]


During the ARM BoF at the Cauldron last year I mentioned that I wanted
to rework the way GCC on ARM handles the command line options.  The
problem was that most users, and even many experts, can't remember
which FPU/SIMD unit comes with which CPU and that consequently many
users were inadvertenly generating sub-optimal code for their system.

This patch series implements the proposed change and provides support
for a generic way of adding optional features to architectures and CPU
names.  The documentation patches at the end of the series explain the
new syntax, so I won't repeat all that here.  Suffice to say here that
the result is that the -mfpu option now defaults to 'auto', which
allows the compiler to infer the floating-point and simd options from
the CPU/architecture options and that these options can normally be
expressed in a context-specific manner like +simd or +fp without
having to know precisely which variant is implemented.  Long term I'd
like to deprecate -mfpu and entirely move over to the new syntax; but
it's too early to start that process now.

All the patches in the series should build a working basic compiler,
but the multilib selection will not work correctly until the relevant
patches towards the end are applied.  It is not really feasible to
retain that functionality without collapsing too many of the patches
together into one hunk.  It's also possible that some tests in the
testsuite may exhibit transient misbehaviour, but there should be no
regressions by the end of the sequence (some tests no-longer run in
the default configurations because the default CPU does not have
floating-point support).

Just two patches are to the generic code, but both are fairly trivial.
One permits the sbitmap code to be used in the driver programs and the
other provides a way of escaping the meta-character in some multilib
reuse strings.

I won't apply any of this series until those two patches have been
approved, and I won't commit anything before the middle of next week
even then.  This is a fairly complex change and it deserves some time
for people to comment before committing.

R.

Richard Earnshaw (30):
  [arm] Use strings for -march, -mcpu and -mtune options
  [arm] Rewrite -march and -mcpu options for passing to the assembler
  [arm] Don't pass -mfpu=auto through to the assembler.
  [arm] Allow +opt on arbitrary cpu and architecture specifications
  [arm] Add architectural options
  [arm] Add default FPUs for CPUs.
  [build] Make sbitmap code available to the driver programs
  [arm] Split CPU, architecture and tuning data tables.
  [ARM] Move cpu and architecture option name parsing code to
    arm-common.c
  [arm] Use standard option parsing code for detecting thumb-only
    targets
  [arm] Allow CPU and architecture extensions to be defined as aliases
  [arm] Allow new extended syntax CPU and architecture names during
    configure
  [arm] Force a CPU default in the config args defaults list.
  [arm] Generate a canonical form for -march
  [arm] Make -mfloat-abi=softfp work when there are no FPU instructions
  [arm] Update basic multilib configuration
  [arm] Make 'auto' the default FPU selection option.
  [arm] Rewrite t-aprofile using new selector methodology
  [arm] Explicitly set .fpu in cmse_nonsecure_call.S
  [genmultilib] Allow explicit periods to be escaped in MULTILIB_REUSE
  [arm][testsuite] Use -march=armv7-a+fp when testing hard-float ABI.
  [arm] Rewrite t-rmprofile multilib specification
  [arm][rtems] Update t-rtems for new option framework
  [arm][linux-eabi] Ensure all multilib variables are reset
  [arm][phoenix] reset all multilib variables
  [arm] Rework multlib builds for symbianelf
  [arm][fuchsia] Rework multilib support
  [arm] Add a few missing architecture extension options.
  [arm][doc] Document new -march= syntax.
  [arm][doc] Document changes to -mcpu, -mtune and -mfpu.

 gcc/Makefile.in                           |    2 +-
 gcc/common/config/arm/arm-common.c        |  651 +++++++-
 gcc/config.gcc                            |   17 +-
 gcc/config/arm/arm-builtins.c             |    4 +-
 gcc/config/arm/arm-cpu-cdata.h            | 2444 +++++++++++++++++++++++------
 gcc/config/arm/arm-cpu-data.h             | 1410 ++---------------
 gcc/config/arm/arm-cpu.h                  |   38 +
 gcc/config/arm/arm-cpus.in                |  237 ++-
 gcc/config/arm/arm-isa.h                  |   20 +-
 gcc/config/arm/arm-protos.h               |   56 +-
 gcc/config/arm/arm-tables.opt             |   21 +-
 gcc/config/arm/arm.c                      |  337 ++--
 gcc/config/arm/arm.h                      |   75 +-
 gcc/config/arm/arm.opt                    |   15 +-
 gcc/config/arm/bpabi.h                    |    4 -
 gcc/config/arm/elf.h                      |    6 +-
 gcc/config/arm/linux-elf.h                |    3 -
 gcc/config/arm/netbsd-elf.h               |    4 -
 gcc/config/arm/parsecpu.awk               |  295 +++-
 gcc/config/arm/t-aprofile                 |  200 +--
 gcc/config/arm/t-arm-elf                  |  173 +-
 gcc/config/arm/t-fuchsia                  |   33 +
 gcc/config/arm/t-linux-eabi               |    4 +
 gcc/config/arm/t-multilib                 |  126 +-
 gcc/config/arm/t-phoenix                  |   20 +-
 gcc/config/arm/t-rmprofile                |  147 +-
 gcc/config/arm/t-rtems                    |   49 +-
 gcc/config/arm/t-symbian                  |   34 +-
 gcc/config/arm/vxworks.h                  |    2 -
 gcc/doc/fragments.texi                    |   10 +-
 gcc/doc/invoke.texi                       |  371 ++++-
 gcc/genmultilib                           |    4 +-
 gcc/testsuite/gcc.dg/pr59418.c            |    2 +-
 gcc/testsuite/gcc.target/arm/multilib.exp |  685 ++++++++
 gcc/testsuite/gcc.target/arm/pr51915.c    |    2 +-
 gcc/testsuite/gcc.target/arm/pr52006.c    |    2 +-
 gcc/testsuite/gcc.target/arm/pr53187.c    |    2 +-
 libgcc/config/arm/cmse_nonsecure_call.S   |    8 +
 38 files changed, 5073 insertions(+), 2440 deletions(-)
 create mode 100644 gcc/config/arm/t-fuchsia
 create mode 100644 gcc/testsuite/gcc.target/arm/multilib.exp

----------------2.7.4--


^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2017-06-16 21:16 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-09 12:54 [PATCH 00/30] [ARM] Reworking the -mcpu, -march and -mfpu options Richard Earnshaw
2017-06-09 12:54 ` [PATCH 25/30] [arm][phoenix] reset all multilib variables Richard Earnshaw
2017-06-09 12:54 ` [PATCH 24/30] [arm][linux-eabi] Ensure all multilib variables are reset Richard Earnshaw
2017-06-09 12:54 ` [PATCH 29/30] [arm][doc] Document new -march= syntax Richard Earnshaw
2017-06-09 12:54 ` [PATCH 02/30] [arm] Rewrite -march and -mcpu options for passing to the assembler Richard Earnshaw
2017-06-09 12:54 ` [PATCH 12/30] [arm] Allow new extended syntax CPU and architecture names during configure Richard Earnshaw
2017-06-09 12:54 ` [PATCH 10/30] [arm] Use standard option parsing code for detecting thumb-only targets Richard Earnshaw
2017-06-09 12:54 ` [PATCH 05/30] [arm] Add architectural options Richard Earnshaw
2017-06-09 12:54 ` [PATCH 06/30] [arm] Add default FPUs for CPUs Richard Earnshaw
2017-06-09 12:54 ` [PATCH 17/30] [arm] Make 'auto' the default FPU selection option Richard Earnshaw
2017-06-09 12:54 ` [PATCH 04/30] [arm] Allow +opt on arbitrary cpu and architecture specifications Richard Earnshaw
2017-06-13 17:14   ` Richard Earnshaw (lists)
2017-06-09 12:54 ` [PATCH 23/30] [arm][rtems] Update t-rtems for new option framework Richard Earnshaw
2017-06-09 13:03   ` Sebastian Huber
2017-06-09 12:54 ` [PATCH 28/30] [arm] Add a few missing architecture extension options Richard Earnshaw
2017-06-09 12:54 ` [PATCH 18/30] [arm] Rewrite t-aprofile using new selector methodology Richard Earnshaw
2017-06-09 12:55 ` [PATCH 19/30] [arm] Explicitly set .fpu in cmse_nonsecure_call.S Richard Earnshaw
2017-06-09 12:55 ` [PATCH 03/30] [arm] Don't pass -mfpu=auto through to the assembler Richard Earnshaw
2017-06-09 12:55 ` [PATCH 20/30] [genmultilib] Allow explicit periods to be escaped in MULTILIB_REUSE Richard Earnshaw
2017-06-09 12:55 ` [PATCH 30/30] [arm][doc] Document changes to -mcpu, -mtune and -mfpu Richard Earnshaw
2017-06-09 22:19   ` Gerald Pfeifer
2017-06-09 12:55 ` [PATCH 21/30] [arm][testsuite] Use -march=armv7-a+fp when testing hard-float ABI Richard Earnshaw
2017-06-09 12:55 ` [PATCH 14/30] [arm] Generate a canonical form for -march Richard Earnshaw
2017-06-13 17:25   ` Richard Earnshaw (lists)
2017-06-09 12:55 ` [PATCH 15/30] [arm] Make -mfloat-abi=softfp work when there are no FPU instructions Richard Earnshaw
2017-06-09 12:55 ` [PATCH 26/30] [arm] Rework multlib builds for symbianelf Richard Earnshaw
2017-06-09 12:55 ` [PATCH 22/30] [arm] Rewrite t-rmprofile multilib specification Richard Earnshaw
2017-06-09 12:55 ` [PATCH 07/30] [build] Make sbitmap code available to the driver programs Richard Earnshaw
2017-06-14 14:35   ` Richard Earnshaw (lists)
2017-06-16  8:03     ` Richard Biener
2017-06-09 12:55 ` [PATCH 16/30] [arm] Update basic multilib configuration Richard Earnshaw
2017-06-09 12:55 ` [PATCH 09/30] [ARM] Move cpu and architecture option name parsing code to arm-common.c Richard Earnshaw
2017-06-13 17:19   ` Richard Earnshaw (lists)
2017-06-09 12:55 ` [PATCH 01/30] [arm] Use strings for -march, -mcpu and -mtune options Richard Earnshaw
2017-06-13 13:23   ` Christophe Lyon
2017-06-13 15:33     ` Richard Earnshaw (lists)
2017-06-13 17:11   ` Richard Earnshaw (lists)
2017-06-09 12:55 ` [PATCH 11/30] [arm] Allow CPU and architecture extensions to be defined as aliases Richard Earnshaw
2017-06-09 12:55 ` [PATCH 08/30] [arm] Split CPU, architecture and tuning data tables Richard Earnshaw
2017-06-13 17:17   ` Richard Earnshaw (lists)
2017-06-09 12:55 ` [PATCH 13/30] [arm] Force a CPU default in the config args defaults list Richard Earnshaw
2017-06-09 12:55 ` [PATCH 27/30] [arm][fuchsia] Rework multilib support Richard Earnshaw
2017-06-09 22:45 ` [PATCH 00/30] [ARM] Reworking the -mcpu, -march and -mfpu options Christophe Lyon
2017-06-09 23:27   ` Richard Earnshaw (lists)
2017-06-12 11:49     ` Christophe Lyon
2017-06-12 14:34       ` Richard Earnshaw (lists)
2017-06-12 17:11         ` Joseph Myers
2017-06-12 21:27           ` Richard Earnshaw (lists)
2017-06-13  9:40             ` Richard Earnshaw (lists)
2017-06-13 10:29               ` Joseph Myers
2017-06-13 15:26         ` Richard Earnshaw (lists)
2017-06-13 16:08           ` Christophe Lyon
2017-06-12 11:48 ` Nathan Sidwell
2017-06-13 17:27 ` [PATCH 31/30] [arm] Mark -marm and -mthumb as being inverse options Richard Earnshaw (lists)
2017-06-13 17:29 ` [PATCH 32/30][arm][testsuite] Fix neon-thumb2-move.c test Richard Earnshaw (lists)
2017-06-14 14:27   ` [PATCH 32/30][arm][testsuite] Fix various tests Richard Earnshaw (lists)
2017-06-14 19:26     ` Christophe Lyon
2017-06-13 17:36 ` [PATCH 00/30] [ARM] Reworking the -mcpu, -march and -mfpu options Richard Earnshaw (lists)
2017-06-14  9:08   ` Christophe Lyon
2017-06-14 10:21     ` Richard Earnshaw (lists)
2017-06-16 21:11   ` Richard Earnshaw
2017-06-16 21:16     ` Ramana Radhakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).