1998-08-11 10:38:09 +02:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2010-09-13 16:44:21 +02:00
|
|
|
# Update a local Subversion, Git or Mercurial tree from the GCC
|
|
|
|
# repository, with an emphasis on treating generated files correctly, so
|
|
|
|
# that autoconf, gperf et al are not required for the ``end'' user.
|
1998-08-11 10:38:09 +02:00
|
|
|
#
|
2011-04-08 21:39:48 +02:00
|
|
|
# (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
|
|
|
# 2011 Free Software Foundation
|
2005-10-28 16:44:48 +02:00
|
|
|
# Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
|
|
|
|
#
|
|
|
|
# This script is Free Software, and it can be copied, distributed and
|
|
|
|
# modified as defined in the GNU General Public License. A copy of
|
|
|
|
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
|
|
|
|
#
|
|
|
|
#
|
2010-09-13 16:44:21 +02:00
|
|
|
# By default all command-line options are passed to `svn update` or `hg/git
|
|
|
|
# pull` in addition to $UPDATE_OPTIONS (defined below). If the first parameter
|
1998-08-11 11:04:53 +02:00
|
|
|
# reads --nostdflags, $UPDATE_OPTIONS as well as this parameter itself
|
2000-09-16 14:14:12 +02:00
|
|
|
# are omitted.
|
|
|
|
#
|
1999-07-05 12:22:15 +02:00
|
|
|
# If the first parameter reads --patch, the second parameter is considered
|
|
|
|
# a patch file.
|
2000-09-16 14:14:12 +02:00
|
|
|
#
|
2005-10-28 16:44:48 +02:00
|
|
|
# If the first parameter is --touch, no svn operation will be performed,
|
1999-07-27 15:26:37 +02:00
|
|
|
# only generated files that appear to be out of date in the local tree
|
|
|
|
# will be touched.
|
|
|
|
#
|
|
|
|
# If the first parameter is --list, a list of the generated files and
|
|
|
|
# their dependencies will be printed; --help prints this message.
|
|
|
|
#
|
2005-03-18 12:47:28 +01:00
|
|
|
# If the first parameter is --silent, this script prints nothing other
|
|
|
|
# than error messages; the second parameter is then interpreted as above.
|
|
|
|
#
|
1998-08-11 11:04:53 +02:00
|
|
|
# Examples:
|
|
|
|
#
|
2005-10-28 16:44:48 +02:00
|
|
|
# contrib/gcc_update -r 8712
|
2000-04-28 03:23:47 +02:00
|
|
|
# contrib/gcc_update --patch some-patch
|
|
|
|
# contrib/gcc_update --touch
|
|
|
|
# contrib/gcc_update --list
|
1998-08-12 13:02:37 +02:00
|
|
|
|
1998-08-11 10:38:09 +02:00
|
|
|
|
2010-09-13 16:44:21 +02:00
|
|
|
# Default options used when updating (none).
|
2005-10-28 16:44:48 +02:00
|
|
|
UPDATE_OPTIONS=""
|
2001-05-23 14:15:03 +02:00
|
|
|
|
2010-04-22 08:15:07 +02:00
|
|
|
# Set the locale to C to make this script work for users with foreign
|
|
|
|
# locale like e.g. French UTF-8.
|
|
|
|
LANG=C
|
|
|
|
LC_ALL=C
|
|
|
|
export LANG LC_ALL
|
|
|
|
|
2001-05-23 14:15:03 +02:00
|
|
|
######## Anything below shouldn't be changed by regular users.
|
1998-08-11 10:38:09 +02:00
|
|
|
|
2000-05-18 06:19:35 +02:00
|
|
|
# Arrange for the value of $0 to be available for functions
|
|
|
|
self=$0
|
1998-08-11 10:38:09 +02:00
|
|
|
|
2005-03-18 12:47:28 +01:00
|
|
|
# This function prints its arguments to standard output unless
|
|
|
|
# "silent" is set.
|
2005-03-19 01:16:22 +01:00
|
|
|
unset silent
|
2005-03-18 12:47:28 +01:00
|
|
|
chat () {
|
|
|
|
if [ -z "$silent" ]; then
|
|
|
|
echo "$@"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
1999-07-27 15:26:37 +02:00
|
|
|
# This function prints a list of all generated files, along with their
|
|
|
|
# dependencies. Note that only one target is supported per line: the
|
|
|
|
# colon is stripped from the output.
|
|
|
|
files_and_dependencies () {
|
|
|
|
sed -e 's/ *#.*//' -e '/^$/d' -e 's/://' <<\EOF
|
2004-08-31 11:27:00 +02:00
|
|
|
# fixincludes
|
|
|
|
fixincludes/configure: fixincludes/configure.ac fixincludes/aclocal.m4
|
|
|
|
fixincludes/config.h.in: fixincludes/configure.ac fixincludes/aclocal.m4
|
intl: New directory; see intl/ChangeLog for details.
top:
* intl: New directory; see intl/ChangeLog for details.
* ABOUT-NLS, config.rpath: Import from gettext 0.12.1.
* Makefile.tpl: all-gcc depends on maybe-all-intl.
* Makefile.in: Regenerate.
config:
* gettext.m4: New file - copy of gettext.m4 from binutils
CVS, with added AC_ISC_POSIX macro from gcc/aclocal.m4.
gcc:
* ABOUT-NLS: Delete.
* intl: Delete entire directory.
* aclocal.m4: Include ../config/gettext.m4. Delete
AC_ISC_POSIX, AM_LANGINFO_CODESET, jm_GLIBC21, AM_LC_MESSAGES,
AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, and AM_GNU_GETTEXT.
* configure.in: Use CY_GNU_GETTEXT, not AM_GNU_GETTEXT.
Remove intl/Makefile from all_outputs.
* configure, config.in: Regenerate.
* Makefile.in: Expunge all references to intl subdirectory.
Add -I../intl to INCLUDES.
* intl.h: Include libintl.h if and only if ENABLE_NLS is defined.
intl:
* Makefile.in: Remove unnecessary capabilities for
installation, build of shared libraries, generation of
distribution tarballs, etc. Fix all the places that rely on
the parent directory. Don't generate libgnuintl.h from
anything; do generate $(objdir)/libintl.h from libgnuintl.h if
necessary. Adjust DEFS for use of config.h.
* libgnuintl.h.in: Rename libgnuintl.h.
* README: New file.
* config.charset, ref-add.sin, ref-del.sin: Delete (unused).
* COPYING.LIB-2.0, COPYING.LIB-2.1: Delete (redundant).
* aclocal.m4: New; generated per instructions in gettext manual.
* configure.in: New; written from scratch for this configuration.
* configure, config.h.in: Generated.
contrib:
* gcc_update: Remove gcc/intl/plural.c from list.
Add new generated files intl/plural.c, intl/configure,
intl/config.h.in.
From-SVN: r68928
2003-07-04 20:18:54 +02:00
|
|
|
# intl library
|
|
|
|
intl/plural.c: intl/plural.y
|
2004-02-29 22:13:41 +01:00
|
|
|
intl/configure: intl/configure.ac intl/aclocal.m4
|
|
|
|
intl/config.h.in: intl/configure.ac intl/aclocal.m4
|
1999-07-27 15:26:37 +02:00
|
|
|
# Now, proceed to gcc automatically generated files
|
2004-01-03 20:55:35 +01:00
|
|
|
gcc/configure: gcc/configure.ac
|
|
|
|
gcc/cstamp-h.in: gcc/configure.ac
|
1999-07-28 19:52:02 +02:00
|
|
|
gcc/config.in: gcc/cstamp-h.in
|
1999-07-27 15:26:37 +02:00
|
|
|
gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
|
2004-08-03 15:35:47 +02:00
|
|
|
gcc/config/arm/arm-tune.md: gcc/config/arm/arm-cores.def gcc/config/arm/gentune.sh
|
2011-05-19 18:27:59 +02:00
|
|
|
gcc/config/arm/arm-tables.opt: gcc/config/arm/arm-arches.def gcc/config/arm/arm-cores.def gcc/config/arm/arm-fpus.def gcc/config/arm/genopt.sh
|
2011-06-21 12:22:19 +02:00
|
|
|
gcc/config/avr/avr-tables.opt: gcc/config/avr/avr-mcus.def gcc/config/avr/genopt.sh
|
2011-07-15 11:36:40 +02:00
|
|
|
gcc/config/c6x/c6x-tables.opt: gcc/config/c6x/c6x-isas.def gcc/config/c6x/genopt.sh
|
|
|
|
gcc/config/c6x/c6x-sched.md: gcc/config/c6x/c6x-sched.md.in gcc/config/c6x/gensched.sh
|
|
|
|
gcc/config/c6x/c6x-mult.md: gcc/config/c6x/c6x-mult.md.in gcc/config/c6x/genmult.sh
|
gcc_update (gcc/config/m68k/m68k-tables.opt): New dependencies.
contrib:
* gcc_update (gcc/config/m68k/m68k-tables.opt): New dependencies.
gcc:
* config/m68k/genopt.sh, config/m68k/m68k-isas.def,
config/m68k/m68k-microarchs.def, config/m68k/m68k-opts.h,
config/m68k/t-opts: New files.
* config/m68k/m68k-tables.opt: New file (generated).
* config.gcc (fido-*-*, m68k-*-*): Add m68k/m68k-tables.opt to
extra_options and m68k/t-opts to tmake_file.
* config/m68k/m68k.c (m68k_library_id_string): More to m68k.opt.
(all_isas): Initialize using m68k-isas.def.
(all_microarchs): Initialize using m68k-microarchs.def.
(m68k_find_selection): Remove.
(m68k_handle_option): Don't assert that global structures are in
use. Use error_at. Access variables via opts pointer. Don't
handle -march=, -mcpu= and -mtune= here. Set gcc_options fields
directly for -m68020-40 and -m68020-60.
(m68k_option_override): Set m68k_arch_entry, m68k_cpu_entry and
m68k_tune_entry here.
* config/m68k/m68k.h (enum uarch_type, enum target_device): Move
to m68k-opts.h.
(m68k_library_id_string): Remove declaration.
* config/m68k/m68k.opt (config/m68k/m68k-opts.h): New
HeaderInclude.
(m68k_library_id_string): New Variable.
(march=, mcpu=, mtune=): Use Enum and Var.
From-SVN: r173256
2011-05-02 17:42:39 +02:00
|
|
|
gcc/config/m68k/m68k-tables.opt: gcc/config/m68k/m68k-devices.def gcc/config/m68k/m68k-isas.def gcc/config/m68k/m68k-microarchs.def gcc/config/m68k/genopt.sh
|
2011-05-09 11:40:19 +02:00
|
|
|
gcc/config/mips/mips-tables.opt: gcc/config/mips/mips-cpus.def gcc/config/mips/genopt.sh
|
2011-05-10 16:46:34 +02:00
|
|
|
gcc/config/rs6000/rs6000-tables.opt: gcc/config/rs6000/rs6000-cpus.def gcc/config/rs6000/genopt.sh
|
1999-07-27 15:26:37 +02:00
|
|
|
# And then, language-specific files
|
2003-01-03 07:05:11 +01:00
|
|
|
gcc/cp/cfns.h: gcc/cp/cfns.gperf
|
|
|
|
gcc/java/keyword.h: gcc/java/keyword.gperf
|
2003-06-24 03:32:33 +02:00
|
|
|
# testsuite
|
|
|
|
# Without this, _Pragma3.c can have a false negative.
|
|
|
|
gcc/testsuite/gcc.dg/cpp/_Pragma3.c: gcc/testsuite/gcc.dg/cpp/mi1c.h
|
2007-06-30 19:17:14 +02:00
|
|
|
# Similarly, without this, you will see:
|
|
|
|
# direct2s.c:35: warning: current file is older than direct2.c
|
|
|
|
gcc/testsuite/gcc.dg/cpp/direct2s.c: gcc/testsuite/gcc.dg/cpp/direct2.c
|
2009-10-03 23:10:11 +02:00
|
|
|
# lto-plugin
|
|
|
|
lto-plugin/configure: lto-plugin/configure.ac lto-plugin/aclocal.m4
|
|
|
|
lto-plugin/Makefile.in: lto-plugin/Makefile.am lto-plugin/aclocal.m4
|
1999-07-27 15:26:37 +02:00
|
|
|
# And libraries, at last
|
2004-05-29 21:51:26 +02:00
|
|
|
libbanshee/configure: libbanshee/configure.ac
|
2004-06-15 16:59:58 +02:00
|
|
|
libmudflap/configure: libmudflap/configure.ac
|
2004-04-09 15:13:09 +02:00
|
|
|
libobjc/configure: libobjc/configure.ac
|
2004-04-12 13:03:16 +02:00
|
|
|
zlib/aclocal.m4: zlib/configure.ac zlib/acinclude.m4
|
|
|
|
zlib/Makefile.in: zlib/Makefile.am zlib/configure.ac zlib/aclocal.m4
|
|
|
|
zlib/configure: zlib/configure.ac zlib/aclocal.m4
|
2004-01-10 03:12:41 +01:00
|
|
|
fastjar/aclocal.m4: fastjar/configure.ac
|
|
|
|
fastjar/Makefile.in: fastjar/Makefile.am fastjar/configure.ac fastjar/aclocal.m4
|
|
|
|
fastjar/configure: fastjar/configure.ac fastjar/aclocal.m4
|
2004-11-05 05:11:44 +01:00
|
|
|
boehm-gc/aclocal.m4: boehm-gc/configure.ac
|
2004-06-16 13:58:44 +02:00
|
|
|
boehm-gc/Makefile.in: boehm-gc/Makefile.am boehm-gc/configure.ac boehm-gc/aclocal.m4
|
2004-06-16 09:35:00 +02:00
|
|
|
boehm-gc/configure: boehm-gc/configure.ac boehm-gc/aclocal.m4
|
2004-03-11 03:24:53 +01:00
|
|
|
libada/configure: libada/configure.ac
|
2004-03-16 20:19:19 +01:00
|
|
|
libffi/aclocal.m4: libffi/configure.ac libffi/acinclude.m4
|
|
|
|
libffi/Makefile.in: libffi/Makefile.am libffi/configure.ac libffi/aclocal.m4
|
|
|
|
libffi/configure: libffi/configure.ac libffi/aclocal.m4
|
|
|
|
libffi/fficonfig.h.in: libffi/configure.ac libffi/aclocal.m4
|
2004-06-10 06:50:45 +02:00
|
|
|
libgfortran/aclocal.m4: libgfortran/configure.ac libgfortran/acinclude.m4
|
|
|
|
libgfortran/Makefile.in: libgfortran/Makefile.am libgfortran/configure.ac libgfortran/aclocal.m4
|
|
|
|
libgfortran/configure: libgfortran/configure.ac libgfortran/aclocal.m4
|
2005-08-23 02:55:08 +02:00
|
|
|
libjava/aclocal.m4: libjava/configure.ac
|
2004-08-20 18:17:35 +02:00
|
|
|
libjava/Makefile.in: libjava/Makefile.am libjava/configure.ac libjava/aclocal.m4
|
|
|
|
libjava/configure: libjava/configure.ac libjava/aclocal.m4
|
2003-12-17 07:22:00 +01:00
|
|
|
libjava/libltdl/aclocal.m4: libjava/libltdl/configure.ac libjava/libltdl/acinclude.m4
|
|
|
|
libjava/libltdl/Makefile.in: libjava/libltdl/Makefile.am libjava/libltdl/configure.ac libjava/libltdl/aclocal.m4
|
|
|
|
libjava/libltdl/configure: libjava/libltdl/configure.ac libjava/libltdl/aclocal.m4
|
2003-12-19 06:50:14 +01:00
|
|
|
libjava/libltdl/config-h.in: libjava/libltdl/configure.ac libjava/libltdl/aclocal.m4
|
2004-06-14 15:53:45 +02:00
|
|
|
libcpp/aclocal.m4: libcpp/configure.ac
|
2004-08-25 11:07:43 +02:00
|
|
|
libcpp/Makefile.in: libcpp/configure.ac libcpp/aclocal.m4
|
2004-06-14 15:53:45 +02:00
|
|
|
libcpp/configure: libcpp/configure.ac libcpp/aclocal.m4
|
[multiple changes]
2006-01-18 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* libgomp: New directory.
* Makefile.def: Add target_module libgomp.
* Makefile.in: Regenerate.
* configure.in (target_libraries): Add target-libgomp.
* configure: Regenerate.
contrib/
2006-01-18 Richard Henderson <rth@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* gcc_update (files_and_dependencies): Add libgomp files.
gcc/
2006-01-18 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* omp-low.c: New file.
* c-omp.c: New file.
2006-01-18 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* doc/invoke.texi: Document -fopenmp.
* tree-dump.h (debug_function): Declare.
* hooks.c (hook_bool_tree_bool_false): New function.
(hook_tree_tree_null): Remove.
(hook_tree_tree_tree_null): New.
* hooks.h: Update to match.
* tree-pretty-print.c (debug_tree_chain): New.
(print_generic_expr): Handle TDF_CHAIN.
(dump_generic_node): Handle BLOCK.
Do not abort with incomplete SWITCH_EXPRs.
Do not dump body of an OpenMP directive if TDF_SLIM is given.
<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
print space after directive name.
<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
Handle OMP_MASTER and OMP_ORDERED.
Handle printing of OMP_BODY just in one place, goto
dump_omp_body in the rest of OMP_* nodes that have
OMP_BODY.
Don't handle clause nodes here. Update omp statements to
use dump_omp_clauses.
Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
Adjust output for GOMP_PARALLEL.
(dump_omp_clauses): New.
(print_declaration): Dump DECL_VALUE_EXPR.
(op_symbol_1): Split out of op_symbol.
(dumping_stmts): Remove. Update all users.
* cgraph.c (cgraph_analyze_queue): New.
(cgraph_add_new_function): New.
* cgraph.h (cgraph_analyze_queue): Declare.
(cgraph_add_new_function): Declare.
(cgraph_lower_function): Remove.
* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
nodes. Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
and TYPE_P nodes in its default clause.
(empty_body_p): New.
(tree_range_check_failed): New.
(build5_stat): New.
* tree.h (OMP_CLAUSE_REDUCTION_INIT,
OMP_CLAUSE_REDUCTION_MERGE,
OMP_CLAUSE_REDUCTION_PLACEHOLDER,
OMP_CLAUSE_PRIVATE_DEBUG,
OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
(TREE_RANGE_CHECK): New.
(empty_body_p): Declare.
(enum omp_clause_default_kind): New.
(build_string_literal): Declare.
(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
(build5_stat, build5): Declare.
* tree-pass.h (TDF_CHAIN): Define.
* tree-pass.h (PROP_gimple_lomp): Define.
(pass_lower_omp): Declare.
* diagnostic.h (debug_tree_chain): Declare.
* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
mode_for_size.
(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
* builtins.c (build_string_literal): Make extern.
* gcc.c (include_spec_function): New.
(static_spec_functions): Add it.
(main): Move load of libgomp.spec ...
(LINK_COMMAND_SPEC): ... here.
(link_gomp_spec): New.
(static_specs): Include it.
(LINK_COMMAND_SPEC): Add link_gomp.
(GOMP_SELF_SPECS): New.
(driver_self_specs): Include it.
(switch_matches): Don't mark inline.
(main): Load libgomp.spec.
* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.
* tree-gimple.h (enum omp_parallel): Declare.
(determine_parallel_type): Declare.
(omp_firstprivatize_variable): Declare.
(omp_reduction_init): Declare.
(diagnose_omp_structured_block_errors): Declare.
(struct walk_stmt_info): Add want_return_expr.
(struct walk_stmt_info): Add want_bind_expr, want_locations.
(find_omp_clause): Declare.
(insert_field_into_struct): Declare.
(struct walk_stmt_info): Move from tree-nested.c
(walk_stmts): Declare.
* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
to 200505.
* cgraphunit.c (cgraph_lower_function): Make static.
(cgraph_finalize_pending_functions): New.
(cgraph_finalize_function): Call it.
(cgraph_finalize_compilation_unit): Likewise.
* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
(BT_FN_UINT_UINT): New.
(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
DEF_FUNCTION_TYPE_VAR_4): Document.
(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
BT_FN_VOID_OMPFN_PTR_UINT_UINT,
BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.
* builtins.def: Update DEF_BUILTIN comment to include COND argument.
Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
into separate files.
(DEF_GOMP_BUILTIN): New.
(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
* sync-builtins.def: New file, moved from builtins.def.
* omp-builtins.def: New file, moved from builtins.def.
* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
* gimple-low.c (lower_function_body): Clear data.
(lower_stmt): Do not handle COMPOUND_EXPR.
Remove call to print_node_brief.
* c-tree.h (c_finish_omp_clauses): New prototype.
(C_DECL_THREADPRIVATE_P): Define.
(lookup_name_no_remap, c_omp_remap_private): Remove
(c_begin_omp_parallel, c_finish_omp_parallel): Update.
(check_for_loop_decls): Update decl.
(lookup_name_no_remap, c_omp_remap_private): Declare.
(build_indirect_ref, build_modify_expr, pushdecl,
pushdecl_top_level): Move to c-common.h.
* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
before the switch, but just in the 2 places that need it.
* c-decl.c (diagnose_mismatched_decls): Do not check for
mismatched thread-local attributes when OLDDECL is marked
threadprivate and NEWDECL has no thread-local attributes.
(merge_decls): Merge C_DECL_THREADPRIVATE_P.
(c_gimple_diagnostics_recursively): Rename from
c_warn_unused_result_recursively. Invoke
diagnose_omp_structured_block_errors.
(check_for_loop_decls): Return a singular decl found.
* langhooks.c (lhd_omp_predetermined_sharing): Return
OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
(lhd_omp_firstprivatize_type_sizes): New.
(lhd_omp_assignment): New.
(lhd_omp_predetermined_sharing): New.
* langhooks.h (struct gimplify_omp_ctx): Forward declare.
(struct lang_hooks_for_types): Add
omp_firstprivatize_type_sizes, omp_privatize_by_reference,
omp_predetermined_sharing, omp_disregard_value_expr,
omp_private_debug_clause, omp_clause_default_ctor,
omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.
(c_finish_omp_clauses): New.
(c_finish_bc_stmt): Diagnose break within omp for.
(c_begin_omp_parallel, c_finish_omp_parallel): New.
(build_unary_op): Return error_mark after reporting
a readonly_error.
(build_modify_expr): Likewise.
* gimplify.c: Include optabs.h and pointer-set.h.
(enum gimplify_omp_var_data): Declare.
(struct gimplify_omp_ctx): Declare.
(struct gimplify_ctx): Add fields prev_context, combined_pre_p
and combined_ctxp.
(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
(push_gimplify_context, pop_gimplify_context): Allow nesting.
(splay_tree_compare_decl_uid): New.
(new_omp_context): New.
(delete_omp_context): New.
(gimple_add_tmp_var): Call omp_add_variable.
(gimplify_bind_expr): Likewise.
(gimplify_var_or_parm_decl): If omp_notice_variable returned
true, disregard DECL_VALUE_EXPR on the decl if any.
(gimplify_expr_in_ctx): New.
(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
omp_add_variable, omp_notice_variable, omp_is_private
gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
gimplify_adjust_omp_clauses, gimplify_omp_parallel
gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
gimplify_omp_atomic_fetch_op, goa_stabilize_expr
gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
gimplify_omp_atomic): New.
(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
OMP_CRITICAL and OMP_ATOMIC.
(gimplify_body): Verify gimplify_ctxp is empty after gimplification.
* c-pragma.h (enum pragma_kind): Add
PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
PRAGMA_OMP_THREADPRIVATE.
* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.
* print-tree.c (print_node): Dump DECL_VALUE_EXPR.
* tree-ssa-dce.c (find_control_dependence): Do not assume that
ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).
* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
OpenMP directives.
(struct nesting_info): Add field_map,
suppress_expansion, debug_var_chain.
(create_nesting_tree): Initialize them.
(lookup_field_for_decl): Use field_map.
(get_nonlocal_debug_decl, get_local_debug_decl): New.
(convert_local_omp_clauses): New.
(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
(walk_body): Split out of walk_function.
(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
(convert_nonlocal_reference): Handle omp statements.
(convert_local_reference): Likewise.
(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
(unnest_nesting_tree): New.
(lower_nested_functions): Call it.
(insert_field_into_struct): Make extern.
(struct walk_stmt_info): Move to tree-gimple.h.
(walk_stmts): Make extern.
* omp-builtins.def: New file.
* tree-iterator.c (expr_only): Clarify comment.
* c-common.h (pushdecl_top_level, pushdecl,
build_modify_expr, build_indirect_ref,
c_finish_omp_master, c_finish_omp_critical,
c_finish_omp_ordered, c_finish_omp_barrier,
c_finish_omp_atomic, c_finish_omp_flush,
c_finish_omp_for, c_split_parallel_clauses,
omp_clause_default_kind, c_omp_sharing_predetermined,
c_omp_remap_decl): Declare.
* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
(OBJS-common): Add omp-low.o.
(c-omp.o, omp-low.o): Add.
(gimplify.o): Add dependency on $(OPTABS_H).
(GTFILES): Add omp-low.c.
(gt-stringpool.h): Add.
* tree-cfg.c (set_bb_for_stmt): Do not update the
block-to-labels map if we are currently expanding to RTL.
(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
checks.
Handle IDENTIFIER_NODE.
(tree_verify_flow_info): Do not ICE when emitting error
messages about invalid labels.
(dump_function_to_file): Reset CFUN before emitting the body
of the function.
(debug_function): New.
* passes.c (init_optimization_passes): Schedule
pass_lower_omp.
* langhooks-def.h (lhd_omp_predetermined_sharing,
lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
Declare.
(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
LANG_HOOKS_OMP_PREDETERMINED_SHARING,
LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
(LANG_HOOK_DECLS): Use them.
2006-01-18 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* c-parser.c (pragma_omp_clause): Define.
(c_parser_declaration_or_fndef): Document OpenMP syntax.
(c_parser_compound_statement): Likewise.
(c_parser_statement): Likewise.
(c_parser_pragma): Handle omp pragmas.
(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
(c_parser_omp_clause_name, check_no_duplicate_clause,
c_parser_omp_variable_list,
c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
c_parser_omp_clause_copyprivate,
c_parser_omp_clause_default,
c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
c_parser_omp_clause_lastprivate,
c_parser_omp_clause_nowait,
c_parser_omp_clause_num_threads,
c_parser_omp_clause_ordered, c_parser_omp_clause_private,
c_parser_omp_clause_reduction,
c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
c_parser_omp_all_clauses, c_parser_omp_structured_block,
c_parser_omp_atomic, c_parser_omp_barrier,
c_parser_omp_critical, c_parser_omp_flush,
c_parser_omp_for_loop, c_parser_omp_for,
c_parser_omp_master, c_parser_omp_ordered,
c_parser_omp_sections_scope, c_parser_omp_sections,
c_parser_omp_parallel, c_parser_omp_single,
c_parser_omp_construct, c_parser_omp_threadprivate): New.
* c-pragma.c (init_pragma): Do omp pragma registration here.
* c.opt (fopenmp): New flag.
2006-01-18 Eric Christopher <echristo@apple.com>
* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
* config/darwin.h (GOMP_SELF_SPECS): Define.
testsuite/
2006-01-18 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
Uros Bizjak <uros@kss-loka.si>
* testsuite/gcc.dg/gomp: New directory.
From-SVN: r109902
2006-01-18 20:21:25 +01:00
|
|
|
libgomp/aclocal.m4: libgomp/configure.ac libgomp/acinclude.m4
|
|
|
|
libgomp/Makefile.in: libgomp/Makefile.am libgomp/aclocal.m4
|
2006-01-24 17:07:30 +01:00
|
|
|
libgomp/testsuite/Makefile.in: libgomp/Makefile.am libgomp/aclocal.m4
|
[multiple changes]
2006-01-18 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* libgomp: New directory.
* Makefile.def: Add target_module libgomp.
* Makefile.in: Regenerate.
* configure.in (target_libraries): Add target-libgomp.
* configure: Regenerate.
contrib/
2006-01-18 Richard Henderson <rth@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* gcc_update (files_and_dependencies): Add libgomp files.
gcc/
2006-01-18 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* omp-low.c: New file.
* c-omp.c: New file.
2006-01-18 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* doc/invoke.texi: Document -fopenmp.
* tree-dump.h (debug_function): Declare.
* hooks.c (hook_bool_tree_bool_false): New function.
(hook_tree_tree_null): Remove.
(hook_tree_tree_tree_null): New.
* hooks.h: Update to match.
* tree-pretty-print.c (debug_tree_chain): New.
(print_generic_expr): Handle TDF_CHAIN.
(dump_generic_node): Handle BLOCK.
Do not abort with incomplete SWITCH_EXPRs.
Do not dump body of an OpenMP directive if TDF_SLIM is given.
<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
print space after directive name.
<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
Handle OMP_MASTER and OMP_ORDERED.
Handle printing of OMP_BODY just in one place, goto
dump_omp_body in the rest of OMP_* nodes that have
OMP_BODY.
Don't handle clause nodes here. Update omp statements to
use dump_omp_clauses.
Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
Adjust output for GOMP_PARALLEL.
(dump_omp_clauses): New.
(print_declaration): Dump DECL_VALUE_EXPR.
(op_symbol_1): Split out of op_symbol.
(dumping_stmts): Remove. Update all users.
* cgraph.c (cgraph_analyze_queue): New.
(cgraph_add_new_function): New.
* cgraph.h (cgraph_analyze_queue): Declare.
(cgraph_add_new_function): Declare.
(cgraph_lower_function): Remove.
* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
nodes. Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
and TYPE_P nodes in its default clause.
(empty_body_p): New.
(tree_range_check_failed): New.
(build5_stat): New.
* tree.h (OMP_CLAUSE_REDUCTION_INIT,
OMP_CLAUSE_REDUCTION_MERGE,
OMP_CLAUSE_REDUCTION_PLACEHOLDER,
OMP_CLAUSE_PRIVATE_DEBUG,
OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
(TREE_RANGE_CHECK): New.
(empty_body_p): Declare.
(enum omp_clause_default_kind): New.
(build_string_literal): Declare.
(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
(build5_stat, build5): Declare.
* tree-pass.h (TDF_CHAIN): Define.
* tree-pass.h (PROP_gimple_lomp): Define.
(pass_lower_omp): Declare.
* diagnostic.h (debug_tree_chain): Declare.
* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
mode_for_size.
(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
* builtins.c (build_string_literal): Make extern.
* gcc.c (include_spec_function): New.
(static_spec_functions): Add it.
(main): Move load of libgomp.spec ...
(LINK_COMMAND_SPEC): ... here.
(link_gomp_spec): New.
(static_specs): Include it.
(LINK_COMMAND_SPEC): Add link_gomp.
(GOMP_SELF_SPECS): New.
(driver_self_specs): Include it.
(switch_matches): Don't mark inline.
(main): Load libgomp.spec.
* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.
* tree-gimple.h (enum omp_parallel): Declare.
(determine_parallel_type): Declare.
(omp_firstprivatize_variable): Declare.
(omp_reduction_init): Declare.
(diagnose_omp_structured_block_errors): Declare.
(struct walk_stmt_info): Add want_return_expr.
(struct walk_stmt_info): Add want_bind_expr, want_locations.
(find_omp_clause): Declare.
(insert_field_into_struct): Declare.
(struct walk_stmt_info): Move from tree-nested.c
(walk_stmts): Declare.
* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
to 200505.
* cgraphunit.c (cgraph_lower_function): Make static.
(cgraph_finalize_pending_functions): New.
(cgraph_finalize_function): Call it.
(cgraph_finalize_compilation_unit): Likewise.
* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
(BT_FN_UINT_UINT): New.
(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
DEF_FUNCTION_TYPE_VAR_4): Document.
(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
BT_FN_VOID_OMPFN_PTR_UINT_UINT,
BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.
* builtins.def: Update DEF_BUILTIN comment to include COND argument.
Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
into separate files.
(DEF_GOMP_BUILTIN): New.
(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
* sync-builtins.def: New file, moved from builtins.def.
* omp-builtins.def: New file, moved from builtins.def.
* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
* gimple-low.c (lower_function_body): Clear data.
(lower_stmt): Do not handle COMPOUND_EXPR.
Remove call to print_node_brief.
* c-tree.h (c_finish_omp_clauses): New prototype.
(C_DECL_THREADPRIVATE_P): Define.
(lookup_name_no_remap, c_omp_remap_private): Remove
(c_begin_omp_parallel, c_finish_omp_parallel): Update.
(check_for_loop_decls): Update decl.
(lookup_name_no_remap, c_omp_remap_private): Declare.
(build_indirect_ref, build_modify_expr, pushdecl,
pushdecl_top_level): Move to c-common.h.
* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
before the switch, but just in the 2 places that need it.
* c-decl.c (diagnose_mismatched_decls): Do not check for
mismatched thread-local attributes when OLDDECL is marked
threadprivate and NEWDECL has no thread-local attributes.
(merge_decls): Merge C_DECL_THREADPRIVATE_P.
(c_gimple_diagnostics_recursively): Rename from
c_warn_unused_result_recursively. Invoke
diagnose_omp_structured_block_errors.
(check_for_loop_decls): Return a singular decl found.
* langhooks.c (lhd_omp_predetermined_sharing): Return
OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
(lhd_omp_firstprivatize_type_sizes): New.
(lhd_omp_assignment): New.
(lhd_omp_predetermined_sharing): New.
* langhooks.h (struct gimplify_omp_ctx): Forward declare.
(struct lang_hooks_for_types): Add
omp_firstprivatize_type_sizes, omp_privatize_by_reference,
omp_predetermined_sharing, omp_disregard_value_expr,
omp_private_debug_clause, omp_clause_default_ctor,
omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.
(c_finish_omp_clauses): New.
(c_finish_bc_stmt): Diagnose break within omp for.
(c_begin_omp_parallel, c_finish_omp_parallel): New.
(build_unary_op): Return error_mark after reporting
a readonly_error.
(build_modify_expr): Likewise.
* gimplify.c: Include optabs.h and pointer-set.h.
(enum gimplify_omp_var_data): Declare.
(struct gimplify_omp_ctx): Declare.
(struct gimplify_ctx): Add fields prev_context, combined_pre_p
and combined_ctxp.
(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
(push_gimplify_context, pop_gimplify_context): Allow nesting.
(splay_tree_compare_decl_uid): New.
(new_omp_context): New.
(delete_omp_context): New.
(gimple_add_tmp_var): Call omp_add_variable.
(gimplify_bind_expr): Likewise.
(gimplify_var_or_parm_decl): If omp_notice_variable returned
true, disregard DECL_VALUE_EXPR on the decl if any.
(gimplify_expr_in_ctx): New.
(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
omp_add_variable, omp_notice_variable, omp_is_private
gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
gimplify_adjust_omp_clauses, gimplify_omp_parallel
gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
gimplify_omp_atomic_fetch_op, goa_stabilize_expr
gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
gimplify_omp_atomic): New.
(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
OMP_CRITICAL and OMP_ATOMIC.
(gimplify_body): Verify gimplify_ctxp is empty after gimplification.
* c-pragma.h (enum pragma_kind): Add
PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
PRAGMA_OMP_THREADPRIVATE.
* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.
* print-tree.c (print_node): Dump DECL_VALUE_EXPR.
* tree-ssa-dce.c (find_control_dependence): Do not assume that
ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).
* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
OpenMP directives.
(struct nesting_info): Add field_map,
suppress_expansion, debug_var_chain.
(create_nesting_tree): Initialize them.
(lookup_field_for_decl): Use field_map.
(get_nonlocal_debug_decl, get_local_debug_decl): New.
(convert_local_omp_clauses): New.
(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
(walk_body): Split out of walk_function.
(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
(convert_nonlocal_reference): Handle omp statements.
(convert_local_reference): Likewise.
(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
(unnest_nesting_tree): New.
(lower_nested_functions): Call it.
(insert_field_into_struct): Make extern.
(struct walk_stmt_info): Move to tree-gimple.h.
(walk_stmts): Make extern.
* omp-builtins.def: New file.
* tree-iterator.c (expr_only): Clarify comment.
* c-common.h (pushdecl_top_level, pushdecl,
build_modify_expr, build_indirect_ref,
c_finish_omp_master, c_finish_omp_critical,
c_finish_omp_ordered, c_finish_omp_barrier,
c_finish_omp_atomic, c_finish_omp_flush,
c_finish_omp_for, c_split_parallel_clauses,
omp_clause_default_kind, c_omp_sharing_predetermined,
c_omp_remap_decl): Declare.
* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
(OBJS-common): Add omp-low.o.
(c-omp.o, omp-low.o): Add.
(gimplify.o): Add dependency on $(OPTABS_H).
(GTFILES): Add omp-low.c.
(gt-stringpool.h): Add.
* tree-cfg.c (set_bb_for_stmt): Do not update the
block-to-labels map if we are currently expanding to RTL.
(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
checks.
Handle IDENTIFIER_NODE.
(tree_verify_flow_info): Do not ICE when emitting error
messages about invalid labels.
(dump_function_to_file): Reset CFUN before emitting the body
of the function.
(debug_function): New.
* passes.c (init_optimization_passes): Schedule
pass_lower_omp.
* langhooks-def.h (lhd_omp_predetermined_sharing,
lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
Declare.
(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
LANG_HOOKS_OMP_PREDETERMINED_SHARING,
LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
(LANG_HOOK_DECLS): Use them.
2006-01-18 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* c-parser.c (pragma_omp_clause): Define.
(c_parser_declaration_or_fndef): Document OpenMP syntax.
(c_parser_compound_statement): Likewise.
(c_parser_statement): Likewise.
(c_parser_pragma): Handle omp pragmas.
(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
(c_parser_omp_clause_name, check_no_duplicate_clause,
c_parser_omp_variable_list,
c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
c_parser_omp_clause_copyprivate,
c_parser_omp_clause_default,
c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
c_parser_omp_clause_lastprivate,
c_parser_omp_clause_nowait,
c_parser_omp_clause_num_threads,
c_parser_omp_clause_ordered, c_parser_omp_clause_private,
c_parser_omp_clause_reduction,
c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
c_parser_omp_all_clauses, c_parser_omp_structured_block,
c_parser_omp_atomic, c_parser_omp_barrier,
c_parser_omp_critical, c_parser_omp_flush,
c_parser_omp_for_loop, c_parser_omp_for,
c_parser_omp_master, c_parser_omp_ordered,
c_parser_omp_sections_scope, c_parser_omp_sections,
c_parser_omp_parallel, c_parser_omp_single,
c_parser_omp_construct, c_parser_omp_threadprivate): New.
* c-pragma.c (init_pragma): Do omp pragma registration here.
* c.opt (fopenmp): New flag.
2006-01-18 Eric Christopher <echristo@apple.com>
* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
* config/darwin.h (GOMP_SELF_SPECS): Define.
testsuite/
2006-01-18 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
Uros Bizjak <uros@kss-loka.si>
* testsuite/gcc.dg/gomp: New directory.
From-SVN: r109902
2006-01-18 20:21:25 +01:00
|
|
|
libgomp/configure: libgomp/configure.ac libgomp/aclocal.m4
|
|
|
|
libgomp/config.h.in: libgomp/configure.ac libgomp/aclocal.m4
|
2002-09-25 00:51:57 +02:00
|
|
|
# Top level
|
|
|
|
Makefile.in: Makefile.tpl Makefile.def
|
2007-02-09 16:36:20 +01:00
|
|
|
configure: configure.ac config/acx.m4
|
1999-07-27 15:26:37 +02:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-07-05 12:22:15 +02:00
|
|
|
# This function touches generated files such that the ``end'' user does
|
|
|
|
# not have to rebuild them.
|
1999-07-27 15:26:37 +02:00
|
|
|
touch_files () {
|
2001-05-14 21:57:52 +02:00
|
|
|
rm -f Makefile.$$
|
|
|
|
echo 'all: \' > Makefile.$$
|
|
|
|
files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$
|
|
|
|
echo '; @true' >> Makefile.$$
|
|
|
|
files_and_dependencies | sed 's, ,: ,' >> Makefile.$$
|
|
|
|
files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$
|
|
|
|
echo ':' >> Makefile.$$
|
2002-04-18 12:09:10 +02:00
|
|
|
echo ' @for f in $? $@; do test -f $$f || exit 0; done; \' >> Makefile.$$
|
2001-05-14 21:57:52 +02:00
|
|
|
echo ' echo Touching $@...; \' >> Makefile.$$
|
2005-03-18 12:47:28 +01:00
|
|
|
chat ' echo Touching $@... 1>&2; \' >> Makefile.$$
|
2001-05-14 21:57:52 +02:00
|
|
|
echo ' touch $@' >> Makefile.$$
|
|
|
|
files_and_dependencies | sed 's,[^ ]* ,,;s,$, :,' >> Makefile.$$
|
2004-11-14 07:31:00 +01:00
|
|
|
|
2004-11-20 11:49:16 +01:00
|
|
|
# We would have to explicitly shut off the "Entering... Leaving..."
|
2004-11-14 07:31:00 +01:00
|
|
|
# messages through "--no-print-directory" to handle the case when
|
|
|
|
# we were called from a recursive invocation (i.e. "$(MAKE)" in a
|
|
|
|
# Makefile, not just make). Passing only "-s" doesn't help then,
|
|
|
|
# because make has helpfully added "-w" to MAKEFLAGS automatically.
|
2004-11-20 11:49:16 +01:00
|
|
|
# Unfortunately we do not require GNU make other than for building
|
|
|
|
# and testing, so let's just grep known text explicitly echoed by
|
|
|
|
# the rule.
|
|
|
|
while ${MAKE-make} -s -f Makefile.$$ all | grep Touching > /dev/null; do
|
2001-05-14 21:57:52 +02:00
|
|
|
sleep 1
|
|
|
|
done 2>&1
|
|
|
|
rm -f Makefile.$$
|
1999-07-05 12:22:15 +02:00
|
|
|
}
|
|
|
|
|
2001-05-14 21:57:52 +02:00
|
|
|
|
2000-05-12 22:18:49 +02:00
|
|
|
# Whenever we update the tree or install a patch, we may be modifying
|
|
|
|
# this script. By re-execing it, we ensure that the appropriate
|
|
|
|
# dependencies and rules will be used.
|
|
|
|
touch_files_reexec () {
|
2005-03-18 12:47:28 +01:00
|
|
|
chat "Adjusting file timestamps"
|
|
|
|
exec ${CONFIG_SHELL-/bin/sh} $self ${silent+"--silent"} --touch
|
2000-09-16 14:14:12 +02:00
|
|
|
}
|
1999-07-05 12:22:15 +02:00
|
|
|
|
|
|
|
# This functions applies a patch to an existing tree.
|
1999-07-27 15:26:37 +02:00
|
|
|
apply_patch () {
|
2005-03-18 23:43:26 +01:00
|
|
|
if [ -f "$1" ]; then
|
1999-07-05 12:22:15 +02:00
|
|
|
echo "Applying patch file $1"
|
2005-03-18 23:43:26 +01:00
|
|
|
case $1 in
|
1999-07-05 12:22:15 +02:00
|
|
|
*gz)
|
2005-03-18 23:43:26 +01:00
|
|
|
gzip -d -c "$1" | patch -p1 ;;
|
1999-11-28 08:41:09 +01:00
|
|
|
*bz2)
|
2005-03-18 23:43:26 +01:00
|
|
|
bzip2 -d -c "$1" | patch -p1 ;;
|
1999-07-05 12:22:15 +02:00
|
|
|
*)
|
2005-03-18 23:43:26 +01:00
|
|
|
patch -p1 < "$1";;
|
1999-07-05 12:22:15 +02:00
|
|
|
esac
|
|
|
|
fi
|
2000-05-12 22:18:49 +02:00
|
|
|
touch_files_reexec
|
1999-07-05 12:22:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Check whether this indeed looks like a local tree.
|
|
|
|
if [ ! -f gcc/version.c ]; then
|
2000-04-28 03:23:47 +02:00
|
|
|
echo "This does not seem to be a GCC tree!"
|
1999-07-05 12:22:15 +02:00
|
|
|
exit
|
1998-08-11 10:38:09 +02:00
|
|
|
fi
|
|
|
|
|
2005-03-18 12:47:28 +01:00
|
|
|
case "$1" in
|
|
|
|
--silent)
|
|
|
|
silent=t
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-07-27 15:26:37 +02:00
|
|
|
case "$1" in
|
1999-07-05 12:22:15 +02:00
|
|
|
# First of all, check whether we are going to process a patch.
|
2000-09-16 14:14:12 +02:00
|
|
|
--patch)
|
1999-07-27 15:26:37 +02:00
|
|
|
if test "$#" != 2; then
|
|
|
|
echo "$1" expects only one argument >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
apply_patch "${2}"
|
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
|
|
|
|
--touch)
|
|
|
|
if test "$#" != 1; then
|
|
|
|
echo "$1" does not expect any argument >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
touch_files
|
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
|
|
|
|
--list)
|
|
|
|
if test "$#" != 1; then
|
|
|
|
echo "$1" does not expect any argument >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
files_and_dependencies | sed 's/ /: /'
|
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
|
|
|
|
--help)
|
|
|
|
sed -e '1,2d' -e '/^UPDATE_OPTIONS=/{i\
|
|
|
|
\
|
|
|
|
|
|
|
|
p
|
|
|
|
}' \
|
|
|
|
-e '/^$/,$d' -e 's/#//' -e 's/^ //' < $0
|
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
1999-07-05 12:22:15 +02:00
|
|
|
|
2010-09-13 16:44:21 +02:00
|
|
|
# Check for known version control systems.
|
2010-06-15 10:35:25 +02:00
|
|
|
if [ -d .git ]; then
|
|
|
|
GCC_GIT=${GCC_GIT-${GIT-git}}
|
2010-09-13 16:44:21 +02:00
|
|
|
vcs_type="git"
|
|
|
|
elif [ -d .hg ]; then
|
|
|
|
GCC_HG=${GCC_HG-${HG-hg}}
|
|
|
|
vcs_type="hg"
|
|
|
|
elif [ -d .svn ]; then
|
|
|
|
GCC_SVN=${GCC_SVN-${SVN-svn}}
|
|
|
|
vcs_type="svn"
|
|
|
|
else
|
|
|
|
echo "This does not seem to be a GCC GIT/HG/SVN tree!"
|
1999-07-05 12:22:15 +02:00
|
|
|
exit
|
|
|
|
fi
|
1998-08-11 11:04:53 +02:00
|
|
|
|
1999-07-05 12:22:15 +02:00
|
|
|
# Check command-line options
|
1998-08-11 11:04:53 +02:00
|
|
|
if [ x"${1}"x = x"--nostdflags"x ]; then
|
|
|
|
shift
|
|
|
|
else
|
|
|
|
set -- $UPDATE_OPTIONS ${1+"$@"}
|
|
|
|
fi
|
|
|
|
|
2010-09-13 16:44:21 +02:00
|
|
|
case $vcs_type in
|
|
|
|
git)
|
|
|
|
chat "Updating GIT tree"
|
2005-03-18 12:47:28 +01:00
|
|
|
|
2010-09-13 16:44:21 +02:00
|
|
|
$GCC_GIT diff --quiet --exit-code HEAD
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Attempting to update a dirty git tree!" >&2
|
|
|
|
echo "Commit or stash your changes first and retry." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
1998-08-11 10:38:09 +02:00
|
|
|
|
2010-09-13 16:44:21 +02:00
|
|
|
$GCC_GIT pull ${silent+-q} --rebase ${1+"$@"}
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
(touch_files_reexec)
|
|
|
|
echo "git pull of full tree failed." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2007-08-16 21:05:48 +02:00
|
|
|
|
2010-09-13 16:44:21 +02:00
|
|
|
revision=`$GCC_GIT log -n1 --pretty=%p:%t:%H`
|
|
|
|
branch=`$GCC_GIT name-rev --name-only HEAD || :`
|
|
|
|
;;
|
|
|
|
|
|
|
|
hg)
|
|
|
|
chat "Updating HG tree"
|
|
|
|
|
|
|
|
# Add -q so untracked files aren't listed.
|
|
|
|
if [ `$GCC_HG status -q | wc -l` -gt 0 ]; then
|
|
|
|
echo "Attempting to update a dirty hg tree!" >&2
|
|
|
|
echo "Commit or revert your changes first and retry." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for mq extension. mq patches must be popped so tip has
|
|
|
|
# been converted from the SVN tree.
|
|
|
|
if [ -d .hg/patches ] && [ `$GCC_HG qapplied | wc -l` -gt 0 ]; then
|
|
|
|
# FIXME: Perhaps pop queue instead? We could do that since we
|
|
|
|
# know the tree is clean.
|
|
|
|
echo "Attempting to update hg tree with mq patches applied!" >&2
|
|
|
|
echo "Pop your patches first and retry." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Update tree, but make sure to only pull the default branch.
|
|
|
|
# Otherwise all branches in the upstream repo are added, even if
|
|
|
|
# only a single one has been cloned.
|
2010-10-12 10:54:10 +02:00
|
|
|
$GCC_HG pull ${silent+-q} -r`$GCC_HG branch` ${1+"$@"}
|
2010-09-13 16:44:21 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
(touch_files_reexec)
|
|
|
|
echo "hg pull of full tree failed." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2010-10-12 10:54:10 +02:00
|
|
|
# Update tree. Needs to be done separately from pull so
|
|
|
|
# gcc_update -rREV works.
|
|
|
|
$GCC_HG update ${silent+-q} ${1+"$@"}
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
(touch_files_reexec)
|
|
|
|
echo "hg update of full tree failed." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Extract SVN revision corresponding to parents, as stored by
|
|
|
|
# hg convert. Before hg 1.4.3, there's no template keyword
|
|
|
|
# corresponding to the extra: tag, so need to use hg log --debug
|
|
|
|
# to extract the info.
|
|
|
|
parents=`$GCC_HG parents --template '{rev}'`
|
|
|
|
revision=`$GCC_HG log --debug -r$parents | \
|
2010-09-13 16:44:21 +02:00
|
|
|
sed -ne "/^extra:.*convert_revision=svn:/ {
|
|
|
|
s%^.*@%%
|
|
|
|
p
|
|
|
|
}"`
|
|
|
|
branch=`$GCC_HG branch`
|
|
|
|
# trunk in SVN parlance shows up as default branch in hg.
|
|
|
|
[ x$branch = x"default" ] && branch="trunk"
|
|
|
|
;;
|
|
|
|
|
|
|
|
svn)
|
|
|
|
chat "Updating SVN tree"
|
|
|
|
|
|
|
|
$GCC_SVN ${silent+-q} --non-interactive update ${1+"$@"}
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
(touch_files_reexec)
|
|
|
|
echo "SVN update of full tree failed." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
revision=`svn info | awk '/Revision:/ { print $2 }'`
|
|
|
|
branch=`svn info | sed -ne "/URL:/ {
|
|
|
|
s,.*/trunk,trunk,
|
|
|
|
s,.*/branches/,,
|
|
|
|
s,.*/tags/,,
|
|
|
|
p
|
|
|
|
}"`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
rm -f LAST_UPDATED gcc/REVISION
|
2001-07-27 08:00:45 +02:00
|
|
|
{
|
2010-09-13 16:44:21 +02:00
|
|
|
date
|
|
|
|
echo "`TZ=UTC date` (revision $revision)"
|
2001-07-27 08:00:45 +02:00
|
|
|
} > LAST_UPDATED
|
2007-08-16 21:05:48 +02:00
|
|
|
echo "[$branch revision $revision]" > gcc/REVISION
|
|
|
|
|
2000-05-12 22:18:49 +02:00
|
|
|
touch_files_reexec
|