diff options
author | Martin Liska <mliska@suse.cz> | 2022-01-14 16:56:44 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-01-17 22:12:04 +0100 |
commit | 5c69acb32329d49e58c26fa41ae74229a52b9106 (patch) | |
tree | ddb05f9d73afb6f998457d2ac4b720e3b3b60483 /gcc/df-scan.c | |
parent | 490e23032baaece71f2ec09fa1805064b150fbc2 (diff) | |
download | gcc-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/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 4252 |
1 files changed, 0 insertions, 4252 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c deleted file mode 100644 index 4e3291a..0000000 --- a/gcc/df-scan.c +++ /dev/null @@ -1,4252 +0,0 @@ -/* Scanning of rtl for dataflow analysis. - Copyright (C) 1999-2022 Free Software Foundation, Inc. - Originally contributed by Michael P. Hayes - (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) - Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) - and Kenneth Zadeck (zadeck@naturalbridge.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/>. */ - -#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 "regs.h" -#include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */ -#include "dumpfile.h" -#include "calls.h" -#include "function-abi.h" - -/* The set of hard registers in eliminables[i].from. */ - -static HARD_REG_SET elim_reg_set; - -/* Initialize ur_in and ur_out as if all hard registers were partially - available. */ - -class df_collection_rec -{ -public: - auto_vec<df_ref, 128> def_vec; - auto_vec<df_ref, 32> use_vec; - auto_vec<df_ref, 32> eq_use_vec; - auto_vec<df_mw_hardreg *, 32> mw_vec; -}; - -static void df_ref_record (enum df_ref_class, class df_collection_rec *, - rtx, rtx *, - basic_block, struct df_insn_info *, - enum df_ref_type, int ref_flags); -static void df_def_record_1 (class df_collection_rec *, rtx *, - basic_block, struct df_insn_info *, - int ref_flags); -static void df_defs_record (class df_collection_rec *, rtx, - basic_block, struct df_insn_info *, - int ref_flags); -static void df_uses_record (class df_collection_rec *, - rtx *, enum df_ref_type, - basic_block, struct df_insn_info *, - int ref_flags); - -static void df_install_ref_incremental (df_ref); -static void df_insn_refs_collect (class df_collection_rec*, - basic_block, struct df_insn_info *); -static void df_canonize_collection_rec (class df_collection_rec *); - -static void df_get_regular_block_artificial_uses (bitmap); -static void df_get_eh_block_artificial_uses (bitmap); - -static void df_record_entry_block_defs (bitmap); -static void df_record_exit_block_uses (bitmap); -static void df_get_exit_block_use_set (bitmap); -static void df_get_entry_block_def_set (bitmap); -static void df_grow_ref_info (struct df_ref_info *, unsigned int); -static void df_ref_chain_delete_du_chain (df_ref); -static void df_ref_chain_delete (df_ref); - -static void df_refs_add_to_chains (class df_collection_rec *, - basic_block, rtx_insn *, unsigned int); - -static bool df_insn_refs_verify (class df_collection_rec *, basic_block, - rtx_insn *, bool); -static void df_entry_block_defs_collect (class df_collection_rec *, bitmap); -static void df_exit_block_uses_collect (class df_collection_rec *, bitmap); -static void df_install_ref (df_ref, struct df_reg_info *, - struct df_ref_info *, bool); - -static int df_ref_compare (df_ref, df_ref); -static int df_ref_ptr_compare (const void *, const void *); -static int df_mw_compare (const df_mw_hardreg *, const df_mw_hardreg *); -static int df_mw_ptr_compare (const void *, const void *); - -static void df_insn_info_delete (unsigned int); - -/* Indexed by hardware reg number, is true if that register is ever - used in the current function. - - In df-scan.c, this is set up to record the hard regs used - explicitly. Reload adds in the hard regs used for holding pseudo - regs. Final uses it to generate the code in the function prologue - and epilogue to save and restore registers as needed. */ - -static bool regs_ever_live[FIRST_PSEUDO_REGISTER]; - -/* Flags used to tell df_refs_add_to_chains() which vectors it should copy. */ -static const unsigned int copy_defs = 0x1; -static const unsigned int copy_uses = 0x2; -static const unsigned int copy_eq_uses = 0x4; -static const unsigned int copy_mw = 0x8; -static const unsigned int copy_all = copy_defs | copy_uses | copy_eq_uses -| copy_mw; - -/*---------------------------------------------------------------------------- - SCANNING DATAFLOW PROBLEM - - There are several ways in which scanning looks just like the other - dataflow problems. It shares the all the mechanisms for local info - as well as basic block info. Where it differs is when and how often - it gets run. It also has no need for the iterative solver. -----------------------------------------------------------------------------*/ - -/* Problem data for the scanning dataflow function. */ -struct df_scan_problem_data -{ - object_allocator<df_base_ref> *ref_base_pool; - object_allocator<df_artificial_ref> *ref_artificial_pool; - object_allocator<df_regular_ref> *ref_regular_pool; - object_allocator<df_insn_info> *insn_pool; - object_allocator<df_reg_info> *reg_pool; - object_allocator<df_mw_hardreg> *mw_reg_pool; - - bitmap_obstack reg_bitmaps; - bitmap_obstack insn_bitmaps; -}; - -/* Internal function to shut down the scanning problem. */ -static void -df_scan_free_internal (void) -{ - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - - free (df->def_info.refs); - free (df->def_info.begin); - free (df->def_info.count); - memset (&df->def_info, 0, (sizeof (struct df_ref_info))); - - free (df->use_info.refs); - free (df->use_info.begin); - free (df->use_info.count); - memset (&df->use_info, 0, (sizeof (struct df_ref_info))); - - free (df->def_regs); - df->def_regs = NULL; - free (df->use_regs); - df->use_regs = NULL; - free (df->eq_use_regs); - df->eq_use_regs = NULL; - df->regs_size = 0; - DF_REG_SIZE (df) = 0; - - free (df->insns); - df->insns = NULL; - DF_INSN_SIZE () = 0; - - free (df_scan->block_info); - df_scan->block_info = NULL; - df_scan->block_info_size = 0; - - bitmap_clear (&df->hardware_regs_used); - bitmap_clear (&df->regular_block_artificial_uses); - bitmap_clear (&df->eh_block_artificial_uses); - BITMAP_FREE (df->entry_block_defs); - BITMAP_FREE (df->exit_block_uses); - bitmap_clear (&df->insns_to_delete); - bitmap_clear (&df->insns_to_rescan); - bitmap_clear (&df->insns_to_notes_rescan); - - delete problem_data->ref_base_pool; - delete problem_data->ref_artificial_pool; - delete problem_data->ref_regular_pool; - delete problem_data->insn_pool; - delete problem_data->reg_pool; - delete problem_data->mw_reg_pool; - bitmap_obstack_release (&problem_data->reg_bitmaps); - bitmap_obstack_release (&problem_data->insn_bitmaps); - free (df_scan->problem_data); -} - - -/* Free basic block info. */ - -static void -df_scan_free_bb_info (basic_block bb, void *vbb_info) -{ - struct df_scan_bb_info *bb_info = (struct df_scan_bb_info *) vbb_info; - unsigned int bb_index = bb->index; - rtx_insn *insn; - - FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) - df_insn_info_delete (INSN_UID (insn)); - - if (bb_index < df_scan->block_info_size) - bb_info = df_scan_get_bb_info (bb_index); - - /* Get rid of any artificial uses or defs. */ - df_ref_chain_delete_du_chain (bb_info->artificial_defs); - df_ref_chain_delete_du_chain (bb_info->artificial_uses); - df_ref_chain_delete (bb_info->artificial_defs); - df_ref_chain_delete (bb_info->artificial_uses); - bb_info->artificial_defs = NULL; - bb_info->artificial_uses = NULL; -} - - -/* Allocate the problem data for the scanning problem. This should be - called when the problem is created or when the entire function is to - be rescanned. */ -void -df_scan_alloc (bitmap all_blocks ATTRIBUTE_UNUSED) -{ - struct df_scan_problem_data *problem_data; - basic_block bb; - - /* Given the number of pools, this is really faster than tearing - everything apart. */ - if (df_scan->problem_data) - df_scan_free_internal (); - - problem_data = XNEW (struct df_scan_problem_data); - df_scan->problem_data = problem_data; - df_scan->computed = true; - - problem_data->ref_base_pool = new object_allocator<df_base_ref> - ("df_scan ref base"); - problem_data->ref_artificial_pool = new object_allocator<df_artificial_ref> - ("df_scan ref artificial"); - problem_data->ref_regular_pool = new object_allocator<df_regular_ref> - ("df_scan ref regular"); - problem_data->insn_pool = new object_allocator<df_insn_info> - ("df_scan insn"); - problem_data->reg_pool = new object_allocator<df_reg_info> - ("df_scan reg"); - problem_data->mw_reg_pool = new object_allocator<df_mw_hardreg> - ("df_scan mw_reg"); - - bitmap_obstack_initialize (&problem_data->reg_bitmaps); - bitmap_obstack_initialize (&problem_data->insn_bitmaps); - - df_grow_reg_info (); - - df_grow_insn_info (); - df_grow_bb_info (df_scan); - - FOR_ALL_BB_FN (bb, cfun) - { - unsigned int bb_index = bb->index; - struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb_index); - bb_info->artificial_defs = NULL; - bb_info->artificial_uses = NULL; - } - - bitmap_initialize (&df->hardware_regs_used, &problem_data->reg_bitmaps); - bitmap_initialize (&df->regular_block_artificial_uses, &problem_data->reg_bitmaps); - bitmap_initialize (&df->eh_block_artificial_uses, &problem_data->reg_bitmaps); - df->entry_block_defs = BITMAP_ALLOC (&problem_data->reg_bitmaps); - df->exit_block_uses = BITMAP_ALLOC (&problem_data->reg_bitmaps); - bitmap_initialize (&df->insns_to_delete, &problem_data->insn_bitmaps); - bitmap_initialize (&df->insns_to_rescan, &problem_data->insn_bitmaps); - bitmap_initialize (&df->insns_to_notes_rescan, &problem_data->insn_bitmaps); - df_scan->optional_p = false; -} - - -/* Free all of the data associated with the scan problem. */ - -static void -df_scan_free (void) -{ - if (df_scan->problem_data) - df_scan_free_internal (); - - if (df->blocks_to_analyze) - { - BITMAP_FREE (df->blocks_to_analyze); - df->blocks_to_analyze = NULL; - } - - free (df_scan); -} - -/* Dump the preamble for DF_SCAN dump. */ -static void -df_scan_start_dump (FILE *file ATTRIBUTE_UNUSED) -{ - int i; - int dcount = 0; - int ucount = 0; - int ecount = 0; - int icount = 0; - int ccount = 0; - basic_block bb; - rtx_insn *insn; - - fprintf (file, ";; fully invalidated by EH \t"); - df_print_regset - (file, bitmap_view<HARD_REG_SET> (eh_edge_abi.full_reg_clobbers ())); - fprintf (file, ";; hardware regs used \t"); - df_print_regset (file, &df->hardware_regs_used); - fprintf (file, ";; regular block artificial uses \t"); - df_print_regset (file, &df->regular_block_artificial_uses); - fprintf (file, ";; eh block artificial uses \t"); - df_print_regset (file, &df->eh_block_artificial_uses); - fprintf (file, ";; entry block defs \t"); - df_print_regset (file, df->entry_block_defs); - fprintf (file, ";; exit block uses \t"); - df_print_regset (file, df->exit_block_uses); - fprintf (file, ";; regs ever live \t"); - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (df_regs_ever_live_p (i)) - fprintf (file, " %d [%s]", i, reg_names[i]); - fprintf (file, "\n;; ref usage \t"); - - for (i = 0; i < (int)df->regs_inited; i++) - if (DF_REG_DEF_COUNT (i) || DF_REG_USE_COUNT (i) || DF_REG_EQ_USE_COUNT (i)) - { - const char * sep = ""; - - fprintf (file, "r%d={", i); - if (DF_REG_DEF_COUNT (i)) - { - fprintf (file, "%dd", DF_REG_DEF_COUNT (i)); - sep = ","; - dcount += DF_REG_DEF_COUNT (i); - } - if (DF_REG_USE_COUNT (i)) - { - fprintf (file, "%s%du", sep, DF_REG_USE_COUNT (i)); - sep = ","; - ucount += DF_REG_USE_COUNT (i); - } - if (DF_REG_EQ_USE_COUNT (i)) - { - fprintf (file, "%s%de", sep, DF_REG_EQ_USE_COUNT (i)); - ecount += DF_REG_EQ_USE_COUNT (i); - } - fprintf (file, "} "); - } - - FOR_EACH_BB_FN (bb, cfun) - FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) - { - if (CALL_P (insn)) - ccount++; - else - icount++; - } - - fprintf (file, "\n;; total ref usage %d{%dd,%du,%de}" - " in %d{%d regular + %d call} insns.\n", - dcount + ucount + ecount, dcount, ucount, ecount, - icount + ccount, icount, ccount); -} - -/* Dump the bb_info for a given basic block. */ -static void -df_scan_start_block (basic_block bb, FILE *file) -{ - struct df_scan_bb_info *bb_info - = df_scan_get_bb_info (bb->index); - - if (bb_info) - { - fprintf (file, ";; bb %d artificial_defs: ", bb->index); - df_refs_chain_dump (bb_info->artificial_defs, true, file); - fprintf (file, "\n;; bb %d artificial_uses: ", bb->index); - df_refs_chain_dump (bb_info->artificial_uses, true, file); - fprintf (file, "\n"); - } -#if 0 - { - rtx_insn *insn; - FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) - df_insn_debug (insn, false, file); - } -#endif -} - -static const struct df_problem problem_SCAN = -{ - DF_SCAN, /* Problem id. */ - DF_NONE, /* Direction. */ - df_scan_alloc, /* Allocate the problem specific data. */ - NULL, /* Reset global information. */ - df_scan_free_bb_info, /* Free basic block info. */ - NULL, /* Local compute function. */ - NULL, /* Init the solution specific data. */ - NULL, /* Iterative solver. */ - NULL, /* Confluence operator 0. */ - NULL, /* Confluence operator n. */ - NULL, /* Transfer function. */ - NULL, /* Finalize function. */ - df_scan_free, /* Free all of the problem information. */ - NULL, /* Remove this problem from the stack of dataflow problems. */ - df_scan_start_dump, /* Debugging. */ - df_scan_start_block, /* Debugging start block. */ - NULL, /* Debugging end block. */ - NULL, /* Debugging start insn. */ - NULL, /* Debugging end insn. */ - NULL, /* Incremental solution verify start. */ - NULL, /* Incremental solution verify end. */ - NULL, /* Dependent problem. */ - sizeof (struct df_scan_bb_info),/* Size of entry of block_info array. */ - TV_DF_SCAN, /* Timing variable. */ - false /* Reset blocks on dropping out of blocks_to_analyze. */ -}; - - -/* Create a new DATAFLOW instance and add it to an existing instance - of DF. The returned structure is what is used to get at the - solution. */ - -void -df_scan_add_problem (void) -{ - df_add_problem (&problem_SCAN); -} - - -/*---------------------------------------------------------------------------- - Storage Allocation Utilities -----------------------------------------------------------------------------*/ - - -/* First, grow the reg_info information. If the current size is less than - the number of pseudos, grow to 25% more than the number of - pseudos. - - Second, assure that all of the slots up to max_reg_num have been - filled with reg_info structures. */ - -void -df_grow_reg_info (void) -{ - unsigned int max_reg = max_reg_num (); - unsigned int new_size = max_reg; - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - unsigned int i; - - if (df->regs_size < new_size) - { - new_size += new_size / 4; - df->def_regs = XRESIZEVEC (struct df_reg_info *, df->def_regs, new_size); - df->use_regs = XRESIZEVEC (struct df_reg_info *, df->use_regs, new_size); - df->eq_use_regs = XRESIZEVEC (struct df_reg_info *, df->eq_use_regs, - new_size); - df->def_info.begin = XRESIZEVEC (unsigned, df->def_info.begin, new_size); - df->def_info.count = XRESIZEVEC (unsigned, df->def_info.count, new_size); - df->use_info.begin = XRESIZEVEC (unsigned, df->use_info.begin, new_size); - df->use_info.count = XRESIZEVEC (unsigned, df->use_info.count, new_size); - df->regs_size = new_size; - } - - for (i = df->regs_inited; i < max_reg; i++) - { - struct df_reg_info *reg_info; - - // TODO - reg_info = problem_data->reg_pool->allocate (); - memset (reg_info, 0, sizeof (struct df_reg_info)); - df->def_regs[i] = reg_info; - reg_info = problem_data->reg_pool->allocate (); - memset (reg_info, 0, sizeof (struct df_reg_info)); - df->use_regs[i] = reg_info; - reg_info = problem_data->reg_pool->allocate (); - memset (reg_info, 0, sizeof (struct df_reg_info)); - df->eq_use_regs[i] = reg_info; - df->def_info.begin[i] = 0; - df->def_info.count[i] = 0; - df->use_info.begin[i] = 0; - df->use_info.count[i] = 0; - } - - df->regs_inited = max_reg; -} - - -/* Grow the ref information. */ - -static void -df_grow_ref_info (struct df_ref_info *ref_info, unsigned int new_size) -{ - if (ref_info->refs_size < new_size) - { - ref_info->refs = XRESIZEVEC (df_ref, ref_info->refs, new_size); - memset (ref_info->refs + ref_info->refs_size, 0, - (new_size - ref_info->refs_size) *sizeof (df_ref)); - ref_info->refs_size = new_size; - } -} - - -/* Check and grow the ref information if necessary. This routine - guarantees total_size + BITMAP_ADDEND amount of entries in refs - array. It updates ref_info->refs_size only and does not change - ref_info->total_size. */ - -static void -df_check_and_grow_ref_info (struct df_ref_info *ref_info, - unsigned bitmap_addend) -{ - if (ref_info->refs_size < ref_info->total_size + bitmap_addend) - { - int new_size = ref_info->total_size + bitmap_addend; - new_size += ref_info->total_size / 4; - df_grow_ref_info (ref_info, new_size); - } -} - - -/* Grow the ref information. If the current size is less than the - number of instructions, grow to 25% more than the number of - instructions. */ - -void -df_grow_insn_info (void) -{ - unsigned int new_size = get_max_uid () + 1; - if (DF_INSN_SIZE () < new_size) - { - new_size += new_size / 4; - df->insns = XRESIZEVEC (struct df_insn_info *, df->insns, new_size); - memset (df->insns + df->insns_size, 0, - (new_size - DF_INSN_SIZE ()) *sizeof (struct df_insn_info *)); - DF_INSN_SIZE () = new_size; - } -} - - - - -/*---------------------------------------------------------------------------- - PUBLIC INTERFACES FOR SMALL GRAIN CHANGES TO SCANNING. -----------------------------------------------------------------------------*/ - -/* Rescan all of the block_to_analyze or all of the blocks in the - function if df_set_blocks if blocks_to_analyze is NULL; */ - -void -df_scan_blocks (void) -{ - basic_block bb; - - df->def_info.ref_order = DF_REF_ORDER_NO_TABLE; - df->use_info.ref_order = DF_REF_ORDER_NO_TABLE; - - df_get_regular_block_artificial_uses (&df->regular_block_artificial_uses); - df_get_eh_block_artificial_uses (&df->eh_block_artificial_uses); - - bitmap_ior_into (&df->eh_block_artificial_uses, - &df->regular_block_artificial_uses); - - /* ENTRY and EXIT blocks have special defs/uses. */ - df_get_entry_block_def_set (df->entry_block_defs); - df_record_entry_block_defs (df->entry_block_defs); - df_get_exit_block_use_set (df->exit_block_uses); - df_record_exit_block_uses (df->exit_block_uses); - df_set_bb_dirty (BASIC_BLOCK_FOR_FN (cfun, ENTRY_BLOCK)); - df_set_bb_dirty (BASIC_BLOCK_FOR_FN (cfun, EXIT_BLOCK)); - - /* Regular blocks */ - FOR_EACH_BB_FN (bb, cfun) - { - unsigned int bb_index = bb->index; - df_bb_refs_record (bb_index, true); - } -} - -/* Create new refs under address LOC within INSN. This function is - only used externally. REF_FLAGS must be either 0 or DF_REF_IN_NOTE, - depending on whether LOC is inside PATTERN (INSN) or a note. */ - -void -df_uses_create (rtx *loc, rtx_insn *insn, int ref_flags) -{ - gcc_assert (!(ref_flags & ~DF_REF_IN_NOTE)); - df_uses_record (NULL, loc, DF_REF_REG_USE, - BLOCK_FOR_INSN (insn), - DF_INSN_INFO_GET (insn), - ref_flags); -} - -static void -df_install_ref_incremental (df_ref ref) -{ - struct df_reg_info **reg_info; - struct df_ref_info *ref_info; - df_ref *ref_ptr; - bool add_to_table; - - rtx_insn *insn = DF_REF_INSN (ref); - basic_block bb = BLOCK_FOR_INSN (insn); - - if (DF_REF_REG_DEF_P (ref)) - { - reg_info = df->def_regs; - ref_info = &df->def_info; - ref_ptr = &DF_INSN_DEFS (insn); - add_to_table = ref_info->ref_order != DF_REF_ORDER_NO_TABLE; - } - else if (DF_REF_FLAGS (ref) & DF_REF_IN_NOTE) - { - reg_info = df->eq_use_regs; - ref_info = &df->use_info; - ref_ptr = &DF_INSN_EQ_USES (insn); - switch (ref_info->ref_order) - { - case DF_REF_ORDER_UNORDERED_WITH_NOTES: - case DF_REF_ORDER_BY_REG_WITH_NOTES: - case DF_REF_ORDER_BY_INSN_WITH_NOTES: - add_to_table = true; - break; - default: - add_to_table = false; - break; - } - } - else - { - reg_info = df->use_regs; - ref_info = &df->use_info; - ref_ptr = &DF_INSN_USES (insn); - add_to_table = ref_info->ref_order != DF_REF_ORDER_NO_TABLE; - } - - /* Do not add if ref is not in the right blocks. */ - if (add_to_table && df->analyze_subset) - add_to_table = bitmap_bit_p (df->blocks_to_analyze, bb->index); - - df_install_ref (ref, reg_info[DF_REF_REGNO (ref)], ref_info, add_to_table); - - if (add_to_table) - switch (ref_info->ref_order) - { - case DF_REF_ORDER_UNORDERED_WITH_NOTES: - case DF_REF_ORDER_BY_REG_WITH_NOTES: - case DF_REF_ORDER_BY_INSN_WITH_NOTES: - ref_info->ref_order = DF_REF_ORDER_UNORDERED_WITH_NOTES; - break; - default: - ref_info->ref_order = DF_REF_ORDER_UNORDERED; - break; - } - - while (*ref_ptr && df_ref_compare (*ref_ptr, ref) < 0) - ref_ptr = &DF_REF_NEXT_LOC (*ref_ptr); - - DF_REF_NEXT_LOC (ref) = *ref_ptr; - *ref_ptr = ref; - -#if 0 - if (dump_file) - { - fprintf (dump_file, "adding ref "); - df_ref_debug (ref, dump_file); - } -#endif - /* By adding the ref directly, df_insn_rescan my not find any - differences even though the block will have changed. So we need - to mark the block dirty ourselves. */ - if (!DEBUG_INSN_P (DF_REF_INSN (ref))) - df_set_bb_dirty (bb); -} - - - -/*---------------------------------------------------------------------------- - UTILITIES TO CREATE AND DESTROY REFS AND CHAINS. -----------------------------------------------------------------------------*/ - -static void -df_free_ref (df_ref ref) -{ - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - - switch (DF_REF_CLASS (ref)) - { - case DF_REF_BASE: - problem_data->ref_base_pool->remove ((df_base_ref *) (ref)); - break; - - case DF_REF_ARTIFICIAL: - problem_data->ref_artificial_pool->remove - ((df_artificial_ref *) (ref)); - break; - - case DF_REF_REGULAR: - problem_data->ref_regular_pool->remove - ((df_regular_ref *) (ref)); - break; - } -} - - -/* Unlink and delete REF at the reg_use, reg_eq_use or reg_def chain. - Also delete the def-use or use-def chain if it exists. */ - -static void -df_reg_chain_unlink (df_ref ref) -{ - df_ref next = DF_REF_NEXT_REG (ref); - df_ref prev = DF_REF_PREV_REG (ref); - int id = DF_REF_ID (ref); - struct df_reg_info *reg_info; - df_ref *refs = NULL; - - if (DF_REF_REG_DEF_P (ref)) - { - int regno = DF_REF_REGNO (ref); - reg_info = DF_REG_DEF_GET (regno); - refs = df->def_info.refs; - } - else - { - if (DF_REF_FLAGS (ref) & DF_REF_IN_NOTE) - { - reg_info = DF_REG_EQ_USE_GET (DF_REF_REGNO (ref)); - switch (df->use_info.ref_order) - { - case DF_REF_ORDER_UNORDERED_WITH_NOTES: - case DF_REF_ORDER_BY_REG_WITH_NOTES: - case DF_REF_ORDER_BY_INSN_WITH_NOTES: - refs = df->use_info.refs; - break; - default: - break; - } - } - else - { - reg_info = DF_REG_USE_GET (DF_REF_REGNO (ref)); - refs = df->use_info.refs; - } - } - - if (refs) - { - if (df->analyze_subset) - { - if (bitmap_bit_p (df->blocks_to_analyze, DF_REF_BBNO (ref))) - refs[id] = NULL; - } - else - refs[id] = NULL; - } - - /* Delete any def-use or use-def chains that start here. It is - possible that there is trash in this field. This happens for - insns that have been deleted when rescanning has been deferred - and the chain problem has also been deleted. The chain tear down - code skips deleted insns. */ - if (df_chain && DF_REF_CHAIN (ref)) - df_chain_unlink (ref); - - reg_info->n_refs--; - if (DF_REF_FLAGS_IS_SET (ref, DF_HARD_REG_LIVE)) - { - gcc_assert (DF_REF_REGNO (ref) < FIRST_PSEUDO_REGISTER); - df->hard_regs_live_count[DF_REF_REGNO (ref)]--; - } - - /* Unlink from the reg chain. If there is no prev, this is the - first of the list. If not, just join the next and prev. */ - if (prev) - DF_REF_NEXT_REG (prev) = next; - else - { - gcc_assert (reg_info->reg_chain == ref); - reg_info->reg_chain = next; - } - if (next) - DF_REF_PREV_REG (next) = prev; - - df_free_ref (ref); -} - -/* Initialize INSN_INFO to describe INSN. */ - -static void -df_insn_info_init_fields (df_insn_info *insn_info, rtx_insn *insn) -{ - memset (insn_info, 0, sizeof (struct df_insn_info)); - insn_info->insn = insn; -} - -/* Create the insn record for INSN. If there was one there, zero it - out. */ - -struct df_insn_info * -df_insn_create_insn_record (rtx_insn *insn) -{ - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - struct df_insn_info *insn_rec; - - df_grow_insn_info (); - insn_rec = DF_INSN_INFO_GET (insn); - if (!insn_rec) - { - insn_rec = problem_data->insn_pool->allocate (); - DF_INSN_INFO_SET (insn, insn_rec); - } - df_insn_info_init_fields (insn_rec, insn); - return insn_rec; -} - - -/* Delete all du chain (DF_REF_CHAIN()) of all refs in the ref chain. */ - -static void -df_ref_chain_delete_du_chain (df_ref ref) -{ - for (; ref; ref = DF_REF_NEXT_LOC (ref)) - /* CHAIN is allocated by DF_CHAIN. So make sure to - pass df_scan instance for the problem. */ - if (DF_REF_CHAIN (ref)) - df_chain_unlink (ref); -} - - -/* Delete all refs in the ref chain. */ - -static void -df_ref_chain_delete (df_ref ref) -{ - df_ref next; - for (; ref; ref = next) - { - next = DF_REF_NEXT_LOC (ref); - df_reg_chain_unlink (ref); - } -} - - -/* Delete the hardreg chain. */ - -static void -df_mw_hardreg_chain_delete (struct df_mw_hardreg *hardregs) -{ - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - df_mw_hardreg *next; - - for (; hardregs; hardregs = next) - { - next = DF_MWS_NEXT (hardregs); - problem_data->mw_reg_pool->remove (hardregs); - } -} - -/* Remove the contents of INSN_INFO (but don't free INSN_INFO itself). */ - -static void -df_insn_info_free_fields (df_insn_info *insn_info) -{ - /* In general, notes do not have the insn_info fields - initialized. However, combine deletes insns by changing them - to notes. How clever. So we cannot just check if it is a - valid insn before short circuiting this code, we need to see - if we actually initialized it. */ - df_mw_hardreg_chain_delete (insn_info->mw_hardregs); - - if (df_chain) - { - df_ref_chain_delete_du_chain (insn_info->defs); - df_ref_chain_delete_du_chain (insn_info->uses); - df_ref_chain_delete_du_chain (insn_info->eq_uses); - } - - df_ref_chain_delete (insn_info->defs); - df_ref_chain_delete (insn_info->uses); - df_ref_chain_delete (insn_info->eq_uses); -} - -/* Delete all of the refs information from the insn with UID. - Internal helper for df_insn_delete, df_insn_rescan, and other - df-scan routines that don't have to work in deferred mode - and do not have to mark basic blocks for re-processing. */ - -static void -df_insn_info_delete (unsigned int uid) -{ - struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid); - - bitmap_clear_bit (&df->insns_to_delete, uid); - bitmap_clear_bit (&df->insns_to_rescan, uid); - bitmap_clear_bit (&df->insns_to_notes_rescan, uid); - if (insn_info) - { - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - - df_insn_info_free_fields (insn_info); - problem_data->insn_pool->remove (insn_info); - DF_INSN_UID_SET (uid, NULL); - } -} - -/* Delete all of the refs information from INSN, either right now - or marked for later in deferred mode. */ - -void -df_insn_delete (rtx_insn *insn) -{ - unsigned int uid; - basic_block bb; - - gcc_checking_assert (INSN_P (insn)); - - if (!df) - return; - - uid = INSN_UID (insn); - bb = BLOCK_FOR_INSN (insn); - - /* ??? bb can be NULL after pass_free_cfg. At that point, DF should - not exist anymore (as mentioned in df-core.c: "The only requirement - [for DF] is that there be a correct control flow graph." Clearly - that isn't the case after pass_free_cfg. But DF is freed much later - because some back-ends want to use DF info even though the CFG is - already gone. It's not clear to me whether that is safe, actually. - In any case, we expect BB to be non-NULL at least up to register - allocation, so disallow a non-NULL BB up to there. Not perfect - but better than nothing... */ - gcc_checking_assert (bb != NULL || reload_completed); - - df_grow_bb_info (df_scan); - df_grow_reg_info (); - - /* The block must be marked as dirty now, rather than later as in - df_insn_rescan and df_notes_rescan because it may not be there at - rescanning time and the mark would blow up. - DEBUG_INSNs do not make a block's data flow solution dirty (at - worst the LUIDs are no longer contiguous). */ - if (bb != NULL && NONDEBUG_INSN_P (insn)) - df_set_bb_dirty (bb); - - /* The client has deferred rescanning. */ - if (df->changeable_flags & DF_DEFER_INSN_RESCAN) - { - struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid); - if (insn_info) - { - bitmap_clear_bit (&df->insns_to_rescan, uid); - bitmap_clear_bit (&df->insns_to_notes_rescan, uid); - bitmap_set_bit (&df->insns_to_delete, uid); - } - if (dump_file) - fprintf (dump_file, "deferring deletion of insn with uid = %d.\n", uid); - return; - } - - if (dump_file) - fprintf (dump_file, "deleting insn with uid = %d.\n", uid); - - df_insn_info_delete (uid); -} - - -/* Free all of the refs and the mw_hardregs in COLLECTION_REC. */ - -static void -df_free_collection_rec (class df_collection_rec *collection_rec) -{ - unsigned int ix; - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - df_ref ref; - struct df_mw_hardreg *mw; - - FOR_EACH_VEC_ELT (collection_rec->def_vec, ix, ref) - df_free_ref (ref); - FOR_EACH_VEC_ELT (collection_rec->use_vec, ix, ref) - df_free_ref (ref); - FOR_EACH_VEC_ELT (collection_rec->eq_use_vec, ix, ref) - df_free_ref (ref); - FOR_EACH_VEC_ELT (collection_rec->mw_vec, ix, mw) - problem_data->mw_reg_pool->remove (mw); - - collection_rec->def_vec.release (); - collection_rec->use_vec.release (); - collection_rec->eq_use_vec.release (); - collection_rec->mw_vec.release (); -} - -/* Rescan INSN. Return TRUE if the rescanning produced any changes. */ - -bool -df_insn_rescan (rtx_insn *insn) -{ - unsigned int uid = INSN_UID (insn); - struct df_insn_info *insn_info = NULL; - basic_block bb = BLOCK_FOR_INSN (insn); - class df_collection_rec collection_rec; - - if ((!df) || (!INSN_P (insn))) - return false; - - if (!bb) - { - if (dump_file) - fprintf (dump_file, "no bb for insn with uid = %d.\n", uid); - return false; - } - - /* The client has disabled rescanning and plans to do it itself. */ - if (df->changeable_flags & DF_NO_INSN_RESCAN) - return false; - - df_grow_bb_info (df_scan); - df_grow_reg_info (); - - insn_info = DF_INSN_UID_SAFE_GET (uid); - - /* The client has deferred rescanning. */ - if (df->changeable_flags & DF_DEFER_INSN_RESCAN) - { - if (!insn_info) - { - insn_info = df_insn_create_insn_record (insn); - insn_info->defs = 0; - insn_info->uses = 0; - insn_info->eq_uses = 0; - insn_info->mw_hardregs = 0; - } - if (dump_file) - fprintf (dump_file, "deferring rescan insn with uid = %d.\n", uid); - - bitmap_clear_bit (&df->insns_to_delete, uid); - bitmap_clear_bit (&df->insns_to_notes_rescan, uid); - bitmap_set_bit (&df->insns_to_rescan, INSN_UID (insn)); - return false; - } - - bitmap_clear_bit (&df->insns_to_delete, uid); - bitmap_clear_bit (&df->insns_to_rescan, uid); - bitmap_clear_bit (&df->insns_to_notes_rescan, uid); - if (insn_info) - { - int luid; - bool the_same = df_insn_refs_verify (&collection_rec, bb, insn, false); - /* If there's no change, return false. */ - if (the_same) - { - df_free_collection_rec (&collection_rec); - if (dump_file) - fprintf (dump_file, "verify found no changes in insn with uid = %d.\n", uid); - return false; - } - if (dump_file) - fprintf (dump_file, "rescanning insn with uid = %d.\n", uid); - - /* There's change - we need to delete the existing info. - Since the insn isn't moved, we can salvage its LUID. */ - luid = DF_INSN_LUID (insn); - df_insn_info_free_fields (insn_info); - df_insn_info_init_fields (insn_info, insn); - DF_INSN_LUID (insn) = luid; - } - else - { - struct df_insn_info *insn_info = df_insn_create_insn_record (insn); - df_insn_refs_collect (&collection_rec, bb, insn_info); - if (dump_file) - fprintf (dump_file, "scanning new insn with uid = %d.\n", uid); - } - - df_refs_add_to_chains (&collection_rec, bb, insn, copy_all); - if (!DEBUG_INSN_P (insn)) - df_set_bb_dirty (bb); - - return true; -} - -/* Same as df_insn_rescan, but don't mark the basic block as - dirty. */ - -bool -df_insn_rescan_debug_internal (rtx_insn *insn) -{ - unsigned int uid = INSN_UID (insn); - struct df_insn_info *insn_info; - - gcc_assert (DEBUG_INSN_P (insn) - && VAR_LOC_UNKNOWN_P (INSN_VAR_LOCATION_LOC (insn))); - - if (!df) - return false; - - insn_info = DF_INSN_UID_SAFE_GET (INSN_UID (insn)); - if (!insn_info) - return false; - - if (dump_file) - fprintf (dump_file, "deleting debug_insn with uid = %d.\n", uid); - - bitmap_clear_bit (&df->insns_to_delete, uid); - bitmap_clear_bit (&df->insns_to_rescan, uid); - bitmap_clear_bit (&df->insns_to_notes_rescan, uid); - - if (insn_info->defs == 0 - && insn_info->uses == 0 - && insn_info->eq_uses == 0 - && insn_info->mw_hardregs == 0) - return false; - - df_mw_hardreg_chain_delete (insn_info->mw_hardregs); - - if (df_chain) - { - df_ref_chain_delete_du_chain (insn_info->defs); - df_ref_chain_delete_du_chain (insn_info->uses); - df_ref_chain_delete_du_chain (insn_info->eq_uses); - } - - df_ref_chain_delete (insn_info->defs); - df_ref_chain_delete (insn_info->uses); - df_ref_chain_delete (insn_info->eq_uses); - - insn_info->defs = 0; - insn_info->uses = 0; - insn_info->eq_uses = 0; - insn_info->mw_hardregs = 0; - - return true; -} - - -/* Rescan all of the insns in the function. Note that the artificial - uses and defs are not touched. This function will destroy def-use - or use-def chains. */ - -void -df_insn_rescan_all (void) -{ - bool no_insn_rescan = false; - bool defer_insn_rescan = false; - basic_block bb; - bitmap_iterator bi; - unsigned int uid; - - if (df->changeable_flags & DF_NO_INSN_RESCAN) - { - df_clear_flags (DF_NO_INSN_RESCAN); - no_insn_rescan = true; - } - - if (df->changeable_flags & DF_DEFER_INSN_RESCAN) - { - df_clear_flags (DF_DEFER_INSN_RESCAN); - defer_insn_rescan = true; - } - - auto_bitmap tmp (&df_bitmap_obstack); - bitmap_copy (tmp, &df->insns_to_delete); - EXECUTE_IF_SET_IN_BITMAP (tmp, 0, uid, bi) - { - struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid); - if (insn_info) - df_insn_info_delete (uid); - } - - bitmap_clear (&df->insns_to_delete); - bitmap_clear (&df->insns_to_rescan); - bitmap_clear (&df->insns_to_notes_rescan); - - FOR_EACH_BB_FN (bb, cfun) - { - rtx_insn *insn; - FOR_BB_INSNS (bb, insn) - { - df_insn_rescan (insn); - } - } - - if (no_insn_rescan) - df_set_flags (DF_NO_INSN_RESCAN); - if (defer_insn_rescan) - df_set_flags (DF_DEFER_INSN_RESCAN); -} - - -/* Process all of the deferred rescans or deletions. */ - -void -df_process_deferred_rescans (void) -{ - bool no_insn_rescan = false; - bool defer_insn_rescan = false; - bitmap_iterator bi; - unsigned int uid; - - if (df->changeable_flags & DF_NO_INSN_RESCAN) - { - df_clear_flags (DF_NO_INSN_RESCAN); - no_insn_rescan = true; - } - - if (df->changeable_flags & DF_DEFER_INSN_RESCAN) - { - df_clear_flags (DF_DEFER_INSN_RESCAN); - defer_insn_rescan = true; - } - - if (dump_file) - fprintf (dump_file, "starting the processing of deferred insns\n"); - - auto_bitmap tmp (&df_bitmap_obstack); - bitmap_copy (tmp, &df->insns_to_delete); - EXECUTE_IF_SET_IN_BITMAP (tmp, 0, uid, bi) - { - struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid); - if (insn_info) - df_insn_info_delete (uid); - } - - bitmap_copy (tmp, &df->insns_to_rescan); - EXECUTE_IF_SET_IN_BITMAP (tmp, 0, uid, bi) - { - struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid); - if (insn_info) - df_insn_rescan (insn_info->insn); - } - - bitmap_copy (tmp, &df->insns_to_notes_rescan); - EXECUTE_IF_SET_IN_BITMAP (tmp, 0, uid, bi) - { - struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid); - if (insn_info) - df_notes_rescan (insn_info->insn); - } - - if (dump_file) - fprintf (dump_file, "ending the processing of deferred insns\n"); - - bitmap_clear (&df->insns_to_delete); - bitmap_clear (&df->insns_to_rescan); - bitmap_clear (&df->insns_to_notes_rescan); - - if (no_insn_rescan) - df_set_flags (DF_NO_INSN_RESCAN); - if (defer_insn_rescan) - df_set_flags (DF_DEFER_INSN_RESCAN); - - /* If someone changed regs_ever_live during this pass, fix up the - entry and exit blocks. */ - if (df->redo_entry_and_exit) - { - df_update_entry_exit_and_calls (); - df->redo_entry_and_exit = false; - } -} - - -/* Count the number of refs. Include the defs if INCLUDE_DEFS. Include - the uses if INCLUDE_USES. Include the eq_uses if - INCLUDE_EQ_USES. */ - -static unsigned int -df_count_refs (bool include_defs, bool include_uses, - bool include_eq_uses) -{ - unsigned int regno; - int size = 0; - unsigned int m = df->regs_inited; - - for (regno = 0; regno < m; regno++) - { - if (include_defs) - size += DF_REG_DEF_COUNT (regno); - if (include_uses) - size += DF_REG_USE_COUNT (regno); - if (include_eq_uses) - size += DF_REG_EQ_USE_COUNT (regno); - } - return size; -} - - -/* Take build ref table for either the uses or defs from the reg-use - or reg-def chains. This version processes the refs in reg order - which is likely to be best if processing the whole function. */ - -static void -df_reorganize_refs_by_reg_by_reg (struct df_ref_info *ref_info, - bool include_defs, - bool include_uses, - bool include_eq_uses) -{ - unsigned int m = df->regs_inited; - unsigned int regno; - unsigned int offset = 0; - unsigned int start; - - if (df->changeable_flags & DF_NO_HARD_REGS) - { - start = FIRST_PSEUDO_REGISTER; - memset (ref_info->begin, 0, sizeof (int) * FIRST_PSEUDO_REGISTER); - memset (ref_info->count, 0, sizeof (int) * FIRST_PSEUDO_REGISTER); - } - else - start = 0; - - ref_info->total_size - = df_count_refs (include_defs, include_uses, include_eq_uses); - - df_check_and_grow_ref_info (ref_info, 1); - - for (regno = start; regno < m; regno++) - { - int count = 0; - ref_info->begin[regno] = offset; - if (include_defs) - { - df_ref ref = DF_REG_DEF_CHAIN (regno); - while (ref) - { - ref_info->refs[offset] = ref; - DF_REF_ID (ref) = offset++; - count++; - ref = DF_REF_NEXT_REG (ref); - gcc_checking_assert (offset < ref_info->refs_size); - } - } - if (include_uses) - { - df_ref ref = DF_REG_USE_CHAIN (regno); - while (ref) - { - ref_info->refs[offset] = ref; - DF_REF_ID (ref) = offset++; - count++; - ref = DF_REF_NEXT_REG (ref); - gcc_checking_assert (offset < ref_info->refs_size); - } - } - if (include_eq_uses) - { - df_ref ref = DF_REG_EQ_USE_CHAIN (regno); - while (ref) - { - ref_info->refs[offset] = ref; - DF_REF_ID (ref) = offset++; - count++; - ref = DF_REF_NEXT_REG (ref); - gcc_checking_assert (offset < ref_info->refs_size); - } - } - ref_info->count[regno] = count; - } - - /* The bitmap size is not decremented when refs are deleted. So - reset it now that we have squished out all of the empty - slots. */ - ref_info->table_size = offset; -} - - -/* Take build ref table for either the uses or defs from the reg-use - or reg-def chains. This version processes the refs in insn order - which is likely to be best if processing some segment of the - function. */ - -static void -df_reorganize_refs_by_reg_by_insn (struct df_ref_info *ref_info, - bool include_defs, - bool include_uses, - bool include_eq_uses) -{ - bitmap_iterator bi; - unsigned int bb_index; - unsigned int m = df->regs_inited; - unsigned int offset = 0; - unsigned int r; - unsigned int start - = (df->changeable_flags & DF_NO_HARD_REGS) ? FIRST_PSEUDO_REGISTER : 0; - - memset (ref_info->begin, 0, sizeof (int) * df->regs_inited); - memset (ref_info->count, 0, sizeof (int) * df->regs_inited); - - ref_info->total_size = df_count_refs (include_defs, include_uses, include_eq_uses); - df_check_and_grow_ref_info (ref_info, 1); - - EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, bb_index, bi) - { - basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx_insn *insn; - df_ref def, use; - - if (include_defs) - FOR_EACH_ARTIFICIAL_DEF (def, bb_index) - { - unsigned int regno = DF_REF_REGNO (def); - ref_info->count[regno]++; - } - if (include_uses) - FOR_EACH_ARTIFICIAL_USE (use, bb_index) - { - unsigned int regno = DF_REF_REGNO (use); - ref_info->count[regno]++; - } - - FOR_BB_INSNS (bb, insn) - { - if (INSN_P (insn)) - { - struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); - - if (include_defs) - FOR_EACH_INSN_INFO_DEF (def, insn_info) - { - unsigned int regno = DF_REF_REGNO (def); - ref_info->count[regno]++; - } - if (include_uses) - FOR_EACH_INSN_INFO_USE (use, insn_info) - { - unsigned int regno = DF_REF_REGNO (use); - ref_info->count[regno]++; - } - if (include_eq_uses) - FOR_EACH_INSN_INFO_EQ_USE (use, insn_info) - { - unsigned int regno = DF_REF_REGNO (use); - ref_info->count[regno]++; - } - } - } - } - - for (r = start; r < m; r++) - { - ref_info->begin[r] = offset; - offset += ref_info->count[r]; - ref_info->count[r] = 0; - } - - EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, bb_index, bi) - { - basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx_insn *insn; - df_ref def, use; - - if (include_defs) - FOR_EACH_ARTIFICIAL_DEF (def, bb_index) - { - unsigned int regno = DF_REF_REGNO (def); - if (regno >= start) - { - unsigned int id - = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (def) = id; - ref_info->refs[id] = def; - } - } - if (include_uses) - FOR_EACH_ARTIFICIAL_USE (use, bb_index) - { - unsigned int regno = DF_REF_REGNO (def); - if (regno >= start) - { - unsigned int id - = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (use) = id; - ref_info->refs[id] = use; - } - } - - FOR_BB_INSNS (bb, insn) - { - if (INSN_P (insn)) - { - struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); - - if (include_defs) - FOR_EACH_INSN_INFO_DEF (def, insn_info) - { - unsigned int regno = DF_REF_REGNO (def); - if (regno >= start) - { - unsigned int id - = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (def) = id; - ref_info->refs[id] = def; - } - } - if (include_uses) - FOR_EACH_INSN_INFO_USE (use, insn_info) - { - unsigned int regno = DF_REF_REGNO (use); - if (regno >= start) - { - unsigned int id - = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (use) = id; - ref_info->refs[id] = use; - } - } - if (include_eq_uses) - FOR_EACH_INSN_INFO_EQ_USE (use, insn_info) - { - unsigned int regno = DF_REF_REGNO (use); - if (regno >= start) - { - unsigned int id - = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (use) = id; - ref_info->refs[id] = use; - } - } - } - } - } - - /* The bitmap size is not decremented when refs are deleted. So - reset it now that we have squished out all of the empty - slots. */ - - ref_info->table_size = offset; -} - -/* Take build ref table for either the uses or defs from the reg-use - or reg-def chains. */ - -static void -df_reorganize_refs_by_reg (struct df_ref_info *ref_info, - bool include_defs, - bool include_uses, - bool include_eq_uses) -{ - if (df->analyze_subset) - df_reorganize_refs_by_reg_by_insn (ref_info, include_defs, - include_uses, include_eq_uses); - else - df_reorganize_refs_by_reg_by_reg (ref_info, include_defs, - include_uses, include_eq_uses); -} - - -/* Add the refs in REF_VEC to the table in REF_INFO starting at OFFSET. */ -static unsigned int -df_add_refs_to_table (unsigned int offset, - struct df_ref_info *ref_info, - df_ref ref) -{ - for (; ref; ref = DF_REF_NEXT_LOC (ref)) - if (!(df->changeable_flags & DF_NO_HARD_REGS) - || (DF_REF_REGNO (ref) >= FIRST_PSEUDO_REGISTER)) - { - ref_info->refs[offset] = ref; - DF_REF_ID (ref) = offset++; - } - return offset; -} - - -/* Count the number of refs in all of the insns of BB. Include the - defs if INCLUDE_DEFS. Include the uses if INCLUDE_USES. Include the - eq_uses if INCLUDE_EQ_USES. */ - -static unsigned int -df_reorganize_refs_by_insn_bb (basic_block bb, unsigned int offset, - struct df_ref_info *ref_info, - bool include_defs, bool include_uses, - bool include_eq_uses) -{ - rtx_insn *insn; - - if (include_defs) - offset = df_add_refs_to_table (offset, ref_info, - df_get_artificial_defs (bb->index)); - if (include_uses) - offset = df_add_refs_to_table (offset, ref_info, - df_get_artificial_uses (bb->index)); - - FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) - { - unsigned int uid = INSN_UID (insn); - if (include_defs) - offset = df_add_refs_to_table (offset, ref_info, - DF_INSN_UID_DEFS (uid)); - if (include_uses) - offset = df_add_refs_to_table (offset, ref_info, - DF_INSN_UID_USES (uid)); - if (include_eq_uses) - offset = df_add_refs_to_table (offset, ref_info, - DF_INSN_UID_EQ_USES (uid)); - } - return offset; -} - - -/* Organize the refs by insn into the table in REF_INFO. If - blocks_to_analyze is defined, use that set, otherwise the entire - program. Include the defs if INCLUDE_DEFS. Include the uses if - INCLUDE_USES. Include the eq_uses if INCLUDE_EQ_USES. */ - -static void -df_reorganize_refs_by_insn (struct df_ref_info *ref_info, - bool include_defs, bool include_uses, - bool include_eq_uses) -{ - basic_block bb; - unsigned int offset = 0; - - ref_info->total_size = df_count_refs (include_defs, include_uses, include_eq_uses); - df_check_and_grow_ref_info (ref_info, 1); - if (df->blocks_to_analyze) - { - bitmap_iterator bi; - unsigned int index; - - EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, index, bi) - { - offset = df_reorganize_refs_by_insn_bb (BASIC_BLOCK_FOR_FN (cfun, - index), - offset, ref_info, - include_defs, include_uses, - include_eq_uses); - } - - ref_info->table_size = offset; - } - else - { - FOR_ALL_BB_FN (bb, cfun) - offset = df_reorganize_refs_by_insn_bb (bb, offset, ref_info, - include_defs, include_uses, - include_eq_uses); - ref_info->table_size = offset; - } -} - - -/* If the use refs in DF are not organized, reorganize them. */ - -void -df_maybe_reorganize_use_refs (enum df_ref_order order) -{ - if (order == df->use_info.ref_order) - return; - - switch (order) - { - case DF_REF_ORDER_BY_REG: - df_reorganize_refs_by_reg (&df->use_info, false, true, false); - break; - - case DF_REF_ORDER_BY_REG_WITH_NOTES: - df_reorganize_refs_by_reg (&df->use_info, false, true, true); - break; - - case DF_REF_ORDER_BY_INSN: - df_reorganize_refs_by_insn (&df->use_info, false, true, false); - break; - - case DF_REF_ORDER_BY_INSN_WITH_NOTES: - df_reorganize_refs_by_insn (&df->use_info, false, true, true); - break; - - case DF_REF_ORDER_NO_TABLE: - free (df->use_info.refs); - df->use_info.refs = NULL; - df->use_info.refs_size = 0; - break; - - case DF_REF_ORDER_UNORDERED: - case DF_REF_ORDER_UNORDERED_WITH_NOTES: - gcc_unreachable (); - break; - } - - df->use_info.ref_order = order; -} - - -/* If the def refs in DF are not organized, reorganize them. */ - -void -df_maybe_reorganize_def_refs (enum df_ref_order order) -{ - if (order == df->def_info.ref_order) - return; - - switch (order) - { - case DF_REF_ORDER_BY_REG: - df_reorganize_refs_by_reg (&df->def_info, true, false, false); - break; - - case DF_REF_ORDER_BY_INSN: - df_reorganize_refs_by_insn (&df->def_info, true, false, false); - break; - - case DF_REF_ORDER_NO_TABLE: - free (df->def_info.refs); - df->def_info.refs = NULL; - df->def_info.refs_size = 0; - break; - - case DF_REF_ORDER_BY_INSN_WITH_NOTES: - case DF_REF_ORDER_BY_REG_WITH_NOTES: - case DF_REF_ORDER_UNORDERED: - case DF_REF_ORDER_UNORDERED_WITH_NOTES: - gcc_unreachable (); - break; - } - - df->def_info.ref_order = order; -} - - -/* Change all of the basic block references in INSN to use the insn's - current basic block. This function is called from routines that move - instructions from one block to another. */ - -void -df_insn_change_bb (rtx_insn *insn, basic_block new_bb) -{ - basic_block old_bb = BLOCK_FOR_INSN (insn); - struct df_insn_info *insn_info; - unsigned int uid = INSN_UID (insn); - - if (old_bb == new_bb) - return; - - set_block_for_insn (insn, new_bb); - - if (!df) - return; - - if (dump_file) - fprintf (dump_file, "changing bb of uid %d\n", uid); - - insn_info = DF_INSN_UID_SAFE_GET (uid); - if (insn_info == NULL) - { - if (dump_file) - fprintf (dump_file, " unscanned insn\n"); - df_insn_rescan (insn); - return; - } - - if (!INSN_P (insn)) - return; - - df_set_bb_dirty (new_bb); - if (old_bb) - { - if (dump_file) - fprintf (dump_file, " from %d to %d\n", - old_bb->index, new_bb->index); - df_set_bb_dirty (old_bb); - } - else - if (dump_file) - fprintf (dump_file, " to %d\n", new_bb->index); -} - - -/* Helper function for df_ref_change_reg_with_loc. */ - -static void -df_ref_change_reg_with_loc_1 (struct df_reg_info *old_df, - struct df_reg_info *new_df, - unsigned int new_regno, rtx loc) -{ - df_ref the_ref = old_df->reg_chain; - - while (the_ref) - { - if ((!DF_REF_IS_ARTIFICIAL (the_ref)) - && DF_REF_LOC (the_ref) - && (*DF_REF_LOC (the_ref) == loc)) - { - df_ref next_ref = DF_REF_NEXT_REG (the_ref); - df_ref prev_ref = DF_REF_PREV_REG (the_ref); - df_ref *ref_ptr; - struct df_insn_info *insn_info = DF_REF_INSN_INFO (the_ref); - - DF_REF_REGNO (the_ref) = new_regno; - DF_REF_REG (the_ref) = regno_reg_rtx[new_regno]; - - /* Pull the_ref out of the old regno chain. */ - if (prev_ref) - DF_REF_NEXT_REG (prev_ref) = next_ref; - else - old_df->reg_chain = next_ref; - if (next_ref) - DF_REF_PREV_REG (next_ref) = prev_ref; - old_df->n_refs--; - - /* Put the ref into the new regno chain. */ - DF_REF_PREV_REG (the_ref) = NULL; - DF_REF_NEXT_REG (the_ref) = new_df->reg_chain; - if (new_df->reg_chain) - DF_REF_PREV_REG (new_df->reg_chain) = the_ref; - new_df->reg_chain = the_ref; - new_df->n_refs++; - if (DF_REF_BB (the_ref)) - df_set_bb_dirty (DF_REF_BB (the_ref)); - - /* Need to sort the record again that the ref was in because - the regno is a sorting key. First, find the right - record. */ - if (DF_REF_REG_DEF_P (the_ref)) - ref_ptr = &insn_info->defs; - else if (DF_REF_FLAGS (the_ref) & DF_REF_IN_NOTE) - ref_ptr = &insn_info->eq_uses; - else - ref_ptr = &insn_info->uses; - if (dump_file) - fprintf (dump_file, "changing reg in insn %d\n", - DF_REF_INSN_UID (the_ref)); - - /* Stop if we find the current reference or where the reference - needs to be. */ - while (*ref_ptr != the_ref && df_ref_compare (*ref_ptr, the_ref) < 0) - ref_ptr = &DF_REF_NEXT_LOC (*ref_ptr); - if (*ref_ptr != the_ref) - { - /* The reference needs to be promoted up the list. */ - df_ref next = DF_REF_NEXT_LOC (the_ref); - DF_REF_NEXT_LOC (the_ref) = *ref_ptr; - *ref_ptr = the_ref; - do - ref_ptr = &DF_REF_NEXT_LOC (*ref_ptr); - while (*ref_ptr != the_ref); - *ref_ptr = next; - } - else if (DF_REF_NEXT_LOC (the_ref) - && df_ref_compare (the_ref, DF_REF_NEXT_LOC (the_ref)) > 0) - { - /* The reference needs to be demoted down the list. */ - *ref_ptr = DF_REF_NEXT_LOC (the_ref); - do - ref_ptr = &DF_REF_NEXT_LOC (*ref_ptr); - while (*ref_ptr && df_ref_compare (the_ref, *ref_ptr) > 0); - DF_REF_NEXT_LOC (the_ref) = *ref_ptr; - *ref_ptr = the_ref; - } - - the_ref = next_ref; - } - else - the_ref = DF_REF_NEXT_REG (the_ref); - } -} - - -/* Change the regno of register LOC to NEW_REGNO and update the df - information accordingly. Refs that do not match LOC are not changed - which means that artificial refs are not changed since they have no loc. - This call is to support the SET_REGNO macro. */ - -void -df_ref_change_reg_with_loc (rtx loc, unsigned int new_regno) -{ - unsigned int old_regno = REGNO (loc); - if (old_regno == new_regno) - return; - - if (df) - { - df_grow_reg_info (); - - df_ref_change_reg_with_loc_1 (DF_REG_DEF_GET (old_regno), - DF_REG_DEF_GET (new_regno), - new_regno, loc); - df_ref_change_reg_with_loc_1 (DF_REG_USE_GET (old_regno), - DF_REG_USE_GET (new_regno), - new_regno, loc); - df_ref_change_reg_with_loc_1 (DF_REG_EQ_USE_GET (old_regno), - DF_REG_EQ_USE_GET (new_regno), - new_regno, loc); - } - set_mode_and_regno (loc, GET_MODE (loc), new_regno); -} - - -/* Delete the mw_hardregs that point into the eq_notes. */ - -static void -df_mw_hardreg_chain_delete_eq_uses (struct df_insn_info *insn_info) -{ - struct df_mw_hardreg **mw_ptr = &insn_info->mw_hardregs; - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - - while (*mw_ptr) - { - df_mw_hardreg *mw = *mw_ptr; - if (mw->flags & DF_REF_IN_NOTE) - { - *mw_ptr = DF_MWS_NEXT (mw); - problem_data->mw_reg_pool->remove (mw); - } - else - mw_ptr = &DF_MWS_NEXT (mw); - } -} - - -/* Rescan only the REG_EQUIV/REG_EQUAL notes part of INSN. */ - -void -df_notes_rescan (rtx_insn *insn) -{ - struct df_insn_info *insn_info; - unsigned int uid = INSN_UID (insn); - - if (!df) - return; - - /* The client has disabled rescanning and plans to do it itself. */ - if (df->changeable_flags & DF_NO_INSN_RESCAN) - return; - - /* Do nothing if the insn hasn't been emitted yet. */ - if (!BLOCK_FOR_INSN (insn)) - return; - - df_grow_bb_info (df_scan); - df_grow_reg_info (); - - insn_info = DF_INSN_UID_SAFE_GET (INSN_UID (insn)); - - /* The client has deferred rescanning. */ - if (df->changeable_flags & DF_DEFER_INSN_RESCAN) - { - if (!insn_info) - { - insn_info = df_insn_create_insn_record (insn); - insn_info->defs = 0; - insn_info->uses = 0; - insn_info->eq_uses = 0; - insn_info->mw_hardregs = 0; - } - - bitmap_clear_bit (&df->insns_to_delete, uid); - /* If the insn is set to be rescanned, it does not need to also - be notes rescanned. */ - if (!bitmap_bit_p (&df->insns_to_rescan, uid)) - bitmap_set_bit (&df->insns_to_notes_rescan, INSN_UID (insn)); - return; - } - - bitmap_clear_bit (&df->insns_to_delete, uid); - bitmap_clear_bit (&df->insns_to_notes_rescan, uid); - - if (insn_info) - { - basic_block bb = BLOCK_FOR_INSN (insn); - rtx note; - class df_collection_rec collection_rec; - unsigned int i; - - df_mw_hardreg_chain_delete_eq_uses (insn_info); - df_ref_chain_delete (insn_info->eq_uses); - insn_info->eq_uses = NULL; - - /* Process REG_EQUIV/REG_EQUAL notes */ - for (note = REG_NOTES (insn); note; - note = XEXP (note, 1)) - { - switch (REG_NOTE_KIND (note)) - { - case REG_EQUIV: - case REG_EQUAL: - df_uses_record (&collection_rec, - &XEXP (note, 0), DF_REF_REG_USE, - bb, insn_info, DF_REF_IN_NOTE); - default: - break; - } - } - - /* Find some place to put any new mw_hardregs. */ - df_canonize_collection_rec (&collection_rec); - struct df_mw_hardreg **mw_ptr = &insn_info->mw_hardregs, *mw; - FOR_EACH_VEC_ELT (collection_rec.mw_vec, i, mw) - { - while (*mw_ptr && df_mw_compare (*mw_ptr, mw) < 0) - mw_ptr = &DF_MWS_NEXT (*mw_ptr); - DF_MWS_NEXT (mw) = *mw_ptr; - *mw_ptr = mw; - mw_ptr = &DF_MWS_NEXT (mw); - } - df_refs_add_to_chains (&collection_rec, bb, insn, copy_eq_uses); - } - else - df_insn_rescan (insn); - -} - - -/*---------------------------------------------------------------------------- - Hard core instruction scanning code. No external interfaces here, - just a lot of routines that look inside insns. -----------------------------------------------------------------------------*/ - - -/* Return true if the contents of two df_ref's are identical. - It ignores DF_REF_MARKER. */ - -static bool -df_ref_equal_p (df_ref ref1, df_ref ref2) -{ - if (!ref2) - return false; - - if (ref1 == ref2) - return true; - - if (DF_REF_CLASS (ref1) != DF_REF_CLASS (ref2) - || DF_REF_REGNO (ref1) != DF_REF_REGNO (ref2) - || DF_REF_REG (ref1) != DF_REF_REG (ref2) - || DF_REF_TYPE (ref1) != DF_REF_TYPE (ref2) - || ((DF_REF_FLAGS (ref1) & ~(DF_REF_REG_MARKER + DF_REF_MW_HARDREG)) - != (DF_REF_FLAGS (ref2) & ~(DF_REF_REG_MARKER + DF_REF_MW_HARDREG))) - || DF_REF_BB (ref1) != DF_REF_BB (ref2) - || DF_REF_INSN_INFO (ref1) != DF_REF_INSN_INFO (ref2)) - return false; - - switch (DF_REF_CLASS (ref1)) - { - case DF_REF_ARTIFICIAL: - case DF_REF_BASE: - return true; - - case DF_REF_REGULAR: - return DF_REF_LOC (ref1) == DF_REF_LOC (ref2); - - default: - gcc_unreachable (); - } -} - - -/* Compare REF1 and REF2 for sorting. This is only called from places - where all of the refs are of the same type, in the same insn, and - have the same bb. So these fields are not checked. */ - -static int -df_ref_compare (df_ref ref1, df_ref ref2) -{ - if (DF_REF_CLASS (ref1) != DF_REF_CLASS (ref2)) - return (int)DF_REF_CLASS (ref1) - (int)DF_REF_CLASS (ref2); - - if (DF_REF_REGNO (ref1) != DF_REF_REGNO (ref2)) - return (int)DF_REF_REGNO (ref1) - (int)DF_REF_REGNO (ref2); - - if (DF_REF_TYPE (ref1) != DF_REF_TYPE (ref2)) - return (int)DF_REF_TYPE (ref1) - (int)DF_REF_TYPE (ref2); - - if (DF_REF_REG (ref1) != DF_REF_REG (ref2)) - return (int)DF_REF_ORDER (ref1) - (int)DF_REF_ORDER (ref2); - - /* Cannot look at the LOC field on artificial refs. */ - if (DF_REF_CLASS (ref1) != DF_REF_ARTIFICIAL - && DF_REF_LOC (ref1) != DF_REF_LOC (ref2)) - return (int)DF_REF_ORDER (ref1) - (int)DF_REF_ORDER (ref2); - - if (DF_REF_FLAGS (ref1) != DF_REF_FLAGS (ref2)) - { - /* If two refs are identical except that one of them has is from - a mw and one is not, we need to have the one with the mw - first. */ - if (DF_REF_FLAGS_IS_SET (ref1, DF_REF_MW_HARDREG) == - DF_REF_FLAGS_IS_SET (ref2, DF_REF_MW_HARDREG)) - return DF_REF_FLAGS (ref1) - DF_REF_FLAGS (ref2); - else if (DF_REF_FLAGS_IS_SET (ref1, DF_REF_MW_HARDREG)) - return -1; - else - return 1; - } - - return (int)DF_REF_ORDER (ref1) - (int)DF_REF_ORDER (ref2); -} - -/* Like df_ref_compare, but compare two df_ref* pointers R1 and R2. */ - -static int -df_ref_ptr_compare (const void *r1, const void *r2) -{ - return df_ref_compare (*(const df_ref *) r1, *(const df_ref *) r2); -} - -/* Sort and compress a set of refs. */ - -static void -df_sort_and_compress_refs (vec<df_ref, va_heap> *ref_vec) -{ - unsigned int count; - unsigned int i; - unsigned int dist = 0; - - count = ref_vec->length (); - - /* If there are 1 or 0 elements, there is nothing to do. */ - if (count < 2) - return; - else if (count == 2) - { - df_ref r0 = (*ref_vec)[0]; - df_ref r1 = (*ref_vec)[1]; - if (df_ref_compare (r0, r1) > 0) - std::swap ((*ref_vec)[0], (*ref_vec)[1]); - } - else - { - for (i = 0; i < count - 1; i++) - { - df_ref r0 = (*ref_vec)[i]; - df_ref r1 = (*ref_vec)[i + 1]; - if (df_ref_compare (r0, r1) >= 0) - break; - } - /* If the array is already strictly ordered, - which is the most common case for large COUNT case - (which happens for CALL INSNs), - no need to sort and filter out duplicate. - Simply return the count. - Make sure DF_GET_ADD_REFS adds refs in the increasing order - of DF_REF_COMPARE. */ - if (i == count - 1) - return; - ref_vec->qsort (df_ref_ptr_compare); - } - - for (i=0; i<count-dist; i++) - { - /* Find the next ref that is not equal to the current ref. */ - while (i + dist + 1 < count - && df_ref_equal_p ((*ref_vec)[i], - (*ref_vec)[i + dist + 1])) - { - df_free_ref ((*ref_vec)[i + dist + 1]); - dist++; - } - /* Copy it down to the next position. */ - if (dist && i + dist + 1 < count) - (*ref_vec)[i + 1] = (*ref_vec)[i + dist + 1]; - } - - count -= dist; - ref_vec->truncate (count); -} - - -/* Return true if the contents of two df_ref's are identical. - It ignores DF_REF_MARKER. */ - -static bool -df_mw_equal_p (struct df_mw_hardreg *mw1, struct df_mw_hardreg *mw2) -{ - if (!mw2) - return false; - return (mw1 == mw2) || - (mw1->mw_reg == mw2->mw_reg - && mw1->type == mw2->type - && mw1->flags == mw2->flags - && mw1->start_regno == mw2->start_regno - && mw1->end_regno == mw2->end_regno); -} - - -/* Compare MW1 and MW2 for sorting. */ - -static int -df_mw_compare (const df_mw_hardreg *mw1, const df_mw_hardreg *mw2) -{ - if (mw1->type != mw2->type) - return mw1->type - mw2->type; - - if (mw1->flags != mw2->flags) - return mw1->flags - mw2->flags; - - if (mw1->start_regno != mw2->start_regno) - return mw1->start_regno - mw2->start_regno; - - if (mw1->end_regno != mw2->end_regno) - return mw1->end_regno - mw2->end_regno; - - return mw1->mw_order - mw2->mw_order; -} - -/* Like df_mw_compare, but compare two df_mw_hardreg** pointers R1 and R2. */ - -static int -df_mw_ptr_compare (const void *m1, const void *m2) -{ - return df_mw_compare (*(const df_mw_hardreg *const *) m1, - *(const df_mw_hardreg *const *) m2); -} - -/* Sort and compress a set of refs. */ - -static void -df_sort_and_compress_mws (vec<df_mw_hardreg *, va_heap> *mw_vec) -{ - unsigned int count; - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - unsigned int i; - unsigned int dist = 0; - - count = mw_vec->length (); - if (count < 2) - return; - else if (count == 2) - { - struct df_mw_hardreg *m0 = (*mw_vec)[0]; - struct df_mw_hardreg *m1 = (*mw_vec)[1]; - if (df_mw_compare (m0, m1) > 0) - { - struct df_mw_hardreg *tmp = (*mw_vec)[0]; - (*mw_vec)[0] = (*mw_vec)[1]; - (*mw_vec)[1] = tmp; - } - } - else - mw_vec->qsort (df_mw_ptr_compare); - - for (i=0; i<count-dist; i++) - { - /* Find the next ref that is not equal to the current ref. */ - while (i + dist + 1 < count - && df_mw_equal_p ((*mw_vec)[i], (*mw_vec)[i + dist + 1])) - { - problem_data->mw_reg_pool->remove ((*mw_vec)[i + dist + 1]); - dist++; - } - /* Copy it down to the next position. */ - if (dist && i + dist + 1 < count) - (*mw_vec)[i + 1] = (*mw_vec)[i + dist + 1]; - } - - count -= dist; - mw_vec->truncate (count); -} - - -/* Sort and remove duplicates from the COLLECTION_REC. */ - -static void -df_canonize_collection_rec (class df_collection_rec *collection_rec) -{ - df_sort_and_compress_refs (&collection_rec->def_vec); - df_sort_and_compress_refs (&collection_rec->use_vec); - df_sort_and_compress_refs (&collection_rec->eq_use_vec); - df_sort_and_compress_mws (&collection_rec->mw_vec); -} - - -/* Add the new df_ref to appropriate reg_info/ref_info chains. */ - -static void -df_install_ref (df_ref this_ref, - struct df_reg_info *reg_info, - struct df_ref_info *ref_info, - bool add_to_table) -{ - unsigned int regno = DF_REF_REGNO (this_ref); - /* Add the ref to the reg_{def,use,eq_use} chain. */ - df_ref head = reg_info->reg_chain; - - reg_info->reg_chain = this_ref; - reg_info->n_refs++; - - if (DF_REF_FLAGS_IS_SET (this_ref, DF_HARD_REG_LIVE)) - { - gcc_assert (regno < FIRST_PSEUDO_REGISTER); - df->hard_regs_live_count[regno]++; - } - - gcc_checking_assert (DF_REF_NEXT_REG (this_ref) == NULL - && DF_REF_PREV_REG (this_ref) == NULL); - - DF_REF_NEXT_REG (this_ref) = head; - - /* We cannot actually link to the head of the chain. */ - DF_REF_PREV_REG (this_ref) = NULL; - - if (head) - DF_REF_PREV_REG (head) = this_ref; - - if (add_to_table) - { - gcc_assert (ref_info->ref_order != DF_REF_ORDER_NO_TABLE); - df_check_and_grow_ref_info (ref_info, 1); - DF_REF_ID (this_ref) = ref_info->table_size; - /* Add the ref to the big array of defs. */ - ref_info->refs[ref_info->table_size] = this_ref; - ref_info->table_size++; - } - else - DF_REF_ID (this_ref) = -1; - - ref_info->total_size++; -} - - -/* This function takes one of the groups of refs (defs, uses or - eq_uses) and installs the entire group into the insn. It also adds - each of these refs into the appropriate chains. */ - -static df_ref -df_install_refs (basic_block bb, - const vec<df_ref, va_heap> *old_vec, - struct df_reg_info **reg_info, - struct df_ref_info *ref_info, - bool is_notes) -{ - unsigned int count = old_vec->length (); - if (count) - { - bool add_to_table; - df_ref this_ref; - unsigned int ix; - - switch (ref_info->ref_order) - { - case DF_REF_ORDER_UNORDERED_WITH_NOTES: - case DF_REF_ORDER_BY_REG_WITH_NOTES: - case DF_REF_ORDER_BY_INSN_WITH_NOTES: - ref_info->ref_order = DF_REF_ORDER_UNORDERED_WITH_NOTES; - add_to_table = true; - break; - case DF_REF_ORDER_UNORDERED: - case DF_REF_ORDER_BY_REG: - case DF_REF_ORDER_BY_INSN: - ref_info->ref_order = DF_REF_ORDER_UNORDERED; - add_to_table = !is_notes; - break; - default: - add_to_table = false; - break; - } - - /* Do not add if ref is not in the right blocks. */ - if (add_to_table && df->analyze_subset) - add_to_table = bitmap_bit_p (df->blocks_to_analyze, bb->index); - - FOR_EACH_VEC_ELT (*old_vec, ix, this_ref) - { - DF_REF_NEXT_LOC (this_ref) = (ix + 1 < old_vec->length () - ? (*old_vec)[ix + 1] - : NULL); - df_install_ref (this_ref, reg_info[DF_REF_REGNO (this_ref)], - ref_info, add_to_table); - } - return (*old_vec)[0]; - } - else - return 0; -} - - -/* This function takes the mws installs the entire group into the - insn. */ - -static struct df_mw_hardreg * -df_install_mws (const vec<df_mw_hardreg *, va_heap> *old_vec) -{ - unsigned int count = old_vec->length (); - if (count) - { - for (unsigned int i = 0; i < count - 1; i++) - DF_MWS_NEXT ((*old_vec)[i]) = (*old_vec)[i + 1]; - DF_MWS_NEXT ((*old_vec)[count - 1]) = 0; - return (*old_vec)[0]; - } - else - return 0; -} - - -/* Add a chain of df_refs to appropriate ref chain/reg_info/ref_info - chains and update other necessary information. */ - -static void -df_refs_add_to_chains (class df_collection_rec *collection_rec, - basic_block bb, rtx_insn *insn, unsigned int flags) -{ - if (insn) - { - struct df_insn_info *insn_rec = DF_INSN_INFO_GET (insn); - /* If there is a vector in the collection rec, add it to the - insn. A null rec is a signal that the caller will handle the - chain specially. */ - if (flags & copy_defs) - { - gcc_checking_assert (!insn_rec->defs); - insn_rec->defs - = df_install_refs (bb, &collection_rec->def_vec, - df->def_regs, - &df->def_info, false); - } - if (flags & copy_uses) - { - gcc_checking_assert (!insn_rec->uses); - insn_rec->uses - = df_install_refs (bb, &collection_rec->use_vec, - df->use_regs, - &df->use_info, false); - } - if (flags & copy_eq_uses) - { - gcc_checking_assert (!insn_rec->eq_uses); - insn_rec->eq_uses - = df_install_refs (bb, &collection_rec->eq_use_vec, - df->eq_use_regs, - &df->use_info, true); - } - if (flags & copy_mw) - { - gcc_checking_assert (!insn_rec->mw_hardregs); - insn_rec->mw_hardregs - = df_install_mws (&collection_rec->mw_vec); - } - } - else - { - struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb->index); - - gcc_checking_assert (!bb_info->artificial_defs); - bb_info->artificial_defs - = df_install_refs (bb, &collection_rec->def_vec, - df->def_regs, - &df->def_info, false); - gcc_checking_assert (!bb_info->artificial_uses); - bb_info->artificial_uses - = df_install_refs (bb, &collection_rec->use_vec, - df->use_regs, - &df->use_info, false); - } -} - - -/* Allocate a ref and initialize its fields. */ - -static df_ref -df_ref_create_structure (enum df_ref_class cl, - class df_collection_rec *collection_rec, - rtx reg, rtx *loc, - basic_block bb, struct df_insn_info *info, - enum df_ref_type ref_type, - int ref_flags) -{ - df_ref this_ref = NULL; - unsigned int regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg); - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - - switch (cl) - { - case DF_REF_BASE: - this_ref = (df_ref) (problem_data->ref_base_pool->allocate ()); - gcc_checking_assert (loc == NULL); - break; - - case DF_REF_ARTIFICIAL: - this_ref = (df_ref) (problem_data->ref_artificial_pool->allocate ()); - this_ref->artificial_ref.bb = bb; - gcc_checking_assert (loc == NULL); - break; - - case DF_REF_REGULAR: - this_ref = (df_ref) (problem_data->ref_regular_pool->allocate ()); - this_ref->regular_ref.loc = loc; - gcc_checking_assert (loc); - break; - } - - DF_REF_CLASS (this_ref) = cl; - DF_REF_ID (this_ref) = -1; - DF_REF_REG (this_ref) = reg; - DF_REF_REGNO (this_ref) = regno; - DF_REF_TYPE (this_ref) = ref_type; - DF_REF_INSN_INFO (this_ref) = info; - DF_REF_CHAIN (this_ref) = NULL; - DF_REF_FLAGS (this_ref) = ref_flags; - DF_REF_NEXT_REG (this_ref) = NULL; - DF_REF_PREV_REG (this_ref) = NULL; - DF_REF_ORDER (this_ref) = df->ref_order++; - - /* We need to clear this bit because fwprop, and in the future - possibly other optimizations sometimes create new refs using ond - refs as the model. */ - DF_REF_FLAGS_CLEAR (this_ref, DF_HARD_REG_LIVE); - - /* See if this ref needs to have DF_HARD_REG_LIVE bit set. */ - if (regno < FIRST_PSEUDO_REGISTER - && !DF_REF_IS_ARTIFICIAL (this_ref) - && !DEBUG_INSN_P (DF_REF_INSN (this_ref))) - { - if (DF_REF_REG_DEF_P (this_ref)) - { - if (!DF_REF_FLAGS_IS_SET (this_ref, DF_REF_MAY_CLOBBER)) - DF_REF_FLAGS_SET (this_ref, DF_HARD_REG_LIVE); - } - else if (!(TEST_HARD_REG_BIT (elim_reg_set, regno) - && (regno == FRAME_POINTER_REGNUM - || regno == ARG_POINTER_REGNUM))) - DF_REF_FLAGS_SET (this_ref, DF_HARD_REG_LIVE); - } - - if (collection_rec) - { - if (DF_REF_REG_DEF_P (this_ref)) - collection_rec->def_vec.safe_push (this_ref); - else if (DF_REF_FLAGS (this_ref) & DF_REF_IN_NOTE) - collection_rec->eq_use_vec.safe_push (this_ref); - else - collection_rec->use_vec.safe_push (this_ref); - } - else - df_install_ref_incremental (this_ref); - - return this_ref; -} - - -/* Create new references of type DF_REF_TYPE for each part of register REG - at address LOC within INSN of BB. */ - - -static void -df_ref_record (enum df_ref_class cl, - class df_collection_rec *collection_rec, - rtx reg, rtx *loc, - basic_block bb, struct df_insn_info *insn_info, - enum df_ref_type ref_type, - int ref_flags) -{ - unsigned int regno; - - gcc_checking_assert (REG_P (reg) || GET_CODE (reg) == SUBREG); - - regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg); - if (regno < FIRST_PSEUDO_REGISTER) - { - struct df_mw_hardreg *hardreg = NULL; - struct df_scan_problem_data *problem_data - = (struct df_scan_problem_data *) df_scan->problem_data; - unsigned int i; - unsigned int endregno; - df_ref ref; - - if (GET_CODE (reg) == SUBREG) - { - int off = subreg_regno_offset (regno, GET_MODE (SUBREG_REG (reg)), - SUBREG_BYTE (reg), GET_MODE (reg)); - unsigned int nregno = regno + off; - endregno = nregno + subreg_nregs (reg); - if (off < 0 && regno < (unsigned) -off) - /* Deal with paradoxical SUBREGs on big endian where - in debug insns the hard reg number might be smaller - than -off, such as (subreg:DI (reg:SI 0 [+4 ]) 0)); - RA decisions shouldn't be affected by debug insns - and so RA can decide to put pseudo into a hard reg - with small REGNO, even when it is referenced in - a paradoxical SUBREG in a debug insn. */ - regno = 0; - else - regno = nregno; - } - else - endregno = END_REGNO (reg); - - /* If this is a multiword hardreg, we create some extra - datastructures that will enable us to easily build REG_DEAD - and REG_UNUSED notes. */ - if (collection_rec - && (endregno != regno + 1) && insn_info) - { - /* Sets to a subreg of a multiword register are partial. - Sets to a non-subreg of a multiword register are not. */ - if (GET_CODE (reg) == SUBREG) - ref_flags |= DF_REF_PARTIAL; - ref_flags |= DF_REF_MW_HARDREG; - - gcc_assert (regno < endregno); - - hardreg = problem_data->mw_reg_pool->allocate (); - hardreg->type = ref_type; - hardreg->flags = ref_flags; - hardreg->mw_reg = reg; - hardreg->start_regno = regno; - hardreg->end_regno = endregno - 1; - hardreg->mw_order = df->ref_order++; - collection_rec->mw_vec.safe_push (hardreg); - } - - for (i = regno; i < endregno; i++) - { - ref = df_ref_create_structure (cl, collection_rec, regno_reg_rtx[i], loc, - bb, insn_info, ref_type, ref_flags); - - gcc_assert (ORIGINAL_REGNO (DF_REF_REG (ref)) == i); - } - } - else - { - df_ref_create_structure (cl, collection_rec, reg, loc, bb, insn_info, - ref_type, ref_flags); - } -} - - -/* Process all the registers defined in the rtx pointed by LOC. - Autoincrement/decrement definitions will be picked up by df_uses_record. - Any change here has to be matched in df_find_hard_reg_defs_1. */ - -static void -df_def_record_1 (class df_collection_rec *collection_rec, - rtx *loc, basic_block bb, struct df_insn_info *insn_info, - int flags) -{ - rtx dst = *loc; - - /* It is legal to have a set destination be a parallel. */ - if (GET_CODE (dst) == PARALLEL) - { - int i; - for (i = XVECLEN (dst, 0) - 1; i >= 0; i--) - { - rtx temp = XVECEXP (dst, 0, i); - gcc_assert (GET_CODE (temp) == EXPR_LIST); - df_def_record_1 (collection_rec, &XEXP (temp, 0), - bb, insn_info, flags); - } - return; - } - - if (GET_CODE (dst) == STRICT_LOW_PART) - { - flags |= DF_REF_READ_WRITE | DF_REF_PARTIAL | DF_REF_STRICT_LOW_PART; - - loc = &XEXP (dst, 0); - dst = *loc; - } - - if (GET_CODE (dst) == ZERO_EXTRACT) - { - flags |= DF_REF_READ_WRITE | DF_REF_PARTIAL | DF_REF_ZERO_EXTRACT; - - loc = &XEXP (dst, 0); - dst = *loc; - } - - /* At this point if we do not have a reg or a subreg, just return. */ - if (REG_P (dst)) - { - df_ref_record (DF_REF_REGULAR, collection_rec, - dst, loc, bb, insn_info, DF_REF_REG_DEF, flags); - - /* We want to keep sp alive everywhere - by making all - writes to sp also use of sp. */ - if (REGNO (dst) == STACK_POINTER_REGNUM) - df_ref_record (DF_REF_BASE, collection_rec, - dst, NULL, bb, insn_info, DF_REF_REG_USE, flags); - } - else if (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))) - { - if (read_modify_subreg_p (dst)) - flags |= DF_REF_READ_WRITE | DF_REF_PARTIAL; - - flags |= DF_REF_SUBREG; - - df_ref_record (DF_REF_REGULAR, collection_rec, - dst, loc, bb, insn_info, DF_REF_REG_DEF, flags); - } -} - - -/* Process all the registers defined in the pattern rtx, X. Any change - here has to be matched in df_find_hard_reg_defs. */ - -static void -df_defs_record (class df_collection_rec *collection_rec, - rtx x, basic_block bb, struct df_insn_info *insn_info, - int flags) -{ - RTX_CODE code = GET_CODE (x); - int i; - - switch (code) - { - case SET: - df_def_record_1 (collection_rec, &SET_DEST (x), bb, insn_info, flags); - break; - - case CLOBBER: - flags |= DF_REF_MUST_CLOBBER; - df_def_record_1 (collection_rec, &XEXP (x, 0), bb, insn_info, flags); - break; - - case COND_EXEC: - df_defs_record (collection_rec, COND_EXEC_CODE (x), - bb, insn_info, DF_REF_CONDITIONAL); - break; - - case PARALLEL: - for (i = 0; i < XVECLEN (x, 0); i++) - df_defs_record (collection_rec, XVECEXP (x, 0, i), - bb, insn_info, flags); - break; - default: - /* No DEFs to record in other cases */ - break; - } -} - -/* Set bits in *DEFS for hard registers found in the rtx DST, which is the - destination of a set or clobber. This has to match the logic in - df_defs_record_1. */ - -static void -df_find_hard_reg_defs_1 (rtx dst, HARD_REG_SET *defs) -{ - /* It is legal to have a set destination be a parallel. */ - if (GET_CODE (dst) == PARALLEL) - { - int i; - for (i = XVECLEN (dst, 0) - 1; i >= 0; i--) - { - rtx temp = XVECEXP (dst, 0, i); - gcc_assert (GET_CODE (temp) == EXPR_LIST); - df_find_hard_reg_defs_1 (XEXP (temp, 0), defs); - } - return; - } - - if (GET_CODE (dst) == STRICT_LOW_PART) - dst = XEXP (dst, 0); - - if (GET_CODE (dst) == ZERO_EXTRACT) - dst = XEXP (dst, 0); - - /* At this point if we do not have a reg or a subreg, just return. */ - if (REG_P (dst) && HARD_REGISTER_P (dst)) - SET_HARD_REG_BIT (*defs, REGNO (dst)); - else if (GET_CODE (dst) == SUBREG - && REG_P (SUBREG_REG (dst)) && HARD_REGISTER_P (dst)) - SET_HARD_REG_BIT (*defs, REGNO (SUBREG_REG (dst))); -} - -/* Set bits in *DEFS for hard registers defined in the pattern X. This - has to match the logic in df_defs_record. */ - -static void -df_find_hard_reg_defs (rtx x, HARD_REG_SET *defs) -{ - RTX_CODE code = GET_CODE (x); - int i; - - switch (code) - { - case SET: - df_find_hard_reg_defs_1 (SET_DEST (x), defs); - break; - - case CLOBBER: - df_find_hard_reg_defs_1 (XEXP (x, 0), defs); - break; - - case COND_EXEC: - df_find_hard_reg_defs (COND_EXEC_CODE (x), defs); - break; - - case PARALLEL: - for (i = 0; i < XVECLEN (x, 0); i++) - df_find_hard_reg_defs (XVECEXP (x, 0, i), defs); - break; - default: - /* No DEFs to record in other cases */ - break; - } -} - - -/* Process all the registers used in the rtx at address LOC. */ - -static void -df_uses_record (class df_collection_rec *collection_rec, - rtx *loc, enum df_ref_type ref_type, - basic_block bb, struct df_insn_info *insn_info, - int flags) -{ - RTX_CODE code; - rtx x; - - retry: - x = *loc; - if (!x) - return; - code = GET_CODE (x); - switch (code) - { - case LABEL_REF: - case SYMBOL_REF: - case CONST: - CASE_CONST_ANY: - case PC: - case ADDR_VEC: - case ADDR_DIFF_VEC: - return; - - case CLOBBER: - /* If we are clobbering a MEM, mark any registers inside the address - as being used. */ - if (MEM_P (XEXP (x, 0))) - df_uses_record (collection_rec, - &XEXP (XEXP (x, 0), 0), - DF_REF_REG_MEM_STORE, - bb, insn_info, - flags); - - /* If we're clobbering a REG then we have a def so ignore. */ - return; - - case MEM: - df_uses_record (collection_rec, - &XEXP (x, 0), DF_REF_REG_MEM_LOAD, - bb, insn_info, flags & DF_REF_IN_NOTE); - return; - - case SUBREG: - /* While we're here, optimize this case. */ - flags |= DF_REF_PARTIAL; - /* In case the SUBREG is not of a REG, do not optimize. */ - if (!REG_P (SUBREG_REG (x))) - { - loc = &SUBREG_REG (x); - df_uses_record (collection_rec, loc, ref_type, bb, insn_info, flags); - return; - } - /* Fall through */ - - case REG: - df_ref_record (DF_REF_REGULAR, collection_rec, - x, loc, bb, insn_info, - ref_type, flags); - return; - - case SIGN_EXTRACT: - case ZERO_EXTRACT: - { - df_uses_record (collection_rec, - &XEXP (x, 1), ref_type, bb, insn_info, flags); - df_uses_record (collection_rec, - &XEXP (x, 2), ref_type, bb, insn_info, flags); - - /* If the parameters to the zero or sign extract are - constants, strip them off and recurse, otherwise there is - no information that we can gain from this operation. */ - if (code == ZERO_EXTRACT) - flags |= DF_REF_ZERO_EXTRACT; - else - flags |= DF_REF_SIGN_EXTRACT; - - df_uses_record (collection_rec, - &XEXP (x, 0), ref_type, bb, insn_info, flags); - return; - } - break; - - case SET: - { - rtx dst = SET_DEST (x); - gcc_assert (!(flags & DF_REF_IN_NOTE)); - df_uses_record (collection_rec, - &SET_SRC (x), DF_REF_REG_USE, bb, insn_info, flags); - - switch (GET_CODE (dst)) - { - case SUBREG: - if (read_modify_subreg_p (dst)) - { - df_uses_record (collection_rec, &SUBREG_REG (dst), - DF_REF_REG_USE, bb, insn_info, - flags | DF_REF_READ_WRITE | DF_REF_SUBREG); - break; - } - /* Fall through. */ - case REG: - case PARALLEL: - case SCRATCH: - case PC: - break; - case MEM: - df_uses_record (collection_rec, &XEXP (dst, 0), - DF_REF_REG_MEM_STORE, bb, insn_info, flags); - break; - case STRICT_LOW_PART: - { - rtx *temp = &XEXP (dst, 0); - /* A strict_low_part uses the whole REG and not just the - SUBREG. */ - dst = XEXP (dst, 0); - df_uses_record (collection_rec, - (GET_CODE (dst) == SUBREG) ? &SUBREG_REG (dst) : temp, - DF_REF_REG_USE, bb, insn_info, - DF_REF_READ_WRITE | DF_REF_STRICT_LOW_PART); - } - break; - case ZERO_EXTRACT: - { - df_uses_record (collection_rec, &XEXP (dst, 1), - DF_REF_REG_USE, bb, insn_info, flags); - df_uses_record (collection_rec, &XEXP (dst, 2), - DF_REF_REG_USE, bb, insn_info, flags); - if (GET_CODE (XEXP (dst,0)) == MEM) - df_uses_record (collection_rec, &XEXP (dst, 0), - DF_REF_REG_USE, bb, insn_info, - flags); - else - df_uses_record (collection_rec, &XEXP (dst, 0), - DF_REF_REG_USE, bb, insn_info, - DF_REF_READ_WRITE | DF_REF_ZERO_EXTRACT); - } - break; - - default: - gcc_unreachable (); - } - return; - } - - case RETURN: - case SIMPLE_RETURN: - break; - - case ASM_OPERANDS: - case UNSPEC_VOLATILE: - case TRAP_IF: - case ASM_INPUT: - { - /* Traditional and volatile asm instructions must be - considered to use and clobber all hard registers, all - pseudo-registers and all of memory. So must TRAP_IF and - UNSPEC_VOLATILE operations. - - Consider for instance a volatile asm that changes the fpu - rounding mode. An insn should not be moved across this - even if it only uses pseudo-regs because it might give an - incorrectly rounded result. - - However, flow.c's liveness computation did *not* do this, - giving the reasoning as " ?!? Unfortunately, marking all - hard registers as live causes massive problems for the - register allocator and marking all pseudos as live creates - mountains of uninitialized variable warnings." - - In order to maintain the status quo with regard to liveness - and uses, we do what flow.c did and just mark any regs we - can find in ASM_OPERANDS as used. In global asm insns are - scanned and regs_asm_clobbered is filled out. - - For all ASM_OPERANDS, we must traverse the vector of input - operands. We cannot just fall through here since then we - would be confused by the ASM_INPUT rtx inside ASM_OPERANDS, - which do not indicate traditional asms unlike their normal - usage. */ - if (code == ASM_OPERANDS) - { - int j; - - for (j = 0; j < ASM_OPERANDS_INPUT_LENGTH (x); j++) - df_uses_record (collection_rec, &ASM_OPERANDS_INPUT (x, j), - DF_REF_REG_USE, bb, insn_info, flags); - return; - } - break; - } - - case VAR_LOCATION: - df_uses_record (collection_rec, - &PAT_VAR_LOCATION_LOC (x), - DF_REF_REG_USE, bb, insn_info, flags); - return; - - case PRE_DEC: - case POST_DEC: - case PRE_INC: - case POST_INC: - case PRE_MODIFY: - case POST_MODIFY: - gcc_assert (!DEBUG_INSN_P (insn_info->insn)); - /* Catch the def of the register being modified. */ - df_ref_record (DF_REF_REGULAR, collection_rec, XEXP (x, 0), &XEXP (x, 0), - bb, insn_info, - DF_REF_REG_DEF, - flags | DF_REF_READ_WRITE | DF_REF_PRE_POST_MODIFY); - - /* ... Fall through to handle uses ... */ - - default: - break; - } - - /* Recursively scan the operands of this expression. */ - { - const char *fmt = GET_RTX_FORMAT (code); - int i; - - for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) - { - if (fmt[i] == 'e') - { - /* Tail recursive case: save a function call level. */ - if (i == 0) - { - loc = &XEXP (x, 0); - goto retry; - } - df_uses_record (collection_rec, &XEXP (x, i), ref_type, - bb, insn_info, flags); - } - else if (fmt[i] == 'E') - { - int j; - for (j = 0; j < XVECLEN (x, i); j++) - df_uses_record (collection_rec, - &XVECEXP (x, i, j), ref_type, - bb, insn_info, flags); - } - } - } - - return; -} - - -/* For all DF_REF_CONDITIONAL defs, add a corresponding uses. */ - -static void -df_get_conditional_uses (class df_collection_rec *collection_rec) -{ - unsigned int ix; - df_ref ref; - - FOR_EACH_VEC_ELT (collection_rec->def_vec, ix, ref) - { - if (DF_REF_FLAGS_IS_SET (ref, DF_REF_CONDITIONAL)) - { - df_ref use; - - use = df_ref_create_structure (DF_REF_CLASS (ref), collection_rec, DF_REF_REG (ref), - DF_REF_LOC (ref), DF_REF_BB (ref), - DF_REF_INSN_INFO (ref), DF_REF_REG_USE, - DF_REF_FLAGS (ref) & ~DF_REF_CONDITIONAL); - DF_REF_REGNO (use) = DF_REF_REGNO (ref); - } - } -} - - -/* Get call's extra defs and uses (track caller-saved registers). */ - -static void -df_get_call_refs (class df_collection_rec *collection_rec, - basic_block bb, - struct df_insn_info *insn_info, - int flags) -{ - rtx note; - bool is_sibling_call; - unsigned int i; - HARD_REG_SET defs_generated; - - CLEAR_HARD_REG_SET (defs_generated); - df_find_hard_reg_defs (PATTERN (insn_info->insn), &defs_generated); - is_sibling_call = SIBLING_CALL_P (insn_info->insn); - function_abi callee_abi = insn_callee_abi (insn_info->insn); - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - { - if (i == STACK_POINTER_REGNUM - && !FAKE_CALL_P (insn_info->insn)) - /* The stack ptr is used (honorarily) by a CALL insn. */ - df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], - NULL, bb, insn_info, DF_REF_REG_USE, - DF_REF_CALL_STACK_USAGE | flags); - else if (global_regs[i]) - { - /* Calls to const functions cannot access any global registers and - calls to pure functions cannot set them. All other calls may - reference any of the global registers, so they are recorded as - used. */ - if (!RTL_CONST_CALL_P (insn_info->insn)) - { - df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], - NULL, bb, insn_info, DF_REF_REG_USE, flags); - if (!RTL_PURE_CALL_P (insn_info->insn)) - df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], - NULL, bb, insn_info, DF_REF_REG_DEF, flags); - } - } - else if (callee_abi.clobbers_full_reg_p (i) - /* no clobbers for regs that are the result of the call */ - && !TEST_HARD_REG_BIT (defs_generated, i) - && (!is_sibling_call - || !bitmap_bit_p (df->exit_block_uses, i) - || refers_to_regno_p (i, crtl->return_rtx))) - df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], - NULL, bb, insn_info, DF_REF_REG_DEF, - DF_REF_MAY_CLOBBER | flags); - } - - /* Record the registers used to pass arguments, and explicitly - noted as clobbered. */ - for (note = CALL_INSN_FUNCTION_USAGE (insn_info->insn); note; - note = XEXP (note, 1)) - { - if (GET_CODE (XEXP (note, 0)) == USE) - df_uses_record (collection_rec, &XEXP (XEXP (note, 0), 0), - DF_REF_REG_USE, bb, insn_info, flags); - else if (GET_CODE (XEXP (note, 0)) == CLOBBER) - { - if (REG_P (XEXP (XEXP (note, 0), 0))) - { - unsigned int regno = REGNO (XEXP (XEXP (note, 0), 0)); - if (!TEST_HARD_REG_BIT (defs_generated, regno)) - df_defs_record (collection_rec, XEXP (note, 0), bb, - insn_info, flags); - } - else - df_uses_record (collection_rec, &XEXP (note, 0), - DF_REF_REG_USE, bb, insn_info, flags); - } - } - - return; -} - -/* Collect all refs in the INSN. This function is free of any - side-effect - it will create and return a lists of df_ref's in the - COLLECTION_REC without putting those refs into existing ref chains - and reg chains. */ - -static void -df_insn_refs_collect (class df_collection_rec *collection_rec, - basic_block bb, struct df_insn_info *insn_info) -{ - rtx note; - bool is_cond_exec = (GET_CODE (PATTERN (insn_info->insn)) == COND_EXEC); - - /* Clear out the collection record. */ - collection_rec->def_vec.truncate (0); - collection_rec->use_vec.truncate (0); - collection_rec->eq_use_vec.truncate (0); - collection_rec->mw_vec.truncate (0); - - /* Process REG_EQUIV/REG_EQUAL notes. */ - for (note = REG_NOTES (insn_info->insn); note; - note = XEXP (note, 1)) - { - switch (REG_NOTE_KIND (note)) - { - case REG_EQUIV: - case REG_EQUAL: - df_uses_record (collection_rec, - &XEXP (note, 0), DF_REF_REG_USE, - bb, insn_info, DF_REF_IN_NOTE); - break; - case REG_NON_LOCAL_GOTO: - /* The frame ptr is used by a non-local goto. */ - df_ref_record (DF_REF_BASE, collection_rec, - regno_reg_rtx[FRAME_POINTER_REGNUM], - NULL, bb, insn_info, - DF_REF_REG_USE, 0); - if (!HARD_FRAME_POINTER_IS_FRAME_POINTER) - df_ref_record (DF_REF_BASE, collection_rec, - regno_reg_rtx[HARD_FRAME_POINTER_REGNUM], - NULL, bb, insn_info, - DF_REF_REG_USE, 0); - break; - default: - break; - } - } - - int flags = (is_cond_exec) ? DF_REF_CONDITIONAL : 0; - /* For CALL_INSNs, first record DF_REF_BASE register defs, as well as - uses from CALL_INSN_FUNCTION_USAGE. */ - if (CALL_P (insn_info->insn)) - df_get_call_refs (collection_rec, bb, insn_info, flags); - - /* Record other defs. These should be mostly for DF_REF_REGULAR, so - that a qsort on the defs is unnecessary in most cases. */ - df_defs_record (collection_rec, - PATTERN (insn_info->insn), bb, insn_info, 0); - - /* Record the register uses. */ - df_uses_record (collection_rec, - &PATTERN (insn_info->insn), DF_REF_REG_USE, bb, insn_info, 0); - - /* DF_REF_CONDITIONAL needs corresponding USES. */ - if (is_cond_exec) - df_get_conditional_uses (collection_rec); - - df_canonize_collection_rec (collection_rec); -} - -/* Recompute the luids for the insns in BB. */ - -void -df_recompute_luids (basic_block bb) -{ - rtx_insn *insn; - int luid = 0; - - df_grow_insn_info (); - - /* Scan the block an insn at a time from beginning to end. */ - FOR_BB_INSNS (bb, insn) - { - struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); - /* Inserting labels does not always trigger the incremental - rescanning. */ - if (!insn_info) - { - gcc_assert (!INSN_P (insn)); - insn_info = df_insn_create_insn_record (insn); - } - - DF_INSN_INFO_LUID (insn_info) = luid; - if (INSN_P (insn)) - luid++; - } -} - - -/* Collect all artificial refs at the block level for BB and add them - to COLLECTION_REC. */ - -static void -df_bb_refs_collect (class df_collection_rec *collection_rec, basic_block bb) -{ - collection_rec->def_vec.truncate (0); - collection_rec->use_vec.truncate (0); - collection_rec->eq_use_vec.truncate (0); - collection_rec->mw_vec.truncate (0); - - if (bb->index == ENTRY_BLOCK) - { - df_entry_block_defs_collect (collection_rec, df->entry_block_defs); - return; - } - else if (bb->index == EXIT_BLOCK) - { - df_exit_block_uses_collect (collection_rec, df->exit_block_uses); - return; - } - - if (bb_has_eh_pred (bb)) - { - unsigned int i; - /* Mark the registers that will contain data for the handler. */ - for (i = 0; ; ++i) - { - unsigned regno = EH_RETURN_DATA_REGNO (i); - if (regno == INVALID_REGNUM) - break; - df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[regno], NULL, - bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP); - } - } - - /* Add the hard_frame_pointer if this block is the target of a - non-local goto. */ - if (bb->flags & BB_NON_LOCAL_GOTO_TARGET) - df_ref_record (DF_REF_ARTIFICIAL, collection_rec, hard_frame_pointer_rtx, NULL, - bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP); - - /* Add the artificial uses. */ - if (bb->index >= NUM_FIXED_BLOCKS) - { - bitmap_iterator bi; - unsigned int regno; - bitmap au = bb_has_eh_pred (bb) - ? &df->eh_block_artificial_uses - : &df->regular_block_artificial_uses; - - EXECUTE_IF_SET_IN_BITMAP (au, 0, regno, bi) - { - df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[regno], NULL, - bb, NULL, DF_REF_REG_USE, 0); - } - } - - df_canonize_collection_rec (collection_rec); -} - - -/* Record all the refs within the basic block BB_INDEX and scan the instructions if SCAN_INSNS. */ - -void -df_bb_refs_record (int bb_index, bool scan_insns) -{ - basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx_insn *insn; - int luid = 0; - - if (!df) - return; - - df_collection_rec collection_rec; - df_grow_bb_info (df_scan); - if (scan_insns) - /* Scan the block an insn at a time from beginning to end. */ - FOR_BB_INSNS (bb, insn) - { - struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); - gcc_assert (!insn_info); - - insn_info = df_insn_create_insn_record (insn); - if (INSN_P (insn)) - { - /* Record refs within INSN. */ - DF_INSN_INFO_LUID (insn_info) = luid++; - df_insn_refs_collect (&collection_rec, bb, DF_INSN_INFO_GET (insn)); - df_refs_add_to_chains (&collection_rec, bb, insn, copy_all); - } - DF_INSN_INFO_LUID (insn_info) = luid; - } - - /* Other block level artificial refs */ - df_bb_refs_collect (&collection_rec, bb); - df_refs_add_to_chains (&collection_rec, bb, NULL, copy_all); - - /* Now that the block has been processed, set the block as dirty so - LR and LIVE will get it processed. */ - df_set_bb_dirty (bb); -} - - -/* Get the artificial use set for a regular (i.e. non-exit/non-entry) - block. */ - -static void -df_get_regular_block_artificial_uses (bitmap regular_block_artificial_uses) -{ -#ifdef EH_USES - unsigned int i; -#endif - - bitmap_clear (regular_block_artificial_uses); - - if (reload_completed) - { - if (frame_pointer_needed) - bitmap_set_bit (regular_block_artificial_uses, HARD_FRAME_POINTER_REGNUM); - } - else - /* Before reload, there are a few registers that must be forced - live everywhere -- which might not already be the case for - blocks within infinite loops. */ - { - unsigned int picreg = PIC_OFFSET_TABLE_REGNUM; - - /* Any reference to any pseudo before reload is a potential - reference of the frame pointer. */ - bitmap_set_bit (regular_block_artificial_uses, FRAME_POINTER_REGNUM); - - if (!HARD_FRAME_POINTER_IS_FRAME_POINTER) - bitmap_set_bit (regular_block_artificial_uses, - HARD_FRAME_POINTER_REGNUM); - - /* Pseudos with argument area equivalences may require - reloading via the argument pointer. */ - if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM - && fixed_regs[ARG_POINTER_REGNUM]) - bitmap_set_bit (regular_block_artificial_uses, ARG_POINTER_REGNUM); - - /* Any constant, or pseudo with constant equivalences, may - require reloading from memory using the pic register. */ - if (picreg != INVALID_REGNUM - && fixed_regs[picreg]) - bitmap_set_bit (regular_block_artificial_uses, picreg); - } - /* The all-important stack pointer must always be live. */ - bitmap_set_bit (regular_block_artificial_uses, STACK_POINTER_REGNUM); - -#ifdef EH_USES - /* EH_USES registers are used: - 1) at all insns that might throw (calls or with -fnon-call-exceptions - trapping insns) - 2) in all EH edges - 3) to support backtraces and/or debugging, anywhere between their - initialization and where they the saved registers are restored - from them, including the cases where we don't reach the epilogue - (noreturn call or infinite loop). */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (EH_USES (i)) - bitmap_set_bit (regular_block_artificial_uses, i); -#endif -} - - -/* Get the artificial use set for an eh block. */ - -static void -df_get_eh_block_artificial_uses (bitmap eh_block_artificial_uses) -{ - bitmap_clear (eh_block_artificial_uses); - - /* The following code (down through the arg_pointer setting APPEARS - to be necessary because there is nothing that actually - describes what the exception handling code may actually need - to keep alive. */ - if (reload_completed) - { - if (frame_pointer_needed) - { - bitmap_set_bit (eh_block_artificial_uses, FRAME_POINTER_REGNUM); - if (!HARD_FRAME_POINTER_IS_FRAME_POINTER) - bitmap_set_bit (eh_block_artificial_uses, - HARD_FRAME_POINTER_REGNUM); - } - if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM - && fixed_regs[ARG_POINTER_REGNUM]) - bitmap_set_bit (eh_block_artificial_uses, ARG_POINTER_REGNUM); - } -} - - - -/*---------------------------------------------------------------------------- - Specialized hard register scanning functions. -----------------------------------------------------------------------------*/ - - -/* Mark a register in SET. Hard registers in large modes get all - of their component registers set as well. */ - -static void -df_mark_reg (rtx reg, void *vset) -{ - bitmap_set_range ((bitmap) vset, REGNO (reg), REG_NREGS (reg)); -} - - -/* Set the bit for regs that are considered being defined at the entry. */ - -static void -df_get_entry_block_def_set (bitmap entry_block_defs) -{ - rtx r; - int i; - - bitmap_clear (entry_block_defs); - - /* For separate shrink-wrapping we use LIVE to analyze which basic blocks - need a prologue for some component to be executed before that block, - and we do not care about any other registers. Hence, we do not want - any register for any component defined in the entry block, and we can - just leave all registers undefined. */ - if (df_scan->local_flags & DF_SCAN_EMPTY_ENTRY_EXIT) - return; - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - { - if (global_regs[i]) - bitmap_set_bit (entry_block_defs, i); - if (FUNCTION_ARG_REGNO_P (i)) - bitmap_set_bit (entry_block_defs, INCOMING_REGNO (i)); - } - - /* The always important stack pointer. */ - bitmap_set_bit (entry_block_defs, STACK_POINTER_REGNUM); - - /* Once the prologue has been generated, all of these registers - should just show up in the first regular block. */ - if (targetm.have_prologue () && epilogue_completed) - { - /* Defs for the callee saved registers are inserted so that the - pushes have some defining location. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (!crtl->abi->clobbers_full_reg_p (i) - && !fixed_regs[i] - && df_regs_ever_live_p (i)) - bitmap_set_bit (entry_block_defs, i); - } - - r = targetm.calls.struct_value_rtx (current_function_decl, true); - if (r && REG_P (r)) - bitmap_set_bit (entry_block_defs, REGNO (r)); - - /* If the function has an incoming STATIC_CHAIN, it has to show up - in the entry def set. */ - r = rtx_for_static_chain (current_function_decl, true); - if (r && REG_P (r)) - bitmap_set_bit (entry_block_defs, REGNO (r)); - - if ((!reload_completed) || frame_pointer_needed) - { - /* Any reference to any pseudo before reload is a potential - reference of the frame pointer. */ - bitmap_set_bit (entry_block_defs, FRAME_POINTER_REGNUM); - - /* If they are different, also mark the hard frame pointer as live. */ - if (!HARD_FRAME_POINTER_IS_FRAME_POINTER - && !LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) - bitmap_set_bit (entry_block_defs, HARD_FRAME_POINTER_REGNUM); - } - - /* These registers are live everywhere. */ - if (!reload_completed) - { - /* Pseudos with argument area equivalences may require - reloading via the argument pointer. */ - if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM - && fixed_regs[ARG_POINTER_REGNUM]) - bitmap_set_bit (entry_block_defs, ARG_POINTER_REGNUM); - - /* Any constant, or pseudo with constant equivalences, may - require reloading from memory using the pic register. */ - unsigned int picreg = PIC_OFFSET_TABLE_REGNUM; - if (picreg != INVALID_REGNUM - && fixed_regs[picreg]) - bitmap_set_bit (entry_block_defs, picreg); - } - -#ifdef INCOMING_RETURN_ADDR_RTX - if (REG_P (INCOMING_RETURN_ADDR_RTX)) - bitmap_set_bit (entry_block_defs, REGNO (INCOMING_RETURN_ADDR_RTX)); -#endif - - targetm.extra_live_on_entry (entry_block_defs); -} - - -/* Return the (conservative) set of hard registers that are defined on - entry to the function. - It uses df->entry_block_defs to determine which register - reference to include. */ - -static void -df_entry_block_defs_collect (class df_collection_rec *collection_rec, - bitmap entry_block_defs) -{ - unsigned int i; - bitmap_iterator bi; - - EXECUTE_IF_SET_IN_BITMAP (entry_block_defs, 0, i, bi) - { - df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL, - ENTRY_BLOCK_PTR_FOR_FN (cfun), NULL, DF_REF_REG_DEF, 0); - } - - df_canonize_collection_rec (collection_rec); -} - - -/* Record the (conservative) set of hard registers that are defined on - entry to the function. */ - -static void -df_record_entry_block_defs (bitmap entry_block_defs) -{ - class df_collection_rec collection_rec; - df_entry_block_defs_collect (&collection_rec, entry_block_defs); - - /* Process bb_refs chain */ - df_refs_add_to_chains (&collection_rec, - BASIC_BLOCK_FOR_FN (cfun, ENTRY_BLOCK), - NULL, - copy_defs); -} - - -/* Update the defs in the entry block. */ - -void -df_update_entry_block_defs (void) -{ - bool changed = false; - - auto_bitmap refs (&df_bitmap_obstack); - df_get_entry_block_def_set (refs); - gcc_assert (df->entry_block_defs); - if (!bitmap_equal_p (df->entry_block_defs, refs)) - { - struct df_scan_bb_info *bb_info = df_scan_get_bb_info (ENTRY_BLOCK); - df_ref_chain_delete_du_chain (bb_info->artificial_defs); - df_ref_chain_delete (bb_info->artificial_defs); - bb_info->artificial_defs = NULL; - changed = true; - } - - if (changed) - { - df_record_entry_block_defs (refs); - bitmap_copy (df->entry_block_defs, refs); - df_set_bb_dirty (BASIC_BLOCK_FOR_FN (cfun, ENTRY_BLOCK)); - } -} - - -/* Return true if REGNO is used by the epilogue. */ -bool -df_epilogue_uses_p (unsigned int regno) -{ - return (EPILOGUE_USES (regno) - || TEST_HARD_REG_BIT (crtl->must_be_zero_on_return, regno)); -} - -/* Set the bit for regs that are considered being used at the exit. */ - -static void -df_get_exit_block_use_set (bitmap exit_block_uses) -{ - unsigned int i; - unsigned int picreg = PIC_OFFSET_TABLE_REGNUM; - - bitmap_clear (exit_block_uses); - - /* For separate shrink-wrapping we use LIVE to analyze which basic blocks - need an epilogue for some component to be executed after that block, - and we do not care about any other registers. Hence, we do not want - any register for any component seen as used in the exit block, and we - can just say no registers at all are used. */ - if (df_scan->local_flags & DF_SCAN_EMPTY_ENTRY_EXIT) - return; - - /* Stack pointer is always live at the exit. */ - bitmap_set_bit (exit_block_uses, STACK_POINTER_REGNUM); - - /* Mark the frame pointer if needed at the end of the function. - If we end up eliminating it, it will be removed from the live - list of each basic block by reload. */ - - if ((!reload_completed) || frame_pointer_needed) - { - bitmap_set_bit (exit_block_uses, FRAME_POINTER_REGNUM); - - /* If they are different, also mark the hard frame pointer as live. */ - if (!HARD_FRAME_POINTER_IS_FRAME_POINTER - && !LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) - bitmap_set_bit (exit_block_uses, HARD_FRAME_POINTER_REGNUM); - } - - /* Many architectures have a GP register even without flag_pic. - Assume the pic register is not in use, or will be handled by - other means, if it is not fixed. */ - if (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED - && picreg != INVALID_REGNUM - && fixed_regs[picreg]) - bitmap_set_bit (exit_block_uses, picreg); - - /* Mark all global registers, and all registers used by the - epilogue as being live at the end of the function since they - may be referenced by our caller. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (global_regs[i] || df_epilogue_uses_p (i)) - bitmap_set_bit (exit_block_uses, i); - - if (targetm.have_epilogue () && epilogue_completed) - { - /* Mark all call-saved registers that we actually used. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (df_regs_ever_live_p (i) - && !LOCAL_REGNO (i) - && !crtl->abi->clobbers_full_reg_p (i)) - bitmap_set_bit (exit_block_uses, i); - } - - /* Mark the registers that will contain data for the handler. */ - if (reload_completed && crtl->calls_eh_return) - for (i = 0; ; ++i) - { - unsigned regno = EH_RETURN_DATA_REGNO (i); - if (regno == INVALID_REGNUM) - break; - bitmap_set_bit (exit_block_uses, regno); - } - -#ifdef EH_RETURN_STACKADJ_RTX - if ((!targetm.have_epilogue () || ! epilogue_completed) - && crtl->calls_eh_return) - { - rtx tmp = EH_RETURN_STACKADJ_RTX; - if (tmp && REG_P (tmp)) - df_mark_reg (tmp, exit_block_uses); - } -#endif - - if ((!targetm.have_epilogue () || ! epilogue_completed) - && crtl->calls_eh_return) - { - rtx tmp = EH_RETURN_HANDLER_RTX; - if (tmp && REG_P (tmp)) - df_mark_reg (tmp, exit_block_uses); - } - - /* Mark function return value. */ - diddle_return_value (df_mark_reg, (void*) exit_block_uses); -} - - -/* Return the refs of hard registers that are used in the exit block. - It uses df->exit_block_uses to determine register to include. */ - -static void -df_exit_block_uses_collect (class df_collection_rec *collection_rec, bitmap exit_block_uses) -{ - unsigned int i; - bitmap_iterator bi; - - EXECUTE_IF_SET_IN_BITMAP (exit_block_uses, 0, i, bi) - df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL, - EXIT_BLOCK_PTR_FOR_FN (cfun), NULL, DF_REF_REG_USE, 0); - - /* It is deliberate that this is not put in the exit block uses but - I do not know why. */ - if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM - && reload_completed - && !bitmap_bit_p (exit_block_uses, ARG_POINTER_REGNUM) - && bb_has_eh_pred (EXIT_BLOCK_PTR_FOR_FN (cfun)) - && fixed_regs[ARG_POINTER_REGNUM]) - df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[ARG_POINTER_REGNUM], NULL, - EXIT_BLOCK_PTR_FOR_FN (cfun), NULL, DF_REF_REG_USE, 0); - - df_canonize_collection_rec (collection_rec); -} - - -/* Record the set of hard registers that are used in the exit block. - It uses df->exit_block_uses to determine which bit to include. */ - -static void -df_record_exit_block_uses (bitmap exit_block_uses) -{ - class df_collection_rec collection_rec; - df_exit_block_uses_collect (&collection_rec, exit_block_uses); - - /* Process bb_refs chain */ - df_refs_add_to_chains (&collection_rec, - BASIC_BLOCK_FOR_FN (cfun, EXIT_BLOCK), - NULL, - copy_uses); -} - - -/* Update the uses in the exit block. */ - -void -df_update_exit_block_uses (void) -{ - bool changed = false; - - auto_bitmap refs (&df_bitmap_obstack); - df_get_exit_block_use_set (refs); - gcc_assert (df->exit_block_uses); - if (!bitmap_equal_p (df->exit_block_uses, refs)) - { - struct df_scan_bb_info *bb_info = df_scan_get_bb_info (EXIT_BLOCK); - df_ref_chain_delete_du_chain (bb_info->artificial_uses); - df_ref_chain_delete (bb_info->artificial_uses); - bb_info->artificial_uses = NULL; - changed = true; - } - - if (changed) - { - df_record_exit_block_uses (refs); - bitmap_copy (df->exit_block_uses, refs); - df_set_bb_dirty (BASIC_BLOCK_FOR_FN (cfun, EXIT_BLOCK)); - } -} - -static bool initialized = false; - - -/* Initialize some platform specific structures. */ - -void -df_hard_reg_init (void) -{ - int i; - static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS; - - if (initialized) - return; - - /* Record which registers will be eliminated. We use this in - mark_used_regs. */ - CLEAR_HARD_REG_SET (elim_reg_set); - - for (i = 0; i < (int) ARRAY_SIZE (eliminables); i++) - SET_HARD_REG_BIT (elim_reg_set, eliminables[i].from); - - initialized = true; -} - -/* Recompute the parts of scanning that are based on regs_ever_live - because something changed in that array. */ - -void -df_update_entry_exit_and_calls (void) -{ - basic_block bb; - - df_update_entry_block_defs (); - df_update_exit_block_uses (); - - /* The call insns need to be rescanned because there may be changes - in the set of registers clobbered across the call. */ - FOR_EACH_BB_FN (bb, cfun) - { - rtx_insn *insn; - FOR_BB_INSNS (bb, insn) - { - if (INSN_P (insn) && CALL_P (insn)) - df_insn_rescan (insn); - } - } -} - - -/* Return true if hard REG is actually used in the some instruction. - There are a fair number of conditions that affect the setting of - this array. See the comment in df.h for df->hard_regs_live_count - for the conditions that this array is set. */ - -bool -df_hard_reg_used_p (unsigned int reg) -{ - return df->hard_regs_live_count[reg] != 0; -} - - -/* A count of the number of times REG is actually used in the some - instruction. There are a fair number of conditions that affect the - setting of this array. See the comment in df.h for - df->hard_regs_live_count for the conditions that this array is - set. */ - - -unsigned int -df_hard_reg_used_count (unsigned int reg) -{ - return df->hard_regs_live_count[reg]; -} - - -/* Get the value of regs_ever_live[REGNO]. */ - -bool -df_regs_ever_live_p (unsigned int regno) -{ - return regs_ever_live[regno]; -} - -/* Set regs_ever_live[REGNO] to VALUE. If this cause regs_ever_live - to change, schedule that change for the next update. */ - -void -df_set_regs_ever_live (unsigned int regno, bool value) -{ - if (regs_ever_live[regno] == value) - return; - - regs_ever_live[regno] = value; - if (df) - df->redo_entry_and_exit = true; -} - - -/* Compute "regs_ever_live" information from the underlying df - information. Set the vector to all false if RESET. */ - -void -df_compute_regs_ever_live (bool reset) -{ - unsigned int i; - bool changed = df->redo_entry_and_exit; - - if (reset) - memset (regs_ever_live, 0, sizeof (regs_ever_live)); - - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if ((!regs_ever_live[i]) && df_hard_reg_used_p (i)) - { - regs_ever_live[i] = true; - changed = true; - } - if (changed) - df_update_entry_exit_and_calls (); - df->redo_entry_and_exit = false; -} - - -/*---------------------------------------------------------------------------- - Dataflow ref information verification functions. - - df_reg_chain_mark (refs, regno, is_def, is_eq_use) - df_reg_chain_verify_unmarked (refs) - df_refs_verify (vec<stack, va_df_ref>, ref*, bool) - df_mws_verify (mw*, mw*, bool) - df_insn_refs_verify (collection_rec, bb, insn, bool) - df_bb_refs_verify (bb, refs, bool) - df_bb_verify (bb) - df_exit_block_bitmap_verify (bool) - df_entry_block_bitmap_verify (bool) - df_scan_verify () -----------------------------------------------------------------------------*/ - - -/* Mark all refs in the reg chain. Verify that all of the registers -are in the correct chain. */ - -static unsigned int -df_reg_chain_mark (df_ref refs, unsigned int regno, - bool is_def, bool is_eq_use) -{ - unsigned int count = 0; - df_ref ref; - for (ref = refs; ref; ref = DF_REF_NEXT_REG (ref)) - { - gcc_assert (!DF_REF_IS_REG_MARKED (ref)); - - /* If there are no def-use or use-def chains, make sure that all - of the chains are clear. */ - if (!df_chain) - gcc_assert (!DF_REF_CHAIN (ref)); - - /* Check to make sure the ref is in the correct chain. */ - gcc_assert (DF_REF_REGNO (ref) == regno); - if (is_def) - gcc_assert (DF_REF_REG_DEF_P (ref)); - else - gcc_assert (!DF_REF_REG_DEF_P (ref)); - - if (is_eq_use) - gcc_assert ((DF_REF_FLAGS (ref) & DF_REF_IN_NOTE)); - else - gcc_assert ((DF_REF_FLAGS (ref) & DF_REF_IN_NOTE) == 0); - - if (DF_REF_NEXT_REG (ref)) - gcc_assert (DF_REF_PREV_REG (DF_REF_NEXT_REG (ref)) == ref); - count++; - DF_REF_REG_MARK (ref); - } - return count; -} - - -/* Verify that all of the registers in the chain are unmarked. */ - -static void -df_reg_chain_verify_unmarked (df_ref refs) -{ - df_ref ref; - for (ref = refs; ref; ref = DF_REF_NEXT_REG (ref)) - gcc_assert (!DF_REF_IS_REG_MARKED (ref)); -} - - -/* Verify that NEW_REC and OLD_REC have exactly the same members. */ - -static bool -df_refs_verify (const vec<df_ref, va_heap> *new_rec, df_ref old_rec, - bool abort_if_fail) -{ - unsigned int ix; - df_ref new_ref; - - FOR_EACH_VEC_ELT (*new_rec, ix, new_ref) - { - if (old_rec == NULL || !df_ref_equal_p (new_ref, old_rec)) - { - if (abort_if_fail) - gcc_assert (0); - else - return false; - } - - /* Abort if fail is called from the function level verifier. If - that is the context, mark this reg as being seem. */ - if (abort_if_fail) - { - gcc_assert (DF_REF_IS_REG_MARKED (old_rec)); - DF_REF_REG_UNMARK (old_rec); - } - - old_rec = DF_REF_NEXT_LOC (old_rec); - } - - if (abort_if_fail) - gcc_assert (old_rec == NULL); - else - return old_rec == NULL; - return false; -} - - -/* Verify that NEW_REC and OLD_REC have exactly the same members. */ - -static bool -df_mws_verify (const vec<df_mw_hardreg *, va_heap> *new_rec, - struct df_mw_hardreg *old_rec, - bool abort_if_fail) -{ - unsigned int ix; - struct df_mw_hardreg *new_reg; - - FOR_EACH_VEC_ELT (*new_rec, ix, new_reg) - { - if (old_rec == NULL || !df_mw_equal_p (new_reg, old_rec)) - { - if (abort_if_fail) - gcc_assert (0); - else - return false; - } - old_rec = DF_MWS_NEXT (old_rec); - } - - if (abort_if_fail) - gcc_assert (old_rec == NULL); - else - return old_rec == NULL; - return false; -} - - -/* Return true if the existing insn refs information is complete and - correct. Otherwise (i.e. if there's any missing or extra refs), - return the correct df_ref chain in REFS_RETURN. - - If ABORT_IF_FAIL, leave the refs that are verified (already in the - ref chain) as DF_REF_MARKED(). If it's false, then it's a per-insn - verification mode instead of the whole function, so unmark - everything. - - If ABORT_IF_FAIL is set, this function never returns false. */ - -static bool -df_insn_refs_verify (class df_collection_rec *collection_rec, - basic_block bb, - rtx_insn *insn, - bool abort_if_fail) -{ - bool ret1, ret2, ret3; - unsigned int uid = INSN_UID (insn); - struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); - - df_insn_refs_collect (collection_rec, bb, insn_info); - - /* Unfortunately we cannot opt out early if one of these is not - right and abort_if_fail is set because the marks will not get cleared. */ - ret1 = df_refs_verify (&collection_rec->def_vec, DF_INSN_UID_DEFS (uid), - abort_if_fail); - if (!ret1 && !abort_if_fail) - return false; - ret2 = df_refs_verify (&collection_rec->use_vec, DF_INSN_UID_USES (uid), - abort_if_fail); - if (!ret2 && !abort_if_fail) - return false; - ret3 = df_refs_verify (&collection_rec->eq_use_vec, DF_INSN_UID_EQ_USES (uid), - abort_if_fail); - if (!ret3 && !abort_if_fail) - return false; - if (! df_mws_verify (&collection_rec->mw_vec, DF_INSN_UID_MWS (uid), - abort_if_fail)) - return false; - return (ret1 && ret2 && ret3); -} - - -/* Return true if all refs in the basic block are correct and complete. - Due to df_ref_chain_verify, it will cause all refs - that are verified to have DF_REF_MARK bit set. */ - -static bool -df_bb_verify (basic_block bb) -{ - rtx_insn *insn; - struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb->index); - class df_collection_rec collection_rec; - - gcc_assert (bb_info); - - /* Scan the block, one insn at a time, from beginning to end. */ - FOR_BB_INSNS_REVERSE (bb, insn) - { - if (!INSN_P (insn)) - continue; - df_insn_refs_verify (&collection_rec, bb, insn, true); - df_free_collection_rec (&collection_rec); - } - - /* Do the artificial defs and uses. */ - df_bb_refs_collect (&collection_rec, bb); - df_refs_verify (&collection_rec.def_vec, df_get_artificial_defs (bb->index), true); - df_refs_verify (&collection_rec.use_vec, df_get_artificial_uses (bb->index), true); - df_free_collection_rec (&collection_rec); - - return true; -} - - -/* Returns true if the entry block has correct and complete df_ref set. - If not it either aborts if ABORT_IF_FAIL is true or returns false. */ - -static bool -df_entry_block_bitmap_verify (bool abort_if_fail) -{ - bool is_eq; - - auto_bitmap entry_block_defs (&df_bitmap_obstack); - df_get_entry_block_def_set (entry_block_defs); - - is_eq = bitmap_equal_p (entry_block_defs, df->entry_block_defs); - - if (!is_eq && abort_if_fail) - { - fprintf (stderr, "entry_block_defs = "); - df_print_regset (stderr, entry_block_defs); - fprintf (stderr, "df->entry_block_defs = "); - df_print_regset (stderr, df->entry_block_defs); - gcc_assert (0); - } - - return is_eq; -} - - -/* Returns true if the exit block has correct and complete df_ref set. - If not it either aborts if ABORT_IF_FAIL is true or returns false. */ - -static bool -df_exit_block_bitmap_verify (bool abort_if_fail) -{ - bool is_eq; - - auto_bitmap exit_block_uses (&df_bitmap_obstack); - df_get_exit_block_use_set (exit_block_uses); - - is_eq = bitmap_equal_p (exit_block_uses, df->exit_block_uses); - - if (!is_eq && abort_if_fail) - { - fprintf (stderr, "exit_block_uses = "); - df_print_regset (stderr, exit_block_uses); - fprintf (stderr, "df->exit_block_uses = "); - df_print_regset (stderr, df->exit_block_uses); - gcc_assert (0); - } - - return is_eq; -} - - -/* Return true if df_ref information for all insns in all blocks are - correct and complete. */ - -void -df_scan_verify (void) -{ - unsigned int i; - basic_block bb; - - if (!df) - return; - - /* Verification is a 4 step process. */ - - /* (1) All of the refs are marked by going through the reg chains. */ - for (i = 0; i < DF_REG_SIZE (df); i++) - { - gcc_assert (df_reg_chain_mark (DF_REG_DEF_CHAIN (i), i, true, false) - == DF_REG_DEF_COUNT (i)); - gcc_assert (df_reg_chain_mark (DF_REG_USE_CHAIN (i), i, false, false) - == DF_REG_USE_COUNT (i)); - gcc_assert (df_reg_chain_mark (DF_REG_EQ_USE_CHAIN (i), i, false, true) - == DF_REG_EQ_USE_COUNT (i)); - } - - /* (2) There are various bitmaps whose value may change over the - course of the compilation. This step recomputes them to make - sure that they have not slipped out of date. */ - auto_bitmap regular_block_artificial_uses (&df_bitmap_obstack); - auto_bitmap eh_block_artificial_uses (&df_bitmap_obstack); - - df_get_regular_block_artificial_uses (regular_block_artificial_uses); - df_get_eh_block_artificial_uses (eh_block_artificial_uses); - - bitmap_ior_into (eh_block_artificial_uses, - regular_block_artificial_uses); - - /* Check artificial_uses bitmaps didn't change. */ - gcc_assert (bitmap_equal_p (regular_block_artificial_uses, - &df->regular_block_artificial_uses)); - gcc_assert (bitmap_equal_p (eh_block_artificial_uses, - &df->eh_block_artificial_uses)); - - /* Verify entry block and exit block. These only verify the bitmaps, - the refs are verified in df_bb_verify. */ - df_entry_block_bitmap_verify (true); - df_exit_block_bitmap_verify (true); - - /* (3) All of the insns in all of the blocks are traversed and the - marks are cleared both in the artificial refs attached to the - blocks and the real refs inside the insns. It is a failure to - clear a mark that has not been set as this means that the ref in - the block or insn was not in the reg chain. */ - - FOR_ALL_BB_FN (bb, cfun) - df_bb_verify (bb); - - /* (4) See if all reg chains are traversed a second time. This time - a check is made that the marks are clear. A set mark would be a - from a reg that is not in any insn or basic block. */ - - for (i = 0; i < DF_REG_SIZE (df); i++) - { - df_reg_chain_verify_unmarked (DF_REG_DEF_CHAIN (i)); - df_reg_chain_verify_unmarked (DF_REG_USE_CHAIN (i)); - df_reg_chain_verify_unmarked (DF_REG_EQ_USE_CHAIN (i)); - } -} |