poly_int: IN_TARGET_CODE
authorRichard Sandiford <richard.sandiford@linaro.org>
Sat, 16 Dec 2017 14:10:55 +0000 (14:10 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 16 Dec 2017 14:10:55 +0000 (14:10 +0000)
commit8fcc61f8964aa9aa2e6fc08cb961f9dc2a5add77
treec8a3efc7ca2ad478cb17434b58f914c16eaae241
parent7a667e6491f0df391bb19839b580f33b54088bf3
poly_int: IN_TARGET_CODE

This patch makes each target-specifc TU define an IN_TARGET_CODE macro,
which is used to decide whether poly_int<1, C> should convert to C.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* doc/sourcebuild.texi: Document IN_TARGET_CODE.
* genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
target C file.
* genautomata.c (main): Likewise.
* genconditions.c (write_header): Likewise.
* genemit.c (main): Likewise.
* genextract.c (print_header): Likewise.
* genopinit.c (main): Likewise.
* genoutput.c (output_prologue): Likewise.
* genpeep.c (main): Likewise.
* genpreds.c (write_insn_preds_c): Likewise.
* genrecog.c (writer_header): Likewise.
* config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
* config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
* config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
* config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
* config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
* config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
* config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
* config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
* config/arc/arc.c (IN_TARGET_CODE): Likewise.
* config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
* config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
* config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
* config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
* config/arm/arm.c (IN_TARGET_CODE): Likewise.
* config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
* config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
* config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
* config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
* config/avr/avr.c (IN_TARGET_CODE): Likewise.
* config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
* config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
* config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
* config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
* config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
* config/cris/cris.c (IN_TARGET_CODE): Likewise.
* config/darwin.c (IN_TARGET_CODE): Likewise.
* config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
* config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
* config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
* config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
* config/frv/frv.c (IN_TARGET_CODE): Likewise.
* config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
* config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
* config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
* config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
* config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
* config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
* config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
* config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
* config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
* config/i386/i386.c (IN_TARGET_CODE): Likewise.
* config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
* config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
* config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
* config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
* config/i386/winnt.c (IN_TARGET_CODE): Likewise.
* config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
* config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
* config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
* config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
* config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
* config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
* config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
* config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
* config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
* config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
* config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
* config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
* config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
* config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
* config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
* config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
* config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
* config/mips/mips.c (IN_TARGET_CODE): Likewise.
* config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
* config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
* config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
* config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
* config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
* config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
* config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
* config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
* config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
* config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
* config/pa/pa.c (IN_TARGET_CODE): Likewise.
* config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
* config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
* config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
* config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
* config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
* config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
* config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
* config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
* config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
* config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
* config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
* config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
* config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
* config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
* config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
* config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
* config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
* config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
* config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
* config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
* config/rx/rx.c (IN_TARGET_CODE): Likewise.
* config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
* config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
* config/s390/s390.c (IN_TARGET_CODE): Likewise.
* config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
* config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
* config/sh/sh.c (IN_TARGET_CODE): Likewise.
* config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
* config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
* config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
* config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
* config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
* config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
* config/spu/spu.c (IN_TARGET_CODE): Likewise.
* config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
* config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
* config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
* config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
* config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
* config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
* config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
* config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
* config/v850/v850.c (IN_TARGET_CODE): Likewise.
* config/vax/vax.c (IN_TARGET_CODE): Likewise.
* config/visium/visium.c (IN_TARGET_CODE): Likewise.
* config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
* config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
* config/vms/vms.c (IN_TARGET_CODE): Likewise.
* config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255743
144 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64-builtins.c
gcc/config/aarch64/aarch64-c.c
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/cortex-a57-fma-steering.c
gcc/config/aarch64/driver-aarch64.c
gcc/config/alpha/alpha.c
gcc/config/alpha/driver-alpha.c
gcc/config/arc/arc-c.c
gcc/config/arc/arc.c
gcc/config/arc/driver-arc.c
gcc/config/arm/aarch-common.c
gcc/config/arm/arm-builtins.c
gcc/config/arm/arm-c.c
gcc/config/arm/arm.c
gcc/config/arm/driver-arm.c
gcc/config/avr/avr-c.c
gcc/config/avr/avr-devices.c
gcc/config/avr/avr-log.c
gcc/config/avr/avr.c
gcc/config/avr/driver-avr.c
gcc/config/avr/gen-avr-mmcu-specs.c
gcc/config/bfin/bfin.c
gcc/config/c6x/c6x.c
gcc/config/cr16/cr16.c
gcc/config/cris/cris.c
gcc/config/darwin.c
gcc/config/epiphany/epiphany.c
gcc/config/epiphany/mode-switch-use.c
gcc/config/epiphany/resolve-sw-modes.c
gcc/config/fr30/fr30.c
gcc/config/frv/frv.c
gcc/config/ft32/ft32.c
gcc/config/h8300/h8300.c
gcc/config/i386/djgpp.c
gcc/config/i386/driver-i386.c
gcc/config/i386/driver-mingw32.c
gcc/config/i386/host-cygwin.c
gcc/config/i386/host-i386-darwin.c
gcc/config/i386/host-mingw32.c
gcc/config/i386/i386-c.c
gcc/config/i386/i386.c
gcc/config/i386/intelmic-mkoffload.c
gcc/config/i386/msformat-c.c
gcc/config/i386/winnt-cxx.c
gcc/config/i386/winnt-stubs.c
gcc/config/i386/winnt.c
gcc/config/i386/x86-tune-sched-atom.c
gcc/config/i386/x86-tune-sched-bd.c
gcc/config/i386/x86-tune-sched-core.c
gcc/config/i386/x86-tune-sched.c
gcc/config/ia64/ia64-c.c
gcc/config/ia64/ia64.c
gcc/config/iq2000/iq2000.c
gcc/config/lm32/lm32.c
gcc/config/m32c/m32c-pragma.c
gcc/config/m32c/m32c.c
gcc/config/m32r/m32r.c
gcc/config/m68k/m68k.c
gcc/config/mcore/mcore.c
gcc/config/microblaze/microblaze-c.c
gcc/config/microblaze/microblaze.c
gcc/config/mips/driver-native.c
gcc/config/mips/frame-header-opt.c
gcc/config/mips/mips.c
gcc/config/mmix/mmix.c
gcc/config/mn10300/mn10300.c
gcc/config/moxie/moxie.c
gcc/config/msp430/driver-msp430.c
gcc/config/msp430/msp430-c.c
gcc/config/msp430/msp430.c
gcc/config/nds32/nds32-cost.c
gcc/config/nds32/nds32-fp-as-gp.c
gcc/config/nds32/nds32-intrinsic.c
gcc/config/nds32/nds32-isr.c
gcc/config/nds32/nds32-md-auxiliary.c
gcc/config/nds32/nds32-memory-manipulation.c
gcc/config/nds32/nds32-pipelines-auxiliary.c
gcc/config/nds32/nds32-predicates.c
gcc/config/nds32/nds32.c
gcc/config/nios2/nios2.c
gcc/config/nvptx/mkoffload.c
gcc/config/nvptx/nvptx.c
gcc/config/pa/pa.c
gcc/config/pdp11/pdp11.c
gcc/config/powerpcspe/driver-powerpcspe.c
gcc/config/powerpcspe/host-darwin.c
gcc/config/powerpcspe/host-ppc64-darwin.c
gcc/config/powerpcspe/powerpcspe-c.c
gcc/config/powerpcspe/powerpcspe-linux.c
gcc/config/powerpcspe/powerpcspe.c
gcc/config/riscv/riscv-builtins.c
gcc/config/riscv/riscv-c.c
gcc/config/riscv/riscv.c
gcc/config/rl78/rl78-c.c
gcc/config/rl78/rl78.c
gcc/config/rs6000/driver-rs6000.c
gcc/config/rs6000/host-darwin.c
gcc/config/rs6000/host-ppc64-darwin.c
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000-linux.c
gcc/config/rs6000/rs6000-p8swap.c
gcc/config/rs6000/rs6000-string.c
gcc/config/rs6000/rs6000.c
gcc/config/rx/rx.c
gcc/config/s390/driver-native.c
gcc/config/s390/s390-c.c
gcc/config/s390/s390.c
gcc/config/sh/sh-c.c
gcc/config/sh/sh-mem.cc
gcc/config/sh/sh.c
gcc/config/sh/sh_optimize_sett_clrt.cc
gcc/config/sh/sh_treg_combine.cc
gcc/config/sparc/driver-sparc.c
gcc/config/sparc/sparc-c.c
gcc/config/sparc/sparc.c
gcc/config/spu/spu-c.c
gcc/config/spu/spu.c
gcc/config/stormy16/stormy16.c
gcc/config/tilegx/mul-tables.c
gcc/config/tilegx/tilegx-c.c
gcc/config/tilegx/tilegx.c
gcc/config/tilepro/mul-tables.c
gcc/config/tilepro/tilepro-c.c
gcc/config/tilepro/tilepro.c
gcc/config/v850/v850-c.c
gcc/config/v850/v850.c
gcc/config/vax/vax.c
gcc/config/visium/visium.c
gcc/config/vms/vms-c.c
gcc/config/vms/vms-f.c
gcc/config/vms/vms.c
gcc/config/xtensa/xtensa.c
gcc/doc/sourcebuild.texi
gcc/genattrtab.c
gcc/genautomata.c
gcc/genconditions.c
gcc/genemit.c
gcc/genextract.c
gcc/genopinit.c
gcc/genoutput.c
gcc/genpeep.c
gcc/genpreds.c
gcc/genrecog.c