Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
This commit is contained in:
parent
ac1a20aec5
commit
6de9cd9a88
25
ChangeLog
25
ChangeLog
@ -1,3 +1,28 @@
|
|||||||
|
2004-05-13 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
Merge from tree-ssa-20020619-branch.
|
||||||
|
|
||||||
|
* Makefile.def: Add libbanshee, libmudflap and libgfortran.
|
||||||
|
* Makefile.tpl (BUILD_CONFIGDIRS): Add libbanshee.
|
||||||
|
(HOST_GMPLIBS): Define.
|
||||||
|
(HOST_GMPINC): Define.
|
||||||
|
(TARGET_LIB_PATH): Add libmudflap.
|
||||||
|
(GFORTRAN_FOR_TARGET): Define.
|
||||||
|
(configure-build*): Export GFORTRAN.
|
||||||
|
(configure-gcc): Export GMPLIBS and GMPINC.
|
||||||
|
(all-gcc): Add maybe-all-libbanshee.
|
||||||
|
(configure-target-libgfortran): Define.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
* configure.in (host_libs): Add libbanshee.
|
||||||
|
(target_libraries): Add target-libmudflap and target-libgfortran.
|
||||||
|
Add --with-libbanshee.
|
||||||
|
Handle --disable-libmudflap.
|
||||||
|
(*-*-freebsd*): Use with_gmp.
|
||||||
|
Add $(libgcj) to noconfigdirs.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* depcomp: New file.
|
||||||
|
* MAINTAINERS: Add tree-ssa maintainers.
|
||||||
|
|
||||||
2004-05-04 Vladimir Makarov <vmakarov@redhat.com>
|
2004-05-04 Vladimir Makarov <vmakarov@redhat.com>
|
||||||
|
|
||||||
* MAINTAINERS (Various Maintainers): Add myself.
|
* MAINTAINERS (Various Maintainers): Add myself.
|
||||||
|
110
ChangeLog.tree-ssa
Normal file
110
ChangeLog.tree-ssa
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
2004-05-03 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
* configure.in (GMP checking): s/save_CFLAGS/saved_CFLAGS.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2004-04-22 Loren J. Rittle <ljrittle@acm.org>
|
||||||
|
|
||||||
|
* configure.in (*-*-freebsd*): Use with_gmp to "Avoid crusty gmp.h."
|
||||||
|
* configure: Rebuilt (with autoconf version 2.13).
|
||||||
|
|
||||||
|
2004-04-17 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* Makefile.tmp (EXTRA_HOST_FLAGS): Remove GMPLIBS and GMPINC.
|
||||||
|
(configure-gcc): Set GMPLIBS and GMPINC.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
|
||||||
|
2004-04-14 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* Makefile.tmp (HOST_GMPLIBS, HOST_GMPINC): New variables.
|
||||||
|
(EXTRA_HOST_FLAGS): Pass them.
|
||||||
|
* configure.in: Add check for GMP. Disable languages if not found.
|
||||||
|
* Makefile.in, configure: Regenrate.
|
||||||
|
|
||||||
|
2004-03-29 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Set with_libbansshee to yes by default.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2004-03-28 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Fix handling of --without-libbanshee.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2004-03-26 Nathanael Nerode <neroden@gcc.gnu.org>
|
||||||
|
|
||||||
|
* configure.in: Add support for --without-libbanshee.
|
||||||
|
* configure: Regenerated.
|
||||||
|
|
||||||
|
2004-02-17 Brian Booth <bbooth@redhat.com>
|
||||||
|
|
||||||
|
* MAINTAINERS.tree-ssa: Add self to write after approval.
|
||||||
|
|
||||||
|
2004-02-13 Loren J. Rittle <ljrittle@acm.org>
|
||||||
|
|
||||||
|
* configure.in (*-*-freebsd*): Avoid crusty gmp.h.
|
||||||
|
(alpha*-*-*freebsd*, i[[3456789]]86-*-*freebsd*): Merge into above.
|
||||||
|
* configure: Rebuilt (with autoconf version 2.13).
|
||||||
|
|
||||||
|
2003-10-22 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Add support for "--disable-libmudflap" option.
|
||||||
|
* configure: Regenerated.
|
||||||
|
|
||||||
|
2003-09-22 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* MAINTAINERS.tree-ssa: Add Andrew MacLeod as global maintainer for
|
||||||
|
the branch.
|
||||||
|
|
||||||
|
2003-08-23 Paul Brook <paul@nowt.org>
|
||||||
|
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
|
||||||
|
2003-07-26 Paul Brook <paul@nowt.org>
|
||||||
|
|
||||||
|
* Makefile.def: Add libgfortran and GFORTRAN_FOR_TARGET.
|
||||||
|
* Makefile.tmp: Ditto.
|
||||||
|
* configure.in: Ditto.
|
||||||
|
* depcomp: New file.
|
||||||
|
* maintainer-scripts/gcc_release: Add gcc-fortran.
|
||||||
|
* maintainer-scripts/snapshot-README: Ditto.
|
||||||
|
* maintainer-scripts/snapshot-index.html: Ditto.
|
||||||
|
* libgfortran: New target library.
|
||||||
|
|
||||||
|
2003-06-05 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in: Regenerated to activate libmudflap builds.
|
||||||
|
|
||||||
|
2003-04-25 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* MAINTAINERS.tree-ssa: New file.
|
||||||
|
|
||||||
|
2003-01-29 Daniel Berlin <dberlin@dberlin.org>
|
||||||
|
|
||||||
|
* configure.in: Use ac_configure_args for libbanshee option
|
||||||
|
* configure: regen.
|
||||||
|
|
||||||
|
2002-11-27 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.tpl (all-gcc, all-bootstrap): Add dependency on
|
||||||
|
all-libbanshee.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
|
||||||
|
2002-11-25 Daniel Berlin <dberlin@dberlin.org>
|
||||||
|
|
||||||
|
* Makefile.def: Diego already did the libmudflap moving in a merge,
|
||||||
|
so remove the extra i added.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
|
||||||
|
2002-11-24 Daniel Berlin <dberlin@dberlin.org>
|
||||||
|
|
||||||
|
* configure.in: Add libbanshee related stuff.
|
||||||
|
* Makefile.in: Regenerate from Makefile.def.
|
||||||
|
* Makefile.def: Move libmudflap stuff to here, where it belongs.
|
||||||
|
Add libbanshee stuff.
|
||||||
|
* Makefile.tpl: Add libbanshee stuff.
|
||||||
|
|
||||||
|
2002-08-12 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in (target-libmudflap): Add libmudflap-related targets.
|
||||||
|
* configure.in (target_libs): Ditto.
|
@ -170,6 +170,11 @@ gcov Nathan Sidwell nathan@codesourcery.com
|
|||||||
option handling Neil Booth neil@daikokuya.co.uk
|
option handling Neil Booth neil@daikokuya.co.uk
|
||||||
libffi testsuite Andreas Tobler andreast@gcc.gnu.org
|
libffi testsuite Andreas Tobler andreast@gcc.gnu.org
|
||||||
middle-end Roger Sayle roger@eyesopen.com
|
middle-end Roger Sayle roger@eyesopen.com
|
||||||
|
tree-ssa Diego Novillo dnovillo@redhat.com
|
||||||
|
tree-ssa Andrew MacLeod amacleod@redhat.com
|
||||||
|
PRE, points-to Daniel Berlin dberlin@dberlin.org
|
||||||
|
mudflap Frank Ch. Eigler fche@redhat.com
|
||||||
|
tree browser/unparser Sebastian Pop s.pop@laposte.net
|
||||||
|
|
||||||
Note individuals who maintain parts of the compiler need approval to check
|
Note individuals who maintain parts of the compiler need approval to check
|
||||||
in changes outside of the parts of the compiler they maintain.
|
in changes outside of the parts of the compiler they maintain.
|
||||||
|
@ -25,6 +25,7 @@ AutoGen definitions Makefile.tpl;
|
|||||||
// that recursive target in its Makefile.
|
// that recursive target in its Makefile.
|
||||||
|
|
||||||
build_modules= { module= libiberty; };
|
build_modules= { module= libiberty; };
|
||||||
|
build_modules= { module= libbanshee; };
|
||||||
|
|
||||||
host_modules= { module= ash; };
|
host_modules= { module= ash; };
|
||||||
host_modules= { module= autoconf; };
|
host_modules= { module= autoconf; };
|
||||||
@ -59,6 +60,7 @@ host_modules= { module= tcl;
|
|||||||
host_modules= { module= itcl; };
|
host_modules= { module= itcl; };
|
||||||
host_modules= { module= ld; bootstrap=true; };
|
host_modules= { module= ld; bootstrap=true; };
|
||||||
host_modules= { module= libgui; };
|
host_modules= { module= libgui; };
|
||||||
|
host_modules= { module= libbanshee; bootstrap=true; no_install=true; };
|
||||||
host_modules= { module= libiberty; bootstrap=true; };
|
host_modules= { module= libiberty; bootstrap=true; };
|
||||||
host_modules= { module= libtool; };
|
host_modules= { module= libtool; };
|
||||||
host_modules= { module= m4; };
|
host_modules= { module= m4; };
|
||||||
@ -97,8 +99,10 @@ host_modules= { module= libtermcap; no_check=true;
|
|||||||
host_modules= { module= utils; no_check=true; };
|
host_modules= { module= utils; no_check=true; };
|
||||||
|
|
||||||
target_modules = { module= libstdc++-v3; raw_cxx=true; };
|
target_modules = { module= libstdc++-v3; raw_cxx=true; };
|
||||||
|
target_modules = { module= libmudflap; };
|
||||||
target_modules = { module= newlib; };
|
target_modules = { module= newlib; };
|
||||||
target_modules = { module= libf2c; };
|
target_modules = { module= libf2c; };
|
||||||
|
target_modules = { module= libgfortran; };
|
||||||
target_modules = { module= libobjc; };
|
target_modules = { module= libobjc; };
|
||||||
target_modules = { module= libtermcap; no_check=true; stage=true;
|
target_modules = { module= libtermcap; no_check=true; stage=true;
|
||||||
missing=mostlyclean;
|
missing=mostlyclean;
|
||||||
@ -202,6 +206,7 @@ flags_to_pass = { flag= CXX_FOR_TARGET ; };
|
|||||||
flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
|
flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
|
||||||
flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
|
flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
|
||||||
flags_to_pass = { flag= GCJ_FOR_TARGET ; };
|
flags_to_pass = { flag= GCJ_FOR_TARGET ; };
|
||||||
|
flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
|
||||||
flags_to_pass = { flag= LD_FOR_TARGET ; };
|
flags_to_pass = { flag= LD_FOR_TARGET ; };
|
||||||
flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
|
flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
|
||||||
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
|
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
|
||||||
|
967
Makefile.in
967
Makefile.in
File diff suppressed because it is too large
Load Diff
18
Makefile.tpl
18
Makefile.tpl
@ -105,7 +105,7 @@ REALLY_SET_LIB_PATH = \
|
|||||||
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
|
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
|
||||||
|
|
||||||
# This is the list of directories to be built for the build system.
|
# This is the list of directories to be built for the build system.
|
||||||
BUILD_CONFIGDIRS = libiberty
|
BUILD_CONFIGDIRS = libiberty libbanshee
|
||||||
# Build programs are put under this directory.
|
# Build programs are put under this directory.
|
||||||
BUILD_SUBDIR = @build_subdir@
|
BUILD_SUBDIR = @build_subdir@
|
||||||
# This is set by the configure script to the arguments to use when configuring
|
# This is set by the configure script to the arguments to use when configuring
|
||||||
@ -127,6 +127,10 @@ TARGET_SUBDIR = @target_subdir@
|
|||||||
# directories built for the target.
|
# directories built for the target.
|
||||||
TARGET_CONFIGARGS = @target_configargs@
|
TARGET_CONFIGARGS = @target_configargs@
|
||||||
|
|
||||||
|
# Where to find GMP
|
||||||
|
HOST_GMPLIBS = @gmplibs@
|
||||||
|
HOST_GMPINC = @gmpinc@
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# Programs producing files for the BUILD machine
|
# Programs producing files for the BUILD machine
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
@ -244,7 +248,7 @@ PICFLAG =
|
|||||||
|
|
||||||
# This is the list of directories that may be needed in RPATH_ENVVAR
|
# This is the list of directories that may be needed in RPATH_ENVVAR
|
||||||
# so that prorgams built for the target machine work.
|
# so that prorgams built for the target machine work.
|
||||||
TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
|
TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libmudflap/.libs
|
||||||
|
|
||||||
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
|
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
|
||||||
|
|
||||||
@ -311,6 +315,7 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
|
|||||||
fi`
|
fi`
|
||||||
|
|
||||||
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
|
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
|
||||||
|
GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@
|
||||||
|
|
||||||
LD_FOR_TARGET=@LD_FOR_TARGET@
|
LD_FOR_TARGET=@LD_FOR_TARGET@
|
||||||
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
|
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
|
||||||
@ -705,6 +710,7 @@ configure-build-[+module+]:
|
|||||||
CXX="$(CXX_FOR_BUILD)"; export CXX; \
|
CXX="$(CXX_FOR_BUILD)"; export CXX; \
|
||||||
CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
|
CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
|
||||||
GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
|
GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
|
||||||
|
GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
|
||||||
DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
|
DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
|
||||||
LD="$(LD_FOR_BUILD)"; export LD; \
|
LD="$(LD_FOR_BUILD)"; export LD; \
|
||||||
LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
|
LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
|
||||||
@ -921,6 +927,7 @@ ELSE normal_cxx +]
|
|||||||
ENDIF raw_cxx +]
|
ENDIF raw_cxx +]
|
||||||
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
|
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
|
||||||
GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
|
GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
|
||||||
|
GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
|
||||||
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
|
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
|
||||||
LD="$(LD_FOR_TARGET)"; export LD; \
|
LD="$(LD_FOR_TARGET)"; export LD; \
|
||||||
LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
|
LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
|
||||||
@ -1083,6 +1090,8 @@ configure-gcc:
|
|||||||
WINDRES="$(WINDRES)"; export WINDRES; \
|
WINDRES="$(WINDRES)"; export WINDRES; \
|
||||||
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
|
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
|
||||||
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
|
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
|
||||||
|
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
|
||||||
|
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
|
||||||
echo Configuring in gcc; \
|
echo Configuring in gcc; \
|
||||||
cd gcc || exit 1; \
|
cd gcc || exit 1; \
|
||||||
case $(srcdir) in \
|
case $(srcdir) in \
|
||||||
@ -1600,10 +1609,10 @@ new-restage3: all-stage2-gcc
|
|||||||
# GCC needs to identify certain tools.
|
# GCC needs to identify certain tools.
|
||||||
# GCC also needs the information exported by the intl configure script.
|
# GCC also needs the information exported by the intl configure script.
|
||||||
configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
|
configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
|
||||||
all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
|
all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee
|
||||||
# This is a slightly kludgy method of getting dependencies on
|
# This is a slightly kludgy method of getting dependencies on
|
||||||
# all-build-libiberty correct; it would be better to build it every time.
|
# all-build-libiberty correct; it would be better to build it every time.
|
||||||
all-gcc: maybe-all-build-libiberty
|
all-gcc: maybe-all-build-libiberty maybe-all-libbanshee
|
||||||
all-bootstrap: [+ FOR host_modules +][+ IF bootstrap +]maybe-all-[+module+] [+ ENDIF bootstrap +][+ ENDFOR host_modules +]
|
all-bootstrap: [+ FOR host_modules +][+ IF bootstrap +]maybe-all-[+module+] [+ ENDIF bootstrap +][+ ENDFOR host_modules +]
|
||||||
|
|
||||||
# Host modules specific to gdb.
|
# Host modules specific to gdb.
|
||||||
@ -1679,6 +1688,7 @@ all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
|
|||||||
configure-target-libada: $(ALL_GCC_C)
|
configure-target-libada: $(ALL_GCC_C)
|
||||||
configure-target-libf2c: $(ALL_GCC_C)
|
configure-target-libf2c: $(ALL_GCC_C)
|
||||||
all-target-libf2c: maybe-all-target-libiberty
|
all-target-libf2c: maybe-all-target-libiberty
|
||||||
|
configure-target-libgfortran: $(ALL_GCC_C)
|
||||||
configure-target-libffi: $(ALL_GCC_C)
|
configure-target-libffi: $(ALL_GCC_C)
|
||||||
configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
|
configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
|
||||||
all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
|
all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
|
||||||
|
334
configure
vendored
334
configure
vendored
@ -11,8 +11,14 @@
|
|||||||
ac_help=
|
ac_help=
|
||||||
ac_default_prefix=/usr/local
|
ac_default_prefix=/usr/local
|
||||||
# Any additions from configure.in:
|
# Any additions from configure.in:
|
||||||
|
ac_help="$ac_help
|
||||||
|
--without-libbanshee Don't build with libbanshee"
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
--enable-libada Builds libada directory"
|
--enable-libada Builds libada directory"
|
||||||
|
ac_help="$ac_help
|
||||||
|
--with-gmp-dir=PATH Specify source directory for GMP library"
|
||||||
|
ac_help="$ac_help
|
||||||
|
--with-gmp=PATH Specify directory for installed GMP library"
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
--enable-serial-[{host,target,build}-]configure
|
--enable-serial-[{host,target,build}-]configure
|
||||||
Force sequential configuration of
|
Force sequential configuration of
|
||||||
@ -581,7 +587,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||||
echo "configure:585: checking host system type" >&5
|
echo "configure:591: checking host system type" >&5
|
||||||
|
|
||||||
host_alias=$host
|
host_alias=$host
|
||||||
case "$host_alias" in
|
case "$host_alias" in
|
||||||
@ -602,7 +608,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|||||||
echo "$ac_t""$host" 1>&6
|
echo "$ac_t""$host" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking target system type""... $ac_c" 1>&6
|
echo $ac_n "checking target system type""... $ac_c" 1>&6
|
||||||
echo "configure:606: checking target system type" >&5
|
echo "configure:612: checking target system type" >&5
|
||||||
|
|
||||||
target_alias=$target
|
target_alias=$target
|
||||||
case "$target_alias" in
|
case "$target_alias" in
|
||||||
@ -620,7 +626,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|||||||
echo "$ac_t""$target" 1>&6
|
echo "$ac_t""$target" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||||
echo "configure:624: checking build system type" >&5
|
echo "configure:630: checking build system type" >&5
|
||||||
|
|
||||||
build_alias=$build
|
build_alias=$build
|
||||||
case "$build_alias" in
|
case "$build_alias" in
|
||||||
@ -675,7 +681,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
|
|||||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||||
# ./install, which can be erroneously created by make from ./install.sh.
|
# ./install, which can be erroneously created by make from ./install.sh.
|
||||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||||
echo "configure:679: checking for a BSD compatible install" >&5
|
echo "configure:685: checking for a BSD compatible install" >&5
|
||||||
if test -z "$INSTALL"; then
|
if test -z "$INSTALL"; then
|
||||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -880,7 +886,7 @@ fi
|
|||||||
|
|
||||||
# these libraries are used by various programs built for the host environment
|
# these libraries are used by various programs built for the host environment
|
||||||
#
|
#
|
||||||
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
|
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee"
|
||||||
|
|
||||||
# these tools are built for the host environment
|
# these tools are built for the host environment
|
||||||
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
||||||
@ -903,7 +909,9 @@ target_libraries="target-libiberty \
|
|||||||
target-libgloss \
|
target-libgloss \
|
||||||
target-newlib \
|
target-newlib \
|
||||||
target-libstdc++-v3 \
|
target-libstdc++-v3 \
|
||||||
|
target-libmudflap \
|
||||||
target-libf2c \
|
target-libf2c \
|
||||||
|
target-libgfortran \
|
||||||
${libgcj} \
|
${libgcj} \
|
||||||
target-libobjc \
|
target-libobjc \
|
||||||
target-libada"
|
target-libada"
|
||||||
@ -1082,6 +1090,22 @@ case "${host}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check whether --with-libbanshee or --without-libbanshee was given.
|
||||||
|
if test "${with_libbanshee+set}" = set; then
|
||||||
|
withval="$with_libbanshee"
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${with_libbanshee} in
|
||||||
|
no)
|
||||||
|
noconfigdirs="$noconfigdirs libbanshee" ;;
|
||||||
|
yes|"")
|
||||||
|
with_libbanshee=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
{ echo "configure: error: --with-libbanshee can only be empty, "yes" or "no" (empty defaults to "yes"." 1>&2; exit 1; }
|
||||||
|
esac
|
||||||
|
|
||||||
# Check whether --enable-libada or --disable-libada was given.
|
# Check whether --enable-libada or --disable-libada was given.
|
||||||
if test "${enable_libada+set}" = set; then
|
if test "${enable_libada+set}" = set; then
|
||||||
enableval="$enable_libada"
|
enableval="$enable_libada"
|
||||||
@ -1110,6 +1134,18 @@ no)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# Allow --disable-libmudflap to exclude target-libmudflap
|
||||||
|
case $enable_libmudflap in
|
||||||
|
yes | "")
|
||||||
|
# By default it's enabled
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
noconfigdirs="$noconfigdirs target-libmudflap"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
case "${target}" in
|
case "${target}" in
|
||||||
*-*-chorusos)
|
*-*-chorusos)
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
||||||
@ -1125,6 +1161,22 @@ case "${target}" in
|
|||||||
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
|
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
||||||
;;
|
;;
|
||||||
|
*-*-freebsd* | *-*-kfreebsd*-gnu)
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
|
if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
|
||||||
|
&& test -f /usr/local/include/gmp.h; then
|
||||||
|
with_gmp=/usr/local
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Skip some stuff that's unsupported on some FreeBSD configurations.
|
||||||
|
case "${target}" in
|
||||||
|
i*86-*-*) ;;
|
||||||
|
alpha*-*-*) ;;
|
||||||
|
*)
|
||||||
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
*-*-kaos*)
|
*-*-kaos*)
|
||||||
# Remove unsupported stuff on all kaOS configurations.
|
# Remove unsupported stuff on all kaOS configurations.
|
||||||
skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
|
skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
|
||||||
@ -1176,9 +1228,6 @@ case "${target}" in
|
|||||||
# newlib is not 64 bit ready
|
# newlib is not 64 bit ready
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
;;
|
;;
|
||||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
|
||||||
;;
|
|
||||||
alpha*-*-*)
|
alpha*-*-*)
|
||||||
# newlib is not 64 bit ready
|
# newlib is not 64 bit ready
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
||||||
@ -1297,9 +1346,6 @@ case "${target}" in
|
|||||||
i[3456789]86-*-coff | i[3456789]86-*-elf)
|
i[3456789]86-*-coff | i[3456789]86-*-elf)
|
||||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||||
;;
|
;;
|
||||||
i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
|
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
|
||||||
;;
|
|
||||||
i[3456789]86-*-linux*)
|
i[3456789]86-*-linux*)
|
||||||
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
|
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
|
||||||
# not build java stuff by default.
|
# not build java stuff by default.
|
||||||
@ -1855,7 +1901,7 @@ fi
|
|||||||
# Extract the first word of "gcc", so it can be a program name with args.
|
# Extract the first word of "gcc", so it can be a program name with args.
|
||||||
set dummy gcc; ac_word=$2
|
set dummy gcc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1859: checking for $ac_word" >&5
|
echo "configure:1905: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1885,7 +1931,7 @@ if test -z "$CC"; then
|
|||||||
# Extract the first word of "cc", so it can be a program name with args.
|
# Extract the first word of "cc", so it can be a program name with args.
|
||||||
set dummy cc; ac_word=$2
|
set dummy cc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1889: checking for $ac_word" >&5
|
echo "configure:1935: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1936,7 +1982,7 @@ fi
|
|||||||
# Extract the first word of "cl", so it can be a program name with args.
|
# Extract the first word of "cl", so it can be a program name with args.
|
||||||
set dummy cl; ac_word=$2
|
set dummy cl; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1940: checking for $ac_word" >&5
|
echo "configure:1986: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1968,7 +2014,7 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||||
echo "configure:1972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
echo "configure:2018: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
@ -1979,12 +2025,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
|||||||
|
|
||||||
cat > conftest.$ac_ext << EOF
|
cat > conftest.$ac_ext << EOF
|
||||||
|
|
||||||
#line 1983 "configure"
|
#line 2029 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
main(){return(0);}
|
main(){return(0);}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
ac_cv_prog_cc_works=yes
|
ac_cv_prog_cc_works=yes
|
||||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||||
if (./conftest; exit) 2>/dev/null; then
|
if (./conftest; exit) 2>/dev/null; then
|
||||||
@ -2010,12 +2056,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||||
echo "configure:2014: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
echo "configure:2060: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||||
cross_compiling=$ac_cv_prog_cc_cross
|
cross_compiling=$ac_cv_prog_cc_cross
|
||||||
|
|
||||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||||
echo "configure:2019: checking whether we are using GNU C" >&5
|
echo "configure:2065: checking whether we are using GNU C" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2024,7 +2070,7 @@ else
|
|||||||
yes;
|
yes;
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||||
ac_cv_prog_gcc=yes
|
ac_cv_prog_gcc=yes
|
||||||
else
|
else
|
||||||
ac_cv_prog_gcc=no
|
ac_cv_prog_gcc=no
|
||||||
@ -2043,7 +2089,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
|
|||||||
ac_save_CFLAGS="$CFLAGS"
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS=
|
CFLAGS=
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||||
echo "configure:2047: checking whether ${CC-cc} accepts -g" >&5
|
echo "configure:2093: checking whether ${CC-cc} accepts -g" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2079,7 +2125,7 @@ fi
|
|||||||
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
|
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
|
||||||
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
|
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2083: checking for $ac_word" >&5
|
echo "configure:2129: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2111,7 +2157,7 @@ if test -n "$ac_tool_prefix"; then
|
|||||||
# Extract the first word of "gnatbind", so it can be a program name with args.
|
# Extract the first word of "gnatbind", so it can be a program name with args.
|
||||||
set dummy gnatbind; ac_word=$2
|
set dummy gnatbind; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2115: checking for $ac_word" >&5
|
echo "configure:2161: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2144,7 +2190,7 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
|
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
|
||||||
echo "configure:2148: checking whether compiler driver understands Ada" >&5
|
echo "configure:2194: checking whether compiler driver understands Ada" >&5
|
||||||
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2177,7 +2223,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
|
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
|
||||||
echo "configure:2181: checking how to compare bootstrapped objects" >&5
|
echo "configure:2227: checking how to compare bootstrapped objects" >&5
|
||||||
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2207,6 +2253,104 @@ do_compare="$gcc_cv_prog_cmp_skip"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check for GMP
|
||||||
|
gmplibs=
|
||||||
|
gmpinc=
|
||||||
|
have_gmp=yes
|
||||||
|
# Specify a location for gmp
|
||||||
|
# Check whether --with-gmp-dir or --without-gmp-dir was given.
|
||||||
|
if test "${with_gmp_dir+set}" = set; then
|
||||||
|
withval="$with_gmp_dir"
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "x$with_gmp_dir" != x && test -f "$with_gmp_dir/gmp.h"; then
|
||||||
|
gmpinc="-I$with_gmp_dir"
|
||||||
|
if test -f "$with_gmp_dir/.libs/libgmp.a"; then
|
||||||
|
gmplibs="$with_gmp_dir/.libs/libgmp.a"
|
||||||
|
elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
|
||||||
|
gmplibs="$with_gmp_dir/_libs/libgmp.a"
|
||||||
|
fi
|
||||||
|
# One of the later tests will catch the error if neither library is present.
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check whether --with-gmp or --without-gmp was given.
|
||||||
|
if test "${with_gmp+set}" = set; then
|
||||||
|
withval="$with_gmp"
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "x$with_gmp" != x && test -d "$with_gmp"; then
|
||||||
|
gmplibs="-L$with_gmp/lib -lgmp"
|
||||||
|
gmpinc="-I$with_gmp/include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use system gmp if nothing else specified
|
||||||
|
if test "x$gmplibs" = x; then
|
||||||
|
gmplibs="-lgmp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $gmpinc"
|
||||||
|
# Check GMP actually works
|
||||||
|
echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
|
||||||
|
echo "configure:2300: checking for correct version of gmp.h" >&5
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 2302 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include "gmp.h"
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
#if __GNU_MP_VERSION < 3
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:2313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
|
rm -rf conftest*
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
echo "$ac_t""no" 1>&6; have_gmp=no
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
|
||||||
|
if test x"$have_gmp" = xyes; then
|
||||||
|
echo $ac_n "checking for mpf_init in -lgmp""... $ac_c" 1>&6
|
||||||
|
echo "configure:2326: checking for mpf_init in -lgmp" >&5
|
||||||
|
|
||||||
|
saved_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $gmplibs"
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 2331 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <gmp.h>
|
||||||
|
int main() {
|
||||||
|
mpf_t n; mpf_init(n);
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
|
rm -rf conftest*
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
echo "$ac_t""no" 1>&6; have_gmp=no
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
LIBS="$saved_LIBS"
|
||||||
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# By default, C is the only stage 1 language.
|
# By default, C is the only stage 1 language.
|
||||||
stage1_languages=c
|
stage1_languages=c
|
||||||
|
|
||||||
@ -2279,6 +2423,7 @@ if test -d ${srcdir}/gcc; then
|
|||||||
lang_dirs=
|
lang_dirs=
|
||||||
boot_language=
|
boot_language=
|
||||||
build_by_default=
|
build_by_default=
|
||||||
|
need_gmp=
|
||||||
. ${lang_frag}
|
. ${lang_frag}
|
||||||
# This is quite sensitive to the ordering of the case statement arms.
|
# This is quite sensitive to the ordering of the case statement arms.
|
||||||
case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
|
case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
|
||||||
@ -2307,7 +2452,13 @@ if test -d ${srcdir}/gcc; then
|
|||||||
add_this_lang=no
|
add_this_lang=no
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case $add_this_lang in
|
|
||||||
|
# Disable language that need GMP if it isn't available.
|
||||||
|
if test x"$need_gmp" = xyes && test x"$have_gmp" = xno; then
|
||||||
|
add_this_lang=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $add_this_lang in
|
||||||
no)
|
no)
|
||||||
# Remove language-dependent dirs.
|
# Remove language-dependent dirs.
|
||||||
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
|
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
|
||||||
@ -2608,6 +2759,9 @@ if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-
|
|||||||
extra_host_args="$extra_host_args --with-newlib"
|
extra_host_args="$extra_host_args --with-newlib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x${with_libbanshee} = xyes && echo " ${configdirs} " | grep " libbanshee " >/dev/null 2>&1; then
|
||||||
|
extra_host_args="$extra_host_args --with-libbanshee"
|
||||||
|
fi
|
||||||
|
|
||||||
# Default to using --with-stabs for certain targets.
|
# Default to using --with-stabs for certain targets.
|
||||||
if test x${with_stabs} = x ; then
|
if test x${with_stabs} = x ; then
|
||||||
@ -2642,7 +2796,7 @@ do
|
|||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2646: checking for $ac_word" >&5
|
echo "configure:2800: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_YACC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_YACC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2677,7 +2831,7 @@ do
|
|||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2681: checking for $ac_word" >&5
|
echo "configure:2835: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_M4'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_M4'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2712,7 +2866,7 @@ do
|
|||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2716: checking for $ac_word" >&5
|
echo "configure:2870: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_LEX'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_LEX'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3175,6 +3329,20 @@ else
|
|||||||
fi
|
fi
|
||||||
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
||||||
|
|
||||||
|
if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
|
||||||
|
:
|
||||||
|
elif test -d ${srcdir}/gcc; then
|
||||||
|
GFORTRAN_FOR_TARGET='$$r/gcc/gfortran -B$$r/gcc/'
|
||||||
|
elif test "$host" = "$target"; then
|
||||||
|
GFORTRAN_FOR_TARGET='gfortran'
|
||||||
|
else
|
||||||
|
GFORTRAN_FOR_TARGET=`echo gfortran | sed -e 's/x/x/' ${program_transform_name}`
|
||||||
|
fi
|
||||||
|
case $GFORTRAN_FOR_TARGET in
|
||||||
|
*' $(FLAGS_FOR_TARGET)') ;;
|
||||||
|
*) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Don't use libstdc++-v3's flags to configure/build itself.
|
# Don't use libstdc++-v3's flags to configure/build itself.
|
||||||
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
||||||
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
||||||
@ -3216,6 +3384,7 @@ qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
|
|||||||
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
|
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
|
||||||
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
|
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
|
||||||
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
|
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
|
||||||
|
GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
|
||||||
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
|
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
|
||||||
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
|
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
|
||||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
|
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
|
||||||
@ -3275,7 +3444,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
|
|||||||
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}ar; ac_word=$2
|
set dummy ${ncn_tool_prefix}ar; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3279: checking for $ac_word" >&5
|
echo "configure:3448: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3308,7 +3477,7 @@ if test -z "$ac_cv_prog_AR" ; then
|
|||||||
# Extract the first word of "ar", so it can be a program name with args.
|
# Extract the first word of "ar", so it can be a program name with args.
|
||||||
set dummy ar; ac_word=$2
|
set dummy ar; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3312: checking for $ac_word" >&5
|
echo "configure:3481: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3347,7 +3516,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}as; ac_word=$2
|
set dummy ${ncn_tool_prefix}as; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3351: checking for $ac_word" >&5
|
echo "configure:3520: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3380,7 +3549,7 @@ if test -z "$ac_cv_prog_AS" ; then
|
|||||||
# Extract the first word of "as", so it can be a program name with args.
|
# Extract the first word of "as", so it can be a program name with args.
|
||||||
set dummy as; ac_word=$2
|
set dummy as; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3384: checking for $ac_word" >&5
|
echo "configure:3553: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3419,7 +3588,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
|
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3423: checking for $ac_word" >&5
|
echo "configure:3592: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3452,7 +3621,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
|
|||||||
# Extract the first word of "dlltool", so it can be a program name with args.
|
# Extract the first word of "dlltool", so it can be a program name with args.
|
||||||
set dummy dlltool; ac_word=$2
|
set dummy dlltool; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3456: checking for $ac_word" >&5
|
echo "configure:3625: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3491,7 +3660,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}ld; ac_word=$2
|
set dummy ${ncn_tool_prefix}ld; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3495: checking for $ac_word" >&5
|
echo "configure:3664: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3524,7 +3693,7 @@ if test -z "$ac_cv_prog_LD" ; then
|
|||||||
# Extract the first word of "ld", so it can be a program name with args.
|
# Extract the first word of "ld", so it can be a program name with args.
|
||||||
set dummy ld; ac_word=$2
|
set dummy ld; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3528: checking for $ac_word" >&5
|
echo "configure:3697: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3563,7 +3732,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}nm; ac_word=$2
|
set dummy ${ncn_tool_prefix}nm; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3567: checking for $ac_word" >&5
|
echo "configure:3736: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3596,7 +3765,7 @@ if test -z "$ac_cv_prog_NM" ; then
|
|||||||
# Extract the first word of "nm", so it can be a program name with args.
|
# Extract the first word of "nm", so it can be a program name with args.
|
||||||
set dummy nm; ac_word=$2
|
set dummy nm; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3600: checking for $ac_word" >&5
|
echo "configure:3769: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3635,7 +3804,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
|
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3639: checking for $ac_word" >&5
|
echo "configure:3808: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3668,7 +3837,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
|
|||||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||||
set dummy ranlib; ac_word=$2
|
set dummy ranlib; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3672: checking for $ac_word" >&5
|
echo "configure:3841: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3707,7 +3876,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}windres; ac_word=$2
|
set dummy ${ncn_tool_prefix}windres; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3711: checking for $ac_word" >&5
|
echo "configure:3880: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3740,7 +3909,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
|
|||||||
# Extract the first word of "windres", so it can be a program name with args.
|
# Extract the first word of "windres", so it can be a program name with args.
|
||||||
set dummy windres; ac_word=$2
|
set dummy windres; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3744: checking for $ac_word" >&5
|
echo "configure:3913: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3779,7 +3948,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
|
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3783: checking for $ac_word" >&5
|
echo "configure:3952: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3812,7 +3981,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
|
|||||||
# Extract the first word of "objcopy", so it can be a program name with args.
|
# Extract the first word of "objcopy", so it can be a program name with args.
|
||||||
set dummy objcopy; ac_word=$2
|
set dummy objcopy; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3816: checking for $ac_word" >&5
|
echo "configure:3985: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3851,7 +4020,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
|
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
|
||||||
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
|
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3855: checking for $ac_word" >&5
|
echo "configure:4024: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3884,7 +4053,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
|
|||||||
# Extract the first word of "objdump", so it can be a program name with args.
|
# Extract the first word of "objdump", so it can be a program name with args.
|
||||||
set dummy objdump; ac_word=$2
|
set dummy objdump; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3888: checking for $ac_word" >&5
|
echo "configure:4057: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3933,7 +4102,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3937: checking for $ac_word" >&5
|
echo "configure:4106: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -3966,7 +4135,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "ar", so it can be a program name with args.
|
# Extract the first word of "ar", so it can be a program name with args.
|
||||||
set dummy ar; ac_word=$2
|
set dummy ar; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3970: checking for $ac_word" >&5
|
echo "configure:4139: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4005,7 +4174,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4009: checking for $ac_word" >&5
|
echo "configure:4178: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4038,7 +4207,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "as", so it can be a program name with args.
|
# Extract the first word of "as", so it can be a program name with args.
|
||||||
set dummy as; ac_word=$2
|
set dummy as; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4042: checking for $ac_word" >&5
|
echo "configure:4211: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4077,7 +4246,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4081: checking for $ac_word" >&5
|
echo "configure:4250: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4110,7 +4279,7 @@ if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "dlltool", so it can be a program name with args.
|
# Extract the first word of "dlltool", so it can be a program name with args.
|
||||||
set dummy dlltool; ac_word=$2
|
set dummy dlltool; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4114: checking for $ac_word" >&5
|
echo "configure:4283: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4149,7 +4318,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4153: checking for $ac_word" >&5
|
echo "configure:4322: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4182,7 +4351,7 @@ if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "ld", so it can be a program name with args.
|
# Extract the first word of "ld", so it can be a program name with args.
|
||||||
set dummy ld; ac_word=$2
|
set dummy ld; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4186: checking for $ac_word" >&5
|
echo "configure:4355: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4221,7 +4390,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4225: checking for $ac_word" >&5
|
echo "configure:4394: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4254,7 +4423,7 @@ if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "nm", so it can be a program name with args.
|
# Extract the first word of "nm", so it can be a program name with args.
|
||||||
set dummy nm; ac_word=$2
|
set dummy nm; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4258: checking for $ac_word" >&5
|
echo "configure:4427: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4293,7 +4462,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4297: checking for $ac_word" >&5
|
echo "configure:4466: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4326,7 +4495,7 @@ if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||||
set dummy ranlib; ac_word=$2
|
set dummy ranlib; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4330: checking for $ac_word" >&5
|
echo "configure:4499: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4365,7 +4534,7 @@ fi
|
|||||||
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
|
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
|
||||||
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
|
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4369: checking for $ac_word" >&5
|
echo "configure:4538: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4398,7 +4567,7 @@ if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
|
|||||||
# Extract the first word of "windres", so it can be a program name with args.
|
# Extract the first word of "windres", so it can be a program name with args.
|
||||||
set dummy windres; ac_word=$2
|
set dummy windres; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:4402: checking for $ac_word" >&5
|
echo "configure:4571: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -4443,6 +4612,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Fix up target tools.
|
# Fix up target tools.
|
||||||
if test "x${build}" = "x${host}" ; then
|
if test "x${build}" = "x${host}" ; then
|
||||||
# In this case, the newly built tools can and should be used,
|
# In this case, the newly built tools can and should be used,
|
||||||
@ -4482,7 +4652,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
|
|||||||
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
|
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
|
||||||
|
|
||||||
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
|
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
|
||||||
echo "configure:4486: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
echo "configure:4656: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||||
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
|
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
|
||||||
if test "${enable_maintainer_mode+set}" = set; then
|
if test "${enable_maintainer_mode+set}" = set; then
|
||||||
enableval="$enable_maintainer_mode"
|
enableval="$enable_maintainer_mode"
|
||||||
@ -4607,15 +4777,34 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
|||||||
# Transform confdefs.h into DEFS.
|
# Transform confdefs.h into DEFS.
|
||||||
# Protect against shell expansion while executing Makefile rules.
|
# Protect against shell expansion while executing Makefile rules.
|
||||||
# Protect against Makefile macro expansion.
|
# Protect against Makefile macro expansion.
|
||||||
cat > conftest.defs <<\EOF
|
#
|
||||||
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
|
# If the first sed substitution is executed (which looks for macros that
|
||||||
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
|
# take arguments), then we branch to the quote section. Otherwise,
|
||||||
s%\[%\\&%g
|
# look for a macro that doesn't take arguments.
|
||||||
s%\]%\\&%g
|
cat >confdef2opt.sed <<\_ACEOF
|
||||||
s%\$%$$%g
|
t clear
|
||||||
EOF
|
: clear
|
||||||
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
|
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
|
||||||
rm -f conftest.defs
|
t quote
|
||||||
|
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
|
||||||
|
t quote
|
||||||
|
d
|
||||||
|
: quote
|
||||||
|
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
|
||||||
|
s,\[,\\&,g
|
||||||
|
s,\],\\&,g
|
||||||
|
s,\$,$$,g
|
||||||
|
p
|
||||||
|
_ACEOF
|
||||||
|
# We use echo to avoid assuming a particular line-breaking character.
|
||||||
|
# The extra dot is to prevent the shell from consuming trailing
|
||||||
|
# line-breaks from the sub-command output. A line-break within
|
||||||
|
# single-quotes doesn't work because, if this script is created in a
|
||||||
|
# platform that uses two characters for line-breaks (e.g., DOS), tr
|
||||||
|
# would break.
|
||||||
|
ac_LF_and_DOT=`echo; echo .`
|
||||||
|
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
|
||||||
|
rm -f confdef2opt.sed
|
||||||
|
|
||||||
|
|
||||||
# Without the "./", some shells look in PATH for config.status.
|
# Without the "./", some shells look in PATH for config.status.
|
||||||
@ -4711,6 +4900,8 @@ s%@target_subdir@%$target_subdir%g
|
|||||||
s%@CC@%$CC%g
|
s%@CC@%$CC%g
|
||||||
s%@GNATBIND@%$GNATBIND%g
|
s%@GNATBIND@%$GNATBIND%g
|
||||||
s%@do_compare@%$do_compare%g
|
s%@do_compare@%$do_compare%g
|
||||||
|
s%@gmplibs@%$gmplibs%g
|
||||||
|
s%@gmpinc@%$gmpinc%g
|
||||||
s%@stage1_languages@%$stage1_languages%g
|
s%@stage1_languages@%$stage1_languages%g
|
||||||
s%@DEFAULT_YACC@%$DEFAULT_YACC%g
|
s%@DEFAULT_YACC@%$DEFAULT_YACC%g
|
||||||
s%@DEFAULT_M4@%$DEFAULT_M4%g
|
s%@DEFAULT_M4@%$DEFAULT_M4%g
|
||||||
@ -4789,6 +4980,7 @@ s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
|
|||||||
s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
|
s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
|
||||||
s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
|
s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
|
||||||
s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
|
s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
|
||||||
|
s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
|
||||||
s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
|
s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
|
||||||
s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
|
s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
|
||||||
s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
|
s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
|
||||||
|
132
configure.in
132
configure.in
@ -126,7 +126,7 @@ fi
|
|||||||
|
|
||||||
# these libraries are used by various programs built for the host environment
|
# these libraries are used by various programs built for the host environment
|
||||||
#
|
#
|
||||||
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
|
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee"
|
||||||
|
|
||||||
# these tools are built for the host environment
|
# these tools are built for the host environment
|
||||||
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
||||||
@ -149,7 +149,9 @@ target_libraries="target-libiberty \
|
|||||||
target-libgloss \
|
target-libgloss \
|
||||||
target-newlib \
|
target-newlib \
|
||||||
target-libstdc++-v3 \
|
target-libstdc++-v3 \
|
||||||
|
target-libmudflap \
|
||||||
target-libf2c \
|
target-libf2c \
|
||||||
|
target-libgfortran \
|
||||||
${libgcj} \
|
${libgcj} \
|
||||||
target-libobjc \
|
target-libobjc \
|
||||||
target-libada"
|
target-libada"
|
||||||
@ -307,6 +309,18 @@ case "${host}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
AC_ARG_WITH(libbanshee,
|
||||||
|
[ --without-libbanshee Don't build with libbanshee])
|
||||||
|
case ${with_libbanshee} in
|
||||||
|
no)
|
||||||
|
noconfigdirs="$noconfigdirs libbanshee" ;;
|
||||||
|
yes|"")
|
||||||
|
with_libbanshee=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([--with-libbanshee can only be empty, "yes" or "no" (empty defaults to "yes".])
|
||||||
|
esac
|
||||||
|
|
||||||
AC_ARG_ENABLE(libada,
|
AC_ARG_ENABLE(libada,
|
||||||
[ --enable-libada Builds libada directory],
|
[ --enable-libada Builds libada directory],
|
||||||
ENABLE_LIBADA=$enableval,
|
ENABLE_LIBADA=$enableval,
|
||||||
@ -331,6 +345,18 @@ no)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# Allow --disable-libmudflap to exclude target-libmudflap
|
||||||
|
case $enable_libmudflap in
|
||||||
|
yes | "")
|
||||||
|
# By default it's enabled
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
noconfigdirs="$noconfigdirs target-libmudflap"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
case "${target}" in
|
case "${target}" in
|
||||||
*-*-chorusos)
|
*-*-chorusos)
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
||||||
@ -346,6 +372,22 @@ case "${target}" in
|
|||||||
*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
|
*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
||||||
;;
|
;;
|
||||||
|
*-*-freebsd* | *-*-kfreebsd*-gnu)
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
|
if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
|
||||||
|
&& test -f /usr/local/include/gmp.h; then
|
||||||
|
with_gmp=/usr/local
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Skip some stuff that's unsupported on some FreeBSD configurations.
|
||||||
|
case "${target}" in
|
||||||
|
i*86-*-*) ;;
|
||||||
|
alpha*-*-*) ;;
|
||||||
|
*)
|
||||||
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
*-*-kaos*)
|
*-*-kaos*)
|
||||||
# Remove unsupported stuff on all kaOS configurations.
|
# Remove unsupported stuff on all kaOS configurations.
|
||||||
skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
|
skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
|
||||||
@ -397,9 +439,6 @@ case "${target}" in
|
|||||||
# newlib is not 64 bit ready
|
# newlib is not 64 bit ready
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
;;
|
;;
|
||||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
|
||||||
;;
|
|
||||||
alpha*-*-*)
|
alpha*-*-*)
|
||||||
# newlib is not 64 bit ready
|
# newlib is not 64 bit ready
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
|
||||||
@ -518,9 +557,6 @@ case "${target}" in
|
|||||||
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
|
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
|
||||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||||
;;
|
;;
|
||||||
i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
|
|
||||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
|
||||||
;;
|
|
||||||
i[[3456789]]86-*-linux*)
|
i[[3456789]]86-*-linux*)
|
||||||
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
|
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
|
||||||
# not build java stuff by default.
|
# not build java stuff by default.
|
||||||
@ -1070,6 +1106,60 @@ fi
|
|||||||
ACX_PROG_GNAT
|
ACX_PROG_GNAT
|
||||||
ACX_PROG_CMP_IGNORE_INITIAL
|
ACX_PROG_CMP_IGNORE_INITIAL
|
||||||
|
|
||||||
|
# Check for GMP
|
||||||
|
gmplibs=
|
||||||
|
gmpinc=
|
||||||
|
have_gmp=yes
|
||||||
|
# Specify a location for gmp
|
||||||
|
AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify source directory for GMP library])
|
||||||
|
|
||||||
|
if test "x$with_gmp_dir" != x && test -f "$with_gmp_dir/gmp.h"; then
|
||||||
|
gmpinc="-I$with_gmp_dir"
|
||||||
|
if test -f "$with_gmp_dir/.libs/libgmp.a"; then
|
||||||
|
gmplibs="$with_gmp_dir/.libs/libgmp.a"
|
||||||
|
elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
|
||||||
|
gmplibs="$with_gmp_dir/_libs/libgmp.a"
|
||||||
|
fi
|
||||||
|
# One of the later tests will catch the error if neither library is present.
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify directory for installed GMP library])
|
||||||
|
|
||||||
|
if test "x$with_gmp" != x && test -d "$with_gmp"; then
|
||||||
|
gmplibs="-L$with_gmp/lib -lgmp"
|
||||||
|
gmpinc="-I$with_gmp/include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use system gmp if nothing else specified
|
||||||
|
if test "x$gmplibs" = x; then
|
||||||
|
gmplibs="-lgmp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $gmpinc"
|
||||||
|
# Check GMP actually works
|
||||||
|
AC_MSG_CHECKING([for correct version of gmp.h])
|
||||||
|
AC_TRY_COMPILE([#include "gmp.h"],[
|
||||||
|
#if __GNU_MP_VERSION < 3
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
], [AC_MSG_RESULT([yes])],
|
||||||
|
[AC_MSG_RESULT([no]); have_gmp=no])
|
||||||
|
|
||||||
|
if test x"$have_gmp" = xyes; then
|
||||||
|
AC_MSG_CHECKING([for mpf_init in -lgmp])
|
||||||
|
|
||||||
|
saved_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $gmplibs"
|
||||||
|
AC_TRY_LINK([#include <gmp.h>], [mpf_t n; mpf_init(n);],
|
||||||
|
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
|
||||||
|
LIBS="$saved_LIBS"
|
||||||
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(gmplibs)
|
||||||
|
AC_SUBST(gmpinc)
|
||||||
|
|
||||||
# By default, C is the only stage 1 language.
|
# By default, C is the only stage 1 language.
|
||||||
stage1_languages=c
|
stage1_languages=c
|
||||||
AC_SUBST(stage1_languages)
|
AC_SUBST(stage1_languages)
|
||||||
@ -1142,6 +1232,7 @@ if test -d ${srcdir}/gcc; then
|
|||||||
lang_dirs=
|
lang_dirs=
|
||||||
boot_language=
|
boot_language=
|
||||||
build_by_default=
|
build_by_default=
|
||||||
|
need_gmp=
|
||||||
. ${lang_frag}
|
. ${lang_frag}
|
||||||
# This is quite sensitive to the ordering of the case statement arms.
|
# This is quite sensitive to the ordering of the case statement arms.
|
||||||
case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
|
case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
|
||||||
@ -1170,7 +1261,13 @@ if test -d ${srcdir}/gcc; then
|
|||||||
add_this_lang=no
|
add_this_lang=no
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case $add_this_lang in
|
|
||||||
|
# Disable language that need GMP if it isn't available.
|
||||||
|
if test x"$need_gmp" = xyes && test x"$have_gmp" = xno; then
|
||||||
|
add_this_lang=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $add_this_lang in
|
||||||
no)
|
no)
|
||||||
# Remove language-dependent dirs.
|
# Remove language-dependent dirs.
|
||||||
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
|
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
|
||||||
@ -1471,6 +1568,9 @@ if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-
|
|||||||
extra_host_args="$extra_host_args --with-newlib"
|
extra_host_args="$extra_host_args --with-newlib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x${with_libbanshee} = xyes && echo " ${configdirs} " | grep " libbanshee " >/dev/null 2>&1; then
|
||||||
|
extra_host_args="$extra_host_args --with-libbanshee"
|
||||||
|
fi
|
||||||
|
|
||||||
# Default to using --with-stabs for certain targets.
|
# Default to using --with-stabs for certain targets.
|
||||||
if test x${with_stabs} = x ; then
|
if test x${with_stabs} = x ; then
|
||||||
@ -1935,6 +2035,20 @@ else
|
|||||||
fi
|
fi
|
||||||
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
||||||
|
|
||||||
|
if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
|
||||||
|
:
|
||||||
|
elif test -d ${srcdir}/gcc; then
|
||||||
|
GFORTRAN_FOR_TARGET='$$r/gcc/gfortran -B$$r/gcc/'
|
||||||
|
elif test "$host" = "$target"; then
|
||||||
|
GFORTRAN_FOR_TARGET='gfortran'
|
||||||
|
else
|
||||||
|
GFORTRAN_FOR_TARGET=`echo gfortran | sed -e 's/x/x/' ${program_transform_name}`
|
||||||
|
fi
|
||||||
|
case $GFORTRAN_FOR_TARGET in
|
||||||
|
*' $(FLAGS_FOR_TARGET)') ;;
|
||||||
|
*) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Don't use libstdc++-v3's flags to configure/build itself.
|
# Don't use libstdc++-v3's flags to configure/build itself.
|
||||||
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
||||||
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
||||||
@ -1976,6 +2090,7 @@ qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'
|
|||||||
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
|
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
|
||||||
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
|
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
|
||||||
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
|
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
|
||||||
|
GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
|
||||||
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
|
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
|
||||||
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
|
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
|
||||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
|
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
|
||||||
@ -2057,6 +2172,7 @@ AC_SUBST(GCC_FOR_TARGET)
|
|||||||
AC_SUBST(FLAGS_FOR_TARGET)
|
AC_SUBST(FLAGS_FOR_TARGET)
|
||||||
AC_SUBST(CC_FOR_TARGET)
|
AC_SUBST(CC_FOR_TARGET)
|
||||||
AC_SUBST(GCJ_FOR_TARGET)
|
AC_SUBST(GCJ_FOR_TARGET)
|
||||||
|
AC_SUBST(GFORTRAN_FOR_TARGET)
|
||||||
AC_SUBST(CXX_FOR_TARGET)
|
AC_SUBST(CXX_FOR_TARGET)
|
||||||
AC_SUBST(RAW_CXX_FOR_TARGET)
|
AC_SUBST(RAW_CXX_FOR_TARGET)
|
||||||
AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
|
AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2004-05-13 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
Merge from tree-ssa-20020619-branch.
|
||||||
|
|
||||||
|
* filter_gcc_for_doxygen: New file.
|
||||||
|
* filter_knr2ansi.pl: New file.
|
||||||
|
* filter_params.pl: New file.
|
||||||
|
* tree-ssa.doxy: New file.
|
||||||
|
* contrib/gcc_update (files_and_dependencies): Handle
|
||||||
|
libbanshee and libmudflap.
|
||||||
|
|
||||||
2004-04-12 Kelley Cook <kcook@gcc.gnu.org>
|
2004-04-12 Kelley Cook <kcook@gcc.gnu.org>
|
||||||
Andreas Jaeger <aj@suse.de>
|
Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
46
contrib/ChangeLog.tree-ssa
Normal file
46
contrib/ChangeLog.tree-ssa
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
2004-03-25 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* gcc_update (files_and_dependencies): Add libbanshee and
|
||||||
|
libmudflap dependencies.
|
||||||
|
|
||||||
|
2003-11-27 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* tree-ssa.doxy (FILE_PATTERNS): Update.
|
||||||
|
|
||||||
|
2003-11-21 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* tree-ssa.doxy: Do not generate latex output.
|
||||||
|
|
||||||
|
2003-07-21 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* tree-ssa.doxy: Include tree* files
|
||||||
|
|
||||||
|
2003-07-15 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* tree-ssa.doxy: Add tree-must-alias.c.
|
||||||
|
|
||||||
|
2003-01-28 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* filter_params.pl: Surround comments in @verbatim/@endverbatim.
|
||||||
|
|
||||||
|
2003-01-19 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* tree-ssa.doxy (OUTPUT_DIRECTORY, INPUT_FILTER): Replace
|
||||||
|
hardwired values for with replaceable strings.
|
||||||
|
|
||||||
|
2003-01-18 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* filter_params.pl: Change most comments to start with /**.
|
||||||
|
|
||||||
|
2002-12-23 Steven Bosscher <Steven.Bosscher@usafa.af.mil>
|
||||||
|
|
||||||
|
* filter_params.pl: Filter ATTRIBUTE_UNUSED.
|
||||||
|
|
||||||
|
2002-12-12 Daniel Berlin <dberlin@dberlin.org>
|
||||||
|
Steven Bosscher <Steven.Bosscher@usafa.af.mil>
|
||||||
|
Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* filter_gcc_for_doxygen: New file.
|
||||||
|
* filter_knr2ansi.pl: New file.
|
||||||
|
* filter_params.pl: New file.
|
||||||
|
* tree-ssa.doxy: New file.
|
12
contrib/filter_gcc_for_doxygen
Executable file
12
contrib/filter_gcc_for_doxygen
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This filters GCC source before Doxygen can get confused by it;
|
||||||
|
# this script is listed in the doxyfile. The output is not very
|
||||||
|
# pretty, but at least we get output that Doxygen can understand.
|
||||||
|
#
|
||||||
|
# $1 is a source file of some kind. The source we wish doxygen to
|
||||||
|
# process is put on stdout.
|
||||||
|
|
||||||
|
dir=`dirname $0`
|
||||||
|
perl $dir/filter_params.pl < $1 | perl $dir/filter_knr2ansi.pl
|
||||||
|
exit 0
|
45
contrib/filter_knr2ansi.pl
Executable file
45
contrib/filter_knr2ansi.pl
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Goes thourgh the input line by line to find K&R style function
|
||||||
|
# declarations, and replaces them with ANSI style declarations.
|
||||||
|
#
|
||||||
|
@blah = <>;
|
||||||
|
|
||||||
|
for ($i = 0; $i < @blah; $i++)
|
||||||
|
{
|
||||||
|
if ($blah[$i] =~ /^([a-zA-Z_0-9]+)\s*\([^)]+\)\s*$/)
|
||||||
|
{
|
||||||
|
$name = $1;
|
||||||
|
$funci = $i;
|
||||||
|
$blah[$funci]="$name (";
|
||||||
|
$i++;
|
||||||
|
$lastline = $i;
|
||||||
|
while ($lastline < @blah && $blah[$lastline] !~ /^{/)
|
||||||
|
{
|
||||||
|
$lastline++;
|
||||||
|
}
|
||||||
|
$lastline--;
|
||||||
|
while ($i < @blah && $blah[$i] !~ /^{/)
|
||||||
|
{
|
||||||
|
$arg = $blah[$i];
|
||||||
|
if ($i != $lastline)
|
||||||
|
{
|
||||||
|
$arg =~ s/;/,/g;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$arg =~ s/;//g;
|
||||||
|
}
|
||||||
|
$blah[$i] = "";
|
||||||
|
$blah[$funci] = "$blah[$funci]" . "$arg";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$blah[$funci] = "$blah[$funci]" . ")\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for ($i = 0; $i < @blah; $i++)
|
||||||
|
{
|
||||||
|
print $blah[$i];
|
||||||
|
}
|
||||||
|
|
14
contrib/filter_params.pl
Executable file
14
contrib/filter_params.pl
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# Filters out some of the #defines used thourghout the GCC sources:
|
||||||
|
# - GTY(()) marks declarations for gengtype.c
|
||||||
|
# - PARAMS(()) is used for K&R compatibility. See ansidecl.h.
|
||||||
|
|
||||||
|
while (<>) {
|
||||||
|
s/^\/\* /\/\*\* \@verbatim /;
|
||||||
|
s/\*\// \@endverbatim \*\//;
|
||||||
|
s/GTY[ \t]*\(\(.*\)\)//g;
|
||||||
|
s/[ \t]ATTRIBUTE_UNUSED//g;
|
||||||
|
s/PARAMS[ \t]*\(\((.*?)\)\)/\($1\)/sg;
|
||||||
|
print;
|
||||||
|
}
|
@ -80,6 +80,8 @@ libf2c/libI77/stamp-h.in: libf2c/libI77/configure.in
|
|||||||
libf2c/libI77/config.h.in: libf2c/libI77/configure.in libf2c/libI77/stamp-h.in
|
libf2c/libI77/config.h.in: libf2c/libI77/configure.in libf2c/libI77/stamp-h.in
|
||||||
libf2c/libU77/configure: libf2c/libU77/configure.in
|
libf2c/libU77/configure: libf2c/libU77/configure.in
|
||||||
libf2c/libU77/stamp-h.in: libf2c/libU77/configure.in libf2c/libU77/acconfig.h
|
libf2c/libU77/stamp-h.in: libf2c/libU77/configure.in libf2c/libU77/acconfig.h
|
||||||
|
libbanshee/configure: libbanshee/configure.in
|
||||||
|
libmudflap/configure: libmudflap/configure.in
|
||||||
libobjc/configure: libobjc/configure.ac
|
libobjc/configure: libobjc/configure.ac
|
||||||
zlib/aclocal.m4: zlib/configure.ac zlib/acinclude.m4
|
zlib/aclocal.m4: zlib/configure.ac zlib/acinclude.m4
|
||||||
zlib/Makefile.in: zlib/Makefile.am zlib/configure.ac zlib/aclocal.m4
|
zlib/Makefile.in: zlib/Makefile.am zlib/configure.ac zlib/aclocal.m4
|
||||||
|
932
contrib/tree-ssa.doxy
Normal file
932
contrib/tree-ssa.doxy
Normal file
@ -0,0 +1,932 @@
|
|||||||
|
# Doxyfile 1.2.18
|
||||||
|
|
||||||
|
# This file describes the settings to be used by the documentation system
|
||||||
|
# doxygen (www.doxygen.org) for a project
|
||||||
|
#
|
||||||
|
# All text after a hash (#) is considered a comment and will be ignored
|
||||||
|
# The format is:
|
||||||
|
# TAG = value [value, ...]
|
||||||
|
# For lists items can also be appended using:
|
||||||
|
# TAG += value [value, ...]
|
||||||
|
# Values that contain spaces should be placed between quotes (" ")
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# NOTE: YOU MUST EDIT THE FOLLOWING HARDWIRED PATHS BEFORE USING THIS FILE.
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
|
# base path where the generated documentation will be put.
|
||||||
|
# If a relative path is entered, it will be relative to the location
|
||||||
|
# where doxygen was started. If left blank the current directory will be used.
|
||||||
|
|
||||||
|
OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@
|
||||||
|
|
||||||
|
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||||
|
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||||
|
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||||
|
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||||
|
# input file. Doxygen will then use the output that the filter program writes
|
||||||
|
# to standard output.
|
||||||
|
|
||||||
|
INPUT_FILTER = @INPUT_FILTER@
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# General configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||||
|
# by quotes) that should identify the project.
|
||||||
|
|
||||||
|
PROJECT_NAME = "Tree SSA"
|
||||||
|
|
||||||
|
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||||
|
# This could be handy for archiving the generated documentation or
|
||||||
|
# if some version control system is used.
|
||||||
|
|
||||||
|
PROJECT_NUMBER =
|
||||||
|
|
||||||
|
|
||||||
|
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||||
|
# documentation generated by doxygen is written. Doxygen will use this
|
||||||
|
# information to generate all constant output in the proper language.
|
||||||
|
# The default language is English, other supported languages are:
|
||||||
|
# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
|
||||||
|
# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
|
||||||
|
# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
|
||||||
|
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
|
||||||
|
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||||
|
# documentation are documented, even if no documentation was available.
|
||||||
|
# Private class members and static file members will be hidden unless
|
||||||
|
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||||
|
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
|
||||||
|
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||||
|
# will be included in the documentation.
|
||||||
|
|
||||||
|
EXTRACT_PRIVATE = YES
|
||||||
|
|
||||||
|
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||||
|
# will be included in the documentation.
|
||||||
|
|
||||||
|
EXTRACT_STATIC = YES
|
||||||
|
|
||||||
|
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||||
|
# defined locally in source files will be included in the documentation.
|
||||||
|
# If set to NO only classes defined in header files are included.
|
||||||
|
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
|
||||||
|
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||||
|
# undocumented members of documented classes, files or namespaces.
|
||||||
|
# If set to NO (the default) these members will be included in the
|
||||||
|
# various overviews, but no documentation section is generated.
|
||||||
|
# This option has no effect if EXTRACT_ALL is enabled.
|
||||||
|
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
|
||||||
|
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||||
|
# undocumented classes that are normally visible in the class hierarchy.
|
||||||
|
# If set to NO (the default) these class will be included in the various
|
||||||
|
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||||
|
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
|
||||||
|
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||||
|
# include brief member descriptions after the members that are listed in
|
||||||
|
# the file and class documentation (similar to JavaDoc).
|
||||||
|
# Set to NO to disable this.
|
||||||
|
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
|
||||||
|
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||||
|
# the brief description of a member or function before the detailed description.
|
||||||
|
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||||
|
# brief descriptions will be completely suppressed.
|
||||||
|
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
|
||||||
|
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||||
|
# Doxygen will generate a detailed section even if there is only a brief
|
||||||
|
# description.
|
||||||
|
|
||||||
|
ALWAYS_DETAILED_SEC = YES
|
||||||
|
|
||||||
|
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
|
||||||
|
# members of a class in the documentation of that class as if those members were
|
||||||
|
# ordinary class members. Constructors, destructors and assignment operators of
|
||||||
|
# the base classes will not be shown.
|
||||||
|
|
||||||
|
INLINE_INHERITED_MEMB = YES
|
||||||
|
|
||||||
|
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||||
|
# path before files name in the file list and in the header files. If set
|
||||||
|
# to NO the shortest path that makes the file name unique will be used.
|
||||||
|
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
|
||||||
|
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||||
|
# can be used to strip a user defined part of the path. Stripping is
|
||||||
|
# only done if one of the specified strings matches the left-hand part of
|
||||||
|
# the path. It is allowed to use relative paths in the argument list.
|
||||||
|
|
||||||
|
STRIP_FROM_PATH =
|
||||||
|
|
||||||
|
# The INTERNAL_DOCS tag determines if documentation
|
||||||
|
# that is typed after a \internal command is included. If the tag is set
|
||||||
|
# to NO (the default) then the documentation will be excluded.
|
||||||
|
# Set it to YES to include the internal documentation.
|
||||||
|
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
|
||||||
|
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||||
|
# doxygen to hide any special comment blocks from generated source code
|
||||||
|
# fragments. Normal C and C++ comments will always remain visible.
|
||||||
|
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
|
||||||
|
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||||
|
# file names in lower case letters. If set to YES upper case letters are also
|
||||||
|
# allowed. This is useful if you have classes or files whose names only differ
|
||||||
|
# in case and if your file system supports case sensitive file names. Windows
|
||||||
|
# users are adviced to set this option to NO.
|
||||||
|
|
||||||
|
CASE_SENSE_NAMES = YES
|
||||||
|
|
||||||
|
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||||
|
# (but less readable) file names. This can be useful is your file systems
|
||||||
|
# doesn't support long names like on DOS, Mac, or CD-ROM.
|
||||||
|
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
|
||||||
|
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||||
|
# will show members with their full class and namespace scopes in the
|
||||||
|
# documentation. If set to YES the scope will be hidden.
|
||||||
|
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
|
||||||
|
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||||
|
# will generate a verbatim copy of the header file for each class for
|
||||||
|
# which an include is specified. Set to NO to disable this.
|
||||||
|
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
|
||||||
|
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||||
|
# will put list of the files that are included by a file in the documentation
|
||||||
|
# of that file.
|
||||||
|
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
|
||||||
|
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||||
|
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||||
|
# comment as the brief description. If set to NO, the JavaDoc
|
||||||
|
# comments will behave just like the Qt-style comments (thus requiring an
|
||||||
|
# explict @brief command for a brief description.
|
||||||
|
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
|
||||||
|
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||||
|
# member inherits the documentation from any documented member that it
|
||||||
|
# reimplements.
|
||||||
|
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
|
||||||
|
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||||
|
# is inserted in the documentation for inline members.
|
||||||
|
|
||||||
|
INLINE_INFO = YES
|
||||||
|
|
||||||
|
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||||
|
# will sort the (detailed) documentation of file and class members
|
||||||
|
# alphabetically by member name. If set to NO the members will appear in
|
||||||
|
# declaration order.
|
||||||
|
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
|
||||||
|
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||||
|
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||||
|
# member in the group (if any) for the other members of the group. By default
|
||||||
|
# all members of a group must be documented explicitly.
|
||||||
|
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
|
||||||
|
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||||
|
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||||
|
|
||||||
|
TAB_SIZE = 8
|
||||||
|
|
||||||
|
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||||
|
# disable (NO) the todo list. This list is created by putting \todo
|
||||||
|
# commands in the documentation.
|
||||||
|
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
|
||||||
|
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||||
|
# disable (NO) the test list. This list is created by putting \test
|
||||||
|
# commands in the documentation.
|
||||||
|
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
|
||||||
|
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||||
|
# disable (NO) the bug list. This list is created by putting \bug
|
||||||
|
# commands in the documentation.
|
||||||
|
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
|
||||||
|
# This tag can be used to specify a number of aliases that acts
|
||||||
|
# as commands in the documentation. An alias has the form "name=value".
|
||||||
|
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||||
|
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||||
|
# will result in a user defined paragraph with heading "Side Effects:".
|
||||||
|
# You can put \n's in the value part of an alias to insert newlines.
|
||||||
|
|
||||||
|
ALIASES =
|
||||||
|
|
||||||
|
# The ENABLED_SECTIONS tag can be used to enable conditional
|
||||||
|
# documentation sections, marked by \if sectionname ... \endif.
|
||||||
|
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
|
||||||
|
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||||
|
# the initial value of a variable or define consist of for it to appear in
|
||||||
|
# the documentation. If the initializer consists of more lines than specified
|
||||||
|
# here it will be hidden. Use a value of 0 to hide initializers completely.
|
||||||
|
# The appearance of the initializer of individual variables and defines in the
|
||||||
|
# documentation can be controlled using \showinitializer or \hideinitializer
|
||||||
|
# command in the documentation regardless of this setting.
|
||||||
|
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
|
||||||
|
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||||
|
# only. Doxygen will then generate output that is more tailored for C.
|
||||||
|
# For instance some of the names that are used will be different. The list
|
||||||
|
# of all members will be omitted, etc.
|
||||||
|
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||||
|
|
||||||
|
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
|
||||||
|
# at the bottom of the documentation of classes and structs. If set to YES the
|
||||||
|
# list will mention the files that were used to generate the documentation.
|
||||||
|
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||||
|
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||||
|
|
||||||
|
QUIET = NO
|
||||||
|
|
||||||
|
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||||
|
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||||
|
# NO is used.
|
||||||
|
|
||||||
|
WARNINGS = YES
|
||||||
|
|
||||||
|
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||||
|
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||||
|
# automatically be disabled.
|
||||||
|
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
|
||||||
|
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||||
|
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||||
|
# tags, which will be replaced by the file and line number from which the
|
||||||
|
# warning originated and the warning text.
|
||||||
|
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
|
||||||
|
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||||
|
# and error messages should be written. If left blank the output is written
|
||||||
|
# to stderr.
|
||||||
|
|
||||||
|
WARN_LOGFILE =
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||||
|
# documented source files. You may enter file names like "myfile.cpp" or
|
||||||
|
# directories like "/usr/src/myproject". Separate the files or directories
|
||||||
|
# with spaces.
|
||||||
|
|
||||||
|
INPUT = .
|
||||||
|
|
||||||
|
# If the value of the INPUT tag contains directories, you can use the
|
||||||
|
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||||
|
# and *.h) to filter out the source-files in the directories. If left
|
||||||
|
# blank the following patterns are tested:
|
||||||
|
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
|
||||||
|
# *.h++ *.idl *.odl
|
||||||
|
|
||||||
|
FILE_PATTERNS = tree* *mudflap* c-simplify.c gimpl* domwalk*
|
||||||
|
|
||||||
|
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||||
|
# should be searched for input files as well. Possible values are YES and NO.
|
||||||
|
# If left blank NO is used.
|
||||||
|
|
||||||
|
RECURSIVE = NO
|
||||||
|
|
||||||
|
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||||
|
# excluded from the INPUT source files. This way you can easily exclude a
|
||||||
|
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||||
|
|
||||||
|
EXCLUDE =
|
||||||
|
|
||||||
|
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
|
||||||
|
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
|
||||||
|
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
|
||||||
|
# If the value of the INPUT tag contains directories, you can use the
|
||||||
|
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||||
|
# certain files from those directories.
|
||||||
|
|
||||||
|
EXCLUDE_PATTERNS =
|
||||||
|
|
||||||
|
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||||
|
# directories that contain example code fragments that are included (see
|
||||||
|
# the \include command).
|
||||||
|
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
|
||||||
|
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||||
|
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||||
|
# and *.h) to filter out the source-files in the directories. If left
|
||||||
|
# blank all files are included.
|
||||||
|
|
||||||
|
EXAMPLE_PATTERNS =
|
||||||
|
|
||||||
|
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||||
|
# searched for input files to be used with the \include or \dontinclude
|
||||||
|
# commands irrespective of the value of the RECURSIVE tag.
|
||||||
|
# Possible values are YES and NO. If left blank NO is used.
|
||||||
|
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
|
||||||
|
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||||
|
# directories that contain image that are included in the documentation (see
|
||||||
|
# the \image command).
|
||||||
|
|
||||||
|
IMAGE_PATH =
|
||||||
|
|
||||||
|
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||||
|
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||||
|
# files to browse.
|
||||||
|
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||||
|
# be generated. Documented entities will be cross-referenced with these sources.
|
||||||
|
|
||||||
|
SOURCE_BROWSER = YES
|
||||||
|
|
||||||
|
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||||
|
# of functions and classes directly in the documentation.
|
||||||
|
|
||||||
|
INLINE_SOURCES = YES
|
||||||
|
|
||||||
|
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
|
||||||
|
# then for each documented function all documented
|
||||||
|
# functions referencing it will be listed.
|
||||||
|
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
|
||||||
|
# If the REFERENCES_RELATION tag is set to YES (the default)
|
||||||
|
# then for each documented function all documented entities
|
||||||
|
# called/used by that function will be listed.
|
||||||
|
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||||
|
# of all compounds will be generated. Enable this if the project
|
||||||
|
# contains a lot of classes, structs, unions or interfaces.
|
||||||
|
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
|
||||||
|
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||||
|
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||||
|
# in which this list will be split (can be a number in the range [1..20])
|
||||||
|
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
|
||||||
|
# In case all classes in a project start with a common prefix, all
|
||||||
|
# classes will be put under the same header in the alphabetical index.
|
||||||
|
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||||
|
# should be ignored while generating the index headers.
|
||||||
|
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||||
|
# generate HTML output.
|
||||||
|
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
|
||||||
|
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||||
|
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||||
|
# put in front of it. If left blank `html' will be used as the default path.
|
||||||
|
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
|
||||||
|
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
|
||||||
|
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
|
||||||
|
# doxygen will generate files with .html extension.
|
||||||
|
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
|
||||||
|
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||||
|
# each generated HTML page. If it is left blank doxygen will generate a
|
||||||
|
# standard header.
|
||||||
|
|
||||||
|
HTML_HEADER =
|
||||||
|
|
||||||
|
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||||
|
# each generated HTML page. If it is left blank doxygen will generate a
|
||||||
|
# standard footer.
|
||||||
|
|
||||||
|
HTML_FOOTER =
|
||||||
|
|
||||||
|
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||||
|
# style sheet that is used by each HTML page. It can be used to
|
||||||
|
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||||
|
# will generate a default style sheet
|
||||||
|
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
|
||||||
|
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||||
|
# files or namespaces will be aligned in HTML using tables. If set to
|
||||||
|
# NO a bullet list will be used.
|
||||||
|
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
|
||||||
|
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||||
|
# will be generated that can be used as input for tools like the
|
||||||
|
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||||
|
# of the generated HTML documentation.
|
||||||
|
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
|
||||||
|
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||||
|
# controls if a separate .chi index file is generated (YES) or that
|
||||||
|
# it should be included in the master .chm file (NO).
|
||||||
|
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
|
||||||
|
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||||
|
# controls whether a binary table of contents is generated (YES) or a
|
||||||
|
# normal table of contents (NO) in the .chm file.
|
||||||
|
|
||||||
|
BINARY_TOC = NO
|
||||||
|
|
||||||
|
# The TOC_EXPAND flag can be set to YES to add extra items for group members
|
||||||
|
# to the contents of the Html help documentation and to the tree view.
|
||||||
|
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
|
||||||
|
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||||
|
# top of each HTML page. The value NO (the default) enables the index and
|
||||||
|
# the value YES disables it.
|
||||||
|
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
|
||||||
|
# This tag can be used to set the number of enum values (range [1..20])
|
||||||
|
# that doxygen will group on one line in the generated HTML documentation.
|
||||||
|
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
|
||||||
|
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||||
|
# generated containing a tree-like index structure (just like the one that
|
||||||
|
# is generated for HTML Help). For this to work a browser that supports
|
||||||
|
# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
|
||||||
|
# or Internet explorer 4.0+). Note that for large projects the tree generation
|
||||||
|
# can take a very long time. In such cases it is better to disable this feature.
|
||||||
|
# Windows users are probably better off using the HTML help feature.
|
||||||
|
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
|
||||||
|
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||||
|
# used to set the initial width (in pixels) of the frame in which the tree
|
||||||
|
# is shown.
|
||||||
|
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||||
|
# generate Latex output.
|
||||||
|
|
||||||
|
GENERATE_LATEX = NO
|
||||||
|
|
||||||
|
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||||
|
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||||
|
# put in front of it. If left blank `latex' will be used as the default path.
|
||||||
|
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
|
||||||
|
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||||
|
# LaTeX documents. This may be useful for small projects and may help to
|
||||||
|
# save some trees in general.
|
||||||
|
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
|
||||||
|
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||||
|
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||||
|
# executive. If left blank a4wide will be used.
|
||||||
|
|
||||||
|
PAPER_TYPE = letter
|
||||||
|
|
||||||
|
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||||
|
# packages that should be included in the LaTeX output.
|
||||||
|
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
|
||||||
|
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||||
|
# the generated latex document. The header should contain everything until
|
||||||
|
# the first chapter. If it is left blank doxygen will generate a
|
||||||
|
# standard header. Notice: only use this tag if you know what you are doing!
|
||||||
|
|
||||||
|
LATEX_HEADER =
|
||||||
|
|
||||||
|
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||||
|
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||||
|
# contain links (just like the HTML output) instead of page references
|
||||||
|
# This makes the output suitable for online browsing using a pdf viewer.
|
||||||
|
|
||||||
|
PDF_HYPERLINKS = YES
|
||||||
|
|
||||||
|
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||||
|
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||||
|
# higher quality PDF documentation.
|
||||||
|
|
||||||
|
USE_PDFLATEX = YES
|
||||||
|
|
||||||
|
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||||
|
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||||
|
# running if errors occur, instead of asking the user for help.
|
||||||
|
# This option is also used when generating formulas in HTML.
|
||||||
|
|
||||||
|
LATEX_BATCHMODE = YES
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||||
|
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||||
|
# other RTF readers or editors.
|
||||||
|
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
|
||||||
|
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||||
|
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||||
|
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||||
|
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
|
||||||
|
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||||
|
# RTF documents. This may be useful for small projects and may help to
|
||||||
|
# save some trees in general.
|
||||||
|
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
|
||||||
|
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||||
|
# will contain hyperlink fields. The RTF file will
|
||||||
|
# contain links (just like the HTML output) instead of page references.
|
||||||
|
# This makes the output suitable for online browsing using WORD or other
|
||||||
|
# programs which support those fields.
|
||||||
|
# Note: wordpad (write) and others do not support links.
|
||||||
|
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
|
||||||
|
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||||
|
# config file, i.e. a series of assigments. You only have to provide
|
||||||
|
# replacements, missing definitions are set to their default value.
|
||||||
|
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
|
||||||
|
# Set optional variables used in the generation of an rtf document.
|
||||||
|
# Syntax is similar to doxygen's config file.
|
||||||
|
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||||
|
# generate man pages
|
||||||
|
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
|
||||||
|
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||||
|
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||||
|
# put in front of it. If left blank `man' will be used as the default path.
|
||||||
|
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
|
||||||
|
# The MAN_EXTENSION tag determines the extension that is added to
|
||||||
|
# the generated man pages (default is the subroutine's section .3)
|
||||||
|
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
|
||||||
|
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
|
||||||
|
# then it will generate one additional man file for each entity
|
||||||
|
# documented in the real man page(s). These additional files
|
||||||
|
# only source the real man page, but without them the man command
|
||||||
|
# would be unable to find the correct page. The default is NO.
|
||||||
|
|
||||||
|
MAN_LINKS = NO
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the GENERATE_XML tag is set to YES Doxygen will
|
||||||
|
# generate an XML file that captures the structure of
|
||||||
|
# the code including all documentation. Note that this
|
||||||
|
# feature is still experimental and incomplete at the
|
||||||
|
# moment.
|
||||||
|
|
||||||
|
GENERATE_XML = NO
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
|
||||||
|
# generate an AutoGen Definitions (see autogen.sf.net) file
|
||||||
|
# that captures the structure of the code including all
|
||||||
|
# documentation. Note that this feature is still experimental
|
||||||
|
# and incomplete at the moment.
|
||||||
|
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||||
|
# evaluate all C-preprocessor directives found in the sources and include
|
||||||
|
# files.
|
||||||
|
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
|
||||||
|
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||||
|
# names in the source code. If set to NO (the default) only conditional
|
||||||
|
# compilation will be performed. Macro expansion can be done in a controlled
|
||||||
|
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||||
|
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
|
||||||
|
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||||
|
# then the macro expansion is limited to the macros specified with the
|
||||||
|
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||||
|
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
|
||||||
|
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||||
|
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||||
|
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
|
||||||
|
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||||
|
# contain include files that are not input files but should be processed by
|
||||||
|
# the preprocessor.
|
||||||
|
|
||||||
|
INCLUDE_PATH =
|
||||||
|
|
||||||
|
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||||
|
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||||
|
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||||
|
# be used.
|
||||||
|
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
|
||||||
|
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||||
|
# are defined before the preprocessor is started (similar to the -D option of
|
||||||
|
# gcc). The argument of the tag is a list of macros of the form: name
|
||||||
|
# or name=definition (no spaces). If the definition and the = are
|
||||||
|
# omitted =1 is assumed.
|
||||||
|
|
||||||
|
PREDEFINED =
|
||||||
|
|
||||||
|
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||||
|
# this tag can be used to specify a list of macro names that should be expanded.
|
||||||
|
# The macro definition that is found in the sources will be used.
|
||||||
|
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||||
|
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
|
||||||
|
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||||
|
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||||
|
# on a line and do not end with a semicolon. Such function macros are typically
|
||||||
|
# used for boiler-plate code, and will confuse the parser if not removed.
|
||||||
|
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::addtions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||||
|
|
||||||
|
TAGFILES =
|
||||||
|
|
||||||
|
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||||
|
# a tag file that is based on the input files it reads.
|
||||||
|
|
||||||
|
GENERATE_TAGFILE =
|
||||||
|
|
||||||
|
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||||
|
# in the class index. If set to NO only the inherited external classes
|
||||||
|
# will be listed.
|
||||||
|
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
|
||||||
|
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
|
||||||
|
# in the modules index. If set to NO, only the current project's groups will
|
||||||
|
# be listed.
|
||||||
|
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
|
||||||
|
# The PERL_PATH should be the absolute path and name of the perl script
|
||||||
|
# interpreter (i.e. the result of `which perl').
|
||||||
|
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||||
|
# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
|
||||||
|
# super classes. Setting the tag to NO turns the diagrams off. Note that this
|
||||||
|
# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
|
||||||
|
# recommended to install and use dot, since it yield more powerful graphs.
|
||||||
|
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
|
||||||
|
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||||
|
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||||
|
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||||
|
# have no effect if this option is set to NO (the default)
|
||||||
|
|
||||||
|
HAVE_DOT = YES
|
||||||
|
|
||||||
|
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||||
|
# will generate a graph for each documented class showing the direct and
|
||||||
|
# indirect inheritance relations. Setting this tag to YES will force the
|
||||||
|
# the CLASS_DIAGRAMS tag to NO.
|
||||||
|
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
|
||||||
|
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||||
|
# will generate a graph for each documented class showing the direct and
|
||||||
|
# indirect implementation dependencies (inheritance, containment, and
|
||||||
|
# class references variables) of the class with other documented classes.
|
||||||
|
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
|
||||||
|
# If set to YES, the inheritance and collaboration graphs will show the
|
||||||
|
# relations between templates and their instances.
|
||||||
|
|
||||||
|
TEMPLATE_RELATIONS = YES
|
||||||
|
|
||||||
|
# If set to YES, the inheritance and collaboration graphs will hide
|
||||||
|
# inheritance and usage relations if the target is undocumented
|
||||||
|
# or is not a class.
|
||||||
|
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
|
||||||
|
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
|
||||||
|
# tags are set to YES then doxygen will generate a graph for each documented
|
||||||
|
# file showing the direct and indirect include dependencies of the file with
|
||||||
|
# other documented files.
|
||||||
|
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
|
||||||
|
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
||||||
|
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
||||||
|
# documented header file showing the documented files that directly or
|
||||||
|
# indirectly include this file.
|
||||||
|
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
|
||||||
|
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||||
|
# will graphical hierarchy of all classes instead of a textual one.
|
||||||
|
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
|
||||||
|
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||||
|
# generated by dot. Possible values are gif, jpg, and png
|
||||||
|
# If left blank gif will be used.
|
||||||
|
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
|
||||||
|
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||||
|
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||||
|
|
||||||
|
DOT_PATH =
|
||||||
|
|
||||||
|
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||||
|
# contain dot files that are included in the documentation (see the
|
||||||
|
# \dotfile command).
|
||||||
|
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
|
||||||
|
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||||
|
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||||
|
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||||
|
# the specified constraint. Beware that most browsers cannot cope with very
|
||||||
|
# large images.
|
||||||
|
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
|
|
||||||
|
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||||
|
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||||
|
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||||
|
# the specified constraint. Beware that most browsers cannot cope with very
|
||||||
|
# large images.
|
||||||
|
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
|
||||||
|
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||||
|
# generate a legend page explaining the meaning of the various boxes and
|
||||||
|
# arrows in the dot generated graphs.
|
||||||
|
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
|
||||||
|
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
|
||||||
|
# remove the intermedate dot files that are used to generate
|
||||||
|
# the various graphs.
|
||||||
|
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::addtions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||||
|
# used. If set to NO the values of all tags below this one will be ignored.
|
||||||
|
|
||||||
|
SEARCHENGINE = NO
|
||||||
|
|
||||||
|
# The CGI_NAME tag should be the name of the CGI script that
|
||||||
|
# starts the search engine (doxysearch) with the correct parameters.
|
||||||
|
# A script with this name will be generated by doxygen.
|
||||||
|
|
||||||
|
CGI_NAME = search.cgi
|
||||||
|
|
||||||
|
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||||
|
# cgi binaries are located. See the documentation of your http daemon for
|
||||||
|
# details.
|
||||||
|
|
||||||
|
CGI_URL =
|
||||||
|
|
||||||
|
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||||
|
# documentation is located. If left blank the absolute path to the
|
||||||
|
# documentation, with file:// prepended to it, will be used.
|
||||||
|
|
||||||
|
DOC_URL =
|
||||||
|
|
||||||
|
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||||
|
# documentation is located. If left blank the directory on the local machine
|
||||||
|
# will be used.
|
||||||
|
|
||||||
|
DOC_ABSPATH =
|
||||||
|
|
||||||
|
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||||
|
# is installed.
|
||||||
|
|
||||||
|
BIN_ABSPATH = /usr/local/bin/
|
||||||
|
|
||||||
|
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||||
|
# documentation generated for other projects. This allows doxysearch to search
|
||||||
|
# the documentation for these projects as well.
|
||||||
|
|
||||||
|
EXT_DOC_PATHS =
|
472
depcomp
Executable file
472
depcomp
Executable file
@ -0,0 +1,472 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program 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 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program 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 this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# `libtool' can also be set to `yes' or `no'.
|
||||||
|
|
||||||
|
if test -z "$depfile"; then
|
||||||
|
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||||
|
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||||
|
if test "$dir" = "$object"; then
|
||||||
|
dir=
|
||||||
|
fi
|
||||||
|
# FIXME: should be _deps on DOS.
|
||||||
|
depfile="$dir.deps/$base"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say).
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||||
|
## The second -e expression handles DOS-style file names with drive letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the `deleted header file' problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" |
|
||||||
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
|
tr '
|
||||||
|
' ' ' >> $depfile
|
||||||
|
echo >> $depfile
|
||||||
|
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> $depfile
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. This file always lives in the current directory.
|
||||||
|
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||||
|
# $object doesn't have directory information.
|
||||||
|
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
outname="$stripped.o"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
icc)
|
||||||
|
# Intel's C compiler understands `-MD -MF file'. However on
|
||||||
|
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||||
|
# ICC 7.0 will fill foo.d with something like
|
||||||
|
# foo.o: sub/foo.c
|
||||||
|
# foo.o: sub/foo.h
|
||||||
|
# which is wrong. We want:
|
||||||
|
# sub/foo.o: sub/foo.c
|
||||||
|
# sub/foo.o: sub/foo.h
|
||||||
|
# sub/foo.c:
|
||||||
|
# sub/foo.h:
|
||||||
|
# ICC 7.1 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using \ :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||||
|
sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||||
|
tmpdepfile2="$dir.libs/$base.d"
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1="$dir$base.o.d"
|
||||||
|
tmpdepfile2="$dir$base.d"
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile1"; then
|
||||||
|
tmpdepfile="$tmpdepfile1"
|
||||||
|
else
|
||||||
|
tmpdepfile="$tmpdepfile2"
|
||||||
|
fi
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a space and a tab in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the proprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for `:'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no
|
||||||
|
for arg in "$@"; do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
|
' | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the proprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the proprocessed file to stdout, regardless of -o,
|
||||||
|
# because we must use -o when running libtool.
|
||||||
|
"$@" || exit $?
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
echo " " >> "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
1123
gcc/ChangeLog
1123
gcc/ChangeLog
File diff suppressed because it is too large
Load Diff
19338
gcc/ChangeLog.tree-ssa
Normal file
19338
gcc/ChangeLog.tree-ssa
Normal file
File diff suppressed because it is too large
Load Diff
256
gcc/Makefile.in
256
gcc/Makefile.in
@ -140,7 +140,7 @@ XCFLAGS =
|
|||||||
TCFLAGS =
|
TCFLAGS =
|
||||||
CFLAGS = -g
|
CFLAGS = -g
|
||||||
STAGE1_CFLAGS = -g @stage1_cflags@
|
STAGE1_CFLAGS = -g @stage1_cflags@
|
||||||
BOOT_CFLAGS = -g -O2
|
BOOT_CFLAGS = -g -O2
|
||||||
|
|
||||||
# Flags to determine code coverage. When coverage is disabled, this will
|
# Flags to determine code coverage. When coverage is disabled, this will
|
||||||
# contain the optimization flags, as you normally want code coverage
|
# contain the optimization flags, as you normally want code coverage
|
||||||
@ -192,6 +192,14 @@ c-parse.o-warn = -Wno-error
|
|||||||
gengtype-lex.o-warn = -Wno-error
|
gengtype-lex.o-warn = -Wno-error
|
||||||
# SYSCALLS.c misses prototypes
|
# SYSCALLS.c misses prototypes
|
||||||
SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
|
SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
|
||||||
|
# These files need -Wno-error because the gimplifier triggers hard to fix
|
||||||
|
# warnings when converting to GIMPLE form. The warnings are triggered because
|
||||||
|
# moving the condition into the loop prevents the loop optimizer from
|
||||||
|
# recognizing that the loop will always be executed at least once. We need
|
||||||
|
# a new loop optimizer.
|
||||||
|
reload1.o-warn = -Wno-error
|
||||||
|
# These warnings are due to libbanshee.
|
||||||
|
tree-alias-ander.o-warn = -Wno-error
|
||||||
|
|
||||||
# All warnings have to be shut off in stage1 if the compiler used then
|
# All warnings have to be shut off in stage1 if the compiler used then
|
||||||
# isn't gcc; configure determines that. WARN_CFLAGS will be either
|
# isn't gcc; configure determines that. WARN_CFLAGS will be either
|
||||||
@ -270,6 +278,12 @@ OUTPUT_OPTION = @OUTPUT_OPTION@
|
|||||||
ZLIB = @zlibdir@ -lz
|
ZLIB = @zlibdir@ -lz
|
||||||
ZLIBINC = @zlibinc@
|
ZLIBINC = @zlibinc@
|
||||||
|
|
||||||
|
# How to find GMP
|
||||||
|
GMPLIBS = @GMPLIBS@
|
||||||
|
GMPINC = @GMPINC@
|
||||||
|
|
||||||
|
BANSHEELIB = @BANSHEELIB@
|
||||||
|
BANSHEEINC = @BANSHEEINC@
|
||||||
# Substitution type for target's getgroups 2nd arg.
|
# Substitution type for target's getgroups 2nd arg.
|
||||||
TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@
|
TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@
|
||||||
|
|
||||||
@ -687,6 +701,11 @@ C_TREE_H = c-tree.h $(C_COMMON_H)
|
|||||||
SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h
|
SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h
|
||||||
PREDICT_H = predict.h predict.def
|
PREDICT_H = predict.h predict.def
|
||||||
CPPLIB_H = cpplib.h line-map.h
|
CPPLIB_H = cpplib.h line-map.h
|
||||||
|
TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H)
|
||||||
|
TREE_SIMPLE_H = tree-simple.h tree-iterator.h
|
||||||
|
TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
|
||||||
|
bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h $(TREE_SIMPLE_H) \
|
||||||
|
$(HASHTAB_H)
|
||||||
PRETTY_PRINT_H = pretty-print.h input.h $(OBSTACK_H)
|
PRETTY_PRINT_H = pretty-print.h input.h $(OBSTACK_H)
|
||||||
DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H)
|
DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H)
|
||||||
C_PRETTY_PRINT_H = $(PRETTY_PRINT_H) $(C_COMMON_H) $(TREE_H)
|
C_PRETTY_PRINT_H = $(PRETTY_PRINT_H) $(C_COMMON_H) $(TREE_H)
|
||||||
@ -713,7 +732,7 @@ LIBIBERTY = ../libiberty/libiberty.a
|
|||||||
BUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a
|
BUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a
|
||||||
|
|
||||||
# Dependencies on the intl and portability libraries.
|
# Dependencies on the intl and portability libraries.
|
||||||
LIBDEPS= $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) libcpp.a
|
LIBDEPS= $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) libcpp.a $(BANSHEELIB)
|
||||||
|
|
||||||
# Likewise, for use in the tools that must run on this machine
|
# Likewise, for use in the tools that must run on this machine
|
||||||
# even if we are cross-building GCC.
|
# even if we are cross-building GCC.
|
||||||
@ -721,7 +740,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
|||||||
|
|
||||||
# How to link with both our special library facilities
|
# How to link with both our special library facilities
|
||||||
# and the system's installed libraries.
|
# and the system's installed libraries.
|
||||||
LIBS = @LIBS@ libcpp.a $(LIBIBERTY) $(LIBINTL) $(LIBICONV)
|
LIBS = @LIBS@ libcpp.a $(LIBIBERTY) $(LIBINTL) $(LIBICONV) $(BANSHEELIB)
|
||||||
|
|
||||||
# Any system libraries needed just for GNAT.
|
# Any system libraries needed just for GNAT.
|
||||||
SYSLIBS = @GNAT_LIBEXC@
|
SYSLIBS = @GNAT_LIBEXC@
|
||||||
@ -750,7 +769,8 @@ BUILD_VARRAY = $(BUILD_PREFIX)varray.o
|
|||||||
# currently being compiled, in both source trees, to be examined as well.
|
# currently being compiled, in both source trees, to be examined as well.
|
||||||
# libintl.h will be found in ../intl if we are using the included libintl.
|
# libintl.h will be found in ../intl if we are using the included libintl.
|
||||||
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
|
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
|
||||||
-I$(srcdir)/../include @INCINTL@
|
-I$(srcdir)/../include @INCINTL@ \
|
||||||
|
$(BANSHEEINC) $(GMPINC)
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
|
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
|
||||||
@ -838,14 +858,23 @@ CXX_TARGET_OBJS=@cxx_target_objs@
|
|||||||
C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
|
C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
|
||||||
c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \
|
c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \
|
||||||
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
|
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
|
||||||
c-objc-common.o c-dump.o c-pch.o $(C_TARGET_OBJS)
|
c-objc-common.o c-dump.o c-pch.o $(C_TARGET_OBJS) \
|
||||||
|
c-simplify.o tree-mudflap.o c-mudflap.o c-pretty-print.o
|
||||||
|
|
||||||
# Language-specific object files for C.
|
# Language-specific object files for C.
|
||||||
C_OBJS = c-parse.o c-lang.o c-pretty-print.o stub-objc.o $(C_AND_OBJC_OBJS)
|
C_OBJS = c-parse.o c-lang.o stub-objc.o $(C_AND_OBJC_OBJS)
|
||||||
|
|
||||||
# Language-independent object files.
|
# Language-independent object files.
|
||||||
|
|
||||||
OBJS-common = \
|
OBJS-common = \
|
||||||
|
tree-cfg.o tree-dfa.o tree-eh.o tree-ssa.o tree-optimize.o tree-simple.o \
|
||||||
|
tree-alias-type.o gimplify.o tree-pretty-print.o tree-into-ssa.o \
|
||||||
|
tree-outof-ssa.o tree-alias-common.o tree-ssa-ccp.o \
|
||||||
|
@ANDER@ tree-ssa-dce.o tree-ssa-copy.o tree-nrv.o tree-ssa-copyrename.o \
|
||||||
|
tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o \
|
||||||
|
tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o \
|
||||||
|
tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o \
|
||||||
|
tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o tree-ssa-loop.o \
|
||||||
alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
|
alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
|
||||||
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \
|
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \
|
||||||
cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o \
|
cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o \
|
||||||
@ -863,14 +892,15 @@ OBJS-common = \
|
|||||||
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
|
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
|
||||||
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
|
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
|
||||||
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
|
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
|
||||||
sibcall.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \
|
simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \
|
||||||
targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o unroll.o \
|
targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o unroll.o \
|
||||||
varasm.o varray.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \
|
varasm.o varray.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \
|
||||||
et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o passes.o
|
et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o passes.o \
|
||||||
|
rtl-profile.o tree-profile.o
|
||||||
|
|
||||||
OBJS-md = $(out_object_file)
|
OBJS-md = $(out_object_file)
|
||||||
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
|
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
|
||||||
tree-optimize.o cgraph.o cgraphunit.o
|
cgraph.o cgraphunit.o tree-nomudflap.o
|
||||||
|
|
||||||
OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive)
|
OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive)
|
||||||
|
|
||||||
@ -1125,9 +1155,9 @@ $(SPECS): xgcc$(exeext)
|
|||||||
gcc-cross: xgcc$(exeext)
|
gcc-cross: xgcc$(exeext)
|
||||||
cp xgcc$(exeext) gcc-cross$(exeext)
|
cp xgcc$(exeext) gcc-cross$(exeext)
|
||||||
|
|
||||||
cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS)
|
cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS) @TREEBROWSER@
|
||||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \
|
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \
|
||||||
$(C_OBJS) $(BACKEND) $(LIBS)
|
$(C_OBJS) @TREEBROWSER@ $(BACKEND) $(LIBS)
|
||||||
|
|
||||||
# Build the version of limits.h that we will install.
|
# Build the version of limits.h that we will install.
|
||||||
xlimits.h: glimits.h limitx.h limity.h
|
xlimits.h: glimits.h limitx.h limity.h
|
||||||
@ -1308,7 +1338,7 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
|||||||
$(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) flags.h function.h output.h \
|
$(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) flags.h function.h output.h \
|
||||||
$(EXPR_H) debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) \
|
$(EXPR_H) debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) \
|
||||||
opts.h c-pragma.h gt-c-decl.h cgraph.h $(HASHTAB_H) libfuncs.h except.h \
|
opts.h c-pragma.h gt-c-decl.h cgraph.h $(HASHTAB_H) libfuncs.h except.h \
|
||||||
$(LANGHOOKS_DEF_H)
|
$(LANGHOOKS_DEF_H) $(TREE_DUMP_H)
|
||||||
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
|
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
|
||||||
$(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H) \
|
$(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H) \
|
||||||
langhooks.h
|
langhooks.h
|
||||||
@ -1361,9 +1391,10 @@ c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
|||||||
$(OBSTACK_H) $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h intl.h \
|
$(OBSTACK_H) $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h intl.h \
|
||||||
$(GGC_H) $(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def \
|
$(GGC_H) $(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def \
|
||||||
$(DIAGNOSTIC_H) gt-c-common.h langhooks.h varray.h $(RTL_H) \
|
$(DIAGNOSTIC_H) gt-c-common.h langhooks.h varray.h $(RTL_H) \
|
||||||
$(TARGET_H) $(C_TREE_H) langhooks.h
|
$(TARGET_H) $(C_TREE_H) tree-iterator.h langhooks.h
|
||||||
c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \
|
c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \
|
||||||
$(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) real.h
|
$(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) real.h \
|
||||||
|
$(DIAGNOSTIC_H)
|
||||||
|
|
||||||
c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||||
$(TREE_H) c-pragma.h flags.h toplev.h langhooks.h \
|
$(TREE_H) c-pragma.h flags.h toplev.h langhooks.h \
|
||||||
@ -1390,7 +1421,7 @@ c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE
|
|||||||
$(EXPR_H) $(PREDICT_H) tree-inline.h
|
$(EXPR_H) $(PREDICT_H) tree-inline.h
|
||||||
|
|
||||||
c-dump.o : c-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
c-dump.o : c-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
||||||
$(C_TREE_H) tree-dump.h
|
$(C_TREE_H) $(TREE_DUMP_H)
|
||||||
|
|
||||||
c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(CPPLIB_H) $(TREE_H) \
|
c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(CPPLIB_H) $(TREE_H) \
|
||||||
$(C_COMMON_H) output.h toplev.h c-pragma.h $(GGC_H) debug.h \
|
$(C_COMMON_H) output.h toplev.h c-pragma.h $(GGC_H) debug.h \
|
||||||
@ -1476,7 +1507,7 @@ version.o: version.c version.h
|
|||||||
gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) varray.h \
|
gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) varray.h \
|
||||||
$(HASHTAB_H) $(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \
|
$(HASHTAB_H) $(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \
|
||||||
libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \
|
libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \
|
||||||
cselib.h insn-addr.h
|
cselib.h insn-addr.h $(TREE_FLOW_H)
|
||||||
|
|
||||||
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \
|
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \
|
||||||
$(HASHTAB_H) toplev.h $(PARAMS_H) hosthooks.h
|
$(HASHTAB_H) toplev.h $(PARAMS_H) hosthooks.h
|
||||||
@ -1506,22 +1537,149 @@ langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H)
|
|||||||
$(LANGHOOKS_DEF_H) flags.h $(GGC_H) gt-langhooks.h diagnostic.h
|
$(LANGHOOKS_DEF_H) flags.h $(GGC_H) gt-langhooks.h diagnostic.h
|
||||||
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) flags.h function.h \
|
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) flags.h function.h \
|
||||||
toplev.h $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
|
toplev.h $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
|
||||||
real.h gt-tree.h
|
real.h gt-tree.h tree-iterator.h $(BASIC_BLOCK_H) $(TREE_FLOW_H)
|
||||||
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
||||||
$(C_TREE_H) flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
|
$(C_TREE_H) flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
|
||||||
$(EXPR_H) $(SPLAY_TREE_H) tree-dump.h
|
$(EXPR_H) $(SPLAY_TREE_H) $(TREE_DUMP_H)
|
||||||
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||||
$(TREE_H) $(RTL_H) $(EXPR_H) flags.h $(PARAMS_H) input.h insn-config.h \
|
$(TREE_H) $(RTL_H) $(EXPR_H) flags.h $(PARAMS_H) input.h insn-config.h \
|
||||||
$(INTEGRATE_H) $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \
|
$(INTEGRATE_H) $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \
|
||||||
langhooks.h $(C_COMMON_H) tree-inline.h cgraph.h intl.h function.h
|
langhooks.h $(C_COMMON_H) tree-inline.h cgraph.h intl.h function.h \
|
||||||
tree-optimize.o : tree-optimize.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
$(TREE_SIMPLE_H)
|
||||||
$(TREE_H) toplev.h langhooks.h cgraph.h $(TIMEVAR_H) function.h $(GGC_H)
|
|
||||||
|
|
||||||
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
||||||
$(GGC_H) langhooks.h real.h
|
$(GGC_H) langhooks.h real.h
|
||||||
stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
|
||||||
flags.h function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) \
|
flags.h function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) \
|
||||||
langhooks.h
|
langhooks.h
|
||||||
|
tree-alias-type.o: tree-alias-type.c tree-alias-type.h $(SYSTEM_H) $(CONFIG_H) \
|
||||||
|
$(GGC_H) $(TM_H) coretypes.h $(VARRAY_H)
|
||||||
|
tree-alias-ander.o: tree-alias-ander.c tree-alias-ander.h $(SYSTEM_H) \
|
||||||
|
$(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) tree-alias-common.h \
|
||||||
|
$(TM_H) coretypes.h cgraph.h tree-pass.h
|
||||||
|
tree-alias-common.o: tree-alias-common.c tree-alias-common.h $(SYSTEM_H) \
|
||||||
|
$(CONFIG_H) $(GGC_H) $(TREE_H) gt-tree-alias-common.h $(TREE_FLOW_H) \
|
||||||
|
$(TM_H) coretypes.h cgraph.h tree-pass.h $(TIMEVAR_H)
|
||||||
|
tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h diagnostic.h \
|
||||||
|
errors.h toplev.h function.h $(TIMEVAR_H) tree-alias-common.h \
|
||||||
|
$(TM_H) coretypes.h $(TREE_DUMP_H) langhooks.h cfgloop.h \
|
||||||
|
tree-pass.h
|
||||||
|
tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h diagnostic.h \
|
||||||
|
errors.h toplev.h function.h $(TIMEVAR_H) tree-alias-common.h \
|
||||||
|
$(TM_H) coretypes.h $(TREE_DUMP_H) langhooks.h domwalk.h tree-pass.h
|
||||||
|
tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h diagnostic.h \
|
||||||
|
errors.h toplev.h function.h $(TIMEVAR_H) tree-alias-common.h \
|
||||||
|
$(TM_H) coretypes.h $(TREE_DUMP_H) langhooks.h domwalk.h \
|
||||||
|
tree-pass.h tree-ssa-live.h
|
||||||
|
tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) errors.h $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
|
||||||
|
$(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) domwalk.h flags.h
|
||||||
|
tree-ssa-forwprop.o : tree-ssa-forwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) errors.h $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
|
||||||
|
$(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H)
|
||||||
|
tree-ssa-phiopt.o : tree-ssa-phiopt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) errors.h $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
|
||||||
|
$(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) langhooks.h
|
||||||
|
tree-nrv.o : tree-nrv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) $(TREE_H) $(RTL_H) function.h $(BASIC_BLOCK_H) $(EXPR_H) \
|
||||||
|
diagnostic.h $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) tree-pass.h \
|
||||||
|
langhooks.h
|
||||||
|
tree-ssa-copy.o : tree-ssa-copy.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h diagnostic.h \
|
||||||
|
errors.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
|
||||||
|
$(BASIC_BLOCK_H) tree-pass.h langhooks.h
|
||||||
|
tree-ssa-dom.o : tree-ssa-dom.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h diagnostic.h \
|
||||||
|
errors.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
|
||||||
|
$(BASIC_BLOCK_H) domwalk.h real.h tree-pass.h flags.h langhooks.h
|
||||||
|
tree-ssanames.o : tree-ssanames.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) $(TREE_H) varray.h $(GGC_H) gt-tree-ssanames.h
|
||||||
|
tree-phinodes.o : tree-phinodes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) $(TREE_H) varray.h $(GGC_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) \
|
||||||
|
gt-tree-phinodes.h $(RTL_H)
|
||||||
|
domwalk.o : domwalk.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||||
|
$(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) domwalk.h $(GGC_H)
|
||||||
|
tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h diagnostic.h \
|
||||||
|
errors.h toplev.h function.h $(TIMEVAR_H) tree-alias-common.h \
|
||||||
|
$(TM_H) coretypes.h $(TREE_DUMP_H) tree-ssa-live.h
|
||||||
|
tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \
|
||||||
|
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
|
||||||
|
diagnostic.h errors.h toplev.h function.h $(TIMEVAR_H) tree-pass.h \
|
||||||
|
tree-alias-common.h $(TM_H) coretypes.h $(TREE_DUMP_H) tree-ssa-live.h
|
||||||
|
tree-ssa-pre.o : tree-ssa-pre.c $(TREE_FLOW_H) $(CONFIG_H) \
|
||||||
|
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) \
|
||||||
|
$(GGC_H) output.h diagnostic.h errors.h toplev.h $(TIMEVAR_H) \
|
||||||
|
$(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h flags.h
|
||||||
|
tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) flags.h output.h \
|
||||||
|
diagnostic.h errors.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h \
|
||||||
|
$(TREE_DUMP_H) except.h langhooks.h cfgloop.h gt-tree-cfg.h tree-pass.h
|
||||||
|
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) function.h $(TM_H) coretypes.h \
|
||||||
|
$(TREE_DUMP_H) diagnostic.h except.h tree-pass.h flags.h langhooks.h
|
||||||
|
tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
|
||||||
|
$(RTL_H) $(TM_P_H) function.h tree-dump.h tree-inline.h tree-iterator.h \
|
||||||
|
tree-simple.h cgraph.h $(EXPR_H) langhooks.h $(GGC_H) gt-tree-nested.h
|
||||||
|
tree-iterator.o : tree-iterator.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
|
||||||
|
coretypes.h $(GGC_H) tree-iterator.h tree-simple.h gt-tree-iterator.h
|
||||||
|
tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h diagnostic.h \
|
||||||
|
errors.h tree-inline.h $(HASHTAB_H) flags.h function.h $(TIMEVAR_H) \
|
||||||
|
tree-alias-common.h convert.h $(TM_H) coretypes.h langhooks.h \
|
||||||
|
$(TREE_DUMP_H) tree-pass.h params.h
|
||||||
|
tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
|
||||||
|
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(GGC_H) diagnostic.h \
|
||||||
|
tree-inline.h flags.h function.h $(TM_H) $(TIMEVAR_H) tree-pass.h
|
||||||
|
tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_H) flags.h function.h except.h langhooks.h \
|
||||||
|
$(GGC_H) tree-pass.h gt-tree-eh.h
|
||||||
|
tree-ssa-loop.o : tree-ssa-loop.c $(TREE_FLOW_H) $(CONFIG_H) \
|
||||||
|
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) cfgloop.h \
|
||||||
|
output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
|
||||||
|
tree-pass.h flags.h tree-inline.h
|
||||||
|
tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) tree-inline.h flags.h \
|
||||||
|
function.h $(TIMEVAR_H) tree-alias-common.h convert.h $(TM_H) coretypes.h \
|
||||||
|
langhooks.h $(TREE_DUMP_H) tree-pass.h params.h
|
||||||
|
tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) \
|
||||||
|
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) \
|
||||||
|
$(GGC_H) output.h diagnostic.h errors.h flags.h tree-alias-common.h \
|
||||||
|
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) toplev.h function.h \
|
||||||
|
langhooks.h flags.h cgraph.h tree-inline.h tree-mudflap.h $(GGC_H) \
|
||||||
|
cgraph.h tree-pass.h
|
||||||
|
c-simplify.o : c-simplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) errors.h \
|
||||||
|
$(C_TREE_H) $(C_COMMON_H) diagnostic.h $(TREE_SIMPLE_H) varray.h flags.h \
|
||||||
|
langhooks.h toplev.h rtl.h $(TREE_FLOW_H) langhooks-def.h \
|
||||||
|
$(TM_H) coretypes.h $(C_PRETTY_PRINT_H) cgraph.h
|
||||||
|
gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) errors.h \
|
||||||
|
diagnostic.h $(TREE_SIMPLE_H) tree-inline.h varray.h langhooks.h \
|
||||||
|
langhooks-def.h $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h except.h \
|
||||||
|
flags.h $(RTL_H) function.h $(EXPR_H) output.h $(GGC_H) gt-gimplify.h
|
||||||
|
gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) errors.h \
|
||||||
|
diagnostic.h $(TREE_SIMPLE_H) tree-inline.h varray.h langhooks.h \
|
||||||
|
langhooks-def.h $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h except.h \
|
||||||
|
flags.h $(RTL_H) function.h tree-pass.h
|
||||||
|
tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
$(TREE_H) errors.h tree-inline.h diagnostic.h $(HASHTAB_H) \
|
||||||
|
$(TM_H) coretypes.h
|
||||||
|
tree-simple.o : tree-simple.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(EXPR_H) \
|
||||||
|
$(RTL_H) $(TREE_SIMPLE_H) $(TM_H) coretypes.h bitmap.h $(GGC_H)
|
||||||
|
tree-mudflap.o : $(CONFIG_H) errors.h $(SYSTEM_H) $(TREE_H) tree-inline.h \
|
||||||
|
$(C_TREE_H) $(C_COMMON_H) $(TREE_SIMPLE_H) diagnostic.h $(HASHTAB_H) \
|
||||||
|
output.h varray.h langhooks.h tree-mudflap.h $(TM_H) coretypes.h \
|
||||||
|
$(TREE_DUMP_H) tree-pass.h
|
||||||
|
c-mudflap.o : $(CONFIG_H) errors.h $(SYSTEM_H) $(TREE_H) tree-inline.h \
|
||||||
|
$(C_TREE_H) $(C_COMMON_H) $(TREE_SIMPLE_H) diagnostic.h $(HASHTAB_H) \
|
||||||
|
output.h varray.h langhooks.h tree-mudflap.h $(TM_H) coretypes.h
|
||||||
|
tree-nomudflap.o : $(CONFIG_H) errors.h $(SYSTEM_H) $(TREE_H) tree-inline.h \
|
||||||
|
$(C_TREE_H) $(C_COMMON_H) $(TREE_SIMPLE_H) diagnostic.h $(HASHTAB_H) \
|
||||||
|
output.h varray.h langhooks.h tree-mudflap.h $(TM_H) coretypes.h
|
||||||
|
tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
|
||||||
|
errors.h $(TREE_H) diagnostic.h real.h $(HASHTAB_H) $(TREE_FLOW_H) \
|
||||||
|
$(TM_H) coretypes.h tree-iterator.h
|
||||||
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||||
$(TREE_H) flags.h real.h toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) \
|
$(TREE_H) flags.h real.h toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) \
|
||||||
$(TM_P_H) langhooks.h $(MD5_H)
|
$(TM_P_H) langhooks.h $(MD5_H)
|
||||||
@ -1584,7 +1742,7 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_
|
|||||||
function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||||
flags.h function.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h \
|
flags.h function.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h \
|
||||||
insn-config.h $(RECOG_H) output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) \
|
insn-config.h $(RECOG_H) output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) \
|
||||||
$(TM_P_H) langhooks.h gt-function.h $(TARGET_H)
|
$(TM_P_H) langhooks.h gt-function.h $(TARGET_H) basic-block.h
|
||||||
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) flags.h \
|
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) flags.h \
|
||||||
function.h insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
|
function.h insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
|
||||||
$(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \
|
$(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \
|
||||||
@ -1597,7 +1755,8 @@ except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
|||||||
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) flags.h \
|
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) flags.h \
|
||||||
function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h $(INSN_ATTR_H) insn-config.h \
|
function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h $(INSN_ATTR_H) insn-config.h \
|
||||||
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
|
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
|
||||||
except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h $(TARGET_H)
|
except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h $(TARGET_H) \
|
||||||
|
tree-iterator.h
|
||||||
dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||||
flags.h function.h $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
|
flags.h function.h $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
|
||||||
langhooks.h $(GGC_H) gt-dojump.h
|
langhooks.h $(GGC_H) gt-dojump.h
|
||||||
@ -1680,14 +1839,26 @@ gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
|
|||||||
hard-reg-set.h flags.h real.h insn-config.h $(GGC_H) $(RECOG_H) $(EXPR_H) \
|
hard-reg-set.h flags.h real.h insn-config.h $(GGC_H) $(RECOG_H) $(EXPR_H) \
|
||||||
$(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) \
|
$(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) \
|
||||||
except.h gt-gcse.h $(TREE_H) cselib.h
|
except.h gt-gcse.h $(TREE_H) cselib.h
|
||||||
sibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
|
|
||||||
function.h hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H)
|
|
||||||
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) coretypes.h \
|
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) coretypes.h \
|
||||||
$(TM_H) $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h function.h toplev.h \
|
$(TM_H) $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h function.h toplev.h \
|
||||||
$(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H)
|
$(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H)
|
||||||
lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
|
lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
|
||||||
hard-reg-set.h flags.h real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) \
|
hard-reg-set.h flags.h real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) \
|
||||||
$(BASIC_BLOCK_H) $(TM_P_H) df.h function.h
|
$(BASIC_BLOCK_H) $(TM_P_H) df.h function.h
|
||||||
|
tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) system.h errors.h $(TREE_H) \
|
||||||
|
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) diagnostic.h $(TIMEVAR_H) $(TM_H) \
|
||||||
|
coretypes.h $(TREE_DUMP_H) tree-pass.h flags.h
|
||||||
|
tree-ssa-ccp.o : tree-ssa-ccp.c $(CONFIG_H) system.h errors.h $(TREE_H) \
|
||||||
|
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) diagnostic.h tree-inline.h \
|
||||||
|
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SIMPLE_H) \
|
||||||
|
$(EXPR_H) tree-pass.h flags.h langhooks.h
|
||||||
|
tree-sra.o : tree-sra.c $(CONFIG_H) system.h errors.h $(TREE_H) $(RTL_H) \
|
||||||
|
$(TM_P_H) $(TREE_FLOW_H) diagnostic.h tree-inline.h \
|
||||||
|
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SIMPLE_H) \
|
||||||
|
langhooks.h tree-pass.h flags.h
|
||||||
|
tree-complex.o : tree-complex.c $(CONFIG_H) system.h $(TREE_H) \
|
||||||
|
$(TM_H) $(TREE_FLOW_H) $(TREE_SIMPLE_H) tree-iterator.h tree-pass.h \
|
||||||
|
flags.h
|
||||||
df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||||
insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \
|
insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \
|
||||||
$(BASIC_BLOCK_H) df.h $(FIBHEAP_H)
|
$(BASIC_BLOCK_H) df.h $(FIBHEAP_H)
|
||||||
@ -1698,7 +1869,14 @@ conflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(OBSTACK_H)
|
|||||||
$(HASHTAB_H) $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H)
|
$(HASHTAB_H) $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H)
|
||||||
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||||
$(TREE_H) flags.h output.h $(REGS_H) $(EXPR_H) function.h \
|
$(TREE_H) flags.h output.h $(REGS_H) $(EXPR_H) function.h \
|
||||||
toplev.h $(BASIC_BLOCK_H) $(COVERAGE_H) $(TREE_H) value-prof.h
|
toplev.h $(BASIC_BLOCK_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h
|
||||||
|
tree-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) $(RTL_H) $(TREE_H) flags.h output.h $(REGS_H) $(EXPR_H) function.h \
|
||||||
|
toplev.h $(BASIC_BLOCK_H) $(COVERAGE_H) $(TREE_H) value-prof.h \
|
||||||
|
tree-pass.h $(TREE_FLOW_H) $(TIMEVAR_H)
|
||||||
|
rtl-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
|
$(TM_H) $(RTL_H) $(TREE_H) flags.h output.h $(REGS_H) $(EXPR_H) function.h \
|
||||||
|
toplev.h $(BASIC_BLOCK_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h
|
||||||
value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||||
$(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h flags.h \
|
$(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h flags.h \
|
||||||
$(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H)
|
$(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H)
|
||||||
@ -1719,9 +1897,9 @@ flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
|||||||
$(RECOG_H) function.h except.h $(EXPR_H) $(GGC_H) $(TM_P_H)
|
$(RECOG_H) function.h except.h $(EXPR_H) $(GGC_H) $(TM_P_H)
|
||||||
cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h insn-config.h \
|
cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h insn-config.h \
|
||||||
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
|
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
|
||||||
function.h except.h $(GGC_H) $(TM_P_H) alloc-pool.h
|
function.h except.h $(GGC_H) $(TM_P_H) alloc-pool.h $(TIMEVAR_H)
|
||||||
cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||||
$(BASIC_BLOCK_H) cfglayout.h $(TIMEVAR_H) toplev.h
|
$(BASIC_BLOCK_H) cfglayout.h $(TREE_FLOW_H) $(TIMEVAR_H) toplev.h
|
||||||
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
|
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
|
||||||
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
|
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
|
||||||
function.h except.h $(GGC_H) $(TM_P_H) insn-config.h $(EXPR_H)
|
function.h except.h $(GGC_H) $(TM_P_H) insn-config.h $(EXPR_H)
|
||||||
@ -1837,7 +2015,7 @@ recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) function.
|
|||||||
$(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H)
|
$(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H)
|
||||||
reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||||
$(RECOG_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \
|
$(RECOG_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \
|
||||||
varray.h function.h $(TM_P_H) $(GGC_H) gt-reg-stack.h
|
varray.h function.h $(TM_P_H) $(GGC_H) gt-reg-stack.h basic-block.h
|
||||||
sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
|
sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
|
||||||
predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||||
flags.h insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
|
flags.h insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
|
||||||
@ -2085,7 +2263,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
|
|||||||
$(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
|
$(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
|
||||||
$(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
|
$(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
|
||||||
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
|
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
|
||||||
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h \
|
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
|
||||||
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
|
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
|
||||||
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
|
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
|
||||||
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
|
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
|
||||||
@ -2098,6 +2276,16 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
|
|||||||
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/langhooks.c \
|
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/langhooks.c \
|
||||||
$(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
|
$(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
|
||||||
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
|
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
|
||||||
|
$(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
|
||||||
|
$(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parse.in \
|
||||||
|
$(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c \
|
||||||
|
$(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
|
||||||
|
$(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-ccp.c \
|
||||||
|
$(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
|
||||||
|
$(srcdir)/tree-alias-type.h $(srcdir)/tree-alias-common.h \
|
||||||
|
$(srcdir)/tree-alias-type.c $(srcdir)/tree-alias-common.c \
|
||||||
|
$(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
|
||||||
|
$(srcdir)/tree-profile.c $(srcdir)/rtl-profile.c $(srcdir)/tree-nested.c \
|
||||||
$(out_file) \
|
$(out_file) \
|
||||||
@all_gtfiles@
|
@all_gtfiles@
|
||||||
|
|
||||||
@ -2114,6 +2302,10 @@ gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dojump.h \
|
|||||||
gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
|
gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
|
||||||
gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
|
gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
|
||||||
gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \
|
gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \
|
||||||
|
gt-tree-alias-common.h gt-tree-mudflap.h \
|
||||||
|
gt-tree-ssa-ccp.h gt-tree-eh.h \
|
||||||
|
gt-tree-ssanames.h gt-tree-iterator.h gt-gimplify.h \
|
||||||
|
gt-tree-phinodes.h gt-tree-cfg.h gt-tree-nested.h \
|
||||||
gt-stringpool.h gt-langhooks.h : s-gtype ; @true
|
gt-stringpool.h gt-langhooks.h : s-gtype ; @true
|
||||||
|
|
||||||
gtyp-gen.h: s-gtyp-gen ; @true
|
gtyp-gen.h: s-gtyp-gen ; @true
|
||||||
@ -2670,7 +2862,7 @@ TEXI_GCCINT_FILES = gccint.texi gcc-common.texi contribute.texi makefile.texi \
|
|||||||
c-tree.texi rtl.texi md.texi tm.texi hostconfig.texi fragments.texi \
|
c-tree.texi rtl.texi md.texi tm.texi hostconfig.texi fragments.texi \
|
||||||
configfiles.texi collect2.texi headerdirs.texi funding.texi gnu.texi \
|
configfiles.texi collect2.texi headerdirs.texi funding.texi gnu.texi \
|
||||||
gpl.texi fdl.texi contrib.texi languages.texi sourcebuild.texi \
|
gpl.texi fdl.texi contrib.texi languages.texi sourcebuild.texi \
|
||||||
gty.texi libgcc.texi
|
gty.texi libgcc.texi cfg.texi tree-ssa.texi
|
||||||
|
|
||||||
TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi
|
TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-05-13 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
Merge from tree-ssa-20020619-branch.
|
||||||
|
|
||||||
|
* config-lang.in (boot_language, build_by_default): Set
|
||||||
|
to no.
|
||||||
|
* utils.c (unchecked_convert): Use OEP_ONLY_CONST.
|
||||||
|
(max_size): Add static chain op for call_expr.
|
||||||
|
|
||||||
2004-05-12 Richard Sandiford <rsandifo@redhat.com>
|
2004-05-12 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
PR target/15331
|
PR target/15331
|
||||||
|
29
gcc/ada/ChangeLog.tree-ssa
Normal file
29
gcc/ada/ChangeLog.tree-ssa
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
2004-05-05 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* utils.c (unchecked_convert): Use OEP_ONLY_CONST.
|
||||||
|
|
||||||
|
2004-03-25 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* config-lang.in: Disable Ada by default.
|
||||||
|
|
||||||
|
2004-02-16 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* utils.c (max_size): Add static chain op for call_expr.
|
||||||
|
|
||||||
|
2003-09-25 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* trans.c, utils.c: Revert 2003-01-15 change.
|
||||||
|
|
||||||
|
2003-01-15 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* trans.c (tree_transform): Use annotate_with_file_line to add
|
||||||
|
file/line information to nodes.
|
||||||
|
(build_unit_elab): Use TREE_FILENAME and TREE_LINENO to
|
||||||
|
retrieve file/line information from a node.
|
||||||
|
* utils.c (create_label_decl): Use annotate_with_file_line to
|
||||||
|
add file/line information to nodes.
|
||||||
|
|
||||||
|
Local Variables:
|
||||||
|
mode: change-log
|
||||||
|
change-log-default-name: "ChangeLog.tree-ssa"
|
||||||
|
End:
|
@ -27,7 +27,7 @@
|
|||||||
# stagestuff - files to add to $(STAGESTUFF)
|
# stagestuff - files to add to $(STAGESTUFF)
|
||||||
|
|
||||||
language="ada"
|
language="ada"
|
||||||
boot_language=yes
|
boot_language=no
|
||||||
boot_language_boot_flags='ADAFLAGS="$(BOOT_ADAFLAGS)"'
|
boot_language_boot_flags='ADAFLAGS="$(BOOT_ADAFLAGS)"'
|
||||||
|
|
||||||
compilers="gnat1\$(exeext)"
|
compilers="gnat1\$(exeext)"
|
||||||
@ -39,3 +39,6 @@ gtfiles="\$(srcdir)/ada/ada-tree.h \$(srcdir)/ada/gigi.h \$(srcdir)/ada/decl.c \
|
|||||||
outputs=ada/Makefile
|
outputs=ada/Makefile
|
||||||
|
|
||||||
target_libs="target-libada"
|
target_libs="target-libada"
|
||||||
|
|
||||||
|
# Ada will not work until the front end starts emitting GIMPLE trees.
|
||||||
|
build_by_default=no
|
||||||
|
@ -2220,7 +2220,7 @@ max_size (tree exp, int max_p)
|
|||||||
max_size (TREE_OPERAND (exp, 2), max_p)));
|
max_size (TREE_OPERAND (exp, 2), max_p)));
|
||||||
else if (code == CALL_EXPR && TREE_OPERAND (exp, 1) != 0)
|
else if (code == CALL_EXPR && TREE_OPERAND (exp, 1) != 0)
|
||||||
return build (CALL_EXPR, type, TREE_OPERAND (exp, 0),
|
return build (CALL_EXPR, type, TREE_OPERAND (exp, 0),
|
||||||
max_size (TREE_OPERAND (exp, 1), max_p));
|
max_size (TREE_OPERAND (exp, 1), max_p), NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3432,7 +3432,8 @@ unchecked_convert (tree type, tree expr, int notrunc_p)
|
|||||||
/* If the sizes of the types differ and this is an VIEW_CONVERT_EXPR,
|
/* If the sizes of the types differ and this is an VIEW_CONVERT_EXPR,
|
||||||
show no longer constant. */
|
show no longer constant. */
|
||||||
if (TREE_CODE (expr) == VIEW_CONVERT_EXPR
|
if (TREE_CODE (expr) == VIEW_CONVERT_EXPR
|
||||||
&& ! operand_equal_p (TYPE_SIZE_UNIT (type), TYPE_SIZE_UNIT (etype), 1))
|
&& ! operand_equal_p (TYPE_SIZE_UNIT (type), TYPE_SIZE_UNIT (etype),
|
||||||
|
OEP_ONLY_CONST))
|
||||||
TREE_CONSTANT (expr) = 0;
|
TREE_CONSTANT (expr) = 0;
|
||||||
|
|
||||||
return expr;
|
return expr;
|
||||||
|
@ -27,9 +27,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "varray.h"
|
#include "varray.h"
|
||||||
#include "partition.h"
|
#include "partition.h"
|
||||||
#include "hard-reg-set.h"
|
#include "hard-reg-set.h"
|
||||||
|
#include "predict.h"
|
||||||
|
|
||||||
/* Head of register set linked list. */
|
/* Head of register set linked list. */
|
||||||
typedef bitmap_head regset_head;
|
typedef bitmap_head regset_head;
|
||||||
|
|
||||||
/* A pointer to a regset_head. */
|
/* A pointer to a regset_head. */
|
||||||
typedef bitmap regset;
|
typedef bitmap regset;
|
||||||
|
|
||||||
@ -121,18 +123,24 @@ do { \
|
|||||||
typedef HOST_WIDEST_INT gcov_type;
|
typedef HOST_WIDEST_INT gcov_type;
|
||||||
|
|
||||||
/* Control flow edge information. */
|
/* Control flow edge information. */
|
||||||
typedef struct edge_def {
|
struct edge_def GTY((chain_next ("%h.pred_next")))
|
||||||
|
{
|
||||||
/* Links through the predecessor and successor lists. */
|
/* Links through the predecessor and successor lists. */
|
||||||
struct edge_def *pred_next, *succ_next;
|
struct edge_def *pred_next;
|
||||||
|
struct edge_def *succ_next;
|
||||||
|
|
||||||
/* The two blocks at the ends of the edge. */
|
/* The two blocks at the ends of the edge. */
|
||||||
struct basic_block_def *src, *dest;
|
struct basic_block_def *src;
|
||||||
|
struct basic_block_def *dest;
|
||||||
|
|
||||||
/* Instructions queued on the edge. */
|
/* Instructions queued on the edge. */
|
||||||
rtx insns;
|
union edge_def_insns {
|
||||||
|
rtx GTY ((tag ("0"))) r;
|
||||||
|
tree GTY ((tag ("1"))) t;
|
||||||
|
} GTY ((desc ("ir_type ()"))) insns;
|
||||||
|
|
||||||
/* Auxiliary info specific to a pass. */
|
/* Auxiliary info specific to a pass. */
|
||||||
void *aux;
|
PTR GTY ((skip (""))) aux;
|
||||||
|
|
||||||
int flags; /* see EDGE_* below */
|
int flags; /* see EDGE_* below */
|
||||||
int probability; /* biased by REG_BR_PROB_BASE */
|
int probability; /* biased by REG_BR_PROB_BASE */
|
||||||
@ -140,7 +148,9 @@ typedef struct edge_def {
|
|||||||
in profile.c */
|
in profile.c */
|
||||||
bool crossing_edge; /* Crosses between hot and cold sections, when
|
bool crossing_edge; /* Crosses between hot and cold sections, when
|
||||||
we do partitioning. */
|
we do partitioning. */
|
||||||
} *edge;
|
};
|
||||||
|
|
||||||
|
typedef struct edge_def *edge;
|
||||||
|
|
||||||
#define EDGE_FALLTHRU 1 /* 'Straight line' flow */
|
#define EDGE_FALLTHRU 1 /* 'Straight line' flow */
|
||||||
#define EDGE_ABNORMAL 2 /* Strange flow, like computed
|
#define EDGE_ABNORMAL 2 /* Strange flow, like computed
|
||||||
@ -155,7 +165,13 @@ typedef struct edge_def {
|
|||||||
#define EDGE_IRREDUCIBLE_LOOP 128 /* Part of irreducible loop. */
|
#define EDGE_IRREDUCIBLE_LOOP 128 /* Part of irreducible loop. */
|
||||||
#define EDGE_SIBCALL 256 /* Edge from sibcall to exit. */
|
#define EDGE_SIBCALL 256 /* Edge from sibcall to exit. */
|
||||||
#define EDGE_LOOP_EXIT 512 /* Exit of a loop. */
|
#define EDGE_LOOP_EXIT 512 /* Exit of a loop. */
|
||||||
#define EDGE_ALL_FLAGS 1023
|
#define EDGE_TRUE_VALUE 1024 /* Edge taken when controlling
|
||||||
|
predicate is non zero. */
|
||||||
|
#define EDGE_FALSE_VALUE 2048 /* Edge taken when controlling
|
||||||
|
predicate is zero. */
|
||||||
|
#define EDGE_EXECUTABLE 4096 /* Edge is executable. Only
|
||||||
|
valid during SSA-CCP. */
|
||||||
|
#define EDGE_ALL_FLAGS 8191
|
||||||
|
|
||||||
#define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH)
|
#define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH)
|
||||||
|
|
||||||
@ -167,6 +183,9 @@ extern const struct gcov_ctr_summary *profile_info;
|
|||||||
struct loop;
|
struct loop;
|
||||||
struct loops;
|
struct loops;
|
||||||
|
|
||||||
|
/* Declared in tree-flow.h. */
|
||||||
|
struct bb_ann_d;
|
||||||
|
|
||||||
/* A basic block is a sequence of instructions with only entry and
|
/* A basic block is a sequence of instructions with only entry and
|
||||||
only one exit. If any one of the instructions are executed, they
|
only one exit. If any one of the instructions are executed, they
|
||||||
will all be executed, and in sequence from first to last.
|
will all be executed, and in sequence from first to last.
|
||||||
@ -193,51 +212,54 @@ struct loops;
|
|||||||
basic blocks. */
|
basic blocks. */
|
||||||
|
|
||||||
/* Basic block information indexed by block number. */
|
/* Basic block information indexed by block number. */
|
||||||
typedef struct basic_block_def {
|
struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")))
|
||||||
|
{
|
||||||
/* The first and last insns of the block. */
|
/* The first and last insns of the block. */
|
||||||
rtx head_, end_;
|
rtx head_;
|
||||||
|
rtx end_;
|
||||||
|
|
||||||
/* The first and last trees of the block. */
|
/* Pointers to the first and last trees of the block. */
|
||||||
tree head_tree;
|
tree stmt_list;
|
||||||
tree end_tree;
|
|
||||||
|
|
||||||
/* The edges into and out of the block. */
|
/* The edges into and out of the block. */
|
||||||
edge pred, succ;
|
edge pred;
|
||||||
|
edge succ;
|
||||||
|
|
||||||
/* Liveness info. */
|
/* Liveness info. */
|
||||||
|
|
||||||
/* The registers that are modified within this in block. */
|
/* The registers that are modified within this in block. */
|
||||||
regset local_set;
|
bitmap GTY ((skip (""))) local_set;
|
||||||
/* The registers that are conditionally modified within this block.
|
/* The registers that are conditionally modified within this block.
|
||||||
In other words, registers that are set only as part of a
|
In other words, registers that are set only as part of a
|
||||||
COND_EXEC. */
|
COND_EXEC. */
|
||||||
regset cond_local_set;
|
bitmap GTY ((skip (""))) cond_local_set;
|
||||||
/* The registers that are live on entry to this block.
|
/* The registers that are live on entry to this block.
|
||||||
|
|
||||||
Note that in SSA form, global_live_at_start does not reflect the
|
Note that in SSA form, global_live_at_start does not reflect the
|
||||||
use of regs in phi functions, since the liveness of these regs
|
use of regs in phi functions, since the liveness of these regs
|
||||||
may depend on which edge was taken into the block. */
|
may depend on which edge was taken into the block. */
|
||||||
regset global_live_at_start;
|
bitmap GTY ((skip (""))) global_live_at_start;
|
||||||
/* The registers that are live on exit from this block. */
|
/* The registers that are live on exit from this block. */
|
||||||
regset global_live_at_end;
|
bitmap GTY ((skip (""))) global_live_at_end;
|
||||||
|
|
||||||
/* Auxiliary info specific to a pass. */
|
/* Auxiliary info specific to a pass. */
|
||||||
void *aux;
|
PTR GTY ((skip (""))) aux;
|
||||||
|
|
||||||
/* The index of this block. */
|
/* The index of this block. */
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
/* Previous and next blocks in the chain. */
|
/* Previous and next blocks in the chain. */
|
||||||
struct basic_block_def *prev_bb, *next_bb;
|
struct basic_block_def *prev_bb;
|
||||||
|
struct basic_block_def *next_bb;
|
||||||
|
|
||||||
/* The loop depth of this block. */
|
/* The loop depth of this block. */
|
||||||
int loop_depth;
|
int loop_depth;
|
||||||
|
|
||||||
/* Outermost loop containing the block. */
|
/* Innermost loop containing the block. */
|
||||||
struct loop *loop_father;
|
struct loop * GTY ((skip (""))) loop_father;
|
||||||
|
|
||||||
/* The dominance and postdominance information node. */
|
/* The dominance and postdominance information node. */
|
||||||
struct et_node *dom[2];
|
struct et_node * GTY ((skip (""))) dom[2];
|
||||||
|
|
||||||
/* Expected number of executions: calculated in profile.c. */
|
/* Expected number of executions: calculated in profile.c. */
|
||||||
gcov_type count;
|
gcov_type count;
|
||||||
@ -251,9 +273,31 @@ typedef struct basic_block_def {
|
|||||||
/* Which section block belongs in, when partitioning basic blocks. */
|
/* Which section block belongs in, when partitioning basic blocks. */
|
||||||
int partition;
|
int partition;
|
||||||
|
|
||||||
/* Additional data maintained by cfg_layout routines. */
|
/* The data used by basic block copying and reordering functions. */
|
||||||
struct reorder_block_def *rbi;
|
struct reorder_block_def * GTY ((skip (""))) rbi;
|
||||||
} *basic_block;
|
|
||||||
|
/* Annotations used at the tree level. */
|
||||||
|
struct bb_ann_d *tree_annotations;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct basic_block_def *basic_block;
|
||||||
|
|
||||||
|
/* Structure to hold information about the blocks during reordering and
|
||||||
|
copying. */
|
||||||
|
|
||||||
|
typedef struct reorder_block_def
|
||||||
|
{
|
||||||
|
rtx header;
|
||||||
|
rtx footer;
|
||||||
|
basic_block next;
|
||||||
|
basic_block original;
|
||||||
|
/* Used by loop copying. */
|
||||||
|
basic_block copy;
|
||||||
|
int duplicated;
|
||||||
|
|
||||||
|
/* These fields are used by bb-reorder pass. */
|
||||||
|
int visited;
|
||||||
|
} *reorder_block_def;
|
||||||
|
|
||||||
#define BB_FREQ_MAX 10000
|
#define BB_FREQ_MAX 10000
|
||||||
|
|
||||||
@ -285,7 +329,7 @@ extern int n_edges;
|
|||||||
|
|
||||||
/* Index by basic block number, get basic block struct info. */
|
/* Index by basic block number, get basic block struct info. */
|
||||||
|
|
||||||
extern varray_type basic_block_info;
|
extern GTY(()) varray_type basic_block_info;
|
||||||
|
|
||||||
#define BASIC_BLOCK(N) (VARRAY_BB (basic_block_info, (N)))
|
#define BASIC_BLOCK(N) (VARRAY_BB (basic_block_info, (N)))
|
||||||
|
|
||||||
@ -352,9 +396,8 @@ extern struct obstack flow_obstack;
|
|||||||
#define INVALID_BLOCK (-3)
|
#define INVALID_BLOCK (-3)
|
||||||
|
|
||||||
/* Similarly, block pointers for the edge list. */
|
/* Similarly, block pointers for the edge list. */
|
||||||
extern struct basic_block_def entry_exit_blocks[2];
|
extern GTY(()) basic_block ENTRY_BLOCK_PTR;
|
||||||
#define ENTRY_BLOCK_PTR (&entry_exit_blocks[0])
|
extern GTY(()) basic_block EXIT_BLOCK_PTR;
|
||||||
#define EXIT_BLOCK_PTR (&entry_exit_blocks[1])
|
|
||||||
|
|
||||||
#define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0)
|
#define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0)
|
||||||
#define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB)
|
#define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB)
|
||||||
@ -374,7 +417,6 @@ extern void commit_edge_insertions_watch_calls (void);
|
|||||||
extern void remove_fake_edges (void);
|
extern void remove_fake_edges (void);
|
||||||
extern void add_noreturn_fake_exit_edges (void);
|
extern void add_noreturn_fake_exit_edges (void);
|
||||||
extern void connect_infinite_loops_to_exit (void);
|
extern void connect_infinite_loops_to_exit (void);
|
||||||
extern int flow_call_edges_add (sbitmap);
|
|
||||||
extern edge unchecked_make_edge (basic_block, basic_block, int);
|
extern edge unchecked_make_edge (basic_block, basic_block, int);
|
||||||
extern edge cached_make_edge (sbitmap *, basic_block, basic_block, int);
|
extern edge cached_make_edge (sbitmap *, basic_block, basic_block, int);
|
||||||
extern edge make_edge (basic_block, basic_block, int);
|
extern edge make_edge (basic_block, basic_block, int);
|
||||||
@ -392,6 +434,7 @@ extern int dfs_enumerate_from (basic_block, int,
|
|||||||
bool (*)(basic_block, void *),
|
bool (*)(basic_block, void *),
|
||||||
basic_block *, int, void *);
|
basic_block *, int, void *);
|
||||||
extern void dump_edge_info (FILE *, edge, int);
|
extern void dump_edge_info (FILE *, edge, int);
|
||||||
|
extern void brief_dump_cfg (FILE *);
|
||||||
extern void clear_edges (void);
|
extern void clear_edges (void);
|
||||||
extern void mark_critical_edges (void);
|
extern void mark_critical_edges (void);
|
||||||
extern rtx first_insn_after_basic_block_note (basic_block);
|
extern rtx first_insn_after_basic_block_note (basic_block);
|
||||||
@ -472,6 +515,7 @@ void free_edge_list (struct edge_list *);
|
|||||||
void print_edge_list (FILE *, struct edge_list *);
|
void print_edge_list (FILE *, struct edge_list *);
|
||||||
void verify_edge_list (FILE *, struct edge_list *);
|
void verify_edge_list (FILE *, struct edge_list *);
|
||||||
int find_edge_index (struct edge_list *, basic_block, basic_block);
|
int find_edge_index (struct edge_list *, basic_block, basic_block);
|
||||||
|
edge find_edge (basic_block, basic_block);
|
||||||
|
|
||||||
|
|
||||||
enum update_life_extent
|
enum update_life_extent
|
||||||
@ -554,6 +598,11 @@ extern void expected_value_to_br_prob (void);
|
|||||||
extern bool maybe_hot_bb_p (basic_block);
|
extern bool maybe_hot_bb_p (basic_block);
|
||||||
extern bool probably_cold_bb_p (basic_block);
|
extern bool probably_cold_bb_p (basic_block);
|
||||||
extern bool probably_never_executed_bb_p (basic_block);
|
extern bool probably_never_executed_bb_p (basic_block);
|
||||||
|
extern bool tree_predicted_by_p (basic_block, enum br_predictor);
|
||||||
|
extern bool rtl_predicted_by_p (basic_block, enum br_predictor);
|
||||||
|
extern void tree_predict_edge (edge, enum br_predictor, int);
|
||||||
|
extern void rtl_predict_edge (edge, enum br_predictor, int);
|
||||||
|
extern void predict_edge_def (edge, enum br_predictor, enum prediction);
|
||||||
|
|
||||||
/* In flow.c */
|
/* In flow.c */
|
||||||
extern void init_flow (void);
|
extern void init_flow (void);
|
||||||
@ -577,7 +626,7 @@ extern bool purge_all_dead_edges (int);
|
|||||||
extern bool purge_dead_edges (basic_block);
|
extern bool purge_dead_edges (basic_block);
|
||||||
extern void find_sub_basic_blocks (basic_block);
|
extern void find_sub_basic_blocks (basic_block);
|
||||||
extern void find_many_sub_basic_blocks (sbitmap);
|
extern void find_many_sub_basic_blocks (sbitmap);
|
||||||
extern void make_eh_edge (sbitmap *, basic_block, rtx);
|
extern void rtl_make_eh_edge (sbitmap *, basic_block, rtx);
|
||||||
extern bool can_fallthru (basic_block, basic_block);
|
extern bool can_fallthru (basic_block, basic_block);
|
||||||
extern void flow_nodes_print (const char *, const sbitmap, FILE *);
|
extern void flow_nodes_print (const char *, const sbitmap, FILE *);
|
||||||
extern void flow_edge_list_print (const char *, const edge *, int, FILE *);
|
extern void flow_edge_list_print (const char *, const edge *, int, FILE *);
|
||||||
@ -589,6 +638,10 @@ extern void alloc_aux_for_edge (edge, int);
|
|||||||
extern void alloc_aux_for_edges (int);
|
extern void alloc_aux_for_edges (int);
|
||||||
extern void clear_aux_for_edges (void);
|
extern void clear_aux_for_edges (void);
|
||||||
extern void free_aux_for_edges (void);
|
extern void free_aux_for_edges (void);
|
||||||
|
extern void find_basic_blocks (rtx, int, FILE *);
|
||||||
|
extern bool cleanup_cfg (int);
|
||||||
|
extern bool delete_unreachable_blocks (void);
|
||||||
|
extern bool merge_seq_blocks (void);
|
||||||
|
|
||||||
typedef struct conflict_graph_def *conflict_graph;
|
typedef struct conflict_graph_def *conflict_graph;
|
||||||
|
|
||||||
@ -624,6 +677,11 @@ extern bool control_flow_insn_p (rtx);
|
|||||||
extern void reorder_basic_blocks (void);
|
extern void reorder_basic_blocks (void);
|
||||||
extern void partition_hot_cold_basic_blocks (void);
|
extern void partition_hot_cold_basic_blocks (void);
|
||||||
|
|
||||||
|
/* In cfg.c */
|
||||||
|
extern void alloc_rbi_pool (void);
|
||||||
|
extern void initialize_bb_rbi (basic_block bb);
|
||||||
|
extern void free_rbi_pool (void);
|
||||||
|
|
||||||
/* In dominance.c */
|
/* In dominance.c */
|
||||||
|
|
||||||
enum cdi_direction
|
enum cdi_direction
|
||||||
@ -661,7 +719,7 @@ extern void iterate_fix_dominators (enum cdi_direction, basic_block *, int);
|
|||||||
extern void verify_dominators (enum cdi_direction);
|
extern void verify_dominators (enum cdi_direction);
|
||||||
extern basic_block first_dom_son (enum cdi_direction, basic_block);
|
extern basic_block first_dom_son (enum cdi_direction, basic_block);
|
||||||
extern basic_block next_dom_son (enum cdi_direction, basic_block);
|
extern basic_block next_dom_son (enum cdi_direction, basic_block);
|
||||||
extern bool try_redirect_by_replacing_jump (edge, basic_block, bool);
|
extern edge try_redirect_by_replacing_jump (edge, basic_block, bool);
|
||||||
extern void break_superblocks (void);
|
extern void break_superblocks (void);
|
||||||
|
|
||||||
#include "cfghooks.h"
|
#include "cfghooks.h"
|
||||||
|
@ -749,7 +749,7 @@ copy_bb (basic_block old_bb, edge e, basic_block bb, int trace)
|
|||||||
{
|
{
|
||||||
basic_block new_bb;
|
basic_block new_bb;
|
||||||
|
|
||||||
new_bb = cfg_layout_duplicate_bb (old_bb, e);
|
new_bb = duplicate_block (old_bb, e);
|
||||||
if (e->dest != new_bb)
|
if (e->dest != new_bb)
|
||||||
abort ();
|
abort ();
|
||||||
if (e->dest->rbi->visited)
|
if (e->dest->rbi->visited)
|
||||||
@ -1177,7 +1177,7 @@ copy_bb_p (basic_block bb, int code_may_grow)
|
|||||||
return false;
|
return false;
|
||||||
if (!bb->pred || !bb->pred->pred_next)
|
if (!bb->pred || !bb->pred->pred_next)
|
||||||
return false;
|
return false;
|
||||||
if (!cfg_layout_can_duplicate_bb_p (bb))
|
if (!can_duplicate_block_p (bb))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Avoid duplicating blocks which have many successors (PR/13430). */
|
/* Avoid duplicating blocks which have many successors (PR/13430). */
|
||||||
|
@ -414,7 +414,9 @@ bitmap_first_set_bit (bitmap a)
|
|||||||
#else
|
#else
|
||||||
for (word_num = 0; word_num < BITMAP_ELEMENT_WORDS; ++word_num)
|
for (word_num = 0; word_num < BITMAP_ELEMENT_WORDS; ++word_num)
|
||||||
if ((word = ptr->bits[word_num]) != 0)
|
if ((word = ptr->bits[word_num]) != 0)
|
||||||
break;
|
goto word_found;
|
||||||
|
abort ();
|
||||||
|
word_found:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Binary search for the first set bit. */
|
/* Binary search for the first set bit. */
|
||||||
@ -469,7 +471,9 @@ bitmap_last_set_bit (bitmap a)
|
|||||||
#else
|
#else
|
||||||
for (word_num = BITMAP_ELEMENT_WORDS; word_num-- > 0; )
|
for (word_num = BITMAP_ELEMENT_WORDS; word_num-- > 0; )
|
||||||
if ((word = ptr->bits[word_num]) != 0)
|
if ((word = ptr->bits[word_num]) != 0)
|
||||||
break;
|
goto word_found;
|
||||||
|
abort ();
|
||||||
|
word_found:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Binary search for the last set bit. */
|
/* Binary search for the last set bit. */
|
||||||
|
@ -227,6 +227,7 @@ DEF_FUNCTION_TYPE_2 (BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE_COMPLEX_DOUBLE,
|
|||||||
BT_COMPLEX_DOUBLE, BT_COMPLEX_DOUBLE, BT_COMPLEX_DOUBLE)
|
BT_COMPLEX_DOUBLE, BT_COMPLEX_DOUBLE, BT_COMPLEX_DOUBLE)
|
||||||
DEF_FUNCTION_TYPE_2 (BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE,
|
DEF_FUNCTION_TYPE_2 (BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE,
|
||||||
BT_COMPLEX_LONGDOUBLE, BT_COMPLEX_LONGDOUBLE, BT_COMPLEX_LONGDOUBLE)
|
BT_COMPLEX_LONGDOUBLE, BT_COMPLEX_LONGDOUBLE, BT_COMPLEX_LONGDOUBLE)
|
||||||
|
DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_PTR, BT_VOID, BT_PTR, BT_PTR)
|
||||||
DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_STRING_PTR_CONST_STRING,
|
DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_STRING_PTR_CONST_STRING,
|
||||||
BT_INT, BT_CONST_STRING, BT_PTR_CONST_STRING)
|
BT_INT, BT_CONST_STRING, BT_PTR_CONST_STRING)
|
||||||
|
|
||||||
@ -270,6 +271,7 @@ DEF_FUNCTION_TYPE_3 (BT_FN_VOID_DOUBLE_DOUBLEPTR_DOUBLEPTR,
|
|||||||
BT_VOID, BT_DOUBLE, BT_DOUBLE_PTR, BT_DOUBLE_PTR)
|
BT_VOID, BT_DOUBLE, BT_DOUBLE_PTR, BT_DOUBLE_PTR)
|
||||||
DEF_FUNCTION_TYPE_3 (BT_FN_VOID_LONGDOUBLE_LONGDOUBLEPTR_LONGDOUBLEPTR,
|
DEF_FUNCTION_TYPE_3 (BT_FN_VOID_LONGDOUBLE_LONGDOUBLEPTR_LONGDOUBLEPTR,
|
||||||
BT_VOID, BT_LONGDOUBLE, BT_LONGDOUBLE_PTR, BT_LONGDOUBLE_PTR)
|
BT_VOID, BT_LONGDOUBLE, BT_LONGDOUBLE_PTR, BT_LONGDOUBLE_PTR)
|
||||||
|
DEF_FUNCTION_TYPE_3 (BT_FN_VOID_PTR_PTR_PTR, BT_VOID, BT_PTR, BT_PTR, BT_PTR)
|
||||||
DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING,
|
DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING,
|
||||||
BT_INT, BT_CONST_STRING, BT_PTR_CONST_STRING, BT_PTR_CONST_STRING)
|
BT_INT, BT_CONST_STRING, BT_PTR_CONST_STRING, BT_PTR_CONST_STRING)
|
||||||
|
|
||||||
|
1521
gcc/builtins.c
1521
gcc/builtins.c
File diff suppressed because it is too large
Load Diff
@ -593,6 +593,9 @@ DEF_GCC_BUILTIN (BUILT_IN_RETURN, "return", BT_FN_VOID_PTR, ATTR_NORETURN
|
|||||||
DEF_GCC_BUILTIN (BUILT_IN_RETURN_ADDRESS, "return_address", BT_FN_PTR_UNSIGNED, ATTR_NULL)
|
DEF_GCC_BUILTIN (BUILT_IN_RETURN_ADDRESS, "return_address", BT_FN_PTR_UNSIGNED, ATTR_NULL)
|
||||||
DEF_GCC_BUILTIN (BUILT_IN_SAVEREGS, "saveregs", BT_FN_PTR_VAR, ATTR_NULL)
|
DEF_GCC_BUILTIN (BUILT_IN_SAVEREGS, "saveregs", BT_FN_PTR_VAR, ATTR_NULL)
|
||||||
DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_NULL)
|
DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_NULL)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_STACK_ALLOC, "stack_alloc", BT_FN_VOID_PTR_SIZE, ATTR_NULL)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_STACK_SAVE, "stack_save", BT_FN_PTR, ATTR_NULL)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_STACK_RESTORE, "stack_restore", BT_FN_VOID_PTR, ATTR_NULL)
|
||||||
DEF_GCC_BUILTIN (BUILT_IN_STDARG_START, "stdarg_start", BT_FN_VOID_VALIST_REF_VAR, ATTR_NULL)
|
DEF_GCC_BUILTIN (BUILT_IN_STDARG_START, "stdarg_start", BT_FN_VOID_VALIST_REF_VAR, ATTR_NULL)
|
||||||
DEF_EXT_LIB_BUILTIN (BUILT_IN_STRFMON, "strfmon", BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR, ATTR_FORMAT_STRFMON_3_4)
|
DEF_EXT_LIB_BUILTIN (BUILT_IN_STRFMON, "strfmon", BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR, ATTR_FORMAT_STRFMON_3_4)
|
||||||
DEF_LIB_BUILTIN (BUILT_IN_STRFTIME, "strftime", BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR, ATTR_FORMAT_STRFTIME_3_0)
|
DEF_LIB_BUILTIN (BUILT_IN_STRFTIME, "strftime", BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR, ATTR_FORMAT_STRFTIME_3_0)
|
||||||
@ -604,3 +607,12 @@ DEF_GCC_BUILTIN (BUILT_IN_VA_END, "va_end", BT_FN_VOID_VALIST_REF, ATTR_N
|
|||||||
DEF_GCC_BUILTIN (BUILT_IN_VA_START, "va_start", BT_FN_VOID_VALIST_REF_VAR, ATTR_NULL)
|
DEF_GCC_BUILTIN (BUILT_IN_VA_START, "va_start", BT_FN_VOID_VALIST_REF_VAR, ATTR_NULL)
|
||||||
DEF_EXT_LIB_BUILTIN (BUILT_IN__EXIT, "_exit", BT_FN_VOID_INT, ATTR_NORETURN_NOTHROW_LIST)
|
DEF_EXT_LIB_BUILTIN (BUILT_IN__EXIT, "_exit", BT_FN_VOID_INT, ATTR_NORETURN_NOTHROW_LIST)
|
||||||
DEF_C99_BUILTIN (BUILT_IN__EXIT2, "_Exit", BT_FN_VOID_INT, ATTR_NORETURN_NOTHROW_LIST)
|
DEF_C99_BUILTIN (BUILT_IN__EXIT2, "_Exit", BT_FN_VOID_INT, ATTR_NORETURN_NOTHROW_LIST)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_INIT_TRAMPOLINE, "init_trampoline", BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LIST)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_ADJUST_TRAMPOLINE, "adjust_trampoline", BT_FN_PTR_PTR, ATTR_CONST_NOTHROW_LIST)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_NONLOCAL_GOTO, "nonlocal_goto", BT_FN_PTR_PTR, ATTR_NORETURN_NOTHROW_LIST)
|
||||||
|
|
||||||
|
/* Profiling hooks. */
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_PROFILE_FUNC_ENTER, "profile_func_enter",
|
||||||
|
BT_FN_VOID, ATTR_NULL)
|
||||||
|
DEF_GCC_BUILTIN (BUILT_IN_PROFILE_FUNC_EXIT, "profile_func_exit",
|
||||||
|
BT_FN_VOID, ATTR_NULL)
|
||||||
|
619
gcc/c-common.c
619
gcc/c-common.c
@ -42,6 +42,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "tree-inline.h"
|
#include "tree-inline.h"
|
||||||
#include "c-tree.h"
|
#include "c-tree.h"
|
||||||
#include "toplev.h"
|
#include "toplev.h"
|
||||||
|
#include "tree-iterator.h"
|
||||||
|
#include "hashtab.h"
|
||||||
|
|
||||||
cpp_reader *parse_in; /* Declared in c-pragma.h. */
|
cpp_reader *parse_in; /* Declared in c-pragma.h. */
|
||||||
|
|
||||||
@ -681,6 +683,15 @@ tree *ridpointers;
|
|||||||
|
|
||||||
tree (*make_fname_decl) (tree, int);
|
tree (*make_fname_decl) (tree, int);
|
||||||
|
|
||||||
|
/* If non-NULL, the address of a language-specific function that
|
||||||
|
returns 1 for language-specific statement codes. */
|
||||||
|
int (*lang_statement_code_p) (enum tree_code);
|
||||||
|
|
||||||
|
/* If non-NULL, the address of a language-specific function that does any
|
||||||
|
language-specific gimplification for _STMT nodes and returns 1 iff
|
||||||
|
handled. */
|
||||||
|
int (*lang_gimplify_stmt) (tree *, tree *);
|
||||||
|
|
||||||
/* If non-NULL, the address of a language-specific function that takes
|
/* If non-NULL, the address of a language-specific function that takes
|
||||||
any action required right before expand_function_end is called. */
|
any action required right before expand_function_end is called. */
|
||||||
void (*lang_expand_function_end) (void);
|
void (*lang_expand_function_end) (void);
|
||||||
@ -918,7 +929,7 @@ c_expand_end_cond (void)
|
|||||||
if_stack_pointer--;
|
if_stack_pointer--;
|
||||||
if (if_stack[if_stack_pointer].needs_warning)
|
if (if_stack[if_stack_pointer].needs_warning)
|
||||||
warning ("%Hsuggest explicit braces to avoid ambiguous `else'",
|
warning ("%Hsuggest explicit braces to avoid ambiguous `else'",
|
||||||
&if_stack[if_stack_pointer].locus);
|
&if_stack[if_stack_pointer].locus);
|
||||||
last_expr_type = NULL_TREE;
|
last_expr_type = NULL_TREE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1183,6 +1194,7 @@ fix_string_type (tree value)
|
|||||||
build_index_type (build_int_2 (nchars - 1, 0)));
|
build_index_type (build_int_2 (nchars - 1, 0)));
|
||||||
|
|
||||||
TREE_CONSTANT (value) = 1;
|
TREE_CONSTANT (value) = 1;
|
||||||
|
TREE_INVARIANT (value) = 1;
|
||||||
TREE_READONLY (value) = 1;
|
TREE_READONLY (value) = 1;
|
||||||
TREE_STATIC (value) = 1;
|
TREE_STATIC (value) = 1;
|
||||||
return value;
|
return value;
|
||||||
@ -1315,7 +1327,7 @@ convert_and_check (tree type, tree expr)
|
|||||||
|| TYPE_UNSIGNED (type)
|
|| TYPE_UNSIGNED (type)
|
||||||
|| ! constant_fits_type_p (expr,
|
|| ! constant_fits_type_p (expr,
|
||||||
c_common_unsigned_type (type)))
|
c_common_unsigned_type (type)))
|
||||||
&& skip_evaluation == 0)
|
&& skip_evaluation == 0)
|
||||||
warning ("overflow in implicit constant conversion");
|
warning ("overflow in implicit constant conversion");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1851,7 +1863,7 @@ c_common_type_for_mode (enum machine_mode mode, int unsignedp)
|
|||||||
|
|
||||||
if (mode == TYPE_MODE (widest_integer_literal_type_node))
|
if (mode == TYPE_MODE (widest_integer_literal_type_node))
|
||||||
return unsignedp ? widest_unsigned_literal_type_node
|
return unsignedp ? widest_unsigned_literal_type_node
|
||||||
: widest_integer_literal_type_node;
|
: widest_integer_literal_type_node;
|
||||||
|
|
||||||
if (mode == QImode)
|
if (mode == QImode)
|
||||||
return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
|
return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
|
||||||
@ -2473,9 +2485,6 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
|
|||||||
{
|
{
|
||||||
tree size_exp;
|
tree size_exp;
|
||||||
|
|
||||||
tree result;
|
|
||||||
tree folded;
|
|
||||||
|
|
||||||
/* The result is a pointer of the same type that is being added. */
|
/* The result is a pointer of the same type that is being added. */
|
||||||
|
|
||||||
tree result_type = TREE_TYPE (ptrop);
|
tree result_type = TREE_TYPE (ptrop);
|
||||||
@ -2549,13 +2558,7 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
|
|||||||
convert (TREE_TYPE (intop), size_exp), 1));
|
convert (TREE_TYPE (intop), size_exp), 1));
|
||||||
|
|
||||||
/* Create the sum or difference. */
|
/* Create the sum or difference. */
|
||||||
|
return fold (build (resultcode, result_type, ptrop, intop));
|
||||||
result = build (resultcode, result_type, ptrop, intop);
|
|
||||||
|
|
||||||
folded = fold (result);
|
|
||||||
if (folded == result)
|
|
||||||
TREE_CONSTANT (folded) = TREE_CONSTANT (ptrop) & TREE_CONSTANT (intop);
|
|
||||||
return folded;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
|
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
|
||||||
@ -2796,6 +2799,49 @@ c_apply_type_quals_to_decl (int type_quals, tree decl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hash function for the problem of multiple type definitions in
|
||||||
|
different files. This must hash all types that will compare
|
||||||
|
equal via comptypes to the same value. In practice it hashes
|
||||||
|
on some of the simple stuff and leaves the details to comptypes. */
|
||||||
|
|
||||||
|
static hashval_t
|
||||||
|
c_type_hash (const void *p)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
int shift, size;
|
||||||
|
tree t = (tree)p;
|
||||||
|
tree t2;
|
||||||
|
switch (TREE_CODE (t))
|
||||||
|
{
|
||||||
|
/* For pointers, hash on pointee type plus some swizzling. */
|
||||||
|
case POINTER_TYPE:
|
||||||
|
return c_type_hash (TREE_TYPE (t)) ^ 0x3003003;
|
||||||
|
/* Hash on number of elements and total size. */
|
||||||
|
case ENUMERAL_TYPE:
|
||||||
|
shift = 3;
|
||||||
|
t2 = TYPE_VALUES (t);
|
||||||
|
break;
|
||||||
|
case RECORD_TYPE:
|
||||||
|
shift = 0;
|
||||||
|
t2 = TYPE_FIELDS (t);
|
||||||
|
break;
|
||||||
|
case QUAL_UNION_TYPE:
|
||||||
|
shift = 1;
|
||||||
|
t2 = TYPE_FIELDS (t);
|
||||||
|
break;
|
||||||
|
case UNION_TYPE:
|
||||||
|
shift = 2;
|
||||||
|
t2 = TYPE_FIELDS (t);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
for (; t2; t2 = TREE_CHAIN (t2))
|
||||||
|
i++;
|
||||||
|
size = TREE_INT_CST_LOW (TYPE_SIZE (t));
|
||||||
|
return ((size << 24) | (i << shift));
|
||||||
|
}
|
||||||
|
|
||||||
/* Return the typed-based alias set for T, which may be an expression
|
/* Return the typed-based alias set for T, which may be an expression
|
||||||
or a type. Return -1 if we don't do anything special. */
|
or a type. Return -1 if we don't do anything special. */
|
||||||
|
|
||||||
@ -2803,6 +2849,8 @@ HOST_WIDE_INT
|
|||||||
c_common_get_alias_set (tree t)
|
c_common_get_alias_set (tree t)
|
||||||
{
|
{
|
||||||
tree u;
|
tree u;
|
||||||
|
PTR *slot;
|
||||||
|
static htab_t type_hash_table;
|
||||||
|
|
||||||
/* Permit type-punning when accessing a union, provided the access
|
/* Permit type-punning when accessing a union, provided the access
|
||||||
is directly through the union. For example, this code does not
|
is directly through the union. For example, this code does not
|
||||||
@ -2859,14 +2907,14 @@ c_common_get_alias_set (tree t)
|
|||||||
technically, an `int **' and `const int **' cannot point at
|
technically, an `int **' and `const int **' cannot point at
|
||||||
the same thing.
|
the same thing.
|
||||||
|
|
||||||
But, the standard is wrong. In particular, this code is
|
But, the standard is wrong. In particular, this code is
|
||||||
legal C++:
|
legal C++:
|
||||||
|
|
||||||
int *ip;
|
int *ip;
|
||||||
int **ipp = &ip;
|
int **ipp = &ip;
|
||||||
const int* const* cipp = ipp;
|
const int* const* cipp = ipp;
|
||||||
|
|
||||||
And, it doesn't make sense for that to be legal unless you
|
And, it doesn't make sense for that to be legal unless you
|
||||||
can dereference IPP and CIPP. So, we ignore cv-qualifiers on
|
can dereference IPP and CIPP. So, we ignore cv-qualifiers on
|
||||||
the pointed-to types. This issue has been reported to the
|
the pointed-to types. This issue has been reported to the
|
||||||
C++ committee. */
|
C++ committee. */
|
||||||
@ -2875,6 +2923,63 @@ c_common_get_alias_set (tree t)
|
|||||||
return get_alias_set (t1);
|
return get_alias_set (t1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle the case of multiple type nodes referring to "the same" type,
|
||||||
|
which occurs with IMA. These share an alias set. FIXME: Currently only
|
||||||
|
C90 is handled. (In C99 type compatibility is not transitive, which
|
||||||
|
complicates things mightily. The alias set splay trees can theoretically
|
||||||
|
represent this, but insertion is tricky when you consider all the
|
||||||
|
different orders things might arrive in.) */
|
||||||
|
|
||||||
|
if (c_language != clk_c || flag_isoc99)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
/* Save time if there's only one input file. */
|
||||||
|
if (!current_file_decl || TREE_CHAIN (current_file_decl) == NULL_TREE)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
/* Pointers need special handling if they point to any type that
|
||||||
|
needs special handling (below). */
|
||||||
|
if (TREE_CODE (t) == POINTER_TYPE)
|
||||||
|
{
|
||||||
|
tree t2;
|
||||||
|
/* Find bottom type under any nested POINTERs. */
|
||||||
|
for (t2 = TREE_TYPE (t);
|
||||||
|
TREE_CODE (t2) == POINTER_TYPE;
|
||||||
|
t2 = TREE_TYPE (t2))
|
||||||
|
;
|
||||||
|
if (TREE_CODE (t2) != RECORD_TYPE
|
||||||
|
&& TREE_CODE (t2) != ENUMERAL_TYPE
|
||||||
|
&& TREE_CODE (t2) != QUAL_UNION_TYPE
|
||||||
|
&& TREE_CODE (t2) != UNION_TYPE)
|
||||||
|
return -1;
|
||||||
|
if (TYPE_SIZE (t2) == 0)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
/* These are the only cases that need special handling. */
|
||||||
|
if (TREE_CODE (t) != RECORD_TYPE
|
||||||
|
&& TREE_CODE (t) != ENUMERAL_TYPE
|
||||||
|
&& TREE_CODE (t) != QUAL_UNION_TYPE
|
||||||
|
&& TREE_CODE (t) != UNION_TYPE
|
||||||
|
&& TREE_CODE (t) != POINTER_TYPE)
|
||||||
|
return -1;
|
||||||
|
/* Undefined? */
|
||||||
|
if (TYPE_SIZE (t) == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
/* Look up t in hash table. Only one of the compatible types within each
|
||||||
|
alias set is recorded in the table. */
|
||||||
|
if (!type_hash_table)
|
||||||
|
type_hash_table = htab_create (1021, c_type_hash,
|
||||||
|
(htab_eq) lang_hooks.types_compatible_p,
|
||||||
|
NULL);
|
||||||
|
slot = htab_find_slot (type_hash_table, t, INSERT);
|
||||||
|
if (*slot != NULL)
|
||||||
|
return TYPE_ALIAS_SET ((tree)*slot);
|
||||||
|
else
|
||||||
|
/* Our caller will assign and record (in t) a new alias set; all we need
|
||||||
|
to do is remember t in the hash table. */
|
||||||
|
*slot = t;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3413,7 +3518,7 @@ c_common_nodes_and_builtins (void)
|
|||||||
\
|
\
|
||||||
built_in_decls[(int) ENUM] = decl; \
|
built_in_decls[(int) ENUM] = decl; \
|
||||||
if (IMPLICIT) \
|
if (IMPLICIT) \
|
||||||
implicit_built_in_decls[(int) ENUM] = decl; \
|
implicit_built_in_decls[(int) ENUM] = decl; \
|
||||||
}
|
}
|
||||||
#include "builtins.def"
|
#include "builtins.def"
|
||||||
#undef DEF_BUILTIN
|
#undef DEF_BUILTIN
|
||||||
@ -3843,19 +3948,12 @@ c_add_case_label (splay_tree cases, tree cond, tree low_value,
|
|||||||
splay_tree_node node;
|
splay_tree_node node;
|
||||||
|
|
||||||
/* Create the LABEL_DECL itself. */
|
/* Create the LABEL_DECL itself. */
|
||||||
label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
|
label = create_artificial_label ();
|
||||||
DECL_CONTEXT (label) = current_function_decl;
|
|
||||||
|
|
||||||
/* If there was an error processing the switch condition, bail now
|
/* If there was an error processing the switch condition, bail now
|
||||||
before we get more confused. */
|
before we get more confused. */
|
||||||
if (!cond || cond == error_mark_node)
|
if (!cond || cond == error_mark_node)
|
||||||
{
|
goto error_out;
|
||||||
/* Add a label anyhow so that the back-end doesn't think that
|
|
||||||
the beginning of the switch is unreachable. */
|
|
||||||
if (!cases->root)
|
|
||||||
add_stmt (build_case_label (NULL_TREE, NULL_TREE, label));
|
|
||||||
return error_mark_node;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((low_value && TREE_TYPE (low_value)
|
if ((low_value && TREE_TYPE (low_value)
|
||||||
&& POINTER_TYPE_P (TREE_TYPE (low_value)))
|
&& POINTER_TYPE_P (TREE_TYPE (low_value)))
|
||||||
@ -3881,11 +3979,7 @@ c_add_case_label (splay_tree cases, tree cond, tree low_value,
|
|||||||
|
|
||||||
/* If an error has occurred, bail out now. */
|
/* If an error has occurred, bail out now. */
|
||||||
if (low_value == error_mark_node || high_value == error_mark_node)
|
if (low_value == error_mark_node || high_value == error_mark_node)
|
||||||
{
|
goto error_out;
|
||||||
if (!cases->root)
|
|
||||||
add_stmt (build_case_label (NULL_TREE, NULL_TREE, label));
|
|
||||||
return error_mark_node;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the LOW_VALUE and HIGH_VALUE are the same, then this isn't
|
/* If the LOW_VALUE and HIGH_VALUE are the same, then this isn't
|
||||||
really a case range, even though it was written that way. Remove
|
really a case range, even though it was written that way. Remove
|
||||||
@ -3958,8 +4052,7 @@ c_add_case_label (splay_tree cases, tree cond, tree low_value,
|
|||||||
error ("multiple default labels in one switch");
|
error ("multiple default labels in one switch");
|
||||||
error ("%Jthis is the first default label", duplicate);
|
error ("%Jthis is the first default label", duplicate);
|
||||||
}
|
}
|
||||||
if (!cases->root)
|
goto error_out;
|
||||||
add_stmt (build_case_label (NULL_TREE, NULL_TREE, label));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a CASE_LABEL to the statement-tree. */
|
/* Add a CASE_LABEL to the statement-tree. */
|
||||||
@ -3970,6 +4063,160 @@ c_add_case_label (splay_tree cases, tree cond, tree low_value,
|
|||||||
(splay_tree_value) case_label);
|
(splay_tree_value) case_label);
|
||||||
|
|
||||||
return case_label;
|
return case_label;
|
||||||
|
|
||||||
|
error_out:
|
||||||
|
/* Add a label so that the back-end doesn't think that the beginning o
|
||||||
|
the switch is unreachable. Note that we do not add a case label, as
|
||||||
|
that just leads to duplicates and thence to aborts later on. */
|
||||||
|
if (!cases->root)
|
||||||
|
{
|
||||||
|
tree t = create_artificial_label ();
|
||||||
|
add_stmt (build_stmt (LABEL_STMT, t));
|
||||||
|
}
|
||||||
|
return error_mark_node;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Subroutines of c_do_switch_warnings, called via splay_tree_foreach.
|
||||||
|
Used to verify that case values match up with enumerator values. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
match_case_to_enum_1 (tree key, tree type, tree label)
|
||||||
|
{
|
||||||
|
char buf[2 + 2*HOST_BITS_PER_WIDE_INT/4 + 1];
|
||||||
|
|
||||||
|
/* ??? Not working too hard to print the double-word value.
|
||||||
|
Should perhaps be done with %lwd in the diagnostic routines? */
|
||||||
|
if (TREE_INT_CST_HIGH (key) == 0)
|
||||||
|
snprintf (buf, sizeof (buf), HOST_WIDE_INT_PRINT_UNSIGNED,
|
||||||
|
TREE_INT_CST_LOW (key));
|
||||||
|
else if (!TYPE_UNSIGNED (type)
|
||||||
|
&& TREE_INT_CST_HIGH (key) == -1
|
||||||
|
&& TREE_INT_CST_LOW (key) != 0)
|
||||||
|
snprintf (buf, sizeof (buf), "-" HOST_WIDE_INT_PRINT_UNSIGNED,
|
||||||
|
-TREE_INT_CST_LOW (key));
|
||||||
|
else
|
||||||
|
snprintf (buf, sizeof (buf), HOST_WIDE_INT_PRINT_DOUBLE_HEX,
|
||||||
|
TREE_INT_CST_HIGH (key), TREE_INT_CST_LOW (key));
|
||||||
|
|
||||||
|
if (TYPE_NAME (type) == 0)
|
||||||
|
warning ("%Jcase value `%s' not in enumerated type",
|
||||||
|
CASE_LABEL_DECL (label), buf);
|
||||||
|
else
|
||||||
|
warning ("%Jcase value `%s' not in enumerated type `%T'",
|
||||||
|
CASE_LABEL_DECL (label), buf, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
match_case_to_enum (splay_tree_node node, void *data)
|
||||||
|
{
|
||||||
|
tree label = (tree) node->value;
|
||||||
|
tree type = data;
|
||||||
|
|
||||||
|
/* Skip default case. */
|
||||||
|
if (!CASE_LOW (label))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* If TREE_ADDRESSABLE is not set, that means CASE_LOW did not appear
|
||||||
|
when we did our enum->case scan. Reset our scratch bit after. */
|
||||||
|
if (!TREE_ADDRESSABLE (label))
|
||||||
|
match_case_to_enum_1 (CASE_LOW (label), type, label);
|
||||||
|
else
|
||||||
|
TREE_ADDRESSABLE (label) = 0;
|
||||||
|
|
||||||
|
/* If CASE_HIGH is non-null, we have a range. Here we must search.
|
||||||
|
Note that the old code in stmt.c did not check for the values in
|
||||||
|
the range either, just the endpoints. */
|
||||||
|
if (CASE_HIGH (label))
|
||||||
|
{
|
||||||
|
tree chain, key = CASE_HIGH (label);
|
||||||
|
|
||||||
|
for (chain = TYPE_VALUES (type);
|
||||||
|
chain && !tree_int_cst_equal (key, TREE_VALUE (chain));
|
||||||
|
chain = TREE_CHAIN (chain))
|
||||||
|
continue;
|
||||||
|
if (!chain)
|
||||||
|
match_case_to_enum_1 (key, type, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handle -Wswitch*. Called from the front end after parsing the switch
|
||||||
|
construct. */
|
||||||
|
/* ??? Should probably be somewhere generic, since other languages besides
|
||||||
|
C and C++ would want this. We'd want to agree on the datastructure,
|
||||||
|
however, which is a problem. Alternately, we operate on gimplified
|
||||||
|
switch_exprs, which I don't especially like. At the moment, however,
|
||||||
|
C/C++ are the only tree-ssa languages that support enumerations at all,
|
||||||
|
so the point is moot. */
|
||||||
|
|
||||||
|
void
|
||||||
|
c_do_switch_warnings (splay_tree cases, tree switch_stmt)
|
||||||
|
{
|
||||||
|
splay_tree_node default_node;
|
||||||
|
location_t *switch_locus;
|
||||||
|
tree type;
|
||||||
|
|
||||||
|
if (!warn_switch && !warn_switch_enum && !warn_switch_default)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch_locus = EXPR_LOCUS (switch_stmt);
|
||||||
|
if (!switch_locus)
|
||||||
|
switch_locus = &input_location;
|
||||||
|
type = SWITCH_TYPE (switch_stmt);
|
||||||
|
|
||||||
|
default_node = splay_tree_lookup (cases, (splay_tree_key) NULL);
|
||||||
|
if (warn_switch_default && !default_node)
|
||||||
|
warning ("%Hswitch missing default case", switch_locus);
|
||||||
|
|
||||||
|
/* If the switch expression was an enumerated type, check that
|
||||||
|
exactly all enumeration literals are covered by the cases.
|
||||||
|
The check is made when -Wswitch was specified and there is no
|
||||||
|
default case, or when -Wswitch-enum was specified. */
|
||||||
|
if (((warn_switch && !default_node) || warn_switch_enum)
|
||||||
|
&& type && TREE_CODE (type) == ENUMERAL_TYPE
|
||||||
|
&& TREE_CODE (SWITCH_COND (switch_stmt)) != INTEGER_CST)
|
||||||
|
{
|
||||||
|
tree chain;
|
||||||
|
|
||||||
|
/* The time complexity here is O(N*lg(N)) worst case, but for the
|
||||||
|
common case of monotonically increasing enumerators, it is
|
||||||
|
O(N), since the nature of the splay tree will keep the next
|
||||||
|
element adjacent to the root at all times. */
|
||||||
|
|
||||||
|
for (chain = TYPE_VALUES (type); chain; chain = TREE_CHAIN (chain))
|
||||||
|
{
|
||||||
|
splay_tree_node node
|
||||||
|
= splay_tree_lookup (cases, (splay_tree_key) TREE_VALUE (chain));
|
||||||
|
|
||||||
|
if (node)
|
||||||
|
{
|
||||||
|
/* Mark the CASE_LOW part of the case entry as seen, so
|
||||||
|
that we save time later. Choose TREE_ADDRESSABLE
|
||||||
|
randomly as a bit that won't have been set to-date. */
|
||||||
|
tree label = (tree) node->value;
|
||||||
|
TREE_ADDRESSABLE (label) = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Warn if there are enumerators that don't correspond to
|
||||||
|
case expressions. */
|
||||||
|
warning ("%Henumeration value `%E' not handled in switch",
|
||||||
|
switch_locus, TREE_PURPOSE (chain));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Warn if there are case expressions that don't correspond to
|
||||||
|
enumerators. This can occur since C and C++ don't enforce
|
||||||
|
type-checking of assignments to enumeration variables.
|
||||||
|
|
||||||
|
The time complexity here is O(N**2) worst case, since we've
|
||||||
|
not sorted the enumeration values. However, in the absence
|
||||||
|
of case ranges this is O(N), since all single cases that
|
||||||
|
corresponded to enumerations have been marked above. */
|
||||||
|
|
||||||
|
splay_tree_foreach (cases, match_case_to_enum, type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finish an expression taking the address of LABEL (an
|
/* Finish an expression taking the address of LABEL (an
|
||||||
@ -3993,7 +4240,6 @@ finish_label_address_expr (tree label)
|
|||||||
{
|
{
|
||||||
TREE_USED (label) = 1;
|
TREE_USED (label) = 1;
|
||||||
result = build1 (ADDR_EXPR, ptr_type_node, label);
|
result = build1 (ADDR_EXPR, ptr_type_node, label);
|
||||||
TREE_CONSTANT (result) = 1;
|
|
||||||
/* The current function in not necessarily uninlinable.
|
/* The current function in not necessarily uninlinable.
|
||||||
Computed gotos are incompatible with inlining, but the value
|
Computed gotos are incompatible with inlining, but the value
|
||||||
here could be used only in a diagnostic, for example. */
|
here could be used only in a diagnostic, for example. */
|
||||||
@ -4003,6 +4249,9 @@ finish_label_address_expr (tree label)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Hook used by expand_expr to expand language-specific tree codes. */
|
/* Hook used by expand_expr to expand language-specific tree codes. */
|
||||||
|
/* The only things that should go here are bits needed to expand
|
||||||
|
constant initalizers. Everything else should be handled by the
|
||||||
|
gimplification routines. */
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
|
c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
|
||||||
@ -4011,88 +4260,6 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
|
|||||||
{
|
{
|
||||||
switch (TREE_CODE (exp))
|
switch (TREE_CODE (exp))
|
||||||
{
|
{
|
||||||
case STMT_EXPR:
|
|
||||||
{
|
|
||||||
tree rtl_expr;
|
|
||||||
rtx result;
|
|
||||||
bool preserve_result = false;
|
|
||||||
|
|
||||||
if (STMT_EXPR_WARN_UNUSED_RESULT (exp) && target == const0_rtx)
|
|
||||||
{
|
|
||||||
tree stmt = STMT_EXPR_STMT (exp);
|
|
||||||
tree scope;
|
|
||||||
|
|
||||||
for (scope = COMPOUND_BODY (stmt);
|
|
||||||
scope && TREE_CODE (scope) != SCOPE_STMT;
|
|
||||||
scope = TREE_CHAIN (scope));
|
|
||||||
|
|
||||||
if (scope && SCOPE_STMT_BLOCK (scope))
|
|
||||||
warning ("%Hignoring return value of `%D', "
|
|
||||||
"declared with attribute warn_unused_result",
|
|
||||||
&expr_wfl_stack->location,
|
|
||||||
BLOCK_ABSTRACT_ORIGIN (SCOPE_STMT_BLOCK (scope)));
|
|
||||||
else
|
|
||||||
warning ("%Hignoring return value of function "
|
|
||||||
"declared with attribute warn_unused_result",
|
|
||||||
&expr_wfl_stack->location);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Since expand_expr_stmt calls free_temp_slots after every
|
|
||||||
expression statement, we must call push_temp_slots here.
|
|
||||||
Otherwise, any temporaries in use now would be considered
|
|
||||||
out-of-scope after the first EXPR_STMT from within the
|
|
||||||
STMT_EXPR. */
|
|
||||||
push_temp_slots ();
|
|
||||||
rtl_expr = expand_start_stmt_expr (!STMT_EXPR_NO_SCOPE (exp));
|
|
||||||
|
|
||||||
/* If we want the result of this expression, find the last
|
|
||||||
EXPR_STMT in the COMPOUND_STMT and mark it as addressable. */
|
|
||||||
if (target != const0_rtx
|
|
||||||
&& TREE_CODE (STMT_EXPR_STMT (exp)) == COMPOUND_STMT
|
|
||||||
&& TREE_CODE (COMPOUND_BODY (STMT_EXPR_STMT (exp))) == SCOPE_STMT)
|
|
||||||
{
|
|
||||||
tree expr = COMPOUND_BODY (STMT_EXPR_STMT (exp));
|
|
||||||
tree last = TREE_CHAIN (expr);
|
|
||||||
|
|
||||||
while (TREE_CHAIN (last))
|
|
||||||
{
|
|
||||||
expr = last;
|
|
||||||
last = TREE_CHAIN (last);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TREE_CODE (last) == SCOPE_STMT
|
|
||||||
&& TREE_CODE (expr) == EXPR_STMT)
|
|
||||||
{
|
|
||||||
/* Otherwise, note that we want the value from the last
|
|
||||||
expression. */
|
|
||||||
TREE_ADDRESSABLE (expr) = 1;
|
|
||||||
preserve_result = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
expand_stmt (STMT_EXPR_STMT (exp));
|
|
||||||
expand_end_stmt_expr (rtl_expr);
|
|
||||||
|
|
||||||
result = expand_expr_real (rtl_expr, target, tmode, modifier, alt_rtl);
|
|
||||||
if (preserve_result && GET_CODE (result) == MEM)
|
|
||||||
{
|
|
||||||
if (GET_MODE (result) != BLKmode)
|
|
||||||
result = copy_to_reg (result);
|
|
||||||
else
|
|
||||||
preserve_temp_slots (result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the statment-expression does not have a scope, then the
|
|
||||||
new temporaries we created within it must live beyond the
|
|
||||||
statement-expression. */
|
|
||||||
if (STMT_EXPR_NO_SCOPE (exp))
|
|
||||||
preserve_temp_slots (NULL_RTX);
|
|
||||||
|
|
||||||
pop_temp_slots ();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case COMPOUND_LITERAL_EXPR:
|
case COMPOUND_LITERAL_EXPR:
|
||||||
{
|
{
|
||||||
/* Initialize the anonymous variable declared in the compound
|
/* Initialize the anonymous variable declared in the compound
|
||||||
@ -4105,9 +4272,6 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
|
|||||||
default:
|
default:
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
abort ();
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hook used by safe_from_p to handle language-specific tree codes. */
|
/* Hook used by safe_from_p to handle language-specific tree codes. */
|
||||||
@ -4684,7 +4848,7 @@ handle_section_attribute (tree *node, tree name ATTRIBUTE_UNUSED, tree args,
|
|||||||
&& ! TREE_STATIC (decl))
|
&& ! TREE_STATIC (decl))
|
||||||
{
|
{
|
||||||
error ("%Jsection attribute cannot be specified for "
|
error ("%Jsection attribute cannot be specified for "
|
||||||
"local variables", decl);
|
"local variables", decl);
|
||||||
*no_add_attrs = true;
|
*no_add_attrs = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4695,7 +4859,7 @@ handle_section_attribute (tree *node, tree name ATTRIBUTE_UNUSED, tree args,
|
|||||||
TREE_STRING_POINTER (TREE_VALUE (args))) != 0)
|
TREE_STRING_POINTER (TREE_VALUE (args))) != 0)
|
||||||
{
|
{
|
||||||
error ("%Jsection of '%D' conflicts with previous declaration",
|
error ("%Jsection of '%D' conflicts with previous declaration",
|
||||||
*node, *node);
|
*node, *node);
|
||||||
*no_add_attrs = true;
|
*no_add_attrs = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -4848,7 +5012,10 @@ handle_alias_attribute (tree *node, tree name, tree args,
|
|||||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||||
DECL_INITIAL (decl) = error_mark_node;
|
DECL_INITIAL (decl) = error_mark_node;
|
||||||
else
|
else
|
||||||
DECL_EXTERNAL (decl) = 0;
|
{
|
||||||
|
DECL_EXTERNAL (decl) = 0;
|
||||||
|
TREE_STATIC (decl) = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -5191,7 +5358,7 @@ handle_nonnull_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
|
|||||||
if (! TYPE_ARG_TYPES (type))
|
if (! TYPE_ARG_TYPES (type))
|
||||||
{
|
{
|
||||||
error ("nonnull attribute without arguments on a non-prototype");
|
error ("nonnull attribute without arguments on a non-prototype");
|
||||||
*no_add_attrs = true;
|
*no_add_attrs = true;
|
||||||
}
|
}
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
@ -5201,7 +5368,7 @@ handle_nonnull_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
|
|||||||
for (attr_arg_num = 1; args; args = TREE_CHAIN (args))
|
for (attr_arg_num = 1; args; args = TREE_CHAIN (args))
|
||||||
{
|
{
|
||||||
tree argument;
|
tree argument;
|
||||||
unsigned HOST_WIDE_INT arg_num, ck_num;
|
unsigned HOST_WIDE_INT arg_num = 0, ck_num;
|
||||||
|
|
||||||
if (! get_nonnull_operand (TREE_VALUE (args), &arg_num))
|
if (! get_nonnull_operand (TREE_VALUE (args), &arg_num))
|
||||||
{
|
{
|
||||||
@ -5221,7 +5388,7 @@ handle_nonnull_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
|
|||||||
argument = TREE_CHAIN (argument);
|
argument = TREE_CHAIN (argument);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! argument
|
if (! argument
|
||||||
|| TREE_CODE (TREE_VALUE (argument)) == VOID_TYPE)
|
|| TREE_CODE (TREE_VALUE (argument)) == VOID_TYPE)
|
||||||
{
|
{
|
||||||
error ("nonnull argument with out-of-range operand number (arg %lu, operand %lu)",
|
error ("nonnull argument with out-of-range operand number (arg %lu, operand %lu)",
|
||||||
@ -5230,7 +5397,7 @@ handle_nonnull_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
|
|||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE)
|
if (TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE)
|
||||||
{
|
{
|
||||||
error ("nonnull argument references non-pointer operand (arg %lu, operand %lu)",
|
error ("nonnull argument references non-pointer operand (arg %lu, operand %lu)",
|
||||||
(unsigned long) attr_arg_num, (unsigned long) arg_num);
|
(unsigned long) attr_arg_num, (unsigned long) arg_num);
|
||||||
@ -5256,22 +5423,22 @@ check_function_nonnull (tree attrs, tree params)
|
|||||||
{
|
{
|
||||||
if (is_attribute_p ("nonnull", TREE_PURPOSE (a)))
|
if (is_attribute_p ("nonnull", TREE_PURPOSE (a)))
|
||||||
{
|
{
|
||||||
args = TREE_VALUE (a);
|
args = TREE_VALUE (a);
|
||||||
|
|
||||||
/* Walk the argument list. If we encounter an argument number we
|
/* Walk the argument list. If we encounter an argument number we
|
||||||
should check for non-null, do it. If the attribute has no args,
|
should check for non-null, do it. If the attribute has no args,
|
||||||
then every pointer argument is checked (in which case the check
|
then every pointer argument is checked (in which case the check
|
||||||
for pointer type is done in check_nonnull_arg). */
|
for pointer type is done in check_nonnull_arg). */
|
||||||
for (param = params, param_num = 1; ;
|
for (param = params, param_num = 1; ;
|
||||||
param_num++, param = TREE_CHAIN (param))
|
param_num++, param = TREE_CHAIN (param))
|
||||||
{
|
{
|
||||||
if (! param)
|
if (! param)
|
||||||
break;
|
break;
|
||||||
if (! args || nonnull_check_p (args, param_num))
|
if (! args || nonnull_check_p (args, param_num))
|
||||||
check_function_arguments_recurse (check_nonnull_arg, NULL,
|
check_function_arguments_recurse (check_nonnull_arg, NULL,
|
||||||
TREE_VALUE (param),
|
TREE_VALUE (param),
|
||||||
param_num);
|
param_num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5283,12 +5450,12 @@ check_function_nonnull (tree attrs, tree params)
|
|||||||
static bool
|
static bool
|
||||||
nonnull_check_p (tree args, unsigned HOST_WIDE_INT param_num)
|
nonnull_check_p (tree args, unsigned HOST_WIDE_INT param_num)
|
||||||
{
|
{
|
||||||
unsigned HOST_WIDE_INT arg_num;
|
unsigned HOST_WIDE_INT arg_num = 0;
|
||||||
|
|
||||||
for (; args; args = TREE_CHAIN (args))
|
for (; args; args = TREE_CHAIN (args))
|
||||||
{
|
{
|
||||||
if (! get_nonnull_operand (TREE_VALUE (args), &arg_num))
|
if (! get_nonnull_operand (TREE_VALUE (args), &arg_num))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
if (arg_num == param_num)
|
if (arg_num == param_num)
|
||||||
return true;
|
return true;
|
||||||
@ -5313,7 +5480,7 @@ check_nonnull_arg (void *ctx ATTRIBUTE_UNUSED, tree param,
|
|||||||
|
|
||||||
if (integer_zerop (param))
|
if (integer_zerop (param))
|
||||||
warning ("null argument where non-null required (arg %lu)",
|
warning ("null argument where non-null required (arg %lu)",
|
||||||
(unsigned long) param_num);
|
(unsigned long) param_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper for nonnull attribute handling; fetch the operand number
|
/* Helper for nonnull attribute handling; fetch the operand number
|
||||||
@ -5447,7 +5614,7 @@ check_function_arguments_recurse (void (*callback)
|
|||||||
{
|
{
|
||||||
/* Strip coercion. */
|
/* Strip coercion. */
|
||||||
check_function_arguments_recurse (callback, ctx,
|
check_function_arguments_recurse (callback, ctx,
|
||||||
TREE_OPERAND (param, 0), param_num);
|
TREE_OPERAND (param, 0), param_num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5509,15 +5676,74 @@ check_function_arguments_recurse (void (*callback)
|
|||||||
{
|
{
|
||||||
/* Check both halves of the conditional expression. */
|
/* Check both halves of the conditional expression. */
|
||||||
check_function_arguments_recurse (callback, ctx,
|
check_function_arguments_recurse (callback, ctx,
|
||||||
TREE_OPERAND (param, 1), param_num);
|
TREE_OPERAND (param, 1), param_num);
|
||||||
check_function_arguments_recurse (callback, ctx,
|
check_function_arguments_recurse (callback, ctx,
|
||||||
TREE_OPERAND (param, 2), param_num);
|
TREE_OPERAND (param, 2), param_num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*callback) (ctx, param, param_num);
|
(*callback) (ctx, param, param_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* C implementation of lang_hooks.tree_inlining.walk_subtrees. Tracks the
|
||||||
|
locus from EXPR_LOCUS and handles DECL_STMT specially. */
|
||||||
|
|
||||||
|
tree
|
||||||
|
c_walk_subtrees (tree *tp, int *walk_subtrees_p ATTRIBUTE_UNUSED,
|
||||||
|
walk_tree_fn func, void *data, void *htab)
|
||||||
|
{
|
||||||
|
enum tree_code code = TREE_CODE (*tp);
|
||||||
|
location_t save_locus;
|
||||||
|
tree result;
|
||||||
|
|
||||||
|
#define WALK_SUBTREE(NODE) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
result = walk_tree (&(NODE), func, data, htab); \
|
||||||
|
if (result) goto out; \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
if (code != DECL_STMT)
|
||||||
|
return NULL_TREE;
|
||||||
|
|
||||||
|
/* Set input_location here so we get the right instantiation context
|
||||||
|
if we call instantiate_decl from inlinable_function_p. */
|
||||||
|
save_locus = input_location;
|
||||||
|
if (EXPR_LOCUS (*tp))
|
||||||
|
input_location = *EXPR_LOCUS (*tp);
|
||||||
|
|
||||||
|
/* Walk the DECL_INITIAL and DECL_SIZE. We don't want to walk
|
||||||
|
into declarations that are just mentioned, rather than
|
||||||
|
declared; they don't really belong to this part of the tree.
|
||||||
|
And, we can see cycles: the initializer for a declaration can
|
||||||
|
refer to the declaration itself. */
|
||||||
|
WALK_SUBTREE (DECL_INITIAL (DECL_STMT_DECL (*tp)));
|
||||||
|
WALK_SUBTREE (DECL_SIZE (DECL_STMT_DECL (*tp)));
|
||||||
|
WALK_SUBTREE (DECL_SIZE_UNIT (DECL_STMT_DECL (*tp)));
|
||||||
|
WALK_SUBTREE (TREE_CHAIN (*tp));
|
||||||
|
*walk_subtrees_p = 0;
|
||||||
|
|
||||||
|
/* We didn't find what we were looking for. */
|
||||||
|
out:
|
||||||
|
input_location = save_locus;
|
||||||
|
return result;
|
||||||
|
|
||||||
|
#undef WALK_SUBTREE
|
||||||
|
}
|
||||||
|
|
||||||
|
/* C implementation of lang_hooks.tree_inlining.tree_chain_matters_p.
|
||||||
|
Apart from TREE_LISTs, the only trees whose TREE_CHAIN we care about are
|
||||||
|
_STMT nodes. */
|
||||||
|
|
||||||
|
int
|
||||||
|
c_tree_chain_matters_p (tree t)
|
||||||
|
{
|
||||||
|
/* For statements, we also walk the chain so that we cover the
|
||||||
|
entire statement tree. */
|
||||||
|
return STATEMENT_CODE_P (TREE_CODE (t));
|
||||||
|
}
|
||||||
|
|
||||||
/* Function to help qsort sort FIELD_DECLs by name order. */
|
/* Function to help qsort sort FIELD_DECLs by name order. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -5573,15 +5799,15 @@ resort_field_decl_cmp (const void *x_p, const void *y_p)
|
|||||||
|
|
||||||
void
|
void
|
||||||
resort_sorted_fields (void *obj,
|
resort_sorted_fields (void *obj,
|
||||||
void *orig_obj ATTRIBUTE_UNUSED ,
|
void *orig_obj ATTRIBUTE_UNUSED ,
|
||||||
gt_pointer_operator new_value,
|
gt_pointer_operator new_value,
|
||||||
void *cookie)
|
void *cookie)
|
||||||
{
|
{
|
||||||
struct sorted_fields_type *sf = obj;
|
struct sorted_fields_type *sf = obj;
|
||||||
resort_data.new_value = new_value;
|
resort_data.new_value = new_value;
|
||||||
resort_data.cookie = cookie;
|
resort_data.cookie = cookie;
|
||||||
qsort (&sf->elts[0], sf->len, sizeof (tree),
|
qsort (&sf->elts[0], sf->len, sizeof (tree),
|
||||||
resort_field_decl_cmp);
|
resort_field_decl_cmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Used by estimate_num_insns. Estimate number of instructions seen
|
/* Used by estimate_num_insns. Estimate number of instructions seen
|
||||||
@ -5675,14 +5901,12 @@ c_estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
|
|||||||
case EXIT_EXPR:
|
case EXIT_EXPR:
|
||||||
case LABELED_BLOCK_EXPR:
|
case LABELED_BLOCK_EXPR:
|
||||||
case EXIT_BLOCK_EXPR:
|
case EXIT_BLOCK_EXPR:
|
||||||
case EXPR_WITH_FILE_LOCATION:
|
|
||||||
|
|
||||||
case EXPR_STMT:
|
case EXPR_STMT:
|
||||||
case COMPOUND_STMT:
|
case COMPOUND_STMT:
|
||||||
case RETURN_STMT:
|
case RETURN_STMT:
|
||||||
case LABEL_STMT:
|
case LABEL_STMT:
|
||||||
case SCOPE_STMT:
|
case SCOPE_STMT:
|
||||||
case FILE_STMT:
|
|
||||||
case CASE_LABEL:
|
case CASE_LABEL:
|
||||||
case STMT_EXPR:
|
case STMT_EXPR:
|
||||||
case CLEANUP_STMT:
|
case CLEANUP_STMT:
|
||||||
@ -5711,37 +5935,6 @@ c_estimate_num_insns (tree decl)
|
|||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Used by c_decl_uninit to find where expressions like x = x + 1; */
|
|
||||||
|
|
||||||
static tree
|
|
||||||
c_decl_uninit_1 (tree *t, int *walk_sub_trees, void *x)
|
|
||||||
{
|
|
||||||
/* If x = EXP(&x)EXP, then do not warn about the use of x. */
|
|
||||||
if (TREE_CODE (*t) == ADDR_EXPR && TREE_OPERAND (*t, 0) == x)
|
|
||||||
{
|
|
||||||
*walk_sub_trees = 0;
|
|
||||||
return NULL_TREE;
|
|
||||||
}
|
|
||||||
if (*t == x)
|
|
||||||
return *t;
|
|
||||||
return NULL_TREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find out if a variable is uninitialized based on DECL_INITIAL. */
|
|
||||||
|
|
||||||
bool
|
|
||||||
c_decl_uninit (tree t)
|
|
||||||
{
|
|
||||||
/* int x = x; is GCC extension to turn off this warning, only if warn_init_self is zero. */
|
|
||||||
if (DECL_INITIAL (t) == t)
|
|
||||||
return warn_init_self ? true : false;
|
|
||||||
|
|
||||||
/* Walk the trees looking for the variable itself. */
|
|
||||||
if (walk_tree_without_duplicates (&DECL_INITIAL (t), c_decl_uninit_1, t))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Issue the error given by MSGID, indicating that it occurred before
|
/* Issue the error given by MSGID, indicating that it occurred before
|
||||||
TOKEN, which had the associated VALUE. */
|
TOKEN, which had the associated VALUE. */
|
||||||
|
|
||||||
@ -5774,4 +5967,74 @@ c_parse_error (const char *msgid, enum cpp_ttype token, tree value)
|
|||||||
error ("%s", string);
|
error ("%s", string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Walk a gimplified function and warn for functions whose return value is
|
||||||
|
ignored and attribute((warn_unused_result)) is set. This is done before
|
||||||
|
inlining, so we don't have to worry about that. */
|
||||||
|
|
||||||
|
void
|
||||||
|
c_warn_unused_result (tree *top_p)
|
||||||
|
{
|
||||||
|
tree t = *top_p;
|
||||||
|
tree_stmt_iterator i;
|
||||||
|
tree fdecl, ftype;
|
||||||
|
|
||||||
|
switch (TREE_CODE (t))
|
||||||
|
{
|
||||||
|
case STATEMENT_LIST:
|
||||||
|
for (i = tsi_start (*top_p); !tsi_end_p (i); tsi_next (&i))
|
||||||
|
c_warn_unused_result (tsi_stmt_ptr (i));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case COND_EXPR:
|
||||||
|
c_warn_unused_result (&COND_EXPR_THEN (t));
|
||||||
|
c_warn_unused_result (&COND_EXPR_ELSE (t));
|
||||||
|
break;
|
||||||
|
case BIND_EXPR:
|
||||||
|
c_warn_unused_result (&BIND_EXPR_BODY (t));
|
||||||
|
break;
|
||||||
|
case TRY_FINALLY_EXPR:
|
||||||
|
case TRY_CATCH_EXPR:
|
||||||
|
c_warn_unused_result (&TREE_OPERAND (t, 0));
|
||||||
|
c_warn_unused_result (&TREE_OPERAND (t, 1));
|
||||||
|
break;
|
||||||
|
case CATCH_EXPR:
|
||||||
|
c_warn_unused_result (&CATCH_BODY (t));
|
||||||
|
break;
|
||||||
|
case EH_FILTER_EXPR:
|
||||||
|
c_warn_unused_result (&EH_FILTER_FAILURE (t));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CALL_EXPR:
|
||||||
|
/* This is a naked call, as opposed to a CALL_EXPR nested inside
|
||||||
|
a MODIFY_EXPR. All calls whose value is ignored should be
|
||||||
|
represented like this. Look for the attribute. */
|
||||||
|
fdecl = get_callee_fndecl (t);
|
||||||
|
if (fdecl)
|
||||||
|
ftype = TREE_TYPE (fdecl);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ftype = TREE_TYPE (TREE_OPERAND (t, 0));
|
||||||
|
/* Look past pointer-to-function to the function type itself. */
|
||||||
|
ftype = TREE_TYPE (ftype);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lookup_attribute ("warn_unused_result", TYPE_ATTRIBUTES (ftype)))
|
||||||
|
{
|
||||||
|
if (fdecl)
|
||||||
|
warning ("%Hignoring return value of `%D', "
|
||||||
|
"declared with attribute warn_unused_result",
|
||||||
|
EXPR_LOCUS (t), fdecl);
|
||||||
|
else
|
||||||
|
warning ("%Hignoring return value of function "
|
||||||
|
"declared with attribute warn_unused_result",
|
||||||
|
EXPR_LOCUS (t));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
/* Not a container, not a call, or a call whose value is used. */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "gt-c-common.h"
|
#include "gt-c-common.h"
|
||||||
|
@ -79,7 +79,7 @@ DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
|
|||||||
DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
|
DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
|
||||||
|
|
||||||
/* Used to represent an inline assembly statement. */
|
/* Used to represent an inline assembly statement. */
|
||||||
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
|
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 4)
|
||||||
|
|
||||||
/* A SCOPE_STMT marks the beginning or end of a scope. If
|
/* A SCOPE_STMT marks the beginning or end of a scope. If
|
||||||
SCOPE_BEGIN_P holds, then this is the start of a scope. If
|
SCOPE_BEGIN_P holds, then this is the start of a scope. If
|
||||||
@ -89,10 +89,6 @@ DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
|
|||||||
variables declared in this scope. */
|
variables declared in this scope. */
|
||||||
DEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
|
DEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
|
||||||
|
|
||||||
/* A FILE_STMT marks the spot where a function changes files. It has no
|
|
||||||
other semantics. FILE_STMT_FILENAME gives the name. */
|
|
||||||
DEFTREECODE (FILE_STMT, "file_stmt", 'e', 1)
|
|
||||||
|
|
||||||
/* Used to represent a CASE_LABEL. The operands are CASE_LOW and
|
/* Used to represent a CASE_LABEL. The operands are CASE_LOW and
|
||||||
CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a
|
CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a
|
||||||
'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case
|
'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case
|
||||||
|
@ -37,10 +37,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
STMT_EXPR_NO_SCOPE (in STMT_EXPR)
|
STMT_EXPR_NO_SCOPE (in STMT_EXPR)
|
||||||
1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
|
1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
|
||||||
STMT_IS_FULL_EXPR_P (in _STMT)
|
STMT_IS_FULL_EXPR_P (in _STMT)
|
||||||
2: STMT_LINENO_FOR_FN_P (in _STMT)
|
2: unused
|
||||||
3: SCOPE_NO_CLEANUPS_P (in SCOPE_STMT)
|
3: SCOPE_NO_CLEANUPS_P (in SCOPE_STMT)
|
||||||
COMPOUND_STMT_BODY_BLOCK (in COMPOUND_STMT)
|
COMPOUND_STMT_BODY_BLOCK (in COMPOUND_STMT)
|
||||||
STMT_EXPR_WARN_UNUSED_RESULT (in STMT_EXPR)
|
|
||||||
4: SCOPE_PARTIAL_P (in SCOPE_STMT)
|
4: SCOPE_PARTIAL_P (in SCOPE_STMT)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -321,8 +320,7 @@ struct c_language_function GTY(()) {
|
|||||||
|
|
||||||
/* Language-specific hooks. */
|
/* Language-specific hooks. */
|
||||||
|
|
||||||
extern void (*lang_expand_stmt) (tree);
|
extern int (*lang_gimplify_stmt) (tree *, tree *);
|
||||||
extern void (*lang_expand_decl_stmt) (tree);
|
|
||||||
extern void (*lang_expand_function_end) (void);
|
extern void (*lang_expand_function_end) (void);
|
||||||
|
|
||||||
/* Callback that determines if it's ok for a function to have no
|
/* Callback that determines if it's ok for a function to have no
|
||||||
@ -342,7 +340,6 @@ extern void finish_stmt_tree (tree *);
|
|||||||
|
|
||||||
extern tree walk_stmt_tree (tree *, walk_tree_fn, void *);
|
extern tree walk_stmt_tree (tree *, walk_tree_fn, void *);
|
||||||
extern void prep_stmt (tree);
|
extern void prep_stmt (tree);
|
||||||
extern void expand_stmt (tree);
|
|
||||||
extern tree c_begin_if_stmt (void);
|
extern tree c_begin_if_stmt (void);
|
||||||
extern tree c_begin_while_stmt (void);
|
extern tree c_begin_while_stmt (void);
|
||||||
extern void c_finish_while_stmt_cond (tree, tree);
|
extern void c_finish_while_stmt_cond (tree, tree);
|
||||||
@ -999,22 +996,9 @@ extern void finish_file (void);
|
|||||||
#define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
|
#define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
|
||||||
#define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
|
#define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
|
||||||
|
|
||||||
/* SWITCH_STMT accessors. These give access to the condition, body and
|
|
||||||
original condition type (before any compiler conversions)
|
|
||||||
of the switch statement, respectively. */
|
|
||||||
#define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0)
|
|
||||||
#define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1)
|
|
||||||
#define SWITCH_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2)
|
#define SWITCH_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2)
|
||||||
|
|
||||||
/* CASE_LABEL accessors. These give access to the high and low values
|
|
||||||
of a case label, respectively. */
|
|
||||||
#define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 0)
|
|
||||||
#define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 1)
|
|
||||||
#define CASE_LABEL_DECL(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 2)
|
#define CASE_LABEL_DECL(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 2)
|
||||||
|
|
||||||
/* GOTO_STMT accessor. This gives access to the label associated with
|
|
||||||
a goto statement. */
|
|
||||||
#define GOTO_DESTINATION(NODE) TREE_OPERAND (GOTO_STMT_CHECK (NODE), 0)
|
|
||||||
/* True for goto created artificially by the compiler. */
|
/* True for goto created artificially by the compiler. */
|
||||||
#define GOTO_FAKE_P(NODE) (TREE_LANG_FLAG_0 (GOTO_STMT_CHECK (NODE)))
|
#define GOTO_FAKE_P(NODE) (TREE_LANG_FLAG_0 (GOTO_STMT_CHECK (NODE)))
|
||||||
|
|
||||||
@ -1024,16 +1008,6 @@ extern void finish_file (void);
|
|||||||
calling TREE_CHAIN on a node in the list. */
|
calling TREE_CHAIN on a node in the list. */
|
||||||
#define COMPOUND_BODY(NODE) TREE_OPERAND (COMPOUND_STMT_CHECK (NODE), 0)
|
#define COMPOUND_BODY(NODE) TREE_OPERAND (COMPOUND_STMT_CHECK (NODE), 0)
|
||||||
|
|
||||||
/* ASM_STMT accessors. ASM_STRING returns a STRING_CST for the
|
|
||||||
instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and
|
|
||||||
ASM_CLOBBERS represent the outputs, inputs, and clobbers for the
|
|
||||||
statement. */
|
|
||||||
#define ASM_CV_QUAL(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 0)
|
|
||||||
#define ASM_STRING(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 1)
|
|
||||||
#define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 2)
|
|
||||||
#define ASM_INPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 3)
|
|
||||||
#define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 4)
|
|
||||||
|
|
||||||
/* DECL_STMT accessor. This gives access to the DECL associated with
|
/* DECL_STMT accessor. This gives access to the DECL associated with
|
||||||
the given declaration statement. */
|
the given declaration statement. */
|
||||||
#define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0)
|
#define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0)
|
||||||
@ -1045,11 +1019,6 @@ extern void finish_file (void);
|
|||||||
#define STMT_EXPR_NO_SCOPE(NODE) \
|
#define STMT_EXPR_NO_SCOPE(NODE) \
|
||||||
TREE_LANG_FLAG_0 (STMT_EXPR_CHECK (NODE))
|
TREE_LANG_FLAG_0 (STMT_EXPR_CHECK (NODE))
|
||||||
|
|
||||||
/* Nonzero if this statement-expression should cause warning if its result
|
|
||||||
is not used. */
|
|
||||||
#define STMT_EXPR_WARN_UNUSED_RESULT(NODE) \
|
|
||||||
TREE_LANG_FLAG_3 (STMT_EXPR_CHECK (NODE))
|
|
||||||
|
|
||||||
/* LABEL_STMT accessor. This gives access to the label associated with
|
/* LABEL_STMT accessor. This gives access to the label associated with
|
||||||
the given label statement. */
|
the given label statement. */
|
||||||
#define LABEL_STMT_LABEL(NODE) TREE_OPERAND (LABEL_STMT_CHECK (NODE), 0)
|
#define LABEL_STMT_LABEL(NODE) TREE_OPERAND (LABEL_STMT_CHECK (NODE), 0)
|
||||||
@ -1097,10 +1066,6 @@ extern void finish_file (void);
|
|||||||
#define SCOPE_PARTIAL_P(NODE) \
|
#define SCOPE_PARTIAL_P(NODE) \
|
||||||
(TREE_LANG_FLAG_4 (SCOPE_STMT_CHECK (NODE)))
|
(TREE_LANG_FLAG_4 (SCOPE_STMT_CHECK (NODE)))
|
||||||
|
|
||||||
/* Nonzero for an ASM_STMT if the assembly statement is volatile. */
|
|
||||||
#define ASM_VOLATILE_P(NODE) \
|
|
||||||
(ASM_CV_QUAL (ASM_STMT_CHECK (NODE)) != NULL_TREE)
|
|
||||||
|
|
||||||
/* The VAR_DECL to clean up in a CLEANUP_STMT. */
|
/* The VAR_DECL to clean up in a CLEANUP_STMT. */
|
||||||
#define CLEANUP_DECL(NODE) \
|
#define CLEANUP_DECL(NODE) \
|
||||||
TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 0)
|
TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 0)
|
||||||
@ -1108,31 +1073,10 @@ extern void finish_file (void);
|
|||||||
#define CLEANUP_EXPR(NODE) \
|
#define CLEANUP_EXPR(NODE) \
|
||||||
TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 1)
|
TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 1)
|
||||||
|
|
||||||
/* The filename we are changing to as of this FILE_STMT. */
|
|
||||||
#define FILE_STMT_FILENAME_NODE(NODE) \
|
|
||||||
(TREE_OPERAND (FILE_STMT_CHECK (NODE), 0))
|
|
||||||
#define FILE_STMT_FILENAME(NODE) \
|
|
||||||
(IDENTIFIER_POINTER (FILE_STMT_FILENAME_NODE (NODE)))
|
|
||||||
|
|
||||||
/* The line-number at which a statement began. But if
|
|
||||||
STMT_LINENO_FOR_FN_P does holds, then this macro gives the
|
|
||||||
line number for the end of the current function instead. */
|
|
||||||
#define STMT_LINENO(NODE) \
|
|
||||||
(TREE_COMPLEXITY ((NODE)))
|
|
||||||
|
|
||||||
/* If nonzero, the STMT_LINENO for NODE is the line at which the
|
|
||||||
function ended. */
|
|
||||||
#define STMT_LINENO_FOR_FN_P(NODE) \
|
|
||||||
(TREE_LANG_FLAG_2 ((NODE)))
|
|
||||||
|
|
||||||
/* Nonzero if we want the new ISO rules for pushing a new scope for `for'
|
/* Nonzero if we want the new ISO rules for pushing a new scope for `for'
|
||||||
initialization variables. */
|
initialization variables. */
|
||||||
#define NEW_FOR_SCOPE_P(NODE) (TREE_LANG_FLAG_0 (NODE))
|
#define NEW_FOR_SCOPE_P(NODE) (TREE_LANG_FLAG_0 (NODE))
|
||||||
|
|
||||||
/* Nonzero if we want to create an ASM_INPUT instead of an
|
|
||||||
ASM_OPERAND with no operands. */
|
|
||||||
#define ASM_INPUT_P(NODE) (TREE_LANG_FLAG_0 (NODE))
|
|
||||||
|
|
||||||
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
|
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
|
||||||
|
|
||||||
enum c_tree_code {
|
enum c_tree_code {
|
||||||
@ -1149,7 +1093,7 @@ enum c_tree_code {
|
|||||||
WHILE_STMT, DO_STMT, RETURN_STMT, \
|
WHILE_STMT, DO_STMT, RETURN_STMT, \
|
||||||
BREAK_STMT, CONTINUE_STMT, SCOPE_STMT, \
|
BREAK_STMT, CONTINUE_STMT, SCOPE_STMT, \
|
||||||
SWITCH_STMT, GOTO_STMT, LABEL_STMT, \
|
SWITCH_STMT, GOTO_STMT, LABEL_STMT, \
|
||||||
ASM_STMT, FILE_STMT, CASE_LABEL
|
ASM_STMT, CASE_LABEL
|
||||||
|
|
||||||
/* TRUE if a code represents a statement. The front end init
|
/* TRUE if a code represents a statement. The front end init
|
||||||
langhook should take care of initialization of this array. */
|
langhook should take care of initialization of this array. */
|
||||||
@ -1165,24 +1109,6 @@ extern bool statement_code_p[MAX_TREE_CODES];
|
|||||||
statement_code_p[STMT_CODES[i]] = true; \
|
statement_code_p[STMT_CODES[i]] = true; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
extern void genrtl_do_pushlevel (void);
|
|
||||||
extern void genrtl_goto_stmt (tree);
|
|
||||||
extern void genrtl_expr_stmt (tree);
|
|
||||||
extern void genrtl_expr_stmt_value (tree, int, int);
|
|
||||||
extern void genrtl_decl_stmt (tree);
|
|
||||||
extern void genrtl_if_stmt (tree);
|
|
||||||
extern void genrtl_while_stmt (tree);
|
|
||||||
extern void genrtl_do_stmt (tree);
|
|
||||||
extern void genrtl_return_stmt (tree);
|
|
||||||
extern void genrtl_for_stmt (tree);
|
|
||||||
extern void genrtl_break_stmt (void);
|
|
||||||
extern void genrtl_continue_stmt (void);
|
|
||||||
extern void genrtl_scope_stmt (tree);
|
|
||||||
extern void genrtl_switch_stmt (tree);
|
|
||||||
extern void genrtl_case_label (tree);
|
|
||||||
extern void genrtl_compound_stmt (tree);
|
|
||||||
extern void genrtl_asm_stmt (tree, tree, tree, tree, tree, int);
|
|
||||||
extern void genrtl_cleanup_stmt (tree);
|
|
||||||
extern int stmts_are_full_exprs_p (void);
|
extern int stmts_are_full_exprs_p (void);
|
||||||
extern int anon_aggr_type_p (tree);
|
extern int anon_aggr_type_p (tree);
|
||||||
|
|
||||||
@ -1198,13 +1124,8 @@ extern int anon_aggr_type_p (tree);
|
|||||||
#define CLEAR_DECL_C_BIT_FIELD(NODE) \
|
#define CLEAR_DECL_C_BIT_FIELD(NODE) \
|
||||||
(DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
|
(DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
|
||||||
|
|
||||||
/* In a VAR_DECL, nonzero if the decl is a register variable with
|
|
||||||
an explicit asm specification. */
|
|
||||||
#define DECL_C_HARD_REGISTER(DECL) DECL_LANG_FLAG_4 (VAR_DECL_CHECK (DECL))
|
|
||||||
|
|
||||||
extern void emit_local_var (tree);
|
extern void emit_local_var (tree);
|
||||||
extern void make_rtl_for_local_static (tree);
|
extern void make_rtl_for_local_static (tree);
|
||||||
extern tree expand_cond (tree);
|
|
||||||
extern tree c_expand_return (tree);
|
extern tree c_expand_return (tree);
|
||||||
extern tree do_case (tree, tree);
|
extern tree do_case (tree, tree);
|
||||||
extern tree build_stmt (enum tree_code, ...);
|
extern tree build_stmt (enum tree_code, ...);
|
||||||
@ -1249,6 +1170,8 @@ extern int case_compare (splay_tree_key, splay_tree_key);
|
|||||||
|
|
||||||
extern tree c_add_case_label (splay_tree, tree, tree, tree);
|
extern tree c_add_case_label (splay_tree, tree, tree, tree);
|
||||||
|
|
||||||
|
extern void c_do_switch_warnings (splay_tree, tree);
|
||||||
|
|
||||||
extern tree build_function_call (tree, tree);
|
extern tree build_function_call (tree, tree);
|
||||||
|
|
||||||
extern tree finish_label_address_expr (tree);
|
extern tree finish_label_address_expr (tree);
|
||||||
@ -1289,6 +1212,17 @@ extern void dump_time_statistics (void);
|
|||||||
|
|
||||||
extern bool c_dump_tree (void *, tree);
|
extern bool c_dump_tree (void *, tree);
|
||||||
|
|
||||||
|
extern int c_gimplify_expr (tree *, tree *, tree *);
|
||||||
|
extern tree c_walk_subtrees (tree*, int*, walk_tree_fn, void*, void*);
|
||||||
|
extern int c_tree_chain_matters_p (tree);
|
||||||
|
|
||||||
|
extern void c_warn_unused_result (tree *);
|
||||||
|
|
||||||
|
/* In c-simplify.c */
|
||||||
|
extern void c_genericize (tree);
|
||||||
|
extern int c_gimplify_stmt (tree *);
|
||||||
|
extern tree stmt_expr_last_stmt (tree);
|
||||||
|
|
||||||
extern void pch_init (void);
|
extern void pch_init (void);
|
||||||
extern int c_common_valid_pch (cpp_reader *pfile, const char *name, int fd);
|
extern int c_common_valid_pch (cpp_reader *pfile, const char *name, int fd);
|
||||||
extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd,
|
extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd,
|
||||||
@ -1299,7 +1233,6 @@ extern void builtin_define_with_value (const char *, const char *, int);
|
|||||||
extern void c_stddef_cpp_builtins (void);
|
extern void c_stddef_cpp_builtins (void);
|
||||||
extern void fe_file_change (const struct line_map *);
|
extern void fe_file_change (const struct line_map *);
|
||||||
extern int c_estimate_num_insns (tree decl);
|
extern int c_estimate_num_insns (tree decl);
|
||||||
extern bool c_decl_uninit (tree t);
|
|
||||||
extern void c_parse_error (const char *, enum cpp_ttype, tree);
|
extern void c_parse_error (const char *, enum cpp_ttype, tree);
|
||||||
|
|
||||||
/* The following have been moved here from c-tree.h, since they're needed
|
/* The following have been moved here from c-tree.h, since they're needed
|
||||||
|
@ -114,6 +114,9 @@ convert (tree type, tree expr)
|
|||||||
return fold (convert_to_complex (type, e));
|
return fold (convert_to_complex (type, e));
|
||||||
if (code == VECTOR_TYPE)
|
if (code == VECTOR_TYPE)
|
||||||
return fold (convert_to_vector (type, e));
|
return fold (convert_to_vector (type, e));
|
||||||
|
if ((code == RECORD_TYPE || code == UNION_TYPE)
|
||||||
|
&& lang_hooks.types_compatible_p (type, TREE_TYPE (expr)))
|
||||||
|
return e;
|
||||||
|
|
||||||
error ("conversion to non-scalar type requested");
|
error ("conversion to non-scalar type requested");
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
|
229
gcc/c-decl.c
229
gcc/c-decl.c
@ -49,6 +49,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "timevar.h"
|
#include "timevar.h"
|
||||||
#include "c-common.h"
|
#include "c-common.h"
|
||||||
#include "c-pragma.h"
|
#include "c-pragma.h"
|
||||||
|
#include "langhooks.h"
|
||||||
|
#include "tree-mudflap.h"
|
||||||
|
#include "tree-simple.h"
|
||||||
|
#include "diagnostic.h"
|
||||||
|
#include "tree-dump.h"
|
||||||
#include "cgraph.h"
|
#include "cgraph.h"
|
||||||
#include "hashtab.h"
|
#include "hashtab.h"
|
||||||
#include "libfuncs.h"
|
#include "libfuncs.h"
|
||||||
@ -1664,7 +1669,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
|
|||||||
static bool
|
static bool
|
||||||
duplicate_decls (tree newdecl, tree olddecl)
|
duplicate_decls (tree newdecl, tree olddecl)
|
||||||
{
|
{
|
||||||
tree newtype, oldtype;
|
tree newtype = NULL, oldtype = NULL;
|
||||||
|
|
||||||
if (!diagnose_mismatched_decls (newdecl, olddecl, &newtype, &oldtype))
|
if (!diagnose_mismatched_decls (newdecl, olddecl, &newtype, &oldtype))
|
||||||
return false;
|
return false;
|
||||||
@ -2113,10 +2118,6 @@ lookup_label (tree name)
|
|||||||
any that may be inherited from containing functions or containing
|
any that may be inherited from containing functions or containing
|
||||||
scopes. This is called for __label__ declarations. */
|
scopes. This is called for __label__ declarations. */
|
||||||
|
|
||||||
/* Note that valid use, if the label being shadowed comes from another
|
|
||||||
scope in the same function, requires calling declare_nonlocal_label
|
|
||||||
right away. (Is this still true? -zw 2003-07-17) */
|
|
||||||
|
|
||||||
tree
|
tree
|
||||||
declare_label (tree name)
|
declare_label (tree name)
|
||||||
{
|
{
|
||||||
@ -2936,7 +2937,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
|
|||||||
in a particular register. */
|
in a particular register. */
|
||||||
if (C_DECL_REGISTER (decl))
|
if (C_DECL_REGISTER (decl))
|
||||||
{
|
{
|
||||||
DECL_C_HARD_REGISTER (decl) = 1;
|
DECL_HARD_REGISTER (decl) = 1;
|
||||||
/* This cannot be done for a structure with volatile
|
/* This cannot be done for a structure with volatile
|
||||||
fields, on which DECL_REGISTER will have been
|
fields, on which DECL_REGISTER will have been
|
||||||
reset. */
|
reset. */
|
||||||
@ -3304,11 +3305,14 @@ check_bitfield_type_and_width (tree *type, tree *width, const char *orig_name)
|
|||||||
else
|
else
|
||||||
w = tree_low_cst (*width, 1);
|
w = tree_low_cst (*width, 1);
|
||||||
|
|
||||||
if (TREE_CODE (*type) == ENUMERAL_TYPE
|
if (TREE_CODE (*type) == ENUMERAL_TYPE)
|
||||||
&& (w < min_precision (TYPE_MIN_VALUE (*type), TYPE_UNSIGNED (*type))
|
{
|
||||||
|| w < min_precision (TYPE_MAX_VALUE (*type),
|
struct lang_type *lt = TYPE_LANG_SPECIFIC (*type);
|
||||||
TYPE_UNSIGNED (*type))))
|
if (!lt
|
||||||
warning ("`%s' is narrower than values of its type", name);
|
|| w < min_precision (lt->enum_min, TYPE_UNSIGNED (*type))
|
||||||
|
|| w < min_precision (lt->enum_max, TYPE_UNSIGNED (*type)))
|
||||||
|
warning ("`%s' is narrower than values of its type", name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Given declspecs and a declarator,
|
/* Given declspecs and a declarator,
|
||||||
@ -4059,6 +4063,11 @@ grokdeclarator (tree declarator, tree declspecs,
|
|||||||
TYPE_SIZE (type) = bitsize_zero_node;
|
TYPE_SIZE (type) = bitsize_zero_node;
|
||||||
TYPE_SIZE_UNIT (type) = size_zero_node;
|
TYPE_SIZE_UNIT (type) = size_zero_node;
|
||||||
}
|
}
|
||||||
|
else if (declarator && TREE_CODE (declarator) == INDIRECT_REF)
|
||||||
|
/* We can never complete an array type which is the target of a
|
||||||
|
pointer, so go ahead and lay it out. */
|
||||||
|
layout_type (type);
|
||||||
|
|
||||||
if (decl_context != PARM
|
if (decl_context != PARM
|
||||||
&& (array_ptr_quals != NULL_TREE || array_parm_static))
|
&& (array_ptr_quals != NULL_TREE || array_parm_static))
|
||||||
{
|
{
|
||||||
@ -5251,7 +5260,7 @@ finish_struct (tree t, tree fieldlist, tree attributes)
|
|||||||
ensure that this lives as long as the rest of the struct decl.
|
ensure that this lives as long as the rest of the struct decl.
|
||||||
All decls in an inline function need to be saved. */
|
All decls in an inline function need to be saved. */
|
||||||
|
|
||||||
space = ggc_alloc (sizeof (struct lang_type));
|
space = ggc_alloc_cleared (sizeof (struct lang_type));
|
||||||
space2 = ggc_alloc (sizeof (struct sorted_fields_type) + len * sizeof (tree));
|
space2 = ggc_alloc (sizeof (struct sorted_fields_type) + len * sizeof (tree));
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
@ -5386,9 +5395,10 @@ tree
|
|||||||
finish_enum (tree enumtype, tree values, tree attributes)
|
finish_enum (tree enumtype, tree values, tree attributes)
|
||||||
{
|
{
|
||||||
tree pair, tem;
|
tree pair, tem;
|
||||||
tree minnode = 0, maxnode = 0, enum_value_type;
|
tree minnode = 0, maxnode = 0;
|
||||||
int precision, unsign;
|
int precision, unsign;
|
||||||
bool toplevel = (file_scope == current_scope);
|
bool toplevel = (file_scope == current_scope);
|
||||||
|
struct lang_type *lt;
|
||||||
|
|
||||||
decl_attributes (&enumtype, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE);
|
decl_attributes (&enumtype, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE);
|
||||||
|
|
||||||
@ -5418,27 +5428,20 @@ finish_enum (tree enumtype, tree values, tree attributes)
|
|||||||
min_precision (maxnode, unsign));
|
min_precision (maxnode, unsign));
|
||||||
if (TYPE_PACKED (enumtype) || precision > TYPE_PRECISION (integer_type_node))
|
if (TYPE_PACKED (enumtype) || precision > TYPE_PRECISION (integer_type_node))
|
||||||
{
|
{
|
||||||
tree narrowest = c_common_type_for_size (precision, unsign);
|
tem = c_common_type_for_size (precision, unsign);
|
||||||
if (narrowest == 0)
|
if (tem == NULL)
|
||||||
{
|
{
|
||||||
warning ("enumeration values exceed range of largest integer");
|
warning ("enumeration values exceed range of largest integer");
|
||||||
narrowest = long_long_integer_type_node;
|
tem = long_long_integer_type_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
precision = TYPE_PRECISION (narrowest);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
precision = TYPE_PRECISION (integer_type_node);
|
tem = unsign ? unsigned_type_node : integer_type_node;
|
||||||
|
|
||||||
if (precision == TYPE_PRECISION (integer_type_node))
|
TYPE_MIN_VALUE (enumtype) = TYPE_MIN_VALUE (tem);
|
||||||
enum_value_type = c_common_type_for_size (precision, 0);
|
TYPE_MAX_VALUE (enumtype) = TYPE_MAX_VALUE (tem);
|
||||||
else
|
TYPE_PRECISION (enumtype) = TYPE_PRECISION (tem);
|
||||||
enum_value_type = enumtype;
|
TYPE_UNSIGNED (enumtype) = TYPE_UNSIGNED (tem);
|
||||||
|
|
||||||
TYPE_MIN_VALUE (enumtype) = minnode;
|
|
||||||
TYPE_MAX_VALUE (enumtype) = maxnode;
|
|
||||||
TYPE_PRECISION (enumtype) = precision;
|
|
||||||
TYPE_UNSIGNED (enumtype) = unsign;
|
|
||||||
TYPE_SIZE (enumtype) = 0;
|
TYPE_SIZE (enumtype) = 0;
|
||||||
layout_type (enumtype);
|
layout_type (enumtype);
|
||||||
|
|
||||||
@ -5454,6 +5457,7 @@ finish_enum (tree enumtype, tree values, tree attributes)
|
|||||||
for (pair = values; pair; pair = TREE_CHAIN (pair))
|
for (pair = values; pair; pair = TREE_CHAIN (pair))
|
||||||
{
|
{
|
||||||
tree enu = TREE_PURPOSE (pair);
|
tree enu = TREE_PURPOSE (pair);
|
||||||
|
tree ini = DECL_INITIAL (enu);
|
||||||
|
|
||||||
TREE_TYPE (enu) = enumtype;
|
TREE_TYPE (enu) = enumtype;
|
||||||
|
|
||||||
@ -5464,18 +5468,27 @@ finish_enum (tree enumtype, tree values, tree attributes)
|
|||||||
when comparing integers with enumerators that fit in the
|
when comparing integers with enumerators that fit in the
|
||||||
int range. When -pedantic is given, build_enumerator()
|
int range. When -pedantic is given, build_enumerator()
|
||||||
would have already taken care of those that don't fit. */
|
would have already taken care of those that don't fit. */
|
||||||
if (int_fits_type_p (DECL_INITIAL (enu), enum_value_type))
|
if (int_fits_type_p (ini, integer_type_node))
|
||||||
DECL_INITIAL (enu) = convert (enum_value_type, DECL_INITIAL (enu));
|
tem = integer_type_node;
|
||||||
else
|
else
|
||||||
DECL_INITIAL (enu) = convert (enumtype, DECL_INITIAL (enu));
|
tem = enumtype;
|
||||||
|
ini = convert (tem, ini);
|
||||||
|
|
||||||
|
DECL_INITIAL (enu) = ini;
|
||||||
TREE_PURPOSE (pair) = DECL_NAME (enu);
|
TREE_PURPOSE (pair) = DECL_NAME (enu);
|
||||||
TREE_VALUE (pair) = DECL_INITIAL (enu);
|
TREE_VALUE (pair) = ini;
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPE_VALUES (enumtype) = values;
|
TYPE_VALUES (enumtype) = values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Record the min/max values so that we can warn about bit-field
|
||||||
|
enumerations that are too small for the values. */
|
||||||
|
lt = ggc_alloc_cleared (sizeof (struct lang_type));
|
||||||
|
lt->enum_min = minnode;
|
||||||
|
lt->enum_max = maxnode;
|
||||||
|
TYPE_LANG_SPECIFIC (enumtype) = lt;
|
||||||
|
|
||||||
/* Fix up all variant types of this enum type. */
|
/* Fix up all variant types of this enum type. */
|
||||||
for (tem = TYPE_MAIN_VARIANT (enumtype); tem; tem = TYPE_NEXT_VARIANT (tem))
|
for (tem = TYPE_MAIN_VARIANT (enumtype); tem; tem = TYPE_NEXT_VARIANT (tem))
|
||||||
{
|
{
|
||||||
@ -5491,6 +5504,7 @@ finish_enum (tree enumtype, tree values, tree attributes)
|
|||||||
TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype);
|
TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype);
|
||||||
TYPE_USER_ALIGN (tem) = TYPE_USER_ALIGN (enumtype);
|
TYPE_USER_ALIGN (tem) = TYPE_USER_ALIGN (enumtype);
|
||||||
TYPE_UNSIGNED (tem) = TYPE_UNSIGNED (enumtype);
|
TYPE_UNSIGNED (tem) = TYPE_UNSIGNED (enumtype);
|
||||||
|
TYPE_LANG_SPECIFIC (tem) = TYPE_LANG_SPECIFIC (enumtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finish debugging output for this type. */
|
/* Finish debugging output for this type. */
|
||||||
@ -6085,6 +6099,25 @@ store_parm_decls_oldstyle (tree fndecl, tree arg_info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* A subroutine of store_parm_decls called via walk_tree. Mark all
|
||||||
|
decls non-local. */
|
||||||
|
|
||||||
|
static tree
|
||||||
|
set_decl_nonlocal (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
tree t = *tp;
|
||||||
|
|
||||||
|
if (DECL_P (t))
|
||||||
|
{
|
||||||
|
DECL_NONLOCAL (t) = 1;
|
||||||
|
*walk_subtrees = 0;
|
||||||
|
}
|
||||||
|
else if (TYPE_P (t))
|
||||||
|
*walk_subtrees = 0;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Store the parameter declarations into the current function declaration.
|
/* Store the parameter declarations into the current function declaration.
|
||||||
This is called after parsing the parameter declarations, before
|
This is called after parsing the parameter declarations, before
|
||||||
digesting the body of the function.
|
digesting the body of the function.
|
||||||
@ -6142,7 +6175,14 @@ store_parm_decls (void)
|
|||||||
for (t = DECL_LANG_SPECIFIC (fndecl)->pending_sizes;
|
for (t = DECL_LANG_SPECIFIC (fndecl)->pending_sizes;
|
||||||
t;
|
t;
|
||||||
t = TREE_CHAIN (t))
|
t = TREE_CHAIN (t))
|
||||||
SAVE_EXPR_CONTEXT (TREE_VALUE (t)) = context;
|
{
|
||||||
|
/* We will have a nonlocal use of whatever variables are
|
||||||
|
buried inside here. */
|
||||||
|
walk_tree (&TREE_OPERAND (TREE_VALUE (t), 0),
|
||||||
|
set_decl_nonlocal, NULL, NULL);
|
||||||
|
|
||||||
|
SAVE_EXPR_CONTEXT (TREE_VALUE (t)) = context;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is being processed in whole-function mode. */
|
/* This function is being processed in whole-function mode. */
|
||||||
@ -6156,6 +6196,32 @@ store_parm_decls (void)
|
|||||||
cfun->x_dont_save_pending_sizes_p = 1;
|
cfun->x_dont_save_pending_sizes_p = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Give FNDECL and all its nested functions to cgraph for compilation. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
c_finalize (tree fndecl)
|
||||||
|
{
|
||||||
|
struct cgraph_node *cgn;
|
||||||
|
|
||||||
|
/* Handle attribute((warn_unused_result)). Relies on gimple input. */
|
||||||
|
c_warn_unused_result (&DECL_SAVED_TREE (fndecl));
|
||||||
|
|
||||||
|
/* ??? Objc emits functions after finalizing the compilation unit.
|
||||||
|
This should be cleaned up later and this conditional removed. */
|
||||||
|
if (cgraph_global_info_ready)
|
||||||
|
{
|
||||||
|
c_expand_body (fndecl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Finalize all nested functions now. */
|
||||||
|
cgn = cgraph_node (fndecl);
|
||||||
|
for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
|
||||||
|
c_finalize (cgn->decl);
|
||||||
|
|
||||||
|
cgraph_finalize_function (fndecl, false);
|
||||||
|
}
|
||||||
|
|
||||||
/* Finish up a function declaration and compile that function
|
/* Finish up a function declaration and compile that function
|
||||||
all the way to assembler language output. The free the storage
|
all the way to assembler language output. The free the storage
|
||||||
for the function definition.
|
for the function definition.
|
||||||
@ -6253,17 +6319,44 @@ finish_function (void)
|
|||||||
&& current_function_returns_null)
|
&& current_function_returns_null)
|
||||||
warning ("this function may return with or without a value");
|
warning ("this function may return with or without a value");
|
||||||
|
|
||||||
|
/* Store the end of the function, so that we get good line number
|
||||||
|
info for the epilogue. */
|
||||||
|
cfun->function_end_locus = input_location;
|
||||||
|
|
||||||
|
/* If we don't have ctors/dtors sections, and this is a static
|
||||||
|
constructor or destructor, it must be recorded now. */
|
||||||
|
if (DECL_STATIC_CONSTRUCTOR (fndecl)
|
||||||
|
&& !targetm.have_ctors_dtors)
|
||||||
|
static_ctors = tree_cons (NULL_TREE, fndecl, static_ctors);
|
||||||
|
if (DECL_STATIC_DESTRUCTOR (fndecl)
|
||||||
|
&& !targetm.have_ctors_dtors)
|
||||||
|
static_dtors = tree_cons (NULL_TREE, fndecl, static_dtors);
|
||||||
|
|
||||||
|
/* Genericize before inlining. Delay genericizing nested functions
|
||||||
|
until their parent function is genericized. Since finalizing
|
||||||
|
requires GENERIC, delay that as well. */
|
||||||
|
|
||||||
|
if (DECL_INITIAL (fndecl) && DECL_INITIAL (fndecl) != error_mark_node)
|
||||||
|
{
|
||||||
|
if (!decl_function_context (fndecl))
|
||||||
|
{
|
||||||
|
c_genericize (fndecl);
|
||||||
|
lower_nested_functions (fndecl);
|
||||||
|
c_finalize (fndecl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Register this function with cgraph just far enough to get it
|
||||||
|
added to our parent's nested function list. Handy, since the
|
||||||
|
C front end doesn't have such a list. */
|
||||||
|
(void) cgraph_node (fndecl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* We're leaving the context of this function, so zap cfun.
|
/* We're leaving the context of this function, so zap cfun.
|
||||||
It's still in DECL_STRUCT_FUNCTION , and we'll restore it in
|
It's still in DECL_STRUCT_FUNCTION, and we'll restore it in
|
||||||
tree_rest_of_compilation. */
|
tree_rest_of_compilation. */
|
||||||
cfun = NULL;
|
cfun = NULL;
|
||||||
|
|
||||||
/* ??? Objc emits functions after finalizing the compilation unit.
|
|
||||||
This should be cleaned up later and this conditional removed. */
|
|
||||||
if (!cgraph_global_info_ready)
|
|
||||||
cgraph_finalize_function (fndecl, false);
|
|
||||||
else
|
|
||||||
c_expand_body (fndecl);
|
|
||||||
current_function_decl = NULL;
|
current_function_decl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6290,23 +6383,14 @@ c_expand_body_1 (tree fndecl, int nested_p)
|
|||||||
/* Return to the enclosing function. */
|
/* Return to the enclosing function. */
|
||||||
pop_function_context ();
|
pop_function_context ();
|
||||||
|
|
||||||
if (DECL_STATIC_CONSTRUCTOR (fndecl))
|
if (DECL_STATIC_CONSTRUCTOR (fndecl)
|
||||||
{
|
&& targetm.have_ctors_dtors)
|
||||||
if (targetm.have_ctors_dtors)
|
targetm.asm_out.constructor (XEXP (DECL_RTL (fndecl), 0),
|
||||||
targetm.asm_out.constructor (XEXP (DECL_RTL (fndecl), 0),
|
DEFAULT_INIT_PRIORITY);
|
||||||
DEFAULT_INIT_PRIORITY);
|
if (DECL_STATIC_DESTRUCTOR (fndecl)
|
||||||
else
|
&& targetm.have_ctors_dtors)
|
||||||
static_ctors = tree_cons (NULL_TREE, fndecl, static_ctors);
|
targetm.asm_out.destructor (XEXP (DECL_RTL (fndecl), 0),
|
||||||
}
|
DEFAULT_INIT_PRIORITY);
|
||||||
|
|
||||||
if (DECL_STATIC_DESTRUCTOR (fndecl))
|
|
||||||
{
|
|
||||||
if (targetm.have_ctors_dtors)
|
|
||||||
targetm.asm_out.destructor (XEXP (DECL_RTL (fndecl), 0),
|
|
||||||
DEFAULT_INIT_PRIORITY);
|
|
||||||
else
|
|
||||||
static_dtors = tree_cons (NULL_TREE, fndecl, static_dtors);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like c_expand_body_1 but only for unnested functions. */
|
/* Like c_expand_body_1 but only for unnested functions. */
|
||||||
@ -6512,19 +6596,32 @@ c_begin_compound_stmt (void)
|
|||||||
return stmt;
|
return stmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand T (a DECL_STMT) if it declares an entity not handled by the
|
/* Expand DECL if it declares an entity not handled by the
|
||||||
common code. */
|
common code. */
|
||||||
|
|
||||||
void
|
int
|
||||||
c_expand_decl_stmt (tree t)
|
c_expand_decl (tree decl)
|
||||||
{
|
{
|
||||||
tree decl = DECL_STMT_DECL (t);
|
if (TREE_CODE (decl) == VAR_DECL && !TREE_STATIC (decl))
|
||||||
|
{
|
||||||
|
/* Let the back-end know about this variable. */
|
||||||
|
if (!anon_aggr_type_p (TREE_TYPE (decl)))
|
||||||
|
emit_local_var (decl);
|
||||||
|
else
|
||||||
|
expand_anon_union_decl (decl, NULL_TREE,
|
||||||
|
DECL_ANON_UNION_ELEMS (decl));
|
||||||
|
}
|
||||||
|
else if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
|
||||||
|
make_rtl_for_local_static (decl);
|
||||||
/* Expand nested functions. */
|
/* Expand nested functions. */
|
||||||
if (TREE_CODE (decl) == FUNCTION_DECL
|
else if (TREE_CODE (decl) == FUNCTION_DECL
|
||||||
&& DECL_CONTEXT (decl) == current_function_decl
|
&& DECL_CONTEXT (decl) == current_function_decl
|
||||||
&& DECL_SAVED_TREE (decl))
|
&& DECL_SAVED_TREE (decl))
|
||||||
c_expand_body_1 (decl, 1);
|
c_expand_body_1 (decl, 1);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the global value of T as a symbol. */
|
/* Return the global value of T as a symbol. */
|
||||||
|
@ -32,7 +32,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
void
|
void
|
||||||
dump_stmt (dump_info_p di, tree t)
|
dump_stmt (dump_info_p di, tree t)
|
||||||
{
|
{
|
||||||
dump_int (di, "line", STMT_LINENO (t));
|
location_t *locus = EXPR_LOCUS (t);
|
||||||
|
if (locus)
|
||||||
|
dump_int (di, "line", locus->line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dump the next statement after STMT. */
|
/* Dump the next statement after STMT. */
|
||||||
|
@ -86,7 +86,7 @@ handle_format_arg_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
|
|||||||
{
|
{
|
||||||
tree type = *node;
|
tree type = *node;
|
||||||
tree format_num_expr = TREE_VALUE (args);
|
tree format_num_expr = TREE_VALUE (args);
|
||||||
unsigned HOST_WIDE_INT format_num;
|
unsigned HOST_WIDE_INT format_num = 0;
|
||||||
tree argument;
|
tree argument;
|
||||||
|
|
||||||
if (!get_constant (format_num_expr, &format_num, 0))
|
if (!get_constant (format_num_expr, &format_num, 0))
|
||||||
|
30
gcc/c-lang.c
30
gcc/c-lang.c
@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "ggc.h"
|
#include "ggc.h"
|
||||||
#include "langhooks.h"
|
#include "langhooks.h"
|
||||||
#include "langhooks-def.h"
|
#include "langhooks-def.h"
|
||||||
|
#include "tree-inline.h"
|
||||||
#include "diagnostic.h"
|
#include "diagnostic.h"
|
||||||
#include "c-pretty-print.h"
|
#include "c-pretty-print.h"
|
||||||
|
|
||||||
@ -63,6 +64,8 @@ enum c_language_kind c_language = clk_c;
|
|||||||
#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
|
#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
|
||||||
#undef LANG_HOOKS_EXPAND_EXPR
|
#undef LANG_HOOKS_EXPAND_EXPR
|
||||||
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
|
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
|
||||||
|
#undef LANG_HOOKS_EXPAND_DECL
|
||||||
|
#define LANG_HOOKS_EXPAND_DECL c_expand_decl
|
||||||
#undef LANG_HOOKS_MARK_ADDRESSABLE
|
#undef LANG_HOOKS_MARK_ADDRESSABLE
|
||||||
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
|
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
|
||||||
#undef LANG_HOOKS_PARSE_FILE
|
#undef LANG_HOOKS_PARSE_FILE
|
||||||
@ -89,13 +92,10 @@ enum c_language_kind c_language = clk_c;
|
|||||||
#define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context
|
#define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context
|
||||||
#undef LANG_HOOKS_FUNCTION_LEAVE_NESTED
|
#undef LANG_HOOKS_FUNCTION_LEAVE_NESTED
|
||||||
#define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context
|
#define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context
|
||||||
|
#undef LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P
|
||||||
|
#define LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P c_missing_noreturn_ok_p
|
||||||
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
|
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
|
||||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
|
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
|
||||||
#undef LANG_HOOKS_DECL_UNINIT
|
|
||||||
#define LANG_HOOKS_DECL_UNINIT c_decl_uninit
|
|
||||||
|
|
||||||
#undef LANG_HOOKS_RTL_EXPAND_STMT
|
|
||||||
#define LANG_HOOKS_RTL_EXPAND_STMT expand_stmt
|
|
||||||
|
|
||||||
/* Attribute hooks. */
|
/* Attribute hooks. */
|
||||||
#undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
|
#undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
|
||||||
@ -103,20 +103,24 @@ enum c_language_kind c_language = clk_c;
|
|||||||
#undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
|
#undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
|
||||||
#define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
|
#define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
|
||||||
|
|
||||||
|
#undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
|
||||||
|
#define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
|
||||||
|
c_walk_subtrees
|
||||||
#undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
|
#undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
|
||||||
#define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
|
#define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
|
||||||
c_cannot_inline_tree_fn
|
c_cannot_inline_tree_fn
|
||||||
#undef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS
|
#undef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS
|
||||||
#define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
|
#define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
|
||||||
c_disregard_inline_limits
|
c_disregard_inline_limits
|
||||||
|
#undef LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P
|
||||||
|
#define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \
|
||||||
|
c_tree_chain_matters_p
|
||||||
#undef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P
|
#undef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P
|
||||||
#define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
|
#define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
|
||||||
anon_aggr_type_p
|
anon_aggr_type_p
|
||||||
#undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING
|
#undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING
|
||||||
#define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
|
#define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
|
||||||
c_convert_parm_for_inlining
|
c_convert_parm_for_inlining
|
||||||
#undef LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS
|
|
||||||
#define LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS c_estimate_num_insns
|
|
||||||
#undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
|
#undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
|
||||||
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN c_dump_tree
|
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN c_dump_tree
|
||||||
|
|
||||||
@ -156,6 +160,13 @@ enum c_language_kind c_language = clk_c;
|
|||||||
#undef LANG_HOOKS_WRITE_GLOBALS
|
#undef LANG_HOOKS_WRITE_GLOBALS
|
||||||
#define LANG_HOOKS_WRITE_GLOBALS c_write_global_declarations
|
#define LANG_HOOKS_WRITE_GLOBALS c_write_global_declarations
|
||||||
|
|
||||||
|
/* Hooks for tree gimplification. */
|
||||||
|
#undef LANG_HOOKS_GIMPLIFY_EXPR
|
||||||
|
#define LANG_HOOKS_GIMPLIFY_EXPR c_gimplify_expr
|
||||||
|
|
||||||
|
#undef LANG_HOOKS_TYPES_COMPATIBLE_P
|
||||||
|
#define LANG_HOOKS_TYPES_COMPATIBLE_P c_types_compatible_p
|
||||||
|
|
||||||
/* ### When changing hooks, consider if ObjC needs changing too!! ### */
|
/* ### When changing hooks, consider if ObjC needs changing too!! ### */
|
||||||
|
|
||||||
/* Each front end provides its own. */
|
/* Each front end provides its own. */
|
||||||
@ -202,6 +213,11 @@ finish_file (void)
|
|||||||
c_objc_common_finish_file ();
|
c_objc_common_finish_file ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
c_types_compatible_p (tree x, tree y)
|
||||||
|
{
|
||||||
|
return comptypes (TYPE_MAIN_VARIANT (x), TYPE_MAIN_VARIANT (y), 0);
|
||||||
|
}
|
||||||
static void
|
static void
|
||||||
c_initialize_diagnostics (diagnostic_context *context)
|
c_initialize_diagnostics (diagnostic_context *context)
|
||||||
{
|
{
|
||||||
|
100
gcc/c-mudflap.c
Normal file
100
gcc/c-mudflap.c
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
/* Mudflap: narrow-pointer bounds-checking by tree rewriting:
|
||||||
|
C front-end interface.
|
||||||
|
|
||||||
|
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
Contributed by Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
and Graydon Hoare <graydon@redhat.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 2, 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 COPYING. If not, write to the Free
|
||||||
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "errors.h"
|
||||||
|
#include "system.h"
|
||||||
|
#include "coretypes.h"
|
||||||
|
#include "tm.h"
|
||||||
|
#include "tree.h"
|
||||||
|
#include "tree-inline.h"
|
||||||
|
#include "c-tree.h"
|
||||||
|
#include "c-common.h"
|
||||||
|
#include "diagnostic.h"
|
||||||
|
#include "output.h"
|
||||||
|
#include "varray.h"
|
||||||
|
#include "tree-mudflap.h"
|
||||||
|
#include "target.h"
|
||||||
|
#include "flags.h"
|
||||||
|
#include "rtl.h"
|
||||||
|
#include "toplev.h"
|
||||||
|
#include "function.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
|
||||||
|
/* Initialize the global tree nodes that correspond to mf-runtime.h
|
||||||
|
declarations. */
|
||||||
|
tree
|
||||||
|
mflang_lookup_decl (const char* name)
|
||||||
|
{
|
||||||
|
tree decl = lookup_name (get_identifier (name));
|
||||||
|
if (decl == NULL_TREE)
|
||||||
|
internal_error ("mudflap: cannot find declaration of `%s' from mf-runtime.h",
|
||||||
|
name);
|
||||||
|
|
||||||
|
return decl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Emit a synthetic CTOR function for the current file. Populate it from
|
||||||
|
the enqueued __mf_register calls. Compile the function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
mflang_flush_calls (tree enqueued_call_stmt_chain)
|
||||||
|
{
|
||||||
|
tree fnname, t1, t2, body, block, scope;
|
||||||
|
|
||||||
|
/* Short-circuit! */
|
||||||
|
if (enqueued_call_stmt_chain == NULL_TREE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fnname = get_identifier ("__mudflap_static_initializer");
|
||||||
|
t1 = build_tree_list (NULL_TREE, void_type_node);
|
||||||
|
t2 = tree_cons (NULL, NULL, t1);
|
||||||
|
start_function (t1, build_nt (CALL_EXPR, fnname, t2, NULL), NULL);
|
||||||
|
store_parm_decls ();
|
||||||
|
|
||||||
|
DECL_STATIC_CONSTRUCTOR (current_function_decl) = 1;
|
||||||
|
TREE_PUBLIC (current_function_decl) = 0;
|
||||||
|
TREE_USED (current_function_decl) = 1;
|
||||||
|
mf_mark (current_function_decl);
|
||||||
|
|
||||||
|
body = c_begin_compound_stmt ();
|
||||||
|
push_scope ();
|
||||||
|
clear_last_expr ();
|
||||||
|
add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0);
|
||||||
|
|
||||||
|
c_expand_expr_stmt (enqueued_call_stmt_chain);
|
||||||
|
|
||||||
|
scope = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
|
||||||
|
block = pop_scope ();
|
||||||
|
SCOPE_STMT_BLOCK (TREE_PURPOSE (scope)) = block;
|
||||||
|
SCOPE_STMT_BLOCK (TREE_VALUE (scope)) = block;
|
||||||
|
RECHAIN_STMTS (body, COMPOUND_BODY (body));
|
||||||
|
finish_function ();
|
||||||
|
}
|
@ -36,14 +36,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "varray.h"
|
#include "varray.h"
|
||||||
#include "ggc.h"
|
#include "ggc.h"
|
||||||
#include "langhooks.h"
|
#include "langhooks.h"
|
||||||
|
#include "tree-mudflap.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "cgraph.h"
|
#include "cgraph.h"
|
||||||
|
|
||||||
static bool c_tree_printer (pretty_printer *, text_info *);
|
static bool c_tree_printer (pretty_printer *, text_info *);
|
||||||
static tree start_cdtor (int);
|
|
||||||
static void finish_cdtor (tree);
|
|
||||||
|
|
||||||
int
|
bool
|
||||||
c_missing_noreturn_ok_p (tree decl)
|
c_missing_noreturn_ok_p (tree decl)
|
||||||
{
|
{
|
||||||
/* A missing noreturn is not ok for freestanding implementations and
|
/* A missing noreturn is not ok for freestanding implementations and
|
||||||
@ -166,13 +165,10 @@ c_objc_common_init (void)
|
|||||||
if (c_common_init () == false)
|
if (c_common_init () == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
lang_expand_decl_stmt = c_expand_decl_stmt;
|
|
||||||
|
|
||||||
/* These were not defined in the Objective-C front end, but I'm
|
/* These were not defined in the Objective-C front end, but I'm
|
||||||
putting them here anyway. The diagnostic format decoder might
|
putting them here anyway. The diagnostic format decoder might
|
||||||
want an enhanced ObjC implementation. */
|
want an enhanced ObjC implementation. */
|
||||||
diagnostic_format_decoder (global_dc) = &c_tree_printer;
|
diagnostic_format_decoder (global_dc) = &c_tree_printer;
|
||||||
lang_missing_noreturn_ok_p = &c_missing_noreturn_ok_p;
|
|
||||||
|
|
||||||
/* If still unspecified, make it match -std=c99
|
/* If still unspecified, make it match -std=c99
|
||||||
(allowing for -pedantic-errors). */
|
(allowing for -pedantic-errors). */
|
||||||
@ -187,40 +183,33 @@ c_objc_common_init (void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static tree
|
/* Synthesize a function which calls all the global ctors or global dtors
|
||||||
start_cdtor (int method_type)
|
in this file. */
|
||||||
|
static void
|
||||||
|
build_cdtor (int method_type, tree cdtors)
|
||||||
{
|
{
|
||||||
tree fnname = get_file_function_name (method_type);
|
tree fnname = get_file_function_name (method_type);
|
||||||
tree void_list_node_1 = build_tree_list (NULL_TREE, void_type_node);
|
|
||||||
tree body;
|
tree body;
|
||||||
|
tree scope;
|
||||||
|
tree block;
|
||||||
|
|
||||||
start_function (void_list_node_1,
|
start_function (void_list_node,
|
||||||
build_nt (CALL_EXPR, fnname,
|
build_nt (CALL_EXPR, fnname,
|
||||||
tree_cons (NULL_TREE, NULL_TREE, void_list_node_1),
|
tree_cons (NULL_TREE, NULL_TREE, void_list_node),
|
||||||
NULL_TREE),
|
NULL_TREE),
|
||||||
NULL_TREE);
|
NULL_TREE);
|
||||||
store_parm_decls ();
|
store_parm_decls ();
|
||||||
|
|
||||||
current_function_cannot_inline
|
|
||||||
= "static constructors and destructors cannot be inlined";
|
|
||||||
|
|
||||||
body = c_begin_compound_stmt ();
|
body = c_begin_compound_stmt ();
|
||||||
|
|
||||||
push_scope ();
|
|
||||||
clear_last_expr ();
|
|
||||||
add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0);
|
add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0);
|
||||||
|
|
||||||
return body;
|
for (; cdtors; cdtors = TREE_CHAIN (cdtors))
|
||||||
}
|
add_stmt (build_stmt (EXPR_STMT,
|
||||||
|
build_function_call (TREE_VALUE (cdtors), 0)));
|
||||||
static void
|
|
||||||
finish_cdtor (tree body)
|
|
||||||
{
|
|
||||||
tree scope;
|
|
||||||
tree block;
|
|
||||||
|
|
||||||
scope = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
|
scope = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
|
||||||
block = pop_scope ();
|
|
||||||
|
block = make_node (BLOCK);
|
||||||
SCOPE_STMT_BLOCK (TREE_PURPOSE (scope)) = block;
|
SCOPE_STMT_BLOCK (TREE_PURPOSE (scope)) = block;
|
||||||
SCOPE_STMT_BLOCK (TREE_VALUE (scope)) = block;
|
SCOPE_STMT_BLOCK (TREE_VALUE (scope)) = block;
|
||||||
|
|
||||||
@ -237,30 +226,22 @@ c_objc_common_finish_file (void)
|
|||||||
if (pch_file)
|
if (pch_file)
|
||||||
c_common_write_pch ();
|
c_common_write_pch ();
|
||||||
|
|
||||||
|
if (static_ctors)
|
||||||
|
{
|
||||||
|
build_cdtor ('I', static_ctors);
|
||||||
|
static_ctors = 0;
|
||||||
|
}
|
||||||
|
if (static_dtors)
|
||||||
|
{
|
||||||
|
build_cdtor ('D', static_dtors);
|
||||||
|
static_dtors = 0;
|
||||||
|
}
|
||||||
|
|
||||||
cgraph_finalize_compilation_unit ();
|
cgraph_finalize_compilation_unit ();
|
||||||
cgraph_optimize ();
|
cgraph_optimize ();
|
||||||
|
|
||||||
if (static_ctors)
|
if (flag_mudflap)
|
||||||
{
|
mudflap_finish_file ();
|
||||||
tree body = start_cdtor ('I');
|
|
||||||
|
|
||||||
for (; static_ctors; static_ctors = TREE_CHAIN (static_ctors))
|
|
||||||
c_expand_expr_stmt (build_function_call (TREE_VALUE (static_ctors),
|
|
||||||
NULL_TREE));
|
|
||||||
|
|
||||||
finish_cdtor (body);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (static_dtors)
|
|
||||||
{
|
|
||||||
tree body = start_cdtor ('D');
|
|
||||||
|
|
||||||
for (; static_dtors; static_dtors = TREE_CHAIN (static_dtors))
|
|
||||||
c_expand_expr_stmt (build_function_call (TREE_VALUE (static_dtors),
|
|
||||||
NULL_TREE));
|
|
||||||
|
|
||||||
finish_cdtor (body);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called during diagnostic message formatting process to print a
|
/* Called during diagnostic message formatting process to print a
|
||||||
|
21
gcc/c-opts.c
21
gcc/c-opts.c
@ -733,11 +733,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
|
|||||||
cpp_opts->dollars_in_ident = value;
|
cpp_opts->dollars_in_ident = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPT_fdump_:
|
|
||||||
if (!dump_switch_p (arg))
|
|
||||||
result = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OPT_ffreestanding:
|
case OPT_ffreestanding:
|
||||||
value = !value;
|
value = !value;
|
||||||
/* Fall through.... */
|
/* Fall through.... */
|
||||||
@ -1100,17 +1095,13 @@ c_common_post_options (const char **pfilename)
|
|||||||
|
|
||||||
flag_inline_trees = 1;
|
flag_inline_trees = 1;
|
||||||
|
|
||||||
/* Use tree inlining if possible. Function instrumentation is only
|
/* Use tree inlining. */
|
||||||
done in the RTL level, so we disable tree inlining. */
|
if (!flag_no_inline)
|
||||||
if (! flag_instrument_function_entry_exit)
|
flag_no_inline = 1;
|
||||||
|
if (flag_inline_functions)
|
||||||
{
|
{
|
||||||
if (!flag_no_inline)
|
flag_inline_trees = 2;
|
||||||
flag_no_inline = 1;
|
flag_inline_functions = 0;
|
||||||
if (flag_inline_functions)
|
|
||||||
{
|
|
||||||
flag_inline_trees = 2;
|
|
||||||
flag_inline_functions = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -Wextra implies -Wsign-compare, but not if explicitly
|
/* -Wextra implies -Wsign-compare, but not if explicitly
|
||||||
|
@ -661,6 +661,7 @@ primary:
|
|||||||
last_expr_type = void_type_node;
|
last_expr_type = void_type_node;
|
||||||
$$ = build1 (STMT_EXPR, last_expr_type, $1);
|
$$ = build1 (STMT_EXPR, last_expr_type, $1);
|
||||||
TREE_SIDE_EFFECTS ($$) = 1;
|
TREE_SIDE_EFFECTS ($$) = 1;
|
||||||
|
annotate_with_locus ($$, input_location);
|
||||||
}
|
}
|
||||||
| compstmt_primary_start error ')'
|
| compstmt_primary_start error ')'
|
||||||
{
|
{
|
||||||
@ -2130,7 +2131,7 @@ simple_if:
|
|||||||
|
|
||||||
if_prefix:
|
if_prefix:
|
||||||
/* We must build the IF_STMT node before parsing its
|
/* We must build the IF_STMT node before parsing its
|
||||||
condition so that STMT_LINENO refers to the line
|
condition so that EXPR_LOCUS refers to the line
|
||||||
containing the "if", and not the line containing
|
containing the "if", and not the line containing
|
||||||
the close-parenthesis.
|
the close-parenthesis.
|
||||||
|
|
||||||
@ -2194,12 +2195,8 @@ lineno_stmt:
|
|||||||
save_location stmt
|
save_location stmt
|
||||||
{ if ($2)
|
{ if ($2)
|
||||||
{
|
{
|
||||||
STMT_LINENO ($2) = $1.line;
|
SET_EXPR_LOCUS ($2, NULL);
|
||||||
/* ??? We currently have no way of recording
|
annotate_with_locus ($2, $1);
|
||||||
the filename for a statement. This probably
|
|
||||||
matters little in practice at the moment,
|
|
||||||
but I suspect that problems will occur when
|
|
||||||
doing inlining at the tree level. */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -2208,7 +2205,8 @@ lineno_label:
|
|||||||
save_location label
|
save_location label
|
||||||
{ if ($2)
|
{ if ($2)
|
||||||
{
|
{
|
||||||
STMT_LINENO ($2) = $1.line;
|
SET_EXPR_LOCUS ($2, NULL);
|
||||||
|
annotate_with_locus ($2, $1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -2237,7 +2235,7 @@ select_or_iter_stmt:
|
|||||||
| simple_if ELSE error
|
| simple_if ELSE error
|
||||||
{ c_expand_end_cond (); }
|
{ c_expand_end_cond (); }
|
||||||
/* We must build the WHILE_STMT node before parsing its
|
/* We must build the WHILE_STMT node before parsing its
|
||||||
condition so that STMT_LINENO refers to the line
|
condition so that EXPR_LOCUS refers to the line
|
||||||
containing the "while", and not the line containing
|
containing the "while", and not the line containing
|
||||||
the close-parenthesis.
|
the close-parenthesis.
|
||||||
|
|
||||||
|
@ -352,7 +352,6 @@ maybe_apply_pragma_weak (tree decl ATTRIBUTE_UNUSED)
|
|||||||
|
|
||||||
static GTY(()) tree pending_redefine_extname;
|
static GTY(()) tree pending_redefine_extname;
|
||||||
|
|
||||||
#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
|
|
||||||
static void handle_pragma_redefine_extname (cpp_reader *);
|
static void handle_pragma_redefine_extname (cpp_reader *);
|
||||||
|
|
||||||
/* #pragma redefined_extname oldname newname */
|
/* #pragma redefined_extname oldname newname */
|
||||||
@ -388,7 +387,6 @@ handle_pragma_redefine_extname (cpp_reader *dummy ATTRIBUTE_UNUSED)
|
|||||||
else
|
else
|
||||||
add_to_renaming_pragma_list(oldname, newname);
|
add_to_renaming_pragma_list(oldname, newname);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
add_to_renaming_pragma_list (tree oldname, tree newname)
|
add_to_renaming_pragma_list (tree oldname, tree newname)
|
||||||
@ -502,6 +500,9 @@ init_pragma (void)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
|
#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
|
||||||
c_register_pragma (0, "redefine_extname", handle_pragma_redefine_extname);
|
c_register_pragma (0, "redefine_extname", handle_pragma_redefine_extname);
|
||||||
|
#else
|
||||||
|
if (flag_mudflap)
|
||||||
|
c_register_pragma (0, "redefine_extname", handle_pragma_redefine_extname);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HANDLE_PRAGMA_EXTERN_PREFIX
|
#ifdef HANDLE_PRAGMA_EXTERN_PREFIX
|
||||||
c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix);
|
c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix);
|
||||||
|
@ -26,6 +26,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "real.h"
|
#include "real.h"
|
||||||
#include "c-pretty-print.h"
|
#include "c-pretty-print.h"
|
||||||
#include "c-tree.h"
|
#include "c-tree.h"
|
||||||
|
#include "diagnostic.h"
|
||||||
|
|
||||||
/* The pretty-printer code is primarily designed to closely follow
|
/* The pretty-printer code is primarily designed to closely follow
|
||||||
(GNU) C and C++ grammars. That is to be contrasted with spaghetti
|
(GNU) C and C++ grammars. That is to be contrasted with spaghetti
|
||||||
@ -280,7 +281,7 @@ pp_c_type_specifier (c_pretty_printer *pp, tree t)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IDENTIFIER_NODE:
|
case IDENTIFIER_NODE:
|
||||||
pp_c_tree_identifier (pp, t);
|
pp_c_tree_decl_identifier (pp, t);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VOID_TYPE:
|
case VOID_TYPE:
|
||||||
@ -561,11 +562,10 @@ pp_c_direct_declarator (c_pretty_printer *pp, tree t)
|
|||||||
case TYPE_DECL:
|
case TYPE_DECL:
|
||||||
case FIELD_DECL:
|
case FIELD_DECL:
|
||||||
case LABEL_DECL:
|
case LABEL_DECL:
|
||||||
if (DECL_NAME (t))
|
pp_c_space_for_pointer_operator (pp, TREE_TYPE (t));
|
||||||
{
|
pp_c_tree_decl_identifier (pp, t);
|
||||||
pp_c_space_for_pointer_operator (pp, TREE_TYPE (t));
|
break;
|
||||||
pp_c_tree_identifier (pp, DECL_NAME (t));
|
|
||||||
}
|
|
||||||
case ARRAY_TYPE:
|
case ARRAY_TYPE:
|
||||||
case POINTER_TYPE:
|
case POINTER_TYPE:
|
||||||
pp_abstract_declarator (pp, TREE_TYPE (t));
|
pp_abstract_declarator (pp, TREE_TYPE (t));
|
||||||
@ -578,7 +578,7 @@ pp_c_direct_declarator (c_pretty_printer *pp, tree t)
|
|||||||
|
|
||||||
case FUNCTION_DECL:
|
case FUNCTION_DECL:
|
||||||
pp_c_space_for_pointer_operator (pp, TREE_TYPE (TREE_TYPE (t)));
|
pp_c_space_for_pointer_operator (pp, TREE_TYPE (TREE_TYPE (t)));
|
||||||
pp_c_tree_identifier (pp, DECL_NAME (t));
|
pp_c_tree_decl_identifier (pp, t);
|
||||||
if (pp_c_base (pp)->flags & pp_c_flag_abstract)
|
if (pp_c_base (pp)->flags & pp_c_flag_abstract)
|
||||||
pp_abstract_declarator (pp, TREE_TYPE (t));
|
pp_abstract_declarator (pp, TREE_TYPE (t));
|
||||||
else
|
else
|
||||||
@ -960,8 +960,9 @@ pp_c_primary_expression (c_pretty_printer *pp, tree e)
|
|||||||
case CONST_DECL:
|
case CONST_DECL:
|
||||||
case FUNCTION_DECL:
|
case FUNCTION_DECL:
|
||||||
case LABEL_DECL:
|
case LABEL_DECL:
|
||||||
e = DECL_NAME (e);
|
pp_c_tree_decl_identifier (pp, e);
|
||||||
/* Fall through. */
|
break;
|
||||||
|
|
||||||
case IDENTIFIER_NODE:
|
case IDENTIFIER_NODE:
|
||||||
pp_c_tree_identifier (pp, e);
|
pp_c_tree_identifier (pp, e);
|
||||||
break;
|
break;
|
||||||
@ -980,6 +981,22 @@ pp_c_primary_expression (c_pretty_printer *pp, tree e)
|
|||||||
pp_c_constant (pp, e);
|
pp_c_constant (pp, e);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TARGET_EXPR:
|
||||||
|
pp_c_identifier (pp, "__builtin_memcpy");
|
||||||
|
pp_c_left_paren (pp);
|
||||||
|
pp_ampersand (pp);
|
||||||
|
pp_primary_expression (pp, TREE_OPERAND (e, 0));
|
||||||
|
pp_separate_with (pp, ',');
|
||||||
|
pp_ampersand (pp);
|
||||||
|
pp_initializer (pp, TREE_OPERAND (e, 1));
|
||||||
|
if (TREE_OPERAND (e, 2))
|
||||||
|
{
|
||||||
|
pp_separate_with (pp, ',');
|
||||||
|
pp_c_expression (pp, TREE_OPERAND (e, 2));
|
||||||
|
}
|
||||||
|
pp_c_right_paren (pp);
|
||||||
|
break;
|
||||||
|
|
||||||
case STMT_EXPR:
|
case STMT_EXPR:
|
||||||
pp_c_left_paren (pp);
|
pp_c_left_paren (pp);
|
||||||
pp_statement (pp, STMT_EXPR_STMT (e));
|
pp_statement (pp, STMT_EXPR_STMT (e));
|
||||||
@ -1005,13 +1022,7 @@ static void
|
|||||||
pp_c_initializer (c_pretty_printer *pp, tree e)
|
pp_c_initializer (c_pretty_printer *pp, tree e)
|
||||||
{
|
{
|
||||||
if (TREE_CODE (e) == CONSTRUCTOR)
|
if (TREE_CODE (e) == CONSTRUCTOR)
|
||||||
{
|
pp_c_brace_enclosed_initializer_list (pp, e);
|
||||||
enum tree_code code = TREE_CODE (TREE_TYPE (e));
|
|
||||||
if (code == RECORD_TYPE || code == UNION_TYPE || code == ARRAY_TYPE)
|
|
||||||
pp_c_brace_enclosed_initializer_list (pp, e);
|
|
||||||
else
|
|
||||||
pp_unsupported_tree (pp, TREE_OPERAND (e, 1));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
pp_expression (pp, e);
|
pp_expression (pp, e);
|
||||||
}
|
}
|
||||||
@ -1099,25 +1110,36 @@ pp_c_initializer_list (c_pretty_printer *pp, tree e)
|
|||||||
pp_separate_with (pp, ',');
|
pp_separate_with (pp, ',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case VECTOR_TYPE:
|
case VECTOR_TYPE:
|
||||||
pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
|
if (TREE_CODE (e) == VECTOR_CST)
|
||||||
break;
|
pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
|
||||||
|
else if (TREE_CODE (e) == CONSTRUCTOR)
|
||||||
|
pp_c_expression_list (pp, CONSTRUCTOR_ELTS (e));
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
return;
|
||||||
|
|
||||||
case COMPLEX_TYPE:
|
case COMPLEX_TYPE:
|
||||||
{
|
if (TREE_CODE (e) == CONSTRUCTOR)
|
||||||
const bool cst = TREE_CODE (e) == COMPLEX_CST;
|
pp_c_expression_list (pp, CONSTRUCTOR_ELTS (e));
|
||||||
pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
|
else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
|
||||||
pp_separate_with (pp, ',');
|
{
|
||||||
pp_expression (pp, cst ? TREE_IMAGPART (e) : TREE_OPERAND (e, 1));
|
const bool cst = TREE_CODE (e) == COMPLEX_CST;
|
||||||
}
|
pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
|
||||||
break;
|
pp_separate_with (pp, ',');
|
||||||
|
pp_expression (pp, cst ? TREE_IMAGPART (e) : TREE_OPERAND (e, 1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
pp_unsupported_tree (pp, type);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pp_unsupported_tree (pp, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pretty-print a brace-enclosed initializer-list. */
|
/* Pretty-print a brace-enclosed initializer-list. */
|
||||||
@ -1149,7 +1171,9 @@ pp_c_id_expression (c_pretty_printer *pp, tree t)
|
|||||||
case FUNCTION_DECL:
|
case FUNCTION_DECL:
|
||||||
case FIELD_DECL:
|
case FIELD_DECL:
|
||||||
case LABEL_DECL:
|
case LABEL_DECL:
|
||||||
t = DECL_NAME (t);
|
pp_c_tree_decl_identifier (pp, t);
|
||||||
|
break;
|
||||||
|
|
||||||
case IDENTIFIER_NODE:
|
case IDENTIFIER_NODE:
|
||||||
pp_c_tree_identifier (pp, t);
|
pp_c_tree_identifier (pp, t);
|
||||||
break;
|
break;
|
||||||
@ -1862,7 +1886,7 @@ pp_c_statement (c_pretty_printer *pp, tree stmt)
|
|||||||
else
|
else
|
||||||
pp_indentation (pp) -= 3;
|
pp_indentation (pp) -= 3;
|
||||||
if (code == LABEL_STMT)
|
if (code == LABEL_STMT)
|
||||||
pp_tree_identifier (pp, DECL_NAME (LABEL_STMT_LABEL (stmt)));
|
pp_c_tree_decl_identifier (pp, LABEL_STMT_LABEL (stmt));
|
||||||
else if (code == CASE_LABEL)
|
else if (code == CASE_LABEL)
|
||||||
{
|
{
|
||||||
if (CASE_LOW (stmt) == NULL_TREE)
|
if (CASE_LOW (stmt) == NULL_TREE)
|
||||||
@ -2121,16 +2145,6 @@ pp_c_statement (c_pretty_printer *pp, tree stmt)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FILE_STMT:
|
|
||||||
pp_c_identifier (pp, "__FILE__");
|
|
||||||
pp_space (pp);
|
|
||||||
pp_equal (pp);
|
|
||||||
pp_c_whitespace (pp);
|
|
||||||
pp_c_identifier (pp, FILE_STMT_FILENAME (stmt));
|
|
||||||
pp_c_semicolon (pp);
|
|
||||||
pp_needs_newline (pp) = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
pp_unsupported_tree (pp, stmt);
|
pp_unsupported_tree (pp, stmt);
|
||||||
}
|
}
|
||||||
@ -2170,3 +2184,60 @@ pp_c_pretty_printer_init (c_pretty_printer *pp)
|
|||||||
pp->assignment_expression = pp_c_assignment_expression;
|
pp->assignment_expression = pp_c_assignment_expression;
|
||||||
pp->expression = pp_c_expression;
|
pp->expression = pp_c_expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Print the tree T in full, on file FILE. */
|
||||||
|
|
||||||
|
void
|
||||||
|
print_c_tree (FILE *file, tree t)
|
||||||
|
{
|
||||||
|
static c_pretty_printer pp_rec;
|
||||||
|
static bool initialized = 0;
|
||||||
|
c_pretty_printer *pp = &pp_rec;
|
||||||
|
|
||||||
|
if (!initialized)
|
||||||
|
{
|
||||||
|
initialized = 1;
|
||||||
|
pp_construct (pp_base (pp), NULL, 0);
|
||||||
|
pp_c_pretty_printer_init (pp);
|
||||||
|
pp_needs_newline (pp) = true;
|
||||||
|
}
|
||||||
|
pp_base (pp)->buffer->stream = file;
|
||||||
|
|
||||||
|
pp_statement (pp, t);
|
||||||
|
|
||||||
|
pp_newline (pp);
|
||||||
|
pp_flush (pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print the tree T in full, on stderr. */
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_c_tree (tree t)
|
||||||
|
{
|
||||||
|
print_c_tree (stderr, t);
|
||||||
|
fputc ('\n', stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Output the DECL_NAME of T. If T has no DECL_NAME, output a string made
|
||||||
|
up of T's memory address. */
|
||||||
|
|
||||||
|
void
|
||||||
|
pp_c_tree_decl_identifier (c_pretty_printer *pp, tree t)
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
if (!DECL_P (t))
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
if (DECL_NAME (t))
|
||||||
|
name = IDENTIFIER_POINTER (DECL_NAME (t));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
static char xname[8];
|
||||||
|
sprintf (xname, "<U%4x>", ((unsigned)((unsigned long)(t) & 0xffff)));
|
||||||
|
name = xname;
|
||||||
|
}
|
||||||
|
|
||||||
|
pp_c_identifier (pp, name);
|
||||||
|
}
|
||||||
|
@ -95,7 +95,7 @@ struct c_pretty_print_info
|
|||||||
#undef pp_base
|
#undef pp_base
|
||||||
#define pp_base(PP) (&pp_c_base (PP)->base)
|
#define pp_base(PP) (&pp_c_base (PP)->base)
|
||||||
|
|
||||||
|
|
||||||
#define pp_c_tree_identifier(PPI, ID) \
|
#define pp_c_tree_identifier(PPI, ID) \
|
||||||
pp_c_identifier (PPI, IDENTIFIER_POINTER (ID))
|
pp_c_identifier (PPI, IDENTIFIER_POINTER (ID))
|
||||||
|
|
||||||
@ -166,6 +166,7 @@ void pp_c_semicolon (c_pretty_printer *);
|
|||||||
void pp_c_space_for_pointer_operator (c_pretty_printer *, tree);
|
void pp_c_space_for_pointer_operator (c_pretty_printer *, tree);
|
||||||
|
|
||||||
/* Declarations. */
|
/* Declarations. */
|
||||||
|
void pp_c_tree_decl_identifier (c_pretty_printer *, tree);
|
||||||
void pp_c_function_definition (c_pretty_printer *, tree);
|
void pp_c_function_definition (c_pretty_printer *, tree);
|
||||||
void pp_c_attributes (c_pretty_printer *, tree);
|
void pp_c_attributes (c_pretty_printer *, tree);
|
||||||
void pp_c_type_qualifier_list (c_pretty_printer *, tree);
|
void pp_c_type_qualifier_list (c_pretty_printer *, tree);
|
||||||
@ -197,4 +198,6 @@ void pp_c_id_expression (c_pretty_printer *, tree);
|
|||||||
void pp_c_identifier (c_pretty_printer *, const char *);
|
void pp_c_identifier (c_pretty_printer *, const char *);
|
||||||
void pp_c_string_literal (c_pretty_printer *, tree);
|
void pp_c_string_literal (c_pretty_printer *, tree);
|
||||||
|
|
||||||
|
void print_c_tree (FILE *file, tree t);
|
||||||
|
|
||||||
#endif /* GCC_C_PRETTY_PRINTER */
|
#endif /* GCC_C_PRETTY_PRINTER */
|
||||||
|
@ -44,23 +44,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "timevar.h"
|
#include "timevar.h"
|
||||||
#include "predict.h"
|
#include "predict.h"
|
||||||
#include "tree-inline.h"
|
#include "tree-inline.h"
|
||||||
|
#include "langhooks.h"
|
||||||
/* If non-NULL, the address of a language-specific function for
|
|
||||||
expanding statements. */
|
|
||||||
void (*lang_expand_stmt) (tree);
|
|
||||||
|
|
||||||
/* If non-NULL, the address of a language-specific function for
|
|
||||||
expanding a DECL_STMT. After the language-independent cases are
|
|
||||||
handled, this function will be called. If this function is not
|
|
||||||
defined, it is assumed that declarations other than those for
|
|
||||||
variables and labels do not require any RTL generation. */
|
|
||||||
void (*lang_expand_decl_stmt) (tree);
|
|
||||||
|
|
||||||
static tree find_reachable_label_1 (tree *, int *, void *);
|
|
||||||
static tree find_reachable_label (tree);
|
|
||||||
static bool expand_unreachable_if_stmt (tree);
|
|
||||||
static tree expand_unreachable_stmt (tree, int);
|
|
||||||
static void genrtl_do_stmt_1 (tree, tree);
|
|
||||||
|
|
||||||
/* Create an empty statement tree rooted at T. */
|
/* Create an empty statement tree rooted at T. */
|
||||||
|
|
||||||
@ -81,18 +65,8 @@ begin_stmt_tree (tree *t)
|
|||||||
tree
|
tree
|
||||||
add_stmt (tree t)
|
add_stmt (tree t)
|
||||||
{
|
{
|
||||||
if (input_filename != last_expr_filename)
|
if (!EXPR_LOCUS (t))
|
||||||
{
|
annotate_with_locus (t, input_location);
|
||||||
/* If the filename has changed, also add in a FILE_STMT. Do a string
|
|
||||||
compare first, though, as it might be an equivalent string. */
|
|
||||||
int add = (strcmp (input_filename, last_expr_filename) != 0);
|
|
||||||
last_expr_filename = input_filename;
|
|
||||||
if (add)
|
|
||||||
{
|
|
||||||
tree pos = build_nt (FILE_STMT, get_identifier (input_filename));
|
|
||||||
add_stmt (pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add T to the statement-tree. */
|
/* Add T to the statement-tree. */
|
||||||
TREE_CHAIN (last_tree) = t;
|
TREE_CHAIN (last_tree) = t;
|
||||||
@ -171,58 +145,53 @@ finish_stmt_tree (tree *t)
|
|||||||
stmt = TREE_CHAIN (*t);
|
stmt = TREE_CHAIN (*t);
|
||||||
*t = stmt;
|
*t = stmt;
|
||||||
last_tree = NULL_TREE;
|
last_tree = NULL_TREE;
|
||||||
|
|
||||||
if (cfun && stmt)
|
|
||||||
{
|
|
||||||
/* The line-number recorded in the outermost statement in a function
|
|
||||||
is the line number of the end of the function. */
|
|
||||||
STMT_LINENO (stmt) = input_line;
|
|
||||||
STMT_LINENO_FOR_FN_P (stmt) = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build a generic statement based on the given type of node and
|
/* Build a generic statement based on the given type of node and
|
||||||
arguments. Similar to `build_nt', except that we set
|
arguments. Similar to `build_nt', except that we set
|
||||||
STMT_LINENO to be the current line number. */
|
EXPR_LOCUS to be the current source location. */
|
||||||
/* ??? This should be obsolete with the lineno_stmt productions
|
/* ??? This should be obsolete with the lineno_stmt productions
|
||||||
in the grammar. */
|
in the grammar. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
build_stmt (enum tree_code code, ...)
|
build_stmt (enum tree_code code, ...)
|
||||||
{
|
{
|
||||||
tree t;
|
tree ret;
|
||||||
int length;
|
int length, i;
|
||||||
int i;
|
|
||||||
va_list p;
|
va_list p;
|
||||||
|
bool side_effects;
|
||||||
|
|
||||||
va_start (p, code);
|
va_start (p, code);
|
||||||
|
|
||||||
t = make_node (code);
|
ret = make_node (code);
|
||||||
length = TREE_CODE_LENGTH (code);
|
length = TREE_CODE_LENGTH (code);
|
||||||
STMT_LINENO (t) = input_line;
|
annotate_with_locus (ret, input_location);
|
||||||
|
|
||||||
|
/* Most statements have implicit side effects all on their own,
|
||||||
|
such as control transfer. For those that do, we'll compute
|
||||||
|
the real value of TREE_SIDE_EFFECTS from its arguments. */
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
|
case EXPR_STMT:
|
||||||
|
side_effects = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
side_effects = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
TREE_OPERAND (t, i) = va_arg (p, tree);
|
{
|
||||||
|
tree t = va_arg (p, tree);
|
||||||
|
if (t && IS_NON_TYPE_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t))))
|
||||||
|
side_effects |= TREE_SIDE_EFFECTS (t);
|
||||||
|
TREE_OPERAND (ret, i) = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
TREE_SIDE_EFFECTS (ret) = side_effects;
|
||||||
|
|
||||||
va_end (p);
|
va_end (p);
|
||||||
return t;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
/* Some statements, like for-statements or if-statements, require a
|
|
||||||
condition. This condition can be a declaration. If T is such a
|
|
||||||
declaration it is processed, and an expression appropriate to use
|
|
||||||
as the condition is returned. Otherwise, T itself is returned. */
|
|
||||||
|
|
||||||
tree
|
|
||||||
expand_cond (tree t)
|
|
||||||
{
|
|
||||||
if (t && TREE_CODE (t) == TREE_LIST)
|
|
||||||
{
|
|
||||||
expand_stmt (TREE_PURPOSE (t));
|
|
||||||
return TREE_VALUE (t);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return t;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create RTL for the local static variable DECL. */
|
/* Create RTL for the local static variable DECL. */
|
||||||
@ -268,7 +237,7 @@ emit_local_var (tree decl)
|
|||||||
/* Create RTL for this variable. */
|
/* Create RTL for this variable. */
|
||||||
if (!DECL_RTL_SET_P (decl))
|
if (!DECL_RTL_SET_P (decl))
|
||||||
{
|
{
|
||||||
if (DECL_C_HARD_REGISTER (decl))
|
if (DECL_HARD_REGISTER (decl))
|
||||||
/* The user specified an assembler name for this variable.
|
/* The user specified an assembler name for this variable.
|
||||||
Set that up now. */
|
Set that up now. */
|
||||||
rest_of_decl_compilation
|
rest_of_decl_compilation
|
||||||
@ -291,214 +260,6 @@ emit_local_var (tree decl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper for generating the RTL at the beginning of a scope. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_do_pushlevel (void)
|
|
||||||
{
|
|
||||||
emit_line_note (input_location);
|
|
||||||
clear_last_expr ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for DESTINATION, which is a GOTO_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_goto_stmt (tree destination)
|
|
||||||
{
|
|
||||||
if (TREE_CODE (destination) == IDENTIFIER_NODE)
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
/* We warn about unused labels with -Wunused. That means we have to
|
|
||||||
mark the used labels as used. */
|
|
||||||
if (TREE_CODE (destination) == LABEL_DECL)
|
|
||||||
TREE_USED (destination) = 1;
|
|
||||||
|
|
||||||
emit_line_note (input_location);
|
|
||||||
|
|
||||||
if (TREE_CODE (destination) == LABEL_DECL)
|
|
||||||
{
|
|
||||||
label_rtx (destination);
|
|
||||||
expand_goto (destination);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
expand_computed_goto (destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for EXPR, which is an EXPR_STMT. Provided just
|
|
||||||
for backward compatibility. genrtl_expr_stmt_value() should be
|
|
||||||
used for new code. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_expr_stmt (tree expr)
|
|
||||||
{
|
|
||||||
genrtl_expr_stmt_value (expr, -1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for EXPR, which is an EXPR_STMT. WANT_VALUE tells
|
|
||||||
whether to (1) save the value of the expression, (0) discard it or
|
|
||||||
(-1) use expr_stmts_for_value to tell. The use of -1 is
|
|
||||||
deprecated, and retained only for backward compatibility.
|
|
||||||
MAYBE_LAST is nonzero if this EXPR_STMT might be the last statement
|
|
||||||
in expression statement. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_expr_stmt_value (tree expr, int want_value, int maybe_last)
|
|
||||||
{
|
|
||||||
if (expr != NULL_TREE)
|
|
||||||
{
|
|
||||||
emit_line_note (input_location);
|
|
||||||
|
|
||||||
if (stmts_are_full_exprs_p ())
|
|
||||||
expand_start_target_temps ();
|
|
||||||
|
|
||||||
if (expr != error_mark_node)
|
|
||||||
expand_expr_stmt_value (expr, want_value, maybe_last);
|
|
||||||
|
|
||||||
if (stmts_are_full_exprs_p ())
|
|
||||||
expand_end_target_temps ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a DECL_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_decl_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree decl;
|
|
||||||
emit_line_note (input_location);
|
|
||||||
decl = DECL_STMT_DECL (t);
|
|
||||||
/* If this is a declaration for an automatic local
|
|
||||||
variable, initialize it. Note that we might also see a
|
|
||||||
declaration for a namespace-scope object (declared with
|
|
||||||
`extern'). We don't have to handle the initialization
|
|
||||||
of those objects here; they can only be declarations,
|
|
||||||
rather than definitions. */
|
|
||||||
if (TREE_CODE (decl) == VAR_DECL
|
|
||||||
&& !TREE_STATIC (decl)
|
|
||||||
&& !DECL_EXTERNAL (decl))
|
|
||||||
{
|
|
||||||
/* Let the back-end know about this variable. */
|
|
||||||
if (!anon_aggr_type_p (TREE_TYPE (decl)))
|
|
||||||
emit_local_var (decl);
|
|
||||||
else
|
|
||||||
expand_anon_union_decl (decl, NULL_TREE,
|
|
||||||
DECL_ANON_UNION_ELEMS (decl));
|
|
||||||
}
|
|
||||||
else if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
|
|
||||||
make_rtl_for_local_static (decl);
|
|
||||||
else if (TREE_CODE (decl) == LABEL_DECL
|
|
||||||
&& C_DECLARED_LABEL_FLAG (decl))
|
|
||||||
declare_nonlocal_label (decl);
|
|
||||||
else if (TREE_CODE (decl) == TYPE_DECL)
|
|
||||||
force_type_save_exprs (TREE_TYPE (decl));
|
|
||||||
else if (lang_expand_decl_stmt)
|
|
||||||
(*lang_expand_decl_stmt) (t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is an IF_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_if_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree cond;
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
cond = expand_cond (IF_COND (t));
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_start_cond (cond, 0);
|
|
||||||
if (THEN_CLAUSE (t))
|
|
||||||
{
|
|
||||||
tree nextt = THEN_CLAUSE (t);
|
|
||||||
|
|
||||||
if (cond && integer_zerop (cond))
|
|
||||||
nextt = expand_unreachable_stmt (nextt, warn_notreached);
|
|
||||||
expand_stmt (nextt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ELSE_CLAUSE (t))
|
|
||||||
{
|
|
||||||
tree nextt = ELSE_CLAUSE (t);
|
|
||||||
expand_start_else ();
|
|
||||||
if (cond && integer_nonzerop (cond))
|
|
||||||
nextt = expand_unreachable_stmt (nextt, warn_notreached);
|
|
||||||
expand_stmt (nextt);
|
|
||||||
}
|
|
||||||
expand_end_cond ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a WHILE_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_while_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree cond = WHILE_COND (t);
|
|
||||||
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_start_loop (1);
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
|
|
||||||
if (cond && !integer_nonzerop (cond))
|
|
||||||
{
|
|
||||||
cond = expand_cond (cond);
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_exit_loop_top_cond (0, cond);
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
}
|
|
||||||
|
|
||||||
expand_stmt (WHILE_BODY (t));
|
|
||||||
|
|
||||||
expand_end_loop ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for a DO_STMT with condition COND and loop BODY
|
|
||||||
body. This is reused for expanding unreachable WHILE_STMTS. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
genrtl_do_stmt_1 (tree cond, tree body)
|
|
||||||
{
|
|
||||||
/* Recognize the common special-case of do { ... } while (0) and do
|
|
||||||
not emit the loop widgetry in this case. In particular this
|
|
||||||
avoids cluttering the rtl with dummy loop notes, which can affect
|
|
||||||
alignment of adjacent labels. COND can be NULL due to parse
|
|
||||||
errors. */
|
|
||||||
if (!cond || integer_zerop (cond))
|
|
||||||
{
|
|
||||||
expand_start_null_loop ();
|
|
||||||
expand_stmt (body);
|
|
||||||
expand_end_null_loop ();
|
|
||||||
}
|
|
||||||
else if (integer_nonzerop (cond))
|
|
||||||
{
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_start_loop (1);
|
|
||||||
|
|
||||||
expand_stmt (body);
|
|
||||||
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_end_loop ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_start_loop_continue_elsewhere (1);
|
|
||||||
|
|
||||||
expand_stmt (body);
|
|
||||||
|
|
||||||
expand_loop_continue_here ();
|
|
||||||
cond = expand_cond (cond);
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_exit_loop_if_false (0, cond);
|
|
||||||
expand_end_loop ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a DO_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_do_stmt (tree t)
|
|
||||||
{
|
|
||||||
genrtl_do_stmt_1 (DO_COND (t), DO_BODY (t));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Build the node for a return statement and return it. */
|
/* Build the node for a return statement and return it. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
@ -507,74 +268,6 @@ build_return_stmt (tree expr)
|
|||||||
return (build_stmt (RETURN_STMT, expr));
|
return (build_stmt (RETURN_STMT, expr));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the RTL for STMT, which is a RETURN_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_return_stmt (tree stmt)
|
|
||||||
{
|
|
||||||
tree expr;
|
|
||||||
|
|
||||||
expr = RETURN_STMT_EXPR (stmt);
|
|
||||||
|
|
||||||
emit_line_note (input_location);
|
|
||||||
if (!expr)
|
|
||||||
expand_null_return ();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
expand_start_target_temps ();
|
|
||||||
expand_return (expr);
|
|
||||||
expand_end_target_temps ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a FOR_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_for_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree cond = FOR_COND (t);
|
|
||||||
location_t saved_loc;
|
|
||||||
|
|
||||||
if (NEW_FOR_SCOPE_P (t))
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
|
|
||||||
expand_stmt (FOR_INIT_STMT (t));
|
|
||||||
|
|
||||||
/* Expand the initialization. */
|
|
||||||
emit_line_note (input_location);
|
|
||||||
if (FOR_EXPR (t))
|
|
||||||
expand_start_loop_continue_elsewhere (1);
|
|
||||||
else
|
|
||||||
expand_start_loop (1);
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
|
|
||||||
/* Save the filename and line number so that we expand the FOR_EXPR
|
|
||||||
we can reset them back to the saved values. */
|
|
||||||
saved_loc = input_location;
|
|
||||||
|
|
||||||
/* Expand the condition. */
|
|
||||||
if (cond && !integer_nonzerop (cond))
|
|
||||||
{
|
|
||||||
cond = expand_cond (cond);
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_exit_loop_top_cond (0, cond);
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Expand the body. */
|
|
||||||
expand_stmt (FOR_BODY (t));
|
|
||||||
|
|
||||||
/* Expand the increment expression. */
|
|
||||||
input_location = saved_loc;
|
|
||||||
emit_line_note (input_location);
|
|
||||||
if (FOR_EXPR (t))
|
|
||||||
{
|
|
||||||
expand_loop_continue_here ();
|
|
||||||
genrtl_expr_stmt (FOR_EXPR (t));
|
|
||||||
}
|
|
||||||
expand_end_loop ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Build a break statement node and return it. */
|
/* Build a break statement node and return it. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
@ -583,16 +276,6 @@ build_break_stmt (void)
|
|||||||
return (build_stmt (BREAK_STMT));
|
return (build_stmt (BREAK_STMT));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the RTL for a BREAK_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_break_stmt (void)
|
|
||||||
{
|
|
||||||
emit_line_note (input_location);
|
|
||||||
if ( ! expand_exit_something ())
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Build a continue statement node and return it. */
|
/* Build a continue statement node and return it. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
@ -601,80 +284,6 @@ build_continue_stmt (void)
|
|||||||
return (build_stmt (CONTINUE_STMT));
|
return (build_stmt (CONTINUE_STMT));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the RTL for a CONTINUE_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_continue_stmt (void)
|
|
||||||
{
|
|
||||||
emit_line_note (input_location);
|
|
||||||
if (! expand_continue_loop (0))
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a SCOPE_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_scope_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree block = SCOPE_STMT_BLOCK (t);
|
|
||||||
|
|
||||||
if (!SCOPE_NO_CLEANUPS_P (t))
|
|
||||||
{
|
|
||||||
if (SCOPE_BEGIN_P (t))
|
|
||||||
expand_start_bindings_and_block (2 * SCOPE_NULLIFIED_P (t), block);
|
|
||||||
else if (SCOPE_END_P (t))
|
|
||||||
expand_end_bindings (NULL_TREE, !SCOPE_NULLIFIED_P (t), 0);
|
|
||||||
}
|
|
||||||
else if (!SCOPE_NULLIFIED_P (t))
|
|
||||||
{
|
|
||||||
rtx note = emit_note (SCOPE_BEGIN_P (t)
|
|
||||||
? NOTE_INSN_BLOCK_BEG : NOTE_INSN_BLOCK_END);
|
|
||||||
NOTE_BLOCK (note) = block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we're at the end of a scope that contains inlined nested
|
|
||||||
functions, we have to decide whether or not to write them out. */
|
|
||||||
if (block && SCOPE_END_P (t))
|
|
||||||
{
|
|
||||||
tree fn;
|
|
||||||
|
|
||||||
for (fn = BLOCK_VARS (block); fn; fn = TREE_CHAIN (fn))
|
|
||||||
{
|
|
||||||
if (TREE_CODE (fn) == FUNCTION_DECL
|
|
||||||
&& DECL_CONTEXT (fn) == current_function_decl
|
|
||||||
&& DECL_STRUCT_FUNCTION (fn)
|
|
||||||
&& DECL_STRUCT_FUNCTION (fn)->saved_for_inline
|
|
||||||
&& !TREE_ASM_WRITTEN (fn)
|
|
||||||
&& TREE_ADDRESSABLE (fn))
|
|
||||||
{
|
|
||||||
push_function_context ();
|
|
||||||
output_inline_function (fn);
|
|
||||||
pop_function_context ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a SWITCH_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_switch_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree cond;
|
|
||||||
genrtl_do_pushlevel ();
|
|
||||||
|
|
||||||
cond = expand_cond (SWITCH_COND (t));
|
|
||||||
if (cond == error_mark_node)
|
|
||||||
/* The code is in error, but we don't want expand_end_case to
|
|
||||||
crash. */
|
|
||||||
cond = truthvalue_false_node;
|
|
||||||
|
|
||||||
emit_line_note (input_location);
|
|
||||||
expand_start_case (1, cond, TREE_TYPE (cond), "switch statement");
|
|
||||||
expand_stmt (expand_unreachable_stmt (SWITCH_BODY (t), warn_notreached));
|
|
||||||
expand_end_case_type (cond, SWITCH_TYPE (t));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create a CASE_LABEL tree node and return it. */
|
/* Create a CASE_LABEL tree node and return it. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
@ -683,378 +292,13 @@ build_case_label (tree low_value, tree high_value, tree label_decl)
|
|||||||
return build_stmt (CASE_LABEL, low_value, high_value, label_decl);
|
return build_stmt (CASE_LABEL, low_value, high_value, label_decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Generate the RTL for a CASE_LABEL. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_case_label (tree case_label)
|
|
||||||
{
|
|
||||||
tree duplicate;
|
|
||||||
tree cleanup;
|
|
||||||
|
|
||||||
cleanup = last_cleanup_this_contour ();
|
|
||||||
if (cleanup)
|
|
||||||
{
|
|
||||||
static int explained = 0;
|
|
||||||
warning ("destructor needed for `%D'", (TREE_PURPOSE (cleanup)));
|
|
||||||
warning ("where case label appears here");
|
|
||||||
if (!explained)
|
|
||||||
{
|
|
||||||
warning ("(enclose actions of previous case statements requiring destructors in their own scope.)");
|
|
||||||
explained = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
add_case_node (CASE_LOW (case_label), CASE_HIGH (case_label),
|
|
||||||
CASE_LABEL_DECL (case_label), &duplicate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for T, which is a COMPOUND_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_compound_stmt (tree t)
|
|
||||||
{
|
|
||||||
#ifdef ENABLE_CHECKING
|
|
||||||
struct nesting *n = current_nesting_level ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
expand_stmt (COMPOUND_BODY (t));
|
|
||||||
|
|
||||||
#ifdef ENABLE_CHECKING
|
|
||||||
/* Make sure that we've pushed and popped the same number of levels. */
|
|
||||||
if (!COMPOUND_STMT_NO_SCOPE (t) && n != current_nesting_level ())
|
|
||||||
abort ();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for an ASM_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_asm_stmt (tree cv_qualifier, tree string, tree output_operands,
|
|
||||||
tree input_operands, tree clobbers, int asm_input_p)
|
|
||||||
{
|
|
||||||
if (cv_qualifier != NULL_TREE
|
|
||||||
&& cv_qualifier != ridpointers[(int) RID_VOLATILE])
|
|
||||||
{
|
|
||||||
warning ("%s qualifier ignored on asm",
|
|
||||||
IDENTIFIER_POINTER (cv_qualifier));
|
|
||||||
cv_qualifier = NULL_TREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
emit_line_note (input_location);
|
|
||||||
if (asm_input_p)
|
|
||||||
expand_asm (string, cv_qualifier != NULL_TREE);
|
|
||||||
else
|
|
||||||
c_expand_asm_operands (string, output_operands, input_operands,
|
|
||||||
clobbers, cv_qualifier != NULL_TREE,
|
|
||||||
input_location);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate the RTL for a CLEANUP_STMT. */
|
|
||||||
|
|
||||||
void
|
|
||||||
genrtl_cleanup_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree decl = CLEANUP_DECL (t);
|
|
||||||
if (!decl || !DECL_P (decl)
|
|
||||||
|| (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
|
|
||||||
expand_decl_cleanup_eh (decl, CLEANUP_EXPR (t), CLEANUP_EH_ONLY (t));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We're about to expand T, a statement. Set up appropriate context
|
/* We're about to expand T, a statement. Set up appropriate context
|
||||||
for the substitution. */
|
for the substitution. */
|
||||||
|
|
||||||
void
|
void
|
||||||
prep_stmt (tree t)
|
prep_stmt (tree t)
|
||||||
{
|
{
|
||||||
if (!STMT_LINENO_FOR_FN_P (t))
|
if (EXPR_LOCUS (t))
|
||||||
input_line = STMT_LINENO (t);
|
input_location = *EXPR_LOCUS (t);
|
||||||
current_stmt_tree ()->stmts_are_full_exprs_p = STMT_IS_FULL_EXPR_P (t);
|
current_stmt_tree ()->stmts_are_full_exprs_p = STMT_IS_FULL_EXPR_P (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the RTL for the statement T, its substatements, and any
|
|
||||||
other statements at its nesting level. */
|
|
||||||
|
|
||||||
void
|
|
||||||
expand_stmt (tree t)
|
|
||||||
{
|
|
||||||
while (t && t != error_mark_node)
|
|
||||||
{
|
|
||||||
int saved_stmts_are_full_exprs_p;
|
|
||||||
|
|
||||||
/* Set up context appropriately for handling this statement. */
|
|
||||||
saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p ();
|
|
||||||
prep_stmt (t);
|
|
||||||
|
|
||||||
switch (TREE_CODE (t))
|
|
||||||
{
|
|
||||||
case FILE_STMT:
|
|
||||||
input_filename = FILE_STMT_FILENAME (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RETURN_STMT:
|
|
||||||
genrtl_return_stmt (t);
|
|
||||||
t = expand_unreachable_stmt (TREE_CHAIN (t), warn_notreached);
|
|
||||||
goto process_t;
|
|
||||||
|
|
||||||
case EXPR_STMT:
|
|
||||||
genrtl_expr_stmt_value (EXPR_STMT_EXPR (t), TREE_ADDRESSABLE (t),
|
|
||||||
TREE_CHAIN (t) == NULL
|
|
||||||
|| (TREE_CODE (TREE_CHAIN (t)) == SCOPE_STMT
|
|
||||||
&& TREE_CHAIN (TREE_CHAIN (t)) == NULL));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DECL_STMT:
|
|
||||||
genrtl_decl_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FOR_STMT:
|
|
||||||
genrtl_for_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WHILE_STMT:
|
|
||||||
genrtl_while_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DO_STMT:
|
|
||||||
genrtl_do_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IF_STMT:
|
|
||||||
genrtl_if_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case COMPOUND_STMT:
|
|
||||||
genrtl_compound_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BREAK_STMT:
|
|
||||||
genrtl_break_stmt ();
|
|
||||||
t = expand_unreachable_stmt (TREE_CHAIN (t), warn_notreached);
|
|
||||||
goto process_t;
|
|
||||||
|
|
||||||
case CONTINUE_STMT:
|
|
||||||
genrtl_continue_stmt ();
|
|
||||||
t = expand_unreachable_stmt (TREE_CHAIN (t), warn_notreached);
|
|
||||||
goto process_t;
|
|
||||||
|
|
||||||
case SWITCH_STMT:
|
|
||||||
genrtl_switch_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CASE_LABEL:
|
|
||||||
genrtl_case_label (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LABEL_STMT:
|
|
||||||
expand_label (LABEL_STMT_LABEL (t));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GOTO_STMT:
|
|
||||||
/* Emit information for branch prediction. */
|
|
||||||
if (!GOTO_FAKE_P (t)
|
|
||||||
&& TREE_CODE (GOTO_DESTINATION (t)) == LABEL_DECL
|
|
||||||
&& flag_guess_branch_prob)
|
|
||||||
{
|
|
||||||
rtx note = emit_note (NOTE_INSN_PREDICTION);
|
|
||||||
|
|
||||||
NOTE_PREDICTION (note) = NOTE_PREDICT (PRED_GOTO, NOT_TAKEN);
|
|
||||||
}
|
|
||||||
genrtl_goto_stmt (GOTO_DESTINATION (t));
|
|
||||||
t = expand_unreachable_stmt (TREE_CHAIN (t), warn_notreached);
|
|
||||||
goto process_t;
|
|
||||||
|
|
||||||
case ASM_STMT:
|
|
||||||
genrtl_asm_stmt (ASM_CV_QUAL (t), ASM_STRING (t),
|
|
||||||
ASM_OUTPUTS (t), ASM_INPUTS (t),
|
|
||||||
ASM_CLOBBERS (t), ASM_INPUT_P (t));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCOPE_STMT:
|
|
||||||
genrtl_scope_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CLEANUP_STMT:
|
|
||||||
genrtl_cleanup_stmt (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if (lang_expand_stmt)
|
|
||||||
(*lang_expand_stmt) (t);
|
|
||||||
else
|
|
||||||
abort ();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Go on to the next statement in this scope. */
|
|
||||||
t = TREE_CHAIN (t);
|
|
||||||
|
|
||||||
process_t:
|
|
||||||
/* Restore saved state. */
|
|
||||||
current_stmt_tree ()->stmts_are_full_exprs_p
|
|
||||||
= saved_stmts_are_full_exprs_p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If *TP is a potentially reachable label, return nonzero. */
|
|
||||||
|
|
||||||
static tree
|
|
||||||
find_reachable_label_1 (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
|
|
||||||
void *data ATTRIBUTE_UNUSED)
|
|
||||||
{
|
|
||||||
switch (TREE_CODE (*tp))
|
|
||||||
{
|
|
||||||
case LABEL_STMT:
|
|
||||||
case CASE_LABEL:
|
|
||||||
return *tp;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return NULL_TREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Determine whether expression EXP contains a potentially
|
|
||||||
reachable label. */
|
|
||||||
static tree
|
|
||||||
find_reachable_label (tree exp)
|
|
||||||
{
|
|
||||||
location_t saved_loc = input_location;
|
|
||||||
tree ret = walk_tree_without_duplicates
|
|
||||||
(&exp, find_reachable_label_1, NULL);
|
|
||||||
input_location = saved_loc;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Expand an unreachable if statement, T. This function returns
|
|
||||||
true if the IF_STMT contains a potentially reachable code_label. */
|
|
||||||
static bool
|
|
||||||
expand_unreachable_if_stmt (tree t)
|
|
||||||
{
|
|
||||||
tree n;
|
|
||||||
|
|
||||||
if (find_reachable_label (IF_COND (t)) != NULL_TREE)
|
|
||||||
{
|
|
||||||
genrtl_if_stmt (t);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (THEN_CLAUSE (t) && ELSE_CLAUSE (t))
|
|
||||||
{
|
|
||||||
n = expand_unreachable_stmt (THEN_CLAUSE (t), 0);
|
|
||||||
|
|
||||||
if (n != NULL_TREE)
|
|
||||||
{
|
|
||||||
rtx label;
|
|
||||||
expand_stmt (n);
|
|
||||||
label = gen_label_rtx ();
|
|
||||||
emit_jump (label);
|
|
||||||
expand_stmt (expand_unreachable_stmt (ELSE_CLAUSE (t), 0));
|
|
||||||
emit_label (label);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
n = expand_unreachable_stmt (ELSE_CLAUSE (t), 0);
|
|
||||||
}
|
|
||||||
else if (THEN_CLAUSE (t))
|
|
||||||
n = expand_unreachable_stmt (THEN_CLAUSE (t), 0);
|
|
||||||
else if (ELSE_CLAUSE (t))
|
|
||||||
n = expand_unreachable_stmt (ELSE_CLAUSE (t), 0);
|
|
||||||
else
|
|
||||||
n = NULL_TREE;
|
|
||||||
|
|
||||||
expand_stmt (n);
|
|
||||||
|
|
||||||
return n != NULL_TREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Expand an unreachable statement list. This function skips all
|
|
||||||
statements preceding the first potentially reachable label and
|
|
||||||
then returns the label (or, in same cases, the statement after
|
|
||||||
one containing the label). */
|
|
||||||
static tree
|
|
||||||
expand_unreachable_stmt (tree t, int warn)
|
|
||||||
{
|
|
||||||
int saved;
|
|
||||||
|
|
||||||
while (t && t != error_mark_node)
|
|
||||||
{
|
|
||||||
if (warn)
|
|
||||||
switch (TREE_CODE (t))
|
|
||||||
{
|
|
||||||
case BREAK_STMT:
|
|
||||||
case CONTINUE_STMT:
|
|
||||||
case EXPR_STMT:
|
|
||||||
case GOTO_STMT:
|
|
||||||
case IF_STMT:
|
|
||||||
case RETURN_STMT:
|
|
||||||
if (!STMT_LINENO_FOR_FN_P (t))
|
|
||||||
input_line = STMT_LINENO (t);
|
|
||||||
warning("will never be executed");
|
|
||||||
warn = false;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (TREE_CODE (t))
|
|
||||||
{
|
|
||||||
case GOTO_STMT:
|
|
||||||
case CONTINUE_STMT:
|
|
||||||
case BREAK_STMT:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FILE_STMT:
|
|
||||||
input_filename = FILE_STMT_FILENAME (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RETURN_STMT:
|
|
||||||
if (find_reachable_label (RETURN_STMT_EXPR (t)) != NULL_TREE)
|
|
||||||
return t;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EXPR_STMT:
|
|
||||||
if (find_reachable_label (EXPR_STMT_EXPR (t)) != NULL_TREE)
|
|
||||||
return t;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IF_STMT:
|
|
||||||
if (expand_unreachable_if_stmt (t))
|
|
||||||
return TREE_CHAIN (t);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WHILE_STMT:
|
|
||||||
/* If the start of a while statement is unreachable, there is
|
|
||||||
no need to rotate the loop, instead the WHILE_STMT can be
|
|
||||||
expanded like a DO_STMT. */
|
|
||||||
genrtl_do_stmt_1 (WHILE_COND (t), WHILE_BODY (t));
|
|
||||||
return TREE_CHAIN (t);
|
|
||||||
|
|
||||||
case COMPOUND_STMT:
|
|
||||||
{
|
|
||||||
tree n;
|
|
||||||
n = expand_unreachable_stmt (COMPOUND_BODY (t), warn);
|
|
||||||
if (n != NULL_TREE)
|
|
||||||
{
|
|
||||||
expand_stmt (n);
|
|
||||||
return TREE_CHAIN (t);
|
|
||||||
}
|
|
||||||
warn = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SCOPE_STMT:
|
|
||||||
saved = stmts_are_full_exprs_p ();
|
|
||||||
prep_stmt (t);
|
|
||||||
genrtl_scope_stmt (t);
|
|
||||||
current_stmt_tree ()->stmts_are_full_exprs_p = saved;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
t = TREE_CHAIN (t);
|
|
||||||
}
|
|
||||||
return NULL_TREE;
|
|
||||||
}
|
|
||||||
|
1102
gcc/c-simplify.c
Normal file
1102
gcc/c-simplify.c
Normal file
File diff suppressed because it is too large
Load Diff
17
gcc/c-tree.h
17
gcc/c-tree.h
@ -29,6 +29,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#define C_SIZEOF_STRUCT_LANG_IDENTIFIER \
|
#define C_SIZEOF_STRUCT_LANG_IDENTIFIER \
|
||||||
(sizeof (struct c_common_identifier) + 3 * sizeof (void *))
|
(sizeof (struct c_common_identifier) + 3 * sizeof (void *))
|
||||||
|
|
||||||
|
/* For gc purposes, return the most likely link for the longest chain. */
|
||||||
|
#define C_LANG_TREE_NODE_CHAIN_NEXT(T) \
|
||||||
|
((union lang_tree_node *) \
|
||||||
|
(TREE_CODE (T) == INTEGER_TYPE ? TYPE_NEXT_VARIANT (T) \
|
||||||
|
: TREE_CODE (T) == COMPOUND_EXPR ? TREE_OPERAND (T, 1) \
|
||||||
|
: TREE_CHAIN (T)))
|
||||||
|
|
||||||
/* Language-specific declaration information. */
|
/* Language-specific declaration information. */
|
||||||
|
|
||||||
struct lang_decl GTY(())
|
struct lang_decl GTY(())
|
||||||
@ -58,10 +65,13 @@ struct lang_decl GTY(())
|
|||||||
and C_RID_YYCODE is the token number wanted by Yacc. */
|
and C_RID_YYCODE is the token number wanted by Yacc. */
|
||||||
#define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
|
#define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
|
||||||
|
|
||||||
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
|
|
||||||
struct lang_type GTY(())
|
struct lang_type GTY(())
|
||||||
{
|
{
|
||||||
|
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
|
||||||
struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
|
struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
|
||||||
|
/* In an ENUMERAL_TYPE, the min and max values. */
|
||||||
|
tree enum_min;
|
||||||
|
tree enum_max;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Record whether a type or decl was written with nonconstant size.
|
/* Record whether a type or decl was written with nonconstant size.
|
||||||
@ -182,7 +192,7 @@ extern tree start_struct (enum tree_code, tree);
|
|||||||
extern void store_parm_decls (void);
|
extern void store_parm_decls (void);
|
||||||
extern tree xref_tag (enum tree_code, tree);
|
extern tree xref_tag (enum tree_code, tree);
|
||||||
extern tree c_begin_compound_stmt (void);
|
extern tree c_begin_compound_stmt (void);
|
||||||
extern void c_expand_decl_stmt (tree);
|
extern int c_expand_decl (tree);
|
||||||
extern void c_static_assembler_name (tree);
|
extern void c_static_assembler_name (tree);
|
||||||
extern tree make_pointer_declarator (tree, tree);
|
extern tree make_pointer_declarator (tree, tree);
|
||||||
|
|
||||||
@ -190,8 +200,8 @@ extern tree make_pointer_declarator (tree, tree);
|
|||||||
extern int c_disregard_inline_limits (tree);
|
extern int c_disregard_inline_limits (tree);
|
||||||
extern int c_cannot_inline_tree_fn (tree *);
|
extern int c_cannot_inline_tree_fn (tree *);
|
||||||
extern bool c_objc_common_init (void);
|
extern bool c_objc_common_init (void);
|
||||||
|
extern bool c_missing_noreturn_ok_p (tree);
|
||||||
extern tree c_objc_common_truthvalue_conversion (tree expr);
|
extern tree c_objc_common_truthvalue_conversion (tree expr);
|
||||||
extern int c_missing_noreturn_ok_p (tree);
|
|
||||||
extern void c_objc_common_finish_file (void);
|
extern void c_objc_common_finish_file (void);
|
||||||
extern int defer_fn (tree);
|
extern int defer_fn (tree);
|
||||||
extern bool c_warn_unused_global_decl (tree);
|
extern bool c_warn_unused_global_decl (tree);
|
||||||
@ -248,6 +258,7 @@ extern void c_finish_case (void);
|
|||||||
extern tree build_asm_expr (tree, tree, tree, tree, bool);
|
extern tree build_asm_expr (tree, tree, tree, tree, bool);
|
||||||
extern tree build_asm_stmt (tree, tree);
|
extern tree build_asm_stmt (tree, tree);
|
||||||
extern tree c_convert_parm_for_inlining (tree, tree, tree, int);
|
extern tree c_convert_parm_for_inlining (tree, tree, tree, int);
|
||||||
|
extern int c_types_compatible_p (tree, tree);
|
||||||
|
|
||||||
/* Set to 0 at beginning of a function definition, set to 1 if
|
/* Set to 0 at beginning of a function definition, set to 1 if
|
||||||
a return statement that specifies a return value is seen. */
|
a return statement that specifies a return value is seen. */
|
||||||
|
104
gcc/c-typeck.c
104
gcc/c-typeck.c
@ -687,7 +687,9 @@ tagged_types_tu_compatible_p (tree t1, tree t2, int flags)
|
|||||||
/* We have to verify that the tags of the types are the same. This
|
/* We have to verify that the tags of the types are the same. This
|
||||||
is harder than it looks because this may be a typedef, so we have
|
is harder than it looks because this may be a typedef, so we have
|
||||||
to go look at the original type. It may even be a typedef of a
|
to go look at the original type. It may even be a typedef of a
|
||||||
typedef... */
|
typedef...
|
||||||
|
In the case of compiler-created builtin structs the TYPE_DECL
|
||||||
|
may be a dummy, with no DECL_ORIGINAL_TYPE. Don't fault. */
|
||||||
while (TYPE_NAME (t1)
|
while (TYPE_NAME (t1)
|
||||||
&& TREE_CODE (TYPE_NAME (t1)) == TYPE_DECL
|
&& TREE_CODE (TYPE_NAME (t1)) == TYPE_DECL
|
||||||
&& DECL_ORIGINAL_TYPE (TYPE_NAME (t1)))
|
&& DECL_ORIGINAL_TYPE (TYPE_NAME (t1)))
|
||||||
@ -1143,7 +1145,6 @@ default_function_array_conversion (tree exp)
|
|||||||
adr = build1 (ADDR_EXPR, ptrtype, exp);
|
adr = build1 (ADDR_EXPR, ptrtype, exp);
|
||||||
if (!c_mark_addressable (exp))
|
if (!c_mark_addressable (exp))
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
TREE_CONSTANT (adr) = staticp (exp);
|
|
||||||
TREE_SIDE_EFFECTS (adr) = 0; /* Default would be, same as EXP. */
|
TREE_SIDE_EFFECTS (adr) = 0; /* Default would be, same as EXP. */
|
||||||
return adr;
|
return adr;
|
||||||
}
|
}
|
||||||
@ -1489,8 +1490,7 @@ build_array_ref (tree array, tree index)
|
|||||||
|| TREE_TYPE (index) == error_mark_node)
|
|| TREE_TYPE (index) == error_mark_node)
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
|
|
||||||
if (TREE_CODE (TREE_TYPE (array)) == ARRAY_TYPE
|
if (TREE_CODE (TREE_TYPE (array)) == ARRAY_TYPE)
|
||||||
&& TREE_CODE (array) != INDIRECT_REF)
|
|
||||||
{
|
{
|
||||||
tree rval, type;
|
tree rval, type;
|
||||||
|
|
||||||
@ -1660,6 +1660,7 @@ build_external_ref (tree id, int fun)
|
|||||||
{
|
{
|
||||||
ref = DECL_INITIAL (ref);
|
ref = DECL_INITIAL (ref);
|
||||||
TREE_CONSTANT (ref) = 1;
|
TREE_CONSTANT (ref) = 1;
|
||||||
|
TREE_INVARIANT (ref) = 1;
|
||||||
}
|
}
|
||||||
else if (current_function_decl != 0
|
else if (current_function_decl != 0
|
||||||
&& !DECL_FILE_SCOPE_P (current_function_decl)
|
&& !DECL_FILE_SCOPE_P (current_function_decl)
|
||||||
@ -2088,14 +2089,12 @@ parser_build_binary_op (enum tree_code code, tree arg1, tree arg2)
|
|||||||
C_SET_EXP_ORIGINAL_CODE (result, code);
|
C_SET_EXP_ORIGINAL_CODE (result, code);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int flag = TREE_CONSTANT (result);
|
|
||||||
/* We used to use NOP_EXPR rather than NON_LVALUE_EXPR
|
/* We used to use NOP_EXPR rather than NON_LVALUE_EXPR
|
||||||
so that convert_for_assignment wouldn't strip it.
|
so that convert_for_assignment wouldn't strip it.
|
||||||
That way, we got warnings for things like p = (1 - 1).
|
That way, we got warnings for things like p = (1 - 1).
|
||||||
But it turns out we should not get those warnings. */
|
But it turns out we should not get those warnings. */
|
||||||
result = build1 (NON_LVALUE_EXPR, TREE_TYPE (result), result);
|
result = build1 (NON_LVALUE_EXPR, TREE_TYPE (result), result);
|
||||||
C_SET_EXP_ORIGINAL_CODE (result, code);
|
C_SET_EXP_ORIGINAL_CODE (result, code);
|
||||||
TREE_CONSTANT (result) = flag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -2127,7 +2126,6 @@ c_tree_expr_nonnegative_p (tree t)
|
|||||||
static tree
|
static tree
|
||||||
pointer_diff (tree op0, tree op1)
|
pointer_diff (tree op0, tree op1)
|
||||||
{
|
{
|
||||||
tree result, folded;
|
|
||||||
tree restype = ptrdiff_type_node;
|
tree restype = ptrdiff_type_node;
|
||||||
|
|
||||||
tree target_type = TREE_TYPE (TREE_TYPE (op0));
|
tree target_type = TREE_TYPE (TREE_TYPE (op0));
|
||||||
@ -2191,13 +2189,7 @@ pointer_diff (tree op0, tree op1)
|
|||||||
op1 = c_size_in_bytes (target_type);
|
op1 = c_size_in_bytes (target_type);
|
||||||
|
|
||||||
/* Divide by the size, in easiest possible way. */
|
/* Divide by the size, in easiest possible way. */
|
||||||
|
return fold (build (EXACT_DIV_EXPR, restype, op0, convert (restype, op1)));
|
||||||
result = build (EXACT_DIV_EXPR, restype, op0, convert (restype, op1));
|
|
||||||
|
|
||||||
folded = fold (result);
|
|
||||||
if (folded == result)
|
|
||||||
TREE_CONSTANT (folded) = TREE_CONSTANT (op0) & TREE_CONSTANT (op1);
|
|
||||||
return folded;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Construct and perhaps optimize a tree representation
|
/* Construct and perhaps optimize a tree representation
|
||||||
@ -2420,7 +2412,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
|
|||||||
TREE_SIDE_EFFECTS (val) = 1;
|
TREE_SIDE_EFFECTS (val) = 1;
|
||||||
val = convert (result_type, val);
|
val = convert (result_type, val);
|
||||||
if (TREE_CODE (val) != code)
|
if (TREE_CODE (val) != code)
|
||||||
TREE_NO_UNUSED_WARNING (val) = 1;
|
TREE_NO_WARNING (val) = 1;
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2492,12 +2484,6 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
|
|||||||
else
|
else
|
||||||
addr = build1 (code, argtype, arg);
|
addr = build1 (code, argtype, arg);
|
||||||
|
|
||||||
/* Address of a static or external variable or
|
|
||||||
file-scope function counts as a constant. */
|
|
||||||
if (staticp (arg)
|
|
||||||
&& ! (TREE_CODE (arg) == FUNCTION_DECL
|
|
||||||
&& !DECL_FILE_SCOPE_P (arg)))
|
|
||||||
TREE_CONSTANT (addr) = 1;
|
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2933,6 +2919,7 @@ build_c_cast (tree type, tree expr)
|
|||||||
build_tree_list (field, value)),
|
build_tree_list (field, value)),
|
||||||
0);
|
0);
|
||||||
TREE_CONSTANT (t) = TREE_CONSTANT (value);
|
TREE_CONSTANT (t) = TREE_CONSTANT (value);
|
||||||
|
TREE_INVARIANT (t) = TREE_INVARIANT (value);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
error ("cast to union type from type not present in union");
|
error ("cast to union type from type not present in union");
|
||||||
@ -4758,7 +4745,7 @@ pop_init_level (int implicit)
|
|||||||
constructor = build_constructor (constructor_type,
|
constructor = build_constructor (constructor_type,
|
||||||
nreverse (constructor_elements));
|
nreverse (constructor_elements));
|
||||||
if (constructor_constant)
|
if (constructor_constant)
|
||||||
TREE_CONSTANT (constructor) = 1;
|
TREE_CONSTANT (constructor) = TREE_INVARIANT (constructor) = 1;
|
||||||
if (constructor_constant && constructor_simple)
|
if (constructor_constant && constructor_simple)
|
||||||
TREE_STATIC (constructor) = 1;
|
TREE_STATIC (constructor) = 1;
|
||||||
}
|
}
|
||||||
@ -6052,8 +6039,8 @@ process_init_element (tree value)
|
|||||||
tree
|
tree
|
||||||
build_asm_stmt (tree cv_qualifier, tree args)
|
build_asm_stmt (tree cv_qualifier, tree args)
|
||||||
{
|
{
|
||||||
if (!TREE_OPERAND (args, 0))
|
if (!ASM_VOLATILE_P (args) && cv_qualifier)
|
||||||
TREE_OPERAND (args, 0) = cv_qualifier;
|
ASM_VOLATILE_P (args) = 1;
|
||||||
return add_stmt (args);
|
return add_stmt (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6068,36 +6055,42 @@ build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers,
|
|||||||
{
|
{
|
||||||
tree tail;
|
tree tail;
|
||||||
tree args;
|
tree args;
|
||||||
|
int i;
|
||||||
|
const char *constraint;
|
||||||
|
bool allows_mem, allows_reg, is_inout;
|
||||||
|
int ninputs;
|
||||||
|
int noutputs;
|
||||||
|
|
||||||
/* We can remove output conversions that change the type,
|
ninputs = list_length (inputs);
|
||||||
but not the mode. */
|
noutputs = list_length (outputs);
|
||||||
for (tail = outputs; tail; tail = TREE_CHAIN (tail))
|
|
||||||
{
|
|
||||||
tree output = TREE_VALUE (tail);
|
|
||||||
|
|
||||||
STRIP_NOPS (output);
|
|
||||||
TREE_VALUE (tail) = output;
|
|
||||||
|
|
||||||
/* Allow conversions as LHS here. build_modify_expr as called below
|
|
||||||
will do the right thing with them. */
|
|
||||||
while (TREE_CODE (output) == NOP_EXPR
|
|
||||||
|| TREE_CODE (output) == CONVERT_EXPR
|
|
||||||
|| TREE_CODE (output) == FLOAT_EXPR
|
|
||||||
|| TREE_CODE (output) == FIX_TRUNC_EXPR
|
|
||||||
|| TREE_CODE (output) == FIX_FLOOR_EXPR
|
|
||||||
|| TREE_CODE (output) == FIX_ROUND_EXPR
|
|
||||||
|| TREE_CODE (output) == FIX_CEIL_EXPR)
|
|
||||||
output = TREE_OPERAND (output, 0);
|
|
||||||
|
|
||||||
lvalue_or_else (TREE_VALUE (tail), "invalid lvalue in asm statement");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove output conversions that change the type but not the mode. */
|
/* Remove output conversions that change the type but not the mode. */
|
||||||
for (tail = outputs; tail; tail = TREE_CHAIN (tail))
|
for (i = 0, tail = outputs; tail; ++i, tail = TREE_CHAIN (tail))
|
||||||
{
|
{
|
||||||
tree output = TREE_VALUE (tail);
|
tree output = TREE_VALUE (tail);
|
||||||
STRIP_NOPS (output);
|
STRIP_NOPS (output);
|
||||||
TREE_VALUE (tail) = output;
|
TREE_VALUE (tail) = output;
|
||||||
|
lvalue_or_else (output, "invalid lvalue in asm statement");
|
||||||
|
|
||||||
|
constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (tail)));
|
||||||
|
|
||||||
|
if (!parse_output_constraint (&constraint, i, ninputs, noutputs,
|
||||||
|
&allows_mem, &allows_reg, &is_inout))
|
||||||
|
{
|
||||||
|
/* By marking this operand as erroneous, we will not try
|
||||||
|
to process this operand again in expand_asm_operands. */
|
||||||
|
TREE_VALUE (tail) = error_mark_node;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If the operand is a DECL that is going to end up in
|
||||||
|
memory, assume it is addressable. This is a bit more
|
||||||
|
conservative than it would ideally be; the exact test is
|
||||||
|
buried deep in expand_asm_operands and depends on the
|
||||||
|
DECL_RTL for the OPERAND -- which we don't have at this
|
||||||
|
point. */
|
||||||
|
if (!allows_reg && DECL_P (output))
|
||||||
|
c_mark_addressable (output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform default conversions on array and function inputs.
|
/* Perform default conversions on array and function inputs.
|
||||||
@ -6106,12 +6099,12 @@ build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers,
|
|||||||
for (tail = inputs; tail; tail = TREE_CHAIN (tail))
|
for (tail = inputs; tail; tail = TREE_CHAIN (tail))
|
||||||
TREE_VALUE (tail) = default_function_array_conversion (TREE_VALUE (tail));
|
TREE_VALUE (tail) = default_function_array_conversion (TREE_VALUE (tail));
|
||||||
|
|
||||||
args = build_stmt (ASM_STMT, 0, string, outputs, inputs, clobbers);
|
args = build_stmt (ASM_STMT, string, outputs, inputs, clobbers);
|
||||||
|
|
||||||
/* Simple asm statements are treated as volatile. */
|
/* Simple asm statements are treated as volatile. */
|
||||||
if (simple)
|
if (simple)
|
||||||
{
|
{
|
||||||
TREE_OPERAND (args, 0) = ridpointers[RID_VOLATILE];
|
ASM_VOLATILE_P (args) = 1;
|
||||||
ASM_INPUT_P (args) = 1;
|
ASM_INPUT_P (args) = 1;
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
@ -6375,6 +6368,9 @@ c_finish_case (void)
|
|||||||
{
|
{
|
||||||
struct c_switch *cs = switch_stack;
|
struct c_switch *cs = switch_stack;
|
||||||
|
|
||||||
|
/* Emit warnings as needed. */
|
||||||
|
c_do_switch_warnings (cs->cases, cs->switch_stmt);
|
||||||
|
|
||||||
/* Rechain the next statements to the SWITCH_STMT. */
|
/* Rechain the next statements to the SWITCH_STMT. */
|
||||||
last_tree = cs->switch_stmt;
|
last_tree = cs->switch_stmt;
|
||||||
|
|
||||||
@ -7103,16 +7099,14 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
|
|||||||
|
|
||||||
{
|
{
|
||||||
tree result = build (resultcode, build_type, op0, op1);
|
tree result = build (resultcode, build_type, op0, op1);
|
||||||
tree folded;
|
|
||||||
|
|
||||||
/* Treat expressions in initializers specially as they can't trap. */
|
/* Treat expressions in initializers specially as they can't trap. */
|
||||||
folded = initializer_stack ? fold_initializer (result)
|
result = initializer_stack ? fold_initializer (result)
|
||||||
: fold (result);
|
: fold (result);
|
||||||
if (folded == result)
|
|
||||||
TREE_CONSTANT (folded) = TREE_CONSTANT (op0) & TREE_CONSTANT (op1);
|
|
||||||
if (final_type != 0)
|
if (final_type != 0)
|
||||||
return convert (final_type, folded);
|
result = convert (final_type, result);
|
||||||
return folded;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,10 +469,6 @@ fdollars-in-identifiers
|
|||||||
C ObjC C++ ObjC++
|
C ObjC C++ ObjC++
|
||||||
Permit '$' as an identifier character
|
Permit '$' as an identifier character
|
||||||
|
|
||||||
fdump-
|
|
||||||
C ObjC C++ ObjC++ Joined RejectNegative
|
|
||||||
-fdump-<type> Dump various compiler internals to a file
|
|
||||||
|
|
||||||
felide-constructors
|
felide-constructors
|
||||||
C++ ObjC++
|
C++ ObjC++
|
||||||
|
|
||||||
|
475
gcc/calls.c
475
gcc/calls.c
@ -120,7 +120,7 @@ int stack_arg_under_construction;
|
|||||||
static int calls_function (tree, int);
|
static int calls_function (tree, int);
|
||||||
static int calls_function_1 (tree, int);
|
static int calls_function_1 (tree, int);
|
||||||
|
|
||||||
static void emit_call_1 (rtx, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT,
|
static void emit_call_1 (rtx, tree, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT,
|
||||||
HOST_WIDE_INT, rtx, rtx, int, rtx, int,
|
HOST_WIDE_INT, rtx, rtx, int, rtx, int,
|
||||||
CUMULATIVE_ARGS *);
|
CUMULATIVE_ARGS *);
|
||||||
static void precompute_register_parameters (int, struct arg_data *, int *);
|
static void precompute_register_parameters (int, struct arg_data *, int *);
|
||||||
@ -134,7 +134,7 @@ static void initialize_argument_information (int, struct arg_data *,
|
|||||||
struct args_size *, int, tree,
|
struct args_size *, int, tree,
|
||||||
tree, CUMULATIVE_ARGS *, int,
|
tree, CUMULATIVE_ARGS *, int,
|
||||||
rtx *, int *, int *, int *,
|
rtx *, int *, int *, int *,
|
||||||
bool);
|
bool *, bool);
|
||||||
static void compute_argument_addresses (struct arg_data *, rtx, int);
|
static void compute_argument_addresses (struct arg_data *, rtx, int);
|
||||||
static rtx rtx_for_function_call (tree, tree);
|
static rtx rtx_for_function_call (tree, tree);
|
||||||
static void load_register_parameters (struct arg_data *, int, rtx *, int,
|
static void load_register_parameters (struct arg_data *, int, rtx *, int,
|
||||||
@ -142,7 +142,6 @@ static void load_register_parameters (struct arg_data *, int, rtx *, int,
|
|||||||
static rtx emit_library_call_value_1 (int, rtx, rtx, enum libcall_type,
|
static rtx emit_library_call_value_1 (int, rtx, rtx, enum libcall_type,
|
||||||
enum machine_mode, int, va_list);
|
enum machine_mode, int, va_list);
|
||||||
static int special_function_p (tree, int);
|
static int special_function_p (tree, int);
|
||||||
static rtx try_to_integrate (tree, tree, rtx, int, tree, rtx);
|
|
||||||
static int check_sibcall_argument_overlap_1 (rtx);
|
static int check_sibcall_argument_overlap_1 (rtx);
|
||||||
static int check_sibcall_argument_overlap (rtx, struct arg_data *, int);
|
static int check_sibcall_argument_overlap (rtx, struct arg_data *, int);
|
||||||
|
|
||||||
@ -280,17 +279,11 @@ calls_function_1 (tree exp, int which)
|
|||||||
CALL_INSN_FUNCTION_USAGE information. */
|
CALL_INSN_FUNCTION_USAGE information. */
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
prepare_call_address (rtx funexp, tree fndecl, rtx *call_fusage,
|
prepare_call_address (rtx funexp, rtx static_chain_value,
|
||||||
int reg_parm_seen, int sibcallp)
|
rtx *call_fusage, int reg_parm_seen, int sibcallp)
|
||||||
{
|
{
|
||||||
rtx static_chain_value = 0;
|
|
||||||
|
|
||||||
funexp = protect_from_queue (funexp, 0);
|
funexp = protect_from_queue (funexp, 0);
|
||||||
|
|
||||||
if (fndecl != 0)
|
|
||||||
/* Get possible static chain value for nested function in C. */
|
|
||||||
static_chain_value = lookup_static_chain (fndecl);
|
|
||||||
|
|
||||||
/* Make a valid memory address and copy constants through pseudo-regs,
|
/* Make a valid memory address and copy constants through pseudo-regs,
|
||||||
but not for a constant address if -fno-function-cse. */
|
but not for a constant address if -fno-function-cse. */
|
||||||
if (GET_CODE (funexp) != SYMBOL_REF)
|
if (GET_CODE (funexp) != SYMBOL_REF)
|
||||||
@ -362,7 +355,8 @@ prepare_call_address (rtx funexp, tree fndecl, rtx *call_fusage,
|
|||||||
denote registers used by the called function. */
|
denote registers used by the called function. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UNUSED,
|
emit_call_1 (rtx funexp, tree fntree, tree fndecl ATTRIBUTE_UNUSED,
|
||||||
|
tree funtype ATTRIBUTE_UNUSED,
|
||||||
HOST_WIDE_INT stack_size ATTRIBUTE_UNUSED,
|
HOST_WIDE_INT stack_size ATTRIBUTE_UNUSED,
|
||||||
HOST_WIDE_INT rounded_stack_size,
|
HOST_WIDE_INT rounded_stack_size,
|
||||||
HOST_WIDE_INT struct_value_size ATTRIBUTE_UNUSED,
|
HOST_WIDE_INT struct_value_size ATTRIBUTE_UNUSED,
|
||||||
@ -506,7 +500,16 @@ emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UN
|
|||||||
REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, const0_rtx,
|
REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, const0_rtx,
|
||||||
REG_NOTES (call_insn));
|
REG_NOTES (call_insn));
|
||||||
else
|
else
|
||||||
note_eh_region_may_contain_throw ();
|
{
|
||||||
|
int rn = lookup_stmt_eh_region (fntree);
|
||||||
|
|
||||||
|
/* If rn < 0, then either (1) tree-ssa not used or (2) doesn't
|
||||||
|
throw, which we already took care of. */
|
||||||
|
if (rn > 0)
|
||||||
|
REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (rn),
|
||||||
|
REG_NOTES (call_insn));
|
||||||
|
note_current_region_may_contain_throw ();
|
||||||
|
}
|
||||||
|
|
||||||
if (ecf_flags & ECF_NORETURN)
|
if (ecf_flags & ECF_NORETURN)
|
||||||
REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_NORETURN, const0_rtx,
|
REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_NORETURN, const0_rtx,
|
||||||
@ -590,8 +593,7 @@ emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UN
|
|||||||
static int
|
static int
|
||||||
special_function_p (tree fndecl, int flags)
|
special_function_p (tree fndecl, int flags)
|
||||||
{
|
{
|
||||||
if (! (flags & ECF_MALLOC)
|
if (fndecl && DECL_NAME (fndecl)
|
||||||
&& fndecl && DECL_NAME (fndecl)
|
|
||||||
&& IDENTIFIER_LENGTH (DECL_NAME (fndecl)) <= 17
|
&& IDENTIFIER_LENGTH (DECL_NAME (fndecl)) <= 17
|
||||||
/* Exclude functions not at the file scope, or not `extern',
|
/* Exclude functions not at the file scope, or not `extern',
|
||||||
since they are not the magic functions we would otherwise
|
since they are not the magic functions we would otherwise
|
||||||
@ -714,6 +716,8 @@ flags_from_decl_or_type (tree exp)
|
|||||||
|
|
||||||
if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
|
if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
|
||||||
flags |= ECF_LIBCALL_BLOCK | ECF_CONST;
|
flags |= ECF_LIBCALL_BLOCK | ECF_CONST;
|
||||||
|
|
||||||
|
flags = special_function_p (exp, flags);
|
||||||
}
|
}
|
||||||
else if (TYPE_P (exp) && TYPE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
|
else if (TYPE_P (exp) && TYPE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
|
||||||
flags |= ECF_CONST;
|
flags |= ECF_CONST;
|
||||||
@ -1012,6 +1016,9 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals)
|
|||||||
OLD_PENDING_ADJ, MUST_PREALLOCATE and FLAGS are pointers to integer
|
OLD_PENDING_ADJ, MUST_PREALLOCATE and FLAGS are pointers to integer
|
||||||
flags which may may be modified by this routine.
|
flags which may may be modified by this routine.
|
||||||
|
|
||||||
|
MAY_TAILCALL is cleared if we encounter an invisible pass-by-reference
|
||||||
|
that requires allocation of stack space.
|
||||||
|
|
||||||
CALL_FROM_THUNK_P is true if this call is the jump from a thunk to
|
CALL_FROM_THUNK_P is true if this call is the jump from a thunk to
|
||||||
the thunked-to function. */
|
the thunked-to function. */
|
||||||
|
|
||||||
@ -1025,7 +1032,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
|
|||||||
int reg_parm_stack_space,
|
int reg_parm_stack_space,
|
||||||
rtx *old_stack_level, int *old_pending_adj,
|
rtx *old_stack_level, int *old_pending_adj,
|
||||||
int *must_preallocate, int *ecf_flags,
|
int *must_preallocate, int *ecf_flags,
|
||||||
bool call_from_thunk_p)
|
bool *may_tailcall, bool call_from_thunk_p)
|
||||||
{
|
{
|
||||||
/* 1 if scanning parms front to back, -1 if scanning back to front. */
|
/* 1 if scanning parms front to back, -1 if scanning back to front. */
|
||||||
int inc;
|
int inc;
|
||||||
@ -1138,6 +1145,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
|
|||||||
build_pointer_type (type),
|
build_pointer_type (type),
|
||||||
args[i].tree_value);
|
args[i].tree_value);
|
||||||
type = build_pointer_type (type);
|
type = build_pointer_type (type);
|
||||||
|
*may_tailcall = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1177,6 +1185,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
|
|||||||
build_pointer_type (type),
|
build_pointer_type (type),
|
||||||
make_tree (type, copy));
|
make_tree (type, copy));
|
||||||
type = build_pointer_type (type);
|
type = build_pointer_type (type);
|
||||||
|
*may_tailcall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1705,120 +1714,6 @@ load_register_parameters (struct arg_data *args, int num_actuals,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to integrate function. See expand_inline_function for documentation
|
|
||||||
about the parameters. */
|
|
||||||
|
|
||||||
static rtx
|
|
||||||
try_to_integrate (tree fndecl, tree actparms, rtx target, int ignore,
|
|
||||||
tree type, rtx structure_value_addr)
|
|
||||||
{
|
|
||||||
rtx temp;
|
|
||||||
rtx before_call;
|
|
||||||
int i;
|
|
||||||
rtx old_stack_level = 0;
|
|
||||||
int reg_parm_stack_space = 0;
|
|
||||||
|
|
||||||
#ifdef REG_PARM_STACK_SPACE
|
|
||||||
reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
before_call = get_last_insn ();
|
|
||||||
|
|
||||||
timevar_push (TV_INTEGRATION);
|
|
||||||
|
|
||||||
temp = expand_inline_function (fndecl, actparms, target,
|
|
||||||
ignore, type,
|
|
||||||
structure_value_addr);
|
|
||||||
|
|
||||||
timevar_pop (TV_INTEGRATION);
|
|
||||||
|
|
||||||
/* If inlining succeeded, return. */
|
|
||||||
if (temp != (rtx) (size_t) - 1)
|
|
||||||
{
|
|
||||||
if (ACCUMULATE_OUTGOING_ARGS)
|
|
||||||
{
|
|
||||||
/* If the outgoing argument list must be preserved, push
|
|
||||||
the stack before executing the inlined function if it
|
|
||||||
makes any calls. */
|
|
||||||
|
|
||||||
i = reg_parm_stack_space;
|
|
||||||
if (i > highest_outgoing_arg_in_use)
|
|
||||||
i = highest_outgoing_arg_in_use;
|
|
||||||
while (--i >= 0 && stack_usage_map[i] == 0)
|
|
||||||
;
|
|
||||||
|
|
||||||
if (stack_arg_under_construction || i >= 0)
|
|
||||||
{
|
|
||||||
rtx first_insn
|
|
||||||
= before_call ? NEXT_INSN (before_call) : get_insns ();
|
|
||||||
rtx insn = NULL_RTX, seq;
|
|
||||||
|
|
||||||
/* Look for a call in the inline function code.
|
|
||||||
If DECL_STRUCT_FUNCTION (fndecl)->outgoing_args_size is
|
|
||||||
nonzero then there is a call and it is not necessary
|
|
||||||
to scan the insns. */
|
|
||||||
|
|
||||||
if (DECL_STRUCT_FUNCTION (fndecl)->outgoing_args_size == 0)
|
|
||||||
for (insn = first_insn; insn; insn = NEXT_INSN (insn))
|
|
||||||
if (GET_CODE (insn) == CALL_INSN)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (insn)
|
|
||||||
{
|
|
||||||
/* Reserve enough stack space so that the largest
|
|
||||||
argument list of any function call in the inline
|
|
||||||
function does not overlap the argument list being
|
|
||||||
evaluated. This is usually an overestimate because
|
|
||||||
allocate_dynamic_stack_space reserves space for an
|
|
||||||
outgoing argument list in addition to the requested
|
|
||||||
space, but there is no way to ask for stack space such
|
|
||||||
that an argument list of a certain length can be
|
|
||||||
safely constructed.
|
|
||||||
|
|
||||||
Add the stack space reserved for register arguments, if
|
|
||||||
any, in the inline function. What is really needed is the
|
|
||||||
largest value of reg_parm_stack_space in the inline
|
|
||||||
function, but that is not available. Using the current
|
|
||||||
value of reg_parm_stack_space is wrong, but gives
|
|
||||||
correct results on all supported machines. */
|
|
||||||
|
|
||||||
int adjust =
|
|
||||||
(DECL_STRUCT_FUNCTION (fndecl)->outgoing_args_size
|
|
||||||
+ reg_parm_stack_space);
|
|
||||||
|
|
||||||
start_sequence ();
|
|
||||||
emit_stack_save (SAVE_BLOCK, &old_stack_level, NULL_RTX);
|
|
||||||
allocate_dynamic_stack_space (GEN_INT (adjust),
|
|
||||||
NULL_RTX, BITS_PER_UNIT);
|
|
||||||
seq = get_insns ();
|
|
||||||
end_sequence ();
|
|
||||||
emit_insn_before (seq, first_insn);
|
|
||||||
emit_stack_restore (SAVE_BLOCK, old_stack_level, NULL_RTX);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the result is equivalent to TARGET, return TARGET to simplify
|
|
||||||
checks in store_expr. They can be equivalent but not equal in the
|
|
||||||
case of a function that returns BLKmode. */
|
|
||||||
if (temp != target && rtx_equal_p (temp, target))
|
|
||||||
return target;
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If inlining failed, mark FNDECL as needing to be compiled
|
|
||||||
separately after all. If function was declared inline,
|
|
||||||
give a warning. */
|
|
||||||
if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
|
|
||||||
&& optimize > 0 && !TREE_ADDRESSABLE (fndecl))
|
|
||||||
{
|
|
||||||
warning ("%Jinlining failed in call to '%F'", fndecl, fndecl);
|
|
||||||
warning ("called from here");
|
|
||||||
}
|
|
||||||
lang_hooks.mark_addressable (fndecl);
|
|
||||||
return (rtx) (size_t) - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We need to pop PENDING_STACK_ADJUST bytes. But, if the arguments
|
/* We need to pop PENDING_STACK_ADJUST bytes. But, if the arguments
|
||||||
wouldn't fill up an even multiple of PREFERRED_UNIT_STACK_BOUNDARY
|
wouldn't fill up an even multiple of PREFERRED_UNIT_STACK_BOUNDARY
|
||||||
bytes, then we would need to push some additional bytes to pad the
|
bytes, then we would need to push some additional bytes to pad the
|
||||||
@ -2029,6 +1924,69 @@ shift_returned_value (tree type, rtx *value)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remove all REG_EQUIV notes found in the insn chain. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
purge_reg_equiv_notes (void)
|
||||||
|
{
|
||||||
|
rtx insn;
|
||||||
|
|
||||||
|
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
||||||
|
{
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
rtx note = find_reg_note (insn, REG_EQUIV, 0);
|
||||||
|
if (note)
|
||||||
|
{
|
||||||
|
/* Remove the note and keep looking at the notes for
|
||||||
|
this insn. */
|
||||||
|
remove_note (insn, note);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clear RTX_UNCHANGING_P flag of incoming argument MEMs. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
purge_mem_unchanging_flag (rtx x)
|
||||||
|
{
|
||||||
|
RTX_CODE code;
|
||||||
|
int i, j;
|
||||||
|
const char *fmt;
|
||||||
|
|
||||||
|
if (x == NULL_RTX)
|
||||||
|
return;
|
||||||
|
|
||||||
|
code = GET_CODE (x);
|
||||||
|
|
||||||
|
if (code == MEM)
|
||||||
|
{
|
||||||
|
if (RTX_UNCHANGING_P (x)
|
||||||
|
&& (XEXP (x, 0) == current_function_internal_arg_pointer
|
||||||
|
|| (GET_CODE (XEXP (x, 0)) == PLUS
|
||||||
|
&& XEXP (XEXP (x, 0), 0) ==
|
||||||
|
current_function_internal_arg_pointer
|
||||||
|
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)))
|
||||||
|
RTX_UNCHANGING_P (x) = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scan all subexpressions. */
|
||||||
|
fmt = GET_RTX_FORMAT (code);
|
||||||
|
for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
|
||||||
|
{
|
||||||
|
if (*fmt == 'e')
|
||||||
|
purge_mem_unchanging_flag (XEXP (x, i));
|
||||||
|
else if (*fmt == 'E')
|
||||||
|
for (j = 0; j < XVECLEN (x, i); j++)
|
||||||
|
purge_mem_unchanging_flag (XVECEXP (x, i, j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Generate all the code for a function call
|
/* Generate all the code for a function call
|
||||||
and return an rtx for its value.
|
and return an rtx for its value.
|
||||||
Store the value in TARGET (specified as an rtx) if convenient.
|
Store the value in TARGET (specified as an rtx) if convenient.
|
||||||
@ -2045,11 +2003,9 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
tree actparms = TREE_OPERAND (exp, 1);
|
tree actparms = TREE_OPERAND (exp, 1);
|
||||||
/* RTX for the function to be called. */
|
/* RTX for the function to be called. */
|
||||||
rtx funexp;
|
rtx funexp;
|
||||||
/* Sequence of insns to perform a tail recursive "call". */
|
|
||||||
rtx tail_recursion_insns = NULL_RTX;
|
|
||||||
/* Sequence of insns to perform a normal "call". */
|
/* Sequence of insns to perform a normal "call". */
|
||||||
rtx normal_call_insns = NULL_RTX;
|
rtx normal_call_insns = NULL_RTX;
|
||||||
/* Sequence of insns to perform a tail recursive "call". */
|
/* Sequence of insns to perform a tail "call". */
|
||||||
rtx tail_call_insns = NULL_RTX;
|
rtx tail_call_insns = NULL_RTX;
|
||||||
/* Data type of the function. */
|
/* Data type of the function. */
|
||||||
tree funtype;
|
tree funtype;
|
||||||
@ -2059,9 +2015,7 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
tree fndecl = 0;
|
tree fndecl = 0;
|
||||||
/* The type of the function being called. */
|
/* The type of the function being called. */
|
||||||
tree fntype;
|
tree fntype;
|
||||||
rtx insn;
|
bool try_tail_call = CALL_EXPR_TAILCALL (exp);
|
||||||
int try_tail_call = 1;
|
|
||||||
int try_tail_recursion = 1;
|
|
||||||
int pass;
|
int pass;
|
||||||
|
|
||||||
/* Register in which non-BLKmode value will be returned,
|
/* Register in which non-BLKmode value will be returned,
|
||||||
@ -2122,8 +2076,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
|
|
||||||
/* Mask of ECF_ flags. */
|
/* Mask of ECF_ flags. */
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
/* Nonzero if this is a call to an inline function. */
|
|
||||||
int is_integrable = 0;
|
|
||||||
#ifdef REG_PARM_STACK_SPACE
|
#ifdef REG_PARM_STACK_SPACE
|
||||||
/* Define the boundary of the register parm stack space that needs to be
|
/* Define the boundary of the register parm stack space that needs to be
|
||||||
saved, if any. */
|
saved, if any. */
|
||||||
@ -2132,7 +2084,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int initial_highest_arg_in_use = highest_outgoing_arg_in_use;
|
int initial_highest_arg_in_use = highest_outgoing_arg_in_use;
|
||||||
rtx temp_target = 0;
|
|
||||||
char *initial_stack_usage_map = stack_usage_map;
|
char *initial_stack_usage_map = stack_usage_map;
|
||||||
|
|
||||||
int old_stack_allocated;
|
int old_stack_allocated;
|
||||||
@ -2156,58 +2107,23 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
HOST_WIDE_INT preferred_stack_boundary;
|
HOST_WIDE_INT preferred_stack_boundary;
|
||||||
/* The alignment of the stack, in bytes. */
|
/* The alignment of the stack, in bytes. */
|
||||||
HOST_WIDE_INT preferred_unit_stack_boundary;
|
HOST_WIDE_INT preferred_unit_stack_boundary;
|
||||||
|
/* The static chain value to use for this call. */
|
||||||
|
rtx static_chain_value;
|
||||||
/* See if this is "nothrow" function call. */
|
/* See if this is "nothrow" function call. */
|
||||||
if (TREE_NOTHROW (exp))
|
if (TREE_NOTHROW (exp))
|
||||||
flags |= ECF_NOTHROW;
|
flags |= ECF_NOTHROW;
|
||||||
|
|
||||||
/* See if we can find a DECL-node for the actual function.
|
/* See if we can find a DECL-node for the actual function, and get the
|
||||||
As a result, decide whether this is a call to an integrable function. */
|
function attributes (flags) from the function decl or type node. */
|
||||||
|
|
||||||
fndecl = get_callee_fndecl (exp);
|
fndecl = get_callee_fndecl (exp);
|
||||||
if (fndecl)
|
if (fndecl)
|
||||||
{
|
{
|
||||||
fntype = TREE_TYPE (fndecl);
|
fntype = TREE_TYPE (fndecl);
|
||||||
if (!flag_no_inline
|
|
||||||
&& fndecl != current_function_decl
|
|
||||||
&& DECL_INLINE (fndecl)
|
|
||||||
&& DECL_STRUCT_FUNCTION (fndecl)
|
|
||||||
&& DECL_STRUCT_FUNCTION (fndecl)->inlinable)
|
|
||||||
is_integrable = 1;
|
|
||||||
else if (! TREE_ADDRESSABLE (fndecl))
|
|
||||||
{
|
|
||||||
/* In case this function later becomes inlinable,
|
|
||||||
record that there was already a non-inline call to it.
|
|
||||||
|
|
||||||
Use abstraction instead of setting TREE_ADDRESSABLE
|
|
||||||
directly. */
|
|
||||||
if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
|
|
||||||
&& optimize > 0)
|
|
||||||
{
|
|
||||||
warning ("%Jcan't inline call to '%F'", fndecl, fndecl);
|
|
||||||
warning ("called from here");
|
|
||||||
}
|
|
||||||
lang_hooks.mark_addressable (fndecl);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ignore
|
|
||||||
&& lookup_attribute ("warn_unused_result",
|
|
||||||
TYPE_ATTRIBUTES (TREE_TYPE (fndecl))))
|
|
||||||
warning ("ignoring return value of `%D', "
|
|
||||||
"declared with attribute warn_unused_result", fndecl);
|
|
||||||
|
|
||||||
flags |= flags_from_decl_or_type (fndecl);
|
flags |= flags_from_decl_or_type (fndecl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we don't have specific function to call, see if we have a
|
|
||||||
attributes set in the type. */
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fntype = TREE_TYPE (TREE_TYPE (p));
|
fntype = TREE_TYPE (TREE_TYPE (p));
|
||||||
if (ignore
|
|
||||||
&& lookup_attribute ("warn_unused_result", TYPE_ATTRIBUTES (fntype)))
|
|
||||||
warning ("ignoring return value of function "
|
|
||||||
"declared with attribute warn_unused_result");
|
|
||||||
flags |= flags_from_decl_or_type (fntype);
|
flags |= flags_from_decl_or_type (fntype);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2264,15 +2180,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
#ifdef PCC_STATIC_STRUCT_RETURN
|
#ifdef PCC_STATIC_STRUCT_RETURN
|
||||||
{
|
{
|
||||||
pcc_struct_value = 1;
|
pcc_struct_value = 1;
|
||||||
/* Easier than making that case work right. */
|
|
||||||
if (is_integrable)
|
|
||||||
{
|
|
||||||
/* In case this is a static function, note that it has been
|
|
||||||
used. */
|
|
||||||
if (! TREE_ADDRESSABLE (fndecl))
|
|
||||||
lang_hooks.mark_addressable (fndecl);
|
|
||||||
is_integrable = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else /* not PCC_STATIC_STRUCT_RETURN */
|
#else /* not PCC_STATIC_STRUCT_RETURN */
|
||||||
{
|
{
|
||||||
@ -2305,17 +2212,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
#endif /* not PCC_STATIC_STRUCT_RETURN */
|
#endif /* not PCC_STATIC_STRUCT_RETURN */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If called function is inline, try to integrate it. */
|
|
||||||
|
|
||||||
if (is_integrable)
|
|
||||||
{
|
|
||||||
rtx temp = try_to_integrate (fndecl, actparms, target,
|
|
||||||
ignore, TREE_TYPE (exp),
|
|
||||||
structure_value_addr);
|
|
||||||
if (temp != (rtx) (size_t) - 1)
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Figure out the amount to which the stack should be aligned. */
|
/* Figure out the amount to which the stack should be aligned. */
|
||||||
preferred_stack_boundary = PREFERRED_STACK_BOUNDARY;
|
preferred_stack_boundary = PREFERRED_STACK_BOUNDARY;
|
||||||
if (fndecl)
|
if (fndecl)
|
||||||
@ -2341,10 +2237,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
else
|
else
|
||||||
type_arg_types = TYPE_ARG_TYPES (funtype);
|
type_arg_types = TYPE_ARG_TYPES (funtype);
|
||||||
|
|
||||||
/* See if this is a call to a function that can return more than once
|
|
||||||
or a call to longjmp or malloc. */
|
|
||||||
flags |= special_function_p (fndecl, flags);
|
|
||||||
|
|
||||||
if (flags & ECF_MAY_BE_ALLOCA)
|
if (flags & ECF_MAY_BE_ALLOCA)
|
||||||
current_function_calls_alloca = 1;
|
current_function_calls_alloca = 1;
|
||||||
|
|
||||||
@ -2427,7 +2319,7 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
&args_so_far, reg_parm_stack_space,
|
&args_so_far, reg_parm_stack_space,
|
||||||
&old_stack_level, &old_pending_adj,
|
&old_stack_level, &old_pending_adj,
|
||||||
&must_preallocate, &flags,
|
&must_preallocate, &flags,
|
||||||
CALL_FROM_THUNK_P (exp));
|
&try_tail_call, CALL_FROM_THUNK_P (exp));
|
||||||
|
|
||||||
if (args_size.var)
|
if (args_size.var)
|
||||||
{
|
{
|
||||||
@ -2476,14 +2368,9 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
|| !rtx_equal_function_value_matters
|
|| !rtx_equal_function_value_matters
|
||||||
|| current_nesting_level () == 0
|
|| current_nesting_level () == 0
|
||||||
|| any_pending_cleanups ()
|
|| any_pending_cleanups ()
|
||||||
|| args_size.var)
|
|| args_size.var
|
||||||
try_tail_call = try_tail_recursion = 0;
|
|| lookup_stmt_eh_region (exp) >= 0)
|
||||||
|
try_tail_call = 0;
|
||||||
/* Tail recursion fails, when we are not dealing with recursive calls. */
|
|
||||||
if (!try_tail_recursion
|
|
||||||
|| TREE_CODE (addr) != ADDR_EXPR
|
|
||||||
|| TREE_OPERAND (addr, 0) != current_function_decl)
|
|
||||||
try_tail_recursion = 0;
|
|
||||||
|
|
||||||
/* Rest of purposes for tail call optimizations to fail. */
|
/* Rest of purposes for tail call optimizations to fail. */
|
||||||
if (
|
if (
|
||||||
@ -2521,7 +2408,7 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
|| !lang_hooks.decls.ok_for_sibcall (fndecl))
|
|| !lang_hooks.decls.ok_for_sibcall (fndecl))
|
||||||
try_tail_call = 0;
|
try_tail_call = 0;
|
||||||
|
|
||||||
if (try_tail_call || try_tail_recursion)
|
if (try_tail_call)
|
||||||
{
|
{
|
||||||
int end, inc;
|
int end, inc;
|
||||||
actparms = NULL_TREE;
|
actparms = NULL_TREE;
|
||||||
@ -2556,11 +2443,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
for (; i != end; i += inc)
|
for (; i != end; i += inc)
|
||||||
{
|
{
|
||||||
args[i].tree_value = fix_unsafe_tree (args[i].tree_value);
|
args[i].tree_value = fix_unsafe_tree (args[i].tree_value);
|
||||||
/* We need to build actparms for optimize_tail_recursion. We can
|
|
||||||
safely trash away TREE_PURPOSE, since it is unused by this
|
|
||||||
function. */
|
|
||||||
if (try_tail_recursion)
|
|
||||||
actparms = tree_cons (NULL_TREE, args[i].tree_value, actparms);
|
|
||||||
}
|
}
|
||||||
/* Do the same for the function address if it is an expression. */
|
/* Do the same for the function address if it is an expression. */
|
||||||
if (!fndecl)
|
if (!fndecl)
|
||||||
@ -2568,50 +2450,9 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
/* Expanding one of those dangerous arguments could have added
|
/* Expanding one of those dangerous arguments could have added
|
||||||
cleanups, but otherwise give it a whirl. */
|
cleanups, but otherwise give it a whirl. */
|
||||||
if (any_pending_cleanups ())
|
if (any_pending_cleanups ())
|
||||||
try_tail_call = try_tail_recursion = 0;
|
try_tail_call = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a tail recursion sequence when calling ourselves. */
|
|
||||||
|
|
||||||
if (try_tail_recursion)
|
|
||||||
{
|
|
||||||
/* We want to emit any pending stack adjustments before the tail
|
|
||||||
recursion "call". That way we know any adjustment after the tail
|
|
||||||
recursion call can be ignored if we indeed use the tail recursion
|
|
||||||
call expansion. */
|
|
||||||
int save_pending_stack_adjust = pending_stack_adjust;
|
|
||||||
int save_stack_pointer_delta = stack_pointer_delta;
|
|
||||||
|
|
||||||
/* Emit any queued insns now; otherwise they would end up in
|
|
||||||
only one of the alternates. */
|
|
||||||
emit_queue ();
|
|
||||||
|
|
||||||
/* Use a new sequence to hold any RTL we generate. We do not even
|
|
||||||
know if we will use this RTL yet. The final decision can not be
|
|
||||||
made until after RTL generation for the entire function is
|
|
||||||
complete. */
|
|
||||||
start_sequence ();
|
|
||||||
/* If expanding any of the arguments creates cleanups, we can't
|
|
||||||
do a tailcall. So, we'll need to pop the pending cleanups
|
|
||||||
list. If, however, all goes well, and there are no cleanups
|
|
||||||
then the call to expand_start_target_temps will have no
|
|
||||||
effect. */
|
|
||||||
expand_start_target_temps ();
|
|
||||||
if (optimize_tail_recursion (actparms, get_last_insn ()))
|
|
||||||
{
|
|
||||||
if (any_pending_cleanups ())
|
|
||||||
try_tail_call = try_tail_recursion = 0;
|
|
||||||
else
|
|
||||||
tail_recursion_insns = get_insns ();
|
|
||||||
}
|
|
||||||
expand_end_target_temps ();
|
|
||||||
end_sequence ();
|
|
||||||
|
|
||||||
/* Restore the original pending stack adjustment for the sibling and
|
|
||||||
normal call cases below. */
|
|
||||||
pending_stack_adjust = save_pending_stack_adjust;
|
|
||||||
stack_pointer_delta = save_stack_pointer_delta;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ensure current function's preferred stack boundary is at least
|
/* Ensure current function's preferred stack boundary is at least
|
||||||
what we need. We don't have to increase alignment for recursive
|
what we need. We don't have to increase alignment for recursive
|
||||||
@ -2634,7 +2475,7 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
int sibcall_failure = 0;
|
int sibcall_failure = 0;
|
||||||
/* We want to emit any pending stack adjustments before the tail
|
/* We want to emit any pending stack adjustments before the tail
|
||||||
recursion "call". That way we know any adjustment after the tail
|
recursion "call". That way we know any adjustment after the tail
|
||||||
recursion call can be ignored if we indeed use the tail recursion
|
recursion call can be ignored if we indeed use the tail
|
||||||
call expansion. */
|
call expansion. */
|
||||||
int save_pending_stack_adjust = 0;
|
int save_pending_stack_adjust = 0;
|
||||||
int save_stack_pointer_delta = 0;
|
int save_stack_pointer_delta = 0;
|
||||||
@ -2966,6 +2807,12 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
once we have started filling any specific hard regs. */
|
once we have started filling any specific hard regs. */
|
||||||
precompute_register_parameters (num_actuals, args, ®_parm_seen);
|
precompute_register_parameters (num_actuals, args, ®_parm_seen);
|
||||||
|
|
||||||
|
if (TREE_OPERAND (exp, 2))
|
||||||
|
static_chain_value = expand_expr (TREE_OPERAND (exp, 2),
|
||||||
|
NULL_RTX, VOIDmode, 0);
|
||||||
|
else
|
||||||
|
static_chain_value = 0;
|
||||||
|
|
||||||
#ifdef REG_PARM_STACK_SPACE
|
#ifdef REG_PARM_STACK_SPACE
|
||||||
/* Save the fixed argument area if it's part of the caller's frame and
|
/* Save the fixed argument area if it's part of the caller's frame and
|
||||||
is clobbered by argument setup for this call. */
|
is clobbered by argument setup for this call. */
|
||||||
@ -3056,8 +2903,8 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
use_reg (&call_fusage, struct_value);
|
use_reg (&call_fusage, struct_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
funexp = prepare_call_address (funexp, fndecl, &call_fusage,
|
funexp = prepare_call_address (funexp, static_chain_value,
|
||||||
reg_parm_seen, pass == 0);
|
&call_fusage, reg_parm_seen, pass == 0);
|
||||||
|
|
||||||
load_register_parameters (args, num_actuals, &call_fusage, flags,
|
load_register_parameters (args, num_actuals, &call_fusage, flags,
|
||||||
pass == 0, &sibcall_failure);
|
pass == 0, &sibcall_failure);
|
||||||
@ -3088,7 +2935,7 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* Generate the actual call instruction. */
|
/* Generate the actual call instruction. */
|
||||||
emit_call_1 (funexp, fndecl, funtype, unadjusted_args_size,
|
emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size,
|
||||||
adjusted_args_size.constant, struct_value_size,
|
adjusted_args_size.constant, struct_value_size,
|
||||||
next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage,
|
next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage,
|
||||||
flags, & args_so_far);
|
flags, & args_so_far);
|
||||||
@ -3255,11 +3102,7 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
The Irix 6 ABI has examples of this. */
|
The Irix 6 ABI has examples of this. */
|
||||||
else if (GET_CODE (valreg) == PARALLEL)
|
else if (GET_CODE (valreg) == PARALLEL)
|
||||||
{
|
{
|
||||||
/* Second condition is added because "target" is freed at the
|
if (target == 0)
|
||||||
the end of "pass0" for -O2 when call is made to
|
|
||||||
expand_end_target_temps (). Its "in_use" flag has been set
|
|
||||||
to false, so allocate a new temp. */
|
|
||||||
if (target == 0 || (pass == 1 && target == temp_target))
|
|
||||||
{
|
{
|
||||||
/* This will only be assigned once, so it can be readonly. */
|
/* This will only be assigned once, so it can be readonly. */
|
||||||
tree nt = build_qualified_type (TREE_TYPE (exp),
|
tree nt = build_qualified_type (TREE_TYPE (exp),
|
||||||
@ -3267,7 +3110,6 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
| TYPE_QUAL_CONST));
|
| TYPE_QUAL_CONST));
|
||||||
|
|
||||||
target = assign_temp (nt, 0, 1, 1);
|
target = assign_temp (nt, 0, 1, 1);
|
||||||
temp_target = target;
|
|
||||||
preserve_temp_slots (target);
|
preserve_temp_slots (target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3392,8 +3234,8 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
Check for the handler slots since we might not have a save area
|
Check for the handler slots since we might not have a save area
|
||||||
for non-local gotos. */
|
for non-local gotos. */
|
||||||
|
|
||||||
if ((flags & ECF_MAY_BE_ALLOCA) && nonlocal_goto_handler_slots != 0)
|
if ((flags & ECF_MAY_BE_ALLOCA) && cfun->nonlocal_goto_save_area != 0)
|
||||||
emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, NULL_RTX);
|
update_nonlocal_goto_save_area ();
|
||||||
|
|
||||||
/* Free up storage we no longer need. */
|
/* Free up storage we no longer need. */
|
||||||
for (i = 0; i < num_actuals; ++i)
|
for (i = 0; i < num_actuals; ++i)
|
||||||
@ -3462,48 +3304,16 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
zero out the sequence. */
|
zero out the sequence. */
|
||||||
if (sibcall_failure)
|
if (sibcall_failure)
|
||||||
tail_call_insns = NULL_RTX;
|
tail_call_insns = NULL_RTX;
|
||||||
|
else
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The function optimize_sibling_and_tail_recursive_calls doesn't
|
/* If tail call production suceeded, we need to remove REG_EQUIV notes on
|
||||||
handle CALL_PLACEHOLDERs inside other CALL_PLACEHOLDERs. This
|
arguments too, as argument area is now clobbered by the call. */
|
||||||
can happen if the arguments to this function call an inline
|
if (tail_call_insns)
|
||||||
function who's expansion contains another CALL_PLACEHOLDER.
|
|
||||||
|
|
||||||
If there are any C_Ps in any of these sequences, replace them
|
|
||||||
with their normal call. */
|
|
||||||
|
|
||||||
for (insn = normal_call_insns; insn; insn = NEXT_INSN (insn))
|
|
||||||
if (GET_CODE (insn) == CALL_INSN
|
|
||||||
&& GET_CODE (PATTERN (insn)) == CALL_PLACEHOLDER)
|
|
||||||
replace_call_placeholder (insn, sibcall_use_normal);
|
|
||||||
|
|
||||||
for (insn = tail_call_insns; insn; insn = NEXT_INSN (insn))
|
|
||||||
if (GET_CODE (insn) == CALL_INSN
|
|
||||||
&& GET_CODE (PATTERN (insn)) == CALL_PLACEHOLDER)
|
|
||||||
replace_call_placeholder (insn, sibcall_use_normal);
|
|
||||||
|
|
||||||
for (insn = tail_recursion_insns; insn; insn = NEXT_INSN (insn))
|
|
||||||
if (GET_CODE (insn) == CALL_INSN
|
|
||||||
&& GET_CODE (PATTERN (insn)) == CALL_PLACEHOLDER)
|
|
||||||
replace_call_placeholder (insn, sibcall_use_normal);
|
|
||||||
|
|
||||||
/* If this was a potential tail recursion site, then emit a
|
|
||||||
CALL_PLACEHOLDER with the normal and the tail recursion streams.
|
|
||||||
One of them will be selected later. */
|
|
||||||
if (tail_recursion_insns || tail_call_insns)
|
|
||||||
{
|
{
|
||||||
/* The tail recursion label must be kept around. We could expose
|
emit_insn (tail_call_insns);
|
||||||
its use in the CALL_PLACEHOLDER, but that creates unwanted edges
|
cfun->tail_call_emit = true;
|
||||||
and makes determining true tail recursion sites difficult.
|
|
||||||
|
|
||||||
So we set LABEL_PRESERVE_P here, then clear it when we select
|
|
||||||
one of the call sequences after rtl generation is complete. */
|
|
||||||
if (tail_recursion_insns)
|
|
||||||
LABEL_PRESERVE_P (tail_recursion_label) = 1;
|
|
||||||
emit_call_insn (gen_rtx_CALL_PLACEHOLDER (VOIDmode, normal_call_insns,
|
|
||||||
tail_call_insns,
|
|
||||||
tail_recursion_insns,
|
|
||||||
tail_recursion_label));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
emit_insn (normal_call_insns);
|
emit_insn (normal_call_insns);
|
||||||
@ -3524,6 +3334,47 @@ expand_call (tree exp, rtx target, int ignore)
|
|||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* A sibling call sequence invalidates any REG_EQUIV notes made for
|
||||||
|
this function's incoming arguments.
|
||||||
|
|
||||||
|
At the start of RTL generation we know the only REG_EQUIV notes
|
||||||
|
in the rtl chain are those for incoming arguments, so we can safely
|
||||||
|
flush any REG_EQUIV note.
|
||||||
|
|
||||||
|
This is (slight) overkill. We could keep track of the highest
|
||||||
|
argument we clobber and be more selective in removing notes, but it
|
||||||
|
does not seem to be worth the effort. */
|
||||||
|
void
|
||||||
|
fixup_tail_calls (void)
|
||||||
|
{
|
||||||
|
rtx insn;
|
||||||
|
tree arg;
|
||||||
|
|
||||||
|
purge_reg_equiv_notes ();
|
||||||
|
|
||||||
|
/* A sibling call sequence also may invalidate RTX_UNCHANGING_P
|
||||||
|
flag of some incoming arguments MEM RTLs, because it can write into
|
||||||
|
those slots. We clear all those bits now.
|
||||||
|
|
||||||
|
This is (slight) overkill, we could keep track of which arguments
|
||||||
|
we actually write into. */
|
||||||
|
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
||||||
|
{
|
||||||
|
if (INSN_P (insn))
|
||||||
|
purge_mem_unchanging_flag (PATTERN (insn));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Similarly, invalidate RTX_UNCHANGING_P for any incoming
|
||||||
|
arguments passed in registers. */
|
||||||
|
for (arg = DECL_ARGUMENTS (current_function_decl);
|
||||||
|
arg;
|
||||||
|
arg = TREE_CHAIN (arg))
|
||||||
|
{
|
||||||
|
if (REG_P (DECL_RTL (arg)))
|
||||||
|
RTX_UNCHANGING_P (DECL_RTL (arg)) = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Traverse an argument list in VALUES and expand all complex
|
/* Traverse an argument list in VALUES and expand all complex
|
||||||
arguments into their components. */
|
arguments into their components. */
|
||||||
tree
|
tree
|
||||||
@ -4135,7 +3986,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
|
|||||||
else
|
else
|
||||||
argnum = 0;
|
argnum = 0;
|
||||||
|
|
||||||
fun = prepare_call_address (fun, NULL_TREE, &call_fusage, 0, 0);
|
fun = prepare_call_address (fun, NULL, &call_fusage, 0, 0);
|
||||||
|
|
||||||
/* Now load any reg parms into their regs. */
|
/* Now load any reg parms into their regs. */
|
||||||
|
|
||||||
@ -4197,7 +4048,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
|
|||||||
always signed. We also assume that the list of arguments passed has
|
always signed. We also assume that the list of arguments passed has
|
||||||
no impact, so we pretend it is unknown. */
|
no impact, so we pretend it is unknown. */
|
||||||
|
|
||||||
emit_call_1 (fun,
|
emit_call_1 (fun, NULL,
|
||||||
get_identifier (XSTR (orgfun, 0)),
|
get_identifier (XSTR (orgfun, 0)),
|
||||||
build_function_type (tfom, NULL_TREE),
|
build_function_type (tfom, NULL_TREE),
|
||||||
original_args_size.constant, args_size.constant,
|
original_args_size.constant, args_size.constant,
|
||||||
|
264
gcc/cfg.c
264
gcc/cfg.c
@ -62,20 +62,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "tm_p.h"
|
#include "tm_p.h"
|
||||||
#include "obstack.h"
|
#include "obstack.h"
|
||||||
#include "alloc-pool.h"
|
#include "alloc-pool.h"
|
||||||
|
#include "timevar.h"
|
||||||
|
#include "ggc.h"
|
||||||
|
|
||||||
/* The obstack on which the flow graph components are allocated. */
|
/* The obstack on which the flow graph components are allocated. */
|
||||||
|
|
||||||
struct obstack flow_obstack;
|
struct obstack flow_obstack;
|
||||||
static char *flow_firstobj;
|
static char *flow_firstobj;
|
||||||
|
|
||||||
/* Basic block object pool. */
|
|
||||||
|
|
||||||
static alloc_pool bb_pool;
|
|
||||||
|
|
||||||
/* Edge object pool. */
|
|
||||||
|
|
||||||
static alloc_pool edge_pool;
|
|
||||||
|
|
||||||
/* Number of basic blocks in the current function. */
|
/* Number of basic blocks in the current function. */
|
||||||
|
|
||||||
int n_basic_blocks;
|
int n_basic_blocks;
|
||||||
@ -93,56 +87,10 @@ int n_edges;
|
|||||||
varray_type basic_block_info;
|
varray_type basic_block_info;
|
||||||
|
|
||||||
/* The special entry and exit blocks. */
|
/* The special entry and exit blocks. */
|
||||||
|
basic_block ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR;
|
||||||
|
|
||||||
struct basic_block_def entry_exit_blocks[2]
|
/* Memory alloc pool for bb member rbi. */
|
||||||
= {{NULL, /* head */
|
alloc_pool rbi_pool;
|
||||||
NULL, /* end */
|
|
||||||
NULL, /* head_tree */
|
|
||||||
NULL, /* end_tree */
|
|
||||||
NULL, /* pred */
|
|
||||||
NULL, /* succ */
|
|
||||||
NULL, /* local_set */
|
|
||||||
NULL, /* cond_local_set */
|
|
||||||
NULL, /* global_live_at_start */
|
|
||||||
NULL, /* global_live_at_end */
|
|
||||||
NULL, /* aux */
|
|
||||||
ENTRY_BLOCK, /* index */
|
|
||||||
NULL, /* prev_bb */
|
|
||||||
EXIT_BLOCK_PTR, /* next_bb */
|
|
||||||
0, /* loop_depth */
|
|
||||||
NULL, /* loop_father */
|
|
||||||
{ NULL, NULL }, /* dom */
|
|
||||||
0, /* count */
|
|
||||||
0, /* frequency */
|
|
||||||
0, /* flags */
|
|
||||||
0, /* partition */
|
|
||||||
NULL /* rbi */
|
|
||||||
},
|
|
||||||
{
|
|
||||||
NULL, /* head */
|
|
||||||
NULL, /* end */
|
|
||||||
NULL, /* head_tree */
|
|
||||||
NULL, /* end_tree */
|
|
||||||
NULL, /* pred */
|
|
||||||
NULL, /* succ */
|
|
||||||
NULL, /* local_set */
|
|
||||||
NULL, /* cond_local_set */
|
|
||||||
NULL, /* global_live_at_start */
|
|
||||||
NULL, /* global_live_at_end */
|
|
||||||
NULL, /* aux */
|
|
||||||
EXIT_BLOCK, /* index */
|
|
||||||
ENTRY_BLOCK_PTR, /* prev_bb */
|
|
||||||
NULL, /* next_bb */
|
|
||||||
0, /* loop_depth */
|
|
||||||
NULL, /* loop_father */
|
|
||||||
{ NULL, NULL }, /* dom */
|
|
||||||
0, /* count */
|
|
||||||
0, /* frequency */
|
|
||||||
0, /* flags */
|
|
||||||
0, /* partition */
|
|
||||||
NULL /* rbi */
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void debug_flow_info (void);
|
void debug_flow_info (void);
|
||||||
static void free_edge (edge);
|
static void free_edge (edge);
|
||||||
@ -164,25 +112,26 @@ init_flow (void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
free_alloc_pool (bb_pool);
|
|
||||||
free_alloc_pool (edge_pool);
|
|
||||||
obstack_free (&flow_obstack, flow_firstobj);
|
obstack_free (&flow_obstack, flow_firstobj);
|
||||||
flow_firstobj = obstack_alloc (&flow_obstack, 0);
|
flow_firstobj = obstack_alloc (&flow_obstack, 0);
|
||||||
}
|
}
|
||||||
bb_pool = create_alloc_pool ("Basic block pool",
|
|
||||||
sizeof (struct basic_block_def), 100);
|
ENTRY_BLOCK_PTR = ggc_alloc_cleared (sizeof (*ENTRY_BLOCK_PTR));
|
||||||
edge_pool = create_alloc_pool ("Edge pool",
|
ENTRY_BLOCK_PTR->index = ENTRY_BLOCK;
|
||||||
sizeof (struct edge_def), 100);
|
EXIT_BLOCK_PTR = ggc_alloc_cleared (sizeof (*EXIT_BLOCK_PTR));
|
||||||
|
EXIT_BLOCK_PTR->index = EXIT_BLOCK;
|
||||||
|
ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
|
||||||
|
EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper function for remove_edge and clear_edges. Frees edge structure
|
/* Helper function for remove_edge and clear_edges. Frees edge structure
|
||||||
without actually unlinking it from the pred/succ lists. */
|
without actually unlinking it from the pred/succ lists. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
free_edge (edge e)
|
free_edge (edge e ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
n_edges--;
|
n_edges--;
|
||||||
pool_free (edge_pool, e);
|
/* ggc_free (e); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the memory associated with the edge structures. */
|
/* Free the memory associated with the edge structures. */
|
||||||
@ -231,11 +180,40 @@ basic_block
|
|||||||
alloc_block (void)
|
alloc_block (void)
|
||||||
{
|
{
|
||||||
basic_block bb;
|
basic_block bb;
|
||||||
bb = pool_alloc (bb_pool);
|
bb = ggc_alloc_cleared (sizeof (*bb));
|
||||||
memset (bb, 0, sizeof (*bb));
|
|
||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Create memory pool for rbi_pool. */
|
||||||
|
|
||||||
|
void
|
||||||
|
alloc_rbi_pool (void)
|
||||||
|
{
|
||||||
|
rbi_pool = create_alloc_pool ("rbi pool",
|
||||||
|
sizeof (struct reorder_block_def),
|
||||||
|
n_basic_blocks + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Free rbi_pool. */
|
||||||
|
|
||||||
|
void
|
||||||
|
free_rbi_pool (void)
|
||||||
|
{
|
||||||
|
free_alloc_pool (rbi_pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize rbi (the structure containing data used by basic block
|
||||||
|
duplication and reordering) for the given basic block. */
|
||||||
|
|
||||||
|
void
|
||||||
|
initialize_bb_rbi (basic_block bb)
|
||||||
|
{
|
||||||
|
if (bb->rbi)
|
||||||
|
abort ();
|
||||||
|
bb->rbi = pool_alloc (rbi_pool);
|
||||||
|
memset (bb->rbi, 0, sizeof (struct reorder_block_def));
|
||||||
|
}
|
||||||
|
|
||||||
/* Link block B to chain after AFTER. */
|
/* Link block B to chain after AFTER. */
|
||||||
void
|
void
|
||||||
link_block (basic_block b, basic_block after)
|
link_block (basic_block b, basic_block after)
|
||||||
@ -252,6 +230,8 @@ unlink_block (basic_block b)
|
|||||||
{
|
{
|
||||||
b->next_bb->prev_bb = b->prev_bb;
|
b->next_bb->prev_bb = b->prev_bb;
|
||||||
b->prev_bb->next_bb = b->next_bb;
|
b->prev_bb->next_bb = b->next_bb;
|
||||||
|
b->prev_bb = NULL;
|
||||||
|
b->next_bb = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sequentially order blocks and compact the arrays. */
|
/* Sequentially order blocks and compact the arrays. */
|
||||||
@ -272,6 +252,9 @@ compact_blocks (void)
|
|||||||
if (i != n_basic_blocks)
|
if (i != n_basic_blocks)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
|
for (; i < last_basic_block; i++)
|
||||||
|
BASIC_BLOCK (i) = NULL;
|
||||||
|
|
||||||
last_basic_block = n_basic_blocks;
|
last_basic_block = n_basic_blocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +266,7 @@ expunge_block (basic_block b)
|
|||||||
unlink_block (b);
|
unlink_block (b);
|
||||||
BASIC_BLOCK (b->index) = NULL;
|
BASIC_BLOCK (b->index) = NULL;
|
||||||
n_basic_blocks--;
|
n_basic_blocks--;
|
||||||
pool_free (bb_pool, b);
|
/* ggc_free (b); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create an edge connecting SRC and DEST with flags FLAGS. Return newly
|
/* Create an edge connecting SRC and DEST with flags FLAGS. Return newly
|
||||||
@ -294,8 +277,7 @@ edge
|
|||||||
unchecked_make_edge (basic_block src, basic_block dst, int flags)
|
unchecked_make_edge (basic_block src, basic_block dst, int flags)
|
||||||
{
|
{
|
||||||
edge e;
|
edge e;
|
||||||
e = pool_alloc (edge_pool);
|
e = ggc_alloc_cleared (sizeof (*e));
|
||||||
memset (e, 0, sizeof (*e));
|
|
||||||
n_edges++;
|
n_edges++;
|
||||||
|
|
||||||
e->succ_next = src->succ;
|
e->succ_next = src->succ;
|
||||||
@ -490,54 +472,56 @@ void
|
|||||||
dump_flow_info (FILE *file)
|
dump_flow_info (FILE *file)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int max_regno = max_reg_num ();
|
|
||||||
basic_block bb;
|
basic_block bb;
|
||||||
static const char * const reg_class_names[] = REG_CLASS_NAMES;
|
static const char * const reg_class_names[] = REG_CLASS_NAMES;
|
||||||
|
|
||||||
fprintf (file, "%d registers.\n", max_regno);
|
|
||||||
if (reg_n_info)
|
if (reg_n_info)
|
||||||
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
|
{
|
||||||
if (REG_N_REFS (i))
|
int max_regno = max_reg_num ();
|
||||||
{
|
fprintf (file, "%d registers.\n", max_regno);
|
||||||
enum reg_class class, altclass;
|
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
|
||||||
|
if (REG_N_REFS (i))
|
||||||
|
{
|
||||||
|
enum reg_class class, altclass;
|
||||||
|
|
||||||
fprintf (file, "\nRegister %d used %d times across %d insns",
|
fprintf (file, "\nRegister %d used %d times across %d insns",
|
||||||
i, REG_N_REFS (i), REG_LIVE_LENGTH (i));
|
i, REG_N_REFS (i), REG_LIVE_LENGTH (i));
|
||||||
if (REG_BASIC_BLOCK (i) >= 0)
|
if (REG_BASIC_BLOCK (i) >= 0)
|
||||||
fprintf (file, " in block %d", REG_BASIC_BLOCK (i));
|
fprintf (file, " in block %d", REG_BASIC_BLOCK (i));
|
||||||
if (REG_N_SETS (i))
|
if (REG_N_SETS (i))
|
||||||
fprintf (file, "; set %d time%s", REG_N_SETS (i),
|
fprintf (file, "; set %d time%s", REG_N_SETS (i),
|
||||||
(REG_N_SETS (i) == 1) ? "" : "s");
|
(REG_N_SETS (i) == 1) ? "" : "s");
|
||||||
if (regno_reg_rtx[i] != NULL && REG_USERVAR_P (regno_reg_rtx[i]))
|
if (regno_reg_rtx[i] != NULL && REG_USERVAR_P (regno_reg_rtx[i]))
|
||||||
fprintf (file, "; user var");
|
fprintf (file, "; user var");
|
||||||
if (REG_N_DEATHS (i) != 1)
|
if (REG_N_DEATHS (i) != 1)
|
||||||
fprintf (file, "; dies in %d places", REG_N_DEATHS (i));
|
fprintf (file, "; dies in %d places", REG_N_DEATHS (i));
|
||||||
if (REG_N_CALLS_CROSSED (i) == 1)
|
if (REG_N_CALLS_CROSSED (i) == 1)
|
||||||
fprintf (file, "; crosses 1 call");
|
fprintf (file, "; crosses 1 call");
|
||||||
else if (REG_N_CALLS_CROSSED (i))
|
else if (REG_N_CALLS_CROSSED (i))
|
||||||
fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i));
|
fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i));
|
||||||
if (regno_reg_rtx[i] != NULL
|
if (regno_reg_rtx[i] != NULL
|
||||||
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
|
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
|
||||||
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
|
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
|
||||||
|
|
||||||
class = reg_preferred_class (i);
|
class = reg_preferred_class (i);
|
||||||
altclass = reg_alternate_class (i);
|
altclass = reg_alternate_class (i);
|
||||||
if (class != GENERAL_REGS || altclass != ALL_REGS)
|
if (class != GENERAL_REGS || altclass != ALL_REGS)
|
||||||
{
|
{
|
||||||
if (altclass == ALL_REGS || class == ALL_REGS)
|
if (altclass == ALL_REGS || class == ALL_REGS)
|
||||||
fprintf (file, "; pref %s", reg_class_names[(int) class]);
|
fprintf (file, "; pref %s", reg_class_names[(int) class]);
|
||||||
else if (altclass == NO_REGS)
|
else if (altclass == NO_REGS)
|
||||||
fprintf (file, "; %s or none", reg_class_names[(int) class]);
|
fprintf (file, "; %s or none", reg_class_names[(int) class]);
|
||||||
else
|
else
|
||||||
fprintf (file, "; pref %s, else %s",
|
fprintf (file, "; pref %s, else %s",
|
||||||
reg_class_names[(int) class],
|
reg_class_names[(int) class],
|
||||||
reg_class_names[(int) altclass]);
|
reg_class_names[(int) altclass]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i]))
|
if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i]))
|
||||||
fprintf (file, "; pointer");
|
fprintf (file, "; pointer");
|
||||||
fprintf (file, ".\n");
|
fprintf (file, ".\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fprintf (file, "\n%d basic blocks, %d edges.\n", n_basic_blocks, n_edges);
|
fprintf (file, "\n%d basic blocks, %d edges.\n", n_basic_blocks, n_edges);
|
||||||
FOR_EACH_BB (bb)
|
FOR_EACH_BB (bb)
|
||||||
@ -546,8 +530,7 @@ dump_flow_info (FILE *file)
|
|||||||
int sum;
|
int sum;
|
||||||
gcov_type lsum;
|
gcov_type lsum;
|
||||||
|
|
||||||
fprintf (file, "\nBasic block %d: first insn %d, last %d, ",
|
fprintf (file, "\nBasic block %d ", bb->index);
|
||||||
bb->index, INSN_UID (BB_HEAD (bb)), INSN_UID (BB_END (bb)));
|
|
||||||
fprintf (file, "prev %d, next %d, ",
|
fprintf (file, "prev %d, next %d, ",
|
||||||
bb->prev_bb->index, bb->next_bb->index);
|
bb->prev_bb->index, bb->next_bb->index);
|
||||||
fprintf (file, "loop_depth %d, count ", bb->loop_depth);
|
fprintf (file, "loop_depth %d, count ", bb->loop_depth);
|
||||||
@ -641,7 +624,8 @@ dump_edge_info (FILE *file, edge e, int do_succ)
|
|||||||
{
|
{
|
||||||
static const char * const bitnames[] = {
|
static const char * const bitnames[] = {
|
||||||
"fallthru", "ab", "abcall", "eh", "fake", "dfs_back",
|
"fallthru", "ab", "abcall", "eh", "fake", "dfs_back",
|
||||||
"can_fallthru", "irreducible", "sibcall", "loop_exit"
|
"can_fallthru", "irreducible", "sibcall", "loop_exit",
|
||||||
|
"true", "false", "exec"
|
||||||
};
|
};
|
||||||
int comma = 0;
|
int comma = 0;
|
||||||
int i, flags = e->flags;
|
int i, flags = e->flags;
|
||||||
@ -825,3 +809,55 @@ debug_bb_n (int n)
|
|||||||
dump_bb (bb, stderr, 0);
|
dump_bb (bb, stderr, 0);
|
||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Dumps cfg related information about basic block BB to FILE. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
dump_cfg_bb_info (FILE *file, basic_block bb)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
bool first = true;
|
||||||
|
static const char * const bb_bitnames[] =
|
||||||
|
{
|
||||||
|
"dirty", "new", "reachable", "visited", "irreducible_loop", "superblock"
|
||||||
|
};
|
||||||
|
const unsigned n_bitnames = sizeof (bb_bitnames) / sizeof (char *);
|
||||||
|
edge e;
|
||||||
|
|
||||||
|
fprintf (file, "Basic block %d", bb->index);
|
||||||
|
for (i = 0; i < n_bitnames; i++)
|
||||||
|
if (bb->flags & (1 << i))
|
||||||
|
{
|
||||||
|
if (first)
|
||||||
|
fprintf (file, " (");
|
||||||
|
else
|
||||||
|
fprintf (file, ", ");
|
||||||
|
first = false;
|
||||||
|
fprintf (file, bb_bitnames[i]);
|
||||||
|
}
|
||||||
|
if (!first)
|
||||||
|
fprintf (file, ")");
|
||||||
|
fprintf (file, "\n");
|
||||||
|
|
||||||
|
fprintf (file, "Predecessors: ");
|
||||||
|
for (e = bb->pred; e; e = e->pred_next)
|
||||||
|
dump_edge_info (file, e, 0);
|
||||||
|
|
||||||
|
fprintf (file, "\nSuccessors: ");
|
||||||
|
for (e = bb->succ; e; e = e->succ_next)
|
||||||
|
dump_edge_info (file, e, 1);
|
||||||
|
fprintf (file, "\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dumps a brief description of cfg to FILE. */
|
||||||
|
|
||||||
|
void
|
||||||
|
brief_dump_cfg (FILE *file)
|
||||||
|
{
|
||||||
|
basic_block bb;
|
||||||
|
|
||||||
|
FOR_EACH_BB (bb)
|
||||||
|
{
|
||||||
|
dump_cfg_bb_info (file, bb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
179
gcc/cfganal.c
179
gcc/cfganal.c
@ -52,7 +52,6 @@ static void flow_dfs_compute_reverse_add_bb (depth_first_search_ds,
|
|||||||
static basic_block flow_dfs_compute_reverse_execute (depth_first_search_ds);
|
static basic_block flow_dfs_compute_reverse_execute (depth_first_search_ds);
|
||||||
static void flow_dfs_compute_reverse_finish (depth_first_search_ds);
|
static void flow_dfs_compute_reverse_finish (depth_first_search_ds);
|
||||||
static void remove_fake_successors (basic_block);
|
static void remove_fake_successors (basic_block);
|
||||||
static bool need_fake_edge_p (rtx);
|
|
||||||
static bool flow_active_insn_p (rtx);
|
static bool flow_active_insn_p (rtx);
|
||||||
|
|
||||||
/* Like active_insn_p, except keep the return value clobber around
|
/* Like active_insn_p, except keep the return value clobber around
|
||||||
@ -242,169 +241,6 @@ set_edge_can_fallthru_flag (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if we need to add fake edge to exit.
|
|
||||||
Helper function for the flow_call_edges_add. */
|
|
||||||
|
|
||||||
static bool
|
|
||||||
need_fake_edge_p (rtx insn)
|
|
||||||
{
|
|
||||||
if (!INSN_P (insn))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ((GET_CODE (insn) == CALL_INSN
|
|
||||||
&& !SIBLING_CALL_P (insn)
|
|
||||||
&& !find_reg_note (insn, REG_NORETURN, NULL)
|
|
||||||
&& !find_reg_note (insn, REG_ALWAYS_RETURN, NULL)
|
|
||||||
&& !CONST_OR_PURE_CALL_P (insn)))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return ((GET_CODE (PATTERN (insn)) == ASM_OPERANDS
|
|
||||||
&& MEM_VOLATILE_P (PATTERN (insn)))
|
|
||||||
|| (GET_CODE (PATTERN (insn)) == PARALLEL
|
|
||||||
&& asm_noperands (insn) != -1
|
|
||||||
&& MEM_VOLATILE_P (XVECEXP (PATTERN (insn), 0, 0)))
|
|
||||||
|| GET_CODE (PATTERN (insn)) == ASM_INPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add fake edges to the function exit for any non constant and non noreturn
|
|
||||||
calls, volatile inline assembly in the bitmap of blocks specified by
|
|
||||||
BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks
|
|
||||||
that were split.
|
|
||||||
|
|
||||||
The goal is to expose cases in which entering a basic block does not imply
|
|
||||||
that all subsequent instructions must be executed. */
|
|
||||||
|
|
||||||
int
|
|
||||||
flow_call_edges_add (sbitmap blocks)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int blocks_split = 0;
|
|
||||||
int last_bb = last_basic_block;
|
|
||||||
bool check_last_block = false;
|
|
||||||
|
|
||||||
if (n_basic_blocks == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (! blocks)
|
|
||||||
check_last_block = true;
|
|
||||||
else
|
|
||||||
check_last_block = TEST_BIT (blocks, EXIT_BLOCK_PTR->prev_bb->index);
|
|
||||||
|
|
||||||
/* In the last basic block, before epilogue generation, there will be
|
|
||||||
a fallthru edge to EXIT. Special care is required if the last insn
|
|
||||||
of the last basic block is a call because make_edge folds duplicate
|
|
||||||
edges, which would result in the fallthru edge also being marked
|
|
||||||
fake, which would result in the fallthru edge being removed by
|
|
||||||
remove_fake_edges, which would result in an invalid CFG.
|
|
||||||
|
|
||||||
Moreover, we can't elide the outgoing fake edge, since the block
|
|
||||||
profiler needs to take this into account in order to solve the minimal
|
|
||||||
spanning tree in the case that the call doesn't return.
|
|
||||||
|
|
||||||
Handle this by adding a dummy instruction in a new last basic block. */
|
|
||||||
if (check_last_block)
|
|
||||||
{
|
|
||||||
basic_block bb = EXIT_BLOCK_PTR->prev_bb;
|
|
||||||
rtx insn = BB_END (bb);
|
|
||||||
|
|
||||||
/* Back up past insns that must be kept in the same block as a call. */
|
|
||||||
while (insn != BB_HEAD (bb)
|
|
||||||
&& keep_with_call_p (insn))
|
|
||||||
insn = PREV_INSN (insn);
|
|
||||||
|
|
||||||
if (need_fake_edge_p (insn))
|
|
||||||
{
|
|
||||||
edge e;
|
|
||||||
|
|
||||||
for (e = bb->succ; e; e = e->succ_next)
|
|
||||||
if (e->dest == EXIT_BLOCK_PTR)
|
|
||||||
{
|
|
||||||
insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
|
|
||||||
commit_edge_insertions ();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now add fake edges to the function exit for any non constant
|
|
||||||
calls since there is no way that we can determine if they will
|
|
||||||
return or not... */
|
|
||||||
|
|
||||||
for (i = 0; i < last_bb; i++)
|
|
||||||
{
|
|
||||||
basic_block bb = BASIC_BLOCK (i);
|
|
||||||
rtx libcall_end = NULL_RTX;
|
|
||||||
rtx insn;
|
|
||||||
rtx prev_insn;
|
|
||||||
|
|
||||||
if (!bb)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (blocks && !TEST_BIT (blocks, i))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (insn = BB_END (bb); ; insn = prev_insn)
|
|
||||||
{
|
|
||||||
prev_insn = PREV_INSN (insn);
|
|
||||||
if (need_fake_edge_p (insn))
|
|
||||||
{
|
|
||||||
edge e;
|
|
||||||
rtx split_at_insn = insn;
|
|
||||||
|
|
||||||
/* Don't split libcalls. */
|
|
||||||
if (libcall_end)
|
|
||||||
split_at_insn = libcall_end;
|
|
||||||
|
|
||||||
/* Don't split the block between a call and an insn that should
|
|
||||||
remain in the same block as the call. */
|
|
||||||
else if (GET_CODE (insn) == CALL_INSN)
|
|
||||||
while (split_at_insn != BB_END (bb)
|
|
||||||
&& keep_with_call_p (NEXT_INSN (split_at_insn)))
|
|
||||||
split_at_insn = NEXT_INSN (split_at_insn);
|
|
||||||
|
|
||||||
/* The handling above of the final block before the epilogue
|
|
||||||
should be enough to verify that there is no edge to the exit
|
|
||||||
block in CFG already. Calling make_edge in such case would
|
|
||||||
cause us to mark that edge as fake and remove it later. */
|
|
||||||
|
|
||||||
#ifdef ENABLE_CHECKING
|
|
||||||
if (split_at_insn == BB_END (bb))
|
|
||||||
for (e = bb->succ; e; e = e->succ_next)
|
|
||||||
if (e->dest == EXIT_BLOCK_PTR)
|
|
||||||
abort ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Note that the following may create a new basic block
|
|
||||||
and renumber the existing basic blocks. */
|
|
||||||
if (split_at_insn != BB_END (bb))
|
|
||||||
{
|
|
||||||
e = split_block (bb, split_at_insn);
|
|
||||||
if (e)
|
|
||||||
blocks_split++;
|
|
||||||
}
|
|
||||||
|
|
||||||
make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Watch out for REG_LIBCALL/REG_RETVAL notes so that we know
|
|
||||||
whether we are currently in a libcall or not. Remember that
|
|
||||||
we are scanning backwards! */
|
|
||||||
if (find_reg_note (insn, REG_RETVAL, NULL_RTX))
|
|
||||||
libcall_end = insn;
|
|
||||||
if (find_reg_note (insn, REG_LIBCALL, NULL_RTX))
|
|
||||||
libcall_end = NULL_RTX;
|
|
||||||
|
|
||||||
if (insn == BB_HEAD (bb))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (blocks_split)
|
|
||||||
verify_flow_info ();
|
|
||||||
|
|
||||||
return blocks_split;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find unreachable blocks. An unreachable block will have 0 in
|
/* Find unreachable blocks. An unreachable block will have 0 in
|
||||||
the reachable bit in block->flags. A nonzero value indicates the
|
the reachable bit in block->flags. A nonzero value indicates the
|
||||||
block is reachable. */
|
block is reachable. */
|
||||||
@ -603,6 +439,21 @@ verify_edge_list (FILE *f, struct edge_list *elist)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Given PRED and SUCC blocks, return the edge which connects the blocks.
|
||||||
|
If no such edge exists, return NULL. */
|
||||||
|
|
||||||
|
edge
|
||||||
|
find_edge (basic_block pred, basic_block succ)
|
||||||
|
{
|
||||||
|
edge e;
|
||||||
|
|
||||||
|
for (e = pred->succ; e; e = e->succ_next)
|
||||||
|
if (e->dest == succ)
|
||||||
|
return e;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* This routine will determine what, if any, edge there is between
|
/* This routine will determine what, if any, edge there is between
|
||||||
a specified predecessor and successor. */
|
a specified predecessor and successor. */
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ make_label_edge (sbitmap *edge_cache, basic_block src, rtx label, int flags)
|
|||||||
/* Create the edges generated by INSN in REGION. */
|
/* Create the edges generated by INSN in REGION. */
|
||||||
|
|
||||||
void
|
void
|
||||||
make_eh_edge (sbitmap *edge_cache, basic_block src, rtx insn)
|
rtl_make_eh_edge (sbitmap *edge_cache, basic_block src, rtx insn)
|
||||||
{
|
{
|
||||||
int is_call = GET_CODE (insn) == CALL_INSN ? EDGE_ABNORMAL_CALL : 0;
|
int is_call = GET_CODE (insn) == CALL_INSN ? EDGE_ABNORMAL_CALL : 0;
|
||||||
rtx handlers, i;
|
rtx handlers, i;
|
||||||
@ -325,7 +325,7 @@ make_edges (rtx label_value_list, basic_block min, basic_block max, int update_p
|
|||||||
|
|
||||||
/* Recognize exception handling placeholders. */
|
/* Recognize exception handling placeholders. */
|
||||||
if (GET_CODE (PATTERN (insn)) == RESX)
|
if (GET_CODE (PATTERN (insn)) == RESX)
|
||||||
make_eh_edge (edge_cache, bb, insn);
|
rtl_make_eh_edge (edge_cache, bb, insn);
|
||||||
|
|
||||||
/* Recognize a non-local goto as a branch outside the
|
/* Recognize a non-local goto as a branch outside the
|
||||||
current function. */
|
current function. */
|
||||||
@ -405,7 +405,7 @@ make_edges (rtx label_value_list, basic_block min, basic_block max, int update_p
|
|||||||
else if (code == CALL_INSN || flag_non_call_exceptions)
|
else if (code == CALL_INSN || flag_non_call_exceptions)
|
||||||
{
|
{
|
||||||
/* Add any appropriate EH edges. */
|
/* Add any appropriate EH edges. */
|
||||||
make_eh_edge (edge_cache, bb, insn);
|
rtl_make_eh_edge (edge_cache, bb, insn);
|
||||||
|
|
||||||
if (code == CALL_INSN && nonlocal_goto_handler_labels)
|
if (code == CALL_INSN && nonlocal_goto_handler_labels)
|
||||||
{
|
{
|
||||||
@ -610,7 +610,7 @@ find_basic_blocks (rtx f, int nregs ATTRIBUTE_UNUSED,
|
|||||||
FOR_EACH_BB (bb)
|
FOR_EACH_BB (bb)
|
||||||
bb->aux = NULL;
|
bb->aux = NULL;
|
||||||
|
|
||||||
VARRAY_FREE (basic_block_info);
|
basic_block_info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
n_basic_blocks = count_basic_blocks (f);
|
n_basic_blocks = count_basic_blocks (f);
|
||||||
|
@ -1368,7 +1368,7 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2)
|
|||||||
/* The labels should never be the same rtx. If they really are same
|
/* The labels should never be the same rtx. If they really are same
|
||||||
the jump tables are same too. So disable crossjumping of blocks BB1
|
the jump tables are same too. So disable crossjumping of blocks BB1
|
||||||
and BB2 because when deleting the common insns in the end of BB1
|
and BB2 because when deleting the common insns in the end of BB1
|
||||||
by delete_block () the jump table would be deleted too. */
|
by delete_basic_block () the jump table would be deleted too. */
|
||||||
/* If LABEL2 is referenced in BB1->END do not do anything
|
/* If LABEL2 is referenced in BB1->END do not do anything
|
||||||
because we would loose information when replacing
|
because we would loose information when replacing
|
||||||
LABEL1 by LABEL2 and then LABEL2 by LABEL1 in BB1->END. */
|
LABEL1 by LABEL2 and then LABEL2 by LABEL1 in BB1->END. */
|
||||||
@ -1501,6 +1501,8 @@ try_crossjump_to_edge (int mode, edge e1, edge e2)
|
|||||||
rtx newpos1, newpos2;
|
rtx newpos1, newpos2;
|
||||||
edge s;
|
edge s;
|
||||||
|
|
||||||
|
newpos1 = newpos2 = NULL_RTX;
|
||||||
|
|
||||||
/* If we have partitioned hot/cold basic blocks, it is a bad idea
|
/* If we have partitioned hot/cold basic blocks, it is a bad idea
|
||||||
to try this optimization. */
|
to try this optimization. */
|
||||||
|
|
||||||
@ -2033,6 +2035,32 @@ delete_unreachable_blocks (void)
|
|||||||
tidy_fallthru_edges ();
|
tidy_fallthru_edges ();
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Merges sequential blocks if possible. */
|
||||||
|
|
||||||
|
bool
|
||||||
|
merge_seq_blocks (void)
|
||||||
|
{
|
||||||
|
basic_block bb;
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
for (bb = ENTRY_BLOCK_PTR->next_bb; bb != EXIT_BLOCK_PTR; )
|
||||||
|
{
|
||||||
|
if (bb->succ
|
||||||
|
&& !bb->succ->succ_next
|
||||||
|
&& can_merge_blocks_p (bb, bb->succ->dest))
|
||||||
|
{
|
||||||
|
/* Merge the blocks and retry. */
|
||||||
|
merge_blocks (bb, bb->succ->dest);
|
||||||
|
changed = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
bb = bb->next_bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
/* Tidy the CFG by deleting unreachable code and whatnot. */
|
/* Tidy the CFG by deleting unreachable code and whatnot. */
|
||||||
|
|
||||||
|
183
gcc/cfghooks.c
183
gcc/cfghooks.c
@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "rtl.h"
|
#include "rtl.h"
|
||||||
#include "basic-block.h"
|
#include "basic-block.h"
|
||||||
|
#include "tree-flow.h"
|
||||||
#include "timevar.h"
|
#include "timevar.h"
|
||||||
#include "toplev.h"
|
#include "toplev.h"
|
||||||
|
|
||||||
@ -46,6 +47,22 @@ cfg_layout_rtl_register_cfg_hooks (void)
|
|||||||
cfg_hooks = &cfg_layout_rtl_cfg_hooks;
|
cfg_hooks = &cfg_layout_rtl_cfg_hooks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialization of functions specific to the tree IR. */
|
||||||
|
|
||||||
|
void
|
||||||
|
tree_register_cfg_hooks (void)
|
||||||
|
{
|
||||||
|
cfg_hooks = &tree_cfg_hooks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns current ir type (rtl = 0, trees = 1). */
|
||||||
|
|
||||||
|
int
|
||||||
|
ir_type (void)
|
||||||
|
{
|
||||||
|
return cfg_hooks == &tree_cfg_hooks ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Verify the CFG consistency.
|
/* Verify the CFG consistency.
|
||||||
|
|
||||||
Currently it does following: checks edge and basic block list correctness
|
Currently it does following: checks edge and basic block list correctness
|
||||||
@ -246,10 +263,10 @@ dump_bb (basic_block bb, FILE *outf, int indent)
|
|||||||
be equivalent to E in the case of duplicate edges being removed) or NULL
|
be equivalent to E in the case of duplicate edges being removed) or NULL
|
||||||
if edge is not easily redirectable for whatever reason. */
|
if edge is not easily redirectable for whatever reason. */
|
||||||
|
|
||||||
bool
|
edge
|
||||||
redirect_edge_and_branch (edge e, basic_block dest)
|
redirect_edge_and_branch (edge e, basic_block dest)
|
||||||
{
|
{
|
||||||
bool ret;
|
edge ret;
|
||||||
|
|
||||||
if (!cfg_hooks->redirect_edge_and_branch)
|
if (!cfg_hooks->redirect_edge_and_branch)
|
||||||
internal_error ("%s does not support redirect_edge_and_branch.",
|
internal_error ("%s does not support redirect_edge_and_branch.",
|
||||||
@ -286,7 +303,6 @@ edge
|
|||||||
split_block (basic_block bb, void *i)
|
split_block (basic_block bb, void *i)
|
||||||
{
|
{
|
||||||
basic_block new_bb;
|
basic_block new_bb;
|
||||||
edge e;
|
|
||||||
|
|
||||||
if (!cfg_hooks->split_block)
|
if (!cfg_hooks->split_block)
|
||||||
internal_error ("%s does not support split_block.", cfg_hooks->name);
|
internal_error ("%s does not support split_block.", cfg_hooks->name);
|
||||||
@ -305,11 +321,7 @@ split_block (basic_block bb, void *i)
|
|||||||
set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
|
set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
|
||||||
}
|
}
|
||||||
|
|
||||||
e = make_edge (bb, new_bb, EDGE_FALLTHRU);
|
return make_edge (bb, new_bb, EDGE_FALLTHRU);
|
||||||
e->probability = REG_BR_PROB_BASE;
|
|
||||||
e->count = bb->count;
|
|
||||||
|
|
||||||
return e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Splits block BB just after labels. The newly created edge is returned. */
|
/* Splits block BB just after labels. The newly created edge is returned. */
|
||||||
@ -464,6 +476,24 @@ can_merge_blocks_p (basic_block bb1, basic_block bb2)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
predict_edge (edge e, enum br_predictor predictor, int probability)
|
||||||
|
{
|
||||||
|
if (!cfg_hooks->predict_edge)
|
||||||
|
internal_error ("%s does not support predict_edge.", cfg_hooks->name);
|
||||||
|
|
||||||
|
cfg_hooks->predict_edge (e, predictor, probability);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
predicted_by_p (basic_block bb, enum br_predictor predictor)
|
||||||
|
{
|
||||||
|
if (!cfg_hooks->predict_edge)
|
||||||
|
internal_error ("%s does not support predicted_by_p.", cfg_hooks->name);
|
||||||
|
|
||||||
|
return cfg_hooks->predicted_by_p (bb, predictor);
|
||||||
|
}
|
||||||
|
|
||||||
/* Merges basic block B into basic block A. */
|
/* Merges basic block B into basic block A. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -605,3 +635,140 @@ tidy_fallthru_edges (void)
|
|||||||
tidy_fallthru_edge (s);
|
tidy_fallthru_edge (s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns true if we can duplicate basic block BB. */
|
||||||
|
|
||||||
|
bool
|
||||||
|
can_duplicate_block_p (basic_block bb)
|
||||||
|
{
|
||||||
|
edge e;
|
||||||
|
|
||||||
|
if (!cfg_hooks->can_duplicate_block_p)
|
||||||
|
internal_error ("%s does not support can_duplicate_block_p.",
|
||||||
|
cfg_hooks->name);
|
||||||
|
|
||||||
|
if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* Duplicating fallthru block to exit would require adding a jump
|
||||||
|
and splitting the real last BB. */
|
||||||
|
for (e = bb->succ; e; e = e->succ_next)
|
||||||
|
if (e->dest == EXIT_BLOCK_PTR && e->flags & EDGE_FALLTHRU)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return cfg_hooks->can_duplicate_block_p (bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Duplicates basic block BB and redirects edge E to it. Returns the
|
||||||
|
new basic block. */
|
||||||
|
|
||||||
|
basic_block
|
||||||
|
duplicate_block (basic_block bb, edge e)
|
||||||
|
{
|
||||||
|
edge s, n;
|
||||||
|
basic_block new_bb;
|
||||||
|
gcov_type new_count = e ? e->count : 0;
|
||||||
|
|
||||||
|
if (!cfg_hooks->duplicate_block)
|
||||||
|
internal_error ("%s does not support duplicate_block.",
|
||||||
|
cfg_hooks->name);
|
||||||
|
|
||||||
|
if (bb->count < new_count)
|
||||||
|
new_count = bb->count;
|
||||||
|
if (!bb->pred)
|
||||||
|
abort ();
|
||||||
|
#ifdef ENABLE_CHECKING
|
||||||
|
if (!can_duplicate_block_p (bb))
|
||||||
|
abort ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
new_bb = cfg_hooks->duplicate_block (bb);
|
||||||
|
|
||||||
|
new_bb->loop_depth = bb->loop_depth;
|
||||||
|
new_bb->flags = bb->flags;
|
||||||
|
for (s = bb->succ; s; s = s->succ_next)
|
||||||
|
{
|
||||||
|
/* Since we are creating edges from a new block to successors
|
||||||
|
of another block (which therefore are known to be disjoint), there
|
||||||
|
is no need to actually check for duplicated edges. */
|
||||||
|
n = unchecked_make_edge (new_bb, s->dest, s->flags);
|
||||||
|
n->probability = s->probability;
|
||||||
|
if (e && bb->count)
|
||||||
|
{
|
||||||
|
/* Take care for overflows! */
|
||||||
|
n->count = s->count * (new_count * 10000 / bb->count) / 10000;
|
||||||
|
s->count -= n->count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
n->count = s->count;
|
||||||
|
n->aux = s->aux;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e)
|
||||||
|
{
|
||||||
|
new_bb->count = new_count;
|
||||||
|
bb->count -= new_count;
|
||||||
|
|
||||||
|
new_bb->frequency = EDGE_FREQUENCY (e);
|
||||||
|
bb->frequency -= EDGE_FREQUENCY (e);
|
||||||
|
|
||||||
|
redirect_edge_and_branch_force (e, new_bb);
|
||||||
|
|
||||||
|
if (bb->count < 0)
|
||||||
|
bb->count = 0;
|
||||||
|
if (bb->frequency < 0)
|
||||||
|
bb->frequency = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
new_bb->count = bb->count;
|
||||||
|
new_bb->frequency = bb->frequency;
|
||||||
|
}
|
||||||
|
|
||||||
|
new_bb->rbi->original = bb;
|
||||||
|
bb->rbi->copy = new_bb;
|
||||||
|
|
||||||
|
return new_bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return 1 if BB ends with a call, possibly followed by some
|
||||||
|
instructions that must stay with the call, 0 otherwise. */
|
||||||
|
|
||||||
|
bool
|
||||||
|
block_ends_with_call_p (basic_block bb)
|
||||||
|
{
|
||||||
|
if (!cfg_hooks->block_ends_with_call_p)
|
||||||
|
internal_error ("%s does not support block_ends_with_call_p", cfg_hooks->name);
|
||||||
|
|
||||||
|
return (cfg_hooks->block_ends_with_call_p) (bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return 1 if BB ends with a conditional branch, 0 otherwise. */
|
||||||
|
|
||||||
|
bool
|
||||||
|
block_ends_with_condjump_p (basic_block bb)
|
||||||
|
{
|
||||||
|
if (!cfg_hooks->block_ends_with_condjump_p)
|
||||||
|
internal_error ("%s does not support block_ends_with_condjump_p",
|
||||||
|
cfg_hooks->name);
|
||||||
|
|
||||||
|
return (cfg_hooks->block_ends_with_condjump_p) (bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add fake edges to the function exit for any non constant and non noreturn
|
||||||
|
calls, volatile inline assembly in the bitmap of blocks specified by
|
||||||
|
BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks
|
||||||
|
that were split.
|
||||||
|
|
||||||
|
The goal is to expose cases in which entering a basic block does not imply
|
||||||
|
that all subsequent instructions must be executed. */
|
||||||
|
|
||||||
|
int
|
||||||
|
flow_call_edges_add (sbitmap blocks)
|
||||||
|
{
|
||||||
|
if (!cfg_hooks->flow_call_edges_add)
|
||||||
|
internal_error ("%s does not support flow_call_edges_add",
|
||||||
|
cfg_hooks->name);
|
||||||
|
|
||||||
|
return (cfg_hooks->flow_call_edges_add) (blocks);
|
||||||
|
}
|
||||||
|
@ -37,9 +37,10 @@ struct cfg_hooks
|
|||||||
basic_block (*create_basic_block) (void *head, void *end, basic_block after);
|
basic_block (*create_basic_block) (void *head, void *end, basic_block after);
|
||||||
|
|
||||||
/* Redirect edge E to the given basic block B and update underlying program
|
/* Redirect edge E to the given basic block B and update underlying program
|
||||||
representation. Returns false when edge is not easily redirectable for
|
representation. Returns edge representing redirected branch (that may not
|
||||||
whatever reason. */
|
be equivalent to E in the case of duplicate edges being removed) or NULL
|
||||||
bool (*redirect_edge_and_branch) (edge e, basic_block b);
|
if edge is not easily redirectable for whatever reason. */
|
||||||
|
edge (*redirect_edge_and_branch) (edge e, basic_block b);
|
||||||
|
|
||||||
/* Same as the above but allows redirecting of fallthru edges. In that case
|
/* Same as the above but allows redirecting of fallthru edges. In that case
|
||||||
newly created forwarder basic block is returned. It aborts when called
|
newly created forwarder basic block is returned. It aborts when called
|
||||||
@ -62,6 +63,19 @@ struct cfg_hooks
|
|||||||
/* Merge blocks A and B. */
|
/* Merge blocks A and B. */
|
||||||
void (*merge_blocks) (basic_block a, basic_block b);
|
void (*merge_blocks) (basic_block a, basic_block b);
|
||||||
|
|
||||||
|
/* Predict edge E using PREDICTOR to given PROBABILITY. */
|
||||||
|
void (*predict_edge) (edge e, enum br_predictor predictor, int probability);
|
||||||
|
|
||||||
|
/* Return true if the one of outgoing edges is already predicted by
|
||||||
|
PREDICTOR. */
|
||||||
|
bool (*predicted_by_p) (basic_block bb, enum br_predictor predictor);
|
||||||
|
|
||||||
|
/* Return true when block A can be duplicated. */
|
||||||
|
bool (*can_duplicate_block_p) (basic_block a);
|
||||||
|
|
||||||
|
/* Duplicate block A. */
|
||||||
|
basic_block (*duplicate_block) (basic_block a);
|
||||||
|
|
||||||
/* Higher level functions representable by primitive operations above if
|
/* Higher level functions representable by primitive operations above if
|
||||||
we didn't have some oddities in RTL and Tree representations. */
|
we didn't have some oddities in RTL and Tree representations. */
|
||||||
basic_block (*split_edge) (edge);
|
basic_block (*split_edge) (edge);
|
||||||
@ -69,11 +83,28 @@ struct cfg_hooks
|
|||||||
|
|
||||||
/* Tries to make the edge fallthru. */
|
/* Tries to make the edge fallthru. */
|
||||||
void (*tidy_fallthru_edge) (edge);
|
void (*tidy_fallthru_edge) (edge);
|
||||||
|
|
||||||
|
/* Say whether a block ends with a call, possibly followed by some
|
||||||
|
other code that must stay with the call. */
|
||||||
|
bool (*block_ends_with_call_p) (basic_block);
|
||||||
|
|
||||||
|
/* Say whether a block ends with a conditional branch. Switches
|
||||||
|
and unconditional branches do not qualify. */
|
||||||
|
bool (*block_ends_with_condjump_p) (basic_block);
|
||||||
|
|
||||||
|
/* Add fake edges to the function exit for any non constant and non noreturn
|
||||||
|
calls, volatile inline assembly in the bitmap of blocks specified by
|
||||||
|
BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks
|
||||||
|
that were split.
|
||||||
|
|
||||||
|
The goal is to expose cases in which entering a basic block does not imply
|
||||||
|
that all subsequent instructions must be executed. */
|
||||||
|
int (*flow_call_edges_add) (sbitmap);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void verify_flow_info (void);
|
extern void verify_flow_info (void);
|
||||||
extern void dump_bb (basic_block, FILE *, int);
|
extern void dump_bb (basic_block, FILE *, int);
|
||||||
extern bool redirect_edge_and_branch (edge, basic_block);
|
extern edge redirect_edge_and_branch (edge, basic_block);
|
||||||
extern basic_block redirect_edge_and_branch_force (edge, basic_block);
|
extern basic_block redirect_edge_and_branch_force (edge, basic_block);
|
||||||
extern edge split_block (basic_block, void *);
|
extern edge split_block (basic_block, void *);
|
||||||
extern edge split_block_after_labels (basic_block);
|
extern edge split_block_after_labels (basic_block);
|
||||||
@ -88,13 +119,23 @@ extern edge make_forwarder_block (basic_block, bool (*)(edge),
|
|||||||
void (*) (basic_block));
|
void (*) (basic_block));
|
||||||
extern void tidy_fallthru_edge (edge);
|
extern void tidy_fallthru_edge (edge);
|
||||||
extern void tidy_fallthru_edges (void);
|
extern void tidy_fallthru_edges (void);
|
||||||
|
extern void predict_edge (edge e, enum br_predictor predictor, int probability);
|
||||||
|
extern bool predicted_by_p (basic_block bb, enum br_predictor predictor);
|
||||||
|
extern bool can_duplicate_block_p (basic_block);
|
||||||
|
extern basic_block duplicate_block (basic_block, edge);
|
||||||
|
extern bool block_ends_with_call_p (basic_block bb);
|
||||||
|
extern bool block_ends_with_condjump_p (basic_block bb);
|
||||||
|
extern int flow_call_edges_add (sbitmap);
|
||||||
|
|
||||||
/* Hooks containers. */
|
/* Hooks containers. */
|
||||||
|
extern struct cfg_hooks tree_cfg_hooks;
|
||||||
extern struct cfg_hooks rtl_cfg_hooks;
|
extern struct cfg_hooks rtl_cfg_hooks;
|
||||||
extern struct cfg_hooks cfg_layout_rtl_cfg_hooks;
|
extern struct cfg_hooks cfg_layout_rtl_cfg_hooks;
|
||||||
|
|
||||||
/* Declarations. */
|
/* Declarations. */
|
||||||
|
extern int ir_type (void);
|
||||||
extern void rtl_register_cfg_hooks (void);
|
extern void rtl_register_cfg_hooks (void);
|
||||||
extern void cfg_layout_rtl_register_cfg_hooks (void);
|
extern void cfg_layout_rtl_register_cfg_hooks (void);
|
||||||
|
extern void tree_register_cfg_hooks (void);
|
||||||
|
|
||||||
#endif /* GCC_CFGHOOKS_H */
|
#endif /* GCC_CFGHOOKS_H */
|
||||||
|
122
gcc/cfglayout.c
122
gcc/cfglayout.c
@ -41,8 +41,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
in this obstack, and all are freed at the end of the function. */
|
in this obstack, and all are freed at the end of the function. */
|
||||||
extern struct obstack flow_obstack;
|
extern struct obstack flow_obstack;
|
||||||
|
|
||||||
alloc_pool cfg_layout_pool;
|
|
||||||
|
|
||||||
/* Holds the interesting trailing notes for the function. */
|
/* Holds the interesting trailing notes for the function. */
|
||||||
rtx cfg_layout_function_footer, cfg_layout_function_header;
|
rtx cfg_layout_function_footer, cfg_layout_function_header;
|
||||||
|
|
||||||
@ -311,10 +309,14 @@ insn_locators_initialize (void)
|
|||||||
switch (NOTE_LINE_NUMBER (insn))
|
switch (NOTE_LINE_NUMBER (insn))
|
||||||
{
|
{
|
||||||
case NOTE_INSN_BLOCK_BEG:
|
case NOTE_INSN_BLOCK_BEG:
|
||||||
|
if (cfun->dont_emit_block_notes)
|
||||||
|
abort ();
|
||||||
block = NOTE_BLOCK (insn);
|
block = NOTE_BLOCK (insn);
|
||||||
delete_insn (insn);
|
delete_insn (insn);
|
||||||
break;
|
break;
|
||||||
case NOTE_INSN_BLOCK_END:
|
case NOTE_INSN_BLOCK_END:
|
||||||
|
if (cfun->dont_emit_block_notes)
|
||||||
|
abort ();
|
||||||
block = BLOCK_SUPERCONTEXT (block);
|
block = BLOCK_SUPERCONTEXT (block);
|
||||||
if (block && TREE_CODE (block) == FUNCTION_DECL)
|
if (block && TREE_CODE (block) == FUNCTION_DECL)
|
||||||
block = 0;
|
block = 0;
|
||||||
@ -329,11 +331,17 @@ insn_locators_initialize (void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cfun->dont_emit_block_notes)
|
||||||
|
check_block_change (insn, &block);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tag the blocks with a depth number so that change_scope can find
|
/* Tag the blocks with a depth number so that change_scope can find
|
||||||
the common parent easily. */
|
the common parent easily. */
|
||||||
set_block_levels (DECL_INITIAL (cfun->decl), 0);
|
set_block_levels (DECL_INITIAL (cfun->decl), 0);
|
||||||
|
|
||||||
|
if (cfun->dont_emit_block_notes)
|
||||||
|
free_block_changes ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For each lexical block, set BLOCK_NUMBER to the depth at which it is
|
/* For each lexical block, set BLOCK_NUMBER to the depth at which it is
|
||||||
@ -771,7 +779,7 @@ fixup_reorder_chain (void)
|
|||||||
nb = force_nonfallthru (e_fall);
|
nb = force_nonfallthru (e_fall);
|
||||||
if (nb)
|
if (nb)
|
||||||
{
|
{
|
||||||
cfg_layout_initialize_rbi (nb);
|
initialize_bb_rbi (nb);
|
||||||
nb->rbi->visited = 1;
|
nb->rbi->visited = 1;
|
||||||
nb->rbi->next = bb->rbi->next;
|
nb->rbi->next = bb->rbi->next;
|
||||||
bb->rbi->next = nb;
|
bb->rbi->next = nb;
|
||||||
@ -933,20 +941,15 @@ fixup_fallthru_exit_predecessor (void)
|
|||||||
|
|
||||||
/* Return true in case it is possible to duplicate the basic block BB. */
|
/* Return true in case it is possible to duplicate the basic block BB. */
|
||||||
|
|
||||||
|
/* We do not want to declare the function in a header file, since it should
|
||||||
|
only be used through the cfghooks interface, and we do not want to move
|
||||||
|
it to cfgrtl.c since it would require also moving quite a lot of related
|
||||||
|
code. */
|
||||||
|
extern bool cfg_layout_can_duplicate_bb_p (basic_block);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cfg_layout_can_duplicate_bb_p (basic_block bb)
|
cfg_layout_can_duplicate_bb_p (basic_block bb)
|
||||||
{
|
{
|
||||||
edge s;
|
|
||||||
|
|
||||||
if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Duplicating fallthru block to exit would require adding a jump
|
|
||||||
and splitting the real last BB. */
|
|
||||||
for (s = bb->succ; s; s = s->succ_next)
|
|
||||||
if (s->dest == EXIT_BLOCK_PTR && s->flags & EDGE_FALLTHRU)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Do not attempt to duplicate tablejumps, as we need to unshare
|
/* Do not attempt to duplicate tablejumps, as we need to unshare
|
||||||
the dispatch table. This is difficult to do, as the instructions
|
the dispatch table. This is difficult to do, as the instructions
|
||||||
computing jump destination may be hoisted outside the basic block. */
|
computing jump destination may be hoisted outside the basic block. */
|
||||||
@ -1062,26 +1065,19 @@ duplicate_insn_chain (rtx from, rtx to)
|
|||||||
delete_insn (last);
|
delete_insn (last);
|
||||||
return insn;
|
return insn;
|
||||||
}
|
}
|
||||||
/* Create a duplicate of the basic block BB and redirect edge E into it.
|
/* Create a duplicate of the basic block BB. */
|
||||||
If E is not specified, BB is just copied, but updating the frequencies
|
|
||||||
etc. is left to the caller. */
|
/* We do not want to declare the function in a header file, since it should
|
||||||
|
only be used through the cfghooks interface, and we do not want to move
|
||||||
|
it to cfgrtl.c since it would require also moving quite a lot of related
|
||||||
|
code. */
|
||||||
|
extern basic_block cfg_layout_duplicate_bb (basic_block);
|
||||||
|
|
||||||
basic_block
|
basic_block
|
||||||
cfg_layout_duplicate_bb (basic_block bb, edge e)
|
cfg_layout_duplicate_bb (basic_block bb)
|
||||||
{
|
{
|
||||||
rtx insn;
|
rtx insn;
|
||||||
edge s, n;
|
|
||||||
basic_block new_bb;
|
basic_block new_bb;
|
||||||
gcov_type new_count = e ? e->count : 0;
|
|
||||||
|
|
||||||
if (bb->count < new_count)
|
|
||||||
new_count = bb->count;
|
|
||||||
if (!bb->pred)
|
|
||||||
abort ();
|
|
||||||
#ifdef ENABLE_CHECKING
|
|
||||||
if (!cfg_layout_can_duplicate_bb_p (bb))
|
|
||||||
abort ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
insn = duplicate_insn_chain (BB_HEAD (bb), BB_END (bb));
|
insn = duplicate_insn_chain (BB_HEAD (bb), BB_END (bb));
|
||||||
new_bb = create_basic_block (insn,
|
new_bb = create_basic_block (insn,
|
||||||
@ -1116,62 +1112,9 @@ cfg_layout_duplicate_bb (basic_block bb, edge e)
|
|||||||
COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end);
|
COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
new_bb->loop_depth = bb->loop_depth;
|
|
||||||
new_bb->flags = bb->flags;
|
|
||||||
for (s = bb->succ; s; s = s->succ_next)
|
|
||||||
{
|
|
||||||
/* Since we are creating edges from a new block to successors
|
|
||||||
of another block (which therefore are known to be disjoint), there
|
|
||||||
is no need to actually check for duplicated edges. */
|
|
||||||
n = unchecked_make_edge (new_bb, s->dest, s->flags);
|
|
||||||
n->probability = s->probability;
|
|
||||||
if (e && bb->count)
|
|
||||||
{
|
|
||||||
/* Take care for overflows! */
|
|
||||||
n->count = s->count * (new_count * 10000 / bb->count) / 10000;
|
|
||||||
s->count -= n->count;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
n->count = s->count;
|
|
||||||
n->aux = s->aux;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e)
|
|
||||||
{
|
|
||||||
new_bb->count = new_count;
|
|
||||||
bb->count -= new_count;
|
|
||||||
|
|
||||||
new_bb->frequency = EDGE_FREQUENCY (e);
|
|
||||||
bb->frequency -= EDGE_FREQUENCY (e);
|
|
||||||
|
|
||||||
redirect_edge_and_branch_force (e, new_bb);
|
|
||||||
|
|
||||||
if (bb->count < 0)
|
|
||||||
bb->count = 0;
|
|
||||||
if (bb->frequency < 0)
|
|
||||||
bb->frequency = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
new_bb->count = bb->count;
|
|
||||||
new_bb->frequency = bb->frequency;
|
|
||||||
}
|
|
||||||
|
|
||||||
new_bb->rbi->original = bb;
|
|
||||||
bb->rbi->copy = new_bb;
|
|
||||||
|
|
||||||
return new_bb;
|
return new_bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cfg_layout_initialize_rbi (basic_block bb)
|
|
||||||
{
|
|
||||||
if (bb->rbi)
|
|
||||||
abort ();
|
|
||||||
bb->rbi = pool_alloc (cfg_layout_pool);
|
|
||||||
memset (bb->rbi, 0, sizeof (struct reorder_block_def));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Main entry point to this module - initialize the data structures for
|
/* Main entry point to this module - initialize the data structures for
|
||||||
CFG layout changes. It keeps LOOPS up-to-date if not null. */
|
CFG layout changes. It keeps LOOPS up-to-date if not null. */
|
||||||
|
|
||||||
@ -1180,13 +1123,12 @@ cfg_layout_initialize (void)
|
|||||||
{
|
{
|
||||||
basic_block bb;
|
basic_block bb;
|
||||||
|
|
||||||
/* Our algorithm depends on fact that there are now dead jumptables
|
/* Our algorithm depends on fact that there are no dead jumptables
|
||||||
around the code. */
|
around the code. */
|
||||||
cfg_layout_pool =
|
alloc_rbi_pool ();
|
||||||
create_alloc_pool ("cfg layout pool", sizeof (struct reorder_block_def),
|
|
||||||
n_basic_blocks + 2);
|
|
||||||
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
|
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
|
||||||
cfg_layout_initialize_rbi (bb);
|
initialize_bb_rbi (bb);
|
||||||
|
|
||||||
cfg_layout_rtl_register_cfg_hooks ();
|
cfg_layout_rtl_register_cfg_hooks ();
|
||||||
|
|
||||||
@ -1242,7 +1184,7 @@ cfg_layout_finalize (void)
|
|||||||
verify_insn_chain ();
|
verify_insn_chain ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
free_alloc_pool (cfg_layout_pool);
|
free_rbi_pool ();
|
||||||
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
|
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
|
||||||
bb->rbi = NULL;
|
bb->rbi = NULL;
|
||||||
|
|
||||||
@ -1275,7 +1217,7 @@ can_copy_bbs_p (basic_block *bbs, unsigned n)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cfg_layout_can_duplicate_bb_p (bbs[i]))
|
if (!can_duplicate_block_p (bbs[i]))
|
||||||
{
|
{
|
||||||
ret = false;
|
ret = false;
|
||||||
break;
|
break;
|
||||||
@ -1318,7 +1260,7 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs,
|
|||||||
{
|
{
|
||||||
/* Duplicate. */
|
/* Duplicate. */
|
||||||
bb = bbs[i];
|
bb = bbs[i];
|
||||||
new_bb = new_bbs[i] = cfg_layout_duplicate_bb (bb, NULL);
|
new_bb = new_bbs[i] = duplicate_block (bb, NULL);
|
||||||
bb->rbi->duplicated = 1;
|
bb->rbi->duplicated = 1;
|
||||||
/* Add to loop. */
|
/* Add to loop. */
|
||||||
add_bb_to_loop (new_bb, bb->loop_father->copy);
|
add_bb_to_loop (new_bb, bb->loop_father->copy);
|
||||||
|
@ -18,31 +18,13 @@
|
|||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
02111-1307, USA. */
|
02111-1307, USA. */
|
||||||
|
|
||||||
/* Structure to hold information about the blocks during reordering. */
|
|
||||||
typedef struct reorder_block_def
|
|
||||||
{
|
|
||||||
rtx header;
|
|
||||||
rtx footer;
|
|
||||||
basic_block next;
|
|
||||||
basic_block original;
|
|
||||||
/* Used by loop copying. */
|
|
||||||
basic_block copy;
|
|
||||||
int duplicated;
|
|
||||||
|
|
||||||
/* These fields are used by bb-reorder pass. */
|
|
||||||
int visited;
|
|
||||||
} *reorder_block_def;
|
|
||||||
|
|
||||||
extern rtx cfg_layout_function_footer;
|
extern rtx cfg_layout_function_footer;
|
||||||
|
|
||||||
extern void cfg_layout_initialize (void);
|
extern void cfg_layout_initialize (void);
|
||||||
extern void cfg_layout_finalize (void);
|
extern void cfg_layout_finalize (void);
|
||||||
extern bool cfg_layout_can_duplicate_bb_p (basic_block);
|
|
||||||
extern basic_block cfg_layout_duplicate_bb (basic_block, edge);
|
|
||||||
extern void insn_locators_initialize (void);
|
extern void insn_locators_initialize (void);
|
||||||
extern void reemit_insn_block_notes (void);
|
extern void reemit_insn_block_notes (void);
|
||||||
extern bool can_copy_bbs_p (basic_block *, unsigned);
|
extern bool can_copy_bbs_p (basic_block *, unsigned);
|
||||||
extern void copy_bbs (basic_block *, unsigned, basic_block *,
|
extern void copy_bbs (basic_block *, unsigned, basic_block *,
|
||||||
edge *, unsigned, edge *, struct loop *);
|
edge *, unsigned, edge *, struct loop *);
|
||||||
extern void cfg_layout_initialize_rbi (basic_block);
|
|
||||||
extern bool scan_ahead_for_unlikely_executed_note (rtx);
|
extern bool scan_ahead_for_unlikely_executed_note (rtx);
|
||||||
|
@ -28,6 +28,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#include "toplev.h"
|
#include "toplev.h"
|
||||||
#include "cfgloop.h"
|
#include "cfgloop.h"
|
||||||
#include "flags.h"
|
#include "flags.h"
|
||||||
|
#include "tree.h"
|
||||||
|
#include "tree-flow.h"
|
||||||
|
|
||||||
/* Ratio of frequencies of edges so that one of more latch edges is
|
/* Ratio of frequencies of edges so that one of more latch edges is
|
||||||
considered to belong to inner loop with same header. */
|
considered to belong to inner loop with same header. */
|
||||||
|
@ -237,6 +237,7 @@ extern void flow_loop_dump (const struct loop *, FILE *,
|
|||||||
extern int flow_loop_scan (struct loop *, int);
|
extern int flow_loop_scan (struct loop *, int);
|
||||||
extern void flow_loop_free (struct loop *);
|
extern void flow_loop_free (struct loop *);
|
||||||
void mark_irreducible_loops (struct loops *);
|
void mark_irreducible_loops (struct loops *);
|
||||||
|
extern void create_loop_notes (void);
|
||||||
|
|
||||||
/* Loop data structure manipulation/querying. */
|
/* Loop data structure manipulation/querying. */
|
||||||
extern void flow_loop_tree_node_add (struct loop *, struct loop *);
|
extern void flow_loop_tree_node_add (struct loop *, struct loop *);
|
||||||
|
@ -1242,3 +1242,99 @@ loop_split_edge_with (edge e, rtx insns)
|
|||||||
|
|
||||||
return new_bb;
|
return new_bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Uses the natural loop discovery to recreate loop notes. */
|
||||||
|
void
|
||||||
|
create_loop_notes (void)
|
||||||
|
{
|
||||||
|
rtx insn, head, end;
|
||||||
|
struct loops loops;
|
||||||
|
struct loop *loop;
|
||||||
|
basic_block *first, *last, bb, pbb;
|
||||||
|
struct loop **stack, **top;
|
||||||
|
|
||||||
|
#ifdef ENABLE_CHECKING
|
||||||
|
/* Verify that there really are no loop notes. */
|
||||||
|
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
||||||
|
if (GET_CODE (insn) == NOTE
|
||||||
|
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
|
||||||
|
abort ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
flow_loops_find (&loops, LOOP_TREE);
|
||||||
|
free_dominance_info (CDI_DOMINATORS);
|
||||||
|
if (loops.num > 1)
|
||||||
|
{
|
||||||
|
last = xcalloc (loops.num, sizeof (basic_block));
|
||||||
|
|
||||||
|
FOR_EACH_BB (bb)
|
||||||
|
{
|
||||||
|
for (loop = bb->loop_father; loop->outer; loop = loop->outer)
|
||||||
|
last[loop->num] = bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
first = xcalloc (loops.num, sizeof (basic_block));
|
||||||
|
stack = xcalloc (loops.num, sizeof (struct loop *));
|
||||||
|
top = stack;
|
||||||
|
|
||||||
|
FOR_EACH_BB (bb)
|
||||||
|
{
|
||||||
|
for (loop = bb->loop_father; loop->outer; loop = loop->outer)
|
||||||
|
{
|
||||||
|
if (!first[loop->num])
|
||||||
|
{
|
||||||
|
*top++ = loop;
|
||||||
|
first[loop->num] = bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bb == last[loop->num])
|
||||||
|
{
|
||||||
|
/* Prevent loops from overlapping. */
|
||||||
|
while (*--top != loop)
|
||||||
|
last[(*top)->num] = EXIT_BLOCK_PTR;
|
||||||
|
|
||||||
|
/* If loop starts with jump into it, place the note in
|
||||||
|
front of the jump. */
|
||||||
|
insn = PREV_INSN (BB_HEAD (first[loop->num]));
|
||||||
|
if (insn
|
||||||
|
&& GET_CODE (insn) == BARRIER)
|
||||||
|
insn = PREV_INSN (insn);
|
||||||
|
|
||||||
|
if (insn
|
||||||
|
&& GET_CODE (insn) == JUMP_INSN
|
||||||
|
&& any_uncondjump_p (insn)
|
||||||
|
&& onlyjump_p (insn))
|
||||||
|
{
|
||||||
|
pbb = BLOCK_FOR_INSN (insn);
|
||||||
|
if (!pbb || !pbb->succ || pbb->succ->succ_next)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
if (!flow_bb_inside_loop_p (loop, pbb->succ->dest))
|
||||||
|
insn = BB_HEAD (first[loop->num]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
insn = BB_HEAD (first[loop->num]);
|
||||||
|
|
||||||
|
head = BB_HEAD (first[loop->num]);
|
||||||
|
emit_note_before (NOTE_INSN_LOOP_BEG, insn);
|
||||||
|
BB_HEAD (first[loop->num]) = head;
|
||||||
|
|
||||||
|
/* Position the note correctly wrto barrier. */
|
||||||
|
insn = BB_END (last[loop->num]);
|
||||||
|
if (NEXT_INSN (insn)
|
||||||
|
&& GET_CODE (NEXT_INSN (insn)) == BARRIER)
|
||||||
|
insn = NEXT_INSN (insn);
|
||||||
|
|
||||||
|
end = BB_END (last[loop->num]);
|
||||||
|
emit_note_after (NOTE_INSN_LOOP_END, insn);
|
||||||
|
BB_END (last[loop->num]) = end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
free (first);
|
||||||
|
free (last);
|
||||||
|
free (stack);
|
||||||
|
}
|
||||||
|
flow_loops_free (&loops);
|
||||||
|
}
|
||||||
|
308
gcc/cfgrtl.c
308
gcc/cfgrtl.c
@ -74,12 +74,12 @@ static basic_block rtl_split_edge (edge);
|
|||||||
static bool rtl_move_block_after (basic_block, basic_block);
|
static bool rtl_move_block_after (basic_block, basic_block);
|
||||||
static int rtl_verify_flow_info (void);
|
static int rtl_verify_flow_info (void);
|
||||||
static basic_block cfg_layout_split_block (basic_block, void *);
|
static basic_block cfg_layout_split_block (basic_block, void *);
|
||||||
static bool cfg_layout_redirect_edge_and_branch (edge, basic_block);
|
static edge cfg_layout_redirect_edge_and_branch (edge, basic_block);
|
||||||
static basic_block cfg_layout_redirect_edge_and_branch_force (edge, basic_block);
|
static basic_block cfg_layout_redirect_edge_and_branch_force (edge, basic_block);
|
||||||
static void cfg_layout_delete_block (basic_block);
|
static void cfg_layout_delete_block (basic_block);
|
||||||
static void rtl_delete_block (basic_block);
|
static void rtl_delete_block (basic_block);
|
||||||
static basic_block rtl_redirect_edge_and_branch_force (edge, basic_block);
|
static basic_block rtl_redirect_edge_and_branch_force (edge, basic_block);
|
||||||
static bool rtl_redirect_edge_and_branch (edge, basic_block);
|
static edge rtl_redirect_edge_and_branch (edge, basic_block);
|
||||||
static basic_block rtl_split_block (basic_block, void *);
|
static basic_block rtl_split_block (basic_block, void *);
|
||||||
static void rtl_dump_bb (basic_block, FILE *, int);
|
static void rtl_dump_bb (basic_block, FILE *, int);
|
||||||
static int rtl_verify_flow_info_1 (void);
|
static int rtl_verify_flow_info_1 (void);
|
||||||
@ -259,7 +259,6 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after)
|
|||||||
basic_block bb;
|
basic_block bb;
|
||||||
|
|
||||||
if (bb_note
|
if (bb_note
|
||||||
&& ! RTX_INTEGRATED_P (bb_note)
|
|
||||||
&& (bb = NOTE_BASIC_BLOCK (bb_note)) != NULL
|
&& (bb = NOTE_BASIC_BLOCK (bb_note)) != NULL
|
||||||
&& bb->aux == NULL)
|
&& bb->aux == NULL)
|
||||||
{
|
{
|
||||||
@ -354,7 +353,7 @@ cfg_layout_create_basic_block (void *head, void *end, basic_block after)
|
|||||||
{
|
{
|
||||||
basic_block newbb = rtl_create_basic_block (head, end, after);
|
basic_block newbb = rtl_create_basic_block (head, end, after);
|
||||||
|
|
||||||
cfg_layout_initialize_rbi (newbb);
|
initialize_bb_rbi (newbb);
|
||||||
return newbb;
|
return newbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,8 +391,6 @@ rtl_delete_block (basic_block b)
|
|||||||
|
|
||||||
insn = BB_HEAD (b);
|
insn = BB_HEAD (b);
|
||||||
|
|
||||||
never_reached_warning (insn, BB_END (b));
|
|
||||||
|
|
||||||
if (GET_CODE (insn) == CODE_LABEL)
|
if (GET_CODE (insn) == CODE_LABEL)
|
||||||
maybe_remove_eh_handler (insn);
|
maybe_remove_eh_handler (insn);
|
||||||
|
|
||||||
@ -666,7 +663,7 @@ block_label (basic_block block)
|
|||||||
apply only if all edges now point to the same block. The parameters and
|
apply only if all edges now point to the same block. The parameters and
|
||||||
return values are equivalent to redirect_edge_and_branch. */
|
return values are equivalent to redirect_edge_and_branch. */
|
||||||
|
|
||||||
bool
|
edge
|
||||||
try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
|
try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
|
||||||
{
|
{
|
||||||
basic_block src = e->src;
|
basic_block src = e->src;
|
||||||
@ -690,14 +687,14 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (tmp || !onlyjump_p (insn))
|
if (tmp || !onlyjump_p (insn))
|
||||||
return false;
|
return NULL;
|
||||||
if ((!optimize || reload_completed) && tablejump_p (insn, NULL, NULL))
|
if ((!optimize || reload_completed) && tablejump_p (insn, NULL, NULL))
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
/* Avoid removing branch with side effects. */
|
/* Avoid removing branch with side effects. */
|
||||||
set = single_set (insn);
|
set = single_set (insn);
|
||||||
if (!set || side_effects_p (set))
|
if (!set || side_effects_p (set))
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
/* In case we zap a conditional jump, we'll need to kill
|
/* In case we zap a conditional jump, we'll need to kill
|
||||||
the cc0 setter too. */
|
the cc0 setter too. */
|
||||||
@ -746,21 +743,21 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
|
|||||||
else if (simplejump_p (insn))
|
else if (simplejump_p (insn))
|
||||||
{
|
{
|
||||||
if (e->dest == target)
|
if (e->dest == target)
|
||||||
return false;
|
return NULL;
|
||||||
if (dump_file)
|
if (dump_file)
|
||||||
fprintf (dump_file, "Redirecting jump %i from %i to %i.\n",
|
fprintf (dump_file, "Redirecting jump %i from %i to %i.\n",
|
||||||
INSN_UID (insn), e->dest->index, target->index);
|
INSN_UID (insn), e->dest->index, target->index);
|
||||||
if (!redirect_jump (insn, block_label (target), 0))
|
if (!redirect_jump (insn, block_label (target), 0))
|
||||||
{
|
{
|
||||||
if (target == EXIT_BLOCK_PTR)
|
if (target == EXIT_BLOCK_PTR)
|
||||||
return false;
|
return NULL;
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cannot do anything for target exit block. */
|
/* Cannot do anything for target exit block. */
|
||||||
else if (target == EXIT_BLOCK_PTR)
|
else if (target == EXIT_BLOCK_PTR)
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
/* Or replace possibly complicated jump insn by simple jump insn. */
|
/* Or replace possibly complicated jump insn by simple jump insn. */
|
||||||
else
|
else
|
||||||
@ -834,7 +831,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
|
|||||||
if (e->dest != target)
|
if (e->dest != target)
|
||||||
redirect_edge_succ (e, target);
|
redirect_edge_succ (e, target);
|
||||||
|
|
||||||
return true;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return last loop_beg note appearing after INSN, before start of next
|
/* Return last loop_beg note appearing after INSN, before start of next
|
||||||
@ -859,8 +856,9 @@ last_loop_beg_note (rtx insn)
|
|||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Redirect edge representing branch of (un)conditional jump or tablejump. */
|
/* Redirect edge representing branch of (un)conditional jump or tablejump,
|
||||||
static bool
|
NULL on failure */
|
||||||
|
static edge
|
||||||
redirect_branch_edge (edge e, basic_block target)
|
redirect_branch_edge (edge e, basic_block target)
|
||||||
{
|
{
|
||||||
rtx tmp;
|
rtx tmp;
|
||||||
@ -870,9 +868,9 @@ redirect_branch_edge (edge e, basic_block target)
|
|||||||
|
|
||||||
/* We can only redirect non-fallthru edges of jump insn. */
|
/* We can only redirect non-fallthru edges of jump insn. */
|
||||||
if (e->flags & EDGE_FALLTHRU)
|
if (e->flags & EDGE_FALLTHRU)
|
||||||
return false;
|
return NULL;
|
||||||
else if (GET_CODE (insn) != JUMP_INSN)
|
else if (GET_CODE (insn) != JUMP_INSN)
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
/* Recognize a tablejump and adjust all matching cases. */
|
/* Recognize a tablejump and adjust all matching cases. */
|
||||||
if (tablejump_p (insn, NULL, &tmp))
|
if (tablejump_p (insn, NULL, &tmp))
|
||||||
@ -882,7 +880,7 @@ redirect_branch_edge (edge e, basic_block target)
|
|||||||
rtx new_label = block_label (target);
|
rtx new_label = block_label (target);
|
||||||
|
|
||||||
if (target == EXIT_BLOCK_PTR)
|
if (target == EXIT_BLOCK_PTR)
|
||||||
return false;
|
return NULL;
|
||||||
if (GET_CODE (PATTERN (tmp)) == ADDR_VEC)
|
if (GET_CODE (PATTERN (tmp)) == ADDR_VEC)
|
||||||
vec = XVEC (PATTERN (tmp), 0);
|
vec = XVEC (PATTERN (tmp), 0);
|
||||||
else
|
else
|
||||||
@ -917,7 +915,7 @@ redirect_branch_edge (edge e, basic_block target)
|
|||||||
if (computed_jump_p (insn)
|
if (computed_jump_p (insn)
|
||||||
/* A return instruction can't be redirected. */
|
/* A return instruction can't be redirected. */
|
||||||
|| returnjump_p (insn))
|
|| returnjump_p (insn))
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
/* If the insn doesn't go where we think, we're confused. */
|
/* If the insn doesn't go where we think, we're confused. */
|
||||||
if (JUMP_LABEL (insn) != old_label)
|
if (JUMP_LABEL (insn) != old_label)
|
||||||
@ -929,7 +927,7 @@ redirect_branch_edge (edge e, basic_block target)
|
|||||||
if (!redirect_jump (insn, block_label (target), 0))
|
if (!redirect_jump (insn, block_label (target), 0))
|
||||||
{
|
{
|
||||||
if (target == EXIT_BLOCK_PTR)
|
if (target == EXIT_BLOCK_PTR)
|
||||||
return false;
|
return NULL;
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -939,8 +937,8 @@ redirect_branch_edge (edge e, basic_block target)
|
|||||||
e->src->index, e->dest->index, target->index);
|
e->src->index, e->dest->index, target->index);
|
||||||
|
|
||||||
if (e->dest != target)
|
if (e->dest != target)
|
||||||
redirect_edge_succ_nodup (e, target);
|
e = redirect_edge_succ_nodup (e, target);
|
||||||
return true;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Attempt to change code to redirect edge E to TARGET. Don't do that on
|
/* Attempt to change code to redirect edge E to TARGET. Don't do that on
|
||||||
@ -949,32 +947,35 @@ redirect_branch_edge (edge e, basic_block target)
|
|||||||
Function can be also called with edge destination equivalent to the TARGET.
|
Function can be also called with edge destination equivalent to the TARGET.
|
||||||
Then it should try the simplifications and do nothing if none is possible.
|
Then it should try the simplifications and do nothing if none is possible.
|
||||||
|
|
||||||
Return true if transformation succeeded. We still return false in case E
|
Return edge representing the branch if transformation succeeded. Return NULL
|
||||||
already destinated TARGET and we didn't managed to simplify instruction
|
on failure.
|
||||||
stream. */
|
We still return NULL in case E already destinated TARGET and we didn't
|
||||||
|
managed to simplify instruction stream. */
|
||||||
|
|
||||||
static bool
|
static edge
|
||||||
rtl_redirect_edge_and_branch (edge e, basic_block target)
|
rtl_redirect_edge_and_branch (edge e, basic_block target)
|
||||||
{
|
{
|
||||||
|
edge ret;
|
||||||
basic_block src = e->src;
|
basic_block src = e->src;
|
||||||
|
|
||||||
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
|
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
if (e->dest == target)
|
if (e->dest == target)
|
||||||
return true;
|
return e;
|
||||||
|
|
||||||
if (try_redirect_by_replacing_jump (e, target, false))
|
if ((ret = try_redirect_by_replacing_jump (e, target, false)) != NULL)
|
||||||
{
|
{
|
||||||
src->flags |= BB_DIRTY;
|
src->flags |= BB_DIRTY;
|
||||||
return true;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!redirect_branch_edge (e, target))
|
ret = redirect_branch_edge (e, target);
|
||||||
return false;
|
if (!ret)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
src->flags |= BB_DIRTY;
|
src->flags |= BB_DIRTY;
|
||||||
return true;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like force_nonfallthru below, but additionally performs redirection
|
/* Like force_nonfallthru below, but additionally performs redirection
|
||||||
@ -1376,14 +1377,14 @@ insert_insn_on_edge (rtx pattern, edge e)
|
|||||||
if ((e->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (e))
|
if ((e->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (e))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
if (e->insns == NULL_RTX)
|
if (e->insns.r == NULL_RTX)
|
||||||
start_sequence ();
|
start_sequence ();
|
||||||
else
|
else
|
||||||
push_to_sequence (e->insns);
|
push_to_sequence (e->insns.r);
|
||||||
|
|
||||||
emit_insn (pattern);
|
emit_insn (pattern);
|
||||||
|
|
||||||
e->insns = get_insns ();
|
e->insns.r = get_insns ();
|
||||||
end_sequence ();
|
end_sequence ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1491,8 +1492,8 @@ commit_one_edge_insertion (edge e, int watch_calls)
|
|||||||
basic_block bb = NULL;
|
basic_block bb = NULL;
|
||||||
|
|
||||||
/* Pull the insns off the edge now since the edge might go away. */
|
/* Pull the insns off the edge now since the edge might go away. */
|
||||||
insns = e->insns;
|
insns = e->insns.r;
|
||||||
e->insns = NULL_RTX;
|
e->insns.r = NULL_RTX;
|
||||||
|
|
||||||
/* Special case -- avoid inserting code between call and storing
|
/* Special case -- avoid inserting code between call and storing
|
||||||
its return value. */
|
its return value. */
|
||||||
@ -1663,10 +1664,10 @@ commit_edge_insertions (void)
|
|||||||
for (e = bb->succ; e; e = next)
|
for (e = bb->succ; e; e = next)
|
||||||
{
|
{
|
||||||
next = e->succ_next;
|
next = e->succ_next;
|
||||||
if (e->insns)
|
if (e->insns.r)
|
||||||
{
|
{
|
||||||
changed = true;
|
changed = true;
|
||||||
commit_one_edge_insertion (e, false);
|
commit_one_edge_insertion (e, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1711,7 +1712,7 @@ commit_edge_insertions_watch_calls (void)
|
|||||||
for (e = bb->succ; e; e = next)
|
for (e = bb->succ; e; e = next)
|
||||||
{
|
{
|
||||||
next = e->succ_next;
|
next = e->succ_next;
|
||||||
if (e->insns)
|
if (e->insns.r)
|
||||||
{
|
{
|
||||||
changed = true;
|
changed = true;
|
||||||
commit_one_edge_insertion (e, true);
|
commit_one_edge_insertion (e, true);
|
||||||
@ -2467,23 +2468,23 @@ cfg_layout_split_block (basic_block bb, void *insnp)
|
|||||||
|
|
||||||
|
|
||||||
/* Redirect Edge to DEST. */
|
/* Redirect Edge to DEST. */
|
||||||
static bool
|
static edge
|
||||||
cfg_layout_redirect_edge_and_branch (edge e, basic_block dest)
|
cfg_layout_redirect_edge_and_branch (edge e, basic_block dest)
|
||||||
{
|
{
|
||||||
basic_block src = e->src;
|
basic_block src = e->src;
|
||||||
bool ret;
|
edge ret;
|
||||||
|
|
||||||
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
|
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
|
||||||
return false;
|
return NULL;
|
||||||
|
|
||||||
if (e->dest == dest)
|
if (e->dest == dest)
|
||||||
return true;
|
return e;
|
||||||
|
|
||||||
if (e->src != ENTRY_BLOCK_PTR
|
if (e->src != ENTRY_BLOCK_PTR
|
||||||
&& try_redirect_by_replacing_jump (e, dest, true))
|
&& (ret = try_redirect_by_replacing_jump (e, dest, true)))
|
||||||
{
|
{
|
||||||
src->flags |= BB_DIRTY;
|
src->flags |= BB_DIRTY;
|
||||||
return true;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e->src == ENTRY_BLOCK_PTR
|
if (e->src == ENTRY_BLOCK_PTR
|
||||||
@ -2495,7 +2496,7 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest)
|
|||||||
|
|
||||||
e->src->flags |= BB_DIRTY;
|
e->src->flags |= BB_DIRTY;
|
||||||
redirect_edge_succ (e, dest);
|
redirect_edge_succ (e, dest);
|
||||||
return true;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Redirect_edge_and_branch may decide to turn branch into fallthru edge
|
/* Redirect_edge_and_branch may decide to turn branch into fallthru edge
|
||||||
@ -2518,7 +2519,7 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest)
|
|||||||
abort ();
|
abort ();
|
||||||
e->flags |= EDGE_FALLTHRU;
|
e->flags |= EDGE_FALLTHRU;
|
||||||
e->src->flags |= BB_DIRTY;
|
e->src->flags |= BB_DIRTY;
|
||||||
return true;
|
return e;
|
||||||
}
|
}
|
||||||
/* In case we are redirecting fallthru edge to the branch edge
|
/* In case we are redirecting fallthru edge to the branch edge
|
||||||
of conditional jump, remove it. */
|
of conditional jump, remove it. */
|
||||||
@ -2531,13 +2532,10 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest)
|
|||||||
&& onlyjump_p (BB_END (src)))
|
&& onlyjump_p (BB_END (src)))
|
||||||
delete_insn (BB_END (src));
|
delete_insn (BB_END (src));
|
||||||
}
|
}
|
||||||
|
ret = redirect_edge_succ_nodup (e, dest);
|
||||||
if (dump_file)
|
if (dump_file)
|
||||||
fprintf (dump_file, "Fallthru edge %i->%i redirected to %i\n",
|
fprintf (dump_file, "Fallthru edge %i->%i redirected to %i\n",
|
||||||
e->src->index, e->dest->index, dest->index);
|
e->src->index, e->dest->index, dest->index);
|
||||||
redirect_edge_succ_nodup (e, dest);
|
|
||||||
|
|
||||||
ret = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = redirect_branch_edge (e, dest);
|
ret = redirect_branch_edge (e, dest);
|
||||||
@ -2781,6 +2779,179 @@ rtl_make_forwarder_block (edge fallthru ATTRIBUTE_UNUSED)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return 1 if BB ends with a call, possibly followed by some
|
||||||
|
instructions that must stay with the call, 0 otherwise. */
|
||||||
|
|
||||||
|
static bool
|
||||||
|
rtl_block_ends_with_call_p (basic_block bb)
|
||||||
|
{
|
||||||
|
rtx insn = BB_END (bb);
|
||||||
|
|
||||||
|
while (GET_CODE (insn) != CALL_INSN
|
||||||
|
&& insn != BB_HEAD (bb)
|
||||||
|
&& keep_with_call_p (insn))
|
||||||
|
insn = PREV_INSN (insn);
|
||||||
|
return (GET_CODE (insn) == CALL_INSN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return 1 if BB ends with a conditional branch, 0 otherwise. */
|
||||||
|
|
||||||
|
static bool
|
||||||
|
rtl_block_ends_with_condjump_p (basic_block bb)
|
||||||
|
{
|
||||||
|
return any_condjump_p (BB_END (bb));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return true if we need to add fake edge to exit.
|
||||||
|
Helper function for rtl_flow_call_edges_add. */
|
||||||
|
|
||||||
|
static bool
|
||||||
|
need_fake_edge_p (rtx insn)
|
||||||
|
{
|
||||||
|
if (!INSN_P (insn))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((GET_CODE (insn) == CALL_INSN
|
||||||
|
&& !SIBLING_CALL_P (insn)
|
||||||
|
&& !find_reg_note (insn, REG_NORETURN, NULL)
|
||||||
|
&& !find_reg_note (insn, REG_ALWAYS_RETURN, NULL)
|
||||||
|
&& !CONST_OR_PURE_CALL_P (insn)))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return ((GET_CODE (PATTERN (insn)) == ASM_OPERANDS
|
||||||
|
&& MEM_VOLATILE_P (PATTERN (insn)))
|
||||||
|
|| (GET_CODE (PATTERN (insn)) == PARALLEL
|
||||||
|
&& asm_noperands (insn) != -1
|
||||||
|
&& MEM_VOLATILE_P (XVECEXP (PATTERN (insn), 0, 0)))
|
||||||
|
|| GET_CODE (PATTERN (insn)) == ASM_INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add fake edges to the function exit for any non constant and non noreturn
|
||||||
|
calls, volatile inline assembly in the bitmap of blocks specified by
|
||||||
|
BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks
|
||||||
|
that were split.
|
||||||
|
|
||||||
|
The goal is to expose cases in which entering a basic block does not imply
|
||||||
|
that all subsequent instructions must be executed. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
rtl_flow_call_edges_add (sbitmap blocks)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int blocks_split = 0;
|
||||||
|
int last_bb = last_basic_block;
|
||||||
|
bool check_last_block = false;
|
||||||
|
|
||||||
|
if (n_basic_blocks == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (! blocks)
|
||||||
|
check_last_block = true;
|
||||||
|
else
|
||||||
|
check_last_block = TEST_BIT (blocks, EXIT_BLOCK_PTR->prev_bb->index);
|
||||||
|
|
||||||
|
/* In the last basic block, before epilogue generation, there will be
|
||||||
|
a fallthru edge to EXIT. Special care is required if the last insn
|
||||||
|
of the last basic block is a call because make_edge folds duplicate
|
||||||
|
edges, which would result in the fallthru edge also being marked
|
||||||
|
fake, which would result in the fallthru edge being removed by
|
||||||
|
remove_fake_edges, which would result in an invalid CFG.
|
||||||
|
|
||||||
|
Moreover, we can't elide the outgoing fake edge, since the block
|
||||||
|
profiler needs to take this into account in order to solve the minimal
|
||||||
|
spanning tree in the case that the call doesn't return.
|
||||||
|
|
||||||
|
Handle this by adding a dummy instruction in a new last basic block. */
|
||||||
|
if (check_last_block)
|
||||||
|
{
|
||||||
|
basic_block bb = EXIT_BLOCK_PTR->prev_bb;
|
||||||
|
rtx insn = BB_END (bb);
|
||||||
|
|
||||||
|
/* Back up past insns that must be kept in the same block as a call. */
|
||||||
|
while (insn != BB_HEAD (bb)
|
||||||
|
&& keep_with_call_p (insn))
|
||||||
|
insn = PREV_INSN (insn);
|
||||||
|
|
||||||
|
if (need_fake_edge_p (insn))
|
||||||
|
{
|
||||||
|
edge e;
|
||||||
|
|
||||||
|
for (e = bb->succ; e; e = e->succ_next)
|
||||||
|
if (e->dest == EXIT_BLOCK_PTR)
|
||||||
|
{
|
||||||
|
insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
|
||||||
|
commit_edge_insertions ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now add fake edges to the function exit for any non constant
|
||||||
|
calls since there is no way that we can determine if they will
|
||||||
|
return or not... */
|
||||||
|
|
||||||
|
for (i = 0; i < last_bb; i++)
|
||||||
|
{
|
||||||
|
basic_block bb = BASIC_BLOCK (i);
|
||||||
|
rtx insn;
|
||||||
|
rtx prev_insn;
|
||||||
|
|
||||||
|
if (!bb)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (blocks && !TEST_BIT (blocks, i))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (insn = BB_END (bb); ; insn = prev_insn)
|
||||||
|
{
|
||||||
|
prev_insn = PREV_INSN (insn);
|
||||||
|
if (need_fake_edge_p (insn))
|
||||||
|
{
|
||||||
|
edge e;
|
||||||
|
rtx split_at_insn = insn;
|
||||||
|
|
||||||
|
/* Don't split the block between a call and an insn that should
|
||||||
|
remain in the same block as the call. */
|
||||||
|
if (GET_CODE (insn) == CALL_INSN)
|
||||||
|
while (split_at_insn != BB_END (bb)
|
||||||
|
&& keep_with_call_p (NEXT_INSN (split_at_insn)))
|
||||||
|
split_at_insn = NEXT_INSN (split_at_insn);
|
||||||
|
|
||||||
|
/* The handling above of the final block before the epilogue
|
||||||
|
should be enough to verify that there is no edge to the exit
|
||||||
|
block in CFG already. Calling make_edge in such case would
|
||||||
|
cause us to mark that edge as fake and remove it later. */
|
||||||
|
|
||||||
|
#ifdef ENABLE_CHECKING
|
||||||
|
if (split_at_insn == BB_END (bb))
|
||||||
|
for (e = bb->succ; e; e = e->succ_next)
|
||||||
|
if (e->dest == EXIT_BLOCK_PTR)
|
||||||
|
abort ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Note that the following may create a new basic block
|
||||||
|
and renumber the existing basic blocks. */
|
||||||
|
if (split_at_insn != BB_END (bb))
|
||||||
|
{
|
||||||
|
e = split_block (bb, split_at_insn);
|
||||||
|
if (e)
|
||||||
|
blocks_split++;
|
||||||
|
}
|
||||||
|
|
||||||
|
make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (insn == BB_HEAD (bb))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blocks_split)
|
||||||
|
verify_flow_info ();
|
||||||
|
|
||||||
|
return blocks_split;
|
||||||
|
}
|
||||||
|
|
||||||
/* Implementation of CFG manipulation for linearized RTL. */
|
/* Implementation of CFG manipulation for linearized RTL. */
|
||||||
struct cfg_hooks rtl_cfg_hooks = {
|
struct cfg_hooks rtl_cfg_hooks = {
|
||||||
"rtl",
|
"rtl",
|
||||||
@ -2794,15 +2965,30 @@ struct cfg_hooks rtl_cfg_hooks = {
|
|||||||
rtl_move_block_after,
|
rtl_move_block_after,
|
||||||
rtl_can_merge_blocks, /* can_merge_blocks_p */
|
rtl_can_merge_blocks, /* can_merge_blocks_p */
|
||||||
rtl_merge_blocks,
|
rtl_merge_blocks,
|
||||||
|
rtl_predict_edge,
|
||||||
|
rtl_predicted_by_p,
|
||||||
|
NULL, /* can_duplicate_block_p */
|
||||||
|
NULL, /* duplicate_block */
|
||||||
rtl_split_edge,
|
rtl_split_edge,
|
||||||
rtl_make_forwarder_block,
|
rtl_make_forwarder_block,
|
||||||
rtl_tidy_fallthru_edge
|
rtl_tidy_fallthru_edge,
|
||||||
|
rtl_block_ends_with_call_p,
|
||||||
|
rtl_block_ends_with_condjump_p,
|
||||||
|
rtl_flow_call_edges_add
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Implementation of CFG manipulation for cfg layout RTL, where
|
/* Implementation of CFG manipulation for cfg layout RTL, where
|
||||||
basic block connected via fallthru edges does not have to be adjacent.
|
basic block connected via fallthru edges does not have to be adjacent.
|
||||||
This representation will hopefully become the default one in future
|
This representation will hopefully become the default one in future
|
||||||
version of the compiler. */
|
version of the compiler. */
|
||||||
|
|
||||||
|
/* We do not want to declare these functions in a header file, since they
|
||||||
|
should only be used through the cfghooks interface, and we do not want to
|
||||||
|
move them here since it would require also moving quite a lot of related
|
||||||
|
code. */
|
||||||
|
extern bool cfg_layout_can_duplicate_bb_p (basic_block);
|
||||||
|
extern basic_block cfg_layout_duplicate_bb (basic_block);
|
||||||
|
|
||||||
struct cfg_hooks cfg_layout_rtl_cfg_hooks = {
|
struct cfg_hooks cfg_layout_rtl_cfg_hooks = {
|
||||||
"cfglayout mode",
|
"cfglayout mode",
|
||||||
rtl_verify_flow_info_1,
|
rtl_verify_flow_info_1,
|
||||||
@ -2815,7 +3001,15 @@ struct cfg_hooks cfg_layout_rtl_cfg_hooks = {
|
|||||||
rtl_move_block_after,
|
rtl_move_block_after,
|
||||||
cfg_layout_can_merge_blocks_p,
|
cfg_layout_can_merge_blocks_p,
|
||||||
cfg_layout_merge_blocks,
|
cfg_layout_merge_blocks,
|
||||||
|
rtl_predict_edge,
|
||||||
|
rtl_predicted_by_p,
|
||||||
|
cfg_layout_can_duplicate_bb_p,
|
||||||
|
cfg_layout_duplicate_bb,
|
||||||
cfg_layout_split_edge,
|
cfg_layout_split_edge,
|
||||||
rtl_make_forwarder_block,
|
rtl_make_forwarder_block,
|
||||||
NULL
|
NULL,
|
||||||
|
rtl_block_ends_with_call_p,
|
||||||
|
rtl_block_ends_with_condjump_p,
|
||||||
|
rtl_flow_call_edges_add
|
||||||
};
|
};
|
||||||
|
|
||||||
|
10
gcc/cgraph.c
10
gcc/cgraph.c
@ -407,16 +407,6 @@ cgraph_mark_reachable_node (struct cgraph_node *node)
|
|||||||
|
|
||||||
node->next_needed = cgraph_nodes_queue;
|
node->next_needed = cgraph_nodes_queue;
|
||||||
cgraph_nodes_queue = node;
|
cgraph_nodes_queue = node;
|
||||||
|
|
||||||
/* At the moment frontend automatically emits all nested functions. */
|
|
||||||
if (node->nested)
|
|
||||||
{
|
|
||||||
struct cgraph_node *node2;
|
|
||||||
|
|
||||||
for (node2 = node->nested; node2; node2 = node2->next_nested)
|
|
||||||
if (!node2->reachable)
|
|
||||||
cgraph_mark_reachable_node (node2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ struct cgraph_local_info GTY(())
|
|||||||
{
|
{
|
||||||
/* Size of the function before inlining. */
|
/* Size of the function before inlining. */
|
||||||
int self_insns;
|
int self_insns;
|
||||||
|
|
||||||
/* Set when function function is visible in current compilation unit only
|
/* Set when function function is visible in current compilation unit only
|
||||||
and it's address is never taken. */
|
and it's address is never taken. */
|
||||||
bool local;
|
bool local;
|
||||||
@ -66,9 +65,9 @@ struct cgraph_global_info GTY(())
|
|||||||
|
|
||||||
struct cgraph_rtl_info GTY(())
|
struct cgraph_rtl_info GTY(())
|
||||||
{
|
{
|
||||||
|
int preferred_incoming_stack_boundary;
|
||||||
bool const_function;
|
bool const_function;
|
||||||
bool pure_function;
|
bool pure_function;
|
||||||
int preferred_incoming_stack_boundary;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
228
gcc/cgraphunit.c
228
gcc/cgraphunit.c
@ -216,6 +216,8 @@ static htab_t visited_nodes;
|
|||||||
static bool
|
static bool
|
||||||
decide_is_function_needed (struct cgraph_node *node, tree decl)
|
decide_is_function_needed (struct cgraph_node *node, tree decl)
|
||||||
{
|
{
|
||||||
|
struct cgraph_node *origin;
|
||||||
|
|
||||||
/* If we decided it was needed before, but at the time we didn't have
|
/* If we decided it was needed before, but at the time we didn't have
|
||||||
the body of the function available, then it's still needed. We have
|
the body of the function available, then it's still needed. We have
|
||||||
to go back and re-check its dependencies now. */
|
to go back and re-check its dependencies now. */
|
||||||
@ -252,6 +254,11 @@ decide_is_function_needed (struct cgraph_node *node, tree decl)
|
|||||||
/* "extern inline" functions are never output locally. */
|
/* "extern inline" functions are never output locally. */
|
||||||
if (DECL_EXTERNAL (decl))
|
if (DECL_EXTERNAL (decl))
|
||||||
return false;
|
return false;
|
||||||
|
/* Nested functions of extern inline function shall not be emit unless
|
||||||
|
we inlined the origin. */
|
||||||
|
for (origin = node->origin; origin; origin = origin->origin)
|
||||||
|
if (DECL_EXTERNAL (origin->decl))
|
||||||
|
return false;
|
||||||
/* We want to emit COMDAT functions only when absolutely necessary. */
|
/* We want to emit COMDAT functions only when absolutely necessary. */
|
||||||
if (DECL_COMDAT (decl))
|
if (DECL_COMDAT (decl))
|
||||||
return false;
|
return false;
|
||||||
@ -283,7 +290,7 @@ cgraph_assemble_pending_functions (void)
|
|||||||
|
|
||||||
cgraph_nodes_queue = cgraph_nodes_queue->next_needed;
|
cgraph_nodes_queue = cgraph_nodes_queue->next_needed;
|
||||||
n->next_needed = NULL;
|
n->next_needed = NULL;
|
||||||
if (!n->origin && !n->global.inlined_to && !DECL_EXTERNAL (n->decl))
|
if (!n->global.inlined_to && !DECL_EXTERNAL (n->decl))
|
||||||
{
|
{
|
||||||
cgraph_expand_function (n);
|
cgraph_expand_function (n);
|
||||||
output = true;
|
output = true;
|
||||||
@ -374,11 +381,6 @@ cgraph_finalize_function (tree decl, bool nested)
|
|||||||
if (!TREE_ASM_WRITTEN (decl))
|
if (!TREE_ASM_WRITTEN (decl))
|
||||||
(*debug_hooks->deferred_inline_function) (decl);
|
(*debug_hooks->deferred_inline_function) (decl);
|
||||||
|
|
||||||
/* We will never really output the function body, clear the STRUCT_FUNCTION array
|
|
||||||
early then. */
|
|
||||||
if (DECL_EXTERNAL (decl))
|
|
||||||
DECL_STRUCT_FUNCTION (decl) = NULL;
|
|
||||||
|
|
||||||
/* Possibly warn about unused parameters. */
|
/* Possibly warn about unused parameters. */
|
||||||
if (warn_unused_parameter)
|
if (warn_unused_parameter)
|
||||||
do_warn_unused_parameter (decl);
|
do_warn_unused_parameter (decl);
|
||||||
@ -618,9 +620,7 @@ cgraph_analyze_function (struct cgraph_node *node)
|
|||||||
cgraph_create_edges (node, DECL_SAVED_TREE (decl));
|
cgraph_create_edges (node, DECL_SAVED_TREE (decl));
|
||||||
|
|
||||||
node->local.inlinable = tree_inlinable_function_p (decl);
|
node->local.inlinable = tree_inlinable_function_p (decl);
|
||||||
if (!node->local.self_insns)
|
node->local.self_insns = estimate_num_insns (DECL_SAVED_TREE (decl));
|
||||||
node->local.self_insns
|
|
||||||
= lang_hooks.tree_inlining.estimate_num_insns (decl);
|
|
||||||
if (node->local.inlinable)
|
if (node->local.inlinable)
|
||||||
node->local.disregard_inline_limits
|
node->local.disregard_inline_limits
|
||||||
= lang_hooks.tree_inlining.disregard_inline_limits (decl);
|
= lang_hooks.tree_inlining.disregard_inline_limits (decl);
|
||||||
@ -737,7 +737,6 @@ cgraph_finalize_compilation_unit (void)
|
|||||||
ggc_collect ();
|
ggc_collect ();
|
||||||
timevar_pop (TV_CGRAPH);
|
timevar_pop (TV_CGRAPH);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out what functions we want to assemble. */
|
/* Figure out what functions we want to assemble. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -749,7 +748,6 @@ cgraph_mark_functions_to_output (void)
|
|||||||
{
|
{
|
||||||
tree decl = node->decl;
|
tree decl = node->decl;
|
||||||
struct cgraph_edge *e;
|
struct cgraph_edge *e;
|
||||||
|
|
||||||
if (node->output)
|
if (node->output)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
@ -764,12 +762,12 @@ cgraph_mark_functions_to_output (void)
|
|||||||
&& !node->global.inlined_to
|
&& !node->global.inlined_to
|
||||||
&& (node->needed
|
&& (node->needed
|
||||||
|| (e && node->reachable))
|
|| (e && node->reachable))
|
||||||
&& !TREE_ASM_WRITTEN (decl) && !node->origin
|
&& !TREE_ASM_WRITTEN (decl)
|
||||||
&& !DECL_EXTERNAL (decl))
|
&& !DECL_EXTERNAL (decl))
|
||||||
node->output = 1;
|
node->output = 1;
|
||||||
/* We should've reclaimed all functions that are not needed. */
|
/* We should've reclaimed all functions that are not needed. */
|
||||||
else if (!node->global.inlined_to && DECL_SAVED_TREE (decl)
|
else if (!node->global.inlined_to && DECL_SAVED_TREE (decl)
|
||||||
&& !node->origin && !DECL_EXTERNAL (decl))
|
&& !DECL_EXTERNAL (decl))
|
||||||
{
|
{
|
||||||
dump_cgraph_node (stderr, node);
|
dump_cgraph_node (stderr, node);
|
||||||
abort ();
|
abort ();
|
||||||
@ -794,15 +792,21 @@ cgraph_expand_function (struct cgraph_node *node)
|
|||||||
/* Generate RTL for the body of DECL. Nested functions are expanded
|
/* Generate RTL for the body of DECL. Nested functions are expanded
|
||||||
via lang_expand_decl_stmt. */
|
via lang_expand_decl_stmt. */
|
||||||
lang_hooks.callgraph.expand_function (decl);
|
lang_hooks.callgraph.expand_function (decl);
|
||||||
if (DECL_DEFER_OUTPUT (decl))
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
/* Make sure that BE didn't gave up on compiling. */
|
/* Make sure that BE didn't give up on compiling. */
|
||||||
if (!TREE_ASM_WRITTEN (node->decl)
|
/* ??? Can happen with nested function of extern inline. */
|
||||||
&& !(sorrycount || errorcount))
|
if (!TREE_ASM_WRITTEN (node->decl))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
current_function_decl = NULL;
|
current_function_decl = NULL;
|
||||||
|
if (DECL_SAVED_TREE (node->decl)
|
||||||
|
&& !cgraph_preserve_function_body_p (node->decl))
|
||||||
|
{
|
||||||
|
DECL_SAVED_TREE (node->decl) = NULL;
|
||||||
|
DECL_STRUCT_FUNCTION (node->decl) = NULL;
|
||||||
|
DECL_ARGUMENTS (node->decl) = NULL;
|
||||||
|
DECL_INITIAL (node->decl) = error_mark_node;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fill array order with all nodes with output flag set in the reverse
|
/* Fill array order with all nodes with output flag set in the reverse
|
||||||
@ -822,7 +826,7 @@ cgraph_postorder (struct cgraph_node **order)
|
|||||||
/* We have to deal with cycles nicely, so use a depth first traversal
|
/* We have to deal with cycles nicely, so use a depth first traversal
|
||||||
output algorithm. Ignore the fact that some functions won't need
|
output algorithm. Ignore the fact that some functions won't need
|
||||||
to be output and put them into order as well, so we get dependencies
|
to be output and put them into order as well, so we get dependencies
|
||||||
right throughout inline functions. */
|
right through intline functions. */
|
||||||
for (node = cgraph_nodes; node; node = node->next)
|
for (node = cgraph_nodes; node; node = node->next)
|
||||||
node->aux = NULL;
|
node->aux = NULL;
|
||||||
for (node = cgraph_nodes; node; node = node->next)
|
for (node = cgraph_nodes; node; node = node->next)
|
||||||
@ -921,7 +925,7 @@ cgraph_remove_unreachable_nodes (void)
|
|||||||
/* Remove unreachable nodes. Extern inline functions need special care;
|
/* Remove unreachable nodes. Extern inline functions need special care;
|
||||||
Unreachable extern inline functions shall be removed.
|
Unreachable extern inline functions shall be removed.
|
||||||
Reachable extern inline functions we never inlined shall get their bodies
|
Reachable extern inline functions we never inlined shall get their bodies
|
||||||
eliminated
|
eliminated.
|
||||||
Reachable extern inline functions we sometimes inlined will be turned into
|
Reachable extern inline functions we sometimes inlined will be turned into
|
||||||
unanalyzed nodes so they look like for true extern functions to the rest
|
unanalyzed nodes so they look like for true extern functions to the rest
|
||||||
of code. Body of such functions is released via remove_node once the
|
of code. Body of such functions is released via remove_node once the
|
||||||
@ -1008,7 +1012,7 @@ cgraph_estimate_growth (struct cgraph_node *node)
|
|||||||
/* ??? Wrong for self recursive functions or cases where we decide to not
|
/* ??? Wrong for self recursive functions or cases where we decide to not
|
||||||
inline for different reasons, but it is not big deal as in that case
|
inline for different reasons, but it is not big deal as in that case
|
||||||
we will keep the body around, but we will also avoid some inlining. */
|
we will keep the body around, but we will also avoid some inlining. */
|
||||||
if (!node->needed && !node->origin && !DECL_EXTERNAL (node->decl))
|
if (!node->needed && !DECL_EXTERNAL (node->decl))
|
||||||
growth -= node->global.insns;
|
growth -= node->global.insns;
|
||||||
|
|
||||||
return growth;
|
return growth;
|
||||||
@ -1028,7 +1032,6 @@ cgraph_clone_inlined_nodes (struct cgraph_edge *e, bool duplicate)
|
|||||||
case just go ahead and re-use it. */
|
case just go ahead and re-use it. */
|
||||||
if (!e->callee->callers->next_caller
|
if (!e->callee->callers->next_caller
|
||||||
&& (!e->callee->needed || DECL_EXTERNAL (e->callee->decl))
|
&& (!e->callee->needed || DECL_EXTERNAL (e->callee->decl))
|
||||||
&& !e->callee->origin
|
|
||||||
&& duplicate
|
&& duplicate
|
||||||
&& flag_unit_at_a_time)
|
&& flag_unit_at_a_time)
|
||||||
{
|
{
|
||||||
@ -1191,28 +1194,17 @@ cgraph_recursive_inlining_p (struct cgraph_node *to,
|
|||||||
struct cgraph_node *what,
|
struct cgraph_node *what,
|
||||||
const char **reason)
|
const char **reason)
|
||||||
{
|
{
|
||||||
struct cgraph_node *node;
|
bool recursive;
|
||||||
|
if (to->global.inlined_to)
|
||||||
/* Walk TO and all functions TO is inlined in. */
|
recursive = what->decl == to->global.inlined_to->decl;
|
||||||
while (1)
|
else
|
||||||
{
|
recursive = what->decl == to->decl;
|
||||||
/* We create recursive inlining either by inlining WHAT into something
|
/* Marking recursive function inlinine has sane semantic and thus we should
|
||||||
already inlined in possibly different clone of WHAT. */
|
not warn on it. */
|
||||||
if (what->decl == to->decl)
|
if (recursive && reason)
|
||||||
goto recursive;
|
|
||||||
/* Or by inlining WHAT into something that is already inlined in WHAT. */
|
|
||||||
for (node = cgraph_node (to->decl); node; node = node->next_clone)
|
|
||||||
if (node->global.inlined_to == what)
|
|
||||||
goto recursive;
|
|
||||||
if (!to->callers || to->callers->inline_failed)
|
|
||||||
return false;
|
|
||||||
to = to->callers->caller;
|
|
||||||
}
|
|
||||||
recursive:
|
|
||||||
if (reason)
|
|
||||||
*reason = (what->local.disregard_inline_limits
|
*reason = (what->local.disregard_inline_limits
|
||||||
? N_("recursive inlining") : "");
|
? N_("recursive inlining") : "");
|
||||||
return true;
|
return recursive;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Recompute heap nodes for each of callees. */
|
/* Recompute heap nodes for each of callees. */
|
||||||
@ -1230,6 +1222,110 @@ update_callee_keys (fibheap_t heap, struct fibnode **heap_node,
|
|||||||
update_callee_keys (heap, heap_node, e->callee);
|
update_callee_keys (heap, heap_node, e->callee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Enqueue all recursive calls from NODE into queue linked via aux pointers
|
||||||
|
in between FIRST and LAST. WHERE is used for bookkeeping while looking
|
||||||
|
int calls inlined within NODE. */
|
||||||
|
static void
|
||||||
|
lookup_recursive_calls (struct cgraph_node *node, struct cgraph_node *where,
|
||||||
|
struct cgraph_edge **first, struct cgraph_edge **last)
|
||||||
|
{
|
||||||
|
struct cgraph_edge *e;
|
||||||
|
for (e = where->callees; e; e = e->next_callee)
|
||||||
|
if (e->callee == node)
|
||||||
|
{
|
||||||
|
if (!*first)
|
||||||
|
*first = e;
|
||||||
|
else
|
||||||
|
(*last)->aux = e;
|
||||||
|
*last = e;
|
||||||
|
}
|
||||||
|
for (e = where->callees; e; e = e->next_callee)
|
||||||
|
if (!e->inline_failed)
|
||||||
|
lookup_recursive_calls (node, e->callee, first, last);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Decide on recursive inlining: in the case function has recursive calls,
|
||||||
|
inline until body size reaches given argument. */
|
||||||
|
static void
|
||||||
|
cgraph_decide_recursive_inlining (struct cgraph_node *node)
|
||||||
|
{
|
||||||
|
int limit = PARAM_VALUE (PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO);
|
||||||
|
int max_depth = PARAM_VALUE (PARAM_MAX_INLINE_RECURSIVE_DEPTH_AUTO);
|
||||||
|
struct cgraph_edge *first_call = NULL, *last_call = NULL;
|
||||||
|
struct cgraph_edge *last_in_current_depth;
|
||||||
|
struct cgraph_edge *e;
|
||||||
|
struct cgraph_node *master_clone;
|
||||||
|
int depth = 0;
|
||||||
|
int n = 0;
|
||||||
|
|
||||||
|
if (DECL_DECLARED_INLINE_P (node->decl))
|
||||||
|
{
|
||||||
|
limit = PARAM_VALUE (PARAM_MAX_INLINE_INSNS_RECURSIVE);
|
||||||
|
max_depth = PARAM_VALUE (PARAM_MAX_INLINE_RECURSIVE_DEPTH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure that function is small enought to be considered for inlining. */
|
||||||
|
if (!max_depth
|
||||||
|
|| cgraph_estimate_size_after_inlining (1, node, node) >= limit)
|
||||||
|
return;
|
||||||
|
lookup_recursive_calls (node, node, &first_call, &last_call);
|
||||||
|
if (!first_call)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (cgraph_dump_file)
|
||||||
|
fprintf (cgraph_dump_file,
|
||||||
|
"\nPerforming recursive inlining on %s\n",
|
||||||
|
cgraph_node_name (node));
|
||||||
|
|
||||||
|
/* We need original clone to copy around. */
|
||||||
|
master_clone = cgraph_clone_node (node);
|
||||||
|
master_clone->needed = true;
|
||||||
|
for (e = master_clone->callees; e; e = e->next_callee)
|
||||||
|
if (!e->inline_failed)
|
||||||
|
cgraph_clone_inlined_nodes (e, true);
|
||||||
|
|
||||||
|
/* Do the inlining and update list of recursive call during process. */
|
||||||
|
last_in_current_depth = last_call;
|
||||||
|
while (first_call
|
||||||
|
&& cgraph_estimate_size_after_inlining (1, node, master_clone) <= limit)
|
||||||
|
{
|
||||||
|
struct cgraph_edge *curr = first_call;
|
||||||
|
|
||||||
|
first_call = first_call->aux;
|
||||||
|
curr->aux = NULL;
|
||||||
|
|
||||||
|
cgraph_redirect_edge_callee (curr, master_clone);
|
||||||
|
cgraph_mark_inline_edge (curr);
|
||||||
|
lookup_recursive_calls (node, curr->callee, &first_call, &last_call);
|
||||||
|
|
||||||
|
if (last_in_current_depth
|
||||||
|
&& ++depth >= max_depth)
|
||||||
|
break;
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cleanup queue pointers. */
|
||||||
|
while (first_call)
|
||||||
|
{
|
||||||
|
struct cgraph_edge *next = first_call->aux;
|
||||||
|
first_call->aux = NULL;
|
||||||
|
first_call = next;
|
||||||
|
}
|
||||||
|
if (cgraph_dump_file)
|
||||||
|
fprintf (cgraph_dump_file,
|
||||||
|
"\n Inlined %i times, body grown from %i to %i insns\n", n,
|
||||||
|
master_clone->global.insns, node->global.insns);
|
||||||
|
|
||||||
|
/* Remove master clone we used for inlining. We rely that clones inlined
|
||||||
|
into master clone gets queued just before master clone so we don't
|
||||||
|
need recursion. */
|
||||||
|
for (node = cgraph_nodes; node != master_clone;
|
||||||
|
node = node->next)
|
||||||
|
if (node->global.inlined_to == master_clone)
|
||||||
|
cgraph_remove_node (node);
|
||||||
|
cgraph_remove_node (master_clone);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set inline_failed for all callers of given function to REASON. */
|
/* Set inline_failed for all callers of given function to REASON. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1333,6 +1429,8 @@ cgraph_decide_inlining_of_small_functions (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cgraph_decide_recursive_inlining (node);
|
||||||
|
|
||||||
/* Similarly all functions called by the function we just inlined
|
/* Similarly all functions called by the function we just inlined
|
||||||
are now called more times; update keys. */
|
are now called more times; update keys. */
|
||||||
update_callee_keys (heap, heap_node, node);
|
update_callee_keys (heap, heap_node, node);
|
||||||
@ -1383,38 +1481,36 @@ cgraph_decide_inlining (void)
|
|||||||
so none of our later choices will make this impossible. */
|
so none of our later choices will make this impossible. */
|
||||||
for (i = nnodes - 1; i >= 0; i--)
|
for (i = nnodes - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
struct cgraph_edge *e;
|
struct cgraph_edge *e, *next;
|
||||||
|
|
||||||
node = order[i];
|
node = order[i];
|
||||||
|
|
||||||
for (e = node->callees; e; e = e->next_callee)
|
if (!node->local.disregard_inline_limits)
|
||||||
if (e->callee->local.disregard_inline_limits)
|
|
||||||
break;
|
|
||||||
if (!e)
|
|
||||||
continue;
|
continue;
|
||||||
if (cgraph_dump_file)
|
if (cgraph_dump_file)
|
||||||
fprintf (cgraph_dump_file,
|
fprintf (cgraph_dump_file,
|
||||||
"\nConsidering %s %i insns (always inline)\n",
|
"\nConsidering %s %i insns (always inline)\n",
|
||||||
cgraph_node_name (e->callee), e->callee->global.insns);
|
cgraph_node_name (e->callee), e->callee->global.insns);
|
||||||
for (; e; e = e->next_callee)
|
old_insns = overall_insns;
|
||||||
|
for (e = node->callers; e; e = next)
|
||||||
{
|
{
|
||||||
old_insns = overall_insns;
|
next = e->next_caller;
|
||||||
if (!e->inline_failed || !e->callee->local.disregard_inline_limits)
|
if (!e->inline_failed)
|
||||||
continue;
|
continue;
|
||||||
if (cgraph_recursive_inlining_p (order[i], e->callee,
|
if (cgraph_recursive_inlining_p (e->caller, e->callee,
|
||||||
&e->inline_failed))
|
&e->inline_failed))
|
||||||
continue;
|
continue;
|
||||||
cgraph_mark_inline (e);
|
cgraph_mark_inline_edge (e);
|
||||||
if (cgraph_dump_file)
|
if (cgraph_dump_file)
|
||||||
fprintf (cgraph_dump_file,
|
fprintf (cgraph_dump_file,
|
||||||
" Inlined into %s which now has %i insns.\n",
|
" Inlined into %s which now has %i insns.\n",
|
||||||
cgraph_node_name (node->callees->caller),
|
cgraph_node_name (node->callees->caller),
|
||||||
node->callees->caller->global.insns);
|
node->callees->caller->global.insns);
|
||||||
}
|
}
|
||||||
if (cgraph_dump_file)
|
if (cgraph_dump_file)
|
||||||
fprintf (cgraph_dump_file,
|
fprintf (cgraph_dump_file,
|
||||||
" Inlined for a net change of %+i insns.\n",
|
" Inlined for a net change of %+i insns.\n",
|
||||||
overall_insns - old_insns);
|
overall_insns - old_insns);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flag_really_no_inline)
|
if (!flag_really_no_inline)
|
||||||
@ -1675,5 +1771,25 @@ cgraph_optimize (void)
|
|||||||
}
|
}
|
||||||
#ifdef ENABLE_CHECKING
|
#ifdef ENABLE_CHECKING
|
||||||
verify_cgraph ();
|
verify_cgraph ();
|
||||||
|
/* Double check that all inline clones are gone and that all
|
||||||
|
function bodies have been released from memory. */
|
||||||
|
if (flag_unit_at_a_time
|
||||||
|
&& !dump_enabled_p (TDI_all)
|
||||||
|
&& !(sorrycount || errorcount))
|
||||||
|
{
|
||||||
|
struct cgraph_node *node;
|
||||||
|
bool error_found = false;
|
||||||
|
|
||||||
|
for (node = cgraph_nodes; node; node = node->next)
|
||||||
|
if (node->analyzed
|
||||||
|
&& (node->global.inlined_to
|
||||||
|
|| DECL_SAVED_TREE (node->decl)))
|
||||||
|
{
|
||||||
|
error_found = true;
|
||||||
|
dump_cgraph_node (stderr, node);
|
||||||
|
}
|
||||||
|
if (error_found)
|
||||||
|
internal_error ("Nodes with no released memory found.");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -6661,17 +6661,15 @@ get_pos_from_mask (unsigned HOST_WIDE_INT m, unsigned HOST_WIDE_INT *plen)
|
|||||||
{
|
{
|
||||||
/* Get the bit number of the first 1 bit from the right, -1 if none. */
|
/* Get the bit number of the first 1 bit from the right, -1 if none. */
|
||||||
int pos = exact_log2 (m & -m);
|
int pos = exact_log2 (m & -m);
|
||||||
int len;
|
int len = 0;
|
||||||
|
|
||||||
if (pos < 0)
|
if (pos >= 0)
|
||||||
return -1;
|
/* Now shift off the low-order zero bits and see if we have a
|
||||||
|
power of two minus 1. */
|
||||||
/* Now shift off the low-order zero bits and see if we have a power of
|
len = exact_log2 ((m >> pos) + 1);
|
||||||
two minus 1. */
|
|
||||||
len = exact_log2 ((m >> pos) + 1);
|
|
||||||
|
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return -1;
|
pos = -1;
|
||||||
|
|
||||||
*plen = len;
|
*plen = len;
|
||||||
return pos;
|
return pos;
|
||||||
|
@ -310,6 +310,10 @@ fdiagnostics-show-location=
|
|||||||
Common Joined RejectNegative
|
Common Joined RejectNegative
|
||||||
-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics
|
-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics
|
||||||
|
|
||||||
|
fdump-
|
||||||
|
Common Joined RejectNegative
|
||||||
|
-fdump-<type> Dump various compiler internals to a file
|
||||||
|
|
||||||
fdump-unnumbered
|
fdump-unnumbered
|
||||||
Common
|
Common
|
||||||
Suppress output of instruction numbers and line number notes in debugging dumps
|
Suppress output of instruction numbers and line number notes in debugging dumps
|
||||||
@ -466,6 +470,18 @@ fmove-all-movables
|
|||||||
Common
|
Common
|
||||||
Force all loop invariant computations out of loops
|
Force all loop invariant computations out of loops
|
||||||
|
|
||||||
|
fmudflap
|
||||||
|
Common RejectNegative
|
||||||
|
Add mudflap bounds-checking instrumentation for single-threaded program.
|
||||||
|
|
||||||
|
fmudflapth
|
||||||
|
Common RejectNegative
|
||||||
|
Add mudflap bounds-checking instrumentation for multi-threaded program.
|
||||||
|
|
||||||
|
fmudflapir
|
||||||
|
Common RejectNegative
|
||||||
|
Ignore read operations when inserting mudflap instrumentation.
|
||||||
|
|
||||||
fnew-ra
|
fnew-ra
|
||||||
Common
|
Common
|
||||||
Use graph-coloring register allocation
|
Use graph-coloring register allocation
|
||||||
@ -712,6 +728,61 @@ ftrapv
|
|||||||
Common
|
Common
|
||||||
Trap for signed overflow in addition, subtraction and multiplication
|
Trap for signed overflow in addition, subtraction and multiplication
|
||||||
|
|
||||||
|
ftree-based-profiling
|
||||||
|
Common
|
||||||
|
Use tree-ssa based implementation of profiling
|
||||||
|
|
||||||
|
ftree-ccp
|
||||||
|
Common
|
||||||
|
Enable SSA-CCP optimization on trees
|
||||||
|
|
||||||
|
ftree-ch
|
||||||
|
Common
|
||||||
|
Enable loop header copying on trees
|
||||||
|
|
||||||
|
ftree-combine-temps
|
||||||
|
Common
|
||||||
|
Coalesce memory temporaries in the SSA->normal pass
|
||||||
|
|
||||||
|
ftree-copyrename
|
||||||
|
Common
|
||||||
|
Replace SSA temporaries with better names in copies.
|
||||||
|
|
||||||
|
ftree-dce
|
||||||
|
Common
|
||||||
|
Enable SSA dead code elimination optimization on trees
|
||||||
|
|
||||||
|
ftree-dominator-opts
|
||||||
|
Common
|
||||||
|
Enable dominator optimizations
|
||||||
|
|
||||||
|
ftree-dse
|
||||||
|
Common
|
||||||
|
Enable dead store elimination
|
||||||
|
|
||||||
|
ftree-loop-optimize
|
||||||
|
Common
|
||||||
|
Enable loop optimizations on trees
|
||||||
|
|
||||||
|
ftree-points-to=
|
||||||
|
Common Joined RejectNegative
|
||||||
|
|
||||||
|
ftree-pre
|
||||||
|
Common
|
||||||
|
Enable SSA-PRE optimization on trees
|
||||||
|
|
||||||
|
ftree-sra
|
||||||
|
Common
|
||||||
|
Perform scalar replacement of aggregates
|
||||||
|
|
||||||
|
ftree-ter
|
||||||
|
Common
|
||||||
|
Replace temporary expressions in the SSA->normal pass
|
||||||
|
|
||||||
|
ftree-lrs
|
||||||
|
Common
|
||||||
|
Perform live range splitting during the SSA->normal pass.
|
||||||
|
|
||||||
funit-at-a-time
|
funit-at-a-time
|
||||||
Common
|
Common
|
||||||
Compile whole compilation unit at a time
|
Compile whole compilation unit at a time
|
||||||
|
@ -568,6 +568,15 @@
|
|||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
#undef ssize_t
|
#undef ssize_t
|
||||||
|
|
||||||
|
/* Define if your linker supports -pie option. */
|
||||||
|
#undef HAVE_LD_PIE
|
||||||
|
|
||||||
|
/* Define if BANSHEE is available */
|
||||||
|
#undef HAVE_BANSHEE
|
||||||
|
|
||||||
|
/* Define to PREFIX/include if cpp should also search that directory. */
|
||||||
|
#undef PREFIX_INCLUDE_DIR
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
#undef uid_t
|
#undef uid_t
|
||||||
|
|
||||||
|
@ -801,9 +801,6 @@ input_operand (rtx op, enum machine_mode mode)
|
|||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
return mode == QImode || mode == HImode || add_operand (op, mode);
|
return mode == QImode || mode == HImode || add_operand (op, mode);
|
||||||
|
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1116,7 +1116,7 @@ arm_compute_func_type (void)
|
|||||||
&& TREE_THIS_VOLATILE (current_function_decl))
|
&& TREE_THIS_VOLATILE (current_function_decl))
|
||||||
type |= ARM_FT_VOLATILE;
|
type |= ARM_FT_VOLATILE;
|
||||||
|
|
||||||
if (current_function_needs_context)
|
if (cfun->static_chain_decl != NULL)
|
||||||
type |= ARM_FT_NESTED;
|
type |= ARM_FT_NESTED;
|
||||||
|
|
||||||
attr = DECL_ATTRIBUTES (current_function_decl);
|
attr = DECL_ATTRIBUTES (current_function_decl);
|
||||||
@ -10227,10 +10227,10 @@ arm_compute_initial_elimination_offset (unsigned int from, unsigned int to)
|
|||||||
frame pointer and the arg pointer coincide. */
|
frame pointer and the arg pointer coincide. */
|
||||||
if (offsets->frame == offsets->saved_regs)
|
if (offsets->frame == offsets->saved_regs)
|
||||||
return 0;
|
return 0;
|
||||||
/* FIXME: Not sure about this. Maybe we should always return 0 ? */
|
/* FIXME: Not sure about this. Maybe we should always return 0 ? */
|
||||||
return (frame_pointer_needed
|
return (frame_pointer_needed
|
||||||
&& current_function_needs_context
|
&& cfun->static_chain_decl != NULL
|
||||||
&& ! cfun->machine->uses_anonymous_args) ? 4 : 0;
|
&& ! cfun->machine->uses_anonymous_args) ? 4 : 0;
|
||||||
|
|
||||||
case STACK_POINTER_REGNUM:
|
case STACK_POINTER_REGNUM:
|
||||||
/* If nothing has been pushed on the stack at all
|
/* If nothing has been pushed on the stack at all
|
||||||
|
@ -2046,7 +2046,6 @@ typedef struct
|
|||||||
#define THUMB_LEGITIMATE_CONSTANT_P(X) \
|
#define THUMB_LEGITIMATE_CONSTANT_P(X) \
|
||||||
( GET_CODE (X) == CONST_INT \
|
( GET_CODE (X) == CONST_INT \
|
||||||
|| GET_CODE (X) == CONST_DOUBLE \
|
|| GET_CODE (X) == CONST_DOUBLE \
|
||||||
|| GET_CODE (X) == CONSTANT_P_RTX \
|
|
||||||
|| CONSTANT_ADDRESS_P (X) \
|
|| CONSTANT_ADDRESS_P (X) \
|
||||||
|| flag_pic)
|
|| flag_pic)
|
||||||
|
|
||||||
|
@ -765,9 +765,6 @@ extern int avr_case_values_threshold;
|
|||||||
|
|
||||||
#define FUNCTION_MODE HImode
|
#define FUNCTION_MODE HImode
|
||||||
|
|
||||||
/* 1 3 */
|
|
||||||
#define INTEGRATE_THRESHOLD(DECL) (1 + (3 * list_length (DECL_ARGUMENTS (DECL)) / 2))
|
|
||||||
|
|
||||||
#define DOLLARS_IN_IDENTIFIERS 0
|
#define DOLLARS_IN_IDENTIFIERS 0
|
||||||
|
|
||||||
#define NO_DOLLAR_IN_LABEL 1
|
#define NO_DOLLAR_IN_LABEL 1
|
||||||
|
@ -2940,9 +2940,6 @@ const_operand (register rtx op, register enum machine_mode mode)
|
|||||||
case Pmode:
|
case Pmode:
|
||||||
#endif
|
#endif
|
||||||
case QImode:
|
case QImode:
|
||||||
if (GET_CODE (op) == CONSTANT_P_RTX)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (GET_CODE (op) != CONST_INT
|
if (GET_CODE (op) != CONST_INT
|
||||||
|| (GET_MODE (op) != VOIDmode && GET_MODE (op) != mode)
|
|| (GET_MODE (op) != VOIDmode && GET_MODE (op) != mode)
|
||||||
|| GET_MODE_CLASS (mode) != MODE_INT)
|
|| GET_MODE_CLASS (mode) != MODE_INT)
|
||||||
|
@ -2488,7 +2488,6 @@ cris_symbol (rtx x)
|
|||||||
|
|
||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
case CONST_DOUBLE:
|
case CONST_DOUBLE:
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -2550,7 +2549,6 @@ cris_gotless_symbol (rtx x)
|
|||||||
|
|
||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
case CONST_DOUBLE:
|
case CONST_DOUBLE:
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -2595,7 +2593,6 @@ cris_got_symbol (rtx x)
|
|||||||
|
|
||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
case CONST_DOUBLE:
|
case CONST_DOUBLE:
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2639,8 +2639,7 @@ fixup_section (void) \
|
|||||||
( GET_CODE (X) == CONST_INT \
|
( GET_CODE (X) == CONST_INT \
|
||||||
|| GET_CODE (X) == CONST_DOUBLE \
|
|| GET_CODE (X) == CONST_DOUBLE \
|
||||||
|| (GET_CODE (X) == HIGH && GET_CODE (XEXP (X, 0)) == CONST_INT) \
|
|| (GET_CODE (X) == HIGH && GET_CODE (XEXP (X, 0)) == CONST_INT) \
|
||||||
|| got12_operand (X, VOIDmode) \
|
|| got12_operand (X, VOIDmode)) \
|
||||||
|| GET_CODE (X) == CONSTANT_P_RTX)
|
|
||||||
|
|
||||||
|
|
||||||
/* The Overall Framework of an Assembler File. */
|
/* The Overall Framework of an Assembler File. */
|
||||||
|
@ -384,7 +384,7 @@ h8300_emit_stack_adjustment (int sign, unsigned int size)
|
|||||||
if (TARGET_H8300
|
if (TARGET_H8300
|
||||||
&& size > 4
|
&& size > 4
|
||||||
&& !h8300_current_function_interrupt_function_p ()
|
&& !h8300_current_function_interrupt_function_p ()
|
||||||
&& !(current_function_needs_context && sign < 0))
|
&& !(cfun->static_chain_decl != NULL && sign < 0))
|
||||||
{
|
{
|
||||||
rtx r3 = gen_rtx_REG (Pmode, 3);
|
rtx r3 = gen_rtx_REG (Pmode, 3);
|
||||||
emit_insn (gen_movhi (r3, GEN_INT (sign * size)));
|
emit_insn (gen_movhi (r3, GEN_INT (sign * size)));
|
||||||
|
@ -715,7 +715,6 @@ int
|
|||||||
gr_reg_or_5bit_operand (rtx op, enum machine_mode mode)
|
gr_reg_or_5bit_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) < 32)
|
return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) < 32)
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -725,7 +724,6 @@ int
|
|||||||
gr_reg_or_6bit_operand (rtx op, enum machine_mode mode)
|
gr_reg_or_6bit_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op)))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -735,7 +733,6 @@ int
|
|||||||
gr_reg_or_8bit_operand (rtx op, enum machine_mode mode)
|
gr_reg_or_8bit_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -745,7 +742,6 @@ int
|
|||||||
grfr_reg_or_8bit_operand (rtx op, enum machine_mode mode)
|
grfr_reg_or_8bit_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| grfr_register_operand (op, mode));
|
|| grfr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -756,7 +752,6 @@ int
|
|||||||
gr_reg_or_8bit_adjusted_operand (rtx op, enum machine_mode mode)
|
gr_reg_or_8bit_adjusted_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_L (INTVAL (op)))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_L (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -770,7 +765,6 @@ gr_reg_or_8bit_and_adjusted_operand (rtx op, enum machine_mode mode)
|
|||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op))
|
||||||
&& CONST_OK_FOR_L (INTVAL (op)))
|
&& CONST_OK_FOR_L (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -780,7 +774,6 @@ int
|
|||||||
gr_reg_or_14bit_operand (rtx op, enum machine_mode mode)
|
gr_reg_or_14bit_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_I (INTVAL (op)))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_I (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -790,7 +783,6 @@ int
|
|||||||
gr_reg_or_22bit_operand (rtx op, enum machine_mode mode)
|
gr_reg_or_22bit_operand (rtx op, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_J (INTVAL (op)))
|
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_J (INTVAL (op)))
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX
|
|
||||||
|| gr_register_operand (op, mode));
|
|| gr_register_operand (op, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,8 +791,7 @@ gr_reg_or_22bit_operand (rtx op, enum machine_mode mode)
|
|||||||
int
|
int
|
||||||
shift_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
|
shift_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op)))
|
return (GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op)));
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return 1 if OP is a 5 bit immediate operand. */
|
/* Return 1 if OP is a 5 bit immediate operand. */
|
||||||
@ -808,9 +799,8 @@ shift_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
|
|||||||
int
|
int
|
||||||
shift_32bit_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
|
shift_32bit_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return ((GET_CODE (op) == CONST_INT
|
return (GET_CODE (op) == CONST_INT
|
||||||
&& (INTVAL (op) >= 0 && INTVAL (op) < 32))
|
&& (INTVAL (op) >= 0 && INTVAL (op) < 32));
|
||||||
|| GET_CODE (op) == CONSTANT_P_RTX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return 1 if OP is a 2, 4, 8, or 16 immediate operand. */
|
/* Return 1 if OP is a 2, 4, 8, or 16 immediate operand. */
|
||||||
|
@ -2178,7 +2178,7 @@ do { \
|
|||||||
{ "destination_operand", {SUBREG, REG, MEM}}, \
|
{ "destination_operand", {SUBREG, REG, MEM}}, \
|
||||||
{ "not_postinc_memory_operand", {MEM}}, \
|
{ "not_postinc_memory_operand", {MEM}}, \
|
||||||
{ "move_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \
|
{ "move_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \
|
||||||
CONSTANT_P_RTX, SYMBOL_REF, CONST, LABEL_REF}}, \
|
SYMBOL_REF, CONST, LABEL_REF}}, \
|
||||||
{ "gr_register_operand", {SUBREG, REG}}, \
|
{ "gr_register_operand", {SUBREG, REG}}, \
|
||||||
{ "fr_register_operand", {SUBREG, REG}}, \
|
{ "fr_register_operand", {SUBREG, REG}}, \
|
||||||
{ "grfr_register_operand", {SUBREG, REG}}, \
|
{ "grfr_register_operand", {SUBREG, REG}}, \
|
||||||
@ -2186,19 +2186,16 @@ do { \
|
|||||||
{ "fr_nonimmediate_operand", {SUBREG, REG, MEM}}, \
|
{ "fr_nonimmediate_operand", {SUBREG, REG, MEM}}, \
|
||||||
{ "grfr_nonimmediate_operand", {SUBREG, REG, MEM}}, \
|
{ "grfr_nonimmediate_operand", {SUBREG, REG, MEM}}, \
|
||||||
{ "gr_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \
|
{ "gr_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_5bit_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
{ "gr_reg_or_5bit_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_6bit_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
{ "gr_reg_or_6bit_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_8bit_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
{ "gr_reg_or_8bit_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "grfr_reg_or_8bit_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
{ "grfr_reg_or_8bit_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_8bit_adjusted_operand", {SUBREG, REG, CONST_INT, \
|
{ "gr_reg_or_8bit_adjusted_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
CONSTANT_P_RTX}}, \
|
{ "gr_reg_or_8bit_and_adjusted_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_8bit_and_adjusted_operand", {SUBREG, REG, CONST_INT, \
|
{ "gr_reg_or_14bit_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
CONSTANT_P_RTX}}, \
|
{ "gr_reg_or_22bit_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_14bit_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
{ "shift_count_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "gr_reg_or_22bit_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
{ "shift_32bit_count_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{ "shift_count_operand", {SUBREG, REG, CONST_INT, CONSTANT_P_RTX}}, \
|
|
||||||
{ "shift_32bit_count_operand", {SUBREG, REG, CONST_INT, \
|
|
||||||
CONSTANT_P_RTX}}, \
|
|
||||||
{ "shladd_operand", {CONST_INT}}, \
|
{ "shladd_operand", {CONST_INT}}, \
|
||||||
{ "fetchadd_operand", {CONST_INT}}, \
|
{ "fetchadd_operand", {CONST_INT}}, \
|
||||||
{ "fr_reg_or_fp01_operand", {SUBREG, REG, CONST_DOUBLE}}, \
|
{ "fr_reg_or_fp01_operand", {SUBREG, REG, CONST_DOUBLE}}, \
|
||||||
|
@ -767,9 +767,6 @@ do { \
|
|||||||
|
|
||||||
#define FUNCTION_MODE HImode
|
#define FUNCTION_MODE HImode
|
||||||
|
|
||||||
#define INTEGRATE_THRESHOLD(DECL) \
|
|
||||||
(1 + (3 * list_length (DECL_ARGUMENTS (DECL)) / 2))
|
|
||||||
|
|
||||||
#define DOLLARS_IN_IDENTIFIERS 0
|
#define DOLLARS_IN_IDENTIFIERS 0
|
||||||
|
|
||||||
extern int ip2k_reorg_in_progress;
|
extern int ip2k_reorg_in_progress;
|
||||||
|
@ -771,8 +771,6 @@ move_src_operand (rtx op, enum machine_mode mode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
return 1;
|
|
||||||
case CONST_DOUBLE :
|
case CONST_DOUBLE :
|
||||||
if (mode == SFmode)
|
if (mode == SFmode)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1277,9 +1277,6 @@ mips_const_insns (rtx x)
|
|||||||
|
|
||||||
switch (GET_CODE (x))
|
switch (GET_CODE (x))
|
||||||
{
|
{
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
case HIGH:
|
case HIGH:
|
||||||
if (TARGET_MIPS16
|
if (TARGET_MIPS16
|
||||||
|| !mips_symbolic_constant_p (XEXP (x, 0), &symbol_type)
|
|| !mips_symbolic_constant_p (XEXP (x, 0), &symbol_type)
|
||||||
|
@ -1008,7 +1008,6 @@ mmix_constant_address_p (rtx x)
|
|||||||
case SYMBOL_REF:
|
case SYMBOL_REF:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case CONSTANT_P_RTX:
|
|
||||||
case HIGH:
|
case HIGH:
|
||||||
/* FIXME: Don't know how to dissect these. Avoid them for now,
|
/* FIXME: Don't know how to dissect these. Avoid them for now,
|
||||||
except we know they're constants. */
|
except we know they're constants. */
|
||||||
|
@ -592,9 +592,6 @@ move_src_operand (rtx op, enum machine_mode mode)
|
|||||||
if (register_operand (op, mode))
|
if (register_operand (op, mode))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (GET_CODE (op) == CONSTANT_P_RTX)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (GET_CODE (op) == CONST_INT)
|
if (GET_CODE (op) == CONST_INT)
|
||||||
return cint_ok_for_move (INTVAL (op));
|
return cint_ok_for_move (INTVAL (op));
|
||||||
|
|
||||||
|
@ -1987,7 +1987,7 @@ do { \
|
|||||||
#define PREDICATE_CODES \
|
#define PREDICATE_CODES \
|
||||||
{"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \
|
{"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE}}, \
|
||||||
{"call_operand_address", {LABEL_REF, SYMBOL_REF, CONST_INT, \
|
{"call_operand_address", {LABEL_REF, SYMBOL_REF, CONST_INT, \
|
||||||
CONST_DOUBLE, CONST, HIGH, CONSTANT_P_RTX}}, \
|
CONST_DOUBLE, CONST, HIGH}}, \
|
||||||
{"indexed_memory_operand", {SUBREG, MEM}}, \
|
{"indexed_memory_operand", {SUBREG, MEM}}, \
|
||||||
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
|
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
|
||||||
{"symbolic_memory_operand", {SUBREG, MEM}}, \
|
{"symbolic_memory_operand", {SUBREG, MEM}}, \
|
||||||
@ -1995,7 +1995,7 @@ do { \
|
|||||||
{"reg_or_0_or_nonsymb_mem_operand", {SUBREG, REG, MEM, CONST_INT, \
|
{"reg_or_0_or_nonsymb_mem_operand", {SUBREG, REG, MEM, CONST_INT, \
|
||||||
CONST_DOUBLE}}, \
|
CONST_DOUBLE}}, \
|
||||||
{"move_dest_operand", {SUBREG, REG, MEM}}, \
|
{"move_dest_operand", {SUBREG, REG, MEM}}, \
|
||||||
{"move_src_operand", {SUBREG, REG, CONSTANT_P_RTX, CONST_INT, MEM}}, \
|
{"move_src_operand", {SUBREG, REG, CONST_INT, MEM}}, \
|
||||||
{"reg_or_cint_move_operand", {SUBREG, REG, CONST_INT}}, \
|
{"reg_or_cint_move_operand", {SUBREG, REG, CONST_INT}}, \
|
||||||
{"pic_label_operand", {LABEL_REF, CONST}}, \
|
{"pic_label_operand", {LABEL_REF, CONST}}, \
|
||||||
{"fp_reg_operand", {REG}}, \
|
{"fp_reg_operand", {REG}}, \
|
||||||
|
@ -51,12 +51,37 @@
|
|||||||
#define REAL_NM_FILE_NAME "/usr/ucb/nm"
|
#define REAL_NM_FILE_NAME "/usr/ucb/nm"
|
||||||
|
|
||||||
#define USER_LABEL_PREFIX ""
|
#define USER_LABEL_PREFIX ""
|
||||||
|
|
||||||
/* Don't turn -B into -L if the argument specifies a relative file name. */
|
/* Don't turn -B into -L if the argument specifies a relative file name. */
|
||||||
#define RELATIVE_PREFIX_NOT_LINKDIR
|
#define RELATIVE_PREFIX_NOT_LINKDIR
|
||||||
|
|
||||||
/* Because of the above, we must have gcc search itself to find libgcc.a. */
|
/* Because of the above, we must have gcc search itself to find libgcc.a. */
|
||||||
#define LINK_LIBGCC_SPECIAL_1
|
#define LINK_LIBGCC_SPECIAL_1
|
||||||
|
|
||||||
|
#define MFWRAP_SPEC " %{static: %{fmudflap|fmudflapth: \
|
||||||
|
-brename:malloc,__wrap_malloc -brename:__real_malloc,malloc \
|
||||||
|
-brename:free,__wrap_free -brename:__real_free,free \
|
||||||
|
-brename:calloc,__wrap_calloc -brename:__real_calloc,calloc \
|
||||||
|
-brename:realloc,__wrap_realloc -brename:__real_realloc,realloc \
|
||||||
|
-brename:mmap,__wrap_mmap -brename:__real_mmap,mmap \
|
||||||
|
-brename:munmap,__wrap_munmap -brename:__real_munmap,munmap \
|
||||||
|
-brename:alloca,__wrap_alloca -brename:__real_alloca,alloca \
|
||||||
|
} %{fmudflapth: \
|
||||||
|
-brename:pthread_create,__wrap_pthread_create \
|
||||||
|
-brename:__real_pthread_create,pthread_create \
|
||||||
|
-brename:pthread_join,__wrap_pthread_join \
|
||||||
|
-brename:__real_pthread_join,pthread_join \
|
||||||
|
-brename:pthread_exit,__wrap_pthread_exit \
|
||||||
|
-brename:__real_pthread_exit,pthread_exit \
|
||||||
|
}} %{fmudflap|fmudflapth: \
|
||||||
|
-brename:main,__wrap_main -brename:__real_main,main \
|
||||||
|
}"
|
||||||
|
|
||||||
|
#define MFLIB_SPEC " %{fmudflap: -lmudflap \
|
||||||
|
%{static:%(link_gcc_c_sequence) -lmudflap}} \
|
||||||
|
%{fmudflapth: -lmudflapth -lpthread \
|
||||||
|
%{static:%(link_gcc_c_sequence) -lmudflapth}} "
|
||||||
|
|
||||||
/* Names to predefine in the preprocessor for this target machine. */
|
/* Names to predefine in the preprocessor for this target machine. */
|
||||||
#define TARGET_OS_AIX_CPP_BUILTINS() \
|
#define TARGET_OS_AIX_CPP_BUILTINS() \
|
||||||
do \
|
do \
|
||||||
|
@ -2419,10 +2419,6 @@ input_operand (rtx op, enum machine_mode mode)
|
|||||||
if (memory_operand (op, mode))
|
if (memory_operand (op, mode))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Only a tiny bit of handling for CONSTANT_P_RTX is necessary. */
|
|
||||||
if (GET_CODE (op) == CONSTANT_P_RTX)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* For floating-point, easy constants are valid. */
|
/* For floating-point, easy constants are valid. */
|
||||||
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||||
&& CONSTANT_P (op)
|
&& CONSTANT_P (op)
|
||||||
@ -3753,10 +3749,6 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
|
|||||||
|| ! nonimmediate_operand (operands[0], mode)))
|
|| ! nonimmediate_operand (operands[0], mode)))
|
||||||
goto emit_set;
|
goto emit_set;
|
||||||
|
|
||||||
/* Handle the case of CONSTANT_P_RTX. */
|
|
||||||
if (GET_CODE (operands[1]) == CONSTANT_P_RTX)
|
|
||||||
goto emit_set;
|
|
||||||
|
|
||||||
/* 128-bit constant floating-point values on Darwin should really be
|
/* 128-bit constant floating-point values on Darwin should really be
|
||||||
loaded as two parts. */
|
loaded as two parts. */
|
||||||
if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)
|
if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)
|
||||||
@ -13125,7 +13117,8 @@ rs6000_output_function_epilogue (FILE *file,
|
|||||||
Java is 13. Objective-C is 14. */
|
Java is 13. Objective-C is 14. */
|
||||||
if (! strcmp (language_string, "GNU C"))
|
if (! strcmp (language_string, "GNU C"))
|
||||||
i = 0;
|
i = 0;
|
||||||
else if (! strcmp (language_string, "GNU F77"))
|
else if (! strcmp (language_string, "GNU F77")
|
||||||
|
|| ! strcmp (language_string, "GNU F95"))
|
||||||
i = 1;
|
i = 1;
|
||||||
else if (! strcmp (language_string, "GNU Pascal"))
|
else if (! strcmp (language_string, "GNU Pascal"))
|
||||||
i = 2;
|
i = 2;
|
||||||
@ -14120,7 +14113,7 @@ output_function_profiler (FILE *file, int labelno)
|
|||||||
asm_fprintf (file, "\tmflr %s\n", reg_names[0]);
|
asm_fprintf (file, "\tmflr %s\n", reg_names[0]);
|
||||||
asm_fprintf (file, "\tstd %s,16(%s)\n", reg_names[0], reg_names[1]);
|
asm_fprintf (file, "\tstd %s,16(%s)\n", reg_names[0], reg_names[1]);
|
||||||
|
|
||||||
if (current_function_needs_context)
|
if (cfun->static_chain_decl != NULL)
|
||||||
{
|
{
|
||||||
asm_fprintf (file, "\tstd %s,24(%s)\n",
|
asm_fprintf (file, "\tstd %s,24(%s)\n",
|
||||||
reg_names[STATIC_CHAIN_REGNUM], reg_names[1]);
|
reg_names[STATIC_CHAIN_REGNUM], reg_names[1]);
|
||||||
|
@ -18,3 +18,23 @@ rs6000-c.o: $(srcdir)/config/rs6000/rs6000-c.c \
|
|||||||
|
|
||||||
# The rs6000 backend doesn't cause warnings in these files.
|
# The rs6000 backend doesn't cause warnings in these files.
|
||||||
insn-conditions.o-warn =
|
insn-conditions.o-warn =
|
||||||
|
# The files below trigger warnings in tree-ssa because of the gimplifier
|
||||||
|
# emitting code that confuse the compiler into thinking that some variables
|
||||||
|
# are used uninitialized.
|
||||||
|
jump.o-warn = -Wno-error
|
||||||
|
regmove.o-warn = -Wno-error
|
||||||
|
c-typeck.o-warn = -Wno-error
|
||||||
|
cfgrtl.o-warn = -Wno-error
|
||||||
|
combine.o-warn = -Wno-error
|
||||||
|
fold-const.o-warn = -Wno-error
|
||||||
|
ifcvt.o-warn = -Wno-error
|
||||||
|
reload1.o-warn = -Wno-error
|
||||||
|
rtlanal.o-warn = -Wno-error
|
||||||
|
cp/decl2.o-warn = -Wno-error
|
||||||
|
cp/pt.o-warn = -Wno-error
|
||||||
|
f/where.o-warn = -Wno-error
|
||||||
|
java/expr.o-warn = -Wno-error
|
||||||
|
objc/objc-act.o-warn = -Wno-error
|
||||||
|
rs6000.o-warn = -Wno-error
|
||||||
|
insn-emit.o-warn = -Wno-error
|
||||||
|
simplify-rtx.o-warn = -Wno-error
|
||||||
|
@ -2956,18 +2956,14 @@ s390_expand_movstr (rtx dst, rtx src, rtx len)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
rtx dst_addr, src_addr, count, blocks, temp;
|
rtx dst_addr, src_addr, count, blocks, temp;
|
||||||
|
rtx loop_end_label = gen_label_rtx ();
|
||||||
rtx end_label = gen_label_rtx ();
|
rtx end_label = gen_label_rtx ();
|
||||||
enum machine_mode mode;
|
enum machine_mode mode;
|
||||||
tree type;
|
|
||||||
|
|
||||||
mode = GET_MODE (len);
|
mode = GET_MODE (len);
|
||||||
if (mode == VOIDmode)
|
if (mode == VOIDmode)
|
||||||
mode = Pmode;
|
mode = Pmode;
|
||||||
|
|
||||||
type = lang_hooks.types.type_for_mode (mode, 1);
|
|
||||||
if (!type)
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
dst_addr = gen_reg_rtx (Pmode);
|
dst_addr = gen_reg_rtx (Pmode);
|
||||||
src_addr = gen_reg_rtx (Pmode);
|
src_addr = gen_reg_rtx (Pmode);
|
||||||
count = gen_reg_rtx (mode);
|
count = gen_reg_rtx (mode);
|
||||||
@ -2990,10 +2986,9 @@ s390_expand_movstr (rtx dst, rtx src, rtx len)
|
|||||||
if (temp != blocks)
|
if (temp != blocks)
|
||||||
emit_move_insn (blocks, temp);
|
emit_move_insn (blocks, temp);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (blocks, const0_rtx,
|
||||||
|
EQ, NULL_RTX, mode, 1, loop_end_label);
|
||||||
expand_start_loop (1);
|
expand_start_loop (1);
|
||||||
expand_exit_loop_top_cond (0, build (NE_EXPR, type,
|
|
||||||
make_tree (type, blocks),
|
|
||||||
make_tree (type, const0_rtx)));
|
|
||||||
|
|
||||||
emit_insn (gen_movstr_short (dst, src, GEN_INT (255)));
|
emit_insn (gen_movstr_short (dst, src, GEN_INT (255)));
|
||||||
s390_load_address (dst_addr,
|
s390_load_address (dst_addr,
|
||||||
@ -3005,7 +3000,10 @@ s390_expand_movstr (rtx dst, rtx src, rtx len)
|
|||||||
if (temp != blocks)
|
if (temp != blocks)
|
||||||
emit_move_insn (blocks, temp);
|
emit_move_insn (blocks, temp);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (blocks, const0_rtx,
|
||||||
|
EQ, NULL_RTX, mode, 1, loop_end_label);
|
||||||
expand_end_loop ();
|
expand_end_loop ();
|
||||||
|
emit_label (loop_end_label);
|
||||||
|
|
||||||
emit_insn (gen_movstr_short (dst, src,
|
emit_insn (gen_movstr_short (dst, src,
|
||||||
convert_to_mode (Pmode, count, 1)));
|
convert_to_mode (Pmode, count, 1)));
|
||||||
@ -3032,18 +3030,14 @@ s390_expand_clrstr (rtx dst, rtx len)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
rtx dst_addr, src_addr, count, blocks, temp;
|
rtx dst_addr, src_addr, count, blocks, temp;
|
||||||
|
rtx loop_end_label = gen_label_rtx ();
|
||||||
rtx end_label = gen_label_rtx ();
|
rtx end_label = gen_label_rtx ();
|
||||||
enum machine_mode mode;
|
enum machine_mode mode;
|
||||||
tree type;
|
|
||||||
|
|
||||||
mode = GET_MODE (len);
|
mode = GET_MODE (len);
|
||||||
if (mode == VOIDmode)
|
if (mode == VOIDmode)
|
||||||
mode = Pmode;
|
mode = Pmode;
|
||||||
|
|
||||||
type = lang_hooks.types.type_for_mode (mode, 1);
|
|
||||||
if (!type)
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
dst_addr = gen_reg_rtx (Pmode);
|
dst_addr = gen_reg_rtx (Pmode);
|
||||||
src_addr = gen_reg_rtx (Pmode);
|
src_addr = gen_reg_rtx (Pmode);
|
||||||
count = gen_reg_rtx (mode);
|
count = gen_reg_rtx (mode);
|
||||||
@ -3064,10 +3058,9 @@ s390_expand_clrstr (rtx dst, rtx len)
|
|||||||
if (temp != blocks)
|
if (temp != blocks)
|
||||||
emit_move_insn (blocks, temp);
|
emit_move_insn (blocks, temp);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (blocks, const0_rtx,
|
||||||
|
EQ, NULL_RTX, mode, 1, loop_end_label);
|
||||||
expand_start_loop (1);
|
expand_start_loop (1);
|
||||||
expand_exit_loop_top_cond (0, build (NE_EXPR, type,
|
|
||||||
make_tree (type, blocks),
|
|
||||||
make_tree (type, const0_rtx)));
|
|
||||||
|
|
||||||
emit_insn (gen_clrstr_short (dst, GEN_INT (255)));
|
emit_insn (gen_clrstr_short (dst, GEN_INT (255)));
|
||||||
s390_load_address (dst_addr,
|
s390_load_address (dst_addr,
|
||||||
@ -3077,7 +3070,10 @@ s390_expand_clrstr (rtx dst, rtx len)
|
|||||||
if (temp != blocks)
|
if (temp != blocks)
|
||||||
emit_move_insn (blocks, temp);
|
emit_move_insn (blocks, temp);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (blocks, const0_rtx,
|
||||||
|
EQ, NULL_RTX, mode, 1, loop_end_label);
|
||||||
expand_end_loop ();
|
expand_end_loop ();
|
||||||
|
emit_label (loop_end_label);
|
||||||
|
|
||||||
emit_insn (gen_clrstr_short (dst, convert_to_mode (Pmode, count, 1)));
|
emit_insn (gen_clrstr_short (dst, convert_to_mode (Pmode, count, 1)));
|
||||||
emit_label (end_label);
|
emit_label (end_label);
|
||||||
@ -3120,18 +3116,14 @@ s390_expand_cmpmem (rtx target, rtx op0, rtx op1, rtx len)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
rtx addr0, addr1, count, blocks, temp;
|
rtx addr0, addr1, count, blocks, temp;
|
||||||
|
rtx loop_end_label = gen_label_rtx ();
|
||||||
rtx end_label = gen_label_rtx ();
|
rtx end_label = gen_label_rtx ();
|
||||||
enum machine_mode mode;
|
enum machine_mode mode;
|
||||||
tree type;
|
|
||||||
|
|
||||||
mode = GET_MODE (len);
|
mode = GET_MODE (len);
|
||||||
if (mode == VOIDmode)
|
if (mode == VOIDmode)
|
||||||
mode = Pmode;
|
mode = Pmode;
|
||||||
|
|
||||||
type = lang_hooks.types.type_for_mode (mode, 1);
|
|
||||||
if (!type)
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
addr0 = gen_reg_rtx (Pmode);
|
addr0 = gen_reg_rtx (Pmode);
|
||||||
addr1 = gen_reg_rtx (Pmode);
|
addr1 = gen_reg_rtx (Pmode);
|
||||||
count = gen_reg_rtx (mode);
|
count = gen_reg_rtx (mode);
|
||||||
@ -3154,10 +3146,9 @@ s390_expand_cmpmem (rtx target, rtx op0, rtx op1, rtx len)
|
|||||||
if (temp != blocks)
|
if (temp != blocks)
|
||||||
emit_move_insn (blocks, temp);
|
emit_move_insn (blocks, temp);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (blocks, const0_rtx,
|
||||||
|
EQ, NULL_RTX, mode, 1, loop_end_label);
|
||||||
expand_start_loop (1);
|
expand_start_loop (1);
|
||||||
expand_exit_loop_top_cond (0, build (NE_EXPR, type,
|
|
||||||
make_tree (type, blocks),
|
|
||||||
make_tree (type, const0_rtx)));
|
|
||||||
|
|
||||||
emit_insn (gen_cmpmem_short (op0, op1, GEN_INT (255)));
|
emit_insn (gen_cmpmem_short (op0, op1, GEN_INT (255)));
|
||||||
temp = gen_rtx_NE (VOIDmode, gen_rtx_REG (CCSmode, 33), const0_rtx);
|
temp = gen_rtx_NE (VOIDmode, gen_rtx_REG (CCSmode, 33), const0_rtx);
|
||||||
@ -3175,7 +3166,10 @@ s390_expand_cmpmem (rtx target, rtx op0, rtx op1, rtx len)
|
|||||||
if (temp != blocks)
|
if (temp != blocks)
|
||||||
emit_move_insn (blocks, temp);
|
emit_move_insn (blocks, temp);
|
||||||
|
|
||||||
|
emit_cmp_and_jump_insns (blocks, const0_rtx,
|
||||||
|
EQ, NULL_RTX, mode, 1, loop_end_label);
|
||||||
expand_end_loop ();
|
expand_end_loop ();
|
||||||
|
emit_label (loop_end_label);
|
||||||
|
|
||||||
emit_insn (gen_cmpmem_short (op0, op1,
|
emit_insn (gen_cmpmem_short (op0, op1,
|
||||||
convert_to_mode (Pmode, count, 1)));
|
convert_to_mode (Pmode, count, 1)));
|
||||||
|
@ -4704,7 +4704,7 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
|
|||||||
for (i = FIRST_PARM_REG;
|
for (i = FIRST_PARM_REG;
|
||||||
i < FIRST_PARM_REG + NPARM_REGS (SImode); i++)
|
i < FIRST_PARM_REG + NPARM_REGS (SImode); i++)
|
||||||
CLEAR_HARD_REG_BIT (temps, i);
|
CLEAR_HARD_REG_BIT (temps, i);
|
||||||
if (current_function_needs_context)
|
if (cfun->static_chain_decl != NULL)
|
||||||
CLEAR_HARD_REG_BIT (temps, STATIC_CHAIN_REGNUM);
|
CLEAR_HARD_REG_BIT (temps, STATIC_CHAIN_REGNUM);
|
||||||
}
|
}
|
||||||
temp = scavenge_reg (&temps);
|
temp = scavenge_reg (&temps);
|
||||||
@ -5161,7 +5161,7 @@ sh5_schedule_saves (HARD_REG_SET *live_regs_mask, save_schedule *schedule,
|
|||||||
if (call_used_regs[i] && ! fixed_regs[i] && i != PR_MEDIA_REG
|
if (call_used_regs[i] && ! fixed_regs[i] && i != PR_MEDIA_REG
|
||||||
&& ! FUNCTION_ARG_REGNO_P (i)
|
&& ! FUNCTION_ARG_REGNO_P (i)
|
||||||
&& i != FIRST_RET_REG
|
&& i != FIRST_RET_REG
|
||||||
&& ! (current_function_needs_context && i == STATIC_CHAIN_REGNUM)
|
&& ! (cfun->static_chain_decl != NULL && i == STATIC_CHAIN_REGNUM)
|
||||||
&& ! (current_function_calls_eh_return
|
&& ! (current_function_calls_eh_return
|
||||||
&& (i == EH_RETURN_STACKADJ_REGNO
|
&& (i == EH_RETURN_STACKADJ_REGNO
|
||||||
|| ((unsigned) i <= EH_RETURN_DATA_REGNO (0)
|
|| ((unsigned) i <= EH_RETURN_DATA_REGNO (0)
|
||||||
|
@ -1280,10 +1280,6 @@ input_operand (rtx op, enum machine_mode mode)
|
|||||||
if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op))
|
if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Accept CONSTANT_P_RTX, since it will be gone by CSE1 and result in 0/1. */
|
|
||||||
if (GET_CODE (op) == CONSTANT_P_RTX)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* Allow any one instruction integer constant, and all CONST_INT
|
/* Allow any one instruction integer constant, and all CONST_INT
|
||||||
variants when we are working in DImode and !arch64. */
|
variants when we are working in DImode and !arch64. */
|
||||||
if (GET_MODE_CLASS (mode) == MODE_INT
|
if (GET_MODE_CLASS (mode) == MODE_INT
|
||||||
|
@ -1136,7 +1136,6 @@ movsi_source_operand (rtx op, enum machine_mode mode)
|
|||||||
must be done with HIGH & LO_SUM patterns. */
|
must be done with HIGH & LO_SUM patterns. */
|
||||||
if (CONSTANT_P (op)
|
if (CONSTANT_P (op)
|
||||||
&& GET_CODE (op) != HIGH
|
&& GET_CODE (op) != HIGH
|
||||||
&& GET_CODE (op) != CONSTANT_P_RTX
|
|
||||||
&& !(GET_CODE (op) == CONST_INT
|
&& !(GET_CODE (op) == CONST_INT
|
||||||
&& (CONST_OK_FOR_J (INTVAL (op))
|
&& (CONST_OK_FOR_J (INTVAL (op))
|
||||||
|| CONST_OK_FOR_K (INTVAL (op))
|
|| CONST_OK_FOR_K (INTVAL (op))
|
||||||
|
@ -627,11 +627,6 @@ move_operand (rtx op, enum machine_mode mode)
|
|||||||
|
|
||||||
case HImode:
|
case HImode:
|
||||||
case QImode:
|
case QImode:
|
||||||
/* Accept CONSTANT_P_RTX, since it will be gone by CSE1 and
|
|
||||||
result in 0/1. */
|
|
||||||
if (GET_CODE (op) == CONSTANT_P_RTX)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
if (GET_CODE (op) == CONST_INT && xtensa_simm12b (INTVAL (op)))
|
if (GET_CODE (op) == CONST_INT && xtensa_simm12b (INTVAL (op)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
@ -1252,7 +1247,6 @@ int
|
|||||||
xtensa_emit_move_sequence (rtx *operands, enum machine_mode mode)
|
xtensa_emit_move_sequence (rtx *operands, enum machine_mode mode)
|
||||||
{
|
{
|
||||||
if (CONSTANT_P (operands[1])
|
if (CONSTANT_P (operands[1])
|
||||||
&& GET_CODE (operands[1]) != CONSTANT_P_RTX
|
|
||||||
&& (GET_CODE (operands[1]) != CONST_INT
|
&& (GET_CODE (operands[1]) != CONST_INT
|
||||||
|| !xtensa_simm12b (INTVAL (operands[1]))))
|
|| !xtensa_simm12b (INTVAL (operands[1]))))
|
||||||
{
|
{
|
||||||
@ -2229,7 +2223,7 @@ long
|
|||||||
compute_frame_size (int size)
|
compute_frame_size (int size)
|
||||||
{
|
{
|
||||||
/* Add space for the incoming static chain value. */
|
/* Add space for the incoming static chain value. */
|
||||||
if (current_function_needs_context)
|
if (cfun->static_chain_decl != NULL)
|
||||||
size += (1 * UNITS_PER_WORD);
|
size += (1 * UNITS_PER_WORD);
|
||||||
|
|
||||||
xtensa_current_frame_size =
|
xtensa_current_frame_size =
|
||||||
|
69
gcc/configure
vendored
69
gcc/configure
vendored
@ -309,7 +309,7 @@ ac_includes_default="\
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default LIBOBJS LTLIBOBJS'
|
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags TREEBROWSER enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
|
||||||
ac_subst_files='language_hooks'
|
ac_subst_files='language_hooks'
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
@ -770,6 +770,14 @@ ac_env_CPP_set=${CPP+set}
|
|||||||
ac_env_CPP_value=$CPP
|
ac_env_CPP_value=$CPP
|
||||||
ac_cv_env_CPP_set=${CPP+set}
|
ac_cv_env_CPP_set=${CPP+set}
|
||||||
ac_cv_env_CPP_value=$CPP
|
ac_cv_env_CPP_value=$CPP
|
||||||
|
ac_env_GMPLIBS_set=${GMPLIBS+set}
|
||||||
|
ac_env_GMPLIBS_value=$GMPLIBS
|
||||||
|
ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
|
||||||
|
ac_cv_env_GMPLIBS_value=$GMPLIBS
|
||||||
|
ac_env_GMPINC_set=${GMPINC+set}
|
||||||
|
ac_env_GMPINC_value=$GMPINC
|
||||||
|
ac_cv_env_GMPINC_set=${GMPINC+set}
|
||||||
|
ac_cv_env_GMPINC_value=$GMPINC
|
||||||
|
|
||||||
#
|
#
|
||||||
# Report the --help message.
|
# Report the --help message.
|
||||||
@ -868,6 +876,7 @@ Optional Features:
|
|||||||
optimization. Values are opt, noopt,
|
optimization. Values are opt, noopt,
|
||||||
default is noopt
|
default is noopt
|
||||||
--enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
|
--enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
|
||||||
|
--enable-tree-browser enable the tree browsing routines for debugging
|
||||||
--enable-multilib enable library support for multiple ABIs
|
--enable-multilib enable library support for multiple ABIs
|
||||||
--enable-__cxa_atexit enable __cxa_atexit for C++
|
--enable-__cxa_atexit enable __cxa_atexit for C++
|
||||||
--enable-threads enable thread usage for target GCC
|
--enable-threads enable thread usage for target GCC
|
||||||
@ -915,6 +924,7 @@ Optional Packages:
|
|||||||
--with-gc={page,zone} choose the garbage collection mechanism to use
|
--with-gc={page,zone} choose the garbage collection mechanism to use
|
||||||
with the compiler
|
with the compiler
|
||||||
--with-system-zlib use installed libz
|
--with-system-zlib use installed libz
|
||||||
|
--with-libbanshee enable libbanshee
|
||||||
--with-slibdir=DIR shared libraries in DIR LIBDIR
|
--with-slibdir=DIR shared libraries in DIR LIBDIR
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
@ -925,6 +935,8 @@ Some influential environment variables:
|
|||||||
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
|
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
|
||||||
headers in a nonstandard directory <include dir>
|
headers in a nonstandard directory <include dir>
|
||||||
CPP C preprocessor
|
CPP C preprocessor
|
||||||
|
GMPLIBS How to link GMP
|
||||||
|
GMPINC How to find GMP include files
|
||||||
|
|
||||||
Use these variables to override the choices made by `configure' or to help
|
Use these variables to override the choices made by `configure' or to help
|
||||||
it to find libraries and programs with nonstandard names/locations.
|
it to find libraries and programs with nonstandard names/locations.
|
||||||
@ -4673,6 +4685,18 @@ _ACEOF
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check whether --enable-tree-browser or --disable-tree-browser was given.
|
||||||
|
if test "${enable_tree_browser+set}" = set; then
|
||||||
|
enableval="$enable_tree_browser"
|
||||||
|
|
||||||
|
else
|
||||||
|
enable_tree_browser=no
|
||||||
|
fi;
|
||||||
|
if test x$enable_tree_browser = xyes ; then
|
||||||
|
TREEBROWSER=tree-browser.o
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Miscenalleous configure options
|
# Miscenalleous configure options
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
@ -5283,7 +5307,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
|
|||||||
else
|
else
|
||||||
ac_prog_version=`$MAKEINFO --version 2>&1 |
|
ac_prog_version=`$MAKEINFO --version 2>&1 |
|
||||||
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
|
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
|
||||||
echo "configure:5286: version of makeinfo is $ac_prog_version" >&5
|
echo "configure:5310: version of makeinfo is $ac_prog_version" >&5
|
||||||
case $ac_prog_version in
|
case $ac_prog_version in
|
||||||
'') gcc_cv_prog_makeinfo_modern=no;;
|
'') gcc_cv_prog_makeinfo_modern=no;;
|
||||||
4.[2-9]*)
|
4.[2-9]*)
|
||||||
@ -12131,6 +12155,38 @@ else
|
|||||||
MAINT='#'
|
MAINT='#'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking whether to use libbanshee for points-to alias analysis" >&5
|
||||||
|
echo $ECHO_N "checking whether to use libbanshee for points-to alias analysis... $ECHO_C" >&6
|
||||||
|
|
||||||
|
# Check whether --with-libbanshee or --without-libbanshee was given.
|
||||||
|
if test "${with_libbanshee+set}" = set; then
|
||||||
|
withval="$with_libbanshee"
|
||||||
|
libbanshee="$with_libbanshee"
|
||||||
|
else
|
||||||
|
libbanshee=no
|
||||||
|
fi;
|
||||||
|
|
||||||
|
if test x"$libbanshee" = xyes; then
|
||||||
|
BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a "
|
||||||
|
BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to"
|
||||||
|
ANDER="tree-alias-ander.o"
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define HAVE_BANSHEE 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
else
|
||||||
|
BANSHEELIB=""
|
||||||
|
BANSHEEINC=""
|
||||||
|
ANDER=""
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $with_libbanshee" >&5
|
||||||
|
echo "${ECHO_T}$with_libbanshee" >&6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --------------
|
# --------------
|
||||||
# Language hooks
|
# Language hooks
|
||||||
# --------------
|
# --------------
|
||||||
@ -12430,6 +12486,9 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Configure the subdirectories
|
# Configure the subdirectories
|
||||||
# AC_CONFIG_SUBDIRS($subdirs)
|
# AC_CONFIG_SUBDIRS($subdirs)
|
||||||
|
|
||||||
@ -13099,6 +13158,7 @@ s,@valgrind_path@,$valgrind_path,;t t
|
|||||||
s,@valgrind_path_defines@,$valgrind_path_defines,;t t
|
s,@valgrind_path_defines@,$valgrind_path_defines,;t t
|
||||||
s,@valgrind_command@,$valgrind_command,;t t
|
s,@valgrind_command@,$valgrind_command,;t t
|
||||||
s,@coverage_flags@,$coverage_flags,;t t
|
s,@coverage_flags@,$coverage_flags,;t t
|
||||||
|
s,@TREEBROWSER@,$TREEBROWSER,;t t
|
||||||
s,@enable_multilib@,$enable_multilib,;t t
|
s,@enable_multilib@,$enable_multilib,;t t
|
||||||
s,@enable_shared@,$enable_shared,;t t
|
s,@enable_shared@,$enable_shared,;t t
|
||||||
s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
|
s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
|
||||||
@ -13159,6 +13219,9 @@ s,@GGC@,$GGC,;t t
|
|||||||
s,@zlibdir@,$zlibdir,;t t
|
s,@zlibdir@,$zlibdir,;t t
|
||||||
s,@zlibinc@,$zlibinc,;t t
|
s,@zlibinc@,$zlibinc,;t t
|
||||||
s,@MAINT@,$MAINT,;t t
|
s,@MAINT@,$MAINT,;t t
|
||||||
|
s,@ANDER@,$ANDER,;t t
|
||||||
|
s,@BANSHEEINC@,$BANSHEEINC,;t t
|
||||||
|
s,@BANSHEELIB@,$BANSHEELIB,;t t
|
||||||
s,@gcc_tooldir@,$gcc_tooldir,;t t
|
s,@gcc_tooldir@,$gcc_tooldir,;t t
|
||||||
s,@dollar@,$dollar,;t t
|
s,@dollar@,$dollar,;t t
|
||||||
s,@slibdir@,$slibdir,;t t
|
s,@slibdir@,$slibdir,;t t
|
||||||
@ -13228,6 +13291,8 @@ s,@target_noncanonical@,$target_noncanonical,;t t
|
|||||||
s,@c_target_objs@,$c_target_objs,;t t
|
s,@c_target_objs@,$c_target_objs,;t t
|
||||||
s,@cxx_target_objs@,$cxx_target_objs,;t t
|
s,@cxx_target_objs@,$cxx_target_objs,;t t
|
||||||
s,@target_cpu_default@,$target_cpu_default,;t t
|
s,@target_cpu_default@,$target_cpu_default,;t t
|
||||||
|
s,@GMPLIBS@,$GMPLIBS,;t t
|
||||||
|
s,@GMPINC@,$GMPINC,;t t
|
||||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||||
/@language_hooks@/r $language_hooks
|
/@language_hooks@/r $language_hooks
|
||||||
|
@ -544,6 +544,14 @@ if test x$enable_gather_detailed_mem_stats = xyes ; then
|
|||||||
[Define to enable detailed memory allocation stats gathering.])
|
[Define to enable detailed memory allocation stats gathering.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(tree-browser,
|
||||||
|
[ --enable-tree-browser enable the tree browsing routines for debugging], [],
|
||||||
|
[enable_tree_browser=no])
|
||||||
|
if test x$enable_tree_browser = xyes ; then
|
||||||
|
TREEBROWSER=tree-browser.o
|
||||||
|
fi
|
||||||
|
AC_SUBST(TREEBROWSER)
|
||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Miscenalleous configure options
|
# Miscenalleous configure options
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
@ -2847,6 +2855,28 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(MAINT)dnl
|
AC_SUBST(MAINT)dnl
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to use libbanshee for points-to alias analysis])
|
||||||
|
AC_ARG_WITH(libbanshee,
|
||||||
|
[ --with-libbanshee enable libbanshee],
|
||||||
|
libbanshee="$with_libbanshee",
|
||||||
|
libbanshee=no)
|
||||||
|
|
||||||
|
if test x"$libbanshee" = xyes; then
|
||||||
|
BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a "
|
||||||
|
BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to"
|
||||||
|
ANDER="tree-alias-ander.o"
|
||||||
|
AC_DEFINE(HAVE_BANSHEE, 1, [Define if BANSHEE is available])
|
||||||
|
else
|
||||||
|
BANSHEELIB=""
|
||||||
|
BANSHEEINC=""
|
||||||
|
ANDER=""
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($with_libbanshee)
|
||||||
|
|
||||||
|
AC_SUBST(ANDER)
|
||||||
|
AC_SUBST(BANSHEEINC)
|
||||||
|
AC_SUBST(BANSHEELIB)
|
||||||
|
|
||||||
# --------------
|
# --------------
|
||||||
# Language hooks
|
# Language hooks
|
||||||
# --------------
|
# --------------
|
||||||
@ -3143,6 +3173,9 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_VAR(GMPLIBS,[How to link GMP])
|
||||||
|
AC_ARG_VAR(GMPINC,[How to find GMP include files])
|
||||||
|
|
||||||
# Configure the subdirectories
|
# Configure the subdirectories
|
||||||
# AC_CONFIG_SUBDIRS($subdirs)
|
# AC_CONFIG_SUBDIRS($subdirs)
|
||||||
|
|
||||||
|
@ -96,7 +96,11 @@ static char *da_file_name;
|
|||||||
/* Hash table of count data. */
|
/* Hash table of count data. */
|
||||||
static htab_t counts_hash = NULL;
|
static htab_t counts_hash = NULL;
|
||||||
|
|
||||||
/* The names of the counter tables. */
|
/* Trees representing the counter table arrays. */
|
||||||
|
static GTY(()) tree tree_ctr_tables[GCOV_COUNTERS];
|
||||||
|
|
||||||
|
/* The names of the counter tables. Not used if we're
|
||||||
|
generating counters at tree level. */
|
||||||
static GTY(()) rtx ctr_labels[GCOV_COUNTERS];
|
static GTY(()) rtx ctr_labels[GCOV_COUNTERS];
|
||||||
|
|
||||||
/* The names of merge functions for counters. */
|
/* The names of merge functions for counters. */
|
||||||
@ -369,14 +373,22 @@ coverage_counter_alloc (unsigned counter, unsigned num)
|
|||||||
if (!num)
|
if (!num)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (!ctr_labels[counter])
|
if (!tree_ctr_tables[counter])
|
||||||
{
|
{
|
||||||
/* Generate and save a copy of this so it can be shared. */
|
/* Generate and save a copy of this so it can be shared. */
|
||||||
|
/* We don't know the size yet; make it big enough that nobody
|
||||||
|
will make any clever transformation on it. */
|
||||||
char buf[20];
|
char buf[20];
|
||||||
|
tree domain_tree
|
||||||
|
= build_index_type (build_int_2 (1000, 0)); /* replaced later */
|
||||||
|
tree gcov_type_array_type
|
||||||
|
= build_array_type (GCOV_TYPE_NODE, domain_tree);
|
||||||
|
tree_ctr_tables[counter]
|
||||||
|
= build_decl (VAR_DECL, NULL_TREE, gcov_type_array_type);
|
||||||
|
TREE_STATIC (tree_ctr_tables[counter]) = 1;
|
||||||
ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1);
|
ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1);
|
||||||
ctr_labels[counter] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
|
DECL_NAME (tree_ctr_tables[counter]) = get_identifier (buf);
|
||||||
SYMBOL_REF_FLAGS (ctr_labels[counter]) = SYMBOL_FLAG_LOCAL;
|
DECL_ALIGN (tree_ctr_tables[counter]) = TYPE_ALIGN (GCOV_TYPE_NODE);
|
||||||
}
|
}
|
||||||
fn_b_ctrs[counter] = fn_n_ctrs[counter];
|
fn_b_ctrs[counter] = fn_n_ctrs[counter];
|
||||||
fn_n_ctrs[counter] += num;
|
fn_n_ctrs[counter] += num;
|
||||||
@ -387,7 +399,7 @@ coverage_counter_alloc (unsigned counter, unsigned num)
|
|||||||
/* Generate a MEM rtl to access COUNTER NO. */
|
/* Generate a MEM rtl to access COUNTER NO. */
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
coverage_counter_ref (unsigned counter, unsigned no)
|
rtl_coverage_counter_ref (unsigned counter, unsigned no)
|
||||||
{
|
{
|
||||||
unsigned gcov_size = tree_low_cst (TYPE_SIZE (GCOV_TYPE_NODE), 1);
|
unsigned gcov_size = tree_low_cst (TYPE_SIZE (GCOV_TYPE_NODE), 1);
|
||||||
enum machine_mode mode = mode_for_size (gcov_size, MODE_INT, 0);
|
enum machine_mode mode = mode_for_size (gcov_size, MODE_INT, 0);
|
||||||
@ -396,6 +408,13 @@ coverage_counter_ref (unsigned counter, unsigned no)
|
|||||||
if (no >= fn_n_ctrs[counter] - fn_b_ctrs[counter])
|
if (no >= fn_n_ctrs[counter] - fn_b_ctrs[counter])
|
||||||
abort ();
|
abort ();
|
||||||
no += prg_n_ctrs[counter] + fn_b_ctrs[counter];
|
no += prg_n_ctrs[counter] + fn_b_ctrs[counter];
|
||||||
|
if (!ctr_labels[counter])
|
||||||
|
{
|
||||||
|
ctr_labels[counter] = gen_rtx_SYMBOL_REF (Pmode,
|
||||||
|
ggc_strdup (IDENTIFIER_POINTER (DECL_NAME
|
||||||
|
(tree_ctr_tables[counter]))));
|
||||||
|
SYMBOL_REF_FLAGS (ctr_labels[counter]) = SYMBOL_FLAG_LOCAL;
|
||||||
|
}
|
||||||
ref = plus_constant (ctr_labels[counter], gcov_size / BITS_PER_UNIT * no);
|
ref = plus_constant (ctr_labels[counter], gcov_size / BITS_PER_UNIT * no);
|
||||||
ref = gen_rtx_MEM (mode, ref);
|
ref = gen_rtx_MEM (mode, ref);
|
||||||
set_mem_alias_set (ref, new_alias_set ());
|
set_mem_alias_set (ref, new_alias_set ());
|
||||||
@ -403,6 +422,23 @@ coverage_counter_ref (unsigned counter, unsigned no)
|
|||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Generate a tree to access COUNTER NO. */
|
||||||
|
|
||||||
|
tree
|
||||||
|
tree_coverage_counter_ref (unsigned counter, unsigned no)
|
||||||
|
{
|
||||||
|
tree t;
|
||||||
|
|
||||||
|
if (no >= fn_n_ctrs[counter] - fn_b_ctrs[counter])
|
||||||
|
abort ();
|
||||||
|
no += prg_n_ctrs[counter] + fn_b_ctrs[counter];
|
||||||
|
|
||||||
|
/* "no" here is an array index, scaled to bytes later. */
|
||||||
|
t = build (ARRAY_REF, GCOV_TYPE_NODE, tree_ctr_tables[counter],
|
||||||
|
build_int_2 (no, 0));
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
/* Generate a checksum for a string. CHKSUM is the current
|
/* Generate a checksum for a string. CHKSUM is the current
|
||||||
checksum. */
|
checksum. */
|
||||||
@ -684,19 +720,20 @@ build_ctr_info_value (unsigned int counter, tree type)
|
|||||||
|
|
||||||
if (prg_n_ctrs[counter])
|
if (prg_n_ctrs[counter])
|
||||||
{
|
{
|
||||||
tree array_type, array;
|
tree array_type;
|
||||||
|
|
||||||
array_type = build_index_type (build_int_2 (prg_n_ctrs[counter] - 1, 0));
|
array_type = build_index_type (build_int_2 (prg_n_ctrs[counter] - 1, 0));
|
||||||
array_type = build_array_type (TREE_TYPE (TREE_TYPE (fields)),
|
array_type = build_array_type (TREE_TYPE (TREE_TYPE (fields)),
|
||||||
array_type);
|
array_type);
|
||||||
|
|
||||||
array = build_decl (VAR_DECL, NULL_TREE, array_type);
|
TREE_TYPE (tree_ctr_tables[counter]) = array_type;
|
||||||
TREE_STATIC (array) = 1;
|
DECL_SIZE (tree_ctr_tables[counter]) = TYPE_SIZE (array_type);
|
||||||
DECL_NAME (array) = get_identifier (XSTR (ctr_labels[counter], 0));
|
DECL_SIZE_UNIT (tree_ctr_tables[counter]) = TYPE_SIZE_UNIT (array_type);
|
||||||
assemble_variable (array, 0, 0, 0);
|
assemble_variable (tree_ctr_tables[counter], 0, 0, 0);
|
||||||
|
|
||||||
value = tree_cons (fields,
|
value = tree_cons (fields,
|
||||||
build1 (ADDR_EXPR, TREE_TYPE (fields), array),
|
build1 (ADDR_EXPR, TREE_TYPE (fields),
|
||||||
|
tree_ctr_tables[counter]),
|
||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -38,7 +38,9 @@ extern int coverage_begin_output (void);
|
|||||||
/* Allocate some counters. Repeatable per function. */
|
/* Allocate some counters. Repeatable per function. */
|
||||||
extern int coverage_counter_alloc (unsigned /*counter*/, unsigned/*num*/);
|
extern int coverage_counter_alloc (unsigned /*counter*/, unsigned/*num*/);
|
||||||
/* Use a counter from the most recent allocation. */
|
/* Use a counter from the most recent allocation. */
|
||||||
extern rtx coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/);
|
extern rtx rtl_coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/);
|
||||||
|
/* Use a counter from the most recent allocation. */
|
||||||
|
extern tree tree_coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/);
|
||||||
|
|
||||||
/* Get all the counters for the current function. */
|
/* Get all the counters for the current function. */
|
||||||
extern gcov_type *get_coverage_counts (unsigned /*counter*/,
|
extern gcov_type *get_coverage_counts (unsigned /*counter*/,
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
2004-05-13 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
Merge from tree-ssa-20020619-branch. See
|
||||||
|
ChangeLog.tree-ssa for details.
|
||||||
|
|
||||||
|
* Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
|
||||||
|
cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
|
||||||
|
expr.c, init.c, name-lookup.h, optimize.c, parser.c,
|
||||||
|
pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
|
||||||
|
Merged.
|
||||||
|
* cp-mudflap.c: New file.
|
||||||
|
* cp-simplify.c:: New file.
|
||||||
|
|
||||||
2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||||
|
|
||||||
PR c++/14389
|
PR c++/14389
|
||||||
|
566
gcc/cp/ChangeLog.tree-ssa
Normal file
566
gcc/cp/ChangeLog.tree-ssa
Normal file
@ -0,0 +1,566 @@
|
|||||||
|
2004-04-19 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* except.c (check_handlers_1): Use locus stored in master for warning.
|
||||||
|
* tree.c (cp_walk_subtrees): Save and restore input_location.
|
||||||
|
|
||||||
|
2004-04-12 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): Remove.
|
||||||
|
(LANG_HOOKS_RTL_EXPAND_STMT): Remove.
|
||||||
|
* semantics.c (cxx_expand_function_start): Remove.
|
||||||
|
|
||||||
|
2004-04-12 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* except.c (check_handlers_1): Use EXPR_LOCUS instead of STMT_LINENO.
|
||||||
|
* semantics.c (finalize_nrv_r): Likewise.
|
||||||
|
* tree.c (cp_walk_subtrees): Likewise.
|
||||||
|
* parser.c (cp_parser_statement): Save and restore entire locus;
|
||||||
|
set EXPR_LOCUS.
|
||||||
|
* pt.c (tsubst_expr): Don't special-case LABEL_STMT.
|
||||||
|
|
||||||
|
2004-04-01 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* name-lookup.c (innermost_nonclass_level): Check for
|
||||||
|
error_mark_node.
|
||||||
|
|
||||||
|
2004-03-25 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* parser.c (cp_parser_class_specifier): Initialize
|
||||||
|
variable 'attributes'.
|
||||||
|
|
||||||
|
2004-03-17 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cp-lang.c (cxx_types_compatible_p): Use
|
||||||
|
same_type_ignoring_top_level_qualifiers_p.
|
||||||
|
|
||||||
|
2004-03-16 Dale Johannesen <dalej@apple.com>
|
||||||
|
|
||||||
|
* cp-lang.c (cxx_types_compatible_p): New.
|
||||||
|
LANG_HOOKS_TYPES_COMPATIBLE_P: New.
|
||||||
|
|
||||||
|
2004-03-10 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/14452
|
||||||
|
* tree.c (stabilize_init): Return whether or not it worked.
|
||||||
|
* init.c (build_new_1): If not, use a sentry.
|
||||||
|
* cp-tree.h: Adjust prototype.
|
||||||
|
|
||||||
|
2004-03-01 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
|
||||||
|
the proper type.
|
||||||
|
|
||||||
|
2004-02-24 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/13944
|
||||||
|
* except.c (do_free_exception): Remove #if 0 wrapper.
|
||||||
|
(build_throw): Use it if we elide a copy into the exception object.
|
||||||
|
|
||||||
|
* tree.c (stabilize_call): Fix thinko.
|
||||||
|
|
||||||
|
2004-02-19 Steven Bosscher <stevenb@suse.de>
|
||||||
|
|
||||||
|
* decl.c (poplevel): Don't output nested inline functions.
|
||||||
|
|
||||||
|
2004-02-16 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* call.c (build_call, build_over_call, build_new_method_call): Add
|
||||||
|
static chain operand to call_expr.
|
||||||
|
* decl.c (build_offset_ref_call_from_tree): Likewise.
|
||||||
|
* parser.c (cp_parser_postfix_expression): Likewise.
|
||||||
|
* semantics.c (finish_call_expr): Likewise.
|
||||||
|
* cp-lang.c (cp_expand_decl): Don't declare_nonlocal_label.
|
||||||
|
|
||||||
|
2004-02-09 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cp-lang.c (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): New.
|
||||||
|
* cp-tree.h (cp_missing_noreturn_ok_p): Declare.
|
||||||
|
* decl.c (cp_missing_noreturn_ok_p): Export.
|
||||||
|
(cxx_init_decl_processing): Don't set lang_missing_noreturn_ok_p.
|
||||||
|
|
||||||
|
2004-02-06 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR c/13863
|
||||||
|
* cp-lang.c (LANG_HOOKS_DECL_UNINIT): Remove.
|
||||||
|
|
||||||
|
2004-02-03 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
PR middle-end/13325
|
||||||
|
* call.c, cvt.c, init.c, typeck.c: Use TREE_NO_WARNING instead
|
||||||
|
of TREE_NO_UNUSED_WARNING.
|
||||||
|
* cvt.c (convert_to_void): Also use it for "has no effect" warning.
|
||||||
|
|
||||||
|
2004-01-30 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mflang_flush_calls): Mark static ctor as TREE_USED.
|
||||||
|
|
||||||
|
2004-01-12 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-lang.c (ok_to_generate_alias_set_for_type): Remove.
|
||||||
|
(cxx_get_alias_set): Allow all types.
|
||||||
|
|
||||||
|
2004-01-08 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mflang_flush_calls): mf_mark synthetic function.
|
||||||
|
|
||||||
|
2004-01-04 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* call.c (build_over_call): Don't create a save_expr of an
|
||||||
|
aggregate, but rather its address.
|
||||||
|
|
||||||
|
2004-01-01 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* expr.c (cxx_expand_expr): Don't handle THROW_EXPR, or
|
||||||
|
MUST_NOT_THROW_EXPR.
|
||||||
|
* semantics.c (genrtl_try_block, genrtl_eh_spec_block,
|
||||||
|
genrtl_handler, cp_expand_stmt): Remove.
|
||||||
|
(init_cp_semantics): Don't set lang_expand_stmt.
|
||||||
|
|
||||||
|
2003-12-31 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mflang_register_call): Remove.
|
||||||
|
|
||||||
|
2003-12-18 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/12453
|
||||||
|
* cp-simplify.c (cp_gimplify_init_expr): Look inside STMT_EXPRs
|
||||||
|
and COMPOUND_EXPRs to find an AGGR_INIT_EXPR.
|
||||||
|
|
||||||
|
2003-12-16 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR middle-end/12920
|
||||||
|
* decl.c (grokdeclarator): Immediately layout an
|
||||||
|
ARRAY_TYPE used in a pointer-to-array declarator.
|
||||||
|
|
||||||
|
2003-12-16 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
Revert until initializers are made language independent:
|
||||||
|
* cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Kill.
|
||||||
|
* cp-tree.h (cxx_callgraph_analyze_expr): Kill.
|
||||||
|
* decl2.c (cxx_callgraph_analyze_expr): Kill.
|
||||||
|
|
||||||
|
2003-12-14 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Kill.
|
||||||
|
* cp-tree.h (cxx_callgraph_analyze_expr): Kill.
|
||||||
|
* decl2.c (cxx_callgraph_analyze_expr): Kill.
|
||||||
|
|
||||||
|
2003-11-24 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* Make-lang.in (tree.o, typeck.o): Remove -Wno-error.
|
||||||
|
|
||||||
|
2003-11-20 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* call.c (build_java_interface_fn_ref): Use build_address+convert.
|
||||||
|
* except.c (build_eh_type_type): Likewise.
|
||||||
|
* class.c (build_base_path): Use convert+build_indirect_ref.
|
||||||
|
* init.c (expand_virtual_init): Likewise.
|
||||||
|
* rtti.c (get_tinfo_decl_dynamic): Use convert.
|
||||||
|
|
||||||
|
2003-11-20 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mflang_flush_calls): Adapt to direct expansion of
|
||||||
|
synthetic function, bypassing callgraph code.
|
||||||
|
* cp-decl2.c (finish_file): Call mudflap after callgraph-based
|
||||||
|
expansion.
|
||||||
|
|
||||||
|
2003-11-17 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* init.c (build_new_1): Preevaluate initializer. Simplify EH code.
|
||||||
|
(build_init): Call a constructor rather than call build_aggr_init
|
||||||
|
for classes.
|
||||||
|
* except.c (stabilize_throw_expr): Remove.
|
||||||
|
(build_throw): Use stabilize_init instead of stabilize_throw_expr.
|
||||||
|
* tree.c (stabilize_call, stabilize_init): New fns.
|
||||||
|
* call.c (build_over_call): A constructor no longer returns the
|
||||||
|
address of the object.
|
||||||
|
|
||||||
|
2003-11-16 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* typeck.c (pointer_diff): Remove unused variable.
|
||||||
|
|
||||||
|
2003-11-16 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR optimization/11269
|
||||||
|
* semantics.c (finalize_nrv_r): Rename from nullify_returns_r.
|
||||||
|
Also replace uses of the nrv with our RESULT_DECL.
|
||||||
|
(cxx_expand_function_start): Don't mess with the nrv.
|
||||||
|
(finalize_nrv): New fn.
|
||||||
|
* cp-tree.h: Declare it.
|
||||||
|
* decl.c (finish_function): Call it.
|
||||||
|
* tree.c (cp_copy_res_decl_for_inlining): Don't mess with the nrv.
|
||||||
|
|
||||||
|
2003-11-10 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (gimplify_must_not_throw_expr): Replace add_tree
|
||||||
|
with append_to_statement_list.
|
||||||
|
|
||||||
|
2003-10-30 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (pop_switch): Call c_do_switch_warnings.
|
||||||
|
|
||||||
|
2003-10-23 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_gimplify_expr): Return gimplify_status.
|
||||||
|
|
||||||
|
2003-10-16 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (finish_function): Don't check flag_disable_gimple.
|
||||||
|
|
||||||
|
2003-10-14 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (finish_function): Always gimplify; call c_warn_unused_result.
|
||||||
|
|
||||||
|
2003-10-13 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* pt.c (push_tinst_level): Use annotate_with_locus.
|
||||||
|
|
||||||
|
2003-10-12 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* call.c (call_builtin_trap): Use implicit_built_in_decls.
|
||||||
|
* class.c (build_base_path): Set TREE_INVARIANT.
|
||||||
|
(build_vtbl_ref_1, build_vtbl_initializer): Likewise.
|
||||||
|
* decl.c (build_enumerator): Likewise.
|
||||||
|
* init.c (build_zero_init): Likewise.
|
||||||
|
* pt.c (push_inline_template_parms_recursive): Likewise.
|
||||||
|
(build_template_parm_index, reduce_template_parm_level): Likewise.
|
||||||
|
(process_template_parm): Likewise.
|
||||||
|
* rtti.c (tinfo_base_init, generic_initializer): Likewise.
|
||||||
|
(ptr_initializer, ptm_initializer, class_initializer): Likewise.
|
||||||
|
* typeck.c (build_ptrmemfunc1): Likewise.
|
||||||
|
* typeck2.c (process_init_constructor): Likewise.
|
||||||
|
|
||||||
|
* calls.c (dfs_accumulate_vtbl_inits): Rely on build to set
|
||||||
|
TREE_CONSTANT.
|
||||||
|
(build_vtbl_initializer): Likewise.
|
||||||
|
* init.c (build_vtbl_address): Likewise.
|
||||||
|
* rtti.c (tinfo_base_init): Likewise.
|
||||||
|
* tree.c (make_ptrmem_cst): Likewise.
|
||||||
|
* typeck.c (decay_conversion): Likewise.
|
||||||
|
(get_member_function_from_ptrfunc, build_binary_op): Likewise.
|
||||||
|
(pointer_diff, build_address, build_nop, build_unary_op): Likewise.
|
||||||
|
|
||||||
|
2003-09-30 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (finish_function): Set cfun->function_end_locus.
|
||||||
|
|
||||||
|
2003-09-24 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* class.c, decl.c, decl2.c, error.c, init.c, lex.c, method.c,
|
||||||
|
pt.c, semantics.c, tree.c: Revert from TREE_LOCUS to
|
||||||
|
DECL_SOURCE_LOCATION.
|
||||||
|
|
||||||
|
2003-09-17 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (cxx_init_decl_processing): Don't using_eh_for_cleanups
|
||||||
|
if exceptions are disabled.
|
||||||
|
|
||||||
|
2003-09-03 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cp-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): Use expand_stmt_toplev.
|
||||||
|
|
||||||
|
2003-09-03 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (finish_function): Fix misapplied patch. Don't
|
||||||
|
free_after_parsing or free_after_compilation. For real this time.
|
||||||
|
|
||||||
|
2003-08-22 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_gimplify_init_expr): Update use of predicates.
|
||||||
|
|
||||||
|
2003-08-21 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_gimplify_expr): Use simplify_aggr_init_expr.
|
||||||
|
(cp_gimplify_init_expr): Don't call it here.
|
||||||
|
(gimplify_aggr_init_expr): Remove.
|
||||||
|
|
||||||
|
2003-08-19 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* typeck.c (build_array_ref): Also build ARRAY_REFs from
|
||||||
|
INDIRECT_REFs of ARRAY_TYPE.
|
||||||
|
|
||||||
|
* semantics.c (finish_id_expression): Unshare aliases.
|
||||||
|
|
||||||
|
2003-08-12 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (optimize_function): Do not call dump_function.
|
||||||
|
|
||||||
|
2003-08-08 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (optimize_function): Restore support for
|
||||||
|
!keep_function_tree_in_gimple_form.
|
||||||
|
|
||||||
|
2003-07-27 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* cp-lang.c: Convert K&R prototypes to ISO C90.
|
||||||
|
* cp-simplify.c: Likewise.
|
||||||
|
* cp-mudflap.c: Likewise.
|
||||||
|
|
||||||
|
2003-06-13 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* semantics.c (expand_body): Call mudflap_c_function just before
|
||||||
|
rtl expansion of function body; don't interfere with inlining.
|
||||||
|
* optimize.c (optimize_function): Remove mudflap call.
|
||||||
|
|
||||||
|
2003-06-13 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* cp-lang.c, cp-simplify.c, cp-tree.h, decl.c, optimize.c,
|
||||||
|
semantics.c, tree.c: Rename SIMPLE to GIMPLE everywhere.
|
||||||
|
|
||||||
|
2003-06-05 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mflang_register_call): Give the synthetic decl
|
||||||
|
undefined (not zero) size.
|
||||||
|
|
||||||
|
2003-06-05 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mx_flag): Remove. Update callers to use mf_mark.
|
||||||
|
|
||||||
|
2003-05-24 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* Make-lang.in (optimize.o): Add dependency on tree-simple.h
|
||||||
|
* decl.c (grokdeclarator): Don't abort when the declarator is
|
||||||
|
ERROR_MARK_NODE.
|
||||||
|
* optimize.c (optimize_function): Unshare all trees after
|
||||||
|
optimizing inline calls.
|
||||||
|
|
||||||
|
2003-05-12 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* class.c (dump_array): Call CONSTRUCTOR_ELTS to access
|
||||||
|
the operand of a CONSTRUCTOR node.
|
||||||
|
|
||||||
|
2003-05-07 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (grokdeclarator): Fix thinko in handling
|
||||||
|
ERROR_MARK declarators.
|
||||||
|
|
||||||
|
2003-05-07 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* decl.c (grokdeclarator): Handle ERROR_MARK declarators.
|
||||||
|
|
||||||
|
2003-05-07 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* semantics.c (expand_body): Call expand_stmt when
|
||||||
|
-fdisable-simple is given.
|
||||||
|
|
||||||
|
2003-04-21 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (optimize_function_tree): Do run the tree-ssa
|
||||||
|
optimizers.
|
||||||
|
|
||||||
|
2003-04-16 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (optimize_function): No longer check
|
||||||
|
flag_disable_simple.
|
||||||
|
|
||||||
|
2003-04-15 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* pt.c (instantiate_decl): If CFUN is null, then we will
|
||||||
|
need to push to the toplevel.
|
||||||
|
|
||||||
|
* Makefile.in (decl.o): Depends on tree-flow.h.
|
||||||
|
* decl.c (finish_function): Call set_has_hidden_use when
|
||||||
|
nullifying returns for named value return optimization.
|
||||||
|
|
||||||
|
2003-04-02 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_simplify_expr) <case EMPTY_CLASS_EXPR>:
|
||||||
|
Change type of constant to RECORD_TYPE.
|
||||||
|
|
||||||
|
2003-03-10 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (optimize_function): Avoid unnecessary
|
||||||
|
simplification of the function tree.
|
||||||
|
|
||||||
|
2003-03-02 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* decl.c: Replace DECL_SOURCE_LOCATION with TREE_LOCUS
|
||||||
|
everywhere.
|
||||||
|
|
||||||
|
2003-02-28 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* decl2.c (finish_file): Adjust timing of mudflap_finish_file call
|
||||||
|
to account for unit-at-a-time compilation.
|
||||||
|
|
||||||
|
2003-02-07 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_simplify_expr): Handle BASELINK.
|
||||||
|
|
||||||
|
* parser.c (cp_parser_primary_expression): Unshare a COMPONENT_REF
|
||||||
|
from an ALIAS_DECL.
|
||||||
|
|
||||||
|
2003-02-05 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (genericize_try_block): Do genericize catch blocks.
|
||||||
|
|
||||||
|
2003-02-03 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* parser.c (cp_parser_asm_definition): Call finish_asm_stmt with
|
||||||
|
'volatile_p' directly.
|
||||||
|
* typeck.c (build_binary_op): Initialize variable 'type'.
|
||||||
|
* Make-lang.in (cp/tree.o-warn): Add -Wno-error.
|
||||||
|
|
||||||
|
2003-01-29 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
* cp-mudflap.c (mflang_register_call): Adapt to mf-runtime.h API
|
||||||
|
change.
|
||||||
|
|
||||||
|
2003-01-15 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* class.c: Use TREE_FILENAME and TREE_LINENO to extract
|
||||||
|
file/line information from tree nodes. Remove EXPR_WITH_FILE_LOCATION
|
||||||
|
nodes. Use annotate_with_file_line to attach file/line information
|
||||||
|
to tree nodes. Use TREE_LOCUS to copy file/line information
|
||||||
|
from one node to another.
|
||||||
|
* decl2.c, error.c, init.c, lex.c, method.c: Likewise.
|
||||||
|
* optimize.c: Likewise.
|
||||||
|
* cp-tree.def (TINST_LEVEL): New tree node.
|
||||||
|
* cp-tree.h (TINST_DECL): Update now that we no longer use
|
||||||
|
EXPR_WITH_FILE_LOCATION to represent the TINST_DECL information.
|
||||||
|
(TINST_FILE, TINST_LINE): Kill.
|
||||||
|
* decl.c: Use TREE_FILENAME and TREE_LINENO to extract
|
||||||
|
file/line information from tree nodes. Use annotate_witH_file_line
|
||||||
|
to add file/line information to tree nodes. Use TREE_LOCUS
|
||||||
|
to copy file/line information from one node to another.
|
||||||
|
(duplicate_decls): Make sure to copy TREE_LOCUS information
|
||||||
|
from the old decl to the new decl.
|
||||||
|
(finish_function): Save and restore file/line information
|
||||||
|
around genericizing the function tree.
|
||||||
|
* pt.c (lookup_template_class): Use TREE_LOCUS to copy file/line
|
||||||
|
information from one node to another.
|
||||||
|
(push_tinst_level): Generate a TINST_LEVEL node rather than
|
||||||
|
using EXPR_WITH_FILE_LOCATION nodes. Use annotate_with_file_line
|
||||||
|
to annotate the new node with file/line information.
|
||||||
|
(pop_tinst_level): Use TREE_LINENO and TREE_FILENAME to extract
|
||||||
|
file/line information from nodes.
|
||||||
|
(tsubst_friend_function, instantiate_class_template): Likewise.
|
||||||
|
(tsubst_decl, instantiate_decl, tsubst_enum): Likewise.
|
||||||
|
* semantics.c: Use annotate_with_file_line to annotate tree
|
||||||
|
nodes with file/line information. Use TREE_FILENAME and TREE_LINENO
|
||||||
|
to extract file/line information from tree nodes.
|
||||||
|
(expand_body): Restore file/line information slightly earlier.
|
||||||
|
tree.c (cp_walk_subtrees): Set lineno appropriately.
|
||||||
|
(cp_copy_res_decl_for_inlining): Use TREE_LOCUS to copy file/line
|
||||||
|
information from one node to another.
|
||||||
|
|
||||||
|
2003-01-13 Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
|
||||||
|
Prototype C++ mudflap support.
|
||||||
|
* Make-lang.in (CXX_OBJS): Add cp/cp-mudflap.o and dependencies.
|
||||||
|
* cp-mudflap.c: New file with C++ front-end mflang_* routines.
|
||||||
|
* decl2.c (finish_file): Divert to mudflap if appropriate.
|
||||||
|
* optimize.c (optimize_function): Ditto.
|
||||||
|
|
||||||
|
2003-01-02 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* Make-lang.in (CXX_C_OBJS): Replace old-tree-inline.o with
|
||||||
|
tree-inline.o.
|
||||||
|
|
||||||
|
* optimize.c (dump_function): Move to ../tree-dump.c.
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_simplify_expr): Handle PTRMEM_CST, INIT_EXPR,
|
||||||
|
MODIFY_EXPR and EMPTY_CLASS_EXPR.
|
||||||
|
(cp_simplify_stmt): Handle USING_STMT.
|
||||||
|
(cp_simplify_init_expr): New fn.
|
||||||
|
* cvt.c (build_up_reference): Don't push the decl.
|
||||||
|
* class.c (build_vtable_entry_ref, build_vtbl_ref_1): Unshare the
|
||||||
|
vtable address.
|
||||||
|
* init.c (build_vtbl_address): Likewise.
|
||||||
|
* cp-lang.c (LANG_HOOKS_UNSAVE_EXPR_NOW): Remove.
|
||||||
|
* decl.c (lookup_name_real): Unshare the expansion of an ALIAS_DECL.
|
||||||
|
(finish_function): Don't genericize templates.
|
||||||
|
* parse.y (parse_asm_stmt): Fix prototype.
|
||||||
|
* semantics.c (expand_body): Don't expand if we saw errors.
|
||||||
|
Drop support for expanding non-GENERIC code.
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_simplify_stmt): Handle HANDLER and EH_SPEC_BLOCK.
|
||||||
|
(genericize_try_block): Always build a TRY_CATCH_EXPR.
|
||||||
|
(genericize_catch_block): New fn.
|
||||||
|
(genericize_eh_spec_block): New fn.
|
||||||
|
(cp_simplify_expr): Handle THROW_EXPR and MUST_NOT_THROW_EXPR.
|
||||||
|
(simplify_must_not_throw_expr): New fn.
|
||||||
|
* except.c (wrap_cleanups_r): Make the MUST_NOT_THROW_EXPR void.
|
||||||
|
(build_throw): Likewise.
|
||||||
|
|
||||||
|
2002-12-14 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (dump_function): Use pretty dumpers.
|
||||||
|
(optimize_function): Don't do .original dump here.
|
||||||
|
|
||||||
|
2002-12-03 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c: Include coretypes.h and tm.h.
|
||||||
|
|
||||||
|
2002-11-24 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
Gimplify C++ cleanups.
|
||||||
|
* decl.c (finish_function): Call c_genericize.
|
||||||
|
* cp-simplify.c (cp_simplify_stmt): New fn.
|
||||||
|
(genericize_try_block): New fn.
|
||||||
|
(cp_simplify_expr): Move INIT_EXPR/TARGET_EXPR code
|
||||||
|
to ../gimplify.c. Handle AGGR_INIT_EXPR.
|
||||||
|
(simplify_target_expr): Move to ../gimplify.c.
|
||||||
|
(maybe_fixup_loop_cond): Remove.
|
||||||
|
(simplify_aggr_init_expr): Split out from...
|
||||||
|
* semantics.c (simplify_aggr_init_exprs_r): ...here.
|
||||||
|
(expand_body): Don't simplify AGGR_INIT_EXPRs here
|
||||||
|
if we're gimplifying. Handle expanding generic trees.
|
||||||
|
* tree.c (init_tree): Set lang_simplify_stmt.
|
||||||
|
* cp-tree.h: Declare the new fns.
|
||||||
|
|
||||||
|
* optimize.c (optimize_function): Do pretty dumps.
|
||||||
|
|
||||||
|
2002-10-04 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* Make-lang.in (CXX_C_OBJS): Add gimplify.o.
|
||||||
|
|
||||||
|
2002-09-24 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* parse.y (parse_asm_stmt): New fn.
|
||||||
|
(simple_stmt): Use it.
|
||||||
|
* semantics.c (finish_asm_stmt): Change cv_qualifier parm to
|
||||||
|
volatile_p.
|
||||||
|
* cp-tree.h: Adjust prototype.
|
||||||
|
* pt.c (tsubst_expr): Adjust call.
|
||||||
|
|
||||||
|
2002-08-23 Diego Novillo <dnovillo@redhat.com>
|
||||||
|
|
||||||
|
* Make-lang.in (CXX_C_OBJS): Add tree-dchain.o
|
||||||
|
|
||||||
|
2002-08-11 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (maybe_fixup_loop_cond): Move here.
|
||||||
|
(cp_simplify_expr): Call it.
|
||||||
|
(simplify_target_expr): Remove pre_p parm.
|
||||||
|
|
||||||
|
2002-08-09 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c (cp_simplify_expr): New fn.
|
||||||
|
(simplify_target_expr): New fn.
|
||||||
|
(cp_simplify_function_tree): Remove.
|
||||||
|
* cp-lang.c (LANG_HOOKS_SIMPLIFY_FUNCTION_TREE): Don't define.
|
||||||
|
(LANG_HOOKS_SIMPLIFY_EXPR): Define.
|
||||||
|
* optimize.c (optimize_function): De-hook simplify_function_tree.
|
||||||
|
* cp-tree.h: Declare cp_simplify_expr.
|
||||||
|
|
||||||
|
2002-07-17 Daniel Berlin <dberlin@dberlin.org>
|
||||||
|
|
||||||
|
* Make-lang.in (CXX_C_OBJS): Add tree-alias-ecr.c,
|
||||||
|
tree-alias-type.o, tree-alias-steen.o, disjoint-set.o.
|
||||||
|
|
||||||
|
2002-06-21 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* Make-lang.in (cp-simplify.o): New.
|
||||||
|
|
||||||
|
2002-06-18 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* cp-simplify.c: New file.
|
||||||
|
* Make-lang.in: Add it.
|
||||||
|
* cp-tree.h: Declare cp_simplify_function_tree.
|
||||||
|
* cp-lang.c (LANG_HOOKS_SIMPLIFY_FUNCTION_TREE): Define.
|
||||||
|
* optimize.c (optimize_function): Call tree optimizers (but not yet).
|
||||||
|
|
||||||
|
Local Variables:
|
||||||
|
mode: change-log
|
||||||
|
change-log-default-name: "ChangeLog.tree-ssa"
|
||||||
|
End:
|
@ -73,14 +73,16 @@ g++-cross$(exeext): g++$(exeext)
|
|||||||
# Shared with C front end:
|
# Shared with C front end:
|
||||||
CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
|
CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
|
||||||
c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o c-pch.o \
|
c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o c-pch.o \
|
||||||
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o
|
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
|
||||||
|
c-simplify.o tree-inline.o
|
||||||
|
|
||||||
# Language-specific object files.
|
# Language-specific object files.
|
||||||
CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
|
CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
|
||||||
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o \
|
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o \
|
||||||
cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
|
cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
|
||||||
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o \
|
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o \
|
||||||
cp/mangle.o cp/cp-lang.o cp/name-lookup.o cp/cxx-pretty-print.o
|
cp/mangle.o cp/cp-lang.o cp/name-lookup.o cp/cxx-pretty-print.o \
|
||||||
|
cp/cp-simplify.o tree-mudflap.o cp/cp-mudflap.o
|
||||||
|
|
||||||
# Use strict warnings for this front end.
|
# Use strict warnings for this front end.
|
||||||
cp-warn = $(STRICT_WARN) $(WERROR)
|
cp-warn = $(STRICT_WARN) $(WERROR)
|
||||||
@ -221,7 +223,7 @@ cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) toplev.h langhooks.h \
|
|||||||
cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h stack.h \
|
cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h stack.h \
|
||||||
output.h $(EXPR_H) except.h toplev.h $(HASHTAB_H) $(RTL_H) \
|
output.h $(EXPR_H) except.h toplev.h $(HASHTAB_H) $(RTL_H) \
|
||||||
cp/operators.def $(TM_P_H) tree-inline.h diagnostic.h c-pragma.h \
|
cp/operators.def $(TM_P_H) tree-inline.h diagnostic.h c-pragma.h \
|
||||||
debug.h gt-cp-decl.h gtype-cp.h timevar.h
|
debug.h gt-cp-decl.h gtype-cp.h timevar.h $(TREE_FLOW_H)
|
||||||
cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \
|
cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \
|
||||||
output.h except.h toplev.h $(RTL_H) c-common.h gt-cp-decl2.h cgraph.h
|
output.h except.h toplev.h $(RTL_H) c-common.h gt-cp-decl2.h cgraph.h
|
||||||
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h output.h $(TM_P_H) \
|
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h output.h $(TM_P_H) \
|
||||||
@ -257,12 +259,16 @@ cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) cp/lex.h except.h toplev.h
|
|||||||
tree-inline.h cgraph.h
|
tree-inline.h cgraph.h
|
||||||
cp/dump.o: cp/dump.c $(CXX_TREE_H) $(TM_H) tree-dump.h
|
cp/dump.o: cp/dump.c $(CXX_TREE_H) $(TM_H) tree-dump.h
|
||||||
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) $(TM_H) rtl.h integrate.h insn-config.h \
|
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) $(TM_H) rtl.h integrate.h insn-config.h \
|
||||||
input.h $(PARAMS_H) debug.h tree-inline.h
|
input.h $(PARAMS_H) debug.h tree-inline.h tree-simple.h
|
||||||
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) toplev.h real.h gt-cp-mangle.h \
|
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) toplev.h real.h gt-cp-mangle.h \
|
||||||
$(TARGET_H) $(TM_P_H)
|
$(TARGET_H) $(TM_P_H)
|
||||||
|
|
||||||
cp/parser.o: cp/parser.c $(CXX_TREE_H) $(TM_H) diagnostic.h gt-cp-parser.h \
|
cp/parser.o: cp/parser.c $(CXX_TREE_H) $(TM_H) diagnostic.h gt-cp-parser.h \
|
||||||
output.h
|
output.h
|
||||||
|
cp/cp-simplify.o: cp/cp-simplify.c $(CXX_TREE_H) toplev.h c-common.h \
|
||||||
|
$(TM_H) coretypes.h
|
||||||
|
cp/cp-mudflap.o: cp/cp-mudflap.c $(CXX_TREE_H) toplev.h c-common.h \
|
||||||
|
$(TM_H) coretypes.h
|
||||||
|
|
||||||
cp/name-lookup.o: cp/name-lookup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
cp/name-lookup.o: cp/name-lookup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||||
$(TM_H) $(CXX_TREE_H) timevar.h gt-cp-name-lookup.h toplev.h \
|
$(TM_H) $(CXX_TREE_H) timevar.h gt-cp-name-lookup.h toplev.h \
|
||||||
|
@ -346,7 +346,7 @@ build_call (tree function, tree parms)
|
|||||||
TREE_VALUE (tmp), t);
|
TREE_VALUE (tmp), t);
|
||||||
}
|
}
|
||||||
|
|
||||||
function = build (CALL_EXPR, result_type, function, parms);
|
function = build (CALL_EXPR, result_type, function, parms, NULL_TREE);
|
||||||
TREE_HAS_CONSTRUCTOR (function) = is_constructor;
|
TREE_HAS_CONSTRUCTOR (function) = is_constructor;
|
||||||
TREE_NOTHROW (function) = nothrow;
|
TREE_NOTHROW (function) = nothrow;
|
||||||
|
|
||||||
@ -4331,7 +4331,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
|
|||||||
static tree
|
static tree
|
||||||
call_builtin_trap (tree type)
|
call_builtin_trap (tree type)
|
||||||
{
|
{
|
||||||
tree fn = IDENTIFIER_GLOBAL_VALUE (get_identifier ("__builtin_trap"));
|
tree fn = implicit_built_in_decls[BUILT_IN_TRAP];
|
||||||
|
|
||||||
my_friendly_assert (fn != NULL, 20030927);
|
my_friendly_assert (fn != NULL, 20030927);
|
||||||
fn = build_call (fn, NULL_TREE);
|
fn = build_call (fn, NULL_TREE);
|
||||||
@ -4560,7 +4560,7 @@ build_over_call (struct z_candidate *cand, int flags)
|
|||||||
tree expr;
|
tree expr;
|
||||||
tree return_type;
|
tree return_type;
|
||||||
return_type = TREE_TYPE (TREE_TYPE (fn));
|
return_type = TREE_TYPE (TREE_TYPE (fn));
|
||||||
expr = build (CALL_EXPR, return_type, fn, args);
|
expr = build (CALL_EXPR, return_type, fn, args, NULL_TREE);
|
||||||
if (!VOID_TYPE_P (return_type))
|
if (!VOID_TYPE_P (return_type))
|
||||||
require_complete_type (return_type);
|
require_complete_type (return_type);
|
||||||
return convert_from_reference (expr);
|
return convert_from_reference (expr);
|
||||||
@ -4768,16 +4768,11 @@ build_over_call (struct z_candidate *cand, int flags)
|
|||||||
else if (TREE_CODE (arg) == TARGET_EXPR
|
else if (TREE_CODE (arg) == TARGET_EXPR
|
||||||
|| TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn)))
|
|| TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn)))
|
||||||
{
|
{
|
||||||
tree address;
|
|
||||||
tree to = stabilize_reference
|
tree to = stabilize_reference
|
||||||
(build_indirect_ref (TREE_VALUE (args), 0));
|
(build_indirect_ref (TREE_VALUE (args), 0));
|
||||||
|
|
||||||
val = build (INIT_EXPR, DECL_CONTEXT (fn), to, arg);
|
val = build (INIT_EXPR, DECL_CONTEXT (fn), to, arg);
|
||||||
address = build_unary_op (ADDR_EXPR, val, 0);
|
return val;
|
||||||
/* Avoid a warning about this expression, if the address is
|
|
||||||
never used. */
|
|
||||||
TREE_USED (address) = 1;
|
|
||||||
return address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (DECL_OVERLOADED_OPERATOR_P (fn) == NOP_EXPR
|
else if (DECL_OVERLOADED_OPERATOR_P (fn) == NOP_EXPR
|
||||||
@ -4813,7 +4808,7 @@ build_over_call (struct z_candidate *cand, int flags)
|
|||||||
val = build (MODIFY_EXPR, as_base, to_as_base, arg_as_base);
|
val = build (MODIFY_EXPR, as_base, to_as_base, arg_as_base);
|
||||||
val = convert_to_void (val, NULL);
|
val = convert_to_void (val, NULL);
|
||||||
val = build (COMPOUND_EXPR, type, val, save_to);
|
val = build (COMPOUND_EXPR, type, val, save_to);
|
||||||
TREE_NO_UNUSED_WARNING (val) = 1;
|
TREE_NO_WARNING (val) = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
@ -4936,7 +4931,8 @@ build_java_interface_fn_ref (tree fn, tree instance)
|
|||||||
iface);
|
iface);
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
}
|
}
|
||||||
iface_ref = build1 (ADDR_EXPR, build_pointer_type (iface), iface_ref);
|
iface_ref = build_address (iface_ref);
|
||||||
|
iface_ref = convert (build_pointer_type (iface), iface_ref);
|
||||||
|
|
||||||
/* Determine the itable index of FN. */
|
/* Determine the itable index of FN. */
|
||||||
i = 1;
|
i = 1;
|
||||||
@ -5360,7 +5356,7 @@ build_new_method_call (tree instance, tree fns, tree args,
|
|||||||
call = (build_min_non_dep
|
call = (build_min_non_dep
|
||||||
(CALL_EXPR, call,
|
(CALL_EXPR, call,
|
||||||
build_min_nt (COMPONENT_REF, orig_instance, orig_fns),
|
build_min_nt (COMPONENT_REF, orig_instance, orig_fns),
|
||||||
orig_args));
|
orig_args, NULL_TREE));
|
||||||
|
|
||||||
/* Free all the conversions we allocated. */
|
/* Free all the conversions we allocated. */
|
||||||
obstack_free (&conversion_obstack, p);
|
obstack_free (&conversion_obstack, p);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user