Turn MODES_TIEABLE_P into a target hook

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 4 September 2017 06:50 EDT

2017-09-04 Richard Sandiford Alan Hayward David Sherwood

gcc/
- target.def (modes_tieable_p): New hook.
- doc/tm.texi (MODES_TIEABLE_P): Replace with... (TARGET_MODES_TIEABLE_P): ...this.
- doc/tm.texi.in: Regenerate.
- hooks.h (hook_bool_mode_mode_true): Declare.
- hooks.c (hook_bool_mode_mode_true): New function.
- combine.c (subst): Use targetm.modes_tieable_p instead of MODES_TIEABLE_P.
- dse.c (find_shift_sequence): Likewise.
- expmed.c (extract_low_bits): Likewise.
- lower-subreg.c: Include target.h. (find_decomposable_subregs): Use targetm.modes_tieable_p instead of MODES_TIEABLE_P.
- rtlanal.c (rtx_cost): Likewise.
- config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
- config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
- config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static. (TARGET_MODES_TIEABLE_P): Redefine.
- config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
- config/alpha/alpha.c (alpha_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/arc/arc.h (MODES_TIEABLE_P): Delete.
- config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine. (arc_modes_tieable_p): New function.
- config/arm/arm.h (MODES_TIEABLE_P): Delete.
- config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
- config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine. (arm_modes_tieable_p): Make static.
- config/avr/avr.h (MODES_TIEABLE_P): Delete.
- config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
- config/bfin/bfin.c (bfin_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
- config/c6x/c6x.c (c6x_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
- config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine. (cr16_modes_tieable_p): New function.
- config/cris/cris.h (MODES_TIEABLE_P): Delete.
- config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
- config/fr30/fr30.h (MODES_TIEABLE_P): Delete. (TRULY_NOOP_TRUNCATION): Update comment.
- config/frv/frv.h (MODES_TIEABLE_P): Delete. (TRULY_NOOP_TRUNCATION): Update comment.
- config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine. (frv_modes_tieable_p): New function.
- config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
- config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
- config/h8300/h8300.c (h8300_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/i386/i386.h (MODES_TIEABLE_P): Delete.
- config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
- config/i386/i386.c (ix86_modes_tieable_p): Make static. (TARGET_MODES_TIEABLE_P): Redefine.
- config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
- config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine. (ia64_modes_tieable_p): New function.
- config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
- config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine. (iq2000_modes_tieable_p): New function.
- config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
- config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine. (lm32_modes_tieable_p): New function.
- config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
- config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
- config/m32c/m32c.c (m32c_modes_tieable_p): Make static. (TARGET_MODES_TIEABLE_P): Redefine.
- config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
- config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine. (m32r_modes_tieable_p): New function.
- config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
- config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine. (m68k_modes_tieable_p): New function.
- config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
- config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine. (mcore_modes_tieable_p): New function.
- config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
- config/microblaze/microblaze.c (microblaze_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/mips/mips.h (MODES_TIEABLE_P): Delete.
- config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
- config/mips/mips.c (mips_modes_tieable_p): Make static. (TARGET_MODES_TIEABLE_P): Redefine.
- config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
- config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
- config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
- config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to... (mn10300_modes_tieable_p): ...this and make static. (TARGET_MODES_TIEABLE_P): Redefine.
- config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
- config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
- config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
- config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine. (msp430_modes_tieable_p): Make static.
- config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
- config/nds32/nds32.c (nds32_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
- config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
- config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/pa/pa.h (MODES_TIEABLE_P): Delete.
- config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
- config/pa/pa.c (pa_modes_tieable_p): Make static. (TARGET_MODES_TIEABLE_P): Redefine.
- config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
- config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine. (pdp11_modes_tieable_p): New function.
- config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
- config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine. (rs6000_modes_tieable_p): New function. (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
- config/powerpcspe/powerpcspe.md: Update comment.
- config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
- config/riscv/riscv.c (riscv_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
- config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine. (rl78_modes_tieable_p): New function.
- config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
- config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine. (rs6000_modes_tieable_p): New function. (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
- config/rs6000/rs6000.md: Update comment.
- config/rx/rx.h (MODES_TIEABLE_P): Delete.
- config/rx/rx.c (rx_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/s390/s390.h (MODES_TIEABLE_P): Delete.
- config/s390/s390.c (s390_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/sh/sh.h (MODES_TIEABLE_P): Delete.
- config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine. (sh_modes_tieable_p): New function.
- config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
- config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
- config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine. (sparc_modes_tieable_p): Make static.
- config/spu/spu.h (MODES_TIEABLE_P): Delete.
- config/spu/spu.c (spu_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
- config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
- config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
- config/v850/v850.h (MODES_TIEABLE_P): Delete.
- config/v850/v850.c (v850_modes_tieable_p): New function. (TARGET_MODES_TIEABLE_P): Redefine.
- config/vax/vax.h (MODES_TIEABLE_P): Delete.
- config/visium/visium.h (MODES_TIEABLE_P): Delete.
- config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine. (visium_modes_tieable_p): New function.
- config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
- config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine. (xtensa_modes_tieable_p): New function.
- system.h (MODES_TIEABLE_P): Poison.

5f6dcf1 Turn MODES_TIEABLE_P into a target hook
gcc/ChangeLog | 162 ++++++++++++++++++++++++++++++++++++
gcc/combine.c | 8 +-
gcc/config/aarch64/aarch64-protos.h | 2 -
gcc/config/aarch64/aarch64.c | 20 +++--
gcc/config/aarch64/aarch64.h | 2 -
gcc/config/alpha/alpha.c | 14 ++++
gcc/config/alpha/alpha.h | 11 ---
gcc/config/arc/arc.c | 14 ++++
gcc/config/arc/arc.h | 15 ----
gcc/config/arm/arm-protos.h | 1 -
gcc/config/arm/arm.c | 8 +-
gcc/config/arm/arm.h | 2 -
gcc/config/avr/avr.h | 2 -
gcc/config/bfin/bfin.c | 18 ++++
gcc/config/bfin/bfin.h | 17 ----
gcc/config/c6x/c6x.c | 13 +++
gcc/config/c6x/c6x.h | 5 --
gcc/config/cr16/cr16.c | 9 ++
gcc/config/cr16/cr16.h | 3 -
gcc/config/cris/cris.h | 6 --
gcc/config/epiphany/epiphany.h | 10 ---
gcc/config/fr30/fr30.h | 15 +---
gcc/config/frv/frv.c | 11 +++
gcc/config/frv/frv.h | 17 +---
gcc/config/ft32/ft32.h | 4 -
gcc/config/h8300/h8300.c | 17 ++++
gcc/config/h8300/h8300.h | 11 ---
gcc/config/i386/i386-protos.h | 1 -
gcc/config/i386/i386.c | 9 +-
gcc/config/i386/i386.h | 8 --
gcc/config/ia64/ia64.c | 19 +++++
gcc/config/ia64/ia64.h | 16 ----
gcc/config/iq2000/iq2000.c | 14 ++++
gcc/config/iq2000/iq2000.h | 6 --
gcc/config/lm32/lm32.c | 14 ++++
gcc/config/lm32/lm32.h | 6 --
gcc/config/m32c/m32c-protos.h | 1 -
gcc/config/m32c/m32c.c | 6 +-
gcc/config/m32c/m32c.h | 1 -
gcc/config/m32r/m32r.c | 15 ++++
gcc/config/m32r/m32r.h | 15 ----
gcc/config/m68k/m68k.c | 16 ++++
gcc/config/m68k/m68k.h | 7 --
gcc/config/mcore/mcore.c | 12 +++
gcc/config/mcore/mcore.h | 7 --
gcc/config/microblaze/microblaze.c | 14 ++++
gcc/config/microblaze/microblaze.h | 6 --
gcc/config/mips/mips-protos.h | 1 -
gcc/config/mips/mips.c | 7 +-
gcc/config/mips/mips.h | 2 -
gcc/config/mmix/mmix.h | 6 --
gcc/config/mn10300/mn10300-protos.h | 1 -
gcc/config/mn10300/mn10300.c | 9 +-
gcc/config/mn10300/mn10300.h | 7 --
gcc/config/moxie/moxie.h | 4 -
gcc/config/msp430/msp430-protos.h | 1 -
gcc/config/msp430/msp430.c | 6 +-
gcc/config/msp430/msp430.h | 3 -
gcc/config/nds32/nds32.c | 15 ++++
gcc/config/nds32/nds32.h | 11 ---
gcc/config/nios2/nios2.h | 1 -
gcc/config/nvptx/nvptx.c | 11 +++
gcc/config/nvptx/nvptx.h | 2 -
gcc/config/pa/pa-protos.h | 1 -
gcc/config/pa/pa.c | 10 +--
gcc/config/pa/pa.h | 7 --
gcc/config/pdp11/pdp11.c | 11 +++
gcc/config/pdp11/pdp11.h | 6 --
gcc/config/powerpcspe/powerpcspe.c | 45 +++++++++-
gcc/config/powerpcspe/powerpcspe.h | 34 --------
gcc/config/powerpcspe/powerpcspe.md | 6 +-
gcc/config/riscv/riscv.c | 16 ++++
gcc/config/riscv/riscv.h | 7 --
gcc/config/rl78/rl78.c | 12 +++
gcc/config/rl78/rl78.h | 6 --
gcc/config/rs6000/rs6000.c | 45 +++++++++-
gcc/config/rs6000/rs6000.h | 34 --------
gcc/config/rs6000/rs6000.md | 6 +-
gcc/config/rx/rx.c | 14 ++++
gcc/config/rx/rx.h | 5 --
gcc/config/s390/s390.c | 11 +++
gcc/config/s390/s390.h | 4 -
gcc/config/sh/sh.c | 20 +++++
gcc/config/sh/sh.h | 12 ---
gcc/config/sparc/sparc-protos.h | 1 -
gcc/config/sparc/sparc.c | 11 +--
gcc/config/sparc/sparc.h | 2 -
gcc/config/spu/spu.c | 11 +++
gcc/config/spu/spu.h | 4 -
gcc/config/stormy16/stormy16.c | 10 +++
gcc/config/stormy16/stormy16.h | 9 --
gcc/config/tilegx/tilegx.h | 2 -
gcc/config/tilepro/tilepro.h | 2 -
gcc/config/v850/v850.c | 12 +++
gcc/config/v850/v850.h | 7 --
gcc/config/vax/vax.h | 6 --
gcc/config/visium/visium.c | 14 ++++
gcc/config/visium/visium.h | 21 +----
gcc/config/xtensa/xtensa.c | 15 ++++
gcc/config/xtensa/xtensa.h | 10 ---
gcc/doc/tm.texi | 29 +++----
gcc/doc/tm.texi.in | 20 +----
gcc/dse.c | 2 +-
gcc/expmed.c | 6 +-
gcc/hooks.c | 7 ++
gcc/hooks.h | 1 +
gcc/lower-subreg.c | 5 +-
gcc/rtlanal.c | 4 +-
gcc/system.h | 3 +-
gcc/target.def | 23 ++++-
110 files changed, 753 insertions(+), 493 deletions(-)

Upstream: gcc.gnu.org


  • Share