aboutsummaryrefslogtreecommitdiff
path: root/gcc/ree.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-01-14 16:56:44 +0100
committerMartin Liska <mliska@suse.cz>2022-01-17 22:12:04 +0100
commit5c69acb32329d49e58c26fa41ae74229a52b9106 (patch)
treeddb05f9d73afb6f998457d2ac4b720e3b3b60483 /gcc/ree.c
parent490e23032baaece71f2ec09fa1805064b150fbc2 (diff)
downloadgcc-5c69acb32329d49e58c26fa41ae74229a52b9106.zip
gcc-5c69acb32329d49e58c26fa41ae74229a52b9106.tar.gz
gcc-5c69acb32329d49e58c26fa41ae74229a52b9106.tar.bz2
Rename .c files to .cc files.
gcc/ada/ChangeLog: * adadecode.c: Moved to... * adadecode.cc: ...here. * affinity.c: Moved to... * affinity.cc: ...here. * argv-lynxos178-raven-cert.c: Moved to... * argv-lynxos178-raven-cert.cc: ...here. * argv.c: Moved to... * argv.cc: ...here. * aux-io.c: Moved to... * aux-io.cc: ...here. * cio.c: Moved to... * cio.cc: ...here. * cstreams.c: Moved to... * cstreams.cc: ...here. * env.c: Moved to... * env.cc: ...here. * exit.c: Moved to... * exit.cc: ...here. * expect.c: Moved to... * expect.cc: ...here. * final.c: Moved to... * final.cc: ...here. * gcc-interface/cuintp.c: Moved to... * gcc-interface/cuintp.cc: ...here. * gcc-interface/decl.c: Moved to... * gcc-interface/decl.cc: ...here. * gcc-interface/misc.c: Moved to... * gcc-interface/misc.cc: ...here. * gcc-interface/targtyps.c: Moved to... * gcc-interface/targtyps.cc: ...here. * gcc-interface/trans.c: Moved to... * gcc-interface/trans.cc: ...here. * gcc-interface/utils.c: Moved to... * gcc-interface/utils.cc: ...here. * gcc-interface/utils2.c: Moved to... * gcc-interface/utils2.cc: ...here. * init.c: Moved to... * init.cc: ...here. * initialize.c: Moved to... * initialize.cc: ...here. * libgnarl/thread.c: Moved to... * libgnarl/thread.cc: ...here. * link.c: Moved to... * link.cc: ...here. * locales.c: Moved to... * locales.cc: ...here. * mkdir.c: Moved to... * mkdir.cc: ...here. * raise.c: Moved to... * raise.cc: ...here. * rtfinal.c: Moved to... * rtfinal.cc: ...here. * rtinit.c: Moved to... * rtinit.cc: ...here. * seh_init.c: Moved to... * seh_init.cc: ...here. * sigtramp-armdroid.c: Moved to... * sigtramp-armdroid.cc: ...here. * sigtramp-ios.c: Moved to... * sigtramp-ios.cc: ...here. * sigtramp-qnx.c: Moved to... * sigtramp-qnx.cc: ...here. * sigtramp-vxworks.c: Moved to... * sigtramp-vxworks.cc: ...here. * socket.c: Moved to... * socket.cc: ...here. * tracebak.c: Moved to... * tracebak.cc: ...here. * version.c: Moved to... * version.cc: ...here. * vx_stack_info.c: Moved to... * vx_stack_info.cc: ...here. gcc/ChangeLog: * adjust-alignment.c: Moved to... * adjust-alignment.cc: ...here. * alias.c: Moved to... * alias.cc: ...here. * alloc-pool.c: Moved to... * alloc-pool.cc: ...here. * asan.c: Moved to... * asan.cc: ...here. * attribs.c: Moved to... * attribs.cc: ...here. * auto-inc-dec.c: Moved to... * auto-inc-dec.cc: ...here. * auto-profile.c: Moved to... * auto-profile.cc: ...here. * bb-reorder.c: Moved to... * bb-reorder.cc: ...here. * bitmap.c: Moved to... * bitmap.cc: ...here. * btfout.c: Moved to... * btfout.cc: ...here. * builtins.c: Moved to... * builtins.cc: ...here. * caller-save.c: Moved to... * caller-save.cc: ...here. * calls.c: Moved to... * calls.cc: ...here. * ccmp.c: Moved to... * ccmp.cc: ...here. * cfg.c: Moved to... * cfg.cc: ...here. * cfganal.c: Moved to... * cfganal.cc: ...here. * cfgbuild.c: Moved to... * cfgbuild.cc: ...here. * cfgcleanup.c: Moved to... * cfgcleanup.cc: ...here. * cfgexpand.c: Moved to... * cfgexpand.cc: ...here. * cfghooks.c: Moved to... * cfghooks.cc: ...here. * cfgloop.c: Moved to... * cfgloop.cc: ...here. * cfgloopanal.c: Moved to... * cfgloopanal.cc: ...here. * cfgloopmanip.c: Moved to... * cfgloopmanip.cc: ...here. * cfgrtl.c: Moved to... * cfgrtl.cc: ...here. * cgraph.c: Moved to... * cgraph.cc: ...here. * cgraphbuild.c: Moved to... * cgraphbuild.cc: ...here. * cgraphclones.c: Moved to... * cgraphclones.cc: ...here. * cgraphunit.c: Moved to... * cgraphunit.cc: ...here. * collect-utils.c: Moved to... * collect-utils.cc: ...here. * collect2-aix.c: Moved to... * collect2-aix.cc: ...here. * collect2.c: Moved to... * collect2.cc: ...here. * combine-stack-adj.c: Moved to... * combine-stack-adj.cc: ...here. * combine.c: Moved to... * combine.cc: ...here. * common/common-targhooks.c: Moved to... * common/common-targhooks.cc: ...here. * common/config/aarch64/aarch64-common.c: Moved to... * common/config/aarch64/aarch64-common.cc: ...here. * common/config/alpha/alpha-common.c: Moved to... * common/config/alpha/alpha-common.cc: ...here. * common/config/arc/arc-common.c: Moved to... * common/config/arc/arc-common.cc: ...here. * common/config/arm/arm-common.c: Moved to... * common/config/arm/arm-common.cc: ...here. * common/config/avr/avr-common.c: Moved to... * common/config/avr/avr-common.cc: ...here. * common/config/bfin/bfin-common.c: Moved to... * common/config/bfin/bfin-common.cc: ...here. * common/config/bpf/bpf-common.c: Moved to... * common/config/bpf/bpf-common.cc: ...here. * common/config/c6x/c6x-common.c: Moved to... * common/config/c6x/c6x-common.cc: ...here. * common/config/cr16/cr16-common.c: Moved to... * common/config/cr16/cr16-common.cc: ...here. * common/config/cris/cris-common.c: Moved to... * common/config/cris/cris-common.cc: ...here. * common/config/csky/csky-common.c: Moved to... * common/config/csky/csky-common.cc: ...here. * common/config/default-common.c: Moved to... * common/config/default-common.cc: ...here. * common/config/epiphany/epiphany-common.c: Moved to... * common/config/epiphany/epiphany-common.cc: ...here. * common/config/fr30/fr30-common.c: Moved to... * common/config/fr30/fr30-common.cc: ...here. * common/config/frv/frv-common.c: Moved to... * common/config/frv/frv-common.cc: ...here. * common/config/gcn/gcn-common.c: Moved to... * common/config/gcn/gcn-common.cc: ...here. * common/config/h8300/h8300-common.c: Moved to... * common/config/h8300/h8300-common.cc: ...here. * common/config/i386/i386-common.c: Moved to... * common/config/i386/i386-common.cc: ...here. * common/config/ia64/ia64-common.c: Moved to... * common/config/ia64/ia64-common.cc: ...here. * common/config/iq2000/iq2000-common.c: Moved to... * common/config/iq2000/iq2000-common.cc: ...here. * common/config/lm32/lm32-common.c: Moved to... * common/config/lm32/lm32-common.cc: ...here. * common/config/m32r/m32r-common.c: Moved to... * common/config/m32r/m32r-common.cc: ...here. * common/config/m68k/m68k-common.c: Moved to... * common/config/m68k/m68k-common.cc: ...here. * common/config/mcore/mcore-common.c: Moved to... * common/config/mcore/mcore-common.cc: ...here. * common/config/microblaze/microblaze-common.c: Moved to... * common/config/microblaze/microblaze-common.cc: ...here. * common/config/mips/mips-common.c: Moved to... * common/config/mips/mips-common.cc: ...here. * common/config/mmix/mmix-common.c: Moved to... * common/config/mmix/mmix-common.cc: ...here. * common/config/mn10300/mn10300-common.c: Moved to... * common/config/mn10300/mn10300-common.cc: ...here. * common/config/msp430/msp430-common.c: Moved to... * common/config/msp430/msp430-common.cc: ...here. * common/config/nds32/nds32-common.c: Moved to... * common/config/nds32/nds32-common.cc: ...here. * common/config/nios2/nios2-common.c: Moved to... * common/config/nios2/nios2-common.cc: ...here. * common/config/nvptx/nvptx-common.c: Moved to... * common/config/nvptx/nvptx-common.cc: ...here. * common/config/or1k/or1k-common.c: Moved to... * common/config/or1k/or1k-common.cc: ...here. * common/config/pa/pa-common.c: Moved to... * common/config/pa/pa-common.cc: ...here. * common/config/pdp11/pdp11-common.c: Moved to... * common/config/pdp11/pdp11-common.cc: ...here. * common/config/pru/pru-common.c: Moved to... * common/config/pru/pru-common.cc: ...here. * common/config/riscv/riscv-common.c: Moved to... * common/config/riscv/riscv-common.cc: ...here. * common/config/rs6000/rs6000-common.c: Moved to... * common/config/rs6000/rs6000-common.cc: ...here. * common/config/rx/rx-common.c: Moved to... * common/config/rx/rx-common.cc: ...here. * common/config/s390/s390-common.c: Moved to... * common/config/s390/s390-common.cc: ...here. * common/config/sh/sh-common.c: Moved to... * common/config/sh/sh-common.cc: ...here. * common/config/sparc/sparc-common.c: Moved to... * common/config/sparc/sparc-common.cc: ...here. * common/config/tilegx/tilegx-common.c: Moved to... * common/config/tilegx/tilegx-common.cc: ...here. * common/config/tilepro/tilepro-common.c: Moved to... * common/config/tilepro/tilepro-common.cc: ...here. * common/config/v850/v850-common.c: Moved to... * common/config/v850/v850-common.cc: ...here. * common/config/vax/vax-common.c: Moved to... * common/config/vax/vax-common.cc: ...here. * common/config/visium/visium-common.c: Moved to... * common/config/visium/visium-common.cc: ...here. * common/config/xstormy16/xstormy16-common.c: Moved to... * common/config/xstormy16/xstormy16-common.cc: ...here. * common/config/xtensa/xtensa-common.c: Moved to... * common/config/xtensa/xtensa-common.cc: ...here. * compare-elim.c: Moved to... * compare-elim.cc: ...here. * config/aarch64/aarch64-bti-insert.c: Moved to... * config/aarch64/aarch64-bti-insert.cc: ...here. * config/aarch64/aarch64-builtins.c: Moved to... * config/aarch64/aarch64-builtins.cc: ...here. * config/aarch64/aarch64-c.c: Moved to... * config/aarch64/aarch64-c.cc: ...here. * config/aarch64/aarch64-d.c: Moved to... * config/aarch64/aarch64-d.cc: ...here. * config/aarch64/aarch64.c: Moved to... * config/aarch64/aarch64.cc: ...here. * config/aarch64/cortex-a57-fma-steering.c: Moved to... * config/aarch64/cortex-a57-fma-steering.cc: ...here. * config/aarch64/driver-aarch64.c: Moved to... * config/aarch64/driver-aarch64.cc: ...here. * config/aarch64/falkor-tag-collision-avoidance.c: Moved to... * config/aarch64/falkor-tag-collision-avoidance.cc: ...here. * config/aarch64/host-aarch64-darwin.c: Moved to... * config/aarch64/host-aarch64-darwin.cc: ...here. * config/alpha/alpha.c: Moved to... * config/alpha/alpha.cc: ...here. * config/alpha/driver-alpha.c: Moved to... * config/alpha/driver-alpha.cc: ...here. * config/arc/arc-c.c: Moved to... * config/arc/arc-c.cc: ...here. * config/arc/arc.c: Moved to... * config/arc/arc.cc: ...here. * config/arc/driver-arc.c: Moved to... * config/arc/driver-arc.cc: ...here. * config/arm/aarch-common.c: Moved to... * config/arm/aarch-common.cc: ...here. * config/arm/arm-builtins.c: Moved to... * config/arm/arm-builtins.cc: ...here. * config/arm/arm-c.c: Moved to... * config/arm/arm-c.cc: ...here. * config/arm/arm-d.c: Moved to... * config/arm/arm-d.cc: ...here. * config/arm/arm.c: Moved to... * config/arm/arm.cc: ...here. * config/arm/driver-arm.c: Moved to... * config/arm/driver-arm.cc: ...here. * config/avr/avr-c.c: Moved to... * config/avr/avr-c.cc: ...here. * config/avr/avr-devices.c: Moved to... * config/avr/avr-devices.cc: ...here. * config/avr/avr-log.c: Moved to... * config/avr/avr-log.cc: ...here. * config/avr/avr.c: Moved to... * config/avr/avr.cc: ...here. * config/avr/driver-avr.c: Moved to... * config/avr/driver-avr.cc: ...here. * config/avr/gen-avr-mmcu-specs.c: Moved to... * config/avr/gen-avr-mmcu-specs.cc: ...here. * config/avr/gen-avr-mmcu-texi.c: Moved to... * config/avr/gen-avr-mmcu-texi.cc: ...here. * config/bfin/bfin.c: Moved to... * config/bfin/bfin.cc: ...here. * config/bpf/bpf.c: Moved to... * config/bpf/bpf.cc: ...here. * config/bpf/coreout.c: Moved to... * config/bpf/coreout.cc: ...here. * config/c6x/c6x.c: Moved to... * config/c6x/c6x.cc: ...here. * config/cr16/cr16.c: Moved to... * config/cr16/cr16.cc: ...here. * config/cris/cris.c: Moved to... * config/cris/cris.cc: ...here. * config/csky/csky.c: Moved to... * config/csky/csky.cc: ...here. * config/darwin-c.c: Moved to... * config/darwin-c.cc: ...here. * config/darwin-d.c: Moved to... * config/darwin-d.cc: ...here. * config/darwin-driver.c: Moved to... * config/darwin-driver.cc: ...here. * config/darwin-f.c: Moved to... * config/darwin-f.cc: ...here. * config/darwin.c: Moved to... * config/darwin.cc: ...here. * config/default-c.c: Moved to... * config/default-c.cc: ...here. * config/default-d.c: Moved to... * config/default-d.cc: ...here. * config/dragonfly-d.c: Moved to... * config/dragonfly-d.cc: ...here. * config/epiphany/epiphany.c: Moved to... * config/epiphany/epiphany.cc: ...here. * config/epiphany/mode-switch-use.c: Moved to... * config/epiphany/mode-switch-use.cc: ...here. * config/epiphany/resolve-sw-modes.c: Moved to... * config/epiphany/resolve-sw-modes.cc: ...here. * config/fr30/fr30.c: Moved to... * config/fr30/fr30.cc: ...here. * config/freebsd-d.c: Moved to... * config/freebsd-d.cc: ...here. * config/frv/frv.c: Moved to... * config/frv/frv.cc: ...here. * config/ft32/ft32.c: Moved to... * config/ft32/ft32.cc: ...here. * config/gcn/driver-gcn.c: Moved to... * config/gcn/driver-gcn.cc: ...here. * config/gcn/gcn-run.c: Moved to... * config/gcn/gcn-run.cc: ...here. * config/gcn/gcn-tree.c: Moved to... * config/gcn/gcn-tree.cc: ...here. * config/gcn/gcn.c: Moved to... * config/gcn/gcn.cc: ...here. * config/gcn/mkoffload.c: Moved to... * config/gcn/mkoffload.cc: ...here. * config/glibc-c.c: Moved to... * config/glibc-c.cc: ...here. * config/glibc-d.c: Moved to... * config/glibc-d.cc: ...here. * config/h8300/h8300.c: Moved to... * config/h8300/h8300.cc: ...here. * config/host-darwin.c: Moved to... * config/host-darwin.cc: ...here. * config/host-hpux.c: Moved to... * config/host-hpux.cc: ...here. * config/host-linux.c: Moved to... * config/host-linux.cc: ...here. * config/host-netbsd.c: Moved to... * config/host-netbsd.cc: ...here. * config/host-openbsd.c: Moved to... * config/host-openbsd.cc: ...here. * config/host-solaris.c: Moved to... * config/host-solaris.cc: ...here. * config/i386/djgpp.c: Moved to... * config/i386/djgpp.cc: ...here. * config/i386/driver-i386.c: Moved to... * config/i386/driver-i386.cc: ...here. * config/i386/driver-mingw32.c: Moved to... * config/i386/driver-mingw32.cc: ...here. * config/i386/gnu-property.c: Moved to... * config/i386/gnu-property.cc: ...here. * config/i386/host-cygwin.c: Moved to... * config/i386/host-cygwin.cc: ...here. * config/i386/host-i386-darwin.c: Moved to... * config/i386/host-i386-darwin.cc: ...here. * config/i386/host-mingw32.c: Moved to... * config/i386/host-mingw32.cc: ...here. * config/i386/i386-builtins.c: Moved to... * config/i386/i386-builtins.cc: ...here. * config/i386/i386-c.c: Moved to... * config/i386/i386-c.cc: ...here. * config/i386/i386-d.c: Moved to... * config/i386/i386-d.cc: ...here. * config/i386/i386-expand.c: Moved to... * config/i386/i386-expand.cc: ...here. * config/i386/i386-features.c: Moved to... * config/i386/i386-features.cc: ...here. * config/i386/i386-options.c: Moved to... * config/i386/i386-options.cc: ...here. * config/i386/i386.c: Moved to... * config/i386/i386.cc: ...here. * config/i386/intelmic-mkoffload.c: Moved to... * config/i386/intelmic-mkoffload.cc: ...here. * config/i386/msformat-c.c: Moved to... * config/i386/msformat-c.cc: ...here. * config/i386/winnt-cxx.c: Moved to... * config/i386/winnt-cxx.cc: ...here. * config/i386/winnt-d.c: Moved to... * config/i386/winnt-d.cc: ...here. * config/i386/winnt-stubs.c: Moved to... * config/i386/winnt-stubs.cc: ...here. * config/i386/winnt.c: Moved to... * config/i386/winnt.cc: ...here. * config/i386/x86-tune-sched-atom.c: Moved to... * config/i386/x86-tune-sched-atom.cc: ...here. * config/i386/x86-tune-sched-bd.c: Moved to... * config/i386/x86-tune-sched-bd.cc: ...here. * config/i386/x86-tune-sched-core.c: Moved to... * config/i386/x86-tune-sched-core.cc: ...here. * config/i386/x86-tune-sched.c: Moved to... * config/i386/x86-tune-sched.cc: ...here. * config/ia64/ia64-c.c: Moved to... * config/ia64/ia64-c.cc: ...here. * config/ia64/ia64.c: Moved to... * config/ia64/ia64.cc: ...here. * config/iq2000/iq2000.c: Moved to... * config/iq2000/iq2000.cc: ...here. * config/linux.c: Moved to... * config/linux.cc: ...here. * config/lm32/lm32.c: Moved to... * config/lm32/lm32.cc: ...here. * config/m32c/m32c-pragma.c: Moved to... * config/m32c/m32c-pragma.cc: ...here. * config/m32c/m32c.c: Moved to... * config/m32c/m32c.cc: ...here. * config/m32r/m32r.c: Moved to... * config/m32r/m32r.cc: ...here. * config/m68k/m68k.c: Moved to... * config/m68k/m68k.cc: ...here. * config/mcore/mcore.c: Moved to... * config/mcore/mcore.cc: ...here. * config/microblaze/microblaze-c.c: Moved to... * config/microblaze/microblaze-c.cc: ...here. * config/microblaze/microblaze.c: Moved to... * config/microblaze/microblaze.cc: ...here. * config/mips/driver-native.c: Moved to... * config/mips/driver-native.cc: ...here. * config/mips/frame-header-opt.c: Moved to... * config/mips/frame-header-opt.cc: ...here. * config/mips/mips-d.c: Moved to... * config/mips/mips-d.cc: ...here. * config/mips/mips.c: Moved to... * config/mips/mips.cc: ...here. * config/mmix/mmix.c: Moved to... * config/mmix/mmix.cc: ...here. * config/mn10300/mn10300.c: Moved to... * config/mn10300/mn10300.cc: ...here. * config/moxie/moxie.c: Moved to... * config/moxie/moxie.cc: ...here. * config/msp430/driver-msp430.c: Moved to... * config/msp430/driver-msp430.cc: ...here. * config/msp430/msp430-c.c: Moved to... * config/msp430/msp430-c.cc: ...here. * config/msp430/msp430-devices.c: Moved to... * config/msp430/msp430-devices.cc: ...here. * config/msp430/msp430.c: Moved to... * config/msp430/msp430.cc: ...here. * config/nds32/nds32-cost.c: Moved to... * config/nds32/nds32-cost.cc: ...here. * config/nds32/nds32-fp-as-gp.c: Moved to... * config/nds32/nds32-fp-as-gp.cc: ...here. * config/nds32/nds32-intrinsic.c: Moved to... * config/nds32/nds32-intrinsic.cc: ...here. * config/nds32/nds32-isr.c: Moved to... * config/nds32/nds32-isr.cc: ...here. * config/nds32/nds32-md-auxiliary.c: Moved to... * config/nds32/nds32-md-auxiliary.cc: ...here. * config/nds32/nds32-memory-manipulation.c: Moved to... * config/nds32/nds32-memory-manipulation.cc: ...here. * config/nds32/nds32-pipelines-auxiliary.c: Moved to... * config/nds32/nds32-pipelines-auxiliary.cc: ...here. * config/nds32/nds32-predicates.c: Moved to... * config/nds32/nds32-predicates.cc: ...here. * config/nds32/nds32-relax-opt.c: Moved to... * config/nds32/nds32-relax-opt.cc: ...here. * config/nds32/nds32-utils.c: Moved to... * config/nds32/nds32-utils.cc: ...here. * config/nds32/nds32.c: Moved to... * config/nds32/nds32.cc: ...here. * config/netbsd-d.c: Moved to... * config/netbsd-d.cc: ...here. * config/netbsd.c: Moved to... * config/netbsd.cc: ...here. * config/nios2/nios2.c: Moved to... * config/nios2/nios2.cc: ...here. * config/nvptx/mkoffload.c: Moved to... * config/nvptx/mkoffload.cc: ...here. * config/nvptx/nvptx-c.c: Moved to... * config/nvptx/nvptx-c.cc: ...here. * config/nvptx/nvptx.c: Moved to... * config/nvptx/nvptx.cc: ...here. * config/openbsd-d.c: Moved to... * config/openbsd-d.cc: ...here. * config/or1k/or1k.c: Moved to... * config/or1k/or1k.cc: ...here. * config/pa/pa-d.c: Moved to... * config/pa/pa-d.cc: ...here. * config/pa/pa.c: Moved to... * config/pa/pa.cc: ...here. * config/pdp11/pdp11.c: Moved to... * config/pdp11/pdp11.cc: ...here. * config/pru/pru-passes.c: Moved to... * config/pru/pru-passes.cc: ...here. * config/pru/pru-pragma.c: Moved to... * config/pru/pru-pragma.cc: ...here. * config/pru/pru.c: Moved to... * config/pru/pru.cc: ...here. * config/riscv/riscv-builtins.c: Moved to... * config/riscv/riscv-builtins.cc: ...here. * config/riscv/riscv-c.c: Moved to... * config/riscv/riscv-c.cc: ...here. * config/riscv/riscv-d.c: Moved to... * config/riscv/riscv-d.cc: ...here. * config/riscv/riscv-shorten-memrefs.c: Moved to... * config/riscv/riscv-shorten-memrefs.cc: ...here. * config/riscv/riscv-sr.c: Moved to... * config/riscv/riscv-sr.cc: ...here. * config/riscv/riscv.c: Moved to... * config/riscv/riscv.cc: ...here. * config/rl78/rl78-c.c: Moved to... * config/rl78/rl78-c.cc: ...here. * config/rl78/rl78.c: Moved to... * config/rl78/rl78.cc: ...here. * config/rs6000/driver-rs6000.c: Moved to... * config/rs6000/driver-rs6000.cc: ...here. * config/rs6000/host-darwin.c: Moved to... * config/rs6000/host-darwin.cc: ...here. * config/rs6000/host-ppc64-darwin.c: Moved to... * config/rs6000/host-ppc64-darwin.cc: ...here. * config/rs6000/rbtree.c: Moved to... * config/rs6000/rbtree.cc: ...here. * config/rs6000/rs6000-c.c: Moved to... * config/rs6000/rs6000-c.cc: ...here. * config/rs6000/rs6000-call.c: Moved to... * config/rs6000/rs6000-call.cc: ...here. * config/rs6000/rs6000-d.c: Moved to... * config/rs6000/rs6000-d.cc: ...here. * config/rs6000/rs6000-gen-builtins.c: Moved to... * config/rs6000/rs6000-gen-builtins.cc: ...here. * config/rs6000/rs6000-linux.c: Moved to... * config/rs6000/rs6000-linux.cc: ...here. * config/rs6000/rs6000-logue.c: Moved to... * config/rs6000/rs6000-logue.cc: ...here. * config/rs6000/rs6000-p8swap.c: Moved to... * config/rs6000/rs6000-p8swap.cc: ...here. * config/rs6000/rs6000-pcrel-opt.c: Moved to... * config/rs6000/rs6000-pcrel-opt.cc: ...here. * config/rs6000/rs6000-string.c: Moved to... * config/rs6000/rs6000-string.cc: ...here. * config/rs6000/rs6000.c: Moved to... * config/rs6000/rs6000.cc: ...here. * config/rx/rx.c: Moved to... * config/rx/rx.cc: ...here. * config/s390/driver-native.c: Moved to... * config/s390/driver-native.cc: ...here. * config/s390/s390-c.c: Moved to... * config/s390/s390-c.cc: ...here. * config/s390/s390-d.c: Moved to... * config/s390/s390-d.cc: ...here. * config/s390/s390.c: Moved to... * config/s390/s390.cc: ...here. * config/sh/divtab-sh4-300.c: Moved to... * config/sh/divtab-sh4-300.cc: ...here. * config/sh/divtab-sh4.c: Moved to... * config/sh/divtab-sh4.cc: ...here. * config/sh/divtab.c: Moved to... * config/sh/divtab.cc: ...here. * config/sh/sh-c.c: Moved to... * config/sh/sh-c.cc: ...here. * config/sh/sh.c: Moved to... * config/sh/sh.cc: ...here. * config/sol2-c.c: Moved to... * config/sol2-c.cc: ...here. * config/sol2-cxx.c: Moved to... * config/sol2-cxx.cc: ...here. * config/sol2-d.c: Moved to... * config/sol2-d.cc: ...here. * config/sol2-stubs.c: Moved to... * config/sol2-stubs.cc: ...here. * config/sol2.c: Moved to... * config/sol2.cc: ...here. * config/sparc/driver-sparc.c: Moved to... * config/sparc/driver-sparc.cc: ...here. * config/sparc/sparc-c.c: Moved to... * config/sparc/sparc-c.cc: ...here. * config/sparc/sparc-d.c: Moved to... * config/sparc/sparc-d.cc: ...here. * config/sparc/sparc.c: Moved to... * config/sparc/sparc.cc: ...here. * config/stormy16/stormy16.c: Moved to... * config/stormy16/stormy16.cc: ...here. * config/tilegx/mul-tables.c: Moved to... * config/tilegx/mul-tables.cc: ...here. * config/tilegx/tilegx-c.c: Moved to... * config/tilegx/tilegx-c.cc: ...here. * config/tilegx/tilegx.c: Moved to... * config/tilegx/tilegx.cc: ...here. * config/tilepro/mul-tables.c: Moved to... * config/tilepro/mul-tables.cc: ...here. * config/tilepro/tilepro-c.c: Moved to... * config/tilepro/tilepro-c.cc: ...here. * config/tilepro/tilepro.c: Moved to... * config/tilepro/tilepro.cc: ...here. * config/v850/v850-c.c: Moved to... * config/v850/v850-c.cc: ...here. * config/v850/v850.c: Moved to... * config/v850/v850.cc: ...here. * config/vax/vax.c: Moved to... * config/vax/vax.cc: ...here. * config/visium/visium.c: Moved to... * config/visium/visium.cc: ...here. * config/vms/vms-c.c: Moved to... * config/vms/vms-c.cc: ...here. * config/vms/vms-f.c: Moved to... * config/vms/vms-f.cc: ...here. * config/vms/vms.c: Moved to... * config/vms/vms.cc: ...here. * config/vxworks-c.c: Moved to... * config/vxworks-c.cc: ...here. * config/vxworks.c: Moved to... * config/vxworks.cc: ...here. * config/winnt-c.c: Moved to... * config/winnt-c.cc: ...here. * config/xtensa/xtensa.c: Moved to... * config/xtensa/xtensa.cc: ...here. * context.c: Moved to... * context.cc: ...here. * convert.c: Moved to... * convert.cc: ...here. * coverage.c: Moved to... * coverage.cc: ...here. * cppbuiltin.c: Moved to... * cppbuiltin.cc: ...here. * cppdefault.c: Moved to... * cppdefault.cc: ...here. * cprop.c: Moved to... * cprop.cc: ...here. * cse.c: Moved to... * cse.cc: ...here. * cselib.c: Moved to... * cselib.cc: ...here. * ctfc.c: Moved to... * ctfc.cc: ...here. * ctfout.c: Moved to... * ctfout.cc: ...here. * data-streamer-in.c: Moved to... * data-streamer-in.cc: ...here. * data-streamer-out.c: Moved to... * data-streamer-out.cc: ...here. * data-streamer.c: Moved to... * data-streamer.cc: ...here. * dbgcnt.c: Moved to... * dbgcnt.cc: ...here. * dbxout.c: Moved to... * dbxout.cc: ...here. * dce.c: Moved to... * dce.cc: ...here. * ddg.c: Moved to... * ddg.cc: ...here. * debug.c: Moved to... * debug.cc: ...here. * df-core.c: Moved to... * df-core.cc: ...here. * df-problems.c: Moved to... * df-problems.cc: ...here. * df-scan.c: Moved to... * df-scan.cc: ...here. * dfp.c: Moved to... * dfp.cc: ...here. * diagnostic-color.c: Moved to... * diagnostic-color.cc: ...here. * diagnostic-show-locus.c: Moved to... * diagnostic-show-locus.cc: ...here. * diagnostic-spec.c: Moved to... * diagnostic-spec.cc: ...here. * diagnostic.c: Moved to... * diagnostic.cc: ...here. * dojump.c: Moved to... * dojump.cc: ...here. * dominance.c: Moved to... * dominance.cc: ...here. * domwalk.c: Moved to... * domwalk.cc: ...here. * double-int.c: Moved to... * double-int.cc: ...here. * dse.c: Moved to... * dse.cc: ...here. * dumpfile.c: Moved to... * dumpfile.cc: ...here. * dwarf2asm.c: Moved to... * dwarf2asm.cc: ...here. * dwarf2cfi.c: Moved to... * dwarf2cfi.cc: ...here. * dwarf2ctf.c: Moved to... * dwarf2ctf.cc: ...here. * dwarf2out.c: Moved to... * dwarf2out.cc: ...here. * early-remat.c: Moved to... * early-remat.cc: ...here. * edit-context.c: Moved to... * edit-context.cc: ...here. * emit-rtl.c: Moved to... * emit-rtl.cc: ...here. * errors.c: Moved to... * errors.cc: ...here. * et-forest.c: Moved to... * et-forest.cc: ...here. * except.c: Moved to... * except.cc: ...here. * explow.c: Moved to... * explow.cc: ...here. * expmed.c: Moved to... * expmed.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * fibonacci_heap.c: Moved to... * fibonacci_heap.cc: ...here. * file-find.c: Moved to... * file-find.cc: ...here. * file-prefix-map.c: Moved to... * file-prefix-map.cc: ...here. * final.c: Moved to... * final.cc: ...here. * fixed-value.c: Moved to... * fixed-value.cc: ...here. * fold-const-call.c: Moved to... * fold-const-call.cc: ...here. * fold-const.c: Moved to... * fold-const.cc: ...here. * fp-test.c: Moved to... * fp-test.cc: ...here. * function-tests.c: Moved to... * function-tests.cc: ...here. * function.c: Moved to... * function.cc: ...here. * fwprop.c: Moved to... * fwprop.cc: ...here. * gcc-ar.c: Moved to... * gcc-ar.cc: ...here. * gcc-main.c: Moved to... * gcc-main.cc: ...here. * gcc-rich-location.c: Moved to... * gcc-rich-location.cc: ...here. * gcc.c: Moved to... * gcc.cc: ...here. * gcov-dump.c: Moved to... * gcov-dump.cc: ...here. * gcov-io.c: Moved to... * gcov-io.cc: ...here. * gcov-tool.c: Moved to... * gcov-tool.cc: ...here. * gcov.c: Moved to... * gcov.cc: ...here. * gcse-common.c: Moved to... * gcse-common.cc: ...here. * gcse.c: Moved to... * gcse.cc: ...here. * genattr-common.c: Moved to... * genattr-common.cc: ...here. * genattr.c: Moved to... * genattr.cc: ...here. * genattrtab.c: Moved to... * genattrtab.cc: ...here. * genautomata.c: Moved to... * genautomata.cc: ...here. * gencfn-macros.c: Moved to... * gencfn-macros.cc: ...here. * gencheck.c: Moved to... * gencheck.cc: ...here. * genchecksum.c: Moved to... * genchecksum.cc: ...here. * gencodes.c: Moved to... * gencodes.cc: ...here. * genconditions.c: Moved to... * genconditions.cc: ...here. * genconfig.c: Moved to... * genconfig.cc: ...here. * genconstants.c: Moved to... * genconstants.cc: ...here. * genemit.c: Moved to... * genemit.cc: ...here. * genenums.c: Moved to... * genenums.cc: ...here. * generic-match-head.c: Moved to... * generic-match-head.cc: ...here. * genextract.c: Moved to... * genextract.cc: ...here. * genflags.c: Moved to... * genflags.cc: ...here. * gengenrtl.c: Moved to... * gengenrtl.cc: ...here. * gengtype-parse.c: Moved to... * gengtype-parse.cc: ...here. * gengtype-state.c: Moved to... * gengtype-state.cc: ...here. * gengtype.c: Moved to... * gengtype.cc: ...here. * genhooks.c: Moved to... * genhooks.cc: ...here. * genmatch.c: Moved to... * genmatch.cc: ...here. * genmddeps.c: Moved to... * genmddeps.cc: ...here. * genmddump.c: Moved to... * genmddump.cc: ...here. * genmodes.c: Moved to... * genmodes.cc: ...here. * genopinit.c: Moved to... * genopinit.cc: ...here. * genoutput.c: Moved to... * genoutput.cc: ...here. * genpeep.c: Moved to... * genpeep.cc: ...here. * genpreds.c: Moved to... * genpreds.cc: ...here. * genrecog.c: Moved to... * genrecog.cc: ...here. * gensupport.c: Moved to... * gensupport.cc: ...here. * gentarget-def.c: Moved to... * gentarget-def.cc: ...here. * genversion.c: Moved to... * genversion.cc: ...here. * ggc-common.c: Moved to... * ggc-common.cc: ...here. * ggc-none.c: Moved to... * ggc-none.cc: ...here. * ggc-page.c: Moved to... * ggc-page.cc: ...here. * ggc-tests.c: Moved to... * ggc-tests.cc: ...here. * gimple-builder.c: Moved to... * gimple-builder.cc: ...here. * gimple-expr.c: Moved to... * gimple-expr.cc: ...here. * gimple-fold.c: Moved to... * gimple-fold.cc: ...here. * gimple-iterator.c: Moved to... * gimple-iterator.cc: ...here. * gimple-laddress.c: Moved to... * gimple-laddress.cc: ...here. * gimple-loop-jam.c: Moved to... * gimple-loop-jam.cc: ...here. * gimple-low.c: Moved to... * gimple-low.cc: ...here. * gimple-match-head.c: Moved to... * gimple-match-head.cc: ...here. * gimple-pretty-print.c: Moved to... * gimple-pretty-print.cc: ...here. * gimple-ssa-backprop.c: Moved to... * gimple-ssa-backprop.cc: ...here. * gimple-ssa-evrp-analyze.c: Moved to... * gimple-ssa-evrp-analyze.cc: ...here. * gimple-ssa-evrp.c: Moved to... * gimple-ssa-evrp.cc: ...here. * gimple-ssa-isolate-paths.c: Moved to... * gimple-ssa-isolate-paths.cc: ...here. * gimple-ssa-nonnull-compare.c: Moved to... * gimple-ssa-nonnull-compare.cc: ...here. * gimple-ssa-split-paths.c: Moved to... * gimple-ssa-split-paths.cc: ...here. * gimple-ssa-sprintf.c: Moved to... * gimple-ssa-sprintf.cc: ...here. * gimple-ssa-store-merging.c: Moved to... * gimple-ssa-store-merging.cc: ...here. * gimple-ssa-strength-reduction.c: Moved to... * gimple-ssa-strength-reduction.cc: ...here. * gimple-ssa-warn-alloca.c: Moved to... * gimple-ssa-warn-alloca.cc: ...here. * gimple-ssa-warn-restrict.c: Moved to... * gimple-ssa-warn-restrict.cc: ...here. * gimple-streamer-in.c: Moved to... * gimple-streamer-in.cc: ...here. * gimple-streamer-out.c: Moved to... * gimple-streamer-out.cc: ...here. * gimple-walk.c: Moved to... * gimple-walk.cc: ...here. * gimple-warn-recursion.c: Moved to... * gimple-warn-recursion.cc: ...here. * gimple.c: Moved to... * gimple.cc: ...here. * gimplify-me.c: Moved to... * gimplify-me.cc: ...here. * gimplify.c: Moved to... * gimplify.cc: ...here. * godump.c: Moved to... * godump.cc: ...here. * graph.c: Moved to... * graph.cc: ...here. * graphds.c: Moved to... * graphds.cc: ...here. * graphite-dependences.c: Moved to... * graphite-dependences.cc: ...here. * graphite-isl-ast-to-gimple.c: Moved to... * graphite-isl-ast-to-gimple.cc: ...here. * graphite-optimize-isl.c: Moved to... * graphite-optimize-isl.cc: ...here. * graphite-poly.c: Moved to... * graphite-poly.cc: ...here. * graphite-scop-detection.c: Moved to... * graphite-scop-detection.cc: ...here. * graphite-sese-to-poly.c: Moved to... * graphite-sese-to-poly.cc: ...here. * graphite.c: Moved to... * graphite.cc: ...here. * haifa-sched.c: Moved to... * haifa-sched.cc: ...here. * hash-map-tests.c: Moved to... * hash-map-tests.cc: ...here. * hash-set-tests.c: Moved to... * hash-set-tests.cc: ...here. * hash-table.c: Moved to... * hash-table.cc: ...here. * hooks.c: Moved to... * hooks.cc: ...here. * host-default.c: Moved to... * host-default.cc: ...here. * hw-doloop.c: Moved to... * hw-doloop.cc: ...here. * hwint.c: Moved to... * hwint.cc: ...here. * ifcvt.c: Moved to... * ifcvt.cc: ...here. * inchash.c: Moved to... * inchash.cc: ...here. * incpath.c: Moved to... * incpath.cc: ...here. * init-regs.c: Moved to... * init-regs.cc: ...here. * input.c: Moved to... * input.cc: ...here. * internal-fn.c: Moved to... * internal-fn.cc: ...here. * intl.c: Moved to... * intl.cc: ...here. * ipa-comdats.c: Moved to... * ipa-comdats.cc: ...here. * ipa-cp.c: Moved to... * ipa-cp.cc: ...here. * ipa-devirt.c: Moved to... * ipa-devirt.cc: ...here. * ipa-fnsummary.c: Moved to... * ipa-fnsummary.cc: ...here. * ipa-icf-gimple.c: Moved to... * ipa-icf-gimple.cc: ...here. * ipa-icf.c: Moved to... * ipa-icf.cc: ...here. * ipa-inline-analysis.c: Moved to... * ipa-inline-analysis.cc: ...here. * ipa-inline-transform.c: Moved to... * ipa-inline-transform.cc: ...here. * ipa-inline.c: Moved to... * ipa-inline.cc: ...here. * ipa-modref-tree.c: Moved to... * ipa-modref-tree.cc: ...here. * ipa-modref.c: Moved to... * ipa-modref.cc: ...here. * ipa-param-manipulation.c: Moved to... * ipa-param-manipulation.cc: ...here. * ipa-polymorphic-call.c: Moved to... * ipa-polymorphic-call.cc: ...here. * ipa-predicate.c: Moved to... * ipa-predicate.cc: ...here. * ipa-profile.c: Moved to... * ipa-profile.cc: ...here. * ipa-prop.c: Moved to... * ipa-prop.cc: ...here. * ipa-pure-const.c: Moved to... * ipa-pure-const.cc: ...here. * ipa-ref.c: Moved to... * ipa-ref.cc: ...here. * ipa-reference.c: Moved to... * ipa-reference.cc: ...here. * ipa-split.c: Moved to... * ipa-split.cc: ...here. * ipa-sra.c: Moved to... * ipa-sra.cc: ...here. * ipa-utils.c: Moved to... * ipa-utils.cc: ...here. * ipa-visibility.c: Moved to... * ipa-visibility.cc: ...here. * ipa.c: Moved to... * ipa.cc: ...here. * ira-build.c: Moved to... * ira-build.cc: ...here. * ira-color.c: Moved to... * ira-color.cc: ...here. * ira-conflicts.c: Moved to... * ira-conflicts.cc: ...here. * ira-costs.c: Moved to... * ira-costs.cc: ...here. * ira-emit.c: Moved to... * ira-emit.cc: ...here. * ira-lives.c: Moved to... * ira-lives.cc: ...here. * ira.c: Moved to... * ira.cc: ...here. * jump.c: Moved to... * jump.cc: ...here. * langhooks.c: Moved to... * langhooks.cc: ...here. * lcm.c: Moved to... * lcm.cc: ...here. * lists.c: Moved to... * lists.cc: ...here. * loop-doloop.c: Moved to... * loop-doloop.cc: ...here. * loop-init.c: Moved to... * loop-init.cc: ...here. * loop-invariant.c: Moved to... * loop-invariant.cc: ...here. * loop-iv.c: Moved to... * loop-iv.cc: ...here. * loop-unroll.c: Moved to... * loop-unroll.cc: ...here. * lower-subreg.c: Moved to... * lower-subreg.cc: ...here. * lra-assigns.c: Moved to... * lra-assigns.cc: ...here. * lra-coalesce.c: Moved to... * lra-coalesce.cc: ...here. * lra-constraints.c: Moved to... * lra-constraints.cc: ...here. * lra-eliminations.c: Moved to... * lra-eliminations.cc: ...here. * lra-lives.c: Moved to... * lra-lives.cc: ...here. * lra-remat.c: Moved to... * lra-remat.cc: ...here. * lra-spills.c: Moved to... * lra-spills.cc: ...here. * lra.c: Moved to... * lra.cc: ...here. * lto-cgraph.c: Moved to... * lto-cgraph.cc: ...here. * lto-compress.c: Moved to... * lto-compress.cc: ...here. * lto-opts.c: Moved to... * lto-opts.cc: ...here. * lto-section-in.c: Moved to... * lto-section-in.cc: ...here. * lto-section-out.c: Moved to... * lto-section-out.cc: ...here. * lto-streamer-in.c: Moved to... * lto-streamer-in.cc: ...here. * lto-streamer-out.c: Moved to... * lto-streamer-out.cc: ...here. * lto-streamer.c: Moved to... * lto-streamer.cc: ...here. * lto-wrapper.c: Moved to... * lto-wrapper.cc: ...here. * main.c: Moved to... * main.cc: ...here. * mcf.c: Moved to... * mcf.cc: ...here. * mode-switching.c: Moved to... * mode-switching.cc: ...here. * modulo-sched.c: Moved to... * modulo-sched.cc: ...here. * multiple_target.c: Moved to... * multiple_target.cc: ...here. * omp-expand.c: Moved to... * omp-expand.cc: ...here. * omp-general.c: Moved to... * omp-general.cc: ...here. * omp-low.c: Moved to... * omp-low.cc: ...here. * omp-offload.c: Moved to... * omp-offload.cc: ...here. * omp-simd-clone.c: Moved to... * omp-simd-clone.cc: ...here. * opt-suggestions.c: Moved to... * opt-suggestions.cc: ...here. * optabs-libfuncs.c: Moved to... * optabs-libfuncs.cc: ...here. * optabs-query.c: Moved to... * optabs-query.cc: ...here. * optabs-tree.c: Moved to... * optabs-tree.cc: ...here. * optabs.c: Moved to... * optabs.cc: ...here. * opts-common.c: Moved to... * opts-common.cc: ...here. * opts-global.c: Moved to... * opts-global.cc: ...here. * opts.c: Moved to... * opts.cc: ...here. * passes.c: Moved to... * passes.cc: ...here. * plugin.c: Moved to... * plugin.cc: ...here. * postreload-gcse.c: Moved to... * postreload-gcse.cc: ...here. * postreload.c: Moved to... * postreload.cc: ...here. * predict.c: Moved to... * predict.cc: ...here. * prefix.c: Moved to... * prefix.cc: ...here. * pretty-print.c: Moved to... * pretty-print.cc: ...here. * print-rtl-function.c: Moved to... * print-rtl-function.cc: ...here. * print-rtl.c: Moved to... * print-rtl.cc: ...here. * print-tree.c: Moved to... * print-tree.cc: ...here. * profile-count.c: Moved to... * profile-count.cc: ...here. * profile.c: Moved to... * profile.cc: ...here. * read-md.c: Moved to... * read-md.cc: ...here. * read-rtl-function.c: Moved to... * read-rtl-function.cc: ...here. * read-rtl.c: Moved to... * read-rtl.cc: ...here. * real.c: Moved to... * real.cc: ...here. * realmpfr.c: Moved to... * realmpfr.cc: ...here. * recog.c: Moved to... * recog.cc: ...here. * ree.c: Moved to... * ree.cc: ...here. * reg-stack.c: Moved to... * reg-stack.cc: ...here. * regcprop.c: Moved to... * regcprop.cc: ...here. * reginfo.c: Moved to... * reginfo.cc: ...here. * regrename.c: Moved to... * regrename.cc: ...here. * regstat.c: Moved to... * regstat.cc: ...here. * reload.c: Moved to... * reload.cc: ...here. * reload1.c: Moved to... * reload1.cc: ...here. * reorg.c: Moved to... * reorg.cc: ...here. * resource.c: Moved to... * resource.cc: ...here. * rtl-error.c: Moved to... * rtl-error.cc: ...here. * rtl-tests.c: Moved to... * rtl-tests.cc: ...here. * rtl.c: Moved to... * rtl.cc: ...here. * rtlanal.c: Moved to... * rtlanal.cc: ...here. * rtlhash.c: Moved to... * rtlhash.cc: ...here. * rtlhooks.c: Moved to... * rtlhooks.cc: ...here. * rtx-vector-builder.c: Moved to... * rtx-vector-builder.cc: ...here. * run-rtl-passes.c: Moved to... * run-rtl-passes.cc: ...here. * sancov.c: Moved to... * sancov.cc: ...here. * sanopt.c: Moved to... * sanopt.cc: ...here. * sbitmap.c: Moved to... * sbitmap.cc: ...here. * sched-deps.c: Moved to... * sched-deps.cc: ...here. * sched-ebb.c: Moved to... * sched-ebb.cc: ...here. * sched-rgn.c: Moved to... * sched-rgn.cc: ...here. * sel-sched-dump.c: Moved to... * sel-sched-dump.cc: ...here. * sel-sched-ir.c: Moved to... * sel-sched-ir.cc: ...here. * sel-sched.c: Moved to... * sel-sched.cc: ...here. * selftest-diagnostic.c: Moved to... * selftest-diagnostic.cc: ...here. * selftest-rtl.c: Moved to... * selftest-rtl.cc: ...here. * selftest-run-tests.c: Moved to... * selftest-run-tests.cc: ...here. * selftest.c: Moved to... * selftest.cc: ...here. * sese.c: Moved to... * sese.cc: ...here. * shrink-wrap.c: Moved to... * shrink-wrap.cc: ...here. * simplify-rtx.c: Moved to... * simplify-rtx.cc: ...here. * sparseset.c: Moved to... * sparseset.cc: ...here. * spellcheck-tree.c: Moved to... * spellcheck-tree.cc: ...here. * spellcheck.c: Moved to... * spellcheck.cc: ...here. * sreal.c: Moved to... * sreal.cc: ...here. * stack-ptr-mod.c: Moved to... * stack-ptr-mod.cc: ...here. * statistics.c: Moved to... * statistics.cc: ...here. * stmt.c: Moved to... * stmt.cc: ...here. * stor-layout.c: Moved to... * stor-layout.cc: ...here. * store-motion.c: Moved to... * store-motion.cc: ...here. * streamer-hooks.c: Moved to... * streamer-hooks.cc: ...here. * stringpool.c: Moved to... * stringpool.cc: ...here. * substring-locations.c: Moved to... * substring-locations.cc: ...here. * symtab.c: Moved to... * symtab.cc: ...here. * target-globals.c: Moved to... * target-globals.cc: ...here. * targhooks.c: Moved to... * targhooks.cc: ...here. * timevar.c: Moved to... * timevar.cc: ...here. * toplev.c: Moved to... * toplev.cc: ...here. * tracer.c: Moved to... * tracer.cc: ...here. * trans-mem.c: Moved to... * trans-mem.cc: ...here. * tree-affine.c: Moved to... * tree-affine.cc: ...here. * tree-call-cdce.c: Moved to... * tree-call-cdce.cc: ...here. * tree-cfg.c: Moved to... * tree-cfg.cc: ...here. * tree-cfgcleanup.c: Moved to... * tree-cfgcleanup.cc: ...here. * tree-chrec.c: Moved to... * tree-chrec.cc: ...here. * tree-complex.c: Moved to... * tree-complex.cc: ...here. * tree-data-ref.c: Moved to... * tree-data-ref.cc: ...here. * tree-dfa.c: Moved to... * tree-dfa.cc: ...here. * tree-diagnostic.c: Moved to... * tree-diagnostic.cc: ...here. * tree-dump.c: Moved to... * tree-dump.cc: ...here. * tree-eh.c: Moved to... * tree-eh.cc: ...here. * tree-emutls.c: Moved to... * tree-emutls.cc: ...here. * tree-if-conv.c: Moved to... * tree-if-conv.cc: ...here. * tree-inline.c: Moved to... * tree-inline.cc: ...here. * tree-into-ssa.c: Moved to... * tree-into-ssa.cc: ...here. * tree-iterator.c: Moved to... * tree-iterator.cc: ...here. * tree-loop-distribution.c: Moved to... * tree-loop-distribution.cc: ...here. * tree-nested.c: Moved to... * tree-nested.cc: ...here. * tree-nrv.c: Moved to... * tree-nrv.cc: ...here. * tree-object-size.c: Moved to... * tree-object-size.cc: ...here. * tree-outof-ssa.c: Moved to... * tree-outof-ssa.cc: ...here. * tree-parloops.c: Moved to... * tree-parloops.cc: ...here. * tree-phinodes.c: Moved to... * tree-phinodes.cc: ...here. * tree-predcom.c: Moved to... * tree-predcom.cc: ...here. * tree-pretty-print.c: Moved to... * tree-pretty-print.cc: ...here. * tree-profile.c: Moved to... * tree-profile.cc: ...here. * tree-scalar-evolution.c: Moved to... * tree-scalar-evolution.cc: ...here. * tree-sra.c: Moved to... * tree-sra.cc: ...here. * tree-ssa-address.c: Moved to... * tree-ssa-address.cc: ...here. * tree-ssa-alias.c: Moved to... * tree-ssa-alias.cc: ...here. * tree-ssa-ccp.c: Moved to... * tree-ssa-ccp.cc: ...here. * tree-ssa-coalesce.c: Moved to... * tree-ssa-coalesce.cc: ...here. * tree-ssa-copy.c: Moved to... * tree-ssa-copy.cc: ...here. * tree-ssa-dce.c: Moved to... * tree-ssa-dce.cc: ...here. * tree-ssa-dom.c: Moved to... * tree-ssa-dom.cc: ...here. * tree-ssa-dse.c: Moved to... * tree-ssa-dse.cc: ...here. * tree-ssa-forwprop.c: Moved to... * tree-ssa-forwprop.cc: ...here. * tree-ssa-ifcombine.c: Moved to... * tree-ssa-ifcombine.cc: ...here. * tree-ssa-live.c: Moved to... * tree-ssa-live.cc: ...here. * tree-ssa-loop-ch.c: Moved to... * tree-ssa-loop-ch.cc: ...here. * tree-ssa-loop-im.c: Moved to... * tree-ssa-loop-im.cc: ...here. * tree-ssa-loop-ivcanon.c: Moved to... * tree-ssa-loop-ivcanon.cc: ...here. * tree-ssa-loop-ivopts.c: Moved to... * tree-ssa-loop-ivopts.cc: ...here. * tree-ssa-loop-manip.c: Moved to... * tree-ssa-loop-manip.cc: ...here. * tree-ssa-loop-niter.c: Moved to... * tree-ssa-loop-niter.cc: ...here. * tree-ssa-loop-prefetch.c: Moved to... * tree-ssa-loop-prefetch.cc: ...here. * tree-ssa-loop-split.c: Moved to... * tree-ssa-loop-split.cc: ...here. * tree-ssa-loop-unswitch.c: Moved to... * tree-ssa-loop-unswitch.cc: ...here. * tree-ssa-loop.c: Moved to... * tree-ssa-loop.cc: ...here. * tree-ssa-math-opts.c: Moved to... * tree-ssa-math-opts.cc: ...here. * tree-ssa-operands.c: Moved to... * tree-ssa-operands.cc: ...here. * tree-ssa-phiopt.c: Moved to... * tree-ssa-phiopt.cc: ...here. * tree-ssa-phiprop.c: Moved to... * tree-ssa-phiprop.cc: ...here. * tree-ssa-pre.c: Moved to... * tree-ssa-pre.cc: ...here. * tree-ssa-propagate.c: Moved to... * tree-ssa-propagate.cc: ...here. * tree-ssa-reassoc.c: Moved to... * tree-ssa-reassoc.cc: ...here. * tree-ssa-sccvn.c: Moved to... * tree-ssa-sccvn.cc: ...here. * tree-ssa-scopedtables.c: Moved to... * tree-ssa-scopedtables.cc: ...here. * tree-ssa-sink.c: Moved to... * tree-ssa-sink.cc: ...here. * tree-ssa-strlen.c: Moved to... * tree-ssa-strlen.cc: ...here. * tree-ssa-structalias.c: Moved to... * tree-ssa-structalias.cc: ...here. * tree-ssa-tail-merge.c: Moved to... * tree-ssa-tail-merge.cc: ...here. * tree-ssa-ter.c: Moved to... * tree-ssa-ter.cc: ...here. * tree-ssa-threadbackward.c: Moved to... * tree-ssa-threadbackward.cc: ...here. * tree-ssa-threadedge.c: Moved to... * tree-ssa-threadedge.cc: ...here. * tree-ssa-threadupdate.c: Moved to... * tree-ssa-threadupdate.cc: ...here. * tree-ssa-uncprop.c: Moved to... * tree-ssa-uncprop.cc: ...here. * tree-ssa-uninit.c: Moved to... * tree-ssa-uninit.cc: ...here. * tree-ssa.c: Moved to... * tree-ssa.cc: ...here. * tree-ssanames.c: Moved to... * tree-ssanames.cc: ...here. * tree-stdarg.c: Moved to... * tree-stdarg.cc: ...here. * tree-streamer-in.c: Moved to... * tree-streamer-in.cc: ...here. * tree-streamer-out.c: Moved to... * tree-streamer-out.cc: ...here. * tree-streamer.c: Moved to... * tree-streamer.cc: ...here. * tree-switch-conversion.c: Moved to... * tree-switch-conversion.cc: ...here. * tree-tailcall.c: Moved to... * tree-tailcall.cc: ...here. * tree-vect-data-refs.c: Moved to... * tree-vect-data-refs.cc: ...here. * tree-vect-generic.c: Moved to... * tree-vect-generic.cc: ...here. * tree-vect-loop-manip.c: Moved to... * tree-vect-loop-manip.cc: ...here. * tree-vect-loop.c: Moved to... * tree-vect-loop.cc: ...here. * tree-vect-patterns.c: Moved to... * tree-vect-patterns.cc: ...here. * tree-vect-slp-patterns.c: Moved to... * tree-vect-slp-patterns.cc: ...here. * tree-vect-slp.c: Moved to... * tree-vect-slp.cc: ...here. * tree-vect-stmts.c: Moved to... * tree-vect-stmts.cc: ...here. * tree-vector-builder.c: Moved to... * tree-vector-builder.cc: ...here. * tree-vectorizer.c: Moved to... * tree-vectorizer.cc: ...here. * tree-vrp.c: Moved to... * tree-vrp.cc: ...here. * tree.c: Moved to... * tree.cc: ...here. * tsan.c: Moved to... * tsan.cc: ...here. * typed-splay-tree.c: Moved to... * typed-splay-tree.cc: ...here. * ubsan.c: Moved to... * ubsan.cc: ...here. * valtrack.c: Moved to... * valtrack.cc: ...here. * value-prof.c: Moved to... * value-prof.cc: ...here. * var-tracking.c: Moved to... * var-tracking.cc: ...here. * varasm.c: Moved to... * varasm.cc: ...here. * varpool.c: Moved to... * varpool.cc: ...here. * vec-perm-indices.c: Moved to... * vec-perm-indices.cc: ...here. * vec.c: Moved to... * vec.cc: ...here. * vmsdbgout.c: Moved to... * vmsdbgout.cc: ...here. * vr-values.c: Moved to... * vr-values.cc: ...here. * vtable-verify.c: Moved to... * vtable-verify.cc: ...here. * web.c: Moved to... * web.cc: ...here. * xcoffout.c: Moved to... * xcoffout.cc: ...here. gcc/c-family/ChangeLog: * c-ada-spec.c: Moved to... * c-ada-spec.cc: ...here. * c-attribs.c: Moved to... * c-attribs.cc: ...here. * c-common.c: Moved to... * c-common.cc: ...here. * c-cppbuiltin.c: Moved to... * c-cppbuiltin.cc: ...here. * c-dump.c: Moved to... * c-dump.cc: ...here. * c-format.c: Moved to... * c-format.cc: ...here. * c-gimplify.c: Moved to... * c-gimplify.cc: ...here. * c-indentation.c: Moved to... * c-indentation.cc: ...here. * c-lex.c: Moved to... * c-lex.cc: ...here. * c-omp.c: Moved to... * c-omp.cc: ...here. * c-opts.c: Moved to... * c-opts.cc: ...here. * c-pch.c: Moved to... * c-pch.cc: ...here. * c-ppoutput.c: Moved to... * c-ppoutput.cc: ...here. * c-pragma.c: Moved to... * c-pragma.cc: ...here. * c-pretty-print.c: Moved to... * c-pretty-print.cc: ...here. * c-semantics.c: Moved to... * c-semantics.cc: ...here. * c-ubsan.c: Moved to... * c-ubsan.cc: ...here. * c-warn.c: Moved to... * c-warn.cc: ...here. * cppspec.c: Moved to... * cppspec.cc: ...here. * stub-objc.c: Moved to... * stub-objc.cc: ...here. gcc/c/ChangeLog: * c-aux-info.c: Moved to... * c-aux-info.cc: ...here. * c-convert.c: Moved to... * c-convert.cc: ...here. * c-decl.c: Moved to... * c-decl.cc: ...here. * c-errors.c: Moved to... * c-errors.cc: ...here. * c-fold.c: Moved to... * c-fold.cc: ...here. * c-lang.c: Moved to... * c-lang.cc: ...here. * c-objc-common.c: Moved to... * c-objc-common.cc: ...here. * c-parser.c: Moved to... * c-parser.cc: ...here. * c-typeck.c: Moved to... * c-typeck.cc: ...here. * gccspec.c: Moved to... * gccspec.cc: ...here. * gimple-parser.c: Moved to... * gimple-parser.cc: ...here. gcc/cp/ChangeLog: * call.c: Moved to... * call.cc: ...here. * class.c: Moved to... * class.cc: ...here. * constexpr.c: Moved to... * constexpr.cc: ...here. * cp-gimplify.c: Moved to... * cp-gimplify.cc: ...here. * cp-lang.c: Moved to... * cp-lang.cc: ...here. * cp-objcp-common.c: Moved to... * cp-objcp-common.cc: ...here. * cp-ubsan.c: Moved to... * cp-ubsan.cc: ...here. * cvt.c: Moved to... * cvt.cc: ...here. * cxx-pretty-print.c: Moved to... * cxx-pretty-print.cc: ...here. * decl.c: Moved to... * decl.cc: ...here. * decl2.c: Moved to... * decl2.cc: ...here. * dump.c: Moved to... * dump.cc: ...here. * error.c: Moved to... * error.cc: ...here. * except.c: Moved to... * except.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * friend.c: Moved to... * friend.cc: ...here. * g++spec.c: Moved to... * g++spec.cc: ...here. * init.c: Moved to... * init.cc: ...here. * lambda.c: Moved to... * lambda.cc: ...here. * lex.c: Moved to... * lex.cc: ...here. * mangle.c: Moved to... * mangle.cc: ...here. * method.c: Moved to... * method.cc: ...here. * name-lookup.c: Moved to... * name-lookup.cc: ...here. * optimize.c: Moved to... * optimize.cc: ...here. * parser.c: Moved to... * parser.cc: ...here. * pt.c: Moved to... * pt.cc: ...here. * ptree.c: Moved to... * ptree.cc: ...here. * rtti.c: Moved to... * rtti.cc: ...here. * search.c: Moved to... * search.cc: ...here. * semantics.c: Moved to... * semantics.cc: ...here. * tree.c: Moved to... * tree.cc: ...here. * typeck.c: Moved to... * typeck.cc: ...here. * typeck2.c: Moved to... * typeck2.cc: ...here. * vtable-class-hierarchy.c: Moved to... * vtable-class-hierarchy.cc: ...here. gcc/fortran/ChangeLog: * arith.c: Moved to... * arith.cc: ...here. * array.c: Moved to... * array.cc: ...here. * bbt.c: Moved to... * bbt.cc: ...here. * check.c: Moved to... * check.cc: ...here. * class.c: Moved to... * class.cc: ...here. * constructor.c: Moved to... * constructor.cc: ...here. * convert.c: Moved to... * convert.cc: ...here. * cpp.c: Moved to... * cpp.cc: ...here. * data.c: Moved to... * data.cc: ...here. * decl.c: Moved to... * decl.cc: ...here. * dependency.c: Moved to... * dependency.cc: ...here. * dump-parse-tree.c: Moved to... * dump-parse-tree.cc: ...here. * error.c: Moved to... * error.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * f95-lang.c: Moved to... * f95-lang.cc: ...here. * frontend-passes.c: Moved to... * frontend-passes.cc: ...here. * gfortranspec.c: Moved to... * gfortranspec.cc: ...here. * interface.c: Moved to... * interface.cc: ...here. * intrinsic.c: Moved to... * intrinsic.cc: ...here. * io.c: Moved to... * io.cc: ...here. * iresolve.c: Moved to... * iresolve.cc: ...here. * match.c: Moved to... * match.cc: ...here. * matchexp.c: Moved to... * matchexp.cc: ...here. * misc.c: Moved to... * misc.cc: ...here. * module.c: Moved to... * module.cc: ...here. * openmp.c: Moved to... * openmp.cc: ...here. * options.c: Moved to... * options.cc: ...here. * parse.c: Moved to... * parse.cc: ...here. * primary.c: Moved to... * primary.cc: ...here. * resolve.c: Moved to... * resolve.cc: ...here. * scanner.c: Moved to... * scanner.cc: ...here. * simplify.c: Moved to... * simplify.cc: ...here. * st.c: Moved to... * st.cc: ...here. * symbol.c: Moved to... * symbol.cc: ...here. * target-memory.c: Moved to... * target-memory.cc: ...here. * trans-array.c: Moved to... * trans-array.cc: ...here. * trans-common.c: Moved to... * trans-common.cc: ...here. * trans-const.c: Moved to... * trans-const.cc: ...here. * trans-decl.c: Moved to... * trans-decl.cc: ...here. * trans-expr.c: Moved to... * trans-expr.cc: ...here. * trans-intrinsic.c: Moved to... * trans-intrinsic.cc: ...here. * trans-io.c: Moved to... * trans-io.cc: ...here. * trans-openmp.c: Moved to... * trans-openmp.cc: ...here. * trans-stmt.c: Moved to... * trans-stmt.cc: ...here. * trans-types.c: Moved to... * trans-types.cc: ...here. * trans.c: Moved to... * trans.cc: ...here. gcc/go/ChangeLog: * go-backend.c: Moved to... * go-backend.cc: ...here. * go-lang.c: Moved to... * go-lang.cc: ...here. * gospec.c: Moved to... * gospec.cc: ...here. gcc/jit/ChangeLog: * dummy-frontend.c: Moved to... * dummy-frontend.cc: ...here. * jit-builtins.c: Moved to... * jit-builtins.cc: ...here. * jit-logging.c: Moved to... * jit-logging.cc: ...here. * jit-playback.c: Moved to... * jit-playback.cc: ...here. * jit-recording.c: Moved to... * jit-recording.cc: ...here. * jit-result.c: Moved to... * jit-result.cc: ...here. * jit-spec.c: Moved to... * jit-spec.cc: ...here. * jit-tempdir.c: Moved to... * jit-tempdir.cc: ...here. * jit-w32.c: Moved to... * jit-w32.cc: ...here. * libgccjit.c: Moved to... * libgccjit.cc: ...here. gcc/lto/ChangeLog: * common.c: Moved to... * common.cc: ...here. * lto-common.c: Moved to... * lto-common.cc: ...here. * lto-dump.c: Moved to... * lto-dump.cc: ...here. * lto-lang.c: Moved to... * lto-lang.cc: ...here. * lto-object.c: Moved to... * lto-object.cc: ...here. * lto-partition.c: Moved to... * lto-partition.cc: ...here. * lto-symtab.c: Moved to... * lto-symtab.cc: ...here. * lto.c: Moved to... * lto.cc: ...here. gcc/objc/ChangeLog: * objc-act.c: Moved to... * objc-act.cc: ...here. * objc-encoding.c: Moved to... * objc-encoding.cc: ...here. * objc-gnu-runtime-abi-01.c: Moved to... * objc-gnu-runtime-abi-01.cc: ...here. * objc-lang.c: Moved to... * objc-lang.cc: ...here. * objc-map.c: Moved to... * objc-map.cc: ...here. * objc-next-runtime-abi-01.c: Moved to... * objc-next-runtime-abi-01.cc: ...here. * objc-next-runtime-abi-02.c: Moved to... * objc-next-runtime-abi-02.cc: ...here. * objc-runtime-shared-support.c: Moved to... * objc-runtime-shared-support.cc: ...here. gcc/objcp/ChangeLog: * objcp-decl.c: Moved to... * objcp-decl.cc: ...here. * objcp-lang.c: Moved to... * objcp-lang.cc: ...here. libcpp/ChangeLog: * charset.c: Moved to... * charset.cc: ...here. * directives.c: Moved to... * directives.cc: ...here. * errors.c: Moved to... * errors.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * files.c: Moved to... * files.cc: ...here. * identifiers.c: Moved to... * identifiers.cc: ...here. * init.c: Moved to... * init.cc: ...here. * lex.c: Moved to... * lex.cc: ...here. * line-map.c: Moved to... * line-map.cc: ...here. * macro.c: Moved to... * macro.cc: ...here. * makeucnid.c: Moved to... * makeucnid.cc: ...here. * mkdeps.c: Moved to... * mkdeps.cc: ...here. * pch.c: Moved to... * pch.cc: ...here. * symtab.c: Moved to... * symtab.cc: ...here. * traditional.c: Moved to... * traditional.cc: ...here.
Diffstat (limited to 'gcc/ree.c')
-rw-r--r--gcc/ree.c1417
1 files changed, 0 insertions, 1417 deletions
diff --git a/gcc/ree.c b/gcc/ree.c
deleted file mode 100644
index de4f18e..0000000
--- a/gcc/ree.c
+++ /dev/null
@@ -1,1417 +0,0 @@
-/* Redundant Extension Elimination pass for the GNU compiler.
- Copyright (C) 2010-2022 Free Software Foundation, Inc.
- Contributed by Ilya Enkovich (ilya.enkovich@intel.com)
-
- Based on the Redundant Zero-extension elimination pass contributed by
- Sriraman Tallam (tmsriram@google.com) and Silvius Rus (rus@google.com).
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-
-/* Problem Description :
- --------------------
- This pass is intended to remove redundant extension instructions.
- Such instructions appear for different reasons. We expect some of
- them due to implicit zero-extension in 64-bit registers after writing
- to their lower 32-bit half (e.g. for the x86-64 architecture).
- Another possible reason is a type cast which follows a load (for
- instance a register restore) and which can be combined into a single
- instruction, and for which earlier local passes, e.g. the combiner,
- weren't able to optimize.
-
- How does this pass work ?
- --------------------------
-
- This pass is run after register allocation. Hence, all registers that
- this pass deals with are hard registers. This pass first looks for an
- extension instruction that could possibly be redundant. Such extension
- instructions show up in RTL with the pattern :
- (set (reg:<SWI248> x) (any_extend:<SWI248> (reg:<SWI124> x))),
- where x can be any hard register.
- Now, this pass tries to eliminate this instruction by merging the
- extension with the definitions of register x. For instance, if
- one of the definitions of register x was :
- (set (reg:SI x) (plus:SI (reg:SI z1) (reg:SI z2))),
- followed by extension :
- (set (reg:DI x) (zero_extend:DI (reg:SI x)))
- then the combination converts this into :
- (set (reg:DI x) (zero_extend:DI (plus:SI (reg:SI z1) (reg:SI z2)))).
- If all the merged definitions are recognizable assembly instructions,
- the extension is effectively eliminated.
-
- For example, for the x86-64 architecture, implicit zero-extensions
- are captured with appropriate patterns in the i386.md file. Hence,
- these merged definition can be matched to a single assembly instruction.
- The original extension instruction is then deleted if all the
- definitions can be merged.
-
- However, there are cases where the definition instruction cannot be
- merged with an extension. Examples are CALL instructions. In such
- cases, the original extension is not redundant and this pass does
- not delete it.
-
- Handling conditional moves :
- ----------------------------
-
- Architectures like x86-64 support conditional moves whose semantics for
- extension differ from the other instructions. For instance, the
- instruction *cmov ebx, eax*
- zero-extends eax onto rax only when the move from ebx to eax happens.
- Otherwise, eax may not be zero-extended. Consider conditional moves as
- RTL instructions of the form
- (set (reg:SI x) (if_then_else (cond) (reg:SI y) (reg:SI z))).
- This pass tries to merge an extension with a conditional move by
- actually merging the definitions of y and z with an extension and then
- converting the conditional move into :
- (set (reg:DI x) (if_then_else (cond) (reg:DI y) (reg:DI z))).
- Since registers y and z are extended, register x will also be extended
- after the conditional move. Note that this step has to be done
- transitively since the definition of a conditional copy can be
- another conditional copy.
-
- Motivating Example I :
- ---------------------
- For this program :
- **********************************************
- bad_code.c
-
- int mask[1000];
-
- int foo(unsigned x)
- {
- if (x < 10)
- x = x * 45;
- else
- x = x * 78;
- return mask[x];
- }
- **********************************************
-
- $ gcc -O2 bad_code.c
- ........
- 400315: b8 4e 00 00 00 mov $0x4e,%eax
- 40031a: 0f af f8 imul %eax,%edi
- 40031d: 89 ff mov %edi,%edi - useless extension
- 40031f: 8b 04 bd 60 19 40 00 mov 0x401960(,%rdi,4),%eax
- 400326: c3 retq
- ......
- 400330: ba 2d 00 00 00 mov $0x2d,%edx
- 400335: 0f af fa imul %edx,%edi
- 400338: 89 ff mov %edi,%edi - useless extension
- 40033a: 8b 04 bd 60 19 40 00 mov 0x401960(,%rdi,4),%eax
- 400341: c3 retq
-
- $ gcc -O2 -free bad_code.c
- ......
- 400315: 6b ff 4e imul $0x4e,%edi,%edi
- 400318: 8b 04 bd 40 19 40 00 mov 0x401940(,%rdi,4),%eax
- 40031f: c3 retq
- 400320: 6b ff 2d imul $0x2d,%edi,%edi
- 400323: 8b 04 bd 40 19 40 00 mov 0x401940(,%rdi,4),%eax
- 40032a: c3 retq
-
- Motivating Example II :
- ---------------------
-
- Here is an example with a conditional move.
-
- For this program :
- **********************************************
-
- unsigned long long foo(unsigned x , unsigned y)
- {
- unsigned z;
- if (x > 100)
- z = x + y;
- else
- z = x - y;
- return (unsigned long long)(z);
- }
-
- $ gcc -O2 bad_code.c
- ............
- 400360: 8d 14 3e lea (%rsi,%rdi,1),%edx
- 400363: 89 f8 mov %edi,%eax
- 400365: 29 f0 sub %esi,%eax
- 400367: 83 ff 65 cmp $0x65,%edi
- 40036a: 0f 43 c2 cmovae %edx,%eax
- 40036d: 89 c0 mov %eax,%eax - useless extension
- 40036f: c3 retq
-
- $ gcc -O2 -free bad_code.c
- .............
- 400360: 89 fa mov %edi,%edx
- 400362: 8d 04 3e lea (%rsi,%rdi,1),%eax
- 400365: 29 f2 sub %esi,%edx
- 400367: 83 ff 65 cmp $0x65,%edi
- 40036a: 89 d6 mov %edx,%esi
- 40036c: 48 0f 42 c6 cmovb %rsi,%rax
- 400370: c3 retq
-
- Motivating Example III :
- ---------------------
-
- Here is an example with a type cast.
-
- For this program :
- **********************************************
-
- void test(int size, unsigned char *in, unsigned char *out)
- {
- int i;
- unsigned char xr, xg, xy=0;
-
- for (i = 0; i < size; i++) {
- xr = *in++;
- xg = *in++;
- xy = (unsigned char) ((19595*xr + 38470*xg) >> 16);
- *out++ = xy;
- }
- }
-
- $ gcc -O2 bad_code.c
- ............
- 10: 0f b6 0e movzbl (%rsi),%ecx
- 13: 0f b6 46 01 movzbl 0x1(%rsi),%eax
- 17: 48 83 c6 02 add $0x2,%rsi
- 1b: 0f b6 c9 movzbl %cl,%ecx - useless extension
- 1e: 0f b6 c0 movzbl %al,%eax - useless extension
- 21: 69 c9 8b 4c 00 00 imul $0x4c8b,%ecx,%ecx
- 27: 69 c0 46 96 00 00 imul $0x9646,%eax,%eax
-
- $ gcc -O2 -free bad_code.c
- .............
- 10: 0f b6 0e movzbl (%rsi),%ecx
- 13: 0f b6 46 01 movzbl 0x1(%rsi),%eax
- 17: 48 83 c6 02 add $0x2,%rsi
- 1b: 69 c9 8b 4c 00 00 imul $0x4c8b,%ecx,%ecx
- 21: 69 c0 46 96 00 00 imul $0x9646,%eax,%eax
-
- Usefulness :
- ----------
-
- The original redundant zero-extension elimination pass reported reduction
- of the dynamic instruction count of a compression benchmark by 2.8% and
- improvement of its run time by about 1%.
-
- The additional performance gain with the enhanced pass is mostly expected
- on in-order architectures where redundancy cannot be compensated by out of
- order execution. Measurements showed up to 10% performance gain (reduced
- run time) on EEMBC 2.0 benchmarks on Atom processor with geomean performance
- gain 1%. */
-
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "backend.h"
-#include "target.h"
-#include "rtl.h"
-#include "tree.h"
-#include "df.h"
-#include "memmodel.h"
-#include "tm_p.h"
-#include "optabs.h"
-#include "regs.h"
-#include "emit-rtl.h"
-#include "recog.h"
-#include "cfgrtl.h"
-#include "expr.h"
-#include "tree-pass.h"
-
-/* This structure represents a candidate for elimination. */
-
-struct ext_cand
-{
- /* The expression. */
- const_rtx expr;
-
- /* The kind of extension. */
- enum rtx_code code;
-
- /* The destination mode. */
- machine_mode mode;
-
- /* The instruction where it lives. */
- rtx_insn *insn;
-};
-
-
-static int max_insn_uid;
-
-/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN. */
-
-static bool
-update_reg_equal_equiv_notes (rtx_insn *insn, machine_mode new_mode,
- machine_mode old_mode, enum rtx_code code)
-{
- rtx *loc = &REG_NOTES (insn);
- while (*loc)
- {
- enum reg_note kind = REG_NOTE_KIND (*loc);
- if (kind == REG_EQUAL || kind == REG_EQUIV)
- {
- rtx orig_src = XEXP (*loc, 0);
- /* Update equivalency constants. Recall that RTL constants are
- sign-extended. */
- if (GET_CODE (orig_src) == CONST_INT
- && HWI_COMPUTABLE_MODE_P (new_mode))
- {
- if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
- /* Nothing needed. */;
- else
- {
- /* Zero-extend the negative constant by masking out the
- bits outside the source mode. */
- rtx new_const_int
- = gen_int_mode (INTVAL (orig_src)
- & GET_MODE_MASK (old_mode),
- new_mode);
- if (!validate_change (insn, &XEXP (*loc, 0),
- new_const_int, true))
- return false;
- }
- loc = &XEXP (*loc, 1);
- }
- /* Drop all other notes, they assume a wrong mode. */
- else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
- return false;
- }
- else
- loc = &XEXP (*loc, 1);
- }
- return true;
-}
-
-/* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
- and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
- this code modifies the SET rtx to a new SET rtx that extends the
- right hand expression into a register on the left hand side. Note
- that multiple assumptions are made about the nature of the set that
- needs to be true for this to work and is called from merge_def_and_ext.
-
- Original :
- (set (reg a) (expression))
-
- Transform :
- (set (reg a) (any_extend (expression)))
-
- Special Cases :
- If the expression is a constant or another extension, then directly
- assign it to the register. */
-
-static bool
-combine_set_extension (ext_cand *cand, rtx_insn *curr_insn, rtx *orig_set)
-{
- rtx orig_src = SET_SRC (*orig_set);
- machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
- rtx new_set;
- rtx cand_pat = single_set (cand->insn);
-
- /* If the extension's source/destination registers are not the same
- then we need to change the original load to reference the destination
- of the extension. Then we need to emit a copy from that destination
- to the original destination of the load. */
- rtx new_reg;
- bool copy_needed
- = (REGNO (SET_DEST (cand_pat)) != REGNO (XEXP (SET_SRC (cand_pat), 0)));
- if (copy_needed)
- new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (cand_pat)));
- else
- new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
-
- /* Merge constants by directly moving the constant into the register under
- some conditions. Recall that RTL constants are sign-extended. */
- if (GET_CODE (orig_src) == CONST_INT
- && HWI_COMPUTABLE_MODE_P (cand->mode))
- {
- if (INTVAL (orig_src) >= 0 || cand->code == SIGN_EXTEND)
- new_set = gen_rtx_SET (new_reg, orig_src);
- else
- {
- /* Zero-extend the negative constant by masking out the bits outside
- the source mode. */
- rtx new_const_int
- = gen_int_mode (INTVAL (orig_src) & GET_MODE_MASK (orig_mode),
- GET_MODE (new_reg));
- new_set = gen_rtx_SET (new_reg, new_const_int);
- }
- }
- else if (GET_MODE (orig_src) == VOIDmode)
- {
- /* This is mostly due to a call insn that should not be optimized. */
- return false;
- }
- else if (GET_CODE (orig_src) == cand->code)
- {
- /* Here is a sequence of two extensions. Try to merge them. */
- rtx temp_extension
- = gen_rtx_fmt_e (cand->code, cand->mode, XEXP (orig_src, 0));
- rtx simplified_temp_extension = simplify_rtx (temp_extension);
- if (simplified_temp_extension)
- temp_extension = simplified_temp_extension;
- new_set = gen_rtx_SET (new_reg, temp_extension);
- }
- else if (GET_CODE (orig_src) == IF_THEN_ELSE)
- {
- /* Only IF_THEN_ELSE of phi-type copies are combined. Otherwise,
- in general, IF_THEN_ELSE should not be combined. */
- return false;
- }
- else
- {
- /* This is the normal case. */
- rtx temp_extension
- = gen_rtx_fmt_e (cand->code, cand->mode, orig_src);
- rtx simplified_temp_extension = simplify_rtx (temp_extension);
- if (simplified_temp_extension)
- temp_extension = simplified_temp_extension;
- new_set = gen_rtx_SET (new_reg, temp_extension);
- }
-
- /* This change is a part of a group of changes. Hence,
- validate_change will not try to commit the change. */
- if (validate_change (curr_insn, orig_set, new_set, true)
- && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
- cand->code))
- {
- if (dump_file)
- {
- fprintf (dump_file,
- "Tentatively merged extension with definition %s:\n",
- (copy_needed) ? "(copy needed)" : "");
- print_rtl_single (dump_file, curr_insn);
- }
- return true;
- }
-
- return false;
-}
-
-/* Treat if_then_else insns, where the operands of both branches
- are registers, as copies. For instance,
- Original :
- (set (reg:SI a) (if_then_else (cond) (reg:SI b) (reg:SI c)))
- Transformed :
- (set (reg:DI a) (if_then_else (cond) (reg:DI b) (reg:DI c)))
- DEF_INSN is the if_then_else insn. */
-
-static bool
-transform_ifelse (ext_cand *cand, rtx_insn *def_insn)
-{
- rtx set_insn = PATTERN (def_insn);
- rtx srcreg, dstreg, srcreg2;
- rtx map_srcreg, map_dstreg, map_srcreg2;
- rtx ifexpr;
- rtx cond;
- rtx new_set;
-
- gcc_assert (GET_CODE (set_insn) == SET);
-
- cond = XEXP (SET_SRC (set_insn), 0);
- dstreg = SET_DEST (set_insn);
- srcreg = XEXP (SET_SRC (set_insn), 1);
- srcreg2 = XEXP (SET_SRC (set_insn), 2);
- /* If the conditional move already has the right or wider mode,
- there is nothing to do. */
- if (GET_MODE_UNIT_SIZE (GET_MODE (dstreg))
- >= GET_MODE_UNIT_SIZE (cand->mode))
- return true;
-
- map_srcreg = gen_rtx_REG (cand->mode, REGNO (srcreg));
- map_srcreg2 = gen_rtx_REG (cand->mode, REGNO (srcreg2));
- map_dstreg = gen_rtx_REG (cand->mode, REGNO (dstreg));
- ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
- new_set = gen_rtx_SET (map_dstreg, ifexpr);
-
- if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
- && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
- cand->code))
- {
- if (dump_file)
- {
- fprintf (dump_file,
- "Mode of conditional move instruction extended:\n");
- print_rtl_single (dump_file, def_insn);
- }
- return true;
- }
-
- return false;
-}
-
-/* Get all the reaching definitions of an instruction. The definitions are
- desired for REG used in INSN. Return the definition list or NULL if a
- definition is missing. If DEST is non-NULL, additionally push the INSN
- of the definitions onto DEST. */
-
-static struct df_link *
-get_defs (rtx_insn *insn, rtx reg, vec<rtx_insn *> *dest)
-{
- df_ref use;
- struct df_link *ref_chain, *ref_link;
-
- FOR_EACH_INSN_USE (use, insn)
- {
- if (GET_CODE (DF_REF_REG (use)) == SUBREG)
- return NULL;
- if (REGNO (DF_REF_REG (use)) == REGNO (reg))
- break;
- }
-
- gcc_assert (use != NULL);
-
- ref_chain = DF_REF_CHAIN (use);
-
- for (ref_link = ref_chain; ref_link; ref_link = ref_link->next)
- {
- /* Problem getting some definition for this instruction. */
- if (ref_link->ref == NULL)
- return NULL;
- if (DF_REF_INSN_INFO (ref_link->ref) == NULL)
- return NULL;
- /* As global regs are assumed to be defined at each function call
- dataflow can report a call_insn as being a definition of REG.
- But we can't do anything with that in this pass so proceed only
- if the instruction really sets REG in a way that can be deduced
- from the RTL structure. */
- if (global_regs[REGNO (reg)]
- && !set_of (reg, DF_REF_INSN (ref_link->ref)))
- return NULL;
- }
-
- if (dest)
- for (ref_link = ref_chain; ref_link; ref_link = ref_link->next)
- dest->safe_push (DF_REF_INSN (ref_link->ref));
-
- return ref_chain;
-}
-
-/* Get all the reaching uses of an instruction. The uses are desired for REG
- set in INSN. Return use list or NULL if a use is missing or irregular. */
-
-static struct df_link *
-get_uses (rtx_insn *insn, rtx reg)
-{
- df_ref def;
- struct df_link *ref_chain, *ref_link;
-
- FOR_EACH_INSN_DEF (def, insn)
- if (REGNO (DF_REF_REG (def)) == REGNO (reg))
- break;
-
- gcc_assert (def != NULL);
-
- ref_chain = DF_REF_CHAIN (def);
-
- for (ref_link = ref_chain; ref_link; ref_link = ref_link->next)
- {
- /* Problem getting some use for this instruction. */
- if (ref_link->ref == NULL)
- return NULL;
- if (DF_REF_CLASS (ref_link->ref) != DF_REF_REGULAR)
- return NULL;
- }
-
- return ref_chain;
-}
-
-/* Return true if INSN is
- (SET (reg REGNO (def_reg)) (if_then_else (cond) (REG x1) (REG x2)))
- and store x1 and x2 in REG_1 and REG_2. */
-
-static bool
-is_cond_copy_insn (rtx_insn *insn, rtx *reg1, rtx *reg2)
-{
- rtx expr = single_set (insn);
-
- if (expr != NULL_RTX
- && GET_CODE (expr) == SET
- && GET_CODE (SET_DEST (expr)) == REG
- && GET_CODE (SET_SRC (expr)) == IF_THEN_ELSE
- && GET_CODE (XEXP (SET_SRC (expr), 1)) == REG
- && GET_CODE (XEXP (SET_SRC (expr), 2)) == REG)
- {
- *reg1 = XEXP (SET_SRC (expr), 1);
- *reg2 = XEXP (SET_SRC (expr), 2);
- return true;
- }
-
- return false;
-}
-
-enum ext_modified_kind
-{
- /* The insn hasn't been modified by ree pass yet. */
- EXT_MODIFIED_NONE,
- /* Changed into zero extension. */
- EXT_MODIFIED_ZEXT,
- /* Changed into sign extension. */
- EXT_MODIFIED_SEXT
-};
-
-struct ATTRIBUTE_PACKED ext_modified
-{
- /* Mode from which ree has zero or sign extended the destination. */
- ENUM_BITFIELD(machine_mode) mode : 8;
-
- /* Kind of modification of the insn. */
- ENUM_BITFIELD(ext_modified_kind) kind : 2;
-
- unsigned int do_not_reextend : 1;
-
- /* True if the insn is scheduled to be deleted. */
- unsigned int deleted : 1;
-};
-
-/* Vectors used by combine_reaching_defs and its helpers. */
-class ext_state
-{
-public:
- /* In order to avoid constant alloc/free, we keep these
- 4 vectors live through the entire find_and_remove_re and just
- truncate them each time. */
- auto_vec<rtx_insn *> defs_list;
- auto_vec<rtx_insn *> copies_list;
- auto_vec<rtx_insn *> modified_list;
- auto_vec<rtx_insn *> work_list;
-
- /* For instructions that have been successfully modified, this is
- the original mode from which the insn is extending and
- kind of extension. */
- struct ext_modified *modified;
-};
-
-/* Reaching Definitions of the extended register could be conditional copies
- or regular definitions. This function separates the two types into two
- lists, STATE->DEFS_LIST and STATE->COPIES_LIST. This is necessary because,
- if a reaching definition is a conditional copy, merging the extension with
- this definition is wrong. Conditional copies are merged by transitively
- merging their definitions. The defs_list is populated with all the reaching
- definitions of the extension instruction (EXTEND_INSN) which must be merged
- with an extension. The copies_list contains all the conditional moves that
- will later be extended into a wider mode conditional move if all the merges
- are successful. The function returns false upon failure, true upon
- success. */
-
-static bool
-make_defs_and_copies_lists (rtx_insn *extend_insn, const_rtx set_pat,
- ext_state *state)
-{
- rtx src_reg = XEXP (SET_SRC (set_pat), 0);
- bool *is_insn_visited;
- bool ret = true;
-
- state->work_list.truncate (0);
-
- /* Initialize the work list. */
- if (!get_defs (extend_insn, src_reg, &state->work_list))
- return false;
-
- is_insn_visited = XCNEWVEC (bool, max_insn_uid);
-
- /* Perform transitive closure for conditional copies. */
- while (!state->work_list.is_empty ())
- {
- rtx_insn *def_insn = state->work_list.pop ();
- rtx reg1, reg2;
-
- gcc_assert (INSN_UID (def_insn) < max_insn_uid);
-
- if (is_insn_visited[INSN_UID (def_insn)])
- continue;
- is_insn_visited[INSN_UID (def_insn)] = true;
-
- if (is_cond_copy_insn (def_insn, &reg1, &reg2))
- {
- /* Push it onto the copy list first. */
- state->copies_list.safe_push (def_insn);
-
- /* Now perform the transitive closure. */
- if (!get_defs (def_insn, reg1, &state->work_list)
- || !get_defs (def_insn, reg2, &state->work_list))
- {
- ret = false;
- break;
- }
- }
- else
- state->defs_list.safe_push (def_insn);
- }
-
- XDELETEVEC (is_insn_visited);
-
- return ret;
-}
-
-/* If DEF_INSN has single SET expression with a register
- destination, possibly buried inside a PARALLEL, return
- the address of the SET expression, else return NULL.
- This is similar to single_set, except that single_set
- allows multiple SETs when all but one is dead. */
-static rtx *
-get_sub_rtx (rtx_insn *def_insn)
-{
- enum rtx_code code = GET_CODE (PATTERN (def_insn));
- rtx *sub_rtx = NULL;
-
- if (code == PARALLEL)
- {
- for (int i = 0; i < XVECLEN (PATTERN (def_insn), 0); i++)
- {
- rtx s_expr = XVECEXP (PATTERN (def_insn), 0, i);
- if (GET_CODE (s_expr) != SET)
- continue;
- if (!REG_P (SET_DEST (s_expr)))
- continue;
-
- if (sub_rtx == NULL)
- sub_rtx = &XVECEXP (PATTERN (def_insn), 0, i);
- else
- {
- /* PARALLEL with multiple SETs. */
- return NULL;
- }
- }
- }
- else if (code == SET)
- {
- rtx s_expr = PATTERN (def_insn);
- if (REG_P (SET_DEST (s_expr)))
- sub_rtx = &PATTERN (def_insn);
- }
-
- return sub_rtx;
-}
-
-/* Merge the DEF_INSN with an extension. Calls combine_set_extension
- on the SET pattern. */
-
-static bool
-merge_def_and_ext (ext_cand *cand, rtx_insn *def_insn, ext_state *state)
-{
- machine_mode ext_src_mode;
- rtx *sub_rtx;
-
- ext_src_mode = GET_MODE (XEXP (SET_SRC (cand->expr), 0));
- sub_rtx = get_sub_rtx (def_insn);
-
- if (sub_rtx == NULL)
- return false;
-
- if (GET_MODE (SET_DEST (*sub_rtx)) == ext_src_mode
- || ((state->modified[INSN_UID (def_insn)].kind
- == (cand->code == ZERO_EXTEND
- ? EXT_MODIFIED_ZEXT : EXT_MODIFIED_SEXT))
- && state->modified[INSN_UID (def_insn)].mode
- == ext_src_mode))
- {
- if (GET_MODE_UNIT_SIZE (GET_MODE (SET_DEST (*sub_rtx)))
- >= GET_MODE_UNIT_SIZE (cand->mode))
- return true;
- /* If def_insn is already scheduled to be deleted, don't attempt
- to modify it. */
- if (state->modified[INSN_UID (def_insn)].deleted)
- return false;
- if (combine_set_extension (cand, def_insn, sub_rtx))
- {
- if (state->modified[INSN_UID (def_insn)].kind == EXT_MODIFIED_NONE)
- state->modified[INSN_UID (def_insn)].mode = ext_src_mode;
- return true;
- }
- }
-
- return false;
-}
-
-/* Given SRC, which should be one or more extensions of a REG, strip
- away the extensions and return the REG. */
-
-static inline rtx
-get_extended_src_reg (rtx src)
-{
- while (GET_CODE (src) == SIGN_EXTEND || GET_CODE (src) == ZERO_EXTEND)
- src = XEXP (src, 0);
- gcc_assert (REG_P (src));
- return src;
-}
-
-/* This function goes through all reaching defs of the source
- of the candidate for elimination (CAND) and tries to combine
- the extension with the definition instruction. The changes
- are made as a group so that even if one definition cannot be
- merged, all reaching definitions end up not being merged.
- When a conditional copy is encountered, merging is attempted
- transitively on its definitions. It returns true upon success
- and false upon failure. */
-
-static bool
-combine_reaching_defs (ext_cand *cand, const_rtx set_pat, ext_state *state)
-{
- rtx_insn *def_insn;
- bool merge_successful = true;
- int i;
- int defs_ix;
- bool outcome;
-
- state->defs_list.truncate (0);
- state->copies_list.truncate (0);
-
- outcome = make_defs_and_copies_lists (cand->insn, set_pat, state);
-
- if (!outcome)
- return false;
-
- /* If the destination operand of the extension is a different
- register than the source operand, then additional restrictions
- are needed. Note we have to handle cases where we have nested
- extensions in the source operand.
-
- Candidate insns are known to be single_sets, via the test in
- find_removable_extensions. So we continue to use single_set here
- rather than get_sub_rtx. */
- rtx set = single_set (cand->insn);
- bool copy_needed
- = (REGNO (SET_DEST (set)) != REGNO (get_extended_src_reg (SET_SRC (set))));
- if (copy_needed)
- {
- /* Considering transformation of
- (set (reg1) (expression))
- ...
- (set (reg2) (any_extend (reg1)))
-
- into
-
- (set (reg2) (any_extend (expression)))
- (set (reg1) (reg2))
- ... */
-
- /* In theory we could handle more than one reaching def, it
- just makes the code to update the insn stream more complex. */
- if (state->defs_list.length () != 1)
- return false;
-
- /* We don't have the structure described above if there are
- conditional moves in between the def and the candidate,
- and we will not handle them correctly. See PR68194. */
- if (state->copies_list.length () > 0)
- return false;
-
- /* We require the candidate not already be modified. It may,
- for example have been changed from a (sign_extend (reg))
- into (zero_extend (sign_extend (reg))).
-
- Handling that case shouldn't be terribly difficult, but the code
- here and the code to emit copies would need auditing. Until
- we see a need, this is the safe thing to do. */
- if (state->modified[INSN_UID (cand->insn)].kind != EXT_MODIFIED_NONE)
- return false;
-
- machine_mode dst_mode = GET_MODE (SET_DEST (set));
- rtx src_reg = get_extended_src_reg (SET_SRC (set));
-
- /* Ensure we can use the src_reg in dst_mode (needed for
- the (set (reg1) (reg2)) insn mentioned above). */
- if (!targetm.hard_regno_mode_ok (REGNO (src_reg), dst_mode))
- return false;
-
- /* Ensure the number of hard registers of the copy match. */
- if (hard_regno_nregs (REGNO (src_reg), dst_mode) != REG_NREGS (src_reg))
- return false;
-
- /* There's only one reaching def. */
- rtx_insn *def_insn = state->defs_list[0];
-
- /* The defining statement must not have been modified either. */
- if (state->modified[INSN_UID (def_insn)].kind != EXT_MODIFIED_NONE)
- return false;
-
- /* The defining statement and candidate insn must be in the same block.
- This is merely to keep the test for safety and updating the insn
- stream simple. Also ensure that within the block the candidate
- follows the defining insn. */
- basic_block bb = BLOCK_FOR_INSN (cand->insn);
- if (bb != BLOCK_FOR_INSN (def_insn)
- || DF_INSN_LUID (def_insn) > DF_INSN_LUID (cand->insn))
- return false;
-
- /* If there is an overlap between the destination of DEF_INSN and
- CAND->insn, then this transformation is not safe. Note we have
- to test in the widened mode. */
- rtx *dest_sub_rtx = get_sub_rtx (def_insn);
- if (dest_sub_rtx == NULL)
- return false;
-
- rtx tmp_reg = gen_rtx_REG (GET_MODE (SET_DEST (set)),
- REGNO (SET_DEST (*dest_sub_rtx)));
- if (reg_overlap_mentioned_p (tmp_reg, SET_DEST (set)))
- return false;
-
- /* On RISC machines we must make sure that changing the mode of SRC_REG
- as destination register will not affect its reaching uses, which may
- read its value in a larger mode because DEF_INSN implicitly sets it
- in word mode. */
- poly_int64 prec
- = GET_MODE_PRECISION (GET_MODE (SET_DEST (*dest_sub_rtx)));
- if (WORD_REGISTER_OPERATIONS && known_lt (prec, BITS_PER_WORD))
- {
- struct df_link *uses = get_uses (def_insn, src_reg);
- if (!uses)
- return false;
-
- for (df_link *use = uses; use; use = use->next)
- if (paradoxical_subreg_p (GET_MODE (*DF_REF_LOC (use->ref)),
- GET_MODE (SET_DEST (*dest_sub_rtx))))
- return false;
- }
-
- /* The destination register of the extension insn must not be
- used or set between the def_insn and cand->insn exclusive. */
- if (reg_used_between_p (SET_DEST (set), def_insn, cand->insn)
- || reg_set_between_p (SET_DEST (set), def_insn, cand->insn))
- return false;
-
- /* We must be able to copy between the two registers. Generate,
- recognize and verify constraints of the copy. Also fail if this
- generated more than one insn.
-
- This generates garbage since we throw away the insn when we're
- done, only to recreate it later if this test was successful.
-
- Make sure to get the mode from the extension (cand->insn). This
- is different than in the code to emit the copy as we have not
- modified the defining insn yet. */
- start_sequence ();
- rtx new_dst = gen_rtx_REG (GET_MODE (SET_DEST (set)),
- REGNO (get_extended_src_reg (SET_SRC (set))));
- rtx new_src = gen_rtx_REG (GET_MODE (SET_DEST (set)),
- REGNO (SET_DEST (set)));
- emit_move_insn (new_dst, new_src);
-
- rtx_insn *insn = get_insns ();
- end_sequence ();
- if (NEXT_INSN (insn))
- return false;
- if (recog_memoized (insn) == -1)
- return false;
- extract_insn (insn);
- if (!constrain_operands (1, get_preferred_alternatives (insn, bb)))
- return false;
-
- while (REG_P (SET_SRC (*dest_sub_rtx))
- && (REGNO (SET_SRC (*dest_sub_rtx)) == REGNO (SET_DEST (set))))
- {
- /* Considering transformation of
- (set (reg2) (expression))
- ...
- (set (reg1) (reg2))
- ...
- (set (reg2) (any_extend (reg1)))
-
- into
-
- (set (reg2) (any_extend (expression)))
- (set (reg1) (reg2))
- ... */
- struct df_link *defs
- = get_defs (def_insn, SET_SRC (*dest_sub_rtx), NULL);
- if (defs == NULL || defs->next)
- break;
-
- /* There is only one reaching def. */
- rtx_insn *def_insn2 = DF_REF_INSN (defs->ref);
-
- /* The defining statement must not have been modified either. */
- if (state->modified[INSN_UID (def_insn2)].kind != EXT_MODIFIED_NONE)
- break;
-
- /* The def_insn2 and candidate insn must be in the same
- block and def_insn follows def_insn2. */
- if (bb != BLOCK_FOR_INSN (def_insn2)
- || DF_INSN_LUID (def_insn2) > DF_INSN_LUID (def_insn))
- break;
-
- rtx *dest_sub_rtx2 = get_sub_rtx (def_insn2);
- if (dest_sub_rtx2 == NULL)
- break;
-
- /* On RISC machines we must make sure that changing the mode of
- SRC_REG as destination register will not affect its reaching
- uses, which may read its value in a larger mode because DEF_INSN
- implicitly sets it in word mode. */
- if (WORD_REGISTER_OPERATIONS && known_lt (prec, BITS_PER_WORD))
- {
- struct df_link *uses = get_uses (def_insn2, SET_DEST (set));
- if (!uses)
- break;
-
- df_link *use;
- rtx dest2 = SET_DEST (*dest_sub_rtx2);
- for (use = uses; use; use = use->next)
- if (paradoxical_subreg_p (GET_MODE (*DF_REF_LOC (use->ref)),
- GET_MODE (dest2)))
- break;
- if (use)
- break;
- }
-
- /* The destination register of the extension insn must not be
- used or set between the def_insn2 and def_insn exclusive.
- Likewise for the other reg, i.e. check both reg1 and reg2
- in the above comment. */
- if (reg_used_between_p (SET_DEST (set), def_insn2, def_insn)
- || reg_set_between_p (SET_DEST (set), def_insn2, def_insn)
- || reg_used_between_p (src_reg, def_insn2, def_insn)
- || reg_set_between_p (src_reg, def_insn2, def_insn))
- break;
-
- state->defs_list[0] = def_insn2;
- break;
- }
- }
-
- /* If cand->insn has been already modified, update cand->mode to a wider
- mode if possible, or punt. */
- if (state->modified[INSN_UID (cand->insn)].kind != EXT_MODIFIED_NONE)
- {
- machine_mode mode;
-
- if (state->modified[INSN_UID (cand->insn)].kind
- != (cand->code == ZERO_EXTEND
- ? EXT_MODIFIED_ZEXT : EXT_MODIFIED_SEXT)
- || state->modified[INSN_UID (cand->insn)].mode != cand->mode
- || (set == NULL_RTX))
- return false;
- mode = GET_MODE (SET_DEST (set));
- gcc_assert (GET_MODE_UNIT_SIZE (mode)
- >= GET_MODE_UNIT_SIZE (cand->mode));
- cand->mode = mode;
- }
-
- merge_successful = true;
-
- /* Go through the defs vector and try to merge all the definitions
- in this vector. */
- state->modified_list.truncate (0);
- FOR_EACH_VEC_ELT (state->defs_list, defs_ix, def_insn)
- {
- if (merge_def_and_ext (cand, def_insn, state))
- state->modified_list.safe_push (def_insn);
- else
- {
- merge_successful = false;
- break;
- }
- }
-
- /* Now go through the conditional copies vector and try to merge all
- the copies in this vector. */
- if (merge_successful)
- {
- FOR_EACH_VEC_ELT (state->copies_list, i, def_insn)
- {
- if (transform_ifelse (cand, def_insn))
- state->modified_list.safe_push (def_insn);
- else
- {
- merge_successful = false;
- break;
- }
- }
- }
-
- if (merge_successful)
- {
- /* Commit the changes here if possible
- FIXME: It's an all-or-nothing scenario. Even if only one definition
- cannot be merged, we entirely give up. In the future, we should allow
- extensions to be partially eliminated along those paths where the
- definitions could be merged. */
- if (apply_change_group ())
- {
- if (dump_file)
- fprintf (dump_file, "All merges were successful.\n");
-
- FOR_EACH_VEC_ELT (state->modified_list, i, def_insn)
- {
- ext_modified *modified = &state->modified[INSN_UID (def_insn)];
- if (modified->kind == EXT_MODIFIED_NONE)
- modified->kind = (cand->code == ZERO_EXTEND ? EXT_MODIFIED_ZEXT
- : EXT_MODIFIED_SEXT);
-
- if (copy_needed)
- modified->do_not_reextend = 1;
- }
- return true;
- }
- else
- {
- /* Changes need not be cancelled explicitly as apply_change_group
- does it. Print list of definitions in the dump_file for debug
- purposes. This extension cannot be deleted. */
- if (dump_file)
- {
- fprintf (dump_file,
- "Merge cancelled, non-mergeable definitions:\n");
- FOR_EACH_VEC_ELT (state->modified_list, i, def_insn)
- print_rtl_single (dump_file, def_insn);
- }
- }
- }
- else
- {
- /* Cancel any changes that have been made so far. */
- cancel_changes (0);
- }
-
- return false;
-}
-
-/* Add an extension pattern that could be eliminated. */
-
-static void
-add_removable_extension (const_rtx expr, rtx_insn *insn,
- vec<ext_cand> *insn_list,
- unsigned *def_map,
- bitmap init_regs)
-{
- enum rtx_code code;
- machine_mode mode;
- unsigned int idx;
- rtx src, dest;
-
- /* We are looking for SET (REG N) (ANY_EXTEND (REG N)). */
- if (GET_CODE (expr) != SET)
- return;
-
- src = SET_SRC (expr);
- code = GET_CODE (src);
- dest = SET_DEST (expr);
- mode = GET_MODE (dest);
-
- if (REG_P (dest)
- && (code == SIGN_EXTEND || code == ZERO_EXTEND)
- && REG_P (XEXP (src, 0)))
- {
- rtx reg = XEXP (src, 0);
- struct df_link *defs, *def;
- ext_cand *cand;
-
- /* Zero-extension of an undefined value is partly defined (it's
- completely undefined for sign-extension, though). So if there exists
- a path from the entry to this zero-extension that leaves this register
- uninitialized, removing the extension could change the behavior of
- correct programs. So first, check it is not the case. */
- if (code == ZERO_EXTEND && !bitmap_bit_p (init_regs, REGNO (reg)))
- {
- if (dump_file)
- {
- fprintf (dump_file, "Cannot eliminate extension:\n");
- print_rtl_single (dump_file, insn);
- fprintf (dump_file, " because it can operate on uninitialized"
- " data\n");
- }
- return;
- }
-
- /* Second, make sure we can get all the reaching definitions. */
- defs = get_defs (insn, reg, NULL);
- if (!defs)
- {
- if (dump_file)
- {
- fprintf (dump_file, "Cannot eliminate extension:\n");
- print_rtl_single (dump_file, insn);
- fprintf (dump_file, " because of missing definition(s)\n");
- }
- return;
- }
-
- /* Third, make sure the reaching definitions don't feed another and
- different extension. FIXME: this obviously can be improved. */
- for (def = defs; def; def = def->next)
- if ((idx = def_map[INSN_UID (DF_REF_INSN (def->ref))])
- && idx != -1U
- && (cand = &(*insn_list)[idx - 1])
- && cand->code != code)
- {
- if (dump_file)
- {
- fprintf (dump_file, "Cannot eliminate extension:\n");
- print_rtl_single (dump_file, insn);
- fprintf (dump_file, " because of other extension\n");
- }
- return;
- }
- /* For vector mode extensions, ensure that all uses of the
- XEXP (src, 0) register are in insn or debug insns, as unlike
- integral extensions lowpart subreg of the sign/zero extended
- register are not equal to the original register, so we have
- to change all uses or none and the current code isn't able
- to change them all at once in one transaction. */
- else if (VECTOR_MODE_P (GET_MODE (XEXP (src, 0))))
- {
- struct df_link *ref_chain, *ref_link;
-
- ref_chain = DF_REF_CHAIN (def->ref);
- for (ref_link = ref_chain; ref_link; ref_link = ref_link->next)
- {
- if (ref_link->ref == NULL
- || DF_REF_INSN_INFO (ref_link->ref) == NULL)
- {
- idx = -1U;
- break;
- }
- rtx_insn *use_insn = DF_REF_INSN (ref_link->ref);
- if (use_insn != insn && !DEBUG_INSN_P (use_insn))
- {
- idx = -1U;
- break;
- }
- }
-
- if (idx == -1U)
- {
- def_map[INSN_UID (DF_REF_INSN (def->ref))] = idx;
- if (dump_file)
- {
- fprintf (dump_file, "Cannot eliminate extension:\n");
- print_rtl_single (dump_file, insn);
- fprintf (dump_file,
- " because some vector uses aren't extension\n");
- }
- return;
- }
- }
-
- /* Fourth, if the extended version occupies more registers than the
- original and the source of the extension is the same hard register
- as the destination of the extension, then we cannot eliminate
- the extension without deep analysis, so just punt.
-
- We allow this when the registers are different because the
- code in combine_reaching_defs will handle that case correctly. */
- if (hard_regno_nregs (REGNO (dest), mode) != REG_NREGS (reg)
- && reg_overlap_mentioned_p (dest, reg))
- return;
-
- /* Then add the candidate to the list and insert the reaching definitions
- into the definition map. */
- ext_cand e = {expr, code, mode, insn};
- insn_list->safe_push (e);
- idx = insn_list->length ();
-
- for (def = defs; def; def = def->next)
- def_map[INSN_UID (DF_REF_INSN (def->ref))] = idx;
- }
-}
-
-/* Traverse the instruction stream looking for extensions and return the
- list of candidates. */
-
-static vec<ext_cand>
-find_removable_extensions (void)
-{
- vec<ext_cand> insn_list = vNULL;
- basic_block bb;
- rtx_insn *insn;
- rtx set;
- unsigned *def_map = XCNEWVEC (unsigned, max_insn_uid);
- bitmap_head init, kill, gen, tmp;
-
- bitmap_initialize (&init, NULL);
- bitmap_initialize (&kill, NULL);
- bitmap_initialize (&gen, NULL);
- bitmap_initialize (&tmp, NULL);
-
- FOR_EACH_BB_FN (bb, cfun)
- {
- bitmap_copy (&init, DF_MIR_IN (bb));
- bitmap_clear (&kill);
- bitmap_clear (&gen);
-
- FOR_BB_INSNS (bb, insn)
- {
- if (NONDEBUG_INSN_P (insn))
- {
- set = single_set (insn);
- if (set != NULL_RTX)
- add_removable_extension (set, insn, &insn_list, def_map,
- &init);
- df_mir_simulate_one_insn (bb, insn, &kill, &gen);
- bitmap_ior_and_compl (&tmp, &gen, &init, &kill);
- bitmap_copy (&init, &tmp);
- }
- }
- }
-
- XDELETEVEC (def_map);
-
- return insn_list;
-}
-
-/* This is the main function that checks the insn stream for redundant
- extensions and tries to remove them if possible. */
-
-static void
-find_and_remove_re (void)
-{
- ext_cand *curr_cand;
- rtx_insn *curr_insn = NULL;
- int num_re_opportunities = 0, num_realized = 0, i;
- vec<ext_cand> reinsn_list;
- auto_vec<rtx_insn *> reinsn_del_list;
- auto_vec<rtx_insn *> reinsn_copy_list;
-
- /* Construct DU chain to get all reaching definitions of each
- extension instruction. */
- df_set_flags (DF_RD_PRUNE_DEAD_DEFS);
- df_chain_add_problem (DF_UD_CHAIN + DF_DU_CHAIN);
- df_mir_add_problem ();
- df_analyze ();
- df_set_flags (DF_DEFER_INSN_RESCAN);
-
- max_insn_uid = get_max_uid ();
- reinsn_list = find_removable_extensions ();
-
- ext_state state;
- if (reinsn_list.is_empty ())
- state.modified = NULL;
- else
- state.modified = XCNEWVEC (struct ext_modified, max_insn_uid);
-
- FOR_EACH_VEC_ELT (reinsn_list, i, curr_cand)
- {
- num_re_opportunities++;
-
- /* Try to combine the extension with the definition. */
- if (dump_file)
- {
- fprintf (dump_file, "Trying to eliminate extension:\n");
- print_rtl_single (dump_file, curr_cand->insn);
- }
-
- if (combine_reaching_defs (curr_cand, curr_cand->expr, &state))
- {
- if (dump_file)
- fprintf (dump_file, "Eliminated the extension.\n");
- num_realized++;
- /* If the RHS of the current candidate is not (extend (reg)), then
- we do not allow the optimization of extensions where
- the source and destination registers do not match. Thus
- checking REG_P here is correct. */
- rtx set = single_set (curr_cand->insn);
- if (REG_P (XEXP (SET_SRC (set), 0))
- && (REGNO (SET_DEST (set)) != REGNO (XEXP (SET_SRC (set), 0))))
- {
- reinsn_copy_list.safe_push (curr_cand->insn);
- reinsn_copy_list.safe_push (state.defs_list[0]);
- }
- reinsn_del_list.safe_push (curr_cand->insn);
- state.modified[INSN_UID (curr_cand->insn)].deleted = 1;
- }
- }
-
- /* The copy list contains pairs of insns which describe copies we
- need to insert into the INSN stream.
-
- The first insn in each pair is the extension insn, from which
- we derive the source and destination of the copy.
-
- The second insn in each pair is the memory reference where the
- extension will ultimately happen. We emit the new copy
- immediately after this insn.
-
- It may first appear that the arguments for the copy are reversed.
- Remember that the memory reference will be changed to refer to the
- destination of the extention. So we're actually emitting a copy
- from the new destination to the old destination. */
- for (unsigned int i = 0; i < reinsn_copy_list.length (); i += 2)
- {
- rtx_insn *curr_insn = reinsn_copy_list[i];
- rtx_insn *def_insn = reinsn_copy_list[i + 1];
-
- /* Use the mode of the destination of the defining insn
- for the mode of the copy. This is necessary if the
- defining insn was used to eliminate a second extension
- that was wider than the first. */
- rtx sub_rtx = *get_sub_rtx (def_insn);
- rtx set = single_set (curr_insn);
- rtx new_dst = gen_rtx_REG (GET_MODE (SET_DEST (sub_rtx)),
- REGNO (XEXP (SET_SRC (set), 0)));
- rtx new_src = gen_rtx_REG (GET_MODE (SET_DEST (sub_rtx)),
- REGNO (SET_DEST (set)));
- rtx new_set = gen_rtx_SET (new_dst, new_src);
- emit_insn_after (new_set, def_insn);
- }
-
- /* Delete all useless extensions here in one sweep. */
- FOR_EACH_VEC_ELT (reinsn_del_list, i, curr_insn)
- delete_insn (curr_insn);
-
- reinsn_list.release ();
- XDELETEVEC (state.modified);
-
- if (dump_file && num_re_opportunities > 0)
- fprintf (dump_file, "Elimination opportunities = %d realized = %d\n",
- num_re_opportunities, num_realized);
-}
-
-/* Find and remove redundant extensions. */
-
-static unsigned int
-rest_of_handle_ree (void)
-{
- find_and_remove_re ();
- return 0;
-}
-
-namespace {
-
-const pass_data pass_data_ree =
-{
- RTL_PASS, /* type */
- "ree", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- TV_REE, /* tv_id */
- 0, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_df_finish, /* todo_flags_finish */
-};
-
-class pass_ree : public rtl_opt_pass
-{
-public:
- pass_ree (gcc::context *ctxt)
- : rtl_opt_pass (pass_data_ree, ctxt)
- {}
-
- /* opt_pass methods: */
- virtual bool gate (function *) { return (optimize > 0 && flag_ree); }
- virtual unsigned int execute (function *) { return rest_of_handle_ree (); }
-
-}; // class pass_ree
-
-} // anon namespace
-
-rtl_opt_pass *
-make_pass_ree (gcc::context *ctxt)
-{
- return new pass_ree (ctxt);
-}