gcc/libgomp/ChangeLog

4405 lines
159 KiB
Plaintext
Raw Normal View History

2014-11-19 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libgomp.c/examples-4/e.53.5.c: Require
vect_simd_clones effective target.
* testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
2014-11-14 Jakub Jelinek <jakub@redhat.com>
* libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
of 32 as block_size.
* libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
instead of 32 as block_size.
2014-11-13 Andrey Turetskiy <andrey.turetskiy@intel.com>
Ilya Verbin <ilya.verbin@intel.com>
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Set up offload_additional_options,
offload_additional_lib_paths and offload_targets.
* testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
* testsuite/Makefile.in: Regenerate.
* testsuite/lib/libgomp.exp (libgomp_init): Append
offload_additional_lib_paths to LD_LIBRARY_PATH. Append
offload_additional_options to ALWAYS_CFLAGS. Append liboffloadmic
build directory to LD_LIBRARY_PATH for intelmic offload targets.
[PATCH 7/7] OpenMP 4.0 offloading infrastructure: testsuite. libgomp/ * testsuite/lib/libgomp.exp (check_effective_target_offload_device): New. * testsuite/libgomp.c++/c++.exp: Include tests from subdirectories. * testsuite/libgomp.c++/examples-4/e.51.5.C: New test. * testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto. * testsuite/libgomp.c/examples-4/e.50.1.c: Ditto. * testsuite/libgomp.c/examples-4/e.50.2.c: Ditto. * testsuite/libgomp.c/examples-4/e.50.3.c: Ditto. * testsuite/libgomp.c/examples-4/e.50.4.c: Ditto. * testsuite/libgomp.c/examples-4/e.50.5.c: Ditto. * testsuite/libgomp.c/examples-4/e.51.1.c: Ditto. * testsuite/libgomp.c/examples-4/e.51.2.c: Ditto. * testsuite/libgomp.c/examples-4/e.51.3.c: Ditto. * testsuite/libgomp.c/examples-4/e.51.4.c: Ditto. * testsuite/libgomp.c/examples-4/e.51.6.c: Ditto. * testsuite/libgomp.c/examples-4/e.51.7.c: Ditto. * testsuite/libgomp.c/examples-4/e.52.1.c: Ditto. * testsuite/libgomp.c/examples-4/e.52.2.c: Ditto. * testsuite/libgomp.c/examples-4/e.53.1.c: Ditto. * testsuite/libgomp.c/examples-4/e.53.3.c: Ditto. * testsuite/libgomp.c/examples-4/e.53.4.c: Ditto. * testsuite/libgomp.c/examples-4/e.53.5.c: Ditto. * testsuite/libgomp.c/examples-4/e.54.2.c: Ditto. * testsuite/libgomp.c/examples-4/e.54.3.c: Ditto. * testsuite/libgomp.c/examples-4/e.54.4.c: Ditto. * testsuite/libgomp.c/examples-4/e.54.5.c: Ditto. * testsuite/libgomp.c/examples-4/e.54.6.c: Ditto. * testsuite/libgomp.c/examples-4/e.55.1.c: Ditto. * testsuite/libgomp.c/examples-4/e.55.2.c: Ditto. * testsuite/libgomp.c/examples-4/e.56.3.c: Ditto. * testsuite/libgomp.c/examples-4/e.56.4.c: Ditto. * testsuite/libgomp.c/examples-4/e.57.1.c: Ditto. * testsuite/libgomp.c/examples-4/e.57.2.c: Ditto. * testsuite/libgomp.c/examples-4/e.57.3.c: Ditto. * testsuite/libgomp.c/target-7.c: Fix test. * testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test. * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto. * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto. Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com> Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com> From-SVN: r217494
2014-11-13 14:56:22 +01:00
2014-11-13 Andrey Turetskiy <andrey.turetskiy@intel.com>
Ilya Verbin <ilya.verbin@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Ilya Tocar <ilya.tocar@intel.com>
* testsuite/lib/libgomp.exp
(check_effective_target_offload_device): New.
* testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
* testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
* testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
* testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
* testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
* testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
* testsuite/libgomp.c/target-7.c: Fix test.
* testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
* testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
[PATCH 5/7] OpenMP 4.0 offloading infrastructure: libgomp. libgomp/ * libgomp.map (GOMP_4.0.1): New symbol version. Add GOMP_offload_register. * libgomp_target.h: New file. * splay-tree.h: New file. * target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h. (gomp_target_init): New forward declaration. (gomp_is_initialized): New static variable. (splay_tree_node, splay_tree, splay_tree_key): New typedefs. (struct target_mem_desc, struct splay_tree_key_s, offload_image_descr): New structures. (offload_images, num_offload_images, devices, num_devices): New static variables. (splay_compare): New static function. (struct gomp_device_descr): New structure. (gomp_get_num_devices): Call gomp_target_init. (resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt) (gomp_unmap_vars, gomp_update, gomp_init_device): New static functions. (GOMP_offload_register): New function. (GOMP_target): Arrange for host callback to be performed in a separate initial thread and contention group, inheriting ICVs from gomp_global_icv etc. Call gomp_map_vars and gomp_unmap_vars. Add device initialization and lookup for target function in splay tree. (GOMP_target_data): Add device initialization and call gomp_map_vars. (GOMP_target_end_data): Call gomp_unmap_vars. (GOMP_target_update): Add device initialization and call gomp_update. (gomp_load_plugin_for_device, gomp_register_images_for_device) (gomp_target_init): New static functions. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com> From-SVN: r217492
2014-11-13 14:49:47 +01:00
2014-11-13 Jakub Jelinek <jakub@redhat.com>
Ilya Verbin <ilya.verbin@intel.com>
Thomas Schwinge <thomas@codesourcery.com>
Andrey Turetskiy <andrey.turetskiy@intel.com>
* libgomp.map (GOMP_4.0.1): New symbol version.
Add GOMP_offload_register.
* libgomp_target.h: New file.
* splay-tree.h: New file.
* target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h.
(gomp_target_init): New forward declaration.
(gomp_is_initialized): New static variable.
(splay_tree_node, splay_tree, splay_tree_key): New typedefs.
(struct target_mem_desc, struct splay_tree_key_s, offload_image_descr):
New structures.
(offload_images, num_offload_images, devices, num_devices): New static
variables.
(splay_compare): New static function.
(struct gomp_device_descr): New structure.
(gomp_get_num_devices): Call gomp_target_init.
(resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt)
(gomp_unmap_vars, gomp_update, gomp_init_device): New static functions.
(GOMP_offload_register): New function.
(GOMP_target): Arrange for host callback to be performed in a separate
initial thread and contention group, inheriting ICVs from
gomp_global_icv etc. Call gomp_map_vars and gomp_unmap_vars.
Add device initialization and lookup for target function in splay tree.
(GOMP_target_data): Add device initialization and call gomp_map_vars.
(GOMP_target_end_data): Call gomp_unmap_vars.
(GOMP_target_update): Add device initialization and call gomp_update.
(gomp_load_plugin_for_device, gomp_register_images_for_device)
(gomp_target_init): New static functions.
[PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make * configure: Regenerate. * configure.ac (--enable-as-accelerator-for) (--enable-offload-targets): New configure options. gcc/ * Makefile.in (real_target_noncanonical, accel_dir_suffix) (enable_as_accelerator): New variables substituted by configure. (libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of being configured as an offload compiler. (DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and ACCEL_DIR_SUFFIX. (install-cpp, install-common, install_driver, install-gcc-ar): Do not install for the offload compiler. * config.in: Regenerate. * configure: Regenerate. * configure.ac (real_target_noncanonical, accel_dir_suffix) (enable_as_accelerator): Compute new variables. (ACCEL_COMPILER): Define if the compiler is built as the accel compiler. (OFFLOAD_TARGETS): List of target names suitable for offloading. (ENABLE_OFFLOADING): Define if list of offload targets is not empty. gcc/cp/ * Make-lang.in (c++.install-common): Do not install for the offload compiler. gcc/doc/ * install.texi (Options specification): Document --enable-as-accelerator-for and --enable-offload-targets. gcc/fortran/ * Make-lang.in (fortran.install-common): Do not install for the offload compiler. libgcc/ * Makefile.in (crtoffloadbegin$(objext)): New rule. (crtoffloadend$(objext)): Likewise. * configure: Regenerate. * configure.ac (accel_dir_suffix): Compute new variable. (extra_parts): Add crtoffloadbegin.o and crtoffloadend.o if enable_offload_targets is not empty. * offloadstuff.c: New file. libgomp/ * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for libdl, required for plugin support. (PLUGIN_SUPPORT): Define if plugins are supported. (enable_offload_targets): Support Intel MIC targets. (OFFLOAD_TARGETS): List of target names suitable for offloading. lto-plugin/ * Makefile.am (libexecsubdir): Tweak for the possibility of being configured for offload compiler. (accel_dir_suffix, real_target_noncanonical): New variables substituted by configure. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new variables. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com> From-SVN: r217485
2014-11-13 14:28:56 +01:00
2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
Ilya Verbin <ilya.verbin@intel.com>
Andrey Turetskiy <andrey.turetskiy@intel.com>
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Check for libdl, required for plugin support.
(PLUGIN_SUPPORT): Define if plugins are supported.
(enable_offload_targets): Support Intel MIC targets.
(OFFLOAD_TARGETS): List of target names suitable for offloading.
re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) toplevel: 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * libtool.m4: Fix globbing of darwin versions. boehm-gc/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. gcc/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libatomic/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libbacktrace/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libcc1/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libcilkrts/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libffi/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libgfortran/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libgomp/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libitm/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libobjc/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libquadmath/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libsanitizer/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libssp/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libstdc++-v3/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libvtv/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. lto-plugin/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libjava/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. libjava/classpath/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. zlib/ 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 * configure: Regenerate. From-SVN: r217366
2014-11-11 21:25:18 +01:00
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
2014-11-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
2014-10-06 Marek Polacek <polacek@redhat.com>
* testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
* testsuite/libgomp.c/nqueens-1.c: Include <stdlib.h>.
* testsuite/libgomp.c/thread-limit-1.c: Include <omp.h>
* testsuite/libgomp.c/thread-limit-2.c: Likewise.
2014-10-06 Marek Polacek <polacek@redhat.com>
* testsuite/libgomp.c/affinity-1.c: Fix implicit declarations.
* testsuite/libgomp.c/nqueens-1.c: Likewise.
* testsuite/libgomp.c/pr26943-3.c: Likewise.
* testsuite/libgomp.c/pr26943-4.c: Likewise.
* testsuite/libgomp.c/pr36802-2.c: Likewise.
* testsuite/libgomp.c/pr36802-3.c: Likewise.
* testsuite/libgomp.c/thread-limit-1.c: Likewise.
* testsuite/libgomp.c/thread-limit-2.c: Likewise.
* testsuite/libgomp.c/appendix-a/a.15.1.c: Include <omp.h>.
* testsuite/libgomp.c/omp-loop02.c: Fix defaulting to int.
* testsuite/libgomp.c/omp-parallel-for.c: Likewise.
* testsuite/libgomp.c/omp-parallel-if.c: Likewise.
* testsuite/libgomp.c/omp-single-1.c: Likewise.
* testsuite/libgomp.c/omp-single-2.c: Likewise.
* testsuite/libgomp.c/omp_matvec.c: Likewise.
* testsuite/libgomp.c/omp_workshare3.c: Likewise.
* testsuite/libgomp.c/omp_workshare4.c: Likewise.
* testsuite/libgomp.c/shared-1.c: Fix defaulting to int. Fix implicit
declarations.
2014-10-03 Jakub Jelinek <jakub@redhat.com>
PR libgomp/61200
* testsuite/libgomp.c/pr61200.c: New test.
2014-09-18 Jakub Jelinek <jakub@redhat.com>
PR c++/63248
* testsuite/libgomp.c++/pr63248.C: New test.
2014-08-04 Jakub Jelinek <jakub@redhat.com>
* task.c (GOMP_taskgroup_end): If taskgroup->num_children
is not zero, but taskgroup->children is NULL and there are
any task->children, schedule those instead of waiting.
* testsuite/libgomp.c/depend-6.c: New test.
* testsuite/libgomp.c/depend-7.c: New test.
* testsuite/libgomp.c/depend-8.c: New test.
* testsuite/libgomp.c/depend-9.c: New test.
* testsuite/libgomp.c/depend-10.c: New test.
libgomp.h (struct gomp_task_depend_entry): Add redundant_out field. * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field. (struct gomp_taskwait): New type. (struct gomp_task): Add taskwait and parent_depends_on, remove in_taskwait and taskwait_sem fields. (gomp_finish_task): Don't destroy taskwait_sem. * task.c (gomp_init_task): Don't init in_taskwait, instead init taskwait and parent_depends_on. (GOMP_task): For if (0) tasks with depend clause that depend on earlier tasks don't defer them, instead call gomp_task_maybe_wait_for_dependencies to wait for the dependencies. Initialize redundant_out field, for redundant out entries just move them at the end of linked list instead of removing them completely, and set redundant_out flag instead of redundant. (gomp_task_run_pre): Update last_parent_depends_on if scheduling that task. (gomp_task_run_post_handle_dependers): If parent is in gomp_task_maybe_wait_for_dependencies and newly runnable task is not parent_depends_on, queue it in parent->children linked list after all runnable tasks with parent_depends_on set. Adjust for addition of taskwait indirection. (gomp_task_run_post_remove_parent): If parent is in gomp_task_maybe_wait_for_dependencies and task to be removed is parent_depends_on, decrement n_depend and if needed awake parent. Adjust for addition of taskwait indirection. (GOMP_taskwait): Adjust for addition of taskwait indirection. (gomp_task_maybe_wait_for_dependencies): New function. * testsuite/libgomp.c/depend-5.c: New test. From-SVN: r213408
2014-08-01 10:05:13 +02:00
2014-08-01 Jakub Jelinek <jakub@redhat.com>
* libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
(struct gomp_taskwait): New type.
(struct gomp_task): Add taskwait and parent_depends_on, remove
in_taskwait and taskwait_sem fields.
(gomp_finish_task): Don't destroy taskwait_sem.
* task.c (gomp_init_task): Don't init in_taskwait, instead init
taskwait and parent_depends_on.
(GOMP_task): For if (0) tasks with depend clause that depend on
earlier tasks don't defer them, instead call
gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
Initialize redundant_out field, for redundant out entries just
move them at the end of linked list instead of removing them
completely, and set redundant_out flag instead of redundant.
(gomp_task_run_pre): Update last_parent_depends_on if scheduling
that task.
(gomp_task_run_post_handle_dependers): If parent is in
gomp_task_maybe_wait_for_dependencies and newly runnable task
is not parent_depends_on, queue it in parent->children linked
list after all runnable tasks with parent_depends_on set.
Adjust for addition of taskwait indirection.
(gomp_task_run_post_remove_parent): If parent is in
gomp_task_maybe_wait_for_dependencies and task to be removed
is parent_depends_on, decrement n_depend and if needed awake
parent. Adjust for addition of taskwait indirection.
(GOMP_taskwait): Adjust for addition of taskwait indirection.
(gomp_task_maybe_wait_for_dependencies): New function.
* testsuite/libgomp.c/depend-5.c: New test.
2014-07-13 Tobias Burnus <burnus@net-b.de>
* testsuite/libgomp.fortran/pr34020.f90: Make compile
libgomp.h (struct gomp_task_depend_entry): Add redundant_out field. * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field. (struct gomp_taskwait): New type. (struct gomp_task): Add taskwait and parent_depends_on, remove in_taskwait and taskwait_sem fields. (gomp_finish_task): Don't destroy taskwait_sem. * task.c (gomp_init_task): Don't init in_taskwait, instead init taskwait and parent_depends_on. (GOMP_task): For if (0) tasks with depend clause that depend on earlier tasks don't defer them, instead call gomp_task_maybe_wait_for_dependencies to wait for the dependencies. Initialize redundant_out field, for redundant out entries just move them at the end of linked list instead of removing them completely, and set redundant_out flag instead of redundant. (gomp_task_run_pre): Update last_parent_depends_on if scheduling that task. (gomp_task_run_post_handle_dependers): If parent is in gomp_task_maybe_wait_for_dependencies and newly runnable task is not parent_depends_on, queue it in parent->children linked list after all runnable tasks with parent_depends_on set. Adjust for addition of taskwait indirection. (gomp_task_run_post_remove_parent): If parent is in gomp_task_maybe_wait_for_dependencies and task to be removed is parent_depends_on, decrement n_depend and if needed awake parent. Adjust for addition of taskwait indirection. (GOMP_taskwait): Adjust for addition of taskwait indirection. (gomp_task_maybe_wait_for_dependencies): New function. * testsuite/libgomp.c/depend-5.c: New test. From-SVN: r213408
2014-08-01 10:05:13 +02:00
with TS 18508/Fortran 2015.
2014-07-06 Marek Polacek <polacek@redhat.com>
PR c/6940
* testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.
2014-07-03 Jakub Jelinek <jakub@redhat.com>
* testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
matches regex $lang_source_re, add $lang_include_flags to options.
* testsuite/libgomp.c/c.exp: Unset lang_include_flags.
* testsuite/libgomp.c++/c++.exp: Likewise.
* testsuite/libgomp.fortran/fortran.exp: Likewise. Set lang_source_re
and lang_include_flags instead of adding -fintrinsic-modules-path= to
ALWAYS_CFLAGS.
* testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
2014-07-03 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/libgomp.fortran/fortran.exp: Explain
gfortran-dg-runtest usage.
2014-06-25 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/simd5.f90: New test.
* testsuite/libgomp.fortran/simd6.f90: New test.
* testsuite/libgomp.fortran/simd7.f90: New test.
gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is non-NULL. <case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT. (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is non-NULL. (gimplify_adjust_omp_clauses): Likewise. * omp-low.c (lower_rec_simd_input_clauses, lower_rec_input_clauses, expand_omp_simd): Handle non-constant safelen the same as safelen(1). * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_ALIGNED. For OMP_CLAUSE_{MAP,TO,FROM} if not decl use walk_tree. (convert_nonlocal_reference_stmt, convert_local_reference_stmt): Fixup handling of GIMPLE_OMP_TARGET. (convert_tramp_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_TARGET. gcc/fortran/ * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead of n->udr. * f95-lang.c (gfc_init_builtin_functions): Initialize BUILT_IN_ASSUME_ALIGNED. * gfortran.h (gfc_omp_namelist): Change udr field type to struct gfc_omp_namelist_udr. (gfc_omp_namelist_udr): New type. (gfc_get_omp_namelist_udr): Define. (gfc_resolve_code): New prototype. * match.c (gfc_free_omp_namelist): Free name->udr. * module.c (intrinsics): Add INTRINSIC_USER. (fix_mio_expr): Likewise. (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION. * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr. (gfc_match_omp_declare_reduction): Treat len=: the same as len=*. Set attr.flavor on omp_{out,in,priv,orig} artificial variables. (struct resolve_omp_udr_callback_data): New type. (resolve_omp_udr_callback, resolve_omp_udr_callback2, resolve_omp_udr_clause): New functions. (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses here. (omp_udr_callback): Don't check for implicitly declared functions here. (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for implicitly declared subroutines here. * resolve.c (resolve_function): If value.function.isym is non-NULL, consider it already resolved. (resolve_code): Renamed to ... (gfc_resolve_code): ... this. No longer static. (gfc_resolve_blocks, generate_component_assignments, resolve_codes): Adjust callers. * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize by reference type (C_PTR) variables. (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL. (gfc_trans_omp_udr_expr): Remove. (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes. Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension expand it as assignment or subroutine call. Don't initialize value.function.isym. gcc/testsuite/ * gfortran.dg/gomp/udr2.f90 (f7, f9): Add !$omp parallel with reduction clause. * gfortran.dg/gomp/udr4.f90 (f4): Likewise. Remove Label is never defined expected error. * gfortran.dg/gomp/udr8.f90: New test. libgomp/ * testsuite/libgomp.fortran/aligned1.f03: New test. * testsuite/libgomp.fortran/nestedfn5.f90: New test. * testsuite/libgomp.fortran/target7.f90: Surround loop spawning tasks with !$omp parallel !$omp single. * testsuite/libgomp.fortran/target8.f90: New test. * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust not to use trim in the combiner, instead call elemental function. (fn): New elemental function. * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init): Make elemental. * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out, omp_in): Likewise. * testsuite/libgomp.fortran/udr12.f90: New test. * testsuite/libgomp.fortran/udr13.f90: New test. * testsuite/libgomp.fortran/udr14.f90: New test. * testsuite/libgomp.fortran/udr15.f90: New test. From-SVN: r211929
2014-06-24 09:45:22 +02:00
2014-06-24 Jakub Jelinek <jakub@redhat.com>
gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator not mentioned in clauses use private clause if... * gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator not mentioned in clauses use private clause if the iterator is declared in #pragma omp for simd, and when adding lastprivate instead, add it to the outer #pragma omp for too. Diagnose if the variable is private in outer context. For simd collapse > 1 loops, replace all iterators with temporaries. * omp-low.c (lower_rec_input_clauses): Handle LINEAR clause the same even in collapse > 1 loops. gcc/c/ * c-parser.c (c_parser_omp_for_loop): For #pragma omp parallel for simd move lastprivate clause from parallel to for rather than simd. gcc/cp/ * parser.c (cp_parser_omp_for_loop): For #pragma omp parallel for simd move lastprivate clause from parallel to for rather than simd. libgomp/ * testsuite/libgomp.c/for-2.c: Define SC to static for #pragma omp for simd testing. * testsuite/libgomp.c/for-2.h (SC): Define if not defined. (N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use SC macro. * testsuite/libgomp.c/simd-14.c: New test. * testsuite/libgomp.c/simd-15.c: New test. * testsuite/libgomp.c/simd-16.c: New test. * testsuite/libgomp.c/simd-17.c: New test. * testsuite/libgomp.c++/for-10.C: Define SC to static for #pragma omp for simd testing. * testsuite/libgomp.c++/simd10.C: New test. * testsuite/libgomp.c++/simd11.C: New test. * testsuite/libgomp.c++/simd12.C: New test. * testsuite/libgomp.c++/simd13.C: New test. From-SVN: r211930
2014-06-24 09:53:52 +02:00
* testsuite/libgomp.c/for-2.c: Define SC to static for
#pragma omp for simd testing.
* testsuite/libgomp.c/for-2.h (SC): Define if not defined.
(N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
SC macro.
* testsuite/libgomp.c/simd-14.c: New test.
* testsuite/libgomp.c/simd-15.c: New test.
* testsuite/libgomp.c/simd-16.c: New test.
* testsuite/libgomp.c/simd-17.c: New test.
* testsuite/libgomp.c++/for-10.C: Define SC to static for
#pragma omp for simd testing.
* testsuite/libgomp.c++/simd10.C: New test.
* testsuite/libgomp.c++/simd11.C: New test.
* testsuite/libgomp.c++/simd12.C: New test.
* testsuite/libgomp.c++/simd13.C: New test.
gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is non-NULL. <case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT. (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is non-NULL. (gimplify_adjust_omp_clauses): Likewise. * omp-low.c (lower_rec_simd_input_clauses, lower_rec_input_clauses, expand_omp_simd): Handle non-constant safelen the same as safelen(1). * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_ALIGNED. For OMP_CLAUSE_{MAP,TO,FROM} if not decl use walk_tree. (convert_nonlocal_reference_stmt, convert_local_reference_stmt): Fixup handling of GIMPLE_OMP_TARGET. (convert_tramp_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_TARGET. gcc/fortran/ * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead of n->udr. * f95-lang.c (gfc_init_builtin_functions): Initialize BUILT_IN_ASSUME_ALIGNED. * gfortran.h (gfc_omp_namelist): Change udr field type to struct gfc_omp_namelist_udr. (gfc_omp_namelist_udr): New type. (gfc_get_omp_namelist_udr): Define. (gfc_resolve_code): New prototype. * match.c (gfc_free_omp_namelist): Free name->udr. * module.c (intrinsics): Add INTRINSIC_USER. (fix_mio_expr): Likewise. (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION. * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr. (gfc_match_omp_declare_reduction): Treat len=: the same as len=*. Set attr.flavor on omp_{out,in,priv,orig} artificial variables. (struct resolve_omp_udr_callback_data): New type. (resolve_omp_udr_callback, resolve_omp_udr_callback2, resolve_omp_udr_clause): New functions. (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses here. (omp_udr_callback): Don't check for implicitly declared functions here. (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for implicitly declared subroutines here. * resolve.c (resolve_function): If value.function.isym is non-NULL, consider it already resolved. (resolve_code): Renamed to ... (gfc_resolve_code): ... this. No longer static. (gfc_resolve_blocks, generate_component_assignments, resolve_codes): Adjust callers. * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize by reference type (C_PTR) variables. (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL. (gfc_trans_omp_udr_expr): Remove. (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes. Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension expand it as assignment or subroutine call. Don't initialize value.function.isym. gcc/testsuite/ * gfortran.dg/gomp/udr2.f90 (f7, f9): Add !$omp parallel with reduction clause. * gfortran.dg/gomp/udr4.f90 (f4): Likewise. Remove Label is never defined expected error. * gfortran.dg/gomp/udr8.f90: New test. libgomp/ * testsuite/libgomp.fortran/aligned1.f03: New test. * testsuite/libgomp.fortran/nestedfn5.f90: New test. * testsuite/libgomp.fortran/target7.f90: Surround loop spawning tasks with !$omp parallel !$omp single. * testsuite/libgomp.fortran/target8.f90: New test. * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust not to use trim in the combiner, instead call elemental function. (fn): New elemental function. * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init): Make elemental. * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out, omp_in): Likewise. * testsuite/libgomp.fortran/udr12.f90: New test. * testsuite/libgomp.fortran/udr13.f90: New test. * testsuite/libgomp.fortran/udr14.f90: New test. * testsuite/libgomp.fortran/udr15.f90: New test. From-SVN: r211929
2014-06-24 09:45:22 +02:00
* testsuite/libgomp.fortran/aligned1.f03: New test.
* testsuite/libgomp.fortran/nestedfn5.f90: New test.
* testsuite/libgomp.fortran/target7.f90: Surround loop spawning
tasks with !$omp parallel !$omp single.
* testsuite/libgomp.fortran/target8.f90: New test.
* testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
not to use trim in the combiner, instead call elemental function.
(fn): New elemental function.
* testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
Make elemental.
* testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
omp_in): Likewise.
* testsuite/libgomp.fortran/udr12.f90: New test.
* testsuite/libgomp.fortran/udr13.f90: New test.
* testsuite/libgomp.fortran/udr14.f90: New test.
* testsuite/libgomp.fortran/udr15.f90: New test.
gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. * gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. (struct gimplify_adjust_omp_clauses_data): New type. (gimplify_adjust_omp_clauses_1): Adjust for data being a struct gimplify_adjust_omp_clauses_data pointer instead of tree *. Pass pre_p as a new argument to lang_hooks.decls.omp_finish_clause hook. (gimplify_adjust_omp_clauses): Add pre_p argument, adjust splay_tree_foreach to pass both list_p and pre_p. (gimplify_omp_parallel, gimplify_omp_task, gimplify_omp_for, gimplify_omp_workshare, gimplify_omp_target_update): Adjust gimplify_adjust_omp_clauses callers. * langhooks.c (lhd_omp_finish_clause): New function. * langhooks-def.h (lhd_omp_finish_clause): New prototype. (LANG_HOOKS_OMP_FINISH_CLAUSE): Define to lhd_omp_finish_clause. * langhooks.h (struct lang_hooks_for_decls): Add a new gimple_seq * argument to omp_finish_clause hook. * omp-low.c (scan_sharing_clauses): Call scan_omp_op on non-DECL_P OMP_CLAUSE_DECL if ctx->outer. (scan_omp_parallel, lower_omp_for): When adding _LOOPTEMP_ clause var, add it to outer ctx's decl_map as identity. * tree-core.h (OMP_CLAUSE_MAP_TO_PSET): New map kind. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle various OpenMP 4.0 clauses. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_MAP_TO_PSET. gcc/cp/ * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq * argument. * cp-tree.h (cxx_omp_finish_clause): Adjust prototype. gcc/fortran/ * cpp.c (cpp_define_builtins): Change _OPENMP macro to 201307. * dump-parse-tree.c (show_omp_namelist): Add list_type argument. Adjust for rop being u.reduction_op now, handle depend_op or map_op. (show_omp_node): Adjust callers. Print some new OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT} becoming a single OMP_LIST_DEPEND. * f95-lang.c (gfc_handle_omp_declare_target_attribute): New function. (gfc_attribute_table): New variable. (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine. * frontend-passes.c (gfc_code_walker): Handle new OpenMP target EXEC_OMP_* codes and new clauses. * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET, ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE, ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS, ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD, ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS, ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE, ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD, ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE, ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD. (symbol_attribute): Add omp_declare_target field. (gfc_omp_depend_op, gfc_omp_map_op): New enums. (gfc_omp_namelist): Replace rop field with union containing reduction_op, depend_op and map_op. (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove. (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New. (gfc_omp_clauses): Add num_teams, device, thread_limit, dist_sched_kind, dist_chunk_size fields. (gfc_common_head): Add omp_declare_target field. (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA, EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD, EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE, EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and EXEC_OMP_TARGET_UPDATE. (gfc_add_omp_declare_target): New prototype. * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do, gfc_match_omp_distribute_parallel_do_simd, gfc_match_omp_distribute_simd, gfc_match_omp_target, gfc_match_omp_target_data, gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute, gfc_match_omp_target_teams_distribute_parallel_do, gfc_match_omp_target_teams_distribute_parallel_do_simd, gfc_match_omp_target_teams_distribute_simd, gfc_match_omp_target_update, gfc_match_omp_teams, gfc_match_omp_teams_distribute, gfc_match_omp_teams_distribute_parallel_do, gfc_match_omp_teams_distribute_parallel_do_simd, gfc_match_omp_teams_distribute_simd): New prototypes. * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET. (attr_bits): Likewise. (mio_symbol_attribute): Handle omp_declare_target attribute. (gfc_free_omp_clauses): Free num_teams, device, thread_limit and dist_chunk_size expressions. (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Use 1U instead of 1. (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_DIST_SCHEDULE): Define. (gfc_match_omp_clauses): Change mask parameter to unsigned int. Adjust for rop becoming u.reduction_op. Disallow inbranch with notinbranch. For depend clause, always create OMP_LIST_DEPEND and fill in u.depend_op. Handle num_teams, device, map, to, from, thread_limit and dist_schedule clauses. (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and OMP_CLAUSE_NOTINBRANCH. (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES): Define. (match_omp): New function. (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel, gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd, gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare, gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single, gfc_match_omp_task): Rewritten using match_omp. (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction): Diagnose if the directives are followed by unexpected junk. (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do, gfc_match_omp_distribute_parallel_do_simd, gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target, gfc_match_omp_target, gfc_match_omp_target_data, gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute, gfc_match_omp_target_teams_distribute_parallel_do, gfc_match_omp_target_teams_distribute_parallel_do_simd, gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update, gfc_match_omp_teams, gfc_match_omp_teams_distribute, gfc_match_omp_teams_distribute_parallel_do, gfc_match_omp_teams_distribute_parallel_do_simd, gfc_match_omp_teams_distrbute_simd): New functions. * openmp.c (resolve_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND. Handle OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device, dist_chunk_size and thread_limit. (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into ctx.sharing_clauses. Call gfc_resolve_omp_do_blocks for various new EXEC_OMP_* codes. (resolve_omp_do): Handle various new EXEC_OMP_* codes. (gfc_resolve_omp_directive): Likewise. (gfc_resolve_omp_declare_simd): Add missing space to diagnostics. * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0 offloading related directives. (case_executable): Add ST_OMP_TARGET_UPDATE. (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*, ST_OMP_DISTRIBUTE*. (case_decl): Add ST_OMP_DECLARE_TARGET. (gfc_ascii_statement): Handle new ST_OMP_* codes. (parse_omp_do): Handle various new ST_OMP_* codes. (parse_executable): Likewise. * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_* codes. (resolve_code): Likewise. (resolve_symbol): Change that !$OMP DECLARE TARGET variables are saved. * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes. * symbol.c (check_conflict): Check omp_declare_target conflicts. (gfc_add_omp_declare_target): New function. (gfc_copy_attr): Copy omp_declare_target. * trans.c (trans_code): Handle various new EXEC_OMP_* codes. * trans-common.c (build_common_decl): Add "omp declare target" attribute if needed. * trans-decl.c (add_attributes_to_decl): Likewise. * trans.h (gfc_omp_finish_clause): New prototype. * trans-openmp.c (gfc_omp_finish_clause): New function. (gfc_trans_omp_reduction_list): Adjust for rop being renamed to u.reduction_op. (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT} change to OMP_LIST_DEPEND and fix up depend handling. Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams, thread_limit, device, dist_chunk_size and dist_sched_kind. (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE. (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS, GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE, GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New. (gfc_split_omp_clauses): Handle splitting of clauses for new EXEC_OMP_* codes. (gfc_trans_omp_do_simd): Add pblock argument, adjust for being callable for combined constructs. (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise. (gfc_trans_omp_distribute, gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_target_data, gfc_trans_omp_target_update): New functions. (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle new EXEC_OMP_* codes. gcc/testsuite/ * gfortran.dg/gomp/declare-simd-1.f90: New test. * gfortran.dg/gomp/depend-1.f90: New test. * gfortran.dg/gomp/target1.f90: New test. * gfortran.dg/gomp/target2.f90: New test. * gfortran.dg/gomp/target3.f90: New test. * gfortran.dg/gomp/udr4.f90: Adjust expected diagnostics. * gfortran.dg/openmp-define-3.f90: Expect _OPENMP 201307 instead of 201107. libgomp/ * omp_lib.f90.in (openmp_version): Set to 201307. * omp_lib.h.in (openmp_version): Likewise. * testsuite/libgomp.c/target-8.c: New test. * testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch and inbranch clauses. * testsuite/libgomp.fortran/depend-3.f90: New test. * testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new openmp_version. * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise. * testsuite/libgomp.fortran/target1.f90: New test. * testsuite/libgomp.fortran/target2.f90: New test. * testsuite/libgomp.fortran/target3.f90: New test. * testsuite/libgomp.fortran/target4.f90: New test. * testsuite/libgomp.fortran/target5.f90: New test. * testsuite/libgomp.fortran/target6.f90: New test. * testsuite/libgomp.fortran/target7.f90: New test. From-SVN: r211768
2014-06-18 09:16:12 +02:00
2014-06-18 Jakub Jelinek <jakub@redhat.com>
* omp_lib.f90.in (openmp_version): Set to 201307.
* omp_lib.h.in (openmp_version): Likewise.
* testsuite/libgomp.c/target-8.c: New test.
* testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
and inbranch clauses.
* testsuite/libgomp.fortran/depend-3.f90: New test.
* testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
openmp_version.
* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
* testsuite/libgomp.fortran/target1.f90: New test.
* testsuite/libgomp.fortran/target2.f90: New test.
* testsuite/libgomp.fortran/target3.f90: New test.
* testsuite/libgomp.fortran/target4.f90: New test.
* testsuite/libgomp.fortran/target5.f90: New test.
* testsuite/libgomp.fortran/target6.f90: New test.
* testsuite/libgomp.fortran/target7.f90: New test.
re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) PR fortran/60928 * omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_LASTPRIVATE>: Set lastprivate_firstprivate even if omp_private_outer_ref langhook returns true. <case OMP_CLAUSE_REDUCTION>: When calling omp_clause_default_ctor langhook, call unshare_expr on new_var and call build_outer_var_ref to get the last argument. gcc/c-family/ * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK... (omp_pragmas): ... back here. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd like -fopenmp. * openmp.c (resolve_omp_clauses): Remove allocatable components diagnostics. Add associate-name and intent(in) pointer diagnostics for various clauses, diagnose procedure pointers in reduction clause. * parse.c (match_word_omp_simd): New function. (matchs, matcho): New macros. (decode_omp_directive): Change match macros to either matchs or matcho. Handle -fopenmp-simd. (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp. * scanner.c (skip_free_comments, skip_fixed_comments, include_line): Likewise. * trans-array.c (get_full_array_size): Rename to... (gfc_full_array_size): ... this. No longer static. (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument and handle it. (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust duplicate_allocatable callers. (gfc_duplicate_allocatable_nocopy): New function. (structure_alloc_comps): Adjust g*_full_array_size and duplicate_allocatable caller. * trans-array.h (gfc_full_array_size, gfc_duplicate_allocatable_nocopy): New prototypes. * trans-common.c (create_common): Call gfc_finish_decl_attrs. * trans-decl.c (gfc_finish_decl_attrs): New function. (gfc_finish_var_decl, create_function_arglist, gfc_get_fake_result_decl): Call it. (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated, don't allocate it again. (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on associate-names. * trans.h (gfc_finish_decl_attrs): New prototype. (struct lang_decl): Add scalar_allocatable and scalar_pointer bitfields. (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER, GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER, GFC_DECL_ASSOCIATE_VAR_P): Define. (GFC_POINTER_TYPE_P): Remove. * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl. (gfc_omp_predetermined_sharing): Associate-names are predetermined. (enum walk_alloc_comps): New. (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr, gfc_walk_alloc_comps): New functions. (gfc_omp_private_outer_ref): Return true for scalar allocatables or decls with allocatable components. (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar allocatables and decls with allocatable components. (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable arrays here. (gfc_trans_omp_reduction_list): Call gfc_trans_omp_array_reduction_or_udr even for allocatable scalars. (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD. (gfc_trans_omp_parallel_do_simd): Likewise. * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P. (gfc_get_derived_type): Call gfc_finish_decl_attrs. gcc/testsuite/ * gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error directives. * gfortran.dg/gomp/associate1.f90: New test. * gfortran.dg/gomp/intentin1.f90: New test. * gfortran.dg/gomp/openmp-simd-1.f90: New test. * gfortran.dg/gomp/openmp-simd-2.f90: New test. * gfortran.dg/gomp/openmp-simd-3.f90: New test. * gfortran.dg/gomp/proc_ptr_2.f90: New test. libgomp/ * testsuite/libgomp.fortran/allocatable9.f90: New test. * testsuite/libgomp.fortran/allocatable10.f90: New test. * testsuite/libgomp.fortran/allocatable11.f90: New test. * testsuite/libgomp.fortran/allocatable12.f90: New test. * testsuite/libgomp.fortran/alloc-comp-1.f90: New test. * testsuite/libgomp.fortran/alloc-comp-2.f90: New test. * testsuite/libgomp.fortran/alloc-comp-3.f90: New test. * testsuite/libgomp.fortran/associate1.f90: New test. * testsuite/libgomp.fortran/associate2.f90: New test. * testsuite/libgomp.fortran/procptr1.f90: New test. From-SVN: r211397
2014-06-10 08:05:22 +02:00
2014-06-10 Jakub Jelinek <jakub@redhat.com>
PR fortran/60928
* testsuite/libgomp.fortran/allocatable9.f90: New test.
* testsuite/libgomp.fortran/allocatable10.f90: New test.
* testsuite/libgomp.fortran/allocatable11.f90: New test.
* testsuite/libgomp.fortran/allocatable12.f90: New test.
* testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
* testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
* testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
* testsuite/libgomp.fortran/associate1.f90: New test.
* testsuite/libgomp.fortran/associate2.f90: New test.
* testsuite/libgomp.fortran/procptr1.f90: New test.
dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. gcc/fortran/ * dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. (show_omp_node): Only handle OMP_LIST_REDUCTION, not OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't dump reduction id here. * frontend-passes.c (dummy_code_callback): Renamed to... (gfc_dummy_code_callback): ... this. No longer static. (optimize_reduction): Use gfc_dummy_code_callback instead of dummy_code_callback. * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION. (symbol_attribute): Add omp_udr_artificial_var bitfield. (gfc_omp_reduction_op): New enum. (gfc_omp_namelist): Add rop and udr fields. (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT, OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV, OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND, OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed. (OMP_LIST_REDUCTION): New. (gfc_omp_udr): New type. (gfc_get_omp_udr): Define. (gfc_symtree): Add n.omp_udr field. (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield. (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs, gfc_dummy_code_callback): New prototypes. * match.h (gfc_match_omp_declare_reduction): New prototype. * module.c (MOD_VERSION): Increase to 13. (omp_declare_reduction_stmt): New array. (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs): New functions. (read_module): Read OpenMP user defined reductions. (write_module): Write OpenMP user defined reductions. * openmp.c: Include arith.h. (gfc_free_omp_udr, gfc_find_omp_udr): New functions. (gfc_match_omp_clauses): Handle user defined reductions. Store reduction kind into gfc_omp_namelist instead of using several OMP_LIST_* entries. (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find, gfc_match_omp_declare_reduction): New functions. (resolve_omp_clauses): Adjust for reduction clauses being only in OMP_LIST_REDUCTION list. Diagnose missing UDRs. (struct omp_udr_callback_data): New type. (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New functions. * parse.c (decode_omp_directive): Handle !$omp declare reduction. (case_decl): Add ST_OMP_DECLARE_REDUCTION. (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION. * resolve.c (resolve_fl_variable): Allow len=: or len=* on sym->attr.omp_udr_artificial_var symbols. (resolve_types): Call gfc_resolve_omp_udrs. * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns, use parent ns instead of gfc_current_ns. (gfc_get_sym_tree): Don't insert symbols into namespaces with omp_udr_ns set. (free_omp_udr_tree): New function. (gfc_free_namespace): Call it. * trans-openmp.c (struct omp_udr_find_orig_data): New type. (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions. (gfc_trans_omp_array_reduction): Renamed to... (gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM argument, instead pass gfc_omp_namelist pointer N. Handle user defined reductions. (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument. Handle user defined reductions and reduction ops in gfc_omp_namelist. (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION list. (gfc_split_omp_clauses): Likewise. gcc/testsuite/ * gfortran.dg/gomp/allocatable_components_1.f90: Adjust for reduction clause diagnostic changes. * gfortran.dg/gomp/appendix-a/a.31.3.f90: Likewise. * gfortran.dg/gomp/reduction1.f90: Likewise. * gfortran.dg/gomp/reduction3.f90: Likewise. * gfortran.dg/gomp/udr1.f90: New test. * gfortran.dg/gomp/udr2.f90: New test. * gfortran.dg/gomp/udr3.f90: New test. * gfortran.dg/gomp/udr4.f90: New test. * gfortran.dg/gomp/udr5.f90: New test. * gfortran.dg/gomp/udr6.f90: New test. * gfortran.dg/gomp/udr7.f90: New test. libgomp/ * testsuite/libgomp.fortran/simd1.f90: New test. * testsuite/libgomp.fortran/udr1.f90: New test. * testsuite/libgomp.fortran/udr2.f90: New test. * testsuite/libgomp.fortran/udr3.f90: New test. * testsuite/libgomp.fortran/udr4.f90: New test. * testsuite/libgomp.fortran/udr5.f90: New test. * testsuite/libgomp.fortran/udr6.f90: New test. * testsuite/libgomp.fortran/udr7.f90: New test. * testsuite/libgomp.fortran/udr8.f90: New test. * testsuite/libgomp.fortran/udr9.f90: New test. * testsuite/libgomp.fortran/udr10.f90: New test. * testsuite/libgomp.fortran/udr11.f90: New test. From-SVN: r211303
2014-06-06 09:24:38 +02:00
2014-06-06 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/simd1.f90: New test.
* testsuite/libgomp.fortran/udr1.f90: New test.
* testsuite/libgomp.fortran/udr2.f90: New test.
* testsuite/libgomp.fortran/udr3.f90: New test.
* testsuite/libgomp.fortran/udr4.f90: New test.
* testsuite/libgomp.fortran/udr5.f90: New test.
* testsuite/libgomp.fortran/udr6.f90: New test.
* testsuite/libgomp.fortran/udr7.f90: New test.
* testsuite/libgomp.fortran/udr8.f90: New test.
* testsuite/libgomp.fortran/udr9.f90: New test.
* testsuite/libgomp.fortran/udr10.f90: New test.
* testsuite/libgomp.fortran/udr11.f90: New test.
2014-05-27 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libgomp.fortran/declare-simd-1.f90: Require
vect_simd_clones effective target.
* testsuite/libgomp.fortran/declare-simd-2.f90: Ditto.
2014-05-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/61252
* testsuite/libgomp.c++/simd-9.C: New test.
2014-05-18 Uros Bizjak <ubizjak@gmail.com>
* libgomp.texi (Runitme Library Routines): Remove multiple @menu.
(Environment Variables) Move OMP_PROC_BIND and OMP_STACKSIZE node
texts according to their @menu entry positions.
tree.h (OMP_CLAUSE_LINEAR_STMT): Define. * tree.h (OMP_CLAUSE_LINEAR_STMT): Define. * tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LINEAR number of operands to 3. (walk_tree_1): Walk all operands of OMP_CLAUSE_LINEAR. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_DEPEND. * gimplify.c (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_LINEAR_STMT. * omp-low.c (lower_rec_input_clauses): Fix typo. (maybe_add_implicit_barrier_cancel, lower_omp_1): Add cast between Fortran boolean_type_node and C _Bool if needed. gcc/fortran/ * gfortran.h (gfc_statement): Add ST_OMP_CANCEL, ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP, ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and ST_OMP_DECLARE_SIMD. (gfc_omp_namelist): New typedef. (gfc_get_omp_namelist): Define. (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR, OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds. (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums. (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *. Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and simdlen_expr fields. (gfc_omp_declare_simd): New typedef. (gfc_get_omp_declare_simd): Define. (gfc_namespace): Add omp_declare_simd field. (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST and GFC_OMP_ATOMIC_SWAP. (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *. (gfc_free_omp_namelist, gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New prototypes. * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype. * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd. * openmp.c (gfc_free_omp_clauses): Free safelen_expr and simdlen_expr. Use gfc_free_omp_namelist instead of gfc_free_namelist. (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New functions. (gfc_match_omp_variable_list): Add end_colon, headp and allow_sections arguments. Handle parsing of array sections. Use *omp_namelist* instead of *namelist* data structure and functions/macros. Allow termination at : character. (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define. (gfc_match_omp_clauses): Change first and needs_space variables into arguments with default values. Parse inbranch, notinbranch, proc_bind, safelen, simdlen, uniform, linear, aligned and depend clauses. (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND. (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define. (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND. (gfc_match_omp_do_simd): New function. (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist* data structure and functions/macros. (gfc_match_omp_simd, gfc_match_omp_declare_simd, gfc_match_omp_parallel_do_simd): New functions. (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap. (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind, gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New functions. (resolve_omp_clauses): Add where, omp_clauses and ns arguments. Use *omp_namelist* instead of *namelist* data structure and functions/macros. Resolve uniform, aligned, linear, depend, safelen and simdlen clauses. (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP} addition, recognize atomic swap. (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as EXEC_OMP_PARALLEL_DO. (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist* data structure and functions/macros. (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD. (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust resolve_omp_clauses caller. (gfc_resolve_omp_declare_simd): New function. * parse.c (decode_omp_directive): Parse cancellation point, cancel, declare simd, end do simd, end simd, end parallel do simd, end taskgroup, parallel do simd, simd and taskgroup directives. (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT. (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD, ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD. (case_decl): Add ST_OMP_DECLARE_SIMD. (gfc_ascii_statement): Handle ST_OMP_CANCEL, ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP, ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and ST_OMP_DECLARE_SIMD. (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD. (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions. (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and ST_OMP_PARALLEL_DO_SIMD. (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP. * trans-decl.c (gfc_get_extern_function_decl, gfc_create_function_decl): Call gfc_trans_omp_declare_simd if needed. * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist of depend, aligned and linear clauses. * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. (gfc_free_omp_namelist): New function. * dump-parse-tree.c (show_namelist): Removed. (show_omp_namelist): New function. (show_omp_node): Handle OpenMP 4.0 additions. (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point, gfc_match_omp_declare_simd, gfc_match_omp_do_simd, gfc_match_omp_parallel_do_simd, gfc_match_omp_simd, gfc_match_omp_taskgroup): New prototypes. * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd argument, handle it. Allow current_function_decl to be NULL. (gfc_trans_omp_variable_list): Add declare_simd argument, pass it through to gfc_trans_omp_variable and disregard whether sym is referenced if declare_simd is true. Work on gfc_omp_namelist instead of gfc_namelist. (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of gfc_namelist. Adjust gfc_trans_omp_variable caller. (gfc_trans_omp_clauses): Add declare_simd argument, pass it through to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist instead of gfc_namelist. Handle inbranch, notinbranch, safelen, simdlen, depend, uniform, linear, proc_bind and aligned clauses. Handle cancel kind. (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap, adjust for GFC_OMP_ATOMIC_* changes. (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New functions. (gfc_trans_omp_do): Add op argument, handle simd translation into generic. (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO, GFC_OMP_MASK_PARALLEL): New. (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions. (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses. (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. Adjust gfc_trans_omp_do caller. (gfc_trans_omp_declare_simd): New function. * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of gfc_free_namelist. * module.c (omp_declare_simd_clauses): New variable. (mio_omp_declare_simd): New function. (mio_symbol): Call it. * trans.c (trans_code): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. (resolve_code): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. (resolve_types): Call gfc_resolve_omp_declare_simd. gcc/testsuite/ * gfortran.dg/gomp/affinity-1.f90: New test. libgomp/ * testsuite/libgomp.fortran/cancel-do-1.f90: New test. * testsuite/libgomp.fortran/cancel-do-2.f90: New test. * testsuite/libgomp.fortran/cancel-parallel-1.f90: New test. * testsuite/libgomp.fortran/cancel-parallel-3.f90: New test. * testsuite/libgomp.fortran/cancel-sections-1.f90: New test. * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test. * testsuite/libgomp.fortran/declare-simd-1.f90: New test. * testsuite/libgomp.fortran/declare-simd-2.f90: New test. * testsuite/libgomp.fortran/declare-simd-3.f90: New test. * testsuite/libgomp.fortran/depend-1.f90: New test. * testsuite/libgomp.fortran/depend-2.f90: New test. * testsuite/libgomp.fortran/omp_atomic5.f90: New test. * testsuite/libgomp.fortran/simd1.f90: New test. * testsuite/libgomp.fortran/simd2.f90: New test. * testsuite/libgomp.fortran/simd3.f90: New test. * testsuite/libgomp.fortran/simd4.f90: New test. * testsuite/libgomp.fortran/taskgroup1.f90: New test. From-SVN: r210313
2014-05-11 22:26:36 +02:00
2014-05-11 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/cancel-do-1.f90: New test.
* testsuite/libgomp.fortran/cancel-do-2.f90: New test.
* testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
* testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
* testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
* testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
* testsuite/libgomp.fortran/declare-simd-1.f90: New test.
* testsuite/libgomp.fortran/declare-simd-2.f90: New test.
* testsuite/libgomp.fortran/declare-simd-3.f90: New test.
* testsuite/libgomp.fortran/depend-1.f90: New test.
* testsuite/libgomp.fortran/depend-2.f90: New test.
* testsuite/libgomp.fortran/omp_atomic5.f90: New test.
* testsuite/libgomp.fortran/simd1.f90: New test.
* testsuite/libgomp.fortran/simd2.f90: New test.
* testsuite/libgomp.fortran/simd3.f90: New test.
* testsuite/libgomp.fortran/simd4.f90: New test.
* testsuite/libgomp.fortran/taskgroup1.f90: New test.
2014-05-02 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/simd-10.c: New test.
* testsuite/libgomp.c/simd-11.c: New test.
* testsuite/libgomp.c/simd-12.c: New test.
* testsuite/libgomp.c/simd-13.c: New test.
2014-04-24 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c++/atomic-14.C: Allow seq_cst and
atomic type clauses in any order and optional comma in between.
* testsuite/libgomp.c++/atomic-15.C: Likewise.
* testsuite/libgomp.c/atomic-17.c: Likewise.
* testsuite/libgomp.c/simd-7.c: New test.
* testsuite/libgomp.c/simd-8.c: New test.
* testsuite/libgomp.c/simd-9.c: New test.
* testsuite/libgomp.c/loop-16.c: New test.
2014-04-02 Richard Henderson <rth@redhat.com>
* config/linux/futex.h (futex_wait): Get error value from errno.
(futex_wake): Likewise.
2014-03-25 Jakub Jelinek <jakub@redhat.com>
PR c++/60331
* testsuite/libgomp.c++/udr-11.C: New test.
* testsuite/libgomp.c++/udr-12.C: New test.
* testsuite/libgomp.c++/udr-13.C: New test.
* testsuite/libgomp.c++/udr-14.C: New test.
* testsuite/libgomp.c++/udr-15.C: New test.
* testsuite/libgomp.c++/udr-16.C: New test.
* testsuite/libgomp.c++/udr-17.C: New test.
* testsuite/libgomp.c++/udr-18.C: New test.
* testsuite/libgomp.c++/udr-19.C: New test.
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years
arc-common.c, [...]: Use the standard form for the copyright notice. gcc/ * common/config/arc/arc-common.c, config/arc/arc-modes.def, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/arc.md, config/arc/arc.opt, config/arm/arm_neon_builtins.def, config/arm/crypto.def, config/i386/avx512cdintrin.h, config/i386/avx512erintrin.h, config/i386/avx512fintrin.h, config/i386/avx512pfintrin.h, config/i386/btver2.md, config/i386/shaintrin.h, config/i386/slm.md, config/linux-protos.h, config/linux.c, config/winnt-c.c, diagnostic-color.c, diagnostic-color.h, gimple-ssa-isolate-paths.c, vtable-verify.c, vtable-verify.h: Use the standard form for the copyright notice. gcc/c-family/ * array-notation-common.c, c-cilkplus.c: Use the standard form for the copyright notice. gcc/c/ * c-array-notation.c: Use the standard form for the copyright notice. gcc/cp/ * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use the standard form for the copyright notice. gcc/testsuite/ * gcc.target/arc/arc.exp: Use the standard form for the copyright notice. libgcc/ * config/arc/asm.h, config/arc/crtg.S, config/arc/crtgend.S, config/arc/crti.S, config/arc/crtn.S, config/arc/divtab-arc700.c, config/arc/dp-hack.h, config/arc/fp-hack.h, config/arc/ieee-754/adddf3.S, config/arc/ieee-754/addsf3.S, config/arc/ieee-754/arc600-dsp/divdf3.S, config/arc/ieee-754/arc600-dsp/divsf3.S, config/arc/ieee-754/arc600-dsp/muldf3.S, config/arc/ieee-754/arc600-dsp/mulsf3.S, config/arc/ieee-754/arc600-mul64/divdf3.S, config/arc/ieee-754/arc600-mul64/divsf3.S, config/arc/ieee-754/arc600-mul64/muldf3.S, config/arc/ieee-754/arc600-mul64/mulsf3.S, config/arc/ieee-754/arc600/divsf3.S, config/arc/ieee-754/arc600/mulsf3.S, config/arc/ieee-754/divdf3.S, config/arc/ieee-754/divsf3-stdmul.S, config/arc/ieee-754/divsf3.S, config/arc/ieee-754/divtab-arc-df.c, config/arc/ieee-754/divtab-arc-sf.c, config/arc/ieee-754/eqdf2.S, config/arc/ieee-754/eqsf2.S, config/arc/ieee-754/extendsfdf2.S, config/arc/ieee-754/fixdfsi.S, config/arc/ieee-754/fixsfsi.S, config/arc/ieee-754/fixunsdfsi.S, config/arc/ieee-754/floatsidf.S, config/arc/ieee-754/floatsisf.S, config/arc/ieee-754/floatunsidf.S, config/arc/ieee-754/gedf2.S, config/arc/ieee-754/gesf2.S, config/arc/ieee-754/gtdf2.S, config/arc/ieee-754/gtsf2.S, config/arc/ieee-754/muldf3.S, config/arc/ieee-754/mulsf3.S, config/arc/ieee-754/orddf2.S, config/arc/ieee-754/ordsf2.S, config/arc/ieee-754/truncdfsf2.S, config/arc/ieee-754/uneqdf2.S, config/arc/ieee-754/uneqsf2.S, config/arc/initfini.c, config/arc/lib1funcs.S, config/arc/t-arc, config/arc/t-arc-newlib, config/cris/umulsidi3.S, config/msp430/cmpsi2.S, config/msp430/epilogue.S, config/msp430/lib2bitcountHI.c, config/msp430/lib2divHI.c, config/msp430/lib2divQI.c, config/msp430/lib2divSI.c, config/msp430/lib2mul.c, config/msp430/msp430-divmod.h, config/msp430/msp430-mul.h, config/msp430/slli.S, config/msp430/srai.S, config/msp430/srli.S, config/rl78/divmodhi.S, config/rl78/divmodqi.S, config/rl78/divmodsi.S, config/rl78/signbit.S, vtv_end.c, vtv_end_preinit.c, vtv_start.c, vtv_start_preinit.c: Use the standard form for the copyright notice. libgomp/ * hashtab.h: Use the standard form for the copyright notice. libstdc++-v3/ * testsuite/18_support/new_handler.cc, testsuite/18_support/terminate_handler.cc, testsuite/18_support/unexpected_handler.cc: Use the standard form for the copyright notice. From-SVN: r206288
2014-01-02 23:09:02 +01:00
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
* hashtab.h: Use the standard form for the copyright notice.
2014-01-02 Tobias Burnus <burnus@net-b.de>
* libgomp.texi: Bump @copying's copyright year.
2013-12-17 Andreas Tobler <andreast@gcc.gnu.org>
* testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude. Replace
alloca () with __builtin_alloca ().
* testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
* testsuite/libgomp.c/lock-3.c: Likewise.
* testsuite/libgomp.c/pr48591.c: Likewise.
2013-12-17 Jakub Jelinek <jakub@redhat.com>
PR testsuite/59534
* testsuite/libgomp.fortran/retval1.f90 (e5): Avoid non-shortcircuited
comparisons.
2013-12-16 Jakub Jelinek <jakub@redhat.com>
PR libgomp/58756
* testsuite/libgomp.c/pr58756.c: New test.
2013-12-12 Jakub Jelinek <jakub@redhat.com>
PR libgomp/59467
* testsuite/libgomp.fortran/crayptr2.f90: Add private (d) clause to
!$omp parallel.
2013-11-07 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
ALWAYS_CFLAGS.
* testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
* testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
* testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
* testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
Likewise.
* libgomp_g.h: Include <stddef.h> for size_t.
* libgomp.spec.in: Update comment about libgomp's dependencies.
* configure.ac: Likewise.
* configure: Regenerate.
2013-10-16 Tobias Burnus <burnus@net-b.de>
* libgomp.texi: (Runtime Library Routines): Update references for
OpenMP 4.0. Add omp_get_cancellation, omp_get_default_device,
omp_get_num_devices, omp_get_num_teams, omp_get_proc_bind,
omp_get_team_num, omp_is_initial_device, omp_set_default_device.
(Environment Variables): Update references for OpenMP 4.0. Add
OMP_CANCELLATION, OMP_DEFAULT_DEVICE, OMP_PLACES.
Move OMP_DISPLAY_ENV and OMP_PROC_BIND up to be in alphabetical
order.
2013-10-14 Jakub Jelinek <jakub@redhat.com>
* env.c (parse_bind_var): Initialize value to avoid
(false positive) warning.
2013-10-12 Jakub Jelinek <jakub@redhat.com>
PR libgomp/58691
* config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
to check variable.
(gomp_init_num_threads): Move i variable declaration into
#ifdef CPU_ALLOC_SIZE block.
* config/linux/affinity.c (gomp_affinity_init_level): Test
gomp_places_list_len == 0 rather than gomp_places_list == 0
when checking for topology reading error.
* team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
* env.c (parse_affinity): Add ignore argument, if true, don't populate
gomp_places_list, only parse env var and always return false.
(parse_places_var): Likewise. Don't check gomp_global_icv.bind_var.
(initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
and either of these variables were parsed correctly into a places
list.
2013-10-11 Thomas Schwinge <thomas@codesourcery.com>
Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.graphite/force-parallel-1.c: Expect 4 instead
of 5 loopfn matches.
* testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
2013-10-11 Thomas Schwinge <thomas@codesourcery.com>
* Makefile.am (omp_lib.mod): Streamline rule.
* Makefile.in: Regenerate.
* libgomp.texi (Runtime Library Routines): C linkage, don't throw
exceptions.
* testsuite/libgomp.c/lib-1.c (main): Add missing error check.
* testsuite/libgomp.fortran/lib1.f90: Likewise.
* testsuite/libgomp.fortran/lib2.f: Likewise.
* testsuite/libgomp.fortran/lib3.f: Likewise.
* configure.ac: Typo fix.
* configure: Regenerate.
* testsuite/libgomp.fortran/openmp_version-1.f: New file.
* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
* omp.h.in: Don't touch the user's namespace.
target.c: New file. libgomp/ * target.c: New file. * Makefile.am (libgomp_la_SOURCES): Add target.c. * Makefile.in: Regenerated. * libgomp_g.h (GOMP_task): Add depend argument. (GOMP_barrier_cancel, GOMP_loop_end_cancel, GOMP_sections_end_cancel, GOMP_target, GOMP_target_data, GOMP_target_end_data, GOMP_target_update, GOMP_teams, GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic, GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel, GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start, GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes. * fortran.c (omp_is_initial_device): Add ialias_redirect. (omp_is_initial_device_): New function. (ULP, STR1, STR2, ialias_redirect): Removed. (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_, omp_set_default_device_8_, omp_get_default_device_, omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New functions. * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel, GOMP_sections_end_cancel, GOMP_target, GOMP_target_data, GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export @@GOMP_4.0. (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation, omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device, omp_set_default_device_, omp_set_default_device_8_, omp_get_default_device, omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams, omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export @@OMP_4.0. * team.c (struct gomp_thread_start_data): Add place field. (gomp_thread_start): Clear thr->thread_pool and thr->task before returning. Use gomp_team_barrier_wait_final instead of gomp_team_barrier_wait. Initialize thr->place. (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled, team_cancelled and task_queued_count fields. (gomp_free_pool_helper): Clear thr->thread_pool and thr->task before calling pthread_exit. (gomp_free_thread): No longer static. Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. (gomp_team_start): Add flags argument. Set thr->thread_pool->threads_busy to nthreads immediately after creating new pool. Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. Handle OpenMP 4.0 affinity. (gomp_team_end): Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. Use gomp_team_barrier_wait_final instead of gomp_team_barrier_wait. If team->team_cancelled, call gomp_fini_worshare on ws chain starting at team->work_shares_to_free rather than thr->ts.work_share. (initialize_team): Don't call gomp_sem_init here. * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start caller. (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions. * env.c (gomp_global_icv): Add default_device_var, target_data and bind_var initializers. (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove. (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list, gomp_places_list_len): New variables. (parse_bind_var, parse_one_place, parse_places_var): New functions. (parse_affinity): Rewritten to construct OMP_PLACES list with unit sized places. (gomp_cancel_var): New global variable. (parse_int): New function. (handle_omp_display_env): New function. (initialize_env): Use it. Initialize default_device_var. Parse OMP_CANCELLATION env var. Use parse_bind_var to parse OMP_PROC_BIND instead of parse_boolean. Use parse_places_var for OMP_PLACES parsing. Don't call parse_affinity if OMP_PLACES has been successfully parsed (and call gomp_init_affinity in that case). (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New functions. * libgomp.h: Include stdlib.h. (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call): Define. (struct target_mem_desc): Forward declare. (struct gomp_task_icv): Add default_device_var, target_data, bind_var and thread_limit_var fields. (gomp_get_num_devices): New prototype. (gomp_cancel_var): New extern decl. (struct gomp_team): Add work_shares_to_free, work_share_cancelled, team_cancelled and task_queued_count fields. Add comments about task_{,queued_,running_}count. (gomp_cancel_kind): New enum. (gomp_work_share_end_cancel): New prototype. (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup, copy_ctors_done, dependers, depend_hash, depend_count, num_dependees and depend fields. (struct gomp_taskgroup): New type. (struct gomp_task_depend_entry, struct gomp_dependers_vec): New types. (gomp_finish_task): Free depend_hash if non-NULL. (struct gomp_team_state): Add place_partition_off and place_partition_len fields. (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list, gomp_places_list_len): New extern decls. (struct gomp_thread): Add place field. (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove. (gomp_init_thread_affinity): Add place argument. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New prototypes. (gomp_team_start): Add flags argument. (gomp_thread_limit_var, gomp_remaining_threads_count, gomp_remaining_threads_lock): Remove. (gomp_managed_threads_lock): New variable. (struct gomp_thread_pool): Add threads_busy field. (gomp_free_thread): New prototype. * task.c: Include hashtab.h. (hash_entry_type): New typedef. (htab_alloc, htab_free, htab_hash, htab_eq): New inlines. (gomp_init_task): Clear dependers, depend_hash, depend_count, copy_ctors_done and taskgroup fields. (GOMP_task): Add depend argument, handle depend clauses. If gomp_team_barrier_cancelled or if it's taskgroup has been cancelled, don't queue or start new tasks. Set copy_ctors_done field if needed. Initialize taskgroup field. If copy_ctors_done and already cancelled, don't discard the task. If taskgroup is non-NULL, enqueue the task into taskgroup queue. Increment num_children field in taskgroup. Increment task_queued_count. (gomp_task_run_pre, gomp_task_run_post_remove_parent, gomp_task_run_post_remove_taskgroup): New inline functions. (gomp_task_run_post_handle_depend_hash, gomp_task_run_post_handle_dependers, gomp_task_run_post_handle_depend): New functions. (GOMP_taskwait): Use them. If more than one new tasks have been queued, wake other threads if needed. (gomp_barrier_handle_tasks): Likewise. If gomp_team_barrier_cancelled, don't start any new tasks, just free all tasks. (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions. * omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false, omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close, omp_proc_bind_spread): New params. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New interfaces. (omp_get_dynamic, omp_get_nested, omp_in_parallel, omp_get_max_threads, omp_get_num_procs, omp_get_num_threads, omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level, omp_in_final): Remove useless use omp_lib_kinds. * omp.h.in (omp_proc_bind_t): New typedef. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New prototypes. * loop.c (gomp_parallel_loop_start): Add flags argument, pass it through to gomp_team_start. (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start, GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start): Adjust gomp_parallel_loop_start callers. (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic, GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_loop_end_cancel): New functions. (GOMP_parallel_end): Add ialias_redirect. * hashtab.h: New file. * libgomp.texi (Environment Variables): Minor cleanup, update section refs to OpenMP 4.0rc2. (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these environment variables. * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set team->work_shares_to_free to thr->ts.work_share before calling free_work_share. (gomp_work_share_end_cancel): New function. * config/linux/proc.c: Include errno.h. (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables. (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of sizeof (cpu_set_t) to determine number of iterations. Fix up check extern decl. Use CPU_COUNT_S if available, or CPU_COUNT if gomp_cpuset_size is sizeof (cpu_set_t). (gomp_init_num_threads): Initialize gomp_cpuset_size, gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t) to pthread_getaffinity_np. Free and clear gomp_cpusetp if it didn't contain any logical CPUs. (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp is NULL. Use gomp_cpusetp instead of &cpuset and pass gomp_get_cpuset_size instead of sizeof (cpu_set_t) to pthread_getaffinity_np. Check gomp_places_list instead of gomp_cpu_affinity. Adjust gomp_cpuset_popcount caller. * config/linux/bar.c (gomp_barrier_wait_end, gomp_barrier_wait_last): Use BAR_* defines. (gomp_team_barrier_wait_end): Likewise. Clear BAR_CANCELLED from state where needed. Set work_share_cancelled to 0 on last thread. (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New functions. * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden. Add cpusetsize argument. (gomp_cpuset_size, gomp_cpusetp): Declare. * config/linux/affinity.c: Include errno.h, stdio.h and string.h. (affinity_counter): Remove. (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define if CPU_ALLOC_SIZE isn't defined. (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try silently create OMP_PLACES=threads, if it is non-NULL afterwards, bind current thread to the first place. (gomp_init_thread_affinity): Rewritten. Add place argument, just pthread_setaffinity_np to gomp_places_list[place]. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New functions. * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST, BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define. (gomp_barrier_t): Add awaited_final field. (gomp_barrier_init): Initialize awaited_final field. (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New prototypes. (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. Use BAR_* defines. (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start, gomp_team_barrier_cancelled): New inline functions. (gomp_barrier_last_thread, gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): Use BAR_* defines. * config/posix/bar.c (gomp_barrier_init): Clear cancellable field. (gomp_barrier_wait_end): Use BAR_* defines. (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state. Set work_share_cancelled to 0 on last thread, use __atomic_load_n. Use BAR_* defines. (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New functions. * config/posix/affinity.c (gomp_init_thread_affinity): Add place argument. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New stubs. * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST, BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define. (gomp_barrier_t): Add cancellable field. (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New prototypes. (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final, gomp_team_barrier_cancelled): New inline functions. (gomp_barrier_wait_start, gomp_barrier_last_thread, gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): Use BAR_* defines. * barrier.c (GOMP_barrier_cancel): New function. * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false, omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close, omp_proc_bind_spread): New params. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New externals. * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New functions. (gomp_resolve_num_threads): Adjust for thread_limit now being in icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as infinity. If not nested, just return minimum of max_num_threads and icv->thread_limit_var and if thr->thread_pool, set threads_busy to the returned value. Otherwise, don't update atomically gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy. (GOMP_parallel_end): Adjust for thread_limit now being in icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as infinity. Adjust threads_busy in the pool rather than gomp_remaining_threads_count. Remember team->nthreads and call gomp_team_end before adjusting threads_busy, if not nested afterwards, just set it to 1 non-atomically. Add ialias. (GOMP_parallel_start): Adjust gomp_team_start caller. * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid. * testsuite/libgomp.c/affinity-1.c: New test. * testsuite/libgomp.c/atomic-15.c: New test. * testsuite/libgomp.c/atomic-16.c: New test. * testsuite/libgomp.c/atomic-17.c: New test. * testsuite/libgomp.c/cancel-for-1.c: New test. * testsuite/libgomp.c/cancel-for-2.c: New test. * testsuite/libgomp.c/cancel-parallel-1.c: New test. * testsuite/libgomp.c/cancel-parallel-2.c: New test. * testsuite/libgomp.c/cancel-parallel-3.c: New test. * testsuite/libgomp.c/cancel-sections-1.c: New test. * testsuite/libgomp.c/cancel-taskgroup-1.c: New test. * testsuite/libgomp.c/cancel-taskgroup-2.c: New test. * testsuite/libgomp.c/depend-1.c: New test. * testsuite/libgomp.c/depend-2.c: New test. * testsuite/libgomp.c/depend-3.c: New test. * testsuite/libgomp.c/depend-4.c: New test. * testsuite/libgomp.c/for-1.c: New test. * testsuite/libgomp.c/for-1.h: New file. * testsuite/libgomp.c/for-2.c: New test. * testsuite/libgomp.c/for-2.h: New file. * testsuite/libgomp.c/for-3.c: New test. * testsuite/libgomp.c/pr58392.c: New test. * testsuite/libgomp.c/simd-1.c: New test. * testsuite/libgomp.c/simd-2.c: New test. * testsuite/libgomp.c/simd-3.c: New test. * testsuite/libgomp.c/simd-4.c: New test. * testsuite/libgomp.c/simd-5.c: New test. * testsuite/libgomp.c/simd-6.c: New test. * testsuite/libgomp.c/target-1.c: New test. * testsuite/libgomp.c/target-2.c: New test. * testsuite/libgomp.c/target-3.c: New test. * testsuite/libgomp.c/target-4.c: New test. * testsuite/libgomp.c/target-5.c: New test. * testsuite/libgomp.c/target-6.c: New test. * testsuite/libgomp.c/target-7.c: New test. * testsuite/libgomp.c/taskgroup-1.c: New test. * testsuite/libgomp.c/thread-limit-1.c: New test. * testsuite/libgomp.c/thread-limit-2.c: New test. * testsuite/libgomp.c/thread-limit-3.c: New test. * testsuite/libgomp.c/udr-1.c: New test. * testsuite/libgomp.c/udr-2.c: New test. * testsuite/libgomp.c/udr-3.c: New test. * testsuite/libgomp.c++/affinity-1.C: New test. * testsuite/libgomp.c++/atomic-10.C: New test. * testsuite/libgomp.c++/atomic-11.C: New test. * testsuite/libgomp.c++/atomic-12.C: New test. * testsuite/libgomp.c++/atomic-13.C: New test. * testsuite/libgomp.c++/atomic-14.C: New test. * testsuite/libgomp.c++/atomic-15.C: New test. * testsuite/libgomp.c++/cancel-for-1.C: New test. * testsuite/libgomp.c++/cancel-for-2.C: New test. * testsuite/libgomp.c++/cancel-parallel-1.C: New test. * testsuite/libgomp.c++/cancel-parallel-2.C: New test. * testsuite/libgomp.c++/cancel-parallel-3.C: New test. * testsuite/libgomp.c++/cancel-sections-1.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test. * testsuite/libgomp.c++/cancel-test.h: New file. * testsuite/libgomp.c++/for-9.C: New test. * testsuite/libgomp.c++/for-10.C: New test. * testsuite/libgomp.c++/for-11.C: New test. * testsuite/libgomp.c++/simd-1.C: New test. * testsuite/libgomp.c++/simd-2.C: New test. * testsuite/libgomp.c++/simd-3.C: New test. * testsuite/libgomp.c++/simd-4.C: New test. * testsuite/libgomp.c++/simd-5.C: New test. * testsuite/libgomp.c++/simd-6.C: New test. * testsuite/libgomp.c++/simd-7.C: New test. * testsuite/libgomp.c++/simd-8.C: New test. * testsuite/libgomp.c++/target-1.C: New test. * testsuite/libgomp.c++/target-2.C: New test. * testsuite/libgomp.c++/target-2-aux.cc: New file. * testsuite/libgomp.c++/target-3.C: New test. * testsuite/libgomp.c++/taskgroup-1.C: New test. * testsuite/libgomp.c++/udr-1.C: New test. * testsuite/libgomp.c++/udr-2.C: New test. * testsuite/libgomp.c++/udr-3.C: New test. * testsuite/libgomp.c++/udr-4.C: New test. * testsuite/libgomp.c++/udr-5.C: New test. * testsuite/libgomp.c++/udr-6.C: New test. * testsuite/libgomp.c++/udr-7.C: New test. * testsuite/libgomp.c++/udr-8.C: New test. * testsuite/libgomp.c++/udr-9.C: New test. gcc/ * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses, handle UDR OMP_CLAUSE_REDUCTION, formatting fixes, use pp_colon instead of pp_character (..., ':'), similarly pp_right_paren. (dump_generic_node): Handle OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET, OMP_TARGET_UPDATE, OMP_TASKGROUP, allow OMP_FOR_INIT to be NULL, handle OMP_ATOMIC_SEQ_CST. * tree.c (omp_clause_num_ops, omp_clause_code_name): Add OpenMP 4.0 clauses. (omp_declare_simd_clauses_equal, omp_remove_redundant_declare_simd_attrs): New functions. (attribute_value_equal): Use omp_declare_simd_clauses_equal. (walk_tree_1): Handle new OpenMP 4.0 clauses. * tree.h (OMP_LOOP_CHECK): Define. (OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND, OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use it. (OMP_TASKGROUP_BODY, OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES, OMP_TARGET_DATA_BODY, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY, OMP_TARGET_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_CLAUSE_SIZE, OMP_ATOMIC_SEQ_CST, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND, OMP_CLAUSE_REDUCTION_OMP_ORIG_REF, OMP_CLAUSE_ALIGNED_ALIGNMENT, OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_THREAD_LIMIT_EXPR, OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SIMDLEN_EXPR): Define. (OMP_CLAUSE_DECL): Change range up to OMP_CLAUSE__LOOPTEMP_. (omp_remove_redundant_declare_simd_attrs): New prototype. * gimple.def (GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS): New codes. (GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE instead of GSS_BASE. * omp-low.c (struct omp_context): Add cancel_label and cancellable fields. (target_nesting_level): New variable. (extract_omp_for_data): Handle GF_OMP_FOR_KIND_DISTRIBUTE and OMP_CLAUSE_DIST_SCHEDULE. Don't fallback to library implementation for collapse > 1 static schedule unless ordered. (get_ws_args_for): Add par_stmt argument. Handle combined loops. (determine_parallel_type): Adjust get_ws_args_for caller. (install_var_field): Handle mask & 4 for double indirection. (scan_sharing_clauses): Ignore shared clause on teams construct. Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses. (create_omp_child_function): If inside target or declare target constructs, set "omp declare target" attribute on the child function. (find_combined_for): New function. (scan_omp_parallel): Handle combined loops. (scan_omp_target, scan_omp_teams): New functions. (check_omp_nesting_restrictions): Check new OpenMP 4.0 nesting restrictions and set ctx->cancellable for cancellable constructs. (scan_omp_1_stmt): Call check_omp_nesting_restrictions also on selected builtin calls. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS. (build_omp_barrier): Add lhs argument, return gimple rather than tree. (omp_clause_aligned_alignment): New function. (lower_rec_simd_input_clauses): Only call SET_DECL_VALUE_EXPR on decls. (lower_rec_input_clauses): Add FD argument. Ignore shared clauses on teams constructs. Handle user defined reductions and new OpenMP 4.0 clauses. (lower_reduction_clauses): Don't set placeholder to address of ref if it has already the right type. (lower_send_clauses): Handle OMP_CLAUSE__LOOPTEMP_. (expand_parallel_call): Use the new non-_start suffixed builtins, handle OMP_CLAUSE_PROC_BIND, don't call the outlined function and GOMP_parallel_end after the call. (expand_task_call): Handle OMP_CLAUSE_DEPEND. (expand_omp_for_init_counts): Handle combined loops. (expand_omp_for_init_vars): Add inner_stmt argument, handle combined loops. (expand_omp_for_generic): Likewise. Use GOMP_loop_end_cancel at the end of cancellable loops. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Likewise. Handle collapse > 1 loops. (expand_omp_simd): Handle combined loops. (expand_omp_for): Add inner_stmt argument, adjust callers of expand_omp_for* functions, use expand_omp_for_static*chunk even for collapse > 1 unless ordered. (expand_omp_sections): Use GOMP_sections_end_cancel at the end of cancellable sections. (expand_omp_single): Remove need_barrier variable, just rely on gimple_omp_return_nowait_p. Adjust build_omp_barrier caller. (expand_omp_synch): Allow GIMPLE_OMP_TASKGROUP and GIMPLE_OMP_TEAMS. (expand_omp_atomic_load, expand_omp_atomic_store, expand_omp_atomic_fetch_op): Handle gimple_omp_atomic_seq_cst_p. (expand_omp_target): New function. (expand_omp): Handle combined loops. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TEAMS, GIMPLE_OMP_TARGET. (build_omp_regions_1): Immediately close region for GF_OMP_TARGET_KIND_UPDATE. (maybe_add_implicit_barrier_cancel): New function. (lower_omp_sections): Adjust lower_rec_input_clauses caller. Handle cancellation. (lower_omp_single): Likewise. Add clobber after the barrier. (lower_omp_taskgroup): New function. (lower_omp_for): Handle combined loops. Adjust lower_rec_input_clauses caller. Handle cancellation. (lower_depend_clauses): New function. (lower_omp_taskreg): Lower depend clauses. Adjust lower_rec_input_clauses caller. Add clobber after the call. Handle cancellation. (lower_omp_target, lower_omp_teams): New functions. (lower_omp_1): Handle cancellation. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GOMP_barrier, GOMP_cancel and GOMP_cancellation_point calls. (lower_omp): Fold stmts inside of target region. (diagnose_sb_1, diagnose_sb_2): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * builtin-types.def (DEF_FUNCTION_TYPE_8): Document. (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove. (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT, BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL, BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL. Don't handle BUILT_IN_GOMP_PARALLEL_END. * gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * gimple-pretty-print.c (dump_gimple_omp_for): Handle GF_OMP_FOR_KIND_DISTRIBUTE. (dump_gimple_omp_target, dump_gimple_omp_teams): New functions. (dump_gimple_omp_block): Handle GIMPLE_OMP_TASKGROUP. (dump_gimple_omp_return): Print lhs if it has any. (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Handle gimple_omp_atomic_seq_cst_p. (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * langhooks.c (lhd_omp_mappable_type): New function. * tree-vectorizer.c (struct simd_array_to_simduid): Fix up comment. * langhooks.h (struct lang_hooks_for_types): Add omp_mappable_type hook. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP, GOVD_ALIGNED and GOVD_MAP_TO_ONLY. (enum omp_region_type): Add ORT_TEAMS, ORT_TARGET_DATA and ORT_TARGET. (struct gimplify_omp_ctx): Add combined_loop field. (gimplify_call_expr, gimplify_modify_expr): Don't call fold_stmt on stmts inside of target region. (is_gimple_stmt): Return true for OMP_DISTRIBUTE and OMP_TASKGROUP. (omp_firstprivatize_variable): Handle GOVD_MAP, GOVD_ALIGNED, ORT_TARGET and ORT_TARGET_DATA. (omp_add_variable): Avoid checks on readding var for GOVD_ALIGNED. Handle GOVD_MAP. (omp_notice_threadprivate_variable): Complain about threadprivate variables in target region. (omp_notice_variable): Complain about vars with non-mappable type in target region. Handle ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA. (omp_check_private): Ignore ORT_TARGET* regions. (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Handle new OpenMP 4.0 clauses. (find_combined_omp_for): New function. (gimplify_omp_for): Handle gimplification of combined loops. (gimplify_omp_workshare): Gimplify also OMP_TARGET, OMP_TARGET_DATA, OMP_TEAMS. (gimplify_omp_target_update): New function. (gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST. (gimplify_expr): Handle OMP_DISTRIBUTE, OMP_TARGET, OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TEAMS, OMP_TASKGROUP. (gimplify_body): If fndecl has "omp declare target" attribute, add implicit ORT_TARGET context around it. * tree.def (OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET, OMP_TASKGROUP, OMP_TARGET_UPDATE): New tree codes. * tree-nested.c (convert_nonlocal_reference_stmt, convert_local_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * omp-builtins.def (BUILT_IN_GOMP_TASK): Use BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT. (BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA, BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE, BUILT_IN_GOMP_TEAMS, BUILT_IN_BARRIER_CANCEL, BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL, BUILT_IN_OMP_GET_TEAM_NUM, BUILT_IN_OMP_GET_NUM_TEAMS, BUILT_IN_GOMP_TASKGROUP_START, BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL, BUILT_IN_GOMP_PARALLEL_SECTIONS, BUILT_IN_GOMP_CANCEL, BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins. (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_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END, BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove. * tree-inline.c (remap_gimple_stmt, estimate_num_insns): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * gimple.c (gimple_build_omp_taskgroup, gimple_build_omp_target, gimple_build_omp_teams): New functions. (walk_gimple_op): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. Walk optional lhs on GIMPLE_OMP_RETURN. (walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * gimple.h (enum gf_mask): GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO, GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE, GF_OMP_ATOMIC_SEQ_CST): New. (gimple_build_omp_taskgroup, gimple_build_omp_target, gimple_build_omp_teams): New prototypes. (gimple_has_substatements): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. (gimple_omp_subcode): Use GIMPLE_OMP_TEAMS instead of GIMPLE_OMP_SINGLE as end of range. (gimple_omp_return_set_lhs, gimple_omp_return_lhs, gimple_omp_return_lhs_ptr, gimple_omp_atomic_seq_cst_p, gimple_omp_atomic_set_seq_cst, gimple_omp_for_combined_p, gimple_omp_for_set_combined_p, gimple_omp_for_combined_into_p, gimple_omp_for_set_combined_into_p, gimple_omp_target_clauses, gimple_omp_target_clauses_ptr, gimple_omp_target_set_clauses, gimple_omp_target_kind, gimple_omp_target_set_kind, gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr, gimple_omp_target_set_child_fn, gimple_omp_target_data_arg, gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg, gimple_omp_teams_clauses, gimple_omp_teams_clauses_ptr, gimple_omp_teams_set_clauses): New inlines. (CASE_GIMPLE_OMP): Add GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * tree-core.h (enum omp_clause_code): Add new OpenMP 4.0 clause codes. (enum omp_clause_depend_kind, enum omp_clause_map_kind, enum omp_clause_proc_bind_kind): New. (union omp_clause_subcode): Add depend_kind, map_kind and proc_bind_kind fields. * tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * langhooks-def.h (lhd_omp_mappable_type): New prototype. (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to 201307 instead of 201107. * c-common.c (DEF_FUNCTION_TYPE_8): Define. (c_common_attribute_table): Add "omp declare target" and "omp declare simd" attributes. (handle_omp_declare_target_attribute, handle_omp_declare_simd_attribute): New functions. * c-omp.c: Include c-pragma.h. (c_finish_omp_taskgroup): New function. (c_finish_omp_atomic): Add swapped argument, if true, build the operation first with rhs, lhs arguments and use NOP_EXPR build_modify_expr. (c_finish_omp_for): Add code argument, pass it down to make_code. (c_omp_split_clauses): New function. (c_split_parallel_clauses): Removed. (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers, c_omp_declare_simd_clauses_to_decls): New functions. * c-common.h (omp_clause_mask): New type. (OMP_CLAUSE_MASK_1): Define. (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=, omp_clause_mask::operator |=, omp_clause_mask::operator ~, omp_clause_mask::operator |, omp_clause_mask::operator &, omp_clause_mask::operator <<, omp_clause_mask::operator >>, omp_clause_mask::operator ==): New methods. (enum c_omp_clause_split): New. (c_finish_omp_taskgroup): New prototype. (c_finish_omp_atomic): Add swapped argument. (c_finish_omp_for): Add code argument. (c_omp_split_clauses): New prototype. (c_split_parallel_clauses): Removed. (c_omp_declare_simd_clauses_to_numbers, c_omp_declare_simd_clauses_to_decls): New prototypes. * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD, PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS. Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS. (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED, PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE, PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR, PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH, PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP, PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS, PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND, PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS, PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP, PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and PRAGMA_OMP_CLAUSE_UNIFORM. gcc/ada/ * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define. gcc/fortran/ * trans-openmp.c (gfc_omp_clause_default_ctor, gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION. * f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define. * types.def (DEF_FUNCTION_TYPE_8): Document. (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove. (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT, BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New. gcc/lto/ * lto-lang.c (DEF_FUNCTION_TYPE_8): Define. gcc/c/ * c-lang.h (current_omp_declare_target_attribute): New extern decl. * c-parser.c: Include c-lang.h. (struct c_parser): Change tokens to c_token *. Add tokens_buf field. Change tokens_avail type to unsigned int. (c_parser_consume_token): If parser->tokens isn't &parser->tokens_buf[0], increment parser->tokens. (c_parser_consume_pragma): Likewise. (enum pragma_context): Add pragma_struct and pragma_param. (c_parser_external_declaration): Adjust c_parser_declaration_or_fndef caller. (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses argument, if it is non-vNULL vector, call c_finish_omp_declare_simd. Adjust recursive call. (c_parser_struct_or_union_specifier): Use pragma_struct instead of pragma_external. (c_parser_parameter_declaration): Use pragma_param instead of pragma_external. (c_parser_compound_statement_nostart, c_parser_label, c_parser_for_statement): Adjust c_parser_declaration_or_fndef callers. (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass it through to c_parser_conditional_expression. (c_parser_conditional_expression): Add omp_atomic_lhs argument, pass it through to c_parser_binary_expression. Adjust recursive call. (c_parser_binary_expression): Remove prec argument, add omp_atomic_lhs argument instead. Always start from PREC_NONE, if omp_atomic_lhs is non-NULL and one of the arguments of toplevel binop matches it, use build2 instead of parser_build_binary_op. (c_parser_pragma): Handle PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION. Handle pragma_struct and pragma_param the same as pragma_external. (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. (c_parser_omp_variable_list): Parse array sections for OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. (c_parser_omp_clause_collapse): Fully fold collapse expression. (c_parser_omp_clause_reduction): Handle user defined reductions. (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, c_parser_omp_clause_linear, c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, c_parser_omp_clause_depend, c_parser_omp_clause_map, c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule, c_parser_omp_clause_proc_bind, c_parser_omp_clause_to, c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions. (c_parser_omp_all_clauses): Add finish_p argument. Don't call c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms. (c_parser_omp_for_loop): Add CODE argument, pass it through to c_finish_omp_for. Change last argument to cclauses, and adjust uses to grab parallel clauses from the array of all the split clauses. Adjust c_parser_binary_expression, c_parser_declaration_or_fndef and c_finish_omp_for callers. (omp_split_clauses): New function. (c_parser_omp_simd): New function. (c_parser_omp_for): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs, and call c_parser_omp_simd when parsing for simd. (c_parser_omp_sections_scope): If section-sequence doesn't start with #pragma omp section, require exactly one structured-block instead of sequence of statements. (c_parser_omp_sections): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (c_parser_omp_parallel): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (c_parser_omp_taskgroup, c_parser_omp_cancel, c_parser_omp_cancellation_point, c_parser_omp_distribute, c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target_update, c_parser_omp_target, c_parser_omp_declare_simd, c_finish_omp_declare_simd, c_parser_omp_declare_target, c_parser_omp_end_declare_target, c_parser_omp_declare_reduction, c_parser_omp_declare): New functions. (c_parser_omp_construct): Add p_name and mask vars. Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel and c_parser_omp_sections callers. (c_parse_file): Initialize tparser.tokens and the_parser->tokens here. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add OMP_CLAUSE_DEPEND. (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, OMP_DECLARE_SIMD_CLAUSE_MASK): Define. * c-typeck.c: Include tree-inline.h. (c_finish_omp_cancel, c_finish_omp_cancellation_point, handle_omp_array_sections_1, handle_omp_array_sections, c_clone_omp_udr, c_find_omp_placeholder_r): New functions. (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined reductions. (c_tree_equal): New function. * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls, c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal, c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, c_check_omp_declare_reduction_r): New prototypes. * c-decl.c (current_omp_declare_target_attribute): New variable. (c_decl_attributes): New function. (start_decl, start_function): Use it instead of decl_attributes. (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, c_check_omp_declare_reduction_r): New functions. gcc/cp/ * decl.c (duplicate_decls): Error out for redeclaration of UDRs. (declare_simd_adjust_this): New function. (grokfndecl): If "omp declare simd" attribute is present, call declare_simd_adjust_this if needed and c_omp_declare_simd_clauses_to_numbers. * cp-array-notation.c (expand_array_notation_exprs): Handle OMP_TASKGROUP. * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and OMP_DISTRIBUTE. Handle is_invisiref_parm decls in OMP_CLAUSE_REDUCTION. (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like OMP_FOR. (cxx_omp_privatize_by_reference): Return true for is_invisiref_parm decls. (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info caller. * pt.c (apply_late_template_attributes): For "omp declare simd" attribute call tsubst_omp_clauses, c_omp_declare_simd_clauses_to_decls, finish_omp_clauses and c_omp_declare_simd_clauses_to_numbers. (instantiate_class_template_1): Call cp_check_omp_declare_reduction for UDRs. (tsubst_decl): Handle UDRs. (tsubst_omp_clauses): Add declare_simd argument, if true don't call finish_omp_clauses. Handle new OpenMP 4.0 clauses. Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on OMP_CLAUSE_REDUCTION. (tsubst_expr): For UDRs call pushdecl and cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP. Adjust finish_omp_atomic caller. (tsubst_omp_udr): New function. (instantiate_decl): For UDRs at block scope, don't call start_preparsed_function/finish_function. Call tsubst_omp_udr. * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument, use it instead of need_default_ctor || need_copy_ctor. (struct cp_check_omp_declare_reduction_data): New type. (handle_omp_array_sections_1, handle_omp_array_sections, omp_reduction_id, omp_reduction_lookup, cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r, cp_check_omp_declare_reduction, clone_omp_udr, find_omp_placeholder_r, finish_omp_reduction_clause): New functions. (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined reductions. (finish_omp_for): Add CODE argument, use it instead of hardcoded OMP_FOR. Adjust c_finish_omp_for caller. (finish_omp_atomic): Add seq_cst argument, adjust c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0 atomic variants. (finish_omp_cancel, finish_omp_cancellation_point): New functions. * decl2.c (mark_used): Force immediate instantiation of DECL_OMP_DECLARE_REDUCTION_P decls. (is_late_template_attribute): Return true for "omp declare simd" attribute. (cp_omp_mappable_type): New function. (cplus_decl_attributes): Add implicit "omp declare target" attribute if requested. * parser.c (cp_debug_parser): Print parser->colon_doesnt_start_class_def_p. (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New functions. (enum pragma_context): Add pragma_member and pragma_objc_icode. (cp_parser_binary_expression): Handle no_toplevel_fold_p even for binary operations other than comparison. (cp_parser_linkage_specification): Call cp_ensure_no_omp_declare_simd if needed. (cp_parser_namespace_definition): Likewise. (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd. (cp_parser_direct_declarator): Pass declarator to cp_parser_late_return_type_opt. (cp_parser_late_return_type_opt): Add declarator argument, call cp_parser_late_parsing_omp_declare_simd for declare simd. (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd. Parse UDRs before all other methods. (cp_parser_member_specification_opt): Use pragma_member instead of pragma_external. (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd. (cp_parser_function_definition_from_specifiers_and_declarator, cp_parser_save_member_function_body): Likewise. (cp_parser_late_parsing_for_member): Handle UDRs specially. (cp_parser_next_token_starts_class_definition_p): Don't allow CPP_COLON if colon_doesnt_start_class_def_p flag is true. (cp_parser_objc_interstitial_code): Use pragma_objc_icode instead of pragma_external. (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. (cp_parser_omp_var_list_no_open): Parse array sections for OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument, if non-NULL, allow parsing to end with a colon rather than close paren. (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open caller. (cp_parser_omp_clause_reduction): Handle user defined reductions. (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind, cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit, cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear, cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen, cp_parser_omp_clause_depend, cp_parser_omp_clause_map, cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule, cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to, cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New functions. (cp_parser_omp_all_clauses): Add finish_p argument. Don't call finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. (cp_parser_omp_atomic): Parse seq_cst clause, pass true if it is present to finish_omp_atomic. Handle new OpenMP 4.0 atomic forms. (cp_parser_omp_for_loop): Add CODE argument, pass it through to finish_omp_for. Change last argument to cclauses, and adjust uses to grab parallel clauses from the array of all the split clauses. (cp_omp_split_clauses): New function. (cp_parser_omp_simd): New function. (cp_parser_omp_for): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs, and call c_parser_omp_simd when parsing for simd. (cp_parser_omp_sections_scope): If section-sequence doesn't start with #pragma omp section, require exactly one structured-block instead of sequence of statements. (cp_parser_omp_sections): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (cp_parser_omp_taskgroup, cp_parser_omp_cancel, cp_parser_omp_cancellation_point, cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target_update, cp_parser_omp_target, cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd, cp_parser_omp_declare_target, cp_parser_omp_end_declare_target, cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction, cp_parser_omp_declare): New functions. (cp_parser_omp_construct): Add p_name and mask vars. Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel and cp_parser_omp_sections callers. (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET. Handle pragma_member and pragma_objc_icode like pragma_external. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add OMP_CLAUSE_DEPEND. (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, OMP_DECLARE_SIMD_CLAUSE_MASK): Define. * parser.h (struct cp_omp_declare_simd_data): New type. (struct cp_parser): Add colon_doesnt_start_class_def_p and omp_declare_simd fields. * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define. * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p bit. (DECL_OMP_DECLARE_REDUCTION_P): Define. (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro. (struct saved_scope): Add omp_declare_target_attribute field. (cp_omp_mappable_type, omp_reduction_id, cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction, finish_omp_cancel, finish_omp_cancellation_point): New prototypes. (finish_omp_for): Add CODE argument. (finish_omp_atomic): Add seq_cst argument. (cxx_omp_create_clause_info): Add need_dtor argument. gcc/testsuite/ * c-c++-common/gomp/atomic-15.c: Adjust for C diagnostics. Remove error test that is now valid in OpenMP 4.0. * c-c++-common/gomp/atomic-16.c: New test. * c-c++-common/gomp/cancel-1.c: New test. * c-c++-common/gomp/depend-1.c: New test. * c-c++-common/gomp/depend-2.c: New test. * c-c++-common/gomp/map-1.c: New test. * c-c++-common/gomp/pr58472.c: New test. * c-c++-common/gomp/sections1.c: New test. * c-c++-common/gomp/simd1.c: New test. * c-c++-common/gomp/simd2.c: New test. * c-c++-common/gomp/simd3.c: New test. * c-c++-common/gomp/simd4.c: New test. * c-c++-common/gomp/simd5.c: New test. * c-c++-common/gomp/single1.c: New test. * g++.dg/gomp/block-0.C: Adjust for stricter #pragma omp sections parser. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/clause-3.C: Adjust error messages. * g++.dg/gomp/declare-simd-1.C: New test. * g++.dg/gomp/declare-simd-2.C: New test. * g++.dg/gomp/depend-1.C: New test. * g++.dg/gomp/depend-2.C: New test. * g++.dg/gomp/target-1.C: New test. * g++.dg/gomp/target-2.C: New test. * g++.dg/gomp/taskgroup-1.C: New test. * g++.dg/gomp/teams-1.C: New test. * g++.dg/gomp/udr-1.C: New test. * g++.dg/gomp/udr-2.C: New test. * g++.dg/gomp/udr-3.C: New test. * g++.dg/gomp/udr-4.C: New test. * g++.dg/gomp/udr-5.C: New test. * g++.dg/gomp/udr-6.C: New test. * gcc.dg/autopar/outer-1.c: Expect 4 instead of 5 loopfn matches. * gcc.dg/autopar/outer-2.c: Likewise. * gcc.dg/autopar/outer-3.c: Likewise. * gcc.dg/autopar/outer-4.c: Likewise. * gcc.dg/autopar/outer-5.c: Likewise. * gcc.dg/autopar/outer-6.c: Likewise. * gcc.dg/autopar/parallelization-1.c: Likewise. * gcc.dg/gomp/block-3.c: Adjust for stricter #pragma omp sections parser. * gcc.dg/gomp/clause-1.c: Adjust error messages. * gcc.dg/gomp/combined-1.c: Look for GOMP_parallel_loop_runtime instead of GOMP_parallel_loop_runtime_start. * gcc.dg/gomp/declare-simd-1.c: New test. * gcc.dg/gomp/declare-simd-2.c: New test. * gcc.dg/gomp/nesting-1.c: Adjust for stricter #pragma omp sections parser. Add further #pragma omp sections nesting tests. * gcc.dg/gomp/target-1.c: New test. * gcc.dg/gomp/target-2.c: New test. * gcc.dg/gomp/taskgroup-1.c: New test. * gcc.dg/gomp/teams-1.c: New test. * gcc.dg/gomp/udr-1.c: New test. * gcc.dg/gomp/udr-2.c: New test. * gcc.dg/gomp/udr-3.c: New test. * gcc.dg/gomp/udr-4.c: New test. * gfortran.dg/gomp/appendix-a/a.35.5.f90: Add dg-error. Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r203408
2013-10-11 11:26:50 +02:00
2013-10-11 Jakub Jelinek <jakub@redhat.com>
Tobias Burnus <burnus@net-b.de>
Richard Henderson <rth@redhat.com>
* target.c: New file.
* Makefile.am (libgomp_la_SOURCES): Add target.c.
* Makefile.in: Regenerated.
* libgomp_g.h (GOMP_task): Add depend argument.
(GOMP_barrier_cancel, GOMP_loop_end_cancel,
GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
GOMP_target_end_data, GOMP_target_update, GOMP_teams,
GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
GOMP_taskgroup_start, GOMP_taskgroup_end,
GOMP_parallel_sections): New prototypes.
* fortran.c (omp_is_initial_device): Add ialias_redirect.
(omp_is_initial_device_): New function.
(ULP, STR1, STR2, ialias_redirect): Removed.
(omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
omp_set_default_device_8_, omp_get_default_device_,
omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
functions.
* libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
@@GOMP_4.0.
(omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
omp_set_default_device, omp_set_default_device_,
omp_set_default_device_8_, omp_get_default_device,
omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
omp_get_team_num_): Export @@OMP_4.0.
* team.c (struct gomp_thread_start_data): Add place field.
(gomp_thread_start): Clear thr->thread_pool and
thr->task before returning. Use gomp_team_barrier_wait_final
instead of gomp_team_barrier_wait. Initialize thr->place.
(gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
team_cancelled and task_queued_count fields.
(gomp_free_pool_helper): Clear thr->thread_pool and thr->task
before calling pthread_exit.
(gomp_free_thread): No longer static. Use
gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
(gomp_team_start): Add flags argument. Set
thr->thread_pool->threads_busy to nthreads immediately after creating
new pool. Use gomp_managed_threads_lock instead of
gomp_remaining_threads_lock. Handle OpenMP 4.0 affinity.
(gomp_team_end): Use gomp_managed_threads_lock instead of
gomp_remaining_threads_lock. Use gomp_team_barrier_wait_final instead
of gomp_team_barrier_wait. If team->team_cancelled, call
gomp_fini_worshare on ws chain starting at team->work_shares_to_free
rather than thr->ts.work_share.
(initialize_team): Don't call gomp_sem_init here.
* sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
caller.
(GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
* env.c (gomp_global_icv): Add default_device_var, target_data and
bind_var initializers.
(gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
(gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
gomp_places_list_len): New variables.
(parse_bind_var, parse_one_place, parse_places_var): New functions.
(parse_affinity): Rewritten to construct OMP_PLACES list with unit
sized places.
(gomp_cancel_var): New global variable.
(parse_int): New function.
(handle_omp_display_env): New function.
(initialize_env): Use it. Initialize default_device_var.
Parse OMP_CANCELLATION env var. Use parse_bind_var to parse
OMP_PROC_BIND instead of parse_boolean. Use parse_places_var for
OMP_PLACES parsing. Don't call parse_affinity if OMP_PLACES has
been successfully parsed (and call gomp_init_affinity in that case).
(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
omp_get_team_num, omp_is_initial_device): New functions.
* libgomp.h: Include stdlib.h.
(ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
Define.
(struct target_mem_desc): Forward declare.
(struct gomp_task_icv): Add default_device_var, target_data, bind_var
and thread_limit_var fields.
(gomp_get_num_devices): New prototype.
(gomp_cancel_var): New extern decl.
(struct gomp_team): Add work_shares_to_free, work_share_cancelled,
team_cancelled and task_queued_count fields. Add comments about
task_{,queued_,running_}count.
(gomp_cancel_kind): New enum.
(gomp_work_share_end_cancel): New prototype.
(struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
and depend fields.
(struct gomp_taskgroup): New type.
(struct gomp_task_depend_entry,
struct gomp_dependers_vec): New types.
(gomp_finish_task): Free depend_hash if non-NULL.
(struct gomp_team_state): Add place_partition_off
and place_partition_len fields.
(gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
gomp_places_list_len): New extern decls.
(struct gomp_thread): Add place field.
(gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
(gomp_init_thread_affinity): Add place argument.
(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
gomp_affinity_remove_cpu, gomp_affinity_copy_place,
gomp_affinity_same_place, gomp_affinity_finalize_place_list,
gomp_affinity_init_level, gomp_affinity_print_place): New
prototypes.
(gomp_team_start): Add flags argument.
(gomp_thread_limit_var, gomp_remaining_threads_count,
gomp_remaining_threads_lock): Remove.
(gomp_managed_threads_lock): New variable.
(struct gomp_thread_pool): Add threads_busy field.
(gomp_free_thread): New prototype.
* task.c: Include hashtab.h.
(hash_entry_type): New typedef.
(htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
(gomp_init_task): Clear dependers, depend_hash, depend_count,
copy_ctors_done and taskgroup fields.
(GOMP_task): Add depend argument, handle depend clauses. If
gomp_team_barrier_cancelled or if it's taskgroup has been
cancelled, don't queue or start new tasks. Set copy_ctors_done
field if needed. Initialize taskgroup field. If copy_ctors_done
and already cancelled, don't discard the task. If taskgroup is
non-NULL, enqueue the task into taskgroup queue. Increment
num_children field in taskgroup. Increment task_queued_count.
(gomp_task_run_pre, gomp_task_run_post_remove_parent,
gomp_task_run_post_remove_taskgroup): New inline functions.
(gomp_task_run_post_handle_depend_hash,
gomp_task_run_post_handle_dependers,
gomp_task_run_post_handle_depend): New functions.
(GOMP_taskwait): Use them. If more than one new tasks
have been queued, wake other threads if needed.
(gomp_barrier_handle_tasks): Likewise. If
gomp_team_barrier_cancelled, don't start any new tasks, just free
all tasks.
(GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
* omp_lib.f90.in
(omp_proc_bind_kind, omp_proc_bind_false,
omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
omp_proc_bind_spread): New params.
(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
omp_get_team_num, omp_is_initial_device): New interfaces.
(omp_get_dynamic, omp_get_nested, omp_in_parallel,
omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels,
omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num,
omp_get_team_size, omp_get_active_level, omp_in_final): Remove
useless use omp_lib_kinds.
* omp.h.in (omp_proc_bind_t): New typedef.
(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
omp_get_team_num, omp_is_initial_device): New prototypes.
* loop.c (gomp_parallel_loop_start): Add flags argument, pass it
through to gomp_team_start.
(GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
Adjust gomp_parallel_loop_start callers.
(GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
GOMP_loop_end_cancel): New functions.
(GOMP_parallel_end): Add ialias_redirect.
* hashtab.h: New file.
* libgomp.texi (Environment Variables): Minor cleanup,
update section refs to OpenMP 4.0rc2.
(OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
environment variables.
* work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
team->work_shares_to_free to thr->ts.work_share before calling
free_work_share.
(gomp_work_share_end_cancel): New function.
* config/linux/proc.c: Include errno.h.
(gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
(gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
sizeof (cpu_set_t) to determine number of iterations. Fix up check
extern decl. Use CPU_COUNT_S if available, or CPU_COUNT if
gomp_cpuset_size is sizeof (cpu_set_t).
(gomp_init_num_threads): Initialize gomp_cpuset_size,
gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
to pthread_getaffinity_np. Free and clear gomp_cpusetp if it didn't
contain any logical CPUs.
(get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
is NULL. Use gomp_cpusetp instead of &cpuset and pass
gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
pthread_getaffinity_np. Check gomp_places_list instead of
gomp_cpu_affinity. Adjust gomp_cpuset_popcount caller.
* config/linux/bar.c (gomp_barrier_wait_end,
gomp_barrier_wait_last): Use BAR_* defines.
(gomp_team_barrier_wait_end): Likewise. Clear BAR_CANCELLED
from state where needed. Set work_share_cancelled to 0 on last
thread.
(gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
functions.
* config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
Add cpusetsize argument.
(gomp_cpuset_size, gomp_cpusetp): Declare.
* config/linux/affinity.c: Include errno.h, stdio.h and string.h.
(affinity_counter): Remove.
(CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
if CPU_ALLOC_SIZE isn't defined.
(gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
silently create OMP_PLACES=threads, if it is non-NULL afterwards,
bind current thread to the first place.
(gomp_init_thread_affinity): Rewritten. Add place argument, just
pthread_setaffinity_np to gomp_places_list[place].
(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
gomp_affinity_remove_cpu, gomp_affinity_copy_place,
gomp_affinity_same_place, gomp_affinity_finalize_place_list,
gomp_affinity_init_level, gomp_affinity_print_place): New functions.
* config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
(gomp_barrier_t): Add awaited_final field.
(gomp_barrier_init): Initialize awaited_final field.
(gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
prototypes.
(gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. Use BAR_*
defines.
(gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
gomp_team_barrier_cancelled): New inline functions.
(gomp_barrier_last_thread,
gomp_team_barrier_set_task_pending,
gomp_team_barrier_clear_task_pending,
gomp_team_barrier_set_waiting_for_tasks,
gomp_team_barrier_waiting_for_tasks,
gomp_team_barrier_done): Use BAR_* defines.
* config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
(gomp_barrier_wait_end): Use BAR_* defines.
(gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
Use BAR_* defines.
(gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
gomp_team_barrier_cancel): New functions.
* config/posix/affinity.c (gomp_init_thread_affinity): Add place
argument.
(gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
gomp_affinity_remove_cpu, gomp_affinity_copy_place,
gomp_affinity_same_place, gomp_affinity_finalize_place_list,
gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
* config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
(gomp_barrier_t): Add cancellable field.
(gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
gomp_team_barrier_cancel): New prototypes.
(gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
(gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
gomp_team_barrier_cancelled): New inline functions.
(gomp_barrier_wait_start, gomp_barrier_last_thread,
gomp_team_barrier_set_task_pending,
gomp_team_barrier_clear_task_pending,
gomp_team_barrier_set_waiting_for_tasks,
gomp_team_barrier_waiting_for_tasks,
gomp_team_barrier_done): Use BAR_* defines.
* barrier.c (GOMP_barrier_cancel): New function.
* omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
omp_proc_bind_spread): New params.
(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
omp_get_team_num, omp_is_initial_device): New externals.
* parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
New functions.
(gomp_resolve_num_threads): Adjust for thread_limit now being in
icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
infinity. If not nested, just return minimum of max_num_threads
and icv->thread_limit_var and if thr->thread_pool, set threads_busy
to the returned value. Otherwise, don't update atomically
gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
(GOMP_parallel_end): Adjust for thread_limit now being in
icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
infinity. Adjust threads_busy in the pool rather than
gomp_remaining_threads_count. Remember team->nthreads and call
gomp_team_end before adjusting threads_busy, if not nested
afterwards, just set it to 1 non-atomically. Add ialias.
(GOMP_parallel_start): Adjust gomp_team_start caller.
* testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
* testsuite/libgomp.c/affinity-1.c: New test.
* testsuite/libgomp.c/atomic-15.c: New test.
* testsuite/libgomp.c/atomic-16.c: New test.
* testsuite/libgomp.c/atomic-17.c: New test.
* testsuite/libgomp.c/cancel-for-1.c: New test.
* testsuite/libgomp.c/cancel-for-2.c: New test.
* testsuite/libgomp.c/cancel-parallel-1.c: New test.
* testsuite/libgomp.c/cancel-parallel-2.c: New test.
* testsuite/libgomp.c/cancel-parallel-3.c: New test.
* testsuite/libgomp.c/cancel-sections-1.c: New test.
* testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
* testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
* testsuite/libgomp.c/depend-1.c: New test.
* testsuite/libgomp.c/depend-2.c: New test.
* testsuite/libgomp.c/depend-3.c: New test.
* testsuite/libgomp.c/depend-4.c: New test.
* testsuite/libgomp.c/for-1.c: New test.
* testsuite/libgomp.c/for-1.h: New file.
* testsuite/libgomp.c/for-2.c: New test.
* testsuite/libgomp.c/for-2.h: New file.
* testsuite/libgomp.c/for-3.c: New test.
* testsuite/libgomp.c/pr58392.c: New test.
* testsuite/libgomp.c/simd-1.c: New test.
* testsuite/libgomp.c/simd-2.c: New test.
* testsuite/libgomp.c/simd-3.c: New test.
* testsuite/libgomp.c/simd-4.c: New test.
* testsuite/libgomp.c/simd-5.c: New test.
* testsuite/libgomp.c/simd-6.c: New test.
* testsuite/libgomp.c/target-1.c: New test.
* testsuite/libgomp.c/target-2.c: New test.
* testsuite/libgomp.c/target-3.c: New test.
* testsuite/libgomp.c/target-4.c: New test.
* testsuite/libgomp.c/target-5.c: New test.
* testsuite/libgomp.c/target-6.c: New test.
* testsuite/libgomp.c/target-7.c: New test.
* testsuite/libgomp.c/taskgroup-1.c: New test.
* testsuite/libgomp.c/thread-limit-1.c: New test.
* testsuite/libgomp.c/thread-limit-2.c: New test.
* testsuite/libgomp.c/thread-limit-3.c: New test.
* testsuite/libgomp.c/udr-1.c: New test.
* testsuite/libgomp.c/udr-2.c: New test.
* testsuite/libgomp.c/udr-3.c: New test.
* testsuite/libgomp.c++/affinity-1.C: New test.
* testsuite/libgomp.c++/atomic-10.C: New test.
* testsuite/libgomp.c++/atomic-11.C: New test.
* testsuite/libgomp.c++/atomic-12.C: New test.
* testsuite/libgomp.c++/atomic-13.C: New test.
* testsuite/libgomp.c++/atomic-14.C: New test.
* testsuite/libgomp.c++/atomic-15.C: New test.
* testsuite/libgomp.c++/cancel-for-1.C: New test.
* testsuite/libgomp.c++/cancel-for-2.C: New test.
* testsuite/libgomp.c++/cancel-parallel-1.C: New test.
* testsuite/libgomp.c++/cancel-parallel-2.C: New test.
* testsuite/libgomp.c++/cancel-parallel-3.C: New test.
* testsuite/libgomp.c++/cancel-sections-1.C: New test.
* testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
* testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
* testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
* testsuite/libgomp.c++/cancel-test.h: New file.
* testsuite/libgomp.c++/for-9.C: New test.
* testsuite/libgomp.c++/for-10.C: New test.
* testsuite/libgomp.c++/for-11.C: New test.
* testsuite/libgomp.c++/simd-1.C: New test.
* testsuite/libgomp.c++/simd-2.C: New test.
* testsuite/libgomp.c++/simd-3.C: New test.
* testsuite/libgomp.c++/simd-4.C: New test.
* testsuite/libgomp.c++/simd-5.C: New test.
* testsuite/libgomp.c++/simd-6.C: New test.
* testsuite/libgomp.c++/simd-7.C: New test.
* testsuite/libgomp.c++/simd-8.C: New test.
* testsuite/libgomp.c++/target-1.C: New test.
* testsuite/libgomp.c++/target-2.C: New test.
* testsuite/libgomp.c++/target-2-aux.cc: New file.
* testsuite/libgomp.c++/target-3.C: New test.
* testsuite/libgomp.c++/taskgroup-1.C: New test.
* testsuite/libgomp.c++/udr-1.C: New test.
* testsuite/libgomp.c++/udr-2.C: New test.
* testsuite/libgomp.c++/udr-3.C: New test.
* testsuite/libgomp.c++/udr-4.C: New test.
* testsuite/libgomp.c++/udr-5.C: New test.
* testsuite/libgomp.c++/udr-6.C: New test.
* testsuite/libgomp.c++/udr-7.C: New test.
* testsuite/libgomp.c++/udr-8.C: New test.
* testsuite/libgomp.c++/udr-9.C: New test.
2013-09-20 Jakub Jelinek <jakub@redhat.com>
PR testsuite/57605
* testsuite/lib/libgomp.exp: Add -fdiagnostics-color=never to
ALWAYS_CFLAGS.
2013-09-20 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
2013-09-19 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/sections-2.c: New test.
2013-06-28 Marcus Shawcroft <marcus.shawcroft@arm.com>
* testsuite/libgomp.fortran/strassen.f90:
Add dg-skip-if aarch64_tiny.
2013-06-20 Iain Sandoe <iain@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
* testsuite/lib/libgomp.exp: Reorder lib loads into dependency order.
Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
* testsuite/libgomp.c/c.exp: load_gcc_lib gcc-dg.exp.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
* testsuite/libgomp.graphite/graphite.exp: Likewise.
* testsuite/libgomp.c++/c++.exp: load_gcc_lib gcc-dg.exp.
Use dg-runtest rather than gfortran-dg-runtest.
forced.C: Extend current handling of Linux-based x86 systems to cover all GNU systems. gcc/testsuite/ * g++.dg/abi/forced.C: Extend current handling of Linux-based x86 systems to cover all GNU systems. * g++.dg/abi/guard2.C: Likewise. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/sighandle.C: Likewise. * g++.dg/ext/cleanup-10.C: Likewise. * g++.dg/ext/cleanup-11.C: Likewise. * g++.dg/ext/cleanup-8.C: Likewise. * g++.dg/ext/cleanup-9.C: Likewise. * g++.dg/opt/const5.C: Likewise. * g++.dg/opt/life1.C: Likewise. * g++.dg/other/pr39496.C: Likewise. * g++.old-deja/g++.abi/aggregates.C: Likewise. * g++.old-deja/g++.abi/align.C: Likewise. * g++.old-deja/g++.abi/bitfields.C: Likewise. * g++.old-deja/g++.law/weak.C: Likewise. * g++.old-deja/g++.pt/asm1.C: Likewise. * gcc.c-torture/execute/20030125-1.x: Likewise. * gcc.c-torture/execute/990127-2.x: Likewise. * gcc.dg/20041106-1.c: Likewise. * gcc.dg/20050503-1.c: Likewise. * gcc.dg/builtin-object-size-5.c: Likewise. * gcc.dg/cleanup-10.c: Likewise. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/complex-5.c: Likewise. * gcc.dg/debug/dwarf2/asm-line1.c: Likewise. * gcc.dg/debug/dwarf2/discriminator.c: Likewise. * gcc.dg/dfp/convert-dfp-round-thread.c: Likewise. * gcc.dg/dfp/pr35739.c: Likewise. * gcc.dg/fdata-sections-1.c: Likewise. * gcc.dg/lto/20090206-1_0.c: Likewise. * gcc.dg/lto/20090206-2_0.c: Likewise. * gcc.dg/pr30360.c: Likewise. * gcc.dg/pr37303.c: Likewise. * gcc.dg/pr39323-1.c: Likewise. * gcc.dg/pr39323-2.c: Likewise. * gcc.dg/pr39323-3.c: Likewise. * gcc.dg/pr45416.c: Likewise. * gcc.dg/setjmp-2.c: Likewise. * gcc.dg/split-1.c: Likewise. * gcc.dg/split-3.c: Likewise. * gcc.dg/split-4.c: Likewise. * gcc.dg/strlenopt-12g.c: Likewise. * gcc.dg/strlenopt-14g.c: Likewise. * gcc.dg/strlenopt-14gf.c: Likewise. * gcc.dg/strlenopt-16g.c: Likewise. * gcc.dg/strlenopt-17g.c: Likewise. * gcc.dg/strlenopt-18g.c: Likewise. * gcc.dg/strlenopt-1f.c: Likewise. * gcc.dg/strlenopt-22g.c: Likewise. * gcc.dg/strlenopt-2f.c: Likewise. * gcc.dg/strlenopt-4g.c: Likewise. * gcc.dg/strlenopt-4gf.c: Likewise. * gcc.dg/struct-ret-3.c: Likewise. * gcc.dg/torture/stackalign/setjmp-2.c: Likewise. * gcc.misc-tests/linkage.exp: Likewise. * gcc.target/i386/20000724-1.c: Likewise. * gcc.target/i386/align-main-3.c: Likewise. * gcc.target/i386/cleanup-1.c: Likewise. * gcc.target/i386/inline-mcpy.c: Likewise. * gcc.target/i386/pr32268.c: Likewise. * gcc.target/i386/pr36613.c: Likewise. * gcc.target/i386/pr39013-1.c: Likewise. * gcc.target/i386/pr39013-2.c: Likewise. * gcc.target/i386/pr39496.c: Likewise. * gcc.target/i386/pr40906-3.c: Likewise. * gcc.target/i386/pr46084.c: Likewise. * lib/target-supports.exp (check_effective_target_pie): Likewise. libgomp/ * testsuite/libgomp.c/icv-2.c: Extend current handling of Linux-based x86 systems to cover all GNU systems. * testsuite/libgomp.c/lock-3.c: Likewise. * testsuite/libgomp.c/pr48591.c: Likewise. libstdc++-v3/ * testsuite/17_intro/headers/c++1998/49745.cc: Extend current handling of Linux-based x86 systems to cover all GNU systems. * testsuite/18_support/bad_exception/23591_thread-1.c: Likewise. * testsuite/18_support/pthread_guard.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/ctype/is/char/2.cc: Likewise. * testsuite/22_locale/ctype/is/wchar_t/2.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * testsuite/30_threads/async/49668.cc: Likewise. * testsuite/30_threads/async/54297.cc: Likewise. * testsuite/30_threads/async/any.cc: Likewise. * testsuite/30_threads/async/async.cc: Likewise. * testsuite/30_threads/async/launch.cc: Likewise. * testsuite/30_threads/async/sync.cc: Likewise. * testsuite/30_threads/call_once/39909.cc: Likewise. * testsuite/30_threads/call_once/49668.cc: Likewise. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/54185.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/members/1.cc: Likewise. * testsuite/30_threads/condition_variable/members/2.cc: Likewise. * testsuite/30_threads/condition_variable/members/53841.cc: Likewise. * testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * testsuite/30_threads/condition_variable_any/53830.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * testsuite/30_threads/future/cons/move.cc: Likewise. * testsuite/30_threads/future/members/45133.cc: Likewise. * testsuite/30_threads/future/members/get.cc: Likewise. * testsuite/30_threads/future/members/get2.cc: Likewise. * testsuite/30_threads/future/members/share.cc: Likewise. * testsuite/30_threads/future/members/valid.cc: Likewise. * testsuite/30_threads/future/members/wait.cc: Likewise. * testsuite/30_threads/future/members/wait_for.cc: Likewise. * testsuite/30_threads/future/members/wait_until.cc: Likewise. * testsuite/30_threads/lock/1.cc: Likewise. * testsuite/30_threads/lock/2.cc: Likewise. * testsuite/30_threads/lock/3.cc: Likewise. * testsuite/30_threads/lock/4.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/packaged_task/49668.cc: Likewise. * testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise. * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * testsuite/30_threads/promise/cons/1.cc: Likewise. * testsuite/30_threads/promise/cons/alloc.cc: Likewise. * testsuite/30_threads/promise/cons/move.cc: Likewise. * testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * testsuite/30_threads/promise/members/get_future.cc: Likewise. * testsuite/30_threads/promise/members/get_future2.cc: Likewise. * testsuite/30_threads/promise/members/set_exception.cc: Likewise. * testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * testsuite/30_threads/promise/members/set_value.cc: Likewise. * testsuite/30_threads/promise/members/set_value2.cc: Likewise. * testsuite/30_threads/promise/members/set_value3.cc: Likewise. * testsuite/30_threads/promise/members/swap.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/shared_future/cons/move.cc: Likewise. * testsuite/30_threads/shared_future/members/45133.cc: Likewise. * testsuite/30_threads/shared_future/members/get.cc: Likewise. * testsuite/30_threads/shared_future/members/get2.cc: Likewise. * testsuite/30_threads/shared_future/members/valid.cc: Likewise. * testsuite/30_threads/shared_future/members/wait.cc: Likewise. * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * testsuite/30_threads/this_thread/1.cc: Likewise. * testsuite/30_threads/this_thread/2.cc: Likewise. * testsuite/30_threads/this_thread/3.cc: Likewise. * testsuite/30_threads/this_thread/4.cc: Likewise. * testsuite/30_threads/thread/cons/1.cc: Likewise. * testsuite/30_threads/thread/cons/2.cc: Likewise. * testsuite/30_threads/thread/cons/3.cc: Likewise. * testsuite/30_threads/thread/cons/4.cc: Likewise. * testsuite/30_threads/thread/cons/49668.cc: Likewise. * testsuite/30_threads/thread/cons/5.cc: Likewise. * testsuite/30_threads/thread/cons/6.cc: Likewise. * testsuite/30_threads/thread/cons/7.cc: Likewise. * testsuite/30_threads/thread/cons/8.cc: Likewise. * testsuite/30_threads/thread/cons/9.cc: Likewise. * testsuite/30_threads/thread/cons/moveable.cc: Likewise. * testsuite/30_threads/thread/members/1.cc: Likewise. * testsuite/30_threads/thread/members/2.cc: Likewise. * testsuite/30_threads/thread/members/3.cc: Likewise. * testsuite/30_threads/thread/members/4.cc: Likewise. * testsuite/30_threads/thread/members/5.cc: Likewise. * testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * testsuite/30_threads/thread/native_handle/cancel.cc: Likewise. * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/thread/swap/1.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/try_lock/1.cc: Likewise. * testsuite/30_threads/try_lock/2.cc: Likewise. * testsuite/30_threads/try_lock/3.cc: Likewise. * testsuite/30_threads/try_lock/4.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/ext/mt_allocator/22309_thread.cc: Likewise. * testsuite/ext/profile/mh.cc: Likewise. * testsuite/ext/rope/pthread7-rope.cc: Likewise. * testsuite/lib/libstdc++.exp (libstdc++_init): Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/util/testsuite_performance.h: Extend current handling of Linux-based systems to cover all glibc-based systems. From-SVN: r199880
2013-06-10 09:21:29 +02:00
2013-06-10 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/libgomp.c/icv-2.c: Extend current handling of
Linux-based x86 systems to cover all GNU systems.
* testsuite/libgomp.c/lock-3.c: Likewise.
* testsuite/libgomp.c/pr48591.c: Likewise.
2013-06-06 Thomas Schwinge <thomas@codesourcery.com>
* configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for
GNU/Hurd, as done for Linux-based systems.
* config/posix/ptrlock.h: Fix comment.
2013-05-27 Tobias Burnus <burnus@net-b.de>
PR fortran/57423
* libgomp.texi (omp_set_dynamic, omp_set_nested, omp_set_nested,
omp_set_num_threads, omp_init_lock, omp_set_lock, omp_test_lock,
omp_unset_lock, omp_destroy_lock, omp_init_nest_lock,
omp_set_nest_lock, omp_test_nest_lock, omp_unset_nest_lock,
omp_destroy_nest_lock): Correct arguments to match the one in
the OpenMP spec.
* omp_lib.f90.in (omp_init_lock, omp_init_nest_lock, omp_destroy_lock
omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock, omp_unset_lock,
omp_unset_nest_lock, omp_set_dynamic, omp_set_nested,
omp_set_num_threads, omp_test_lock, omp_test_nest_lock): Ditto.
2013-05-16 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/loop-13.c: New test.
* testsuite/libgomp.c/loop-14.c: New test.
* testsuite/libgomp.c/loop-15.c: New test.
* testsuite/libgomp.c++/loop-13.C: New test.
* testsuite/libgomp.c++/loop-14.C: New test.
* testsuite/libgomp.c++/loop-15.C: New test.
2013-02-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56217
* testsuite/libgomp.c++/pr56217.C: New test.
2013-02-01 Alan Modra <amodra@gmail.com>
* task.c (GOMP_task, GOMP_taskwait): Comment.
2013-01-31 Dmitry Vyukov <dvyukov@gcc.gnu.org>
Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
PR libgomp/55561
* config/linux/wait.h (do_spin): Use atomic load for addr.
* config/linux/ptrlock.c (gomp_ptrlock_get_slow): Use atomic
for intptr and ptrlock.
* config/linux/ptrlock.h (gomp_ptrlock_get): Use atomic load
for ptrlock.
2013-01-22 Alan Modra <amodra@gmail.com>
PR libgomp/51376
PR libgomp/56073
* task.c (GOMP_task): Revert 2011-12-09 change.
(GOMP_taskwait): Likewise. Instead use atomic load with acquire
barrier to read task->children..
(gomp_barrier_handle_tasks): ..and matching atomic store with
release barrier here when setting parent->children to NULL.
2013-01-16 Jakub Jelinek <jakub@redhat.com>
Tobias Burnus <burnus@net-b.de>
PR driver/55884
* testsuite/libgomp.fortran/fortran.exp: Use
-fintrinsic-modules-path= instead of
-fintrinsic-modules-path.
2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years.
2012-12-19 Tobias Burnus <burnus@net-b.de>
* testsuite/libgomp.fortran/fortran.exp: Set
-fintrinsic-modules-path.
2012-12-19 Tobias Burnus <burnus@net-b.de>
* testsuite/libgomp.fortran/use_intrinsic_1.f90: New; moved
from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.
2012-11-21 Jakub Jelinek <jakub@redhat.com>
PR libgomp/55411
* team.c (gomp_free_thread): Decrease gomp_managed_threads
if pool had any threads_used.
2012-11-07 Jack Howarth <howarth@bromo.med.uc.edu>
* testsuite/libgomp.c++/pr24455.C: Use
-Wl,-undefined,dynamic_lookup on darwin.
2012-11-07 David Edelsohn <dje.gcc@gmail.com>
* testsuite/libgomp.c++/pr24455.C: Use -Wl,-G on AIX.
2012-10-24 Dominique d'Humieres <dominiq@lps.ens.fr>
* testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
2012-10-23 Ian Bolton <ian.bolton@arm.com>
Jim MacArthur <jim.macarthur@arm.com>
Marcus Shawcroft <marcus.shawcroft@arm.com>
Nigel Stephens <nigel.stephens@arm.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Richard Earnshaw <rearnsha@arm.com>
Sofiane Naci <sofiane.naci@arm.com>
Stephen Thomas <stephen.thomas@arm.com>
Tejas Belagod <tejas.belagod@arm.com>
Yufeng Zhang <yufeng.zhang@arm.com>
* configure.tgt: Add AArch64.
2012-10-04 Jason Merrill <jason@redhat.com>
* testsuite/libgomp.c++/tls-init1.C: New.
2012-09-14 David Edelsohn <dje.gcc@gmail.com>
* configure: Regenerated.
2012-08-29 Chung-Lin Tang <cltang@codesourcery.com>
* config/linux/mips/futex.h (sys_futex0): Change to static
function with noinline, nomips16 attributes under MIPS16. Adjust
asm statement to place 'li v0,SYS_futex' immediately before
syscall insn.
2012-07-04 Sandra Loosemore <sandra@codesourcery.com>
* libgomp.texi (Library Index): Renamed from "Index" to prevent
conflict with index.html on case-insensitive file systems.
2012-07-03 Uros Bizjak <ubizjak@gmail.com>
* config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause.
* testsuite/libgomp.c/sort-1.c (busy_wait): Ditto.
cloog.m4: Set up to work against ISL only. 2012-07-02 Richard Guenther <rguenther@suse.de> Michael Matz <matz@suse.de> Tobias Grosser <tobias@grosser.es> Sebastian Pop <sebpop@gmail.com> config/ * cloog.m4: Set up to work against ISL only. * isl.m4: New file. * Makefile.def: Add ISL host module, remove PPL host module. Adjust ClooG host module to use the proper ISL. * Makefile.tpl: Pass ISL include flags instead of PPL ones. * configure.ac: Include config/isl.m4. Add ISL host library, remove PPL. Remove PPL configury, add ISL configury, adjust ClooG configury. * Makefile.in: Regenerated. * configure: Likewise. gcc/ * Makefile.in: Remove PPL flags in favor of ISL ones. (BACKENDLIBS): Remove PPL libs. (INCLUDES): Remove PPL includes in favor of ISL ones. (graphite-clast-to-gimple.o): Remove graphite-dependences.h and graphite-cloog-compat.h dependencies. (graphite-dependences.o): Likewise. (graphite-poly.o): Likewise. * configure.ac: Declare ISL vars instead of PPL ones. * configure: Regenerated. * doc/install.texi: Replace PPL requirement documentation with ISL one. * graphite-blocking.c: Remove PPL code, add ISL equivalent. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.h: Likewise. * graphite-poly.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * graphite-scop-detection.c: Re-arrange includes. * graphite-cloog-util.c: Remove. * graphite-cloog-util.h: Likewise. * graphite-ppl.h: Likewise. * graphite-ppl.c: Likewise. * graphite-dependences.h: Likewise. libgomp/ * testsuite/libgomp.graphite/force-parallel-4.c: Adjust. * testsuite/libgomp.graphite/force-parallel-5.c: Likewise. * testsuite/libgomp.graphite/force-parallel-7.c: Likewise. * testsuite/libgomp.graphite/force-parallel-8.c: Likewise. Co-Authored-By: Michael Matz <matz@suse.de> Co-Authored-By: Sebastian Pop <sebpop@gmail.com> Co-Authored-By: Tobias Grosser <tobias@grosser.es> From-SVN: r189156
2012-07-02 13:43:46 +02:00
2012-07-02 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de>
Tobias Grosser <tobias@grosser.es>
Sebastian Pop <sebpop@gmail.com>
cloog.m4: Set up to work against ISL only. 2012-07-02 Richard Guenther <rguenther@suse.de> Michael Matz <matz@suse.de> Tobias Grosser <tobias@grosser.es> Sebastian Pop <sebpop@gmail.com> config/ * cloog.m4: Set up to work against ISL only. * isl.m4: New file. * Makefile.def: Add ISL host module, remove PPL host module. Adjust ClooG host module to use the proper ISL. * Makefile.tpl: Pass ISL include flags instead of PPL ones. * configure.ac: Include config/isl.m4. Add ISL host library, remove PPL. Remove PPL configury, add ISL configury, adjust ClooG configury. * Makefile.in: Regenerated. * configure: Likewise. gcc/ * Makefile.in: Remove PPL flags in favor of ISL ones. (BACKENDLIBS): Remove PPL libs. (INCLUDES): Remove PPL includes in favor of ISL ones. (graphite-clast-to-gimple.o): Remove graphite-dependences.h and graphite-cloog-compat.h dependencies. (graphite-dependences.o): Likewise. (graphite-poly.o): Likewise. * configure.ac: Declare ISL vars instead of PPL ones. * configure: Regenerated. * doc/install.texi: Replace PPL requirement documentation with ISL one. * graphite-blocking.c: Remove PPL code, add ISL equivalent. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.h: Likewise. * graphite-poly.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * graphite-scop-detection.c: Re-arrange includes. * graphite-cloog-util.c: Remove. * graphite-cloog-util.h: Likewise. * graphite-ppl.h: Likewise. * graphite-ppl.c: Likewise. * graphite-dependences.h: Likewise. libgomp/ * testsuite/libgomp.graphite/force-parallel-4.c: Adjust. * testsuite/libgomp.graphite/force-parallel-5.c: Likewise. * testsuite/libgomp.graphite/force-parallel-7.c: Likewise. * testsuite/libgomp.graphite/force-parallel-8.c: Likewise. Co-Authored-By: Michael Matz <matz@suse.de> Co-Authored-By: Sebastian Pop <sebpop@gmail.com> Co-Authored-By: Tobias Grosser <tobias@grosser.es> From-SVN: r189156
2012-07-02 13:43:46 +02:00
* testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
* testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
2012-06-28 Andreas Schwab <schwab@linux-m68k.org>
* libgomp.texi: Include gpl_v3.texi instead of gpl.texi.
2012-06-22 Richard Guenther <rguenther@suse.de>
Merge from graphite branch
2012-01-13 Tobias Grosser <tobias@grosser.es>
* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
* testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
2012-06-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/53580
* testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
use GOMP_barrier () call instead.
* testsuite/libgomp.c/pr26943-3.c: Likewise.
* testsuite/libgomp.c/pr26943-4.c: Likewise.
* testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
call GOMP_barrier instead.
* testsuite/libgomp.fortran/vla5.f90: Likewise.
2012-06-06 Jakub Jelinek <jakub@redhat.com>
PR libgomp/52993
* config/linux/lock.c (gomp_init_nest_lock_25): Fix up last
argument to memset call.
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
* testsuite/lib/libgomp.exp: Add -fno-diagnostics-show-caret.
2012-03-31 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/52812
* configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
2012-03-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/52547
* testsuite/libgomp.c/pr52547.c: New test.
2012-03-16 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* testsuite/lib/libgomp.exp: load fortran-modules.exp
Remove obsolete IRIX 6.5 support libstdc++-v3: * configure.host (irix6.5*): Remove. * config/os/irix: Remove. * config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc()) [_GLIBCXX_FIONREAD_TAKES_OFF_T]: Remove. * doc/xml/faq.xml: Remove IRIX reference. * doc/xml/manual/using.xml (Finding Dynamic or Shared Libraries): Remove IRIX example. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Remove mips-sgi-irix6* handling. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * testsuite/30_threads/async/49668.cc: Likewise. * testsuite/30_threads/async/any.cc: Likewise. * testsuite/30_threads/async/async.cc: Likewise. * testsuite/30_threads/async/launch.cc: Likewise. * testsuite/30_threads/async/sync.cc: Likewise. * testsuite/30_threads/call_once/39909.cc: Likewise. * testsuite/30_threads/call_once/49668.cc: Likewise. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/members/1.cc: Likewise. * testsuite/30_threads/condition_variable/members/2.cc: Likewise. * testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * testsuite/30_threads/future/cons/move.cc: Likewise. * testsuite/30_threads/future/members/45133.cc: Likewise. * testsuite/30_threads/future/members/get.cc: Likewise. * testsuite/30_threads/future/members/get2.cc: Likewise. * testsuite/30_threads/future/members/share.cc: Likewise. * testsuite/30_threads/future/members/valid.cc: Likewise. * testsuite/30_threads/future/members/wait.cc: Likewise. * testsuite/30_threads/future/members/wait_for.cc: Likewise. * testsuite/30_threads/future/members/wait_until.cc: Likewise. * testsuite/30_threads/lock/1.cc: Likewise. * testsuite/30_threads/lock/2.cc: Likewise. * testsuite/30_threads/lock/3.cc: Likewise. * testsuite/30_threads/lock/4.cc: Likewise. * testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/packaged_task/49668.cc: Likewise. * testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * testsuite/30_threads/promise/cons/1.cc: Likewise. * testsuite/30_threads/promise/cons/alloc.cc: Likewise. * testsuite/30_threads/promise/cons/move.cc: Likewise. * testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * testsuite/30_threads/promise/members/get_future.cc: Likewise. * testsuite/30_threads/promise/members/get_future2.cc: Likewise. * testsuite/30_threads/promise/members/set_exception.cc: Likewise. * testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * testsuite/30_threads/promise/members/set_value.cc: Likewise. * testsuite/30_threads/promise/members/set_value2.cc: Likewise. * testsuite/30_threads/promise/members/set_value3.cc: Likewise. * testsuite/30_threads/promise/members/swap.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/shared_future/cons/move.cc: Likewise. * testsuite/30_threads/shared_future/members/45133.cc: Likewise. * testsuite/30_threads/shared_future/members/get.cc: Likewise. * testsuite/30_threads/shared_future/members/get2.cc: Likewise. * testsuite/30_threads/shared_future/members/valid.cc: Likewise. * testsuite/30_threads/shared_future/members/wait.cc: Likewise. * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * testsuite/30_threads/this_thread/1.cc: Likewise. * testsuite/30_threads/this_thread/2.cc: Likewise. * testsuite/30_threads/this_thread/3.cc: Likewise. * testsuite/30_threads/this_thread/4.cc: Likewise. * testsuite/30_threads/thread/cons/1.cc: Likewise. * testsuite/30_threads/thread/cons/2.cc: Likewise. * testsuite/30_threads/thread/cons/3.cc: Likewise. * testsuite/30_threads/thread/cons/4.cc: Likewise. * testsuite/30_threads/thread/cons/49668.cc: Likewise. * testsuite/30_threads/thread/cons/5.cc: Likewise. * testsuite/30_threads/thread/cons/6.cc: Likewise. * testsuite/30_threads/thread/cons/7.cc: Likewise. * testsuite/30_threads/thread/cons/8.cc: Likewise. * testsuite/30_threads/thread/cons/9.cc: Likewise. * testsuite/30_threads/thread/cons/moveable.cc: Likewise. * testsuite/30_threads/thread/members/1.cc: Likewise. * testsuite/30_threads/thread/members/2.cc: Likewise. * testsuite/30_threads/thread/members/3.cc: Likewise. * testsuite/30_threads/thread/members/4.cc: Likewise. * testsuite/30_threads/thread/members/5.cc: Likewise. * testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/thread/swap/1.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/try_lock/1.cc: Likewise. * testsuite/30_threads/try_lock/2.cc: Likewise. * testsuite/30_threads/try_lock/3.cc: Likewise. * testsuite/30_threads/try_lock/4.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/ext/rope/pthread7-rope.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/23_containers/vector/capacity/resize/1.cc: Remove dg-options for mips*-*-irix6*. * testsuite/27_io/ios_base/storage/1.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/storage/3.cc: Likewise. * testsuite/lib/libstdc++.exp (v3-build_support): Remove IRIX 6 workaround. libjava: * configure.ac (libgcj_cv_exidx): Remove IRIX 6 ld workaround. (mips-sgi-irix6*): Remove. (mips-sgi-irix*): Remove. (AC_CHECK_HEADERS): Remove bstring.h. * configure: Regenerate. * include/config.h.in: Regenerate. * configure.host (mips-sgi-irix6*): Remove. * include/posix-signal.h [__sgi__]: Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc [HAVE_BSTRING_H]: Remove. * gnu/java/net/natPlainDatagramSocketImplWin32.cc: Likewise. * gnu/java/net/natPlainSocketImplPosix.cc: Likewise. libitm: * configure.tgt (*-*-irix6*): Remove. libgomp: * configure.tgt (mips-sgi-irix6*): Remove. libgfortran: * intrinsics/c99_functions.c [__sgi__ && !HAVE_COMPLEX_H]: Remove. libgcc: * config.host (mips-sgi-irix6.5*): Remove. * config/mips/irix-crti.S: Remove. * config/mips/irix-crtn.S: Remove. * config/mips/irix6-unwind.h: Remove. * config/mips/t-irix6: Remove. * config/mips/t-slibgcc-irix: Remove. gnattools: * configure.ac (mips-sgi-irix*): Remove. * configure: Regenerate. gcc/testsuite: * g++.dg/other/anon5.C: Don't skip on mips-sgi-irix*. * g++.dg/tree-prof/partition1.C: Likewise. * g++.dg/tree-prof/partition2.C: Likewise. * g++.old-deja/g++.other/init19.C: Remove mips-sgi-irix* handling. * gcc.c-torture/compile/labels-3.c: Remove dg-options. * gcc.c-torture/execute/20010724-1.c: Remove. * gcc.c-torture/execute/20010724-1.x: Remove. * gcc.c-torture/execute/20040208-2.c: Remove. * gcc.c-torture/execute/20040208-2.x: Remove. * gcc.c-torture/execute/ieee/20000320-1.c [__mips__ && __sgi__]: Remove. (main) [__mips__ && __sgi__]: Remove. * gcc.c-torture/execute/ieee/copysign1.c: Remove IRIX reference. * gcc.c-torture/execute/ieee/copysign2.c: Likewise. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Remove mips-sgi-irix6* handling. * gcc.dg/cpp/assert4.c [__mips__]: Remove __sgi__, sgi. * gcc.dg/torture/20090618-1.c: Don't skip on mips-sgi-irix*. * gcc.dg/torture/builtin-frexp-1.c: Remove mips*-*-irix6* handling. * gcc.dg/torture/builtin-logb-1.c: Likewise. * gcc.dg/torture/pr47917.c: Remove mips-sgi-irix6.5 handling. * gcc.dg/tree-ssa/ssa-store-ccp-3.c: Don't skip on mips*-*-irix*. * gcc.misc-tests/linkage.exp: Remove mips-sgi-irix6* handling. * gcc.target/mips/args-1.c [!__sgi__]: Remove. * gcc.target/mips/interrupt_handler-2.c: Don't skip on mips-sgi-irix6*. * gcc.target/mips/interrupt_handler-3.c: Likewise. * gcc.target/mips/save-restore-1.c: Don't skip on mips-sgi-irix6*. * gcc.target/mips/save-restore-3.c: Likewise. * gcc.target/mips/save-restore-4.c: Likewise. * gcc.target/mips/save-restore-5.c: Likewise. * gfortran.dg/g77/cabs.f: Don't xfail on mips-sgi-irix6*. * lib/prune.exp (prune_gcc_output): Remove pruning of IRIX 6 ld messages. * lib/target-libpath.exp (set_ld_library_path_env_vars): Remove IRIX 6 handling. (restore_ld_library_path_env_vars): Likewise. * lib/target-supports.exp (check_profiling_available): Remove mips*-*-irix* handling. (check_ascii_locale_available): Remove mips-sgi-irix* handling. (add_options_for_c99_runtime): Remove mips-sgi-irix6.5* handling. * objc.dg/stabs-1.m: Don't xfail on mips-sgi-irix6.5. gcc/ada: * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove. * a-intnam-irix.ads, mlib-tgt-specific-irix.adb, s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads, s-proinf-irix-athread.adb, s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads, system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads: Remove. * adaint.c [__mips && __sgi]: Remove. (__gnat_number_of_cpus) [__mips && __sgi]: Remove. [IS_CROSS && !(__mips && __sgi)]: Remove. * adaint.h [sgi && _LFAPI]: Remove. * cstreams.c (__gnat_full_name) [sgi]: Remove. * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove. (__gnat_clearenv) [__mips && __sgi]: Remove. * errno.c (_SGI_MP_SOURCE): Remove. * gsocket.h [sgi]: Remove. * init.c: Remove IRIX reference. [sgi]: Remove. * link.c [sgi]: Remove. * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define. (main) [__mips && __sgi] (MAX_tv_sec): Don't define. (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove. * sysdep.c [sgi]: Remove. (getc_immediate_common) [sgi]: Remove. (__gnat_localtime_tzoff) [sgi]: Remove. * terminals.c [__mips && __sgi] (IRIX): Don't define. [IRIX] (USE_GETPTY): Don't define. (allocate_pty_desc) [USE_GETPTY]: Remove. * g-traceb.ads: Remove IRIX reference. * g-trasym.ads: Likewise. * memtrack.adb: Likewise. * s-interr-sigaction.adb: Likewise. * gnat_rm.texi (Implementation Advice): Remove SGI info. (Implementation Defined Characteristics): Likewise. * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix): Remove. (Irix-Specific Considerations): Remove. gcc/cp: * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference. gcc: * config.gcc (enable_obsolete): Remove mips-sgi-irix6.5. (mips-sgi-irix6.5*): Remove. * config.host (mips-sgi-irix*): Remove. * configure.ac (enable_fixed_point): Remove mips*-sgi-irix*. (set_have_as_tls): Remove *-*-irix6*. (gcc_cv_ld_static_dynamic): Remove mips-sgi-irix6*. * configure: Regenerate. * config/mips/iris6.h: Remove. * config/mips/iris6.opt: Remove. * config/mips/t-irix6: Remove. * config/mips/mips.h (TARGET_GPWORD): Remove IRIX 6 N64 handling. (TARGET_IRIX6): Remove. (TARGET_CPU_CPP_BUILTINS): Remove IRIX 6 handling. Don't define LANGUAGE_C, _LANGUAGE_C for Objective-C. * config/mips/mips.c (mips_build_builtin_va_list): Remove IRIX 6 handling. (mips_file_start): Likewise. * config/mips/mips-protos.h (irix_asm_output_align): Remove. * config/mips/driver-native.c [__sgi__]: Remove. (host_detect_local_cpu) [__sgi__]: Remove. * config/mips/gnu-user.h: Remove iris5.h reference. * config/mips/mips-modes.def: Remove IRIX 6 reference. * config/mips/gnu-user64.h (MIPS_TFMODE_FORMAT): Remove. * config/mips/mips.c (mips_option_override) [MIPS_TFMODE_FORMAT]: Remove. * gcc.c (main): Move asm_debug initialization ... (asm_debug): ... here. * ginclude/stddef.h (__STDDEF_H__): Don't define. * defaults.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Remove. * system.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Poison. * collect2.c [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove. (main) [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES]: Remove. [LINK_ELIMINATE_DUPLICATE_LDIRECTORIES] (is_in_args): Remove. * doc/tm.texi.in (Driver, LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): Remove. * doc/tm.texi: Regenerate. * doc/invoke.texi (Debugging Options, -gdwarf-<version>): Remove IRIX 6 reference. (MIPS Options, -march): Remove IRIX reference. * doc/install.texi (Binaries, SGI IRIX): Remove. (Specific, mips-sgi-irix6): Document IRIX 6.5 removal, remove rest of section. * doc/trouble.texi (Interoperation): Remove -lgl_s handling. fixincludes: * inclhack.def (broken_cabs): Remove IRIX and SunOS 4 support. (irix___restrict): Remove. (irix___generic1): Remove. (irix___generic2): Remove. (irix_asm_apostrophe): Remove. (irix_complex): Remove. (irix_pthread_init): Remove. (irix_socklen_t): Remove. (irix_stdint_c99_mode): Remove. (irix_stdint_c99_types): Remove. (irix_stdint_c99_macros): Remove. (irix_stdio_va_list): Remove IRIX 6.5 support. (irix_wcsftime): Remove. (stdio_va_list): Remove IRIX 6.5 support. (svr4_profil): Remove IRIX bypass. * fixincl.x: Regenerate. * tests/base/complex.h [IRIX_COMPLEX_CHECK]: Remove. * tests/base/internal/math_core.h: Remove. * tests/base/internal/sgimacros.h: Remove. * tests/base/internal/wchar_core.h: Remove. * tests/base/math.h [BROKEN_CABS_CHECK]: Remove IRIX and SunOS 4 support. * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: Remove. * tests/base/stdint-irix65.h: Remove. * tests/base/stdint.h [IRIX_STDINT_C99_MODE_CHECK]: Remove. * tests/base/sys/asm.h: Remove. * tests/base/sys/socket.h [IRIX_SOCKLEN_T_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove mips-sgi-irix6.5. toplevel: * MAINTAINERS (OS Port Maintainers): Remove irix. * configure.ac (enable_libgomp): Remove *-*-irix6*. (unsupported_languages): Remove mips-sgi-irix6.*. (noconfigdirs): Don't add ${libgcj} for mips*-*-irix6*. (with_stabs): Remove. * configure: Regenerate. From-SVN: r185390
2012-03-14 17:33:37 +01:00
2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.tgt (mips-sgi-irix6*): Remove.
Remove obsolete Tru64 UNIX V5.1B support libstdc++-v3: * configure.host: Remove osf* handling. * config/os/osf: Remove. * doc/xml/manual/using.xml: Remove OSF reference. * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* handling. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. libobjc: * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. * configure: Regenerate. * thr.c (_XOPEN_SOURCE): Define unconditionally. libjava: * configure.ac (alpha*-dec-osf*): Remove. * configure: Regenerate. * configure.host (alpha*-dec-osf*): Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use IPV6_MULTICAST_IF unconditionally. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of _Jv_accept. * include/posix-signal.h [__alpha__ && __osf__]: Remove. * include/posix.h (_POSIX_PII_SOCKET): Don't define. (_Jv_accept): Remove. * java/io/File.java (File._access): Rename to access. Change callers. (File._stat): Likewise. * java/io/File.h: Regenerate. * classpath/lib/java/io/File.class: Regenerate. * java/io/natFilePosix.cc (java::io::File::_access): Rename to access. (java::io::File::_stat): Rename to stat. * java/io/natFileWin32.cc: Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Remove alpha*-dec-osf* handling. * testsuite/libjava.jvmti/jvmti-interp.exp (gcj_jni_compile_c_to_so): Likewise. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. libitm: * configure.tgt (*-*-osf*): Remove. * configure: Regenerate. libgomp: * configure.tgt (alpha*-dec-osf*): Remove. * config/osf/sem.h: Remove. * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. libgfortran: * configure.ac: Remove Tru64 reference. * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* handling. * configure: Regenerate. * intrinsics/c99_functions.c [__osf__]: Remove. libgcc: * config.host: Remove alpha*-dec-osf5.1* handling. * config/alpha/gthr-posix.c: Remove. * config/alpha/libgcc-osf5.ver: Remove. * config/alpha/osf5-unwind.h: Remove. * config/alpha/t-osf-pthread: Remove. * config/alpha/t-slibgcc-osf: Remove. * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. * mkmap-flat.awk: Remove osf_export handling. gnattools: * configure.ac: Remove alpha*-dec-osf* handling. * configure: Regenerate. gcc/testsuite: * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. Adapt line numbers. * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/spbp.C: Likewise. * g++.dg/ext/label13.C: Likewise. * g++.dg/guality/guality.exp: Likewise. * g++.dg/other/anon5.C: Likewise. * g++.dg/other/pragma-ep-1.C: Remove. * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. * g++.dg/warn/pr31246.C: Likewise. * g++.dg/warn/weak1.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.ext/attrib5.C: Likewise. * gcc.c-torture/compile/limits-declparen.c: Likewise. * gcc.c-torture/compile/limits-pointer.c: Likewise. * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. * gcc.dg/c99-tgmath-1.c: Likewise. * gcc.dg/c99-tgmath-2.c: Likewise. * gcc.dg/c99-tgmath-3.c: Likewise. * gcc.dg/c99-tgmath-4.c: Likewise. * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * gcc.dg/debug/pr49032.c: Likewise. * gcc.dg/guality/guality.exp: Likewise. * gcc.dg/intmax_t-1.c: Likewise. * gcc.dg/pr48616.c: Likewise. * gcc.dg/pragma-ep-1.c: Remove. * gcc.dg/pragma-ep-2.c: Remove. * gcc.dg/pragma-ep-3.c: Remove. * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. * gcc.misc-tests/gcov-14.c: Likewise. * gfortran.dg/guality/guality.exp: Likewise. * lib/target-supports.exp (check_weak_available): Likewise. (add_options_for_tls): Likewise. (check_ascii_locale_available): Likewise. * obj-c++.dg/dwarf-2.mm: Likewise. * objc.dg/dwarf-1.m: Likewise. * objc.dg/dwarf-2.m: Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix handling. * c-pragma.c (handle_pragma_extern_prefix): Remove. (init_pragma): Don't register extern_prefix. gcc/po: * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. gcc: * config.gcc (alpha*-dec-osf5.1*): Remove. * config.host (alpha*-dec-osf*): Remove. * configure.ac (*-*-osf*): Remove. (alpha*-dec-osf*): Remove. * configure: Regenerate. * config/alpha/host-osf.c, config/alpha/osf5.h, config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: Remove. * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. * config/alpha/alpha.c (struct machine_function): Update comment. (alpha_start_function): Remove Tru64 UNIX as handling for max_frame_size. * config/alpha/alpha.md ("exception_receiver"): Remove TARGET_LD_BUGGY_LDGP. ("*exception_receiver_2"): Likewise. * except.c (finish_eh_generation): Remove Tru64 reference. * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. * target.def (handle_pragma_extern_prefix): Remove. * Makefile.in (mips-tfile.o-warn): Remove. (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. * mips-tdump.c, mips-tfile.c: Remove. * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma extern_prefix. * doc/install.texi (Binaries): Remove Tru64 UNIX reference. (Specific, alpha*-dec-osf5.1): Note removal. * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Remove. * doc/tm.texi: Regenerate. * doc/trouble.texi (Cross-Compiler Problems): Remove. gcc/ada: * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, system-tru64.ads: Remove. * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: Remove. [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. * env.c [__alpha__ && __osf__]: Remove. * gsocket.h (_OSF_SOURCE): Remove. (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. * init.c [__alpha__ && __osf__]: Remove. * link.c [__osf__]: Remove. * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. [__osf__ && !_SS_MAXSIZE]: Remove. * sysdep.c [__osf__]: Remove. * terminals.c [__alpha__ && __osf__]: Remove. [OSF1]: Remove. * g-traceb.ads: Remove Tru64 reference. * g-trasym.ads: Likewise. * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. (Summary of Run-Time Configurations): Likewise. * memtrack.adb: Likewise. fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove alpha-dec-osf5.1. config: * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. toplevel: * MAINTAINERS (OS Port Maintainers): Remove osf. * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. From-SVN: r185240
2012-03-12 16:35:56 +01:00
2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.tgt (alpha*-dec-osf*): Remove.
* config/osf/sem.h: Remove.
* config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally.
2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
* config/linux/sparc/futex.h (cpu_relax): Read from CC register.
2012-02-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libstdc++/52188
* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
Remove ENABLE_SYMVERS_SOL2.
* configure: Regenerate.
* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
(PREPROCESS): New variable.
(libgomp.ver): New target.
[LIBGOMP_BUILD_VERSIONED_SHLIB &&
LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
Use libgomp.ver.
[LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
* Makefile.in: Regenerate.
Add ports for TILE-Gx and TILEPro. . * MAINTAINERS (tilegx port): Add myself. (tilepro port): Add myself. contrib * config-list.mk (LIST): Add tilegx-linux-gnu and tilepro-linux-gnu. * gcc_update (gcc/config/tilegx/mul-tables.c): New dependencies. (gcc/config/tilepro/mul-tables.c): New dependencies. gcc * config.gcc: Handle tilegx and tilepro. * configure.ac (gcc_cv_as_dwarf2_debug_line): Enable test for tilegx and tilepro. Add HAVE_AS_TLS check for tilegx and tilepro. * configure: Regenerate. * doc/contrib.texi: Add Mat Hostetter and self. * doc/extend.texi (TILE-Gx Built-in Functions): New node. Document instruction intrinsics and network accessing intrinsics. (TILEPro Built-in Functions): New node. Document instruction intrinsics and network accessing intrinsics. * doc/install.texi (Specific, tilegx-*-linux*): Document it. (Specific, tilepro-*-linux*): Likewise. * doc/invoke.texi (TILE-Gx Options): New section. (TILEPro Options): New section. * doc/md.texi (TILE-Gx): New section. (TILEPro): New section. * common/config/tilegx: New directory for tilegx. * common/config/tilepro: New directory for tilepro. * config/tilegx: New directory for tilegx. * config/tilepro: New directory for tilepro. gcc/testsuite * g++.dg/other/PR23205.C: Disable test on tile. * g++.dg/other/pr23205-2.C: Disable test on tile. * gcc.dg/20020312-2.c: Add a condition for __tile__. * gcc.dg/20040813-1.c: Disable test on tile. * gcc.dg/lower-subreg-1.c: Disable test on tilegx. * gcc.misc-tests/linkage.exp: Handle tilegx. libcpp * configure.ac: Require 64-bit hwint for tilegx and tilepro. * configure: Regenerate. libgcc * config.host: Handle tilegx and tilepro. * config/tilegx: New directory for tilegx. * config/tilepro: New directory for tilepro. libgomp * configure.tgt: Handle tilegx and tilepro. * config/linux/tile: New directory for tilegx and tilepro. Added: trunk/gcc/common/config/tilegx/tilegx-common.c trunk/gcc/common/config/tilepro/tilepro-common.c trunk/gcc/config/tilegx/constraints.md trunk/gcc/config/tilegx/linux.h trunk/gcc/config/tilegx/mul-tables.c trunk/gcc/config/tilegx/predicates.md trunk/gcc/config/tilegx/sync.md trunk/gcc/config/tilegx/t-tilegx trunk/gcc/config/tilegx/tilegx-builtins.h trunk/gcc/config/tilegx/tilegx-c.c trunk/gcc/config/tilegx/tilegx-generic.md trunk/gcc/config/tilegx/tilegx-modes.def trunk/gcc/config/tilegx/tilegx-multiply.h trunk/gcc/config/tilegx/tilegx-protos.h trunk/gcc/config/tilegx/tilegx.c trunk/gcc/config/tilegx/tilegx.h trunk/gcc/config/tilegx/tilegx.md trunk/gcc/config/tilegx/tilegx.opt trunk/gcc/config/tilepro/constraints.md trunk/gcc/config/tilepro/gen-mul-tables.cc trunk/gcc/config/tilepro/linux.h trunk/gcc/config/tilepro/mul-tables.c trunk/gcc/config/tilepro/predicates.md trunk/gcc/config/tilepro/t-tilepro trunk/gcc/config/tilepro/tilepro-builtins.h trunk/gcc/config/tilepro/tilepro-c.c trunk/gcc/config/tilepro/tilepro-generic.md trunk/gcc/config/tilepro/tilepro-modes.def trunk/gcc/config/tilepro/tilepro-multiply.h trunk/gcc/config/tilepro/tilepro-protos.h trunk/gcc/config/tilepro/tilepro.c trunk/gcc/config/tilepro/tilepro.h trunk/gcc/config/tilepro/tilepro.md trunk/gcc/config/tilepro/tilepro.opt trunk/libgcc/config/tilegx/sfp-machine.h trunk/libgcc/config/tilegx/sfp-machine32.h trunk/libgcc/config/tilegx/sfp-machine64.h trunk/libgcc/config/tilegx/t-crtstuff trunk/libgcc/config/tilegx/t-softfp trunk/libgcc/config/tilegx/t-tilegx trunk/libgcc/config/tilepro/atomic.c trunk/libgcc/config/tilepro/atomic.h trunk/libgcc/config/tilepro/linux-unwind.h trunk/libgcc/config/tilepro/sfp-machine.h trunk/libgcc/config/tilepro/softdivide.c trunk/libgcc/config/tilepro/softmpy.S trunk/libgcc/config/tilepro/t-crtstuff trunk/libgcc/config/tilepro/t-tilepro trunk/libgomp/config/linux/tile/futex.h Modified: trunk/MAINTAINERS trunk/contrib/config-list.mk trunk/contrib/gcc_update trunk/gcc/config.gcc trunk/gcc/configure trunk/gcc/configure.ac trunk/gcc/doc/contrib.texi trunk/gcc/doc/extend.texi trunk/gcc/doc/install.texi trunk/gcc/doc/invoke.texi trunk/gcc/doc/md.texi trunk/gcc/testsuite/g++.dg/other/PR23205.C trunk/gcc/testsuite/g++.dg/other/pr23205-2.C trunk/gcc/testsuite/gcc.dg/20020312-2.c trunk/gcc/testsuite/gcc.dg/20040813-1.c trunk/gcc/testsuite/gcc.dg/lower-subreg-1.c trunk/gcc/testsuite/gcc.misc-tests/linkage.exp trunk/libcpp/configure trunk/libcpp/configure.ac trunk/libgcc/config.host trunk/libgomp/configure.tgt From-SVN: r184203
2012-02-14 11:02:21 +01:00
2012-02-14 Walter Lee <walt@tilera.com>
* configure.tgt: Handle tilegx and tilepro.
* config/linux/tile/futex.h: New file.
2012-02-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46886
* testsuite/libgomp.c/pr46886.c: New testcase.
2012-01-25 Matthias Klose <doko@ubuntu.com>
* config/linux/arm: Remove empty directory.
* configure.tgt (config_path): Remove linux-arm for arm*-*-linux*.
2011-12-09 Alan Modra <amodra@gmail.com>
PR libgomp/51376
* task.c (GOMP_taskwait): Don't access task->children outside of
task_lock mutex region.
(GOMP_task): Likewise.
2011-12-06 Jakub Jelinek <jakub@redhat.com>
PR libgomp/51132
* testsuite/libgomp.graphite/force-parallel-1.c: Move large arrays
to file scope.
* testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
2011-12-02 Alan Modra <amodra@gmail.com>
* config/linux/affinity.c: Use atomic rather than sync builtin.
* config/linux/lock.c: Likewise.
* config/linux/ptrlock.h: Likewise.
* config/linux/ptrlock.c: Likewise.
* config/linux/ptrlock.h (gomp_ptrlock_set): Always write here..
* config/linux/ptrlock.c (gomp_ptrlock_set_slow): ..not here.
* config/linux/futex.h (atomic_write_barrier): Delete unused function.
* config/linux/alpha/futex.h (atomic_write_barrier): Likewise.
* config/linux/ia64/futex.h (atomic_write_barrier): Likewise.
* config/linux/mips/futex.h (atomic_write_barrier): Likewise.
* config/linux/powerpc/futex.h (atomic_write_barrier): Likewise.
* config/linux/s390/futex.h (atomic_write_barrier): Likewise.
* config/linux/sparc/futex.h (atomic_write_barrier): Likewise.
* config/linux/x86/futex.h (atomic_write_barrier): Likewise.
2011-11-30 Alan Modra <amodra@gmail.com>
PR libgomp/51298
* config/linux/bar.h: Use atomic rather than sync builtins.
* config/linux/bar.c: Likewise. Add missing acquire
synchronisation on generation field.
* task.c (gomp_barrier_handle_tasks): Regain lock so as to not
double unlock.
2011-11-30 Alan Modra <amodra@gmail.com>
* ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
* critical.c (GOMP_critical_start): Add MEMMODEL_RELEASE fence.
* config/linux/mutex.h: Use atomic rather than sync builtins.
* config/linux/mutex.c: Likewise. Comment. Use -1 for waiting state.
* config/linux/omp-lock.h: Comment fix.
* config/linux/arm/mutex.h: Delete.
* config/linux/powerpc/mutex.h: Delete.
* config/linux/ia64/mutex.h: Delete.
* config/linux/mips/mutex.h: Delete.
2011-11-30 Alan Modra <amodra@gmail.com>
PR libgomp/51249
* config/linux/sem.h: Rewrite.
* config/linux/sem.c: Rewrite.
2011-11-28 Richard Henderson <rth@redhat.com>
* libgomp.h (enum memmodel): New.
2011-11-21 Andreas Tobler <andreast@fgznet.ch>
* configure: Regenerate.
2011-10-10 Matthias Klose <doko@ubuntu.com>
* config/posix95: Remove empty directory.
2011-08-26 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/threadprivate4.f90: New test.
2011-08-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/49792
* testsuite/libgomp.fortran/pr49792-1.f90: New test.
* testsuite/libgomp.fortran/pr49792-2.f90: New test.
2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/posix95/lock.c, posix95/omp-lock.h: Remove.
2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgomp/49965
* testsuite/libgomp.c++/task-8.C: Replaced err by errval.
2011-08-03 Uros Bizjak <ubizjak@gmail.com>
* config/linux/proc.h: New.
* config/linux/proc.c: Include "proc.h". Do not include <sched.h>.
(gomp_cpuset_popcount): Rename from cpuset_popcount. No more static.
(gomp_init_num_threads): Update call to cpuset_popcount.
(get_num_procs): Ditto.
* config/linux/affinity.c (gomp_init_affinity): Call
gomp_cpuset_popcount.
backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) Merge from gomp-3_1-branch branch: 2011-08-02 Jakub Jelinek <jakub@redhat.com> gcc/ * c-parser.c (enum c_parser_prec): New enum, moved from within c_parser_binary_expression. (c_parser_binary_expression): Add PREC argument. Stop parsing if operator has lower or equal precedence than PREC. (c_parser_conditional_expression, c_parser_omp_for_loop): Adjust callers. (c_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics. Adjust c_finish_omp_atomic caller. (c_parser_omp_taskyield): New function. (c_parser_pragma): Handle PRAGMA_OMP_TASKYIELD. (c_parser_omp_clause_name): Handle final and mergeable clauses. (c_parser_omp_clause_final, c_parser_omp_clause_mergeable): New functions. (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL and PRAGMA_OMP_CLAUSE_MERGEABLE. (OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses. (c_parser_omp_clause_reduction): Handle min and max. * c-typeck.c (c_finish_omp_clauses): Don't complain about const qualified predetermined vars in firstprivate clause. andle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. Handle MIN_EXPR and MAX_EXPR. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (dump_generic_node): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW. * tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (omp_clause_code_name): Likewise. (walk_tree_1): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. * tree.h (enum omp_clause_code): Add OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (OMP_CLAUSE_FINAL_EXPR): Define. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (expand_task_call): Likewise. (expand_omp_atomic_load, expand_omp_atomic_store): New functions. (expand_omp_atomic_fetch_op): Handle cases where old or new value is needed afterwards. (expand_omp_atomic): Call expand_omp_atomic_load resp. expand_omp_atomic_store. * gimplify.c (gimplify_omp_atomic, gimplify_expr): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW. (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Likewise. * tree.def (OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD, OMP_ATOMIC_CAPTURE_NEW): New. * gimple.h (GF_OMP_ATOMIC_NEED_VALUE): New. (gimple_omp_atomic_need_value_p, gimple_omp_atomic_set_need_value): New inlines. * omp-builtins.def (BUILT_IN_GOMP_TASKYIELD): New builtin. * doc/generic.texi: Mention OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. gcc/c-family/ * c-common.h (c_finish_omp_atomic): Adjust prototype. (c_finish_omp_taskyield): New prototype. * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1 or RHS1 have side-effects, evaluate those too in the right spot, if it is a decl and LHS is also a decl, error out if they aren't the same. (c_finish_omp_taskyield): New function. * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107. * c-pragma.c (omp_pragmas): Add taskyield. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD. (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and PRAGMA_OMP_CLAUSE_MERGEABLE. gcc/cp/ * cp-tree.h (finish_omp_atomic): Adjust prototype. (cxx_omp_const_qual_no_mutable): New prototype. (finish_omp_taskyield): New prototype. * parser.c (cp_parser_omp_atomic): (cp_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics. Adjust finish_omp_atomic caller. (cp_parser_omp_clause_name): Handle final and mergeable clauses. (cp_parser_omp_clause_final, cp_parser_omp_clause_mergeable): New functions. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL and PRAGMA_OMP_CLAUSE_MERGEABLE. (OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses. (cp_parser_omp_taskyield): New function. (cp_parser_pragma): Handle PRAGMA_OMP_TASKYIELD. (cp_parser_omp_clause_reduction): Handle min and max. * pt.c (tsubst_expr) <case OMP_ATOMIC>: Handle OpenMP 3.1 atomics. (tsubst_omp_clauses): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. * semantics.c (finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1 arguments. Handle OpenMP 3.1 atomics. Adjust c_finish_omp_atomic caller. (finish_omp_clauses): Don't complain about const qualified predetermined vars and static data members in firstprivate clause. Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. Handle MIN_EXPR and MAX_EXPR. (finish_omp_taskyield): New function. * cp-gimplify.c (cxx_omp_const_qual_no_mutable): New function. (cxx_omp_predetermined_sharing): Use it. gcc/fortran/ PR fortran/46752 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107. * openmp.c (gfc_free_omp_clauses): Free also final_expr. (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define. (gfc_match_omp_clauses): Handle parsing final and mergeable clauses. (OMP_TASK_CLAUSES): Allow final and mergeable clauses. (gfc_match_omp_taskyield): New function. (resolve_omp_clauses): Resolve final clause. Allow POINTERs and Cray pointers in clauses other than REDUCTION. (gfc_match_omp_atomic): Match optional read/write/update/capture keywords after !$omp atomic. (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms. * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD, print final and mergeable clauses. (show_code_node): Handle EXEC_OMP_TASKYIELD. * trans-openmp.c (gfc_trans_omp_clauses): Handle final and mergeable clauses. (gfc_trans_omp_taskyield): New function. (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD. (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms. (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable. (gfc_omp_predetermined_sharing): Adjust comment. * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and ST_OMP_END_ATOMIC. (gfc_omp_clauses): Add final_expr and mergeable fields. (gfc_exec_op): Add EXEC_OMP_TASKYIELD. (gfc_omp_atomic_op): New enum typedef. (struct gfc_code): Add ext.omp_atomic. * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD. * frontend-passes.c (gfc_code_walker): Also walk final_expr. * resolve.c (gfc_resolve_blocks, resolve_code): Handle EXEC_OMP_TASKYIELD. * st.c (gfc_free_statement): Likewise. * match.h (gfc_match_omp_taskyield): New prototype. * parse.c (decode_omp_directive): Handle taskyield directive. Handle !$omp end atomic. (case_executable): Add ST_OMP_TASKYIELD case. (gfc_ascii_statement): Handle ST_OMP_TASKYIELD. (parse_omp_atomic): Return gfc_statement instead of void. For !$omp atomic capture parse two assignments instead of just one and require !$omp end atomic afterwards, for other !$omp atomic forms just allow !$omp end atomic at the end. (parse_omp_structured_block, parse_executable): Adjust parse_omp_atomic callers. 2011-08-02 Tobias Burnus <burnus@net-b.de> * intrinsic.c (OMP_LIB): Updated openmp_version's value to 201107. * gfortran.texi (OpenMP): Update ref to OpenMP 3.1. * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1; remove deleted omp_integer_kind and omp_logical_kind constants. gcc/testsuite/ PR fortran/46752 * gcc.dg/gomp/atomic-5.c: Adjust expected diagnostics. * gcc.dg/gomp/atomic-15.c: New test. * g++.dg/gomp/atomic-5.C: Adjust expected diagnostics. * g++.dg/gomp/atomic-15.C: New test. * g++.dg/gomp/private-1.C: New test. * g++.dg/gomp/sharing-2.C: New test. * gfortran.dg/gomp/crayptr1.f90: Don't expect error about Cray pointer in FIRSTPRIVATE/LASTPRIVATE. * gfortran.dg/gomp/omp_atomic2.f90: New test. libgomp/ PR fortran/42041 PR fortran/46752 * omp.h.in (omp_in_final): New prototype. * omp_lib.f90.in (omp_in_final): New interface. (omp_integer_kind, omp_logical_kind): Remove and replace all its uses in the module with 4. (openmp_version): Change to 201107. * omp_lib.h.in (omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): Use omp_sched_kind kind for the parameters. (omp_in_final): New external. (openmp_version): Change to 201107. * task.c (omp_in_final): New function. (gomp_init_task): Initialize final_task. (GOMP_task): Remove unused attribute from flags. Handle final tasks. (GOMP_taskyield): New function. (omp_in_final): Return true if if (false) or final (true) task or descendant of final (true). * fortran.c (omp_in_final_): New function. * libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_. (GOMP_3.0): Export GOMP_taskyield. * env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New variables. (parse_unsigned_long_list): New function. (initialize_env): Use it for OMP_NUM_THREADS. Call parse_boolean with "OMP_PROC_BIND". If OMP_PROC_BIND=true, call gomp_init_affinity even if parse_affinity returned false. * config/linux/affinity.c (gomp_init_affinity): Handle gomp_cpu_affinity_len == 0. * libgomp_g.h (GOMP_taskyield): New prototype. * libgomp.h (struct gomp_task): Add final_task field. (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs. * team.c (gomp_team_start): Override new task's nthreads_var icv if list form OMP_NUM_THREADS has been used and it has value for the new nesting level. * testsuite/libgomp.c/atomic-11.c: New test. * testsuite/libgomp.c/atomic-12.c: New test. * testsuite/libgomp.c/atomic-13.c: New test. * testsuite/libgomp.c/atomic-14.c: New test. * testsuite/libgomp.c/reduction-6.c: New test. * testsuite/libgomp.c/task-5.c: New test. * testsuite/libgomp.c++/atomic-2.C: New test. * testsuite/libgomp.c++/atomic-3.C: New test. * testsuite/libgomp.c++/atomic-4.C: New test. * testsuite/libgomp.c++/atomic-5.C: New test. * testsuite/libgomp.c++/atomic-6.C: New test. * testsuite/libgomp.c++/atomic-7.C: New test. * testsuite/libgomp.c++/atomic-8.C: New test. * testsuite/libgomp.c++/atomic-9.C: New test. * testsuite/libgomp.c++/task-8.C: New test. * testsuite/libgomp.c++/reduction-4.C: New test. * testsuite/libgomp.fortran/allocatable7.f90: New test. * testsuite/libgomp.fortran/allocatable8.f90: New test. * testsuite/libgomp.fortran/crayptr3.f90: New test. * testsuite/libgomp.fortran/omp_atomic3.f90: New test. * testsuite/libgomp.fortran/omp_atomic4.f90: New test. * testsuite/libgomp.fortran/pointer1.f90: New test. * testsuite/libgomp.fortran/pointer2.f90: New test. * testsuite/libgomp.fortran/task4.f90: New test. 2011-08-02 Tobias Burnus <burnus@net-b.de> * libgomp.texi: Update OpenMP spec references to 3.1. (omp_in_final,OMP_PROC_BIND): New sections. (OMP_NUM_THREADS): Document that the value can be now a list. (GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref. From-SVN: r177194
2011-08-02 18:13:29 +02:00
2011-08-02 Jakub Jelinek <jakub@redhat.com>
PR fortran/42041
PR fortran/46752
* omp.h.in (omp_in_final): New prototype.
* omp_lib.f90.in (omp_in_final): New interface.
(omp_integer_kind, omp_logical_kind): Remove
and replace all its uses in the module with 4.
(openmp_version): Change to 201107.
* omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
omp_sched_guided, omp_sched_auto): Use omp_sched_kind
kind for the parameters.
(omp_in_final): New external.
(openmp_version): Change to 201107.
* task.c (omp_in_final): New function.
(gomp_init_task): Initialize final_task.
(GOMP_task): Remove unused attribute from flags. Handle final
tasks.
(GOMP_taskyield): New function.
(omp_in_final): Return true if if (false) or final (true) task
or descendant of final (true).
* fortran.c (omp_in_final_): New function.
* libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
(GOMP_3.0): Export GOMP_taskyield.
* env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
variables.
(parse_unsigned_long_list): New function.
(initialize_env): Use it for OMP_NUM_THREADS. Call parse_boolean
with "OMP_PROC_BIND". If OMP_PROC_BIND=true, call gomp_init_affinity
even if parse_affinity returned false.
* config/linux/affinity.c (gomp_init_affinity): Handle
gomp_cpu_affinity_len == 0.
* libgomp_g.h (GOMP_taskyield): New prototype.
* libgomp.h (struct gomp_task): Add final_task field.
(gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
* team.c (gomp_team_start): Override new task's nthreads_var icv
if list form OMP_NUM_THREADS has been used and it has value for
the new nesting level.
* testsuite/libgomp.c/atomic-11.c: New test.
* testsuite/libgomp.c/atomic-12.c: New test.
* testsuite/libgomp.c/atomic-13.c: New test.
* testsuite/libgomp.c/atomic-14.c: New test.
* testsuite/libgomp.c/reduction-6.c: New test.
* testsuite/libgomp.c/task-5.c: New test.
* testsuite/libgomp.c++/atomic-2.C: New test.
* testsuite/libgomp.c++/atomic-3.C: New test.
* testsuite/libgomp.c++/atomic-4.C: New test.
* testsuite/libgomp.c++/atomic-5.C: New test.
* testsuite/libgomp.c++/atomic-6.C: New test.
* testsuite/libgomp.c++/atomic-7.C: New test.
* testsuite/libgomp.c++/atomic-8.C: New test.
* testsuite/libgomp.c++/atomic-9.C: New test.
* testsuite/libgomp.c++/task-8.C: New test.
* testsuite/libgomp.c++/reduction-4.C: New test.
* testsuite/libgomp.fortran/allocatable7.f90: New test.
* testsuite/libgomp.fortran/allocatable8.f90: New test.
* testsuite/libgomp.fortran/crayptr3.f90: New test.
* testsuite/libgomp.fortran/omp_atomic3.f90: New test.
* testsuite/libgomp.fortran/omp_atomic4.f90: New test.
* testsuite/libgomp.fortran/pointer1.f90: New test.
* testsuite/libgomp.fortran/pointer2.f90: New test.
* testsuite/libgomp.fortran/task4.f90: New test.
2011-08-02 Tobias Burnus <burnus@net-b.de>
* libgomp.texi: Update OpenMP spec references to 3.1.
(omp_in_final,OMP_PROC_BIND): New sections.
(OMP_NUM_THREADS): Document that the value can be now a list.
(GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.
2011-08-02 H.J. Lu <hongjiu.lu@intel.com>
* config/linux/x86/futex.h: Check __x86_64__ instead of
__LP64__.
2011-07-29 Jakub Jelinek <jakub@redhat.com>
PR middle-end/49897
PR middle-end/49898
* testsuite/libgomp.c/pr49897-1.c: New test.
* testsuite/libgomp.c/pr49897-2.c: New test.
* testsuite/libgomp.c/pr49898-1.c: New test.
* testsuite/libgomp.c/pr49898-2.c: New test.
2011-07-28 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/lib/libgomp.exp (libgomp_init): Add -march=i486
for ia32 instead of ilp32.
* testsuite/libgomp.c/atomic-1.c: Require ia32 instead of ilp32.
* testsuite/libgomp.c/atomic-6.c: Likewise.
2011-07-23 Sebastian Pop <sebastian.pop@amd.com>
* testsuite/libgomp.graphite/force-parallel-1.c: Un-xfail.
* testsuite/libgomp.graphite/force-parallel-2.c: Adjust pattern.
2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgomp/45351
* config/osf/sem.h: New file.
* configure.tgt (alpha*-dec-osf*): Prepend osf to config_path.
2011-07-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/49541
* testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to
ldflags.
2011-07-15 Jakub Jelinek <jakub@redhat.com>
* config/linux/wait.h (do_spin): New inline, largely copied
from do_wait, just don't do futex_wait here, instead return true if
it should be done.
(do_wait): Implement using do_spin.
* config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
to prototype.
(gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
__sync_bool_compare_and_swap, pass the oldval to
gomp_mutex_lock_slow.
* config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
If all mutex contenders are just spinning and not sleeping, don't
change state to 2 unnecessarily. Optimize the loop when state has
already become 2 to use just one atomic operation per loop instead
of two.
* config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
to prototype.
(gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
__sync_bool_compare_and_swap, pass the oldval to
gomp_mutex_lock_slow.
2011-06-22 Jakub Jelinek <jakub@redhat.com>
PR libgomp/49490
* iter.c (gomp_iter_static_next): For chunk size 0
only use n ceil/ nthreads size for the first
n % nthreads threads in the team instead of
all threads except for the last few ones which
get less work or none at all.
* iter_ull.c (gomp_iter_ull_static_next): Likewise.
* env.c (parse_schedule): If OMP_SCHEDULE doesn't have
chunk argument, set run_sched_modifier to 0 for static
resp. 1 for other kinds. If chunk argument is 0
and not static, set value to 1.
2011-05-19 Jakub Jelinek <jakub@redhat.com>
PR c++/49043
* testsuite/libgomp.c++/pr49043.C: New test.
PR c++/48869
* testsuite/libgomp.c++/pr48869.C: New test.
2011-05-06 Jakub Jelinek <jakub@redhat.com>
PR fortran/48894
* fortran.c: Include limits.h.
(TO_INT): Define.
(omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
*set.
(omp_set_num_threads_8_, omp_set_schedule_8_,
omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
omp_get_team_size_8_): Use TO_INT macro.
* testsuite/libgomp.fortran/pr48894.f90: New test.
2011-04-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/48591
* testsuite/libgomp.c/pr48591.c: New test.
2011-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/48135
* acinclude.m4 (enable_symvers): Handle --disable-symvers.
* configure: Regenerate.
2011-02-27 Jakub Jelinek <jakub@redhat.com>
PR fortran/47886
* testsuite/libgomp.fortran/task3.f90: New test.
2011-02-24 Tobias Burnus <burnus@net-b.de>
* libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
2011-02-23 Jakub Jelinek <jakub@redhat.com>
PR libgomp/47854
* libgomp.texi (omp_get_wtime): Don't say time in the past
must be Unix Epoch.
2011-02-18 Jakub Jelinek <jakub@redhat.com>
PR libgomp/47804
* testsuite/libgomp.fortran/fortran.exp: Check for both
libquadmath.a and libquadmath.${shlib_ext}. If neither exists,
but $blddir != "", still append ${blddir}/${lang_library_path}
to ld_library_path.
2011-02-16 Tobias Burnus <burnus@net-b.de>
PR libgomp/47758
* testsuite/libgomp.fortran/fortran.exp: Check for the existence
of libquadmath.a before adding its libpath to ldflags.
2011-02-14 Jakub Jelinek <jakub@redhat.com>
PR libgomp/47731
* config/linux/futex.h (futex_wait): Pass NULL as timeout argument
to FUTEX_WAIT futex syscall.
* config/linux/wait.h: Include <futex.h> instead of "futex.h".
Remove freebsd1 from libtool.m4 macros and config.rpath. /: Import from Libtool and gnulib: 2011-01-27 Gerald Pfeifer <gerald@pfeifer.com> Prepare for supporting FreeBSD 10. * config.rpath: Remove handling of freebsd1* which soon would match FreeBSD 10.0. 2011-01-20 Gerald Pfeifer <gerald@pfeifer.com> (tiny change) Remove support for FreeBSD 1.x. * libtool.m4 (_LT_LINKER_SHLIBS) (_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which soon would incorrectly match FreeBSD 10.0. boehm-gc/: * configure: Regenerate. gcc/: * configure: Regenerate. libffi/: * configure: Regenerate. libgfortran/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * configure: Likewise. libgo/: * config/libtool.m4: (_LT_LINKER_SHLIBS) (_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which soon would incorrectly match FreeBSD 10.0. * configure: Regenerate. libgomp/: * configure: Regenerate. libjava/: * configure: Regenerate. * shlibpath.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which soon would incorrectly match FreeBSD 10.0. libjava/classpath/: * config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove handling of freebsd1* which soon would match FreeBSD 10.0. * configure: Regenerate. libjava/libltdl/: * acinclude.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which soon would incorrectly match FreeBSD 10.0. * configure: Regenerate. libmudflap/: * configure: Regenerate. libobjc/: * configure: Regenerate. libquadmath/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * configure: Likewise. libssp/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * configure: Likewise. libstdc++-v3/: * configure: Regenerate. lto-plugin/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. zlib/: * configure: Regenerate. From-SVN: r170106
2011-02-13 12:45:53 +01:00
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2011-01-20 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104
* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Accept gnu variants.
2011-01-16 Gerald Pfeifer
* configure.tgt (*-*-freebsd*): Add -lpthread to XLDFLAGS.
2010-12-14 Jakub Jelinek <jakub@redhat.com>
PR fortran/46874
* libgomp.fortran/allocatable6.f90: New test.
2010-12-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
* configure: Regenerate.
re PR target/40125 (libgcc_s DLL installed in wrong directory in cross toolchain) config/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * lthostflags.m4: New file. (ACX_LT_HOST_FLAGS): Define. libgfortran/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (LTLDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. libgomp/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * configure.host (libgcj_sublib_ltflags): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac (extra_ldflags_libobjc): Invoke ACX_LT_HOST_FLAGS. * Makefile.in (lt_host_flags): Import AC_SUBST'd value. * aclocal.m4: Regenerate. * configure: Regenerate. libquadmath/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (libquadmath_la_LDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. libssp/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (libssp_la_LDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. libstdc++-v3/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * configure.host (OPT_LDFLAGS): Use lt_host_flags for cygming. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. lto-plugin/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but override -bindir setting. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. From-SVN: r167480
2010-12-06 01:50:04 +01:00
2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/40125
PR lto/46695
* configure.ac: Invoke ACX_LT_HOST_FLAGS.
* Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-12-02 Jakub Jelinek <jakub@redhat.com>
PR fortran/46753
* libgomp.fortran/pr46753.f90: New test.
PR libgomp/43706
* env.c (initialize_env): Default to spin count 300000
instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
is specified.
PR libgomp/45240
* parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
at the end if sync builtins aren't supported.
2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0.
2010-11-24 Iain Sandoe <iains@gcc.gnu.org>
* testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.
re PR fortran/32049 (Support on x86_64 also kind=16) / 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * Makefile.def: Add libquadmath; build it with language=fortran. * configure.ac: Add libquadmath. * Makefile.tpl: Handle multiple libs in check-[+language+]. * Makefile.in: Regenerate. * configure: Regenerate. libquadmath/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 Initial implementation and checkin. gcc/fortran/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * gfortranspec.c (find_spec_file): New function. (lang_specific_driver): Try to find .spec file and use it. * trans-io.c (iocall): Define * IOCALL_X_REAL128/COMPLEX128(,write). (gfc_build_io_library_fndecls): Build decl for __float128 I/O. (transfer_expr): Call __float128 I/O functions. * trans-types.c (gfc_init_kinds): Allow kind-16 belonging to __float128. gcc/testsuite/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * gfortran.dg/quad_1.f90: New. * lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also compiler arguments. * lib/gfortran.exp (gfortran_link_flags): Add libquadmath to library search path; call gcc-set-multilib-library-path with arguments such that libgfortran.spec is found. (gfortran_init): Add path for libgfortran.spec to GFORTRAN_UNDER_TEST. libgomp/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * configure.ac: * configure: Regenerate. libgfortran/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * Makefile.am: Add missing pow_r16_i4.c, add transfer128.c, link libquadmath, if used. * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Add. * configure.ac: Use it, touch spec file. * gfortran.map: Add pow_r16_i4 and transfer_(real,complex)128(,write) functions. * intrinsics/cshift0.c (cshift0): Handle __float128 type. * intrinsics/erfc_scaled_inc.c: Ditto. * intrinsics/pack_generic.c (pack): Ditto * intrinsics/spread_generic.c (spread): Ditto. * intrinsics/unpack_generic.c (unpack1): Ditto. * io/read.c (convert_real): Ditto. * io/transfer.c: Update comments. * io/transfer128.c: New file. * io/write_float.def (write_float): Handle __float128 type. * libgfortran.h: #include quadmath_weak.h, define __builtin_infq and nanq. * m4/mtype.m4: Handle __float128 type. * runtime/in_pack_generic.c (internal_pack): Ditto. * runtime/in_unpack_generic.c (internal_unpack): Ditto. * kinds-override.h: New file. * libgfortran.spec.in: Ditto. * generated/pow_r16_i4.c: Generated. * Makefile.in: Regenerate. * configure: Regenerate. * config.h: Regenerate. * bessel_r10.c: Regenerate. * bessel_r16.c: Regenerate. * bessel_r4.c: Regenerate. * bessel_r8.c: Regenerate. * exponent_r16.c: Regenerate. * fraction_r16.c: Regenerate. * nearest_r16.c: Regenerate. * norm2_r10.c: Regenerate. * norm2_r16.c: Regenerate. * norm2_r4.c: Regenerate. * norm2_r8.c: Regenerate. * rrspacing_r16.c: Regenerate. * set_exponent_r16.c: Regenerate. * spacing_r16.c: Regenerate. Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r166825
2010-11-16 22:23:19 +01:00
2010-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/32049
* configure.ac:
re PR fortran/32049 (Support on x86_64 also kind=16) / 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * Makefile.def: Add libquadmath; build it with language=fortran. * configure.ac: Add libquadmath. * Makefile.tpl: Handle multiple libs in check-[+language+]. * Makefile.in: Regenerate. * configure: Regenerate. libquadmath/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 Initial implementation and checkin. gcc/fortran/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * gfortranspec.c (find_spec_file): New function. (lang_specific_driver): Try to find .spec file and use it. * trans-io.c (iocall): Define * IOCALL_X_REAL128/COMPLEX128(,write). (gfc_build_io_library_fndecls): Build decl for __float128 I/O. (transfer_expr): Call __float128 I/O functions. * trans-types.c (gfc_init_kinds): Allow kind-16 belonging to __float128. gcc/testsuite/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * gfortran.dg/quad_1.f90: New. * lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also compiler arguments. * lib/gfortran.exp (gfortran_link_flags): Add libquadmath to library search path; call gcc-set-multilib-library-path with arguments such that libgfortran.spec is found. (gfortran_init): Add path for libgfortran.spec to GFORTRAN_UNDER_TEST. libgomp/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * configure.ac: * configure: Regenerate. libgfortran/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * Makefile.am: Add missing pow_r16_i4.c, add transfer128.c, link libquadmath, if used. * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Add. * configure.ac: Use it, touch spec file. * gfortran.map: Add pow_r16_i4 and transfer_(real,complex)128(,write) functions. * intrinsics/cshift0.c (cshift0): Handle __float128 type. * intrinsics/erfc_scaled_inc.c: Ditto. * intrinsics/pack_generic.c (pack): Ditto * intrinsics/spread_generic.c (spread): Ditto. * intrinsics/unpack_generic.c (unpack1): Ditto. * io/read.c (convert_real): Ditto. * io/transfer.c: Update comments. * io/transfer128.c: New file. * io/write_float.def (write_float): Handle __float128 type. * libgfortran.h: #include quadmath_weak.h, define __builtin_infq and nanq. * m4/mtype.m4: Handle __float128 type. * runtime/in_pack_generic.c (internal_pack): Ditto. * runtime/in_unpack_generic.c (internal_unpack): Ditto. * kinds-override.h: New file. * libgfortran.spec.in: Ditto. * generated/pow_r16_i4.c: Generated. * Makefile.in: Regenerate. * configure: Regenerate. * config.h: Regenerate. * bessel_r10.c: Regenerate. * bessel_r16.c: Regenerate. * bessel_r4.c: Regenerate. * bessel_r8.c: Regenerate. * exponent_r16.c: Regenerate. * fraction_r16.c: Regenerate. * nearest_r16.c: Regenerate. * norm2_r10.c: Regenerate. * norm2_r16.c: Regenerate. * norm2_r4.c: Regenerate. * norm2_r8.c: Regenerate. * rrspacing_r16.c: Regenerate. * set_exponent_r16.c: Regenerate. * spacing_r16.c: Regenerate. Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r166825
2010-11-16 22:23:19 +01:00
* configure: Regenerate.
2010-10-06 Marcus Shawcroft <marcus.shawcroft@arm.com>
* config/linux/futex.h: New.
* config/linux/arm/mutex.h: New.
* configure.tgt (arm*-*-linux*): Add config path.
2010-09-30 Sebastian Pop <sebastian.pop@amd.com>
* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
2010-09-23 Tobias Burnus <burnus@net-b.de>
* libgomp.texi (omp_get_nested, omp_set_nested, omp_set_dynamic):
Change Fortran datatype to LOGICAL.
(omp_set_lock, omp_test_lock, omp_unset_lock, omp_set_nested_lock,
omp_unset_nested_lock): Use intent(inout) instead of intent(out).
2010-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2010-07-26 Jakub Jelinek <jakub@redhat.com>
* libgomp.texi: Add function keyword to a couple of Fortran
interfaces, use integer instead of int for Fortran.
2010-07-26 Aldy Hernandez <aldyh@redhat.com>
* libgomp.texi: Fix spelling and pasto problems throughout.
Adjust prototypes to match code.
re PR fortran/45045 (Named COMMON with different size: No warning with -fwhole-file) gcc/fortran/ 2010-07-24 Tobias Burnus <burnus@net-b.de> * options.c (gfc_init_options): Enable -fwhole-file by default. * interface.c (compare_parameter): Assume a Hollerith constant is compatible with all other argument types. libgomp/ 2010-07-24 Tobias Burnus <burnus@net-b.de> * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to silence -fwhole-file warning. gcc/testsuite/ 2010-07-24 Tobias Burnus <burnus@net-b.de> * gfortran.dg/func_decl_4.f90: Split test into two ... * gfortran.dg/func_decl_5.f90: ... parts. * gfortran.dg/common_resize_1.f: xfail two warnings (cf. PR 45045). * gfortran.dg/bounds_temporaries_1.f90: Add new dg-warning. * gfortran.dg/global_references_1.f90: Add new dg-warning. * gfortran.dg/generic_actual_arg.f90: Add new dg-warning. * gfortran.dg/entry_17.f90: Remove no-longer needed dg-warning. * gfortran.dg/used_before_typed_4.f90: Add new dg-warning. * gfortran.dg/bounds_check_strlen_1.f90: Add new dg-warning. * gfortran.dg/intrinsic_std_1.f90: Split by remove tree dump ... * gfortran.dg/intrinsic_std_6.f90: ... and create a dump test. * gfortran.dg/sizeof.f90: Make test valid. * gfortran.dg/pr20865.f90: Add new dg-error. * gfortran.dg/integer_exponentiation_2.f90: Add new dg-warnings. * gfortran.dg/g77/19990218-0.f: Ditto. * gfortran.dg/g77/19990218-1.f: Ditto. * gfortran.dg/g77/970625-2.f: Ditto. * gfortran.dg/pr37243.f: Fix function declaration. * gfortran.dg/use_only_1.f90: Fix implicit typing. * gfortran.dg/loc_1.f90: Fix pointer datatype. From-SVN: r162491
2010-07-24 00:15:51 +02:00
2010-07-24 Tobias Burnus <burnus@net-b.de>
* testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to
silence -fwhole-file warning.
re PR target/18788 ("-pthreads" option with "-shared" does not cause libpthread.so to be linked in.) libjava: * configure.ac (*-*-solaris2.8): Use alternate thread library. Add libthread. (*-*-solaris2.9): Use libthread. * configure: Regenerate. libgomp: * configure.tgt (*-*-solaris2.[56]*): Removed. gcc: * configure.ac: Don't disable TLS on Solaris 8/9 by default Set tga_func for Solaris 2/x86 resp. SPARC. Remove duplicate parts of sparc*-sun-solaris2.* TLS check. (LIB_THREAD_LDFLAGS_SPEC): Define. (LIB_TLS_SPEC): Define. Check for required Sun ld version. * configure: Regenerate. * config.in: Regenerate. * config/sol2.h (LIB_SPEC): Use LIB_THREAD_LDFLAGS_SPEC with -pthread, -threads, LIB_TLS_SPEC with -pthread. * doc/install.texi (Specific, *-*-solaris2*): Document use of alternate thread libraries on Solaris 8. Document TLS patch requirements. * doc/sourcebuild.texi (Add Options): Sort alphabetically. Document tls. PR target/18788 * config/sol2.h (LIB_SPEC): Link with thread libraries even with -shared. gcc/testsuite: * lib/target-supports.exp (add_options_for_tls): New proc. * g++.dg/tls/static-1.C: Use dg-add-options tls. * g++.dg/tls/static-1a.cc: Likewise. * gcc.dg/tls/emutls-1.c: Likewise. * gcc.dg/tls/opt-11.c: Likewise. * gcc.dg/tls/opt-12.c: Likewise. * gcc.dg/tls/pr24428-2.c: Likewise. * gcc.dg/tls/pr24428.c: Likewise. * obj-c++.dg/tls/static-1.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-1.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-2.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-3.mm: Likewise. * objc.dg/torture/tls/thr-init-2.m: Likewise. * objc.dg/torture/tls/thr-init-3.m: Likewise. * objc.dg/torture/tls/thr-init.m: Likewise. * gcc.dg/lto/20090210_0.c: Add -pthread for *-*-solaris2.[89]. From-SVN: r162478
2010-07-23 19:58:57 +02:00
2010-07-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.tgt (*-*-solaris2.[56]*): Removed.
2010-07-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
(HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
targetting solaris2*.
* configure: Regenerate.
* config.h.in: Regenerate.
* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
Add libgomp_version_dep.
[LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
versioning.
[!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
(libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
* Makefile.in: Regenerate.
* libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
* libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
to common block, protected by
HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
* libgomp.texi: Move to GFDL version 1.3. Update copyright years.
2010-06-09 Iain Sandoe <iains@gcc.gnu.org>
PR bootstrap/43170
* configure: Regenerate.
2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR other/43620
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
* configure: Regenerate.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-04-26 Jakub Jelinek <jakub@redhat.com>
PR c/43893
* testsuite/libgomp.c/pr43893.c: New test.
* testsuite/libgomp.c++/pr43893.C: New test.
2010-04-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/43570
* testsuite/libgomp.fortran/vla8.f90: New test.
2010-04-20 Jakub Jelinek <jakub@redhat.com>
PR libgomp/43706
* config/linux/affinity.c (gomp_init_affinity): Decrease
gomp_available_cpus if affinity mask confines the process to fewer
CPUs.
* config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
non-NULL, just return gomp_available_cpus.
PR libgomp/43569
* sections.c (gomp_sections_init): Initialize ws->mode.
2010-04-14 Uros Bizjak <ubizjak@gmail.com>
* acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but
not unused bar variable.
* configure: Regenerate.
Update to Automake 1.11.1. gcc/: PR other/43620 * doc/install.texi (Prerequisites): Bump Automake version to 1.11.1. * aclocal.m4: Regenerate. lto-plugin/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. intl/: * aclocal.m4: Regenerate. boehm-gc/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * include/Makefile.in: Regenerate. fixincludes/: * aclocal.m4: Regenerate. libcpp/: * aclocal.m4: Regenerate. libdecnumber/: * aclocal.m4: Regenerate. libffi/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgfortran/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. libgomp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/classpath/: * HACKING: Update required Automake version. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * doc/Makefile.in: Regenerate. * doc/api/Makefile.in: Regenerate. * examples/Makefile.in: Regenerate. * external/Makefile.in: Regenerate. * external/jsr166/Makefile.in: Regenerate. * external/relaxngDatatype/Makefile.in: Regenerate. * external/sax/Makefile.in: Regenerate. * external/w3c_dom/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * lib/Makefile.in: Regenerate. * native/Makefile.in: Regenerate. * native/fdlibm/Makefile.in: Regenerate. * native/jawt/Makefile.in: Regenerate. * native/jni/Makefile.in: Regenerate. * native/jni/classpath/Makefile.in: Regenerate. * native/jni/gconf-peer/Makefile.in: Regenerate. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * native/jni/gtk-peer/Makefile.in: Regenerate. * native/jni/java-io/Makefile.in: Regenerate. * native/jni/java-lang/Makefile.in: Regenerate. * native/jni/java-math/Makefile.in: Regenerate. * native/jni/java-net/Makefile.in: Regenerate. * native/jni/java-nio/Makefile.in: Regenerate. * native/jni/java-util/Makefile.in: Regenerate. * native/jni/midi-alsa/Makefile.in: Regenerate. * native/jni/midi-dssi/Makefile.in: Regenerate. * native/jni/native-lib/Makefile.in: Regenerate. * native/jni/qt-peer/Makefile.in: Regenerate. * native/jni/xmlj/Makefile.in: Regenerate. * native/plugin/Makefile.in: Regenerate. * resource/Makefile.in: Regenerate. * scripts/Makefile.in: Regenerate. * tools/Makefile.in: Regenerate. libjava/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/libltdl/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. libmudflap/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/: * aclocal.m4: Regenerate. libssp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. libstdc++-v3/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. From-SVN: r157949
2010-04-02 20:18:06 +02:00
2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-03-22 Jakub Jelinek <jakub@redhat.com>
PR libgomp/42942
* env.c (parse_unsigned_long): Add ALLOW_ZERO argument.
(initialize_env): Adjust callers.
(omp_set_max_active_levels): Set gomp_max_active_levels_var even
when the argument is 0.
* testsuite/libgomp.c/pr42942.c: New test.
2010-03-08 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/42644
PR middle-end/42130
* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
* testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
2010-01-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libgomp.c++/task-1.C: Renamed err to e.
* testsuite/libgomp.c++/task-6.C: Likewise.
2010-01-28 Steve Ellcey <sje@cup.hp.com>
* configure.tgt (*-*-hpux*): Add -frandom-seed flag.
2010-01-26 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Test for executability of _the first word_ of GFORTRAN.
* configure: Regenerate.
2010-01-26 Jakub Jelinek <jakub@redhat.com>
PR fortran/42866
* testsuite/libgomp.fortran/allocatable5.f90: New test.
2010-01-20 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Test for executability of GFORTRAN.
* configure: Regenerate.
2010-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure: Regenerate.
2010-01-04 H.J. Lu <hongjiu.lu@intel.com>
PR libgomp/42602
* libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.
2010-01-03 Richard Guenther <rguenther@suse.de>
* testsuite/libgomp.fortran/recursion1.f90: New testcase.
2009-12-23 Sebastian Pop <sebpop@gmail.com>
* testsuite/libgomp.graphite/pr4118.c: New.
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
* testsuite/libgomp.fortran/crayptr2.f90: Remove forced static linkage
for darwin, protect the test with require-effective-target tls_runtime.
* testsuite/libgomp.fortran/pr32550.f90: Ditto.
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
PR target/41605
* testsuite/lib/libgomp.exp: Provide -B options to allow for
link spec %s substitutions for static libraries.
2009-12-18 Jack Howarth <howarth@bromo.med.uc.edu>
PR testsuite/42135
* libgomp.graphite/force-parallel-2.c: Reduce array size.
Sync from git Libtool and regenerate. /: PR target/38384 PR bootstrap/40972 * libtool.m4: Sync from git Libtool. * ltoptions.m4: Likewise. * ltversion.m4: Likewise. * lt~obsolete.m4: Likewise. * ltmain.sh: Likewise. boehm-gc/: * Makefile.in: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. fixincludes/: * configure: Regenerate. gcc/: * configure: Regenerate. libffi/: * Makefile.in: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgfortran/: * Makefile.in: Regenerate. * configure: Regenerate. libgomp/: * Makefile.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/classpath/: * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * doc/api/Makefile.in: Regenerate. * examples/Makefile.in: Regenerate. * external/Makefile.in: Regenerate. * external/jsr166/Makefile.in: Regenerate. * external/relaxngDatatype/Makefile.in: Regenerate. * external/sax/Makefile.in: Regenerate. * external/w3c_dom/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * lib/Makefile.in: Regenerate. * native/Makefile.in: Regenerate. * native/fdlibm/Makefile.in: Regenerate. * native/jawt/Makefile.in: Regenerate. * native/jni/Makefile.in: Regenerate. * native/jni/classpath/Makefile.in: Regenerate. * native/jni/gconf-peer/Makefile.in: Regenerate. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * native/jni/gtk-peer/Makefile.in: Regenerate. * native/jni/java-io/Makefile.in: Regenerate. * native/jni/java-lang/Makefile.in: Regenerate. * native/jni/java-math/Makefile.in: Regenerate. * native/jni/java-net/Makefile.in: Regenerate. * native/jni/java-nio/Makefile.in: Regenerate. * native/jni/java-util/Makefile.in: Regenerate. * native/jni/midi-alsa/Makefile.in: Regenerate. * native/jni/midi-dssi/Makefile.in: Regenerate. * native/jni/native-lib/Makefile.in: Regenerate. * native/jni/qt-peer/Makefile.in: Regenerate. * native/jni/xmlj/Makefile.in: Regenerate. * native/plugin/Makefile.in: Regenerate. * resource/Makefile.in: Regenerate. * scripts/Makefile.in: Regenerate. * tools/Makefile.in: Regenerate. libjava/: * Makefile.in: Regenerate. * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libmudflap/: * Makefile.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/: * configure: Regenerate. libssp/: * Makefile.in: Regenerate. * configure: Regenerate. libstdc++-v3/: * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. lto-plugin/: * configure: Regenerate. * Makefile.in: Regenerate. zlib/: * Makefile.in: Regenerate. * configure: Regenerate. From-SVN: r155012
2009-12-05 18:18:53 +01:00
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
* configure: Regenerate.
* testsuite/Makefile.in: Regenerate.
2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com>
* testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
settings for LC_ALL and LANG.
2009-11-25 Jakub Jelinek <jakub@redhat.com>
PR fortran/42162
* testsuite/libgomp.fortran/pr42162.f90: New test.
2009-11-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/42029
* testsuite/libgomp.c/pr42029.c: New test.
2009-10-26 Jakub Jelinek <jakub@redhat.com>
* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
*s. Accept ld version without text in ()s.
* configure: Regenerated.
2009-10-27 11:09:04 +01:00
2009-10-22 Razya Ladelsky <razya@il.ibm.com>
* testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
2009-10-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR libgomp/41418
* configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
or a hyphen (happens with fortran language disabled).
* configure: Regenerate.
2009-09-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
use sed script portable to Solaris /bin/sed for extracting ld
version.
* configure: Regenerate.
2009-09-17 Alexander Monakov <amonakov@ispras.ru>
* testsuite/libgomp.graphite/bounds.c: New test.
2009-09-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (libgomp_la_LINK): New.
* Makefile.in: Regenerate.
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
Regenerate tree using Autoconf 2.64 and Automake 1.11. config/: * override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64. : * configure: Regenerate. intl/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. libiberty/: * config.in: Regenerate. * configure: Regenerate. boehm-gc/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * include/gc_config.h.in: Regenerate. fixincludes/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. gcc/: * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. libgcc/: * configure: Regenerate. gnattools/: * configure: Regenerate. libada/: * configure: Regenerate. libcpp/: * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. libdecnumber/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.in: Regenerate. libffi/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * fficonfig.h.in: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgfortran/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libgomp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/classpath/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * doc/api/Makefile.in: Regenerate. * examples/Makefile.in: Regenerate. * external/Makefile.in: Regenerate. * external/jsr166/Makefile.in: Regenerate. * external/relaxngDatatype/Makefile.in: Regenerate. * external/sax/Makefile.in: Regenerate. * external/w3c_dom/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * include/config.h.in: Regenerate. * lib/Makefile.in: Regenerate. * native/Makefile.in: Regenerate. * native/fdlibm/Makefile.in: Regenerate. * native/jawt/Makefile.in: Regenerate. * native/jni/Makefile.in: Regenerate. * native/jni/classpath/Makefile.in: Regenerate. * native/jni/gconf-peer/Makefile.in: Regenerate. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * native/jni/gtk-peer/Makefile.in: Regenerate. * native/jni/java-io/Makefile.in: Regenerate. * native/jni/java-lang/Makefile.in: Regenerate. * native/jni/java-math/Makefile.in: Regenerate. * native/jni/java-net/Makefile.in: Regenerate. * native/jni/java-nio/Makefile.in: Regenerate. * native/jni/java-util/Makefile.in: Regenerate. * native/jni/midi-alsa/Makefile.in: Regenerate. * native/jni/midi-dssi/Makefile.in: Regenerate. * native/jni/native-lib/Makefile.in: Regenerate. * native/jni/qt-peer/Makefile.in: Regenerate. * native/jni/xmlj/Makefile.in: Regenerate. * native/plugin/Makefile.in: Regenerate. * resource/Makefile.in: Regenerate. * scripts/Makefile.in: Regenerate. * tools/Makefile.in: Regenerate. libjava/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * include/config.h.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/libltdl/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config-h.in: Regenerate. * configure: Regenerate. libmudflap/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. libssp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libstdc++-v3/: * Makefile.in: Regenerate. * acinclude.m4: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. From-SVN: r151014
2009-08-22 15:22:20 +02:00
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Cleanups after the update to Autoconf 2.64, Automake 1.11. /: * configure.ac: Remove --with-datarootdir, --with-docdir, --with-pdfdir, --with-htmldir switches. * configure: Regenerate. gcc/: * configure.ac: Remove --with-datarootdir, --with-docdir, --with-htmldir switches. No need to call AC_SUBST for datarootdir, docdir, htmldir any more. * configure: Regenerate. * doc/install.texi (Configuration): Document --datarootdir, --docdir, --htmldir, --pdfdir; update documentation for --infodir, --mandir. (Prerequisites): Bump Autoconf version to 2.64, Automake to 1.11, M4 to 1.4.6. libgfortran/: * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. libjava/classpath/: * doc/cp-hacking.texinfo (Needed Tools and Libraries): Bump Autoconf version to 2.64, Automake to 1.11, M4 to 1.4.6. libjava/: * HACKING: Use aclocal-1.11 and autoconf-2.64 in example. * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. libstdc++-v3/: * doc/xml/manual/build_hacking.xml: Use tools from Autoconf 2.64 and Automake 1.11 in examples; update link to Autoconf manual page about quadrigraphs. * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. libssp/: * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. boehm-gc/: * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. libmudflap/: * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. zlib/: * Makefile.am (install-html, install-pdf, html): Remove. * Makefile.in: Regenerate. libffi/: * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. libgomp/: * Makefile.am (install-html, install-pdf): Remove. * Makefile.in: Regenerate. From-SVN: r151015
2009-08-22 15:41:50 +02:00
* Makefile.am (install-html, install-pdf): Remove.
* Makefile.in: Regenerate.
Regenerate tree using Autoconf 2.64 and Automake 1.11. config/: * override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64. : * configure: Regenerate. intl/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. libiberty/: * config.in: Regenerate. * configure: Regenerate. boehm-gc/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * include/gc_config.h.in: Regenerate. fixincludes/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. gcc/: * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. libgcc/: * configure: Regenerate. gnattools/: * configure: Regenerate. libada/: * configure: Regenerate. libcpp/: * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. libdecnumber/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.in: Regenerate. libffi/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * fficonfig.h.in: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgfortran/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libgomp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/classpath/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * doc/api/Makefile.in: Regenerate. * examples/Makefile.in: Regenerate. * external/Makefile.in: Regenerate. * external/jsr166/Makefile.in: Regenerate. * external/relaxngDatatype/Makefile.in: Regenerate. * external/sax/Makefile.in: Regenerate. * external/w3c_dom/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * include/config.h.in: Regenerate. * lib/Makefile.in: Regenerate. * native/Makefile.in: Regenerate. * native/fdlibm/Makefile.in: Regenerate. * native/jawt/Makefile.in: Regenerate. * native/jni/Makefile.in: Regenerate. * native/jni/classpath/Makefile.in: Regenerate. * native/jni/gconf-peer/Makefile.in: Regenerate. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * native/jni/gtk-peer/Makefile.in: Regenerate. * native/jni/java-io/Makefile.in: Regenerate. * native/jni/java-lang/Makefile.in: Regenerate. * native/jni/java-math/Makefile.in: Regenerate. * native/jni/java-net/Makefile.in: Regenerate. * native/jni/java-nio/Makefile.in: Regenerate. * native/jni/java-util/Makefile.in: Regenerate. * native/jni/midi-alsa/Makefile.in: Regenerate. * native/jni/midi-dssi/Makefile.in: Regenerate. * native/jni/native-lib/Makefile.in: Regenerate. * native/jni/qt-peer/Makefile.in: Regenerate. * native/jni/xmlj/Makefile.in: Regenerate. * native/plugin/Makefile.in: Regenerate. * resource/Makefile.in: Regenerate. * scripts/Makefile.in: Regenerate. * tools/Makefile.in: Regenerate. libjava/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * include/config.h.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/libltdl/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config-h.in: Regenerate. * configure: Regenerate. libmudflap/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/: * aclocal.m4: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. libssp/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libstdc++-v3/: * Makefile.in: Regenerate. * acinclude.m4: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/: * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. From-SVN: r151014
2009-08-22 15:22:20 +02:00
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* testsuite/Makefile.in: Regenerate.
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
* Makefile.in: Regenerate.
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
* Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
* Makefile.in: Regenerate.
2009-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/41102
omp_lib.h.in: Fix -std=f95 errors.
2009-08-14 David Edelsohn <edelsohn@gnu.org>
* testsuite/libgomp.graphite: Move from gcc.dg/graphite.
* testsuite/libgomp.graphite/graphite_autopar.exp: Delete.
* testsuite/libgomp.graphite/graphite.exp: New.
2009-08-05 Andreas Tobler <a.tobler@schweiz.org>
* testsuite/libgomp.fortran/fortran.exp: Add flags in case of shared
only build.
2009-08-04 David Daney <ddaney@caviumnetworks.com>
* config/linux/mutex.h (gomp_mutex_unlock): Add comment about
needed memory barrier semantics.
* config/linux/mips/mutex.h: New file.
2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
2009-07-16 Joseph Myers <joseph@codesourcery.com>
* configure: Regenerate.
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
* testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
2009-07-02 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
options when choosing a multilib.
gcc-defs.exp (gcc-set-multilib-library-path): Delete. gcc/testsuite/ * lib/gcc-defs.exp (gcc-set-multilib-library-path): Delete. * lib/target-libpath.exp (ld_library_path_vars): New variable. (init_ld_library_path_env_vars): New function, replacing the orig_*_saved assignments. Call it after defining it. (set_ld_library_path_env_vars): Rewrite to use ld_library_path_vars. (restore_ld_library_path_env_vars): Likewise. (add_path, find_libgcc_s): New functions. * lib/objc.exp (objc_init): Use find_libgcc_s instead of gcc-set-multilib-library-path. (objc_target_compile): Don't add "." to ld_library_path. Use add_path. * lib/gfortran.exp (gfortran_link_flags): Don't add "." to ld_library_path. Use add_path. Use find_libgcc_s instead of gcc-set-multilib-library-path. * lib/g++.exp (g++_link_flags): Likewise. * lib/obj-c++.exp (obj-c++_link_flags): Likewise. * lib/c-torture.exp: Do not manipulate ld_library_path at the top level; do it... (c-torture-execute): ...here instead. Use $ld_library_path_multilib to tell when this needs to happen. Use find_libgcc_s instead of gcc-set-multilib-library-path. * lib/gcc-dg.exp: Likewise. * lib/gnat.exp (gnat_target_compile): Don't add "." to ld_library_path. * g++.dg/compat/compat.exp (alt_ld_library_path): Don't add "." unless it is in $ALT_LD_LIBRARY_PATH. * g++.dg/compat/struct-layout-1.exp (alt_ld_library_path): Likewise. libffi/ * testsuite/lib/libffi-dg.exp (libffi-init): Don't add "." to ld_library_path. Use add_path. Add just find_libgcc_s to ld_library_path, not every libgcc multilib directory. libgomp/ * testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to ld_library_path. Use add_path. Add just find_libgcc_s to ld_library_path, not every libgcc multilib directory. * testsuite/libgomp.c/c.exp (ld_library_path): Don't call gcc-set-multilib-library-path; rely on $always_ld_library_path instead. * testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise. Use add_path. * testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise. libjava/ * testsuite/lib/libjava.exp (libjava_init): Just add find_libgcc_s to libjava_libgcc_s_path, rather than every libgcc multilib directory. (libjava_arguments): Explain why we add "." to ld_library_path. (gcj_invoke, exec_gij, libjava_invoke): Use add_path. libmudflap/ * testsuite/lib/libmudflap.exp (libmudflap-init): Don't add "." to ld_library_path. Use add_path. Add just find_libgcc_s to ld_library_path, not every libgcc multilib directory. libstdc++-v3/ * testsuite/lib/libstdc++.exp (libstdc++_init): Don't add "." to ld_library_path. Use add_path. Add just find_libgcc_s to ld_library_path, not every libgcc multilib directory. From-SVN: r149113
2009-06-30 20:37:57 +02:00
2009-06-30 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
ld_library_path. Use add_path. Add just find_libgcc_s to
ld_library_path, not every libgcc multilib directory.
* testsuite/libgomp.c/c.exp (ld_library_path): Don't call
gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
* testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
Use add_path.
* testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
2009-06-09 Nathan Froyd <froydnj@codesourcery.com>
* Makefile.am (LTLDFLAGS): Define.
(LINK): Define.
* Makefile.in: Regenerate.
2009-05-27 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/39718
* testsuite/libgomp.fortran/fortran.exp: Don't link with
libgfortranbegin, check existence of libgfortran.a instead of
libgfortranbegin.a.
2009-05-20 Jakub Jelinek <jakub@redhat.com>
PR libgomp/40174
* team.c (gomp_thread_start): Destroy thr->release semaphore.
(gomp_free_pool_helper): Likewise.
2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR fortran/35423
* testsuite/libgomp.fortran/workshare2.f90: New test.
2009-04-09 Nick Clifton <nickc@redhat.com>
* iter.c: Change copyright header to refer to version 3 of the
GNU General Public License with version 3.1 of the GCC Runtime
Library Exception and to point readers at the COPYING3 and
COPYING3.RUNTIME files and the FSF's license web page.
* alloc.c: Likewise.
* barrier.c: Likewise.
* config/bsd/proc.c: Likewise.
* config/linux/affinity.c: Likewise.
* config/linux/alpha/futex.h: Likewise.
* config/linux/bar.c: Likewise.
* config/linux/bar.h: Likewise.
* config/linux/ia64/futex.h: Likewise.
* config/linux/ia64/mutex.h: Likewise.
* config/linux/lock.c: Likewise.
* config/linux/mips/futex.h: Likewise.
* config/linux/mutex.c: Likewise.
* config/linux/mutex.h: Likewise.
* config/linux/powerpc/futex.h: Likewise.
* config/linux/proc.c: Likewise.
* config/linux/ptrlock.c: Likewise.
* config/linux/ptrlock.h: Likewise.
* config/linux/s390/futex.h: Likewise.
* config/linux/sem.c: Likewise.
* config/linux/sem.h: Likewise.
* config/linux/sparc/futex.h: Likewise.
* config/linux/wait.h: Likewise.
* config/linux/x86/futex.h: Likewise.
* config/mingw32/proc.c: Likewise.
* config/mingw32/time.c: Likewise.
* config/posix/affinity.c: Likewise.
* config/posix/bar.c: Likewise.
* config/posix/bar.h: Likewise.
* config/posix/lock.c: Likewise.
* config/posix/mutex.h: Likewise.
* config/posix/proc.c: Likewise.
* config/posix/ptrlock.h: Likewise.
* config/posix/sem.c: Likewise.
* config/posix/sem.h: Likewise.
* config/posix/time.c: Likewise.
* config/posix95/lock.c: Likewise.
* critical.c: Likewise.
* env.c: Likewise.
* error.c: Likewise.
* fortran.c: Likewise.
* iter_ull.c: Likewise.
* libgomp.h: Likewise.
* libgomp_f.h.in: Likewise.
* libgomp_g.h: Likewise.
* loop.c: Likewise.
* loop_ull.c: Likewise.
* omp.h.in: Likewise.
* omp_lib.f90.in: Likewise.
* omp_lib.h.in: Likewise.
* ordered.c: Likewise.
* parallel.c: Likewise.
* sections.c: Likewise.
* single.c: Likewise.
* task.c: Likewise.
* team.c: Likewise.
* work.c: Likewise.
2009-04-09 Jakub Jelinek <jakub@redhat.com>
* testsuite/config/default.exp: Change copyright header to refer to
version 3 of the GNU General Public License and to point readers
at the COPYING3 file and the FSF's license web page.
2009-04-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/39573
* libgomp.c++/pr39573.C: New test.
2009-04-01 Jakub Jelinek <jakub@redhat.com>
PR other/39591
* testsuite/libgomp.c/pr39591-1.c: New test.
* testsuite/libgomp.c/pr39591-2.c: New test.
* testsuite/libgomp.c/pr39591-3.c: New test.
2009-03-25 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
* testsuite/libgomp.c/atomic-6.c: Ditto.
2009-03-23 Jakub Jelinek <jakub@redhat.com>
PR c/39495
* testsuite/libgomp.c/loop-12.c: New test.
* testsuite/libgomp.c/loop-11.c: New test.
* testsuite/libgomp.c++/loop-11.C: New test.
* testsuite/libgomp.c++/loop-12.C: New test.
* testsuite/libgomp.c++/for-8.C: New test.
2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2009-02-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/39154
* testsuite/libgomp.c/pr39154.c: New test.
2009-01-30 Ian Lance Taylor <iant@google.com>
* acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set
libgomp_ld_is_gold. Get gold version number.
(LIBGOMP_ENABLE_SYMVERS): Gold always support symbol versioning.
* configure: Rebuild.
2009-01-19 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
* testsuite/lib/libgomp.exp: Add -B option for targets that
use libgfortran.a%s in their specs.
2009-01-07 Jakub Jelinek <jakub@redhat.com>
PR libgomp/38086
* acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
* libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
HAVE_AS_SYMVER_DIRECTIVE is not defined.
* configure: Regenerated.
* config.h.in: Likewise.
2008-12-28 Jakub Jelinek <jakub@redhat.com>
PR c++/38650
* testsuite/libgomp.c/pr38650.c: New test.
* testsuite/libgomp.c++/pr38650.C: New test.
2008-12-27 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/collapse-1.c (main): Add private(k) clause.
2008-12-26 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2008-12-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/36802
* testsuite/libgomp.c/pr36802-1.c: New test.
* testsuite/libgomp.c/pr36802-2.c: New test.
* testsuite/libgomp.c/pr36802-3.c: New test.
2008-12-01 Janis Johnson <janis187@us.ibm.com>
PR libgomp/38270
* config/linux/powerpc/mutex.h: New.
2008-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/38257
* testsuite/libgomp.c++/for-7.C: New test.
PR c++/38348
* testsuite/libgomp.c++/for-6.C: New test.
2008-11-26 Janis Johnson <janis187@us.ibm.com>
PR testsuite/28870
* testsuite/lib/libgomp.exp: Include new timeout library files.
(libgomp_target_compile): Set timeout value from new proc.
2008-11-13 Steve Ellcey <sje@cup.hp.com>
PR libgomp/37938
* config/linux/ia64/mutex.h: New.
2008-11-04 Tobias Burnus <burnus@net-b.de>
PR libgomp/37935
* libgomp.texi (Runtime library routines, environment variables):
Update for OpenMP version 3.0.
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
Steve Ellcey <sje@cup.hp.com>
* configure: Regenerate for new libtool.
* Makefile.in: Ditto.
* testsuite/Makefile.in: Ditto.
2008-09-19 Jakub Jelinek <jakub@redhat.com>
Andreas Tobler <a.tobler@schweiz.org>
* config/bsd/proc.c: New file.
* configure.tgt (*-*-darwin*): Use config_path "bsd posix".
* configure.ac: Check for header <sys/sysctl.h>
* configure: Regenerate.
* config.h.in: Likewise.
2008-09-05 Janis Johnson <janis187@us.ibm.com>
* testsuite/ligbomp.c/c.exp: Unset lang_test_file only if it exists.
2008-08-31 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
* Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
2008-08-21 17:45:37 +02:00
2008-08-21 Nathan Froyd <froydnj@codesourcery.com>
* testsuite/lib/libgomp.exp (libgomp_init): Only set things that
depend on blddir if blddir exists.
(libgomp_target_compile): Likewise.
* testsuite/libgomp.c++/c++.exp: Likewise.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libgomp.texi: Update to GFDL 1.2. Update copyright years.
Do not list GPL as Invariant Section.
2008-07-28 Ilie Garbacea <ilie@mips.com>
Chao-ying Fu <fu@mips.com>
* configure.tgt: Enable futex for MIPS.
* config/linux/mips/futex.h: New file.
2008-07-16 Jakub Jelinek <jakub@redhat.com>
* team.c (gomp_team_end): Free team immediately if it has
just one thread.
2008-07-08 David Edelsohn <edelsohn@gnu.org>
* testsuite/libgomp.c++/c++.exp: Append multilib library path.
* testsuite/libgomp.fortran/fortran.exp: Same.
* testsuite/libgomp.c/c.exp: Same.
* testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
directory to library path first.
2008-06-29 Krister Walfridsson <krister.walfridsson@gmail.com>
* env.c (parse_stacksize): Add cast to avoid warning.
(parse_spincount): Likewise.
re PR debug/36617 (Debug info for OpenMP code is almost non-existent) PR debug/36617 * tree-cfg.c (struct move_stmt_d): Replace block field with orig_block and new_block fields. (move_stmt_r): Only set TREE_BLOCK to p->new_block if if it used to be NULL, p->orig_block or if p->orig_block is NULL. (move_block_to_fn): Replace vars_map and new_label_map arguments with struct move_stmt_d pointer. (replace_block_vars_by_duplicates): New function. (move_sese_region_to_fn): Add ORIG_BLOCK argument. Adjust move_block_to_fn caller. If ORIG_BLOCK is non-NULL, move over all subblocks of ORIG_BLOCK to the new function. Call replace_block_vars_by_duplicates. * tree-flow.h (move_sese_region_to_fn): Adjust prototype. * omp-low.c (expand_omp_taskreg): Set TREE_USED on DECL_INITIAL BLOCK of the new function. Adjust move_sese_region_to_fn caller. Prune vars with original DECL_CONTEXT from child_cfun->local_decls. (expand_omp): Temporarily set input_location to the location of region's controlling stmt. (lower_omp_sections, lower_omp_for): Add a BLOCK into outermost BIND_EXPR, push ctx->block_vars and gimplification vars into the BIND_EXPR and its block's BLOCK_VARS instead of directly into dest function. (lower_omp_single): Set TREE_USED on the BIND_EXPR's BLOCK if there are any BLOCK_VARS. (lower_omp_taskreg): Set BLOCK on a BIND_EXPR containing the OMP_PARALLEL or OMP_TASK stmt. (lower_omp): Save and restore input_location around the lower_omp_1 call. * testsuite/libgomp.c/debug-1.c: New test. From-SVN: r137198
2008-06-27 21:42:32 +02:00
2008-06-27 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/loop-10.c: New test.
* libgomp.c/loop-3.c (main): Add lastprivate clause.
* libgomp.c++/loop-6.C (main): Likewise.
re PR debug/36617 (Debug info for OpenMP code is almost non-existent) PR debug/36617 * tree-cfg.c (struct move_stmt_d): Replace block field with orig_block and new_block fields. (move_stmt_r): Only set TREE_BLOCK to p->new_block if if it used to be NULL, p->orig_block or if p->orig_block is NULL. (move_block_to_fn): Replace vars_map and new_label_map arguments with struct move_stmt_d pointer. (replace_block_vars_by_duplicates): New function. (move_sese_region_to_fn): Add ORIG_BLOCK argument. Adjust move_block_to_fn caller. If ORIG_BLOCK is non-NULL, move over all subblocks of ORIG_BLOCK to the new function. Call replace_block_vars_by_duplicates. * tree-flow.h (move_sese_region_to_fn): Adjust prototype. * omp-low.c (expand_omp_taskreg): Set TREE_USED on DECL_INITIAL BLOCK of the new function. Adjust move_sese_region_to_fn caller. Prune vars with original DECL_CONTEXT from child_cfun->local_decls. (expand_omp): Temporarily set input_location to the location of region's controlling stmt. (lower_omp_sections, lower_omp_for): Add a BLOCK into outermost BIND_EXPR, push ctx->block_vars and gimplification vars into the BIND_EXPR and its block's BLOCK_VARS instead of directly into dest function. (lower_omp_single): Set TREE_USED on the BIND_EXPR's BLOCK if there are any BLOCK_VARS. (lower_omp_taskreg): Set BLOCK on a BIND_EXPR containing the OMP_PARALLEL or OMP_TASK stmt. (lower_omp): Save and restore input_location around the lower_omp_1 call. * testsuite/libgomp.c/debug-1.c: New test. From-SVN: r137198
2008-06-27 21:42:32 +02:00
PR debug/36617
* testsuite/libgomp.c/debug-1.c: New test.
2008-06-19 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/nqueens-1.c: New test.
PR c++/36523
* testsuite/libgomp.c++/task-7.C: New function.
Makefile.tpl ($(srcdir)/configure): Update dependencies. * Makefile.tpl ($(srcdir)/configure): Update dependencies. * Makefile.in: Regenerate. * configure: Regenerate. config/ * override.m4: Use m4_version_prereq throughout. (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Backport from git Autoconf: output pwd along with fatal errors, so the right config.log file is hinted at more prominently. (PARSE_ARGS): Push setting of ac_pwd in this diversion. (_GCC_AUTOCONF_VERSION): New, define to 2.59 if not defined. (_GCC_AUTOCONF_VERSION_CHECK): New macro, require use of Autoconf version _GCC_AUTOCONF_VERSION throughout the tree. (m4_wrap): New override, fix for Posix semantics of m4wrap. libgcc/ * configure.ac: sinclude override.m4. * configure: Regenerate. gnattools/ * configure.ac: move sinclude of acx.m4 before AC_INIT, also sinclude override.m4. * Makefile.in ($(srcdir)/configure): Update dependencies. * configure: Regenerate. libada/ * configure.ac: move sinclude of acx.m4 before AC_INIT, also sinclude override.m4. * Makefile.in ($(srcdir)/configure): Update dependencies. * configure: Regenerate. intl/ * configure: Regenerate. libiberty/ * configure: Regenerate. boehm-gc/ * Makefile.in: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * include/gc_config.h.in: Regenerate. fixincludes/ * configure: Regenerate. gcc/ * configure: Regenerate. libcpp/ * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies. * configure: Regenerate. libdecnumber/ * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies. * configure: Regenerate. libffi/ * configure: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgfortran/ * configure: Regenerate. libgomp/ * configure: Regenerate. libjava/classpath/ * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * doc/api/Makefile.in: Regenerate. * examples/Makefile.in: Regenerate. * external/Makefile.in: Regenerate. * external/jsr166/Makefile.in: Regenerate. * external/relaxngDatatype/Makefile.in: Regenerate. * external/sax/Makefile.in: Regenerate. * external/w3c_dom/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * lib/Makefile.in: Regenerate. * native/Makefile.in: Regenerate. * native/fdlibm/Makefile.in: Regenerate. * native/jawt/Makefile.in: Regenerate. * native/jni/Makefile.in: Regenerate. * native/jni/classpath/Makefile.in: Regenerate. * native/jni/gconf-peer/Makefile.in: Regenerate. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * native/jni/gtk-peer/Makefile.in: Regenerate. * native/jni/java-io/Makefile.in: Regenerate. * native/jni/java-lang/Makefile.in: Regenerate. * native/jni/java-net/Makefile.in: Regenerate. * native/jni/java-nio/Makefile.in: Regenerate. * native/jni/java-util/Makefile.in: Regenerate. * native/jni/midi-alsa/Makefile.in: Regenerate. * native/jni/midi-dssi/Makefile.in: Regenerate. * native/jni/native-lib/Makefile.in: Regenerate. * native/jni/qt-peer/Makefile.in: Regenerate. * native/jni/xmlj/Makefile.in: Regenerate. * native/plugin/Makefile.in: Regenerate. * resource/Makefile.in: Regenerate. * scripts/Makefile.in: Regenerate. * tools/Makefile.in: Regenerate. libjava/ * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/libltdl/ * Makefile.in: Regenerate. * configure: Regenerate. libmudflap/ * Makefile.in: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/ * configure: Regenerate. libssp/ * Makefile.in: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. libstdc++-v3/ * configure: Regenerate. zlib/ * Makefile.in: Regenerate. * configure: Regenerate. From-SVN: r136876
2008-06-18 01:13:35 +02:00
2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2008-06-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* env.c (initialize_env): Always initialize gomp_remaining_threads_lock
mutex when HAVE_SYNC_BUILTINS isn't defined.
2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libgomp.texi (omp_test_lock): Fix typo.
2008-06-12 Tobias Burnus <burnus@net-b.de>
* omp_lib.f90.in: Add "implicit none".
2008-06-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/36506
* testsuite/libgomp.c/reduction-5.c: New test.
2008-06-11 Jakub Jelinek <jakub@redhat.com>
* libgomp.h (struct gomp_task): Add in_tied_task field.
* task.c (gomp_init_task): Initialize it.
(GOMP_task): Likewise. Call gomp_team_barrier_set_task_pending
unconditionally. Don't call gomp_team_barrier_wake if
current task is implicit or if(0) from implicit and number of
running tasks is equal to nthreads - 1.
PR libgomp/36471
* omp_lib.f90.in (omp_get_ancestor_thread_num_8,
omp_get_team_size_8): Fix pastos.
PR libgomp/36469
* configure.ac: Add AC_CHECK_FUNCS (strtoull).
* configure: Regenerated.
* config.h.in: Regenerated.
* env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
defined.
2008-06-06 Andreas Tobler <a.tobler@schweiz.org>
PR bootstrap/36452
* loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
(GOMP_loop_ull_dynamic_start): Likewise.
(GOMP_loop_ull_guided_start): Likewise.
(GOMP_loop_ull_ordered_static_start): Likewise.
(GOMP_loop_ull_ordered_dynamic_start): Likewise.
(GOMP_loop_ull_ordered_guided_start): Likewise.
c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. * langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause. Add omp_private_outer_ref hook, add another argument to omp_clause_default_ctor hook. * langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define. (LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define. (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to hook_tree_tree_tree_tree_null. (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and LANG_HOOKS_OMP_PRIVATE_OUTER_REF. * hooks.c (hook_tree_tree_tree_tree_null): New function. * hooks.h (hook_tree_tree_tree_tree_null): New prototype. * tree.def (OMP_TASK): New tree code. * tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN, OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT, OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES, OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY, OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG, OMP_CLAUSE_COLLAPSE_EXPR): Define. (enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. (OMP_DIRECTIVE_P): Add OMP_TASK. (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes. (OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind. * tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED entries. (omp_clause_num_ops): Likewise. Increase OMP_CLAUSE_LASTPRIVATE num_ops to 2. (walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Walk OMP_CLAUSE_LASTPRIVATE_STMT. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. (dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops. * c-omp.c (c_finish_omp_for): Allow pointer iterators. Remove warning about unsigned iterators. Change decl/init/cond/incr arguments to TREE_VECs, check arguments for all collapsed loops. (c_finish_omp_taskwait): New function. (c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to ws_clauses. * c-parser.c (c_parser_omp_for_loop): Parse collapsed loops. Call default_function_array_conversion on init. Add par_clauses argument. If decl is present in parallel's lastprivate clause, change it to shared and add lastprivate clause for decl to OMP_FOR_CLAUSES. Add clauses argument, on success set OMP_FOR_CLAUSES to it. Look up collapse count in clauses. (c_parser_omp_for, c_parser_omp_parallel): Adjust c_parser_omp_for_loop callers. (OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE. (c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT. (c_parser_omp_clause_name): Handle collapse and untied clauses. (c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New functions. (c_parser_omp_clause_schedule): Handle schedule(auto). Include correct location in the error message. (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE and PRAGMA_OMP_CLAUSE_UNTIED. (OMP_TASK_CLAUSE_MASK): Define. (c_parser_omp_task, c_parser_omp_taskwait): New functions. (c_parser_omp_construct): Handle PRAGMA_OMP_TASK. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in OMP_CLAUSE_DECL. (conver_nonlocal_reference, convert_local_reference, convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL. Use OMP_TASKREG_* macros rather than OMP_PARALLEL_*. (walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes. * tree-gimple.c (is_gimple_stmt): Handle OMP_TASK. * c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes. * c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New. (PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New. * c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions. (c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. * c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas. * c-common.h (c_finish_omp_taskwait): New prototype. * gimple-low.c (lower_stmt): Handle OMP_TASK. * tree-parloops.c (create_parallel_loop): Create 1 entry vectors for OMP_FOR_{INIT,COND,INCR}. * tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers. (make_edges): Handle OMP_TASK. * tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. * tree-inline.c (estimate_num_insns_1): Handle OMP_TASK. * builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR, BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New. * omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT, BUILT_IN_GOMP_LOOP_ULL_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins. * gimplify.c (gimplify_omp_for): Allow pointer type for decl, handle POINTER_PLUS_EXPR. If loop counter has been replaced and original iterator is present in lastprivate clause or if collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. (gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK. (enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF. (omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed, if it is set, lookup var in outer contexts too. Handle OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. Handle vars that are supposed to be implicitly determined firstprivate for task regions. (gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed, if it is set, lookup var in outer contexts too. Set OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set. Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Take region_type as last argument instead of in_parallel and in_combined_parallel. (gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare): Adjust callers. (gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set. Call omp_finish_clause langhook. (new_omp_context): Set default_kind to OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions. (omp_region_type): New enum. (struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel fields, add region_type. (new_omp_context): Take region_type as argument instead of is_parallel and is_combined_parallel. (gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable, omp_is_private, omp_check_private): Adjust ctx->is_parallel and ctx->is_combined_parallel checks. (gimplify_omp_task): New function. (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. * omp-low.c (extract_omp_for_data): Use schedule(static) for schedule(auto). Handle pointer and unsigned iterators. Compute fd->iter_type. Handle POINTER_PLUS_EXPR increments. Add loops argument. Extract data for collapsed OMP_FOR loops. (expand_parallel_call): Assert sched_kind isn't auto, map runtime schedule to index 3. (struct omp_for_data_loop): New type. (struct omp_for_data): Remove v, n1, n2, step, cond_code fields. Add loop, loops, collapse and iter_type fields. (workshare_safe_to_combine_p): Disallow combined for if iter_type is unsigned long long. Don't combine collapse > 1 loops unless all bounds and steps are constant. Adjust extract_omp_for_data caller. (expand_omp_for_generic): Handle pointer, unsigned and long long iterators. Handle collapsed OMP_FOR loops. Adjust for struct omp_for_data changes. If libgomp function doesn't return boolean_type_node, add comparison of the return value with 0. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle pointer, unsigned and long long iterators. Adjust for struct omp_for_data changes. (expand_omp_for): Assert sched_kind isn't auto, map runtime schedule to index 3. Use GOMP_loop_ull*{start,next} if iter_type is unsigned long long. Allocate loops array, pass it to extract_omp_for_data. For collapse > 1 loops use always expand_omp_for_generic. (omp_context): Add sfield_map and srecord_type fields. (is_task_ctx, lookup_sfield): New functions. (use_pointer_for_field): Use is_task_ctx helper. Change first argument's type from const_tree to tree. Clarify comment. In OMP_TASK disallow copy-in/out sharing. (build_sender_ref): Call lookup_sfield instead of lookup_field. (install_var_field): Add mask argument. Populate both record_type and srecord_type if needed. (delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN in srecord_type. (fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT} and DECL_FIELD_OFFSET. (scan_sharing_clauses): Adjust install_var_field callers. For firstprivate clauses on explicit tasks allocate the var by value in record_type unconditionally, rather than by reference. Handle OMP_CLAUSE_PRIVATE_OUTER_REF. Scan OMP_CLAUSE_LASTPRIVATE_STMT. Use is_taskreg_ctx instead of is_parallel_ctx. Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. (create_omp_child_function_name): Add task_copy argument, use *_omp_cpyfn* names if it is true. (create_omp_child_function): Add task_copy argument, if true create *_omp_cpyfn* helper function. (scan_omp_parallel): Adjust create_omp_child_function callers. Rename parallel_nesting_level to taskreg_nesting_level. (scan_omp_task): New function. (lower_rec_input_clauses): Don't run constructors for firstprivate explicit task vars which are initialized by *_omp_cpyfn*. Pass outer var ref to omp_clause_default_ctor hook if OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE. Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in OMP_CLAUSE_REDUCTION_INIT. (lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to avoid duplicate setting of fields. Handle OMP_CLAUSE_PRIVATE_OUTER_REF. (lower_send_shared_vars): Use srecord_type if non-NULL. Don't copy-out if TREE_READONLY, only copy-in. (expand_task_copyfn): New function. (expand_task_call): New function. (struct omp_taskcopy_context): New type. (task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn): New functions. (lower_omp_parallel): Rename to... (lower_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed. Call create_task_copyfn if srecord_type is needed. Adjust sender_decl type. (task_shared_vars): New variable. (check_omp_nesting_restrictions): Warn if work-sharing, barrier, master or ordered region is closely nested inside OMP_TASK. Add warnings for barrier if closely nested inside of work-sharing, ordered, or master region. (scan_omp_1): Call check_omp_nesting_restrictions even for GOMP_barrier calls. Rename parallel_nesting_level to taskreg_nesting_level. Handle OMP_TASK. (lower_lastprivate_clauses): Even if some lastprivate is found on a work-sharing construct, continue looking for them on parent parallel construct. (lower_omp_for_lastprivate): Add lastprivate clauses to the beginning of dlist rather than end. Adjust for struct omp_for_data changes. (lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY, not after it. Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data caller. (get_ws_args_for): Adjust extract_omp_for_data caller. (scan_omp_for): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. (lower_omp_single_simple): If libgomp function doesn't return boolean_type_node, add comparison of the return value with 0. (diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. Handle OMP_TASK. (parallel_nesting_level): Rename to... (taskreg_nesting_level): ... this. (is_taskreg_ctx): New function. (build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead of is_parallel_ctx. (execute_lower_omp): Rename parallel_nesting_level to taskreg_nesting_level. (expand_omp_parallel): Rename to... (expand_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed. Call omp_task_call for OMP_TASK regions. (expand_omp): Adjust caller, handle OMP_TASK. (lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK. * bitmap.c (bitmap_default_obstack_depth): New variable. (bitmap_obstack_initialize, bitmap_obstack_release): Do nothing if argument is NULL and bitmap_default_obstack is already initialized. * ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release at the end. * matrix-reorg.c (matrix_reorg): Likewise. cp/ * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info, dependent_omp_for_p, begin_omp_task, finish_omp_task, finish_omp_taskwait): New prototypes. (cxx_omp_clause_default_ctor): Add outer argument. (finish_omp_for): Add new clauses argument. * cp-gimplify.c (cxx_omp_finish_clause): New function. (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten. (cxx_omp_clause_default_ctor): Add outer argument. (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT. * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define. * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops. Add par_clauses argument. If decl is present in parallel's lastprivate clause, change that clause to shared and add a lastprivate clause for decl to OMP_FOR_CLAUSES. Fix wording of error messages. Adjust finish_omp_for caller. Add clauses argument. Parse loops with random access iterators. (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New functions. (cp_parser_omp_for, cp_parser_omp_parallel): Adjust cp_parser_omp_for_loop callers. (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper functions. (cp_parser_omp_clause_name): Handle collapse and untied clauses. (cp_parser_omp_clause_schedule): Handle auto schedule. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE and PRAGMA_OMP_CLAUSE_UNTIED. (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE. (OMP_TASK_CLAUSE_MASK): Define. (cp_parser_omp_task, cp_parser_omp_taskwait): New functions. (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK. (cp_parser_pragma): Handle PRAGMA_OMP_TASK and PRAGMA_OMP_TASKWAIT. * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT. (tsubst_omp_for_iterator): New function. (dependent_omp_for_p): New function. (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR loops. Adjust finish_omp_for caller. Handle loops with random access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes. (tsubst_expr): Handle OMP_TASK. * semantics.c (cxx_omp_create_clause_info): New function. (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and OMP_CLAUSE_COLLAPSE. (cxx_omp_predetermined_sharing): Removed. * semantics.c (finish_omp_for): Allow pointer iterators. Use handle_omp_for_class_iterator and dependent_omp_for_p. Handle collapsed for loops. Adjust c_finish_omp_for caller. Add new clauses argument. Fix check for type dependent cond or incr. Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of fold_convert to convert incr amount to difference_type. Only fold if not in template. If decl is mentioned in lastprivate clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes. (finish_omp_threadprivate): Allow static class members of the current class. (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task, finish_omp_taskwait): New functions. * parser.c (cp_parser_binary_expression): Add prec argument. (cp_parser_assignment_expression): Adjust caller. * cp-tree.h (outer_curly_brace_block): New prototype. * decl.c (outer_curly_brace_block): No longer static. fortran/ * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs. * parse.c (next_free): Allow tab after !$omp. (decode_omp_directive): Handle !$omp task, !$omp taskwait and !$omp end task. (case_executable): Add ST_OMP_TASKWAIT. (case_exec_markers): Add ST_OMP_TASK. (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT. (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK. * gfortran.h (gfc_find_sym_in_expr): New prototype. (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT. (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind, OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and untied fields. (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR, LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define. * trans.h (gfc_omp_clause_default_ctor): Add another argument. (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes. * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG, BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New. (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather than boolean_type_node. * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK, EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses. (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * st.c (gfc_free_statement): Likewise. * resolve.c (gfc_resolve_blocks, resolve_code): Likewise. (find_sym_in_expr): Rename to... (gfc_find_sym_in_expr): ... this. No longer static. (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller. * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New prototypes. * openmp.c (resolve_omp_clauses): Allow allocatable arrays in firstprivate, lastprivate, reduction, copyprivate and copyin clauses. (omp_current_do_code): Made static. (omp_current_do_collapse): New variable. (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse, clear omp_current_do_code and omp_current_do_collapse on return. (gfc_resolve_do_iterator): Handle collapsed do loops. (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops. (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define. (gfc_match_omp_clauses): Handle default (firstprivate), schedule (auto), untied and collapse (n) clauses. (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE. (OMP_TASK_CLAUSES): Define. (gfc_match_omp_task, gfc_match_omp_taskwait): New functions. * trans-openmp.c (gfc_omp_private_outer_ref): New function. (gfc_omp_clause_default_ctor): Add outer argument. For allocatable arrays allocate them with the bounds of the outer var if outer var is allocated. (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor): New functions. (gfc_trans_omp_array_reduction): If decl is allocatable array, allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT and deallocate it in OMP_CLAUSE_REDUCTION_MERGE. (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for assumed-size arrays. (gfc_trans_omp_do): Add par_clauses argument. If dovar is present in lastprivate clause and do loop isn't simple, set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in parallel's lastprivate clause, change it to shared and add lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops. (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers. (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to OMP_FOR from OMP_PARALLEL. (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses. (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. gcc/testsuite/ * gcc.dg/gomp/collapse-1.c: New test. * gcc.dg/gomp/nesting-1.c: New test. * g++.dg/gomp/task-1.C: New test. * g++.dg/gomp/predetermined-1.C: New test. * g++.dg/gomp/tls-4.C: New test. * gfortran.dg/gomp/collapse1.f90: New test. * gfortran.dg/gomp/sharing-3.f90: New test. * gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning. * g++.dg/gomp/pr27499.C (foo): Likewise. * g++.dg/gomp/for-16.C (foo): Likewise. * g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition. * g++.dg/gomp/pr34607.C: Adjust dg-error location. * g++.dg/gomp/for-16.C (foo): Add a new dg-error. * gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning. * gcc.dg/gomp/appendix-a/a.35.6.c: Likewise. * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise. * gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test. * gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error about allocatable array. * gfortran.dg/gomp/reduction1.f90: Likewise. libgomp/ * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE. Substitute also OMP_*LOCK_25*. * configure: Regenerated. * config.h.in: Regenerated. * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c, ptrlock.c and task.c. * Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * task.c: New file. * loop_ull.c: New file. * iter_ull.c: New file. * libgomp.h: Include ptrlock.h. (enum gomp_task_kind): New type. (struct gomp_team): Add task_lock, task_queue, task_count, task_running_count, single_count fields. Add work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS. Remove work_share_lock, generation_mask, oldest_live_gen, num_live_gen and init_work_shares fields, add work work_share_list_alloc, work_share_list_free and work_share_chunk fields. Change work_shares from pointer to pointers into an array. Change ordered_release field into gomp_sem_t ** from flexible array member. Add implicit_task and initial_work_shares fields. Move close to the end of the struct. (struct gomp_team_state): Add single_count, last_work_share, active_level and level fields, remove work_share_generation. (gomp_barrier_handle_tasks): New prototype. (gomp_finish_task): New inline function. (struct gomp_work_share): Move chunk_size, end, incr into transparent union/struct, add chunk_size_ull, end_ll, incr_ll and next_ll fields. Reshuffle fields. Add next_alloc, next_ws, next_free and inline_ordered_team_ids fields, change ordered_team_ids into pointer from flexible array member. Add mode field. Put lock and next into a different cache line from most of the write-once fields. (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked, gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next, gomp_iter_ull_guided_next): New prototypes. (gomp_new_icv): New prototype. (struct gomp_thread): Add thread_pool and task fields. (struct gomp_thread_pool): New type. (gomp_new_team): New prototype. (gomp_team_start): Change type of last argument. (gomp_new_work_share): Removed. (gomp_init_work_share, gomp_fini_work_share): New prototypes. (gomp_work_share_init_done): New static inline. (gomp_throttled_spin_count_var, gomp_available_cpus, gomp_managed_threads): New extern decls. (gomp_init_task): New prototype. (gomp_spin_count_var): New extern var decl. (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility or no alias support, or if not PIC. (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30, gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30, gomp_destroy_nest_lock_30, gomp_set_nest_lock_30, gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25, gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25, gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25, gomp_set_nest_lock_25, gomp_unset_nest_lock_25, gomp_test_nest_lock_25): New prototypes. (omp_lock_symver, strong_alias): Define. (gomp_remaining_threads_count, gomp_remaining_threads_lock): New decls. (gomp_end_task): New. (struct gomp_task_icv, gomp_global_icv): New. (gomp_thread_limit_var, gomp_max_active_levels_var): New. (struct gomp_task): New. (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var, gomp_run_sched_var, gomp_run_sched_chunk): Remove. (gomp_icv): New. (gomp_schedule_type): Reorder enum to match omp_sched_t. * team.c (struct gomp_thread_start_data): Add thread_pool and task fields. (gomp_thread_start): Add gomp_team_barrier_wait call. For non-nested case remove clearing of docked thread thr fields. Use pool fields instead of global gomp_* variables. Use gomp_barrier_wait_last when needed. Initialize ts.active_level. Create tasks for each member thread. (free_team): Only destroy team barrier, task_lock here and free it. (gomp_free_thread): Free last_team if non-NULL. (gomp_team_end): Call gomp_team_barrier_wait instead of gomp_barrier_wait. For nested case call one extra gomp_barrier_wait. Move here some destruction from free_team. Call free_team on pool->last_team if any, rather than freeing current team. Destroy work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS. (gomp_new_icv): New function. (gomp_threads, gomp_threads_size, gomp_threads_used, gomp_threads_dock): Removed. (gomp_thread_destructor): New variable. (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New functions. (gomp_team_start): Create new pool if current thread doesn't have one. Use pool fields instead of global gomp_* variables. Initialize thread_pool field for new threads. Clear single_count. Change last argument from ws to team, don't create new team, set ts.work_share to &team->work_shares[0] and clear ts.last_work_share. Don't clear ts.work_share_generation. If number of threads changed, adjust atomically gomp_managed_threads. Use gomp_init_task instead of gomp_new_task, set thr->task to the corresponding implicit_task array entry. Create tasks for each member thread. Initialize ts.level. (initialize_team): Call pthread_key_create on gomp_thread_destructor. (team_destructor): New function. (new_team): Removed. (gomp_new_team): New function. (free_team): Free gomp_work_share blocks chained through next_alloc, instead of freeing work_shares and destroying work_share_lock. (gomp_team_end): Call gomp_fini_work_share. If number of threads changed, adjust atomically gomp_managed_threads. Use gomp_end_task. * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead of gomp_barrier_wait. * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait instead of gomp_barrier_wait. Call gomp_work_share_init_done if gomp_work_share_start returned true. Don't unlock ws->lock. (GOMP_single_copy_end): Call gomp_team_barrier_wait instead of gomp_barrier_wait. (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS. Call gomp_work_share_init_done if gomp_work_share_start returned true. Don't unlock ws->lock. * work.c: Include stddef.h. (free_work_share): Use work_share_list_free_lock instead of atomic chaining ifndef HAVE_SYNC_BUILTINS. Add team argument. Call gomp_fini_work_share and then either free ws if orphaned, or put it into work_share_list_free list of the current team. (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New functions. (gomp_work_share_start, gomp_work_share_end, gomp_work_share_end_nowait): Rewritten. * omp_lib.f90.in Change some tabs to spaces to prevent warnings. (openmp_version): Set to 200805. (omp_sched_kind, omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): New parameters. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New interfaces. * omp_lib.h.in (openmp_version): Set to 200805. (omp_sched_kind, omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): New parameters. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New externals. * loop.c: Include limits.h. (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle GFS_AUTO. (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start): Likewise. Use gomp_icv. (gomp_loop_static_start, gomp_loop_dynamic_start): Clear ts.static_trip here. (gomp_loop_static_start, gomp_loop_ordered_static_start): Call gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock. (gomp_loop_dynamic_start, gomp_loop_guided_start): Call gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS, don't unlock ws->lock, otherwise lock it. (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call gomp_work_share_init_done after gomp_loop_init. Lock ws->lock. (gomp_parallel_loop_start): Call gomp_new_team instead of gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0]. Adjust gomp_team_start caller. Pass 0 as second argument to gomp_resolve_num_threads. (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr. If adding ws->chunk_size nthreads + 1 times after end won't overflow, set ws->mode to 1. * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start, GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start, GOMP_loop_ull_ordered_static_start, GOMP_loop_ull_ordered_dynamic_start, GOMP_loop_ull_ordered_guided_start, GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next, GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next, GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next, GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next, GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New prototypes. * libgomp.map: Export lock routines also @@OMP_2.0. (GOMP_loop_ordered_dynamic_first, GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first, GOMP_loop_ordered_static_first): Remove. (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start, GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start, GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_dynamic_start, GOMP_loop_ull_ordered_guided_next, GOMP_loop_ull_ordered_guided_start, GOMP_loop_ull_ordered_runtime_next, GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_ordered_static_next, GOMP_loop_ull_ordered_static_start, GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start, GOMP_loop_ull_static_next, GOMP_loop_ull_static_start, GOMP_task, GOMP_taskwait): Export @@GOMP_2.0. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level, omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_, omp_set_max_active_levels_, omp_set_max_active_levels_8_, omp_get_max_active_levels_, omp_get_level_, omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_, omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_): New exports @@OMP_3.0. * omp.h.in (omp_sched_t): New type. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New prototypes. * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var, gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var, gomp_thread_limit_var, gomp_remaining_threads_count, gomp_remaining_threads_lock): New variables. (parse_spincount): New function. (initialize_env): Call gomp_init_num_threads unconditionally. Initialize gomp_available_cpus. Call parse_spincount, initialize gomp_{,throttled_}spin_count_var depending on presence and value of OMP_WAIT_POLICY and GOMP_SPINCOUNT env vars. Handle GOMP_BLOCKTIME env var. Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS, OMP_THREAD_LIMIT, OMP_STACKSIZE env vars. Handle unit specification for GOMP_STACKSIZE. Initialize gomp_remaining_threads_count and gomp_remaining_threads_lock if needed. Use gomp_global_icv. (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var, gomp_run_sched_var, gomp_run_sched_chunk): Remove. (gomp_global_icv): New. (parse_schedule): Use it. Parse "auto". (omp_set_num_threads): Use gomp_icv. (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested): Likewise. (omp_get_max_threads): Move from parallel.c. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels): New functions, add ialias. (parse_stacksize, parse_wait_policy): New functions. * fortran.c: Rewrite lock wrappers, if symbol versioning provide both wrappers for compatibility and new locks. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New ialias_redirect. (omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_, omp_set_max_active_levels_, omp_set_max_active_levels_8_, omp_get_max_active_levels_, omp_get_level_, omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_, omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_): New functions. * parallel.c: Include limits.h. (gomp_resolve_num_threads): Add count argument. Rewritten. (GOMP_parallel_start): Call gomp_new_team and pass that as last argument to gomp_team_start. Pass 0 as second argument to gomp_resolve_num_threads. (GOMP_parallel_end): Decrease gomp_remaining_threads_count if gomp_thread_limit_var != ULONG_MAX. (omp_in_parallel): Implement using ts.active_level. (omp_get_max_threads): Move to env.c. (omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New functions, add ialias. * sections.c (GOMP_sections_start): Call gomp_work_share_init_done after gomp_sections_init. If HAVE_SYNC_BUILTINS, call gomp_iter_dynamic_next instead of the _locked variant and don't take lock around it, otherwise acquire it before calling gomp_iter_dynamic_next_locked. (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call gomp_iter_dynamic_next instead of the _locked variant and don't take lock around it. (GOMP_parallel_sections_start): Call gomp_new_team instead of gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0]. Adjust gomp_team_start caller. Pass count as second argument to gomp_resolve_num_threads, don't adjust num_threads after the call. Use gomp_icv. * iter.c (gomp_iter_dynamic_next_locked): Don't multiply ws->chunk_size by incr. (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient code. * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New types. (omp_lock_25_arg, omp_nest_lock_25_arg): New macros. (omp_check_defines): Check even the compat defines. * config/linux/ptrlock.c: New file. * config/linux/ptrlock.h: New file. * config/linux/wait.h: New file. * config/posix/ptrlock.c: New file. * config/posix/ptrlock.h: New file. * config/linux/bar.h (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes. (gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): New inlines. (gomp_barrier_t): Rewritten. (gomp_barrier_state_t): New typedef. (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy, gomp_barrier_wait_start): Rewritten. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_barrier_last_thread, gomp_barrier_wait_last): New static inlines. * config/linux/bar.c: Include wait.h instead of libgomp.h and futex.h. (gomp_barrier_wait_end): Rewritten. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake, gomp_barrier_wait_last): New functions. * config/posix/bar.h (gomp_barrier_t): Add generation field. (gomp_barrier_state_t): New typedef. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes. (gomp_barrier_wait_start): Or all but low 2 bits from generation into the return value. Return gomp_barrier_state_t. (gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): New inlines. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_barrier_last_thread, gomp_barrier_wait_last): New static inlines. * config/posix/bar.c (gomp_barrier_init): Clear generation field. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New functions. * config/linux/mutex.c: Include wait.h instead of libgomp.h and futex.h. (gomp_futex_wake, gomp_futex_wait): New variables. (gomp_mutex_lock_slow): Call do_wait instead of futex_wait. * config/linux/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. Include wait.h instead of libgomp.h and futex.h. (gomp_set_nest_lock_25): Call do_wait instead of futex_wait. * config/posix95/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. * config/posix/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv. (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv. * config/posix/proc.c, config/mingw32/proc.c: Similarly. * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/sem.c: Include wait.h instead of libgomp.h and futex.h. (gomp_sem_wait_slow): Call do_wait instead of futex_wait. * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS. * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_nest_lock_t): Change owner into void *, add lock field. * config/posix95/omp-lock.h: Include semaphore.h. (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_lock_t): Use sem_t instead of mutex if semaphores aren't broken. (omp_nest_lock_t): Likewise. Change owner to void *. * config/posix/omp-lock.h: Include semaphore.h. (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_lock_t): Use sem_t instead of mutex if semaphores aren't broken. (omp_nest_lock_t): Likewise. Add owner field. * testsuite/libgomp.c/collapse-1.c: New test. * testsuite/libgomp.c/collapse-2.c: New test. * testsuite/libgomp.c/collapse-3.c: New test. * testsuite/libgomp.c/icv-1.c: New test. * testsuite/libgomp.c/icv-2.c: New test. * testsuite/libgomp.c/lib-2.c: New test. * testsuite/libgomp.c/lock-1.c: New test. * testsuite/libgomp.c/lock-2.c: New test. * testsuite/libgomp.c/lock-3.c: New test. * testsuite/libgomp.c/loop-4.c: New test. * testsuite/libgomp.c/loop-5.c: New test. * testsuite/libgomp.c/loop-6.c: New test. * testsuite/libgomp.c/loop-7.c: New test. * testsuite/libgomp.c/loop-8.c: New test. * testsuite/libgomp.c/loop-9.c: New test. * testsuite/libgomp.c/nested-3.c: New test. * testsuite/libgomp.c/nestedfn-6.c: New test. * testsuite/libgomp.c/sort-1.c: New test. * testsuite/libgomp.c/task-1.c: New test. * testsuite/libgomp.c/task-2.c: New test. * testsuite/libgomp.c/task-3.c: New test. * testsuite/libgomp.c/task-4.c: New test. * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes to C++ testsuite default compiler options. * testsuite/libgomp.c++/collapse-1.C: New test. * testsuite/libgomp.c++/collapse-2.C: New test. * testsuite/libgomp.c++/ctor-10.C: New test. * testsuite/libgomp.c++/for-1.C: New test. * testsuite/libgomp.c++/for-2.C: New test. * testsuite/libgomp.c++/for-3.C: New test. * testsuite/libgomp.c++/for-4.C: New test. * testsuite/libgomp.c++/for-5.C: New test. * testsuite/libgomp.c++/loop-8.C: New test. * testsuite/libgomp.c++/loop-9.C: New test. * testsuite/libgomp.c++/loop-10.C: New test. * testsuite/libgomp.c++/task-1.C: New test. * testsuite/libgomp.c++/task-2.C: New test. * testsuite/libgomp.c++/task-3.C: New test. * testsuite/libgomp.c++/task-4.C: New test. * testsuite/libgomp.c++/task-5.C: New test. * testsuite/libgomp.c++/task-6.C: New test. * testsuite/libgomp.fortran/allocatable1.f90: New test. * testsuite/libgomp.fortran/allocatable2.f90: New test. * testsuite/libgomp.fortran/allocatable3.f90: New test. * testsuite/libgomp.fortran/allocatable4.f90: New test. * testsuite/libgomp.fortran/collapse1.f90: New test. * testsuite/libgomp.fortran/collapse2.f90: New test. * testsuite/libgomp.fortran/collapse3.f90: New test. * testsuite/libgomp.fortran/collapse4.f90: New test. * testsuite/libgomp.fortran/lastprivate1.f90: New test. * testsuite/libgomp.fortran/lastprivate2.f90: New test. * testsuite/libgomp.fortran/lib4.f90: New test. * testsuite/libgomp.fortran/lock-1.f90: New test. * testsuite/libgomp.fortran/lock-2.f90: New test. * testsuite/libgomp.fortran/nested1.f90: New test. * testsuite/libgomp.fortran/nestedfn4.f90: New test. * testsuite/libgomp.fortran/strassen.f90: New test. * testsuite/libgomp.fortran/tabs1.f90: New test. * testsuite/libgomp.fortran/tabs2.f: New test. * testsuite/libgomp.fortran/task1.f90: New test. * testsuite/libgomp.fortran/task2.f90: New test. * testsuite/libgomp.fortran/vla4.f90: Add dg-warning. * testsuite/libgomp.fortran/vla5.f90: Likewise. * testsuite/libgomp.c/pr26943-2.c: Likewise. * testsuite/libgomp.c/pr26943-3.c: Likewise. * testsuite/libgomp.c/pr26943-4.c: Likewise. Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de> Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Ulrich Drepper <drepper@redhat.com> From-SVN: r136433
2008-06-06 15:01:54 +02:00
2008-06-06 Jakub Jelinek <jakub@redhat.com>
Richard Henderson <rth@redhat.com>
Ulrich Drepper <drepper@redhat.com>
Jakob Blomer <jakob.blomer@ira.uka.de>
* configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
Substitute also OMP_*LOCK_25*.
* configure: Regenerated.
* config.h.in: Regenerated.
* Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
ptrlock.c and task.c.
* Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* task.c: New file.
* loop_ull.c: New file.
* iter_ull.c: New file.
* libgomp.h: Include ptrlock.h.
(enum gomp_task_kind): New type.
(struct gomp_team): Add task_lock, task_queue, task_count,
task_running_count, single_count fields. Add
work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
Remove work_share_lock, generation_mask,
oldest_live_gen, num_live_gen and init_work_shares fields, add
work work_share_list_alloc, work_share_list_free and work_share_chunk
fields. Change work_shares from pointer to pointers into an array.
Change ordered_release field into gomp_sem_t ** from flexible array
member. Add implicit_task and initial_work_shares fields.
Move close to the end of the struct.
(struct gomp_team_state): Add single_count, last_work_share,
active_level and level fields, remove work_share_generation.
(gomp_barrier_handle_tasks): New prototype.
(gomp_finish_task): New inline function.
(struct gomp_work_share): Move chunk_size, end, incr into
transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
next_ll fields. Reshuffle fields. Add next_alloc,
next_ws, next_free and inline_ordered_team_ids fields, change
ordered_team_ids into pointer from flexible array member.
Add mode field. Put lock and next into a different cache line
from most of the write-once fields.
(gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
gomp_iter_ull_guided_next): New prototypes.
(gomp_new_icv): New prototype.
(struct gomp_thread): Add thread_pool and task fields.
(struct gomp_thread_pool): New type.
(gomp_new_team): New prototype.
(gomp_team_start): Change type of last argument.
(gomp_new_work_share): Removed.
(gomp_init_work_share, gomp_fini_work_share): New prototypes.
(gomp_work_share_init_done): New static inline.
(gomp_throttled_spin_count_var, gomp_available_cpus,
gomp_managed_threads): New extern decls.
(gomp_init_task): New prototype.
(gomp_spin_count_var): New extern var decl.
(LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
or no alias support, or if not PIC.
(gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
gomp_test_nest_lock_25): New prototypes.
(omp_lock_symver, strong_alias): Define.
(gomp_remaining_threads_count, gomp_remaining_threads_lock): New
decls.
(gomp_end_task): New.
(struct gomp_task_icv, gomp_global_icv): New.
(gomp_thread_limit_var, gomp_max_active_levels_var): New.
(struct gomp_task): New.
(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
gomp_run_sched_var, gomp_run_sched_chunk): Remove.
(gomp_icv): New.
(gomp_schedule_type): Reorder enum to match
omp_sched_t.
* team.c (struct gomp_thread_start_data): Add thread_pool and task
fields.
(gomp_thread_start): Add gomp_team_barrier_wait call.
For non-nested case remove clearing of docked thread thr fields.
Use pool fields instead of global gomp_* variables. Use
gomp_barrier_wait_last when needed. Initialize ts.active_level.
Create tasks for each member thread.
(free_team): Only destroy team barrier, task_lock here and free it.
(gomp_free_thread): Free last_team if non-NULL.
(gomp_team_end): Call gomp_team_barrier_wait instead of
gomp_barrier_wait. For nested case call one extra
gomp_barrier_wait. Move here some destruction from free_team.
Call free_team on pool->last_team if any, rather than freeing
current team. Destroy work_share_list_free_lock ifndef
HAVE_SYNC_BUILTINS.
(gomp_new_icv): New function.
(gomp_threads, gomp_threads_size, gomp_threads_used,
gomp_threads_dock): Removed.
(gomp_thread_destructor): New variable.
(gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
functions.
(gomp_team_start): Create new pool if current thread doesn't have
one. Use pool fields instead of global gomp_* variables.
c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. * langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause. Add omp_private_outer_ref hook, add another argument to omp_clause_default_ctor hook. * langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define. (LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define. (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to hook_tree_tree_tree_tree_null. (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and LANG_HOOKS_OMP_PRIVATE_OUTER_REF. * hooks.c (hook_tree_tree_tree_tree_null): New function. * hooks.h (hook_tree_tree_tree_tree_null): New prototype. * tree.def (OMP_TASK): New tree code. * tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN, OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT, OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES, OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY, OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG, OMP_CLAUSE_COLLAPSE_EXPR): Define. (enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. (OMP_DIRECTIVE_P): Add OMP_TASK. (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes. (OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind. * tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED entries. (omp_clause_num_ops): Likewise. Increase OMP_CLAUSE_LASTPRIVATE num_ops to 2. (walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Walk OMP_CLAUSE_LASTPRIVATE_STMT. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. (dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops. * c-omp.c (c_finish_omp_for): Allow pointer iterators. Remove warning about unsigned iterators. Change decl/init/cond/incr arguments to TREE_VECs, check arguments for all collapsed loops. (c_finish_omp_taskwait): New function. (c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to ws_clauses. * c-parser.c (c_parser_omp_for_loop): Parse collapsed loops. Call default_function_array_conversion on init. Add par_clauses argument. If decl is present in parallel's lastprivate clause, change it to shared and add lastprivate clause for decl to OMP_FOR_CLAUSES. Add clauses argument, on success set OMP_FOR_CLAUSES to it. Look up collapse count in clauses. (c_parser_omp_for, c_parser_omp_parallel): Adjust c_parser_omp_for_loop callers. (OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE. (c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT. (c_parser_omp_clause_name): Handle collapse and untied clauses. (c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New functions. (c_parser_omp_clause_schedule): Handle schedule(auto). Include correct location in the error message. (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE and PRAGMA_OMP_CLAUSE_UNTIED. (OMP_TASK_CLAUSE_MASK): Define. (c_parser_omp_task, c_parser_omp_taskwait): New functions. (c_parser_omp_construct): Handle PRAGMA_OMP_TASK. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in OMP_CLAUSE_DECL. (conver_nonlocal_reference, convert_local_reference, convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL. Use OMP_TASKREG_* macros rather than OMP_PARALLEL_*. (walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes. * tree-gimple.c (is_gimple_stmt): Handle OMP_TASK. * c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes. * c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New. (PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New. * c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions. (c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. * c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas. * c-common.h (c_finish_omp_taskwait): New prototype. * gimple-low.c (lower_stmt): Handle OMP_TASK. * tree-parloops.c (create_parallel_loop): Create 1 entry vectors for OMP_FOR_{INIT,COND,INCR}. * tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers. (make_edges): Handle OMP_TASK. * tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. * tree-inline.c (estimate_num_insns_1): Handle OMP_TASK. * builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR, BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New. * omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT, BUILT_IN_GOMP_LOOP_ULL_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins. * gimplify.c (gimplify_omp_for): Allow pointer type for decl, handle POINTER_PLUS_EXPR. If loop counter has been replaced and original iterator is present in lastprivate clause or if collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. (gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK. (enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF. (omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed, if it is set, lookup var in outer contexts too. Handle OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. Handle vars that are supposed to be implicitly determined firstprivate for task regions. (gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed, if it is set, lookup var in outer contexts too. Set OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set. Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Take region_type as last argument instead of in_parallel and in_combined_parallel. (gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare): Adjust callers. (gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set. Call omp_finish_clause langhook. (new_omp_context): Set default_kind to OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions. (omp_region_type): New enum. (struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel fields, add region_type. (new_omp_context): Take region_type as argument instead of is_parallel and is_combined_parallel. (gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable, omp_is_private, omp_check_private): Adjust ctx->is_parallel and ctx->is_combined_parallel checks. (gimplify_omp_task): New function. (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. * omp-low.c (extract_omp_for_data): Use schedule(static) for schedule(auto). Handle pointer and unsigned iterators. Compute fd->iter_type. Handle POINTER_PLUS_EXPR increments. Add loops argument. Extract data for collapsed OMP_FOR loops. (expand_parallel_call): Assert sched_kind isn't auto, map runtime schedule to index 3. (struct omp_for_data_loop): New type. (struct omp_for_data): Remove v, n1, n2, step, cond_code fields. Add loop, loops, collapse and iter_type fields. (workshare_safe_to_combine_p): Disallow combined for if iter_type is unsigned long long. Don't combine collapse > 1 loops unless all bounds and steps are constant. Adjust extract_omp_for_data caller. (expand_omp_for_generic): Handle pointer, unsigned and long long iterators. Handle collapsed OMP_FOR loops. Adjust for struct omp_for_data changes. If libgomp function doesn't return boolean_type_node, add comparison of the return value with 0. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle pointer, unsigned and long long iterators. Adjust for struct omp_for_data changes. (expand_omp_for): Assert sched_kind isn't auto, map runtime schedule to index 3. Use GOMP_loop_ull*{start,next} if iter_type is unsigned long long. Allocate loops array, pass it to extract_omp_for_data. For collapse > 1 loops use always expand_omp_for_generic. (omp_context): Add sfield_map and srecord_type fields. (is_task_ctx, lookup_sfield): New functions. (use_pointer_for_field): Use is_task_ctx helper. Change first argument's type from const_tree to tree. Clarify comment. In OMP_TASK disallow copy-in/out sharing. (build_sender_ref): Call lookup_sfield instead of lookup_field. (install_var_field): Add mask argument. Populate both record_type and srecord_type if needed. (delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN in srecord_type. (fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT} and DECL_FIELD_OFFSET. (scan_sharing_clauses): Adjust install_var_field callers. For firstprivate clauses on explicit tasks allocate the var by value in record_type unconditionally, rather than by reference. Handle OMP_CLAUSE_PRIVATE_OUTER_REF. Scan OMP_CLAUSE_LASTPRIVATE_STMT. Use is_taskreg_ctx instead of is_parallel_ctx. Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. (create_omp_child_function_name): Add task_copy argument, use *_omp_cpyfn* names if it is true. (create_omp_child_function): Add task_copy argument, if true create *_omp_cpyfn* helper function. (scan_omp_parallel): Adjust create_omp_child_function callers. Rename parallel_nesting_level to taskreg_nesting_level. (scan_omp_task): New function. (lower_rec_input_clauses): Don't run constructors for firstprivate explicit task vars which are initialized by *_omp_cpyfn*. Pass outer var ref to omp_clause_default_ctor hook if OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE. Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in OMP_CLAUSE_REDUCTION_INIT. (lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to avoid duplicate setting of fields. Handle OMP_CLAUSE_PRIVATE_OUTER_REF. (lower_send_shared_vars): Use srecord_type if non-NULL. Don't copy-out if TREE_READONLY, only copy-in. (expand_task_copyfn): New function. (expand_task_call): New function. (struct omp_taskcopy_context): New type. (task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn): New functions. (lower_omp_parallel): Rename to... (lower_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed. Call create_task_copyfn if srecord_type is needed. Adjust sender_decl type. (task_shared_vars): New variable. (check_omp_nesting_restrictions): Warn if work-sharing, barrier, master or ordered region is closely nested inside OMP_TASK. Add warnings for barrier if closely nested inside of work-sharing, ordered, or master region. (scan_omp_1): Call check_omp_nesting_restrictions even for GOMP_barrier calls. Rename parallel_nesting_level to taskreg_nesting_level. Handle OMP_TASK. (lower_lastprivate_clauses): Even if some lastprivate is found on a work-sharing construct, continue looking for them on parent parallel construct. (lower_omp_for_lastprivate): Add lastprivate clauses to the beginning of dlist rather than end. Adjust for struct omp_for_data changes. (lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY, not after it. Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data caller. (get_ws_args_for): Adjust extract_omp_for_data caller. (scan_omp_for): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. (lower_omp_single_simple): If libgomp function doesn't return boolean_type_node, add comparison of the return value with 0. (diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. Handle OMP_TASK. (parallel_nesting_level): Rename to... (taskreg_nesting_level): ... this. (is_taskreg_ctx): New function. (build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead of is_parallel_ctx. (execute_lower_omp): Rename parallel_nesting_level to taskreg_nesting_level. (expand_omp_parallel): Rename to... (expand_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed. Call omp_task_call for OMP_TASK regions. (expand_omp): Adjust caller, handle OMP_TASK. (lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK. * bitmap.c (bitmap_default_obstack_depth): New variable. (bitmap_obstack_initialize, bitmap_obstack_release): Do nothing if argument is NULL and bitmap_default_obstack is already initialized. * ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release at the end. * matrix-reorg.c (matrix_reorg): Likewise. cp/ * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info, dependent_omp_for_p, begin_omp_task, finish_omp_task, finish_omp_taskwait): New prototypes. (cxx_omp_clause_default_ctor): Add outer argument. (finish_omp_for): Add new clauses argument. * cp-gimplify.c (cxx_omp_finish_clause): New function. (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten. (cxx_omp_clause_default_ctor): Add outer argument. (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT. * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define. * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops. Add par_clauses argument. If decl is present in parallel's lastprivate clause, change that clause to shared and add a lastprivate clause for decl to OMP_FOR_CLAUSES. Fix wording of error messages. Adjust finish_omp_for caller. Add clauses argument. Parse loops with random access iterators. (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New functions. (cp_parser_omp_for, cp_parser_omp_parallel): Adjust cp_parser_omp_for_loop callers. (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper functions. (cp_parser_omp_clause_name): Handle collapse and untied clauses. (cp_parser_omp_clause_schedule): Handle auto schedule. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE and PRAGMA_OMP_CLAUSE_UNTIED. (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE. (OMP_TASK_CLAUSE_MASK): Define. (cp_parser_omp_task, cp_parser_omp_taskwait): New functions. (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK. (cp_parser_pragma): Handle PRAGMA_OMP_TASK and PRAGMA_OMP_TASKWAIT. * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT. (tsubst_omp_for_iterator): New function. (dependent_omp_for_p): New function. (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR loops. Adjust finish_omp_for caller. Handle loops with random access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes. (tsubst_expr): Handle OMP_TASK. * semantics.c (cxx_omp_create_clause_info): New function. (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and OMP_CLAUSE_COLLAPSE. (cxx_omp_predetermined_sharing): Removed. * semantics.c (finish_omp_for): Allow pointer iterators. Use handle_omp_for_class_iterator and dependent_omp_for_p. Handle collapsed for loops. Adjust c_finish_omp_for caller. Add new clauses argument. Fix check for type dependent cond or incr. Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of fold_convert to convert incr amount to difference_type. Only fold if not in template. If decl is mentioned in lastprivate clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes. (finish_omp_threadprivate): Allow static class members of the current class. (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task, finish_omp_taskwait): New functions. * parser.c (cp_parser_binary_expression): Add prec argument. (cp_parser_assignment_expression): Adjust caller. * cp-tree.h (outer_curly_brace_block): New prototype. * decl.c (outer_curly_brace_block): No longer static. fortran/ * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs. * parse.c (next_free): Allow tab after !$omp. (decode_omp_directive): Handle !$omp task, !$omp taskwait and !$omp end task. (case_executable): Add ST_OMP_TASKWAIT. (case_exec_markers): Add ST_OMP_TASK. (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT. (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK. * gfortran.h (gfc_find_sym_in_expr): New prototype. (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT. (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind, OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and untied fields. (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR, LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define. * trans.h (gfc_omp_clause_default_ctor): Add another argument. (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes. * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG, BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New. (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather than boolean_type_node. * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK, EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses. (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * st.c (gfc_free_statement): Likewise. * resolve.c (gfc_resolve_blocks, resolve_code): Likewise. (find_sym_in_expr): Rename to... (gfc_find_sym_in_expr): ... this. No longer static. (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller. * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New prototypes. * openmp.c (resolve_omp_clauses): Allow allocatable arrays in firstprivate, lastprivate, reduction, copyprivate and copyin clauses. (omp_current_do_code): Made static. (omp_current_do_collapse): New variable. (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse, clear omp_current_do_code and omp_current_do_collapse on return. (gfc_resolve_do_iterator): Handle collapsed do loops. (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops. (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define. (gfc_match_omp_clauses): Handle default (firstprivate), schedule (auto), untied and collapse (n) clauses. (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE. (OMP_TASK_CLAUSES): Define. (gfc_match_omp_task, gfc_match_omp_taskwait): New functions. * trans-openmp.c (gfc_omp_private_outer_ref): New function. (gfc_omp_clause_default_ctor): Add outer argument. For allocatable arrays allocate them with the bounds of the outer var if outer var is allocated. (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor): New functions. (gfc_trans_omp_array_reduction): If decl is allocatable array, allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT and deallocate it in OMP_CLAUSE_REDUCTION_MERGE. (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for assumed-size arrays. (gfc_trans_omp_do): Add par_clauses argument. If dovar is present in lastprivate clause and do loop isn't simple, set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in parallel's lastprivate clause, change it to shared and add lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops. (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers. (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to OMP_FOR from OMP_PARALLEL. (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses. (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. gcc/testsuite/ * gcc.dg/gomp/collapse-1.c: New test. * gcc.dg/gomp/nesting-1.c: New test. * g++.dg/gomp/task-1.C: New test. * g++.dg/gomp/predetermined-1.C: New test. * g++.dg/gomp/tls-4.C: New test. * gfortran.dg/gomp/collapse1.f90: New test. * gfortran.dg/gomp/sharing-3.f90: New test. * gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning. * g++.dg/gomp/pr27499.C (foo): Likewise. * g++.dg/gomp/for-16.C (foo): Likewise. * g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition. * g++.dg/gomp/pr34607.C: Adjust dg-error location. * g++.dg/gomp/for-16.C (foo): Add a new dg-error. * gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning. * gcc.dg/gomp/appendix-a/a.35.6.c: Likewise. * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise. * gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test. * gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error about allocatable array. * gfortran.dg/gomp/reduction1.f90: Likewise. libgomp/ * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE. Substitute also OMP_*LOCK_25*. * configure: Regenerated. * config.h.in: Regenerated. * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c, ptrlock.c and task.c. * Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * task.c: New file. * loop_ull.c: New file. * iter_ull.c: New file. * libgomp.h: Include ptrlock.h. (enum gomp_task_kind): New type. (struct gomp_team): Add task_lock, task_queue, task_count, task_running_count, single_count fields. Add work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS. Remove work_share_lock, generation_mask, oldest_live_gen, num_live_gen and init_work_shares fields, add work work_share_list_alloc, work_share_list_free and work_share_chunk fields. Change work_shares from pointer to pointers into an array. Change ordered_release field into gomp_sem_t ** from flexible array member. Add implicit_task and initial_work_shares fields. Move close to the end of the struct. (struct gomp_team_state): Add single_count, last_work_share, active_level and level fields, remove work_share_generation. (gomp_barrier_handle_tasks): New prototype. (gomp_finish_task): New inline function. (struct gomp_work_share): Move chunk_size, end, incr into transparent union/struct, add chunk_size_ull, end_ll, incr_ll and next_ll fields. Reshuffle fields. Add next_alloc, next_ws, next_free and inline_ordered_team_ids fields, change ordered_team_ids into pointer from flexible array member. Add mode field. Put lock and next into a different cache line from most of the write-once fields. (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked, gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next, gomp_iter_ull_guided_next): New prototypes. (gomp_new_icv): New prototype. (struct gomp_thread): Add thread_pool and task fields. (struct gomp_thread_pool): New type. (gomp_new_team): New prototype. (gomp_team_start): Change type of last argument. (gomp_new_work_share): Removed. (gomp_init_work_share, gomp_fini_work_share): New prototypes. (gomp_work_share_init_done): New static inline. (gomp_throttled_spin_count_var, gomp_available_cpus, gomp_managed_threads): New extern decls. (gomp_init_task): New prototype. (gomp_spin_count_var): New extern var decl. (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility or no alias support, or if not PIC. (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30, gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30, gomp_destroy_nest_lock_30, gomp_set_nest_lock_30, gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25, gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25, gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25, gomp_set_nest_lock_25, gomp_unset_nest_lock_25, gomp_test_nest_lock_25): New prototypes. (omp_lock_symver, strong_alias): Define. (gomp_remaining_threads_count, gomp_remaining_threads_lock): New decls. (gomp_end_task): New. (struct gomp_task_icv, gomp_global_icv): New. (gomp_thread_limit_var, gomp_max_active_levels_var): New. (struct gomp_task): New. (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var, gomp_run_sched_var, gomp_run_sched_chunk): Remove. (gomp_icv): New. (gomp_schedule_type): Reorder enum to match omp_sched_t. * team.c (struct gomp_thread_start_data): Add thread_pool and task fields. (gomp_thread_start): Add gomp_team_barrier_wait call. For non-nested case remove clearing of docked thread thr fields. Use pool fields instead of global gomp_* variables. Use gomp_barrier_wait_last when needed. Initialize ts.active_level. Create tasks for each member thread. (free_team): Only destroy team barrier, task_lock here and free it. (gomp_free_thread): Free last_team if non-NULL. (gomp_team_end): Call gomp_team_barrier_wait instead of gomp_barrier_wait. For nested case call one extra gomp_barrier_wait. Move here some destruction from free_team. Call free_team on pool->last_team if any, rather than freeing current team. Destroy work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS. (gomp_new_icv): New function. (gomp_threads, gomp_threads_size, gomp_threads_used, gomp_threads_dock): Removed. (gomp_thread_destructor): New variable. (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New functions. (gomp_team_start): Create new pool if current thread doesn't have one. Use pool fields instead of global gomp_* variables. Initialize thread_pool field for new threads. Clear single_count. Change last argument from ws to team, don't create new team, set ts.work_share to &team->work_shares[0] and clear ts.last_work_share. Don't clear ts.work_share_generation. If number of threads changed, adjust atomically gomp_managed_threads. Use gomp_init_task instead of gomp_new_task, set thr->task to the corresponding implicit_task array entry. Create tasks for each member thread. Initialize ts.level. (initialize_team): Call pthread_key_create on gomp_thread_destructor. (team_destructor): New function. (new_team): Removed. (gomp_new_team): New function. (free_team): Free gomp_work_share blocks chained through next_alloc, instead of freeing work_shares and destroying work_share_lock. (gomp_team_end): Call gomp_fini_work_share. If number of threads changed, adjust atomically gomp_managed_threads. Use gomp_end_task. * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead of gomp_barrier_wait. * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait instead of gomp_barrier_wait. Call gomp_work_share_init_done if gomp_work_share_start returned true. Don't unlock ws->lock. (GOMP_single_copy_end): Call gomp_team_barrier_wait instead of gomp_barrier_wait. (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS. Call gomp_work_share_init_done if gomp_work_share_start returned true. Don't unlock ws->lock. * work.c: Include stddef.h. (free_work_share): Use work_share_list_free_lock instead of atomic chaining ifndef HAVE_SYNC_BUILTINS. Add team argument. Call gomp_fini_work_share and then either free ws if orphaned, or put it into work_share_list_free list of the current team. (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New functions. (gomp_work_share_start, gomp_work_share_end, gomp_work_share_end_nowait): Rewritten. * omp_lib.f90.in Change some tabs to spaces to prevent warnings. (openmp_version): Set to 200805. (omp_sched_kind, omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): New parameters. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New interfaces. * omp_lib.h.in (openmp_version): Set to 200805. (omp_sched_kind, omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): New parameters. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New externals. * loop.c: Include limits.h. (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle GFS_AUTO. (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start): Likewise. Use gomp_icv. (gomp_loop_static_start, gomp_loop_dynamic_start): Clear ts.static_trip here. (gomp_loop_static_start, gomp_loop_ordered_static_start): Call gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock. (gomp_loop_dynamic_start, gomp_loop_guided_start): Call gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS, don't unlock ws->lock, otherwise lock it. (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call gomp_work_share_init_done after gomp_loop_init. Lock ws->lock. (gomp_parallel_loop_start): Call gomp_new_team instead of gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0]. Adjust gomp_team_start caller. Pass 0 as second argument to gomp_resolve_num_threads. (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr. If adding ws->chunk_size nthreads + 1 times after end won't overflow, set ws->mode to 1. * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start, GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start, GOMP_loop_ull_ordered_static_start, GOMP_loop_ull_ordered_dynamic_start, GOMP_loop_ull_ordered_guided_start, GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next, GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next, GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next, GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next, GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New prototypes. * libgomp.map: Export lock routines also @@OMP_2.0. (GOMP_loop_ordered_dynamic_first, GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first, GOMP_loop_ordered_static_first): Remove. (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start, GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start, GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_dynamic_start, GOMP_loop_ull_ordered_guided_next, GOMP_loop_ull_ordered_guided_start, GOMP_loop_ull_ordered_runtime_next, GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_ordered_static_next, GOMP_loop_ull_ordered_static_start, GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start, GOMP_loop_ull_static_next, GOMP_loop_ull_static_start, GOMP_task, GOMP_taskwait): Export @@GOMP_2.0. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level, omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_, omp_set_max_active_levels_, omp_set_max_active_levels_8_, omp_get_max_active_levels_, omp_get_level_, omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_, omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_): New exports @@OMP_3.0. * omp.h.in (omp_sched_t): New type. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New prototypes. * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var, gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var, gomp_thread_limit_var, gomp_remaining_threads_count, gomp_remaining_threads_lock): New variables. (parse_spincount): New function. (initialize_env): Call gomp_init_num_threads unconditionally. Initialize gomp_available_cpus. Call parse_spincount, initialize gomp_{,throttled_}spin_count_var depending on presence and value of OMP_WAIT_POLICY and GOMP_SPINCOUNT env vars. Handle GOMP_BLOCKTIME env var. Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS, OMP_THREAD_LIMIT, OMP_STACKSIZE env vars. Handle unit specification for GOMP_STACKSIZE. Initialize gomp_remaining_threads_count and gomp_remaining_threads_lock if needed. Use gomp_global_icv. (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var, gomp_run_sched_var, gomp_run_sched_chunk): Remove. (gomp_global_icv): New. (parse_schedule): Use it. Parse "auto". (omp_set_num_threads): Use gomp_icv. (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested): Likewise. (omp_get_max_threads): Move from parallel.c. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels): New functions, add ialias. (parse_stacksize, parse_wait_policy): New functions. * fortran.c: Rewrite lock wrappers, if symbol versioning provide both wrappers for compatibility and new locks. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New ialias_redirect. (omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_, omp_set_max_active_levels_, omp_set_max_active_levels_8_, omp_get_max_active_levels_, omp_get_level_, omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_, omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_): New functions. * parallel.c: Include limits.h. (gomp_resolve_num_threads): Add count argument. Rewritten. (GOMP_parallel_start): Call gomp_new_team and pass that as last argument to gomp_team_start. Pass 0 as second argument to gomp_resolve_num_threads. (GOMP_parallel_end): Decrease gomp_remaining_threads_count if gomp_thread_limit_var != ULONG_MAX. (omp_in_parallel): Implement using ts.active_level. (omp_get_max_threads): Move to env.c. (omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New functions, add ialias. * sections.c (GOMP_sections_start): Call gomp_work_share_init_done after gomp_sections_init. If HAVE_SYNC_BUILTINS, call gomp_iter_dynamic_next instead of the _locked variant and don't take lock around it, otherwise acquire it before calling gomp_iter_dynamic_next_locked. (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call gomp_iter_dynamic_next instead of the _locked variant and don't take lock around it. (GOMP_parallel_sections_start): Call gomp_new_team instead of gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0]. Adjust gomp_team_start caller. Pass count as second argument to gomp_resolve_num_threads, don't adjust num_threads after the call. Use gomp_icv. * iter.c (gomp_iter_dynamic_next_locked): Don't multiply ws->chunk_size by incr. (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient code. * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New types. (omp_lock_25_arg, omp_nest_lock_25_arg): New macros. (omp_check_defines): Check even the compat defines. * config/linux/ptrlock.c: New file. * config/linux/ptrlock.h: New file. * config/linux/wait.h: New file. * config/posix/ptrlock.c: New file. * config/posix/ptrlock.h: New file. * config/linux/bar.h (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes. (gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): New inlines. (gomp_barrier_t): Rewritten. (gomp_barrier_state_t): New typedef. (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy, gomp_barrier_wait_start): Rewritten. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_barrier_last_thread, gomp_barrier_wait_last): New static inlines. * config/linux/bar.c: Include wait.h instead of libgomp.h and futex.h. (gomp_barrier_wait_end): Rewritten. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake, gomp_barrier_wait_last): New functions. * config/posix/bar.h (gomp_barrier_t): Add generation field. (gomp_barrier_state_t): New typedef. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes. (gomp_barrier_wait_start): Or all but low 2 bits from generation into the return value. Return gomp_barrier_state_t. (gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): New inlines. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_barrier_last_thread, gomp_barrier_wait_last): New static inlines. * config/posix/bar.c (gomp_barrier_init): Clear generation field. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New functions. * config/linux/mutex.c: Include wait.h instead of libgomp.h and futex.h. (gomp_futex_wake, gomp_futex_wait): New variables. (gomp_mutex_lock_slow): Call do_wait instead of futex_wait. * config/linux/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. Include wait.h instead of libgomp.h and futex.h. (gomp_set_nest_lock_25): Call do_wait instead of futex_wait. * config/posix95/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. * config/posix/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv. (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv. * config/posix/proc.c, config/mingw32/proc.c: Similarly. * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/sem.c: Include wait.h instead of libgomp.h and futex.h. (gomp_sem_wait_slow): Call do_wait instead of futex_wait. * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS. * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_nest_lock_t): Change owner into void *, add lock field. * config/posix95/omp-lock.h: Include semaphore.h. (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_lock_t): Use sem_t instead of mutex if semaphores aren't broken. (omp_nest_lock_t): Likewise. Change owner to void *. * config/posix/omp-lock.h: Include semaphore.h. (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_lock_t): Use sem_t instead of mutex if semaphores aren't broken. (omp_nest_lock_t): Likewise. Add owner field. * testsuite/libgomp.c/collapse-1.c: New test. * testsuite/libgomp.c/collapse-2.c: New test. * testsuite/libgomp.c/collapse-3.c: New test. * testsuite/libgomp.c/icv-1.c: New test. * testsuite/libgomp.c/icv-2.c: New test. * testsuite/libgomp.c/lib-2.c: New test. * testsuite/libgomp.c/lock-1.c: New test. * testsuite/libgomp.c/lock-2.c: New test. * testsuite/libgomp.c/lock-3.c: New test. * testsuite/libgomp.c/loop-4.c: New test. * testsuite/libgomp.c/loop-5.c: New test. * testsuite/libgomp.c/loop-6.c: New test. * testsuite/libgomp.c/loop-7.c: New test. * testsuite/libgomp.c/loop-8.c: New test. * testsuite/libgomp.c/loop-9.c: New test. * testsuite/libgomp.c/nested-3.c: New test. * testsuite/libgomp.c/nestedfn-6.c: New test. * testsuite/libgomp.c/sort-1.c: New test. * testsuite/libgomp.c/task-1.c: New test. * testsuite/libgomp.c/task-2.c: New test. * testsuite/libgomp.c/task-3.c: New test. * testsuite/libgomp.c/task-4.c: New test. * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes to C++ testsuite default compiler options. * testsuite/libgomp.c++/collapse-1.C: New test. * testsuite/libgomp.c++/collapse-2.C: New test. * testsuite/libgomp.c++/ctor-10.C: New test. * testsuite/libgomp.c++/for-1.C: New test. * testsuite/libgomp.c++/for-2.C: New test. * testsuite/libgomp.c++/for-3.C: New test. * testsuite/libgomp.c++/for-4.C: New test. * testsuite/libgomp.c++/for-5.C: New test. * testsuite/libgomp.c++/loop-8.C: New test. * testsuite/libgomp.c++/loop-9.C: New test. * testsuite/libgomp.c++/loop-10.C: New test. * testsuite/libgomp.c++/task-1.C: New test. * testsuite/libgomp.c++/task-2.C: New test. * testsuite/libgomp.c++/task-3.C: New test. * testsuite/libgomp.c++/task-4.C: New test. * testsuite/libgomp.c++/task-5.C: New test. * testsuite/libgomp.c++/task-6.C: New test. * testsuite/libgomp.fortran/allocatable1.f90: New test. * testsuite/libgomp.fortran/allocatable2.f90: New test. * testsuite/libgomp.fortran/allocatable3.f90: New test. * testsuite/libgomp.fortran/allocatable4.f90: New test. * testsuite/libgomp.fortran/collapse1.f90: New test. * testsuite/libgomp.fortran/collapse2.f90: New test. * testsuite/libgomp.fortran/collapse3.f90: New test. * testsuite/libgomp.fortran/collapse4.f90: New test. * testsuite/libgomp.fortran/lastprivate1.f90: New test. * testsuite/libgomp.fortran/lastprivate2.f90: New test. * testsuite/libgomp.fortran/lib4.f90: New test. * testsuite/libgomp.fortran/lock-1.f90: New test. * testsuite/libgomp.fortran/lock-2.f90: New test. * testsuite/libgomp.fortran/nested1.f90: New test. * testsuite/libgomp.fortran/nestedfn4.f90: New test. * testsuite/libgomp.fortran/strassen.f90: New test. * testsuite/libgomp.fortran/tabs1.f90: New test. * testsuite/libgomp.fortran/tabs2.f: New test. * testsuite/libgomp.fortran/task1.f90: New test. * testsuite/libgomp.fortran/task2.f90: New test. * testsuite/libgomp.fortran/vla4.f90: Add dg-warning. * testsuite/libgomp.fortran/vla5.f90: Likewise. * testsuite/libgomp.c/pr26943-2.c: Likewise. * testsuite/libgomp.c/pr26943-3.c: Likewise. * testsuite/libgomp.c/pr26943-4.c: Likewise. Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de> Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Ulrich Drepper <drepper@redhat.com> From-SVN: r136433
2008-06-06 15:01:54 +02:00
Initialize thread_pool field for new threads. Clear single_count.
Change last argument from ws to team, don't create
new team, set ts.work_share to &team->work_shares[0] and clear
ts.last_work_share. Don't clear ts.work_share_generation.
If number of threads changed, adjust atomically gomp_managed_threads.
Use gomp_init_task instead of gomp_new_task,
set thr->task to the corresponding implicit_task array entry.
Create tasks for each member thread. Initialize ts.level.
(initialize_team): Call pthread_key_create on
gomp_thread_destructor.
(team_destructor): New function.
(new_team): Removed.
(gomp_new_team): New function.
(free_team): Free gomp_work_share blocks chained through next_alloc,
instead of freeing work_shares and destroying work_share_lock.
(gomp_team_end): Call gomp_fini_work_share. If number of threads
changed, adjust atomically gomp_managed_threads. Use gomp_end_task.
* barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
of gomp_barrier_wait.
* single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
instead of gomp_barrier_wait. Call gomp_work_share_init_done
if gomp_work_share_start returned true. Don't unlock ws->lock.
(GOMP_single_copy_end): Call gomp_team_barrier_wait instead
of gomp_barrier_wait.
(GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS. Call
gomp_work_share_init_done if gomp_work_share_start returned true.
Don't unlock ws->lock.
* work.c: Include stddef.h.
(free_work_share): Use work_share_list_free_lock instead
of atomic chaining ifndef HAVE_SYNC_BUILTINS. Add team argument.
Call gomp_fini_work_share and then either free ws if orphaned, or
put it into work_share_list_free list of the current team.
(alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
functions.
(gomp_work_share_start, gomp_work_share_end,
gomp_work_share_end_nowait): Rewritten.
* omp_lib.f90.in Change some tabs to spaces to prevent warnings.
(openmp_version): Set to 200805.
(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
omp_sched_guided, omp_sched_auto): New parameters.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels,
omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New interfaces.
* omp_lib.h.in (openmp_version): Set to 200805.
(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
omp_sched_guided, omp_sched_auto): New parameters.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels,
omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New externals.
* loop.c: Include limits.h.
(GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
GFS_AUTO.
(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
Likewise. Use gomp_icv.
(gomp_loop_static_start, gomp_loop_dynamic_start): Clear
ts.static_trip here.
(gomp_loop_static_start, gomp_loop_ordered_static_start): Call
gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock.
(gomp_loop_dynamic_start, gomp_loop_guided_start): Call
gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS,
don't unlock ws->lock, otherwise lock it.
(gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
gomp_work_share_init_done after gomp_loop_init. Lock ws->lock.
(gomp_parallel_loop_start): Call gomp_new_team instead of
gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0].
Adjust gomp_team_start caller. Pass 0 as second argument to
gomp_resolve_num_threads.
(gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
If adding ws->chunk_size nthreads + 1 times after end won't
overflow, set ws->mode to 1.
* libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
GOMP_loop_ull_ordered_static_start,
GOMP_loop_ull_ordered_dynamic_start,
GOMP_loop_ull_ordered_guided_start,
GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
prototypes.
* libgomp.map: Export lock routines also @@OMP_2.0.
(GOMP_loop_ordered_dynamic_first,
GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
GOMP_loop_ordered_static_first): Remove.
(GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
GOMP_loop_ull_ordered_dynamic_next,
GOMP_loop_ull_ordered_dynamic_start,
GOMP_loop_ull_ordered_guided_next,
GOMP_loop_ull_ordered_guided_start,
GOMP_loop_ull_ordered_runtime_next,
GOMP_loop_ull_ordered_runtime_start,
GOMP_loop_ull_ordered_static_next,
GOMP_loop_ull_ordered_static_start,
GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
(omp_set_schedule, omp_get_schedule,
omp_get_thread_limit, omp_set_max_active_levels,
omp_get_max_active_levels, omp_get_level,
omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
omp_set_schedule_, omp_set_schedule_8_,
omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
omp_set_max_active_levels_, omp_set_max_active_levels_8_,
omp_get_max_active_levels_, omp_get_level_,
omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
New exports @@OMP_3.0.
* omp.h.in (omp_sched_t): New type.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels,
omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New prototypes.
* env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
gomp_thread_limit_var, gomp_remaining_threads_count,
gomp_remaining_threads_lock): New variables.
(parse_spincount): New function.
(initialize_env): Call gomp_init_num_threads unconditionally.
Initialize gomp_available_cpus. Call parse_spincount,
initialize gomp_{,throttled_}spin_count_var
depending on presence and value of OMP_WAIT_POLICY and
GOMP_SPINCOUNT env vars. Handle GOMP_BLOCKTIME env var.
Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
OMP_THREAD_LIMIT, OMP_STACKSIZE env vars. Handle unit specification
for GOMP_STACKSIZE. Initialize gomp_remaining_threads_count and
gomp_remaining_threads_lock if needed. Use gomp_global_icv.
(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
gomp_run_sched_var, gomp_run_sched_chunk): Remove.
(gomp_global_icv): New.
(parse_schedule): Use it. Parse "auto".
(omp_set_num_threads): Use gomp_icv.
(omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
Likewise.
(omp_get_max_threads): Move from parallel.c.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels): New functions,
add ialias.
(parse_stacksize, parse_wait_policy): New functions.
* fortran.c: Rewrite lock wrappers, if symbol versioning provide
both wrappers for compatibility and new locks.
(omp_set_schedule, omp_get_schedule,
omp_get_thread_limit, omp_set_max_active_levels,
omp_get_max_active_levels, omp_get_level,
omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New ialias_redirect.
(omp_set_schedule_, omp_set_schedule_8_,
omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
omp_set_max_active_levels_, omp_set_max_active_levels_8_,
omp_get_max_active_levels_, omp_get_level_,
omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
New functions.
* parallel.c: Include limits.h.
(gomp_resolve_num_threads): Add count argument. Rewritten.
(GOMP_parallel_start): Call gomp_new_team and pass that as last
argument to gomp_team_start. Pass 0 as second argument to
gomp_resolve_num_threads.
(GOMP_parallel_end): Decrease gomp_remaining_threads_count
if gomp_thread_limit_var != ULONG_MAX.
(omp_in_parallel): Implement using ts.active_level.
(omp_get_max_threads): Move to env.c.
(omp_get_level, omp_get_ancestor_thread_num,
omp_get_team_size, omp_get_active_level): New functions,
add ialias.
* sections.c (GOMP_sections_start): Call gomp_work_share_init_done
after gomp_sections_init. If HAVE_SYNC_BUILTINS, call
gomp_iter_dynamic_next instead of the _locked variant and don't take
lock around it, otherwise acquire it before calling
gomp_iter_dynamic_next_locked.
(GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
gomp_iter_dynamic_next instead of the _locked variant and don't take
lock around it.
(GOMP_parallel_sections_start): Call gomp_new_team instead of
gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0].
Adjust gomp_team_start caller. Pass count as second argument to
gomp_resolve_num_threads, don't adjust num_threads after the call.
Use gomp_icv.
* iter.c (gomp_iter_dynamic_next_locked): Don't multiply
ws->chunk_size by incr.
(gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient
code.
* libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
types.
(omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
(omp_check_defines): Check even the compat defines.
* config/linux/ptrlock.c: New file.
* config/linux/ptrlock.h: New file.
* config/linux/wait.h: New file.
* config/posix/ptrlock.c: New file.
* config/posix/ptrlock.h: New file.
* config/linux/bar.h (gomp_team_barrier_wait,
gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
(gomp_team_barrier_set_task_pending,
gomp_team_barrier_clear_task_pending,
gomp_team_barrier_set_waiting_for_tasks,
gomp_team_barrier_waiting_for_tasks,
gomp_team_barrier_done): New inlines.
(gomp_barrier_t): Rewritten.
(gomp_barrier_state_t): New typedef.
(gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
gomp_barrier_wait_start): Rewritten.
(gomp_barrier_wait_end): Change second argument to
gomp_barrier_state_t.
(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
inlines.
* config/linux/bar.c: Include wait.h instead of libgomp.h and
futex.h.
(gomp_barrier_wait_end): Rewritten.
(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
* config/posix/bar.h (gomp_barrier_t): Add generation field.
(gomp_barrier_state_t): New typedef.
(gomp_team_barrier_wait,
gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
(gomp_barrier_wait_start): Or all but low 2 bits from generation
into the return value. Return gomp_barrier_state_t.
(gomp_team_barrier_set_task_pending,
gomp_team_barrier_clear_task_pending,
gomp_team_barrier_set_waiting_for_tasks,
gomp_team_barrier_waiting_for_tasks,
gomp_team_barrier_done): New inlines.
(gomp_barrier_wait_end): Change second argument to
gomp_barrier_state_t.
(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
inlines.
* config/posix/bar.c (gomp_barrier_init): Clear generation field.
(gomp_barrier_wait_end): Change second argument to
gomp_barrier_state_t.
c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. * langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause. Add omp_private_outer_ref hook, add another argument to omp_clause_default_ctor hook. * langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define. (LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define. (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to hook_tree_tree_tree_tree_null. (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and LANG_HOOKS_OMP_PRIVATE_OUTER_REF. * hooks.c (hook_tree_tree_tree_tree_null): New function. * hooks.h (hook_tree_tree_tree_tree_null): New prototype. * tree.def (OMP_TASK): New tree code. * tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN, OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT, OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES, OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY, OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG, OMP_CLAUSE_COLLAPSE_EXPR): Define. (enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. (OMP_DIRECTIVE_P): Add OMP_TASK. (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes. (OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind. * tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED entries. (omp_clause_num_ops): Likewise. Increase OMP_CLAUSE_LASTPRIVATE num_ops to 2. (walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Walk OMP_CLAUSE_LASTPRIVATE_STMT. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. (dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops. * c-omp.c (c_finish_omp_for): Allow pointer iterators. Remove warning about unsigned iterators. Change decl/init/cond/incr arguments to TREE_VECs, check arguments for all collapsed loops. (c_finish_omp_taskwait): New function. (c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to ws_clauses. * c-parser.c (c_parser_omp_for_loop): Parse collapsed loops. Call default_function_array_conversion on init. Add par_clauses argument. If decl is present in parallel's lastprivate clause, change it to shared and add lastprivate clause for decl to OMP_FOR_CLAUSES. Add clauses argument, on success set OMP_FOR_CLAUSES to it. Look up collapse count in clauses. (c_parser_omp_for, c_parser_omp_parallel): Adjust c_parser_omp_for_loop callers. (OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE. (c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT. (c_parser_omp_clause_name): Handle collapse and untied clauses. (c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New functions. (c_parser_omp_clause_schedule): Handle schedule(auto). Include correct location in the error message. (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE and PRAGMA_OMP_CLAUSE_UNTIED. (OMP_TASK_CLAUSE_MASK): Define. (c_parser_omp_task, c_parser_omp_taskwait): New functions. (c_parser_omp_construct): Handle PRAGMA_OMP_TASK. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in OMP_CLAUSE_DECL. (conver_nonlocal_reference, convert_local_reference, convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL. Use OMP_TASKREG_* macros rather than OMP_PARALLEL_*. (walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes. * tree-gimple.c (is_gimple_stmt): Handle OMP_TASK. * c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes. * c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New. (PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New. * c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions. (c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. * c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas. * c-common.h (c_finish_omp_taskwait): New prototype. * gimple-low.c (lower_stmt): Handle OMP_TASK. * tree-parloops.c (create_parallel_loop): Create 1 entry vectors for OMP_FOR_{INIT,COND,INCR}. * tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers. (make_edges): Handle OMP_TASK. * tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. * tree-inline.c (estimate_num_insns_1): Handle OMP_TASK. * builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR, BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New. * omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT, BUILT_IN_GOMP_LOOP_ULL_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins. * gimplify.c (gimplify_omp_for): Allow pointer type for decl, handle POINTER_PLUS_EXPR. If loop counter has been replaced and original iterator is present in lastprivate clause or if collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. (gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK. (enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF. (omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed, if it is set, lookup var in outer contexts too. Handle OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. Handle vars that are supposed to be implicitly determined firstprivate for task regions. (gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed, if it is set, lookup var in outer contexts too. Set OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set. Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Take region_type as last argument instead of in_parallel and in_combined_parallel. (gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare): Adjust callers. (gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set. Call omp_finish_clause langhook. (new_omp_context): Set default_kind to OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions. (omp_region_type): New enum. (struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel fields, add region_type. (new_omp_context): Take region_type as argument instead of is_parallel and is_combined_parallel. (gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable, omp_is_private, omp_check_private): Adjust ctx->is_parallel and ctx->is_combined_parallel checks. (gimplify_omp_task): New function. (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. * omp-low.c (extract_omp_for_data): Use schedule(static) for schedule(auto). Handle pointer and unsigned iterators. Compute fd->iter_type. Handle POINTER_PLUS_EXPR increments. Add loops argument. Extract data for collapsed OMP_FOR loops. (expand_parallel_call): Assert sched_kind isn't auto, map runtime schedule to index 3. (struct omp_for_data_loop): New type. (struct omp_for_data): Remove v, n1, n2, step, cond_code fields. Add loop, loops, collapse and iter_type fields. (workshare_safe_to_combine_p): Disallow combined for if iter_type is unsigned long long. Don't combine collapse > 1 loops unless all bounds and steps are constant. Adjust extract_omp_for_data caller. (expand_omp_for_generic): Handle pointer, unsigned and long long iterators. Handle collapsed OMP_FOR loops. Adjust for struct omp_for_data changes. If libgomp function doesn't return boolean_type_node, add comparison of the return value with 0. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle pointer, unsigned and long long iterators. Adjust for struct omp_for_data changes. (expand_omp_for): Assert sched_kind isn't auto, map runtime schedule to index 3. Use GOMP_loop_ull*{start,next} if iter_type is unsigned long long. Allocate loops array, pass it to extract_omp_for_data. For collapse > 1 loops use always expand_omp_for_generic. (omp_context): Add sfield_map and srecord_type fields. (is_task_ctx, lookup_sfield): New functions. (use_pointer_for_field): Use is_task_ctx helper. Change first argument's type from const_tree to tree. Clarify comment. In OMP_TASK disallow copy-in/out sharing. (build_sender_ref): Call lookup_sfield instead of lookup_field. (install_var_field): Add mask argument. Populate both record_type and srecord_type if needed. (delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN in srecord_type. (fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT} and DECL_FIELD_OFFSET. (scan_sharing_clauses): Adjust install_var_field callers. For firstprivate clauses on explicit tasks allocate the var by value in record_type unconditionally, rather than by reference. Handle OMP_CLAUSE_PRIVATE_OUTER_REF. Scan OMP_CLAUSE_LASTPRIVATE_STMT. Use is_taskreg_ctx instead of is_parallel_ctx. Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. (create_omp_child_function_name): Add task_copy argument, use *_omp_cpyfn* names if it is true. (create_omp_child_function): Add task_copy argument, if true create *_omp_cpyfn* helper function. (scan_omp_parallel): Adjust create_omp_child_function callers. Rename parallel_nesting_level to taskreg_nesting_level. (scan_omp_task): New function. (lower_rec_input_clauses): Don't run constructors for firstprivate explicit task vars which are initialized by *_omp_cpyfn*. Pass outer var ref to omp_clause_default_ctor hook if OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE. Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in OMP_CLAUSE_REDUCTION_INIT. (lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to avoid duplicate setting of fields. Handle OMP_CLAUSE_PRIVATE_OUTER_REF. (lower_send_shared_vars): Use srecord_type if non-NULL. Don't copy-out if TREE_READONLY, only copy-in. (expand_task_copyfn): New function. (expand_task_call): New function. (struct omp_taskcopy_context): New type. (task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn): New functions. (lower_omp_parallel): Rename to... (lower_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed. Call create_task_copyfn if srecord_type is needed. Adjust sender_decl type. (task_shared_vars): New variable. (check_omp_nesting_restrictions): Warn if work-sharing, barrier, master or ordered region is closely nested inside OMP_TASK. Add warnings for barrier if closely nested inside of work-sharing, ordered, or master region. (scan_omp_1): Call check_omp_nesting_restrictions even for GOMP_barrier calls. Rename parallel_nesting_level to taskreg_nesting_level. Handle OMP_TASK. (lower_lastprivate_clauses): Even if some lastprivate is found on a work-sharing construct, continue looking for them on parent parallel construct. (lower_omp_for_lastprivate): Add lastprivate clauses to the beginning of dlist rather than end. Adjust for struct omp_for_data changes. (lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY, not after it. Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data caller. (get_ws_args_for): Adjust extract_omp_for_data caller. (scan_omp_for): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. (lower_omp_single_simple): If libgomp function doesn't return boolean_type_node, add comparison of the return value with 0. (diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. Handle OMP_TASK. (parallel_nesting_level): Rename to... (taskreg_nesting_level): ... this. (is_taskreg_ctx): New function. (build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead of is_parallel_ctx. (execute_lower_omp): Rename parallel_nesting_level to taskreg_nesting_level. (expand_omp_parallel): Rename to... (expand_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed. Call omp_task_call for OMP_TASK regions. (expand_omp): Adjust caller, handle OMP_TASK. (lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK. * bitmap.c (bitmap_default_obstack_depth): New variable. (bitmap_obstack_initialize, bitmap_obstack_release): Do nothing if argument is NULL and bitmap_default_obstack is already initialized. * ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release at the end. * matrix-reorg.c (matrix_reorg): Likewise. cp/ * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info, dependent_omp_for_p, begin_omp_task, finish_omp_task, finish_omp_taskwait): New prototypes. (cxx_omp_clause_default_ctor): Add outer argument. (finish_omp_for): Add new clauses argument. * cp-gimplify.c (cxx_omp_finish_clause): New function. (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten. (cxx_omp_clause_default_ctor): Add outer argument. (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT. * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define. * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops. Add par_clauses argument. If decl is present in parallel's lastprivate clause, change that clause to shared and add a lastprivate clause for decl to OMP_FOR_CLAUSES. Fix wording of error messages. Adjust finish_omp_for caller. Add clauses argument. Parse loops with random access iterators. (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New functions. (cp_parser_omp_for, cp_parser_omp_parallel): Adjust cp_parser_omp_for_loop callers. (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper functions. (cp_parser_omp_clause_name): Handle collapse and untied clauses. (cp_parser_omp_clause_schedule): Handle auto schedule. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE and PRAGMA_OMP_CLAUSE_UNTIED. (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE. (OMP_TASK_CLAUSE_MASK): Define. (cp_parser_omp_task, cp_parser_omp_taskwait): New functions. (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK. (cp_parser_pragma): Handle PRAGMA_OMP_TASK and PRAGMA_OMP_TASKWAIT. * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT. (tsubst_omp_for_iterator): New function. (dependent_omp_for_p): New function. (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR loops. Adjust finish_omp_for caller. Handle loops with random access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes. (tsubst_expr): Handle OMP_TASK. * semantics.c (cxx_omp_create_clause_info): New function. (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and OMP_CLAUSE_COLLAPSE. (cxx_omp_predetermined_sharing): Removed. * semantics.c (finish_omp_for): Allow pointer iterators. Use handle_omp_for_class_iterator and dependent_omp_for_p. Handle collapsed for loops. Adjust c_finish_omp_for caller. Add new clauses argument. Fix check for type dependent cond or incr. Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of fold_convert to convert incr amount to difference_type. Only fold if not in template. If decl is mentioned in lastprivate clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes. (finish_omp_threadprivate): Allow static class members of the current class. (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task, finish_omp_taskwait): New functions. * parser.c (cp_parser_binary_expression): Add prec argument. (cp_parser_assignment_expression): Adjust caller. * cp-tree.h (outer_curly_brace_block): New prototype. * decl.c (outer_curly_brace_block): No longer static. fortran/ * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs. * parse.c (next_free): Allow tab after !$omp. (decode_omp_directive): Handle !$omp task, !$omp taskwait and !$omp end task. (case_executable): Add ST_OMP_TASKWAIT. (case_exec_markers): Add ST_OMP_TASK. (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT. (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK. * gfortran.h (gfc_find_sym_in_expr): New prototype. (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT. (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind, OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and untied fields. (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR, LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define. * trans.h (gfc_omp_clause_default_ctor): Add another argument. (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes. * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG, BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR, BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New. (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather than boolean_type_node. * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK, EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses. (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. * st.c (gfc_free_statement): Likewise. * resolve.c (gfc_resolve_blocks, resolve_code): Likewise. (find_sym_in_expr): Rename to... (gfc_find_sym_in_expr): ... this. No longer static. (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller. * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New prototypes. * openmp.c (resolve_omp_clauses): Allow allocatable arrays in firstprivate, lastprivate, reduction, copyprivate and copyin clauses. (omp_current_do_code): Made static. (omp_current_do_collapse): New variable. (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse, clear omp_current_do_code and omp_current_do_collapse on return. (gfc_resolve_do_iterator): Handle collapsed do loops. (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops. (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define. (gfc_match_omp_clauses): Handle default (firstprivate), schedule (auto), untied and collapse (n) clauses. (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE. (OMP_TASK_CLAUSES): Define. (gfc_match_omp_task, gfc_match_omp_taskwait): New functions. * trans-openmp.c (gfc_omp_private_outer_ref): New function. (gfc_omp_clause_default_ctor): Add outer argument. For allocatable arrays allocate them with the bounds of the outer var if outer var is allocated. (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor): New functions. (gfc_trans_omp_array_reduction): If decl is allocatable array, allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT and deallocate it in OMP_CLAUSE_REDUCTION_MERGE. (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for assumed-size arrays. (gfc_trans_omp_do): Add par_clauses argument. If dovar is present in lastprivate clause and do loop isn't simple, set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in parallel's lastprivate clause, change it to shared and add lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops. (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers. (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to OMP_FOR from OMP_PARALLEL. (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses. (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT. gcc/testsuite/ * gcc.dg/gomp/collapse-1.c: New test. * gcc.dg/gomp/nesting-1.c: New test. * g++.dg/gomp/task-1.C: New test. * g++.dg/gomp/predetermined-1.C: New test. * g++.dg/gomp/tls-4.C: New test. * gfortran.dg/gomp/collapse1.f90: New test. * gfortran.dg/gomp/sharing-3.f90: New test. * gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning. * g++.dg/gomp/pr27499.C (foo): Likewise. * g++.dg/gomp/for-16.C (foo): Likewise. * g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition. * g++.dg/gomp/pr34607.C: Adjust dg-error location. * g++.dg/gomp/for-16.C (foo): Add a new dg-error. * gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning. * gcc.dg/gomp/appendix-a/a.35.6.c: Likewise. * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise. * gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test. * gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error about allocatable array. * gfortran.dg/gomp/reduction1.f90: Likewise. libgomp/ * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE. Substitute also OMP_*LOCK_25*. * configure: Regenerated. * config.h.in: Regenerated. * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c, ptrlock.c and task.c. * Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * task.c: New file. * loop_ull.c: New file. * iter_ull.c: New file. * libgomp.h: Include ptrlock.h. (enum gomp_task_kind): New type. (struct gomp_team): Add task_lock, task_queue, task_count, task_running_count, single_count fields. Add work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS. Remove work_share_lock, generation_mask, oldest_live_gen, num_live_gen and init_work_shares fields, add work work_share_list_alloc, work_share_list_free and work_share_chunk fields. Change work_shares from pointer to pointers into an array. Change ordered_release field into gomp_sem_t ** from flexible array member. Add implicit_task and initial_work_shares fields. Move close to the end of the struct. (struct gomp_team_state): Add single_count, last_work_share, active_level and level fields, remove work_share_generation. (gomp_barrier_handle_tasks): New prototype. (gomp_finish_task): New inline function. (struct gomp_work_share): Move chunk_size, end, incr into transparent union/struct, add chunk_size_ull, end_ll, incr_ll and next_ll fields. Reshuffle fields. Add next_alloc, next_ws, next_free and inline_ordered_team_ids fields, change ordered_team_ids into pointer from flexible array member. Add mode field. Put lock and next into a different cache line from most of the write-once fields. (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked, gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next, gomp_iter_ull_guided_next): New prototypes. (gomp_new_icv): New prototype. (struct gomp_thread): Add thread_pool and task fields. (struct gomp_thread_pool): New type. (gomp_new_team): New prototype. (gomp_team_start): Change type of last argument. (gomp_new_work_share): Removed. (gomp_init_work_share, gomp_fini_work_share): New prototypes. (gomp_work_share_init_done): New static inline. (gomp_throttled_spin_count_var, gomp_available_cpus, gomp_managed_threads): New extern decls. (gomp_init_task): New prototype. (gomp_spin_count_var): New extern var decl. (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility or no alias support, or if not PIC. (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30, gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30, gomp_destroy_nest_lock_30, gomp_set_nest_lock_30, gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25, gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25, gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25, gomp_set_nest_lock_25, gomp_unset_nest_lock_25, gomp_test_nest_lock_25): New prototypes. (omp_lock_symver, strong_alias): Define. (gomp_remaining_threads_count, gomp_remaining_threads_lock): New decls. (gomp_end_task): New. (struct gomp_task_icv, gomp_global_icv): New. (gomp_thread_limit_var, gomp_max_active_levels_var): New. (struct gomp_task): New. (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var, gomp_run_sched_var, gomp_run_sched_chunk): Remove. (gomp_icv): New. (gomp_schedule_type): Reorder enum to match omp_sched_t. * team.c (struct gomp_thread_start_data): Add thread_pool and task fields. (gomp_thread_start): Add gomp_team_barrier_wait call. For non-nested case remove clearing of docked thread thr fields. Use pool fields instead of global gomp_* variables. Use gomp_barrier_wait_last when needed. Initialize ts.active_level. Create tasks for each member thread. (free_team): Only destroy team barrier, task_lock here and free it. (gomp_free_thread): Free last_team if non-NULL. (gomp_team_end): Call gomp_team_barrier_wait instead of gomp_barrier_wait. For nested case call one extra gomp_barrier_wait. Move here some destruction from free_team. Call free_team on pool->last_team if any, rather than freeing current team. Destroy work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS. (gomp_new_icv): New function. (gomp_threads, gomp_threads_size, gomp_threads_used, gomp_threads_dock): Removed. (gomp_thread_destructor): New variable. (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New functions. (gomp_team_start): Create new pool if current thread doesn't have one. Use pool fields instead of global gomp_* variables. Initialize thread_pool field for new threads. Clear single_count. Change last argument from ws to team, don't create new team, set ts.work_share to &team->work_shares[0] and clear ts.last_work_share. Don't clear ts.work_share_generation. If number of threads changed, adjust atomically gomp_managed_threads. Use gomp_init_task instead of gomp_new_task, set thr->task to the corresponding implicit_task array entry. Create tasks for each member thread. Initialize ts.level. (initialize_team): Call pthread_key_create on gomp_thread_destructor. (team_destructor): New function. (new_team): Removed. (gomp_new_team): New function. (free_team): Free gomp_work_share blocks chained through next_alloc, instead of freeing work_shares and destroying work_share_lock. (gomp_team_end): Call gomp_fini_work_share. If number of threads changed, adjust atomically gomp_managed_threads. Use gomp_end_task. * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead of gomp_barrier_wait. * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait instead of gomp_barrier_wait. Call gomp_work_share_init_done if gomp_work_share_start returned true. Don't unlock ws->lock. (GOMP_single_copy_end): Call gomp_team_barrier_wait instead of gomp_barrier_wait. (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS. Call gomp_work_share_init_done if gomp_work_share_start returned true. Don't unlock ws->lock. * work.c: Include stddef.h. (free_work_share): Use work_share_list_free_lock instead of atomic chaining ifndef HAVE_SYNC_BUILTINS. Add team argument. Call gomp_fini_work_share and then either free ws if orphaned, or put it into work_share_list_free list of the current team. (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New functions. (gomp_work_share_start, gomp_work_share_end, gomp_work_share_end_nowait): Rewritten. * omp_lib.f90.in Change some tabs to spaces to prevent warnings. (openmp_version): Set to 200805. (omp_sched_kind, omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): New parameters. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New interfaces. * omp_lib.h.in (openmp_version): Set to 200805. (omp_sched_kind, omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): New parameters. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New externals. * loop.c: Include limits.h. (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle GFS_AUTO. (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start): Likewise. Use gomp_icv. (gomp_loop_static_start, gomp_loop_dynamic_start): Clear ts.static_trip here. (gomp_loop_static_start, gomp_loop_ordered_static_start): Call gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock. (gomp_loop_dynamic_start, gomp_loop_guided_start): Call gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS, don't unlock ws->lock, otherwise lock it. (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call gomp_work_share_init_done after gomp_loop_init. Lock ws->lock. (gomp_parallel_loop_start): Call gomp_new_team instead of gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0]. Adjust gomp_team_start caller. Pass 0 as second argument to gomp_resolve_num_threads. (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr. If adding ws->chunk_size nthreads + 1 times after end won't overflow, set ws->mode to 1. * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start, GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start, GOMP_loop_ull_ordered_static_start, GOMP_loop_ull_ordered_dynamic_start, GOMP_loop_ull_ordered_guided_start, GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next, GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next, GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next, GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next, GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New prototypes. * libgomp.map: Export lock routines also @@OMP_2.0. (GOMP_loop_ordered_dynamic_first, GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first, GOMP_loop_ordered_static_first): Remove. (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start, GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start, GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_dynamic_start, GOMP_loop_ull_ordered_guided_next, GOMP_loop_ull_ordered_guided_start, GOMP_loop_ull_ordered_runtime_next, GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_ordered_static_next, GOMP_loop_ull_ordered_static_start, GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start, GOMP_loop_ull_static_next, GOMP_loop_ull_static_start, GOMP_task, GOMP_taskwait): Export @@GOMP_2.0. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level, omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_, omp_set_max_active_levels_, omp_set_max_active_levels_8_, omp_get_max_active_levels_, omp_get_level_, omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_, omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_): New exports @@OMP_3.0. * omp.h.in (omp_sched_t): New type. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New prototypes. * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var, gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var, gomp_thread_limit_var, gomp_remaining_threads_count, gomp_remaining_threads_lock): New variables. (parse_spincount): New function. (initialize_env): Call gomp_init_num_threads unconditionally. Initialize gomp_available_cpus. Call parse_spincount, initialize gomp_{,throttled_}spin_count_var depending on presence and value of OMP_WAIT_POLICY and GOMP_SPINCOUNT env vars. Handle GOMP_BLOCKTIME env var. Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS, OMP_THREAD_LIMIT, OMP_STACKSIZE env vars. Handle unit specification for GOMP_STACKSIZE. Initialize gomp_remaining_threads_count and gomp_remaining_threads_lock if needed. Use gomp_global_icv. (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var, gomp_run_sched_var, gomp_run_sched_chunk): Remove. (gomp_global_icv): New. (parse_schedule): Use it. Parse "auto". (omp_set_num_threads): Use gomp_icv. (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested): Likewise. (omp_get_max_threads): Move from parallel.c. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels): New functions, add ialias. (parse_stacksize, parse_wait_policy): New functions. * fortran.c: Rewrite lock wrappers, if symbol versioning provide both wrappers for compatibility and new locks. (omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New ialias_redirect. (omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_, omp_set_max_active_levels_, omp_set_max_active_levels_8_, omp_get_max_active_levels_, omp_get_level_, omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_, omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_): New functions. * parallel.c: Include limits.h. (gomp_resolve_num_threads): Add count argument. Rewritten. (GOMP_parallel_start): Call gomp_new_team and pass that as last argument to gomp_team_start. Pass 0 as second argument to gomp_resolve_num_threads. (GOMP_parallel_end): Decrease gomp_remaining_threads_count if gomp_thread_limit_var != ULONG_MAX. (omp_in_parallel): Implement using ts.active_level. (omp_get_max_threads): Move to env.c. (omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level): New functions, add ialias. * sections.c (GOMP_sections_start): Call gomp_work_share_init_done after gomp_sections_init. If HAVE_SYNC_BUILTINS, call gomp_iter_dynamic_next instead of the _locked variant and don't take lock around it, otherwise acquire it before calling gomp_iter_dynamic_next_locked. (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call gomp_iter_dynamic_next instead of the _locked variant and don't take lock around it. (GOMP_parallel_sections_start): Call gomp_new_team instead of gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0]. Adjust gomp_team_start caller. Pass count as second argument to gomp_resolve_num_threads, don't adjust num_threads after the call. Use gomp_icv. * iter.c (gomp_iter_dynamic_next_locked): Don't multiply ws->chunk_size by incr. (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient code. * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New types. (omp_lock_25_arg, omp_nest_lock_25_arg): New macros. (omp_check_defines): Check even the compat defines. * config/linux/ptrlock.c: New file. * config/linux/ptrlock.h: New file. * config/linux/wait.h: New file. * config/posix/ptrlock.c: New file. * config/posix/ptrlock.h: New file. * config/linux/bar.h (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes. (gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): New inlines. (gomp_barrier_t): Rewritten. (gomp_barrier_state_t): New typedef. (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy, gomp_barrier_wait_start): Rewritten. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_barrier_last_thread, gomp_barrier_wait_last): New static inlines. * config/linux/bar.c: Include wait.h instead of libgomp.h and futex.h. (gomp_barrier_wait_end): Rewritten. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake, gomp_barrier_wait_last): New functions. * config/posix/bar.h (gomp_barrier_t): Add generation field. (gomp_barrier_state_t): New typedef. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes. (gomp_barrier_wait_start): Or all but low 2 bits from generation into the return value. Return gomp_barrier_state_t. (gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): New inlines. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_barrier_last_thread, gomp_barrier_wait_last): New static inlines. * config/posix/bar.c (gomp_barrier_init): Clear generation field. (gomp_barrier_wait_end): Change second argument to gomp_barrier_state_t. (gomp_team_barrier_wait, gomp_team_barrier_wait_end, gomp_team_barrier_wake): New functions. * config/linux/mutex.c: Include wait.h instead of libgomp.h and futex.h. (gomp_futex_wake, gomp_futex_wait): New variables. (gomp_mutex_lock_slow): Call do_wait instead of futex_wait. * config/linux/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. Include wait.h instead of libgomp.h and futex.h. (gomp_set_nest_lock_25): Call do_wait instead of futex_wait. * config/posix95/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. * config/posix/lock.c: Rewrite to make locks task owned, for backwards compatibility provide the old entrypoints if symbol versioning. * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv. (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv. * config/posix/proc.c, config/mingw32/proc.c: Similarly. * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove. (sys_futex0): Return error code. (futex_wake, futex_wait): If ENOSYS was returned, clear FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry. (cpu_relax, atomic_write_barrier): New static inlines. * config/linux/sem.c: Include wait.h instead of libgomp.h and futex.h. (gomp_sem_wait_slow): Call do_wait instead of futex_wait. * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS. * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_nest_lock_t): Change owner into void *, add lock field. * config/posix95/omp-lock.h: Include semaphore.h. (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_lock_t): Use sem_t instead of mutex if semaphores aren't broken. (omp_nest_lock_t): Likewise. Change owner to void *. * config/posix/omp-lock.h: Include semaphore.h. (omp_lock_25_t, omp_nest_lock_25_t): New types. (omp_lock_t): Use sem_t instead of mutex if semaphores aren't broken. (omp_nest_lock_t): Likewise. Add owner field. * testsuite/libgomp.c/collapse-1.c: New test. * testsuite/libgomp.c/collapse-2.c: New test. * testsuite/libgomp.c/collapse-3.c: New test. * testsuite/libgomp.c/icv-1.c: New test. * testsuite/libgomp.c/icv-2.c: New test. * testsuite/libgomp.c/lib-2.c: New test. * testsuite/libgomp.c/lock-1.c: New test. * testsuite/libgomp.c/lock-2.c: New test. * testsuite/libgomp.c/lock-3.c: New test. * testsuite/libgomp.c/loop-4.c: New test. * testsuite/libgomp.c/loop-5.c: New test. * testsuite/libgomp.c/loop-6.c: New test. * testsuite/libgomp.c/loop-7.c: New test. * testsuite/libgomp.c/loop-8.c: New test. * testsuite/libgomp.c/loop-9.c: New test. * testsuite/libgomp.c/nested-3.c: New test. * testsuite/libgomp.c/nestedfn-6.c: New test. * testsuite/libgomp.c/sort-1.c: New test. * testsuite/libgomp.c/task-1.c: New test. * testsuite/libgomp.c/task-2.c: New test. * testsuite/libgomp.c/task-3.c: New test. * testsuite/libgomp.c/task-4.c: New test. * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes to C++ testsuite default compiler options. * testsuite/libgomp.c++/collapse-1.C: New test. * testsuite/libgomp.c++/collapse-2.C: New test. * testsuite/libgomp.c++/ctor-10.C: New test. * testsuite/libgomp.c++/for-1.C: New test. * testsuite/libgomp.c++/for-2.C: New test. * testsuite/libgomp.c++/for-3.C: New test. * testsuite/libgomp.c++/for-4.C: New test. * testsuite/libgomp.c++/for-5.C: New test. * testsuite/libgomp.c++/loop-8.C: New test. * testsuite/libgomp.c++/loop-9.C: New test. * testsuite/libgomp.c++/loop-10.C: New test. * testsuite/libgomp.c++/task-1.C: New test. * testsuite/libgomp.c++/task-2.C: New test. * testsuite/libgomp.c++/task-3.C: New test. * testsuite/libgomp.c++/task-4.C: New test. * testsuite/libgomp.c++/task-5.C: New test. * testsuite/libgomp.c++/task-6.C: New test. * testsuite/libgomp.fortran/allocatable1.f90: New test. * testsuite/libgomp.fortran/allocatable2.f90: New test. * testsuite/libgomp.fortran/allocatable3.f90: New test. * testsuite/libgomp.fortran/allocatable4.f90: New test. * testsuite/libgomp.fortran/collapse1.f90: New test. * testsuite/libgomp.fortran/collapse2.f90: New test. * testsuite/libgomp.fortran/collapse3.f90: New test. * testsuite/libgomp.fortran/collapse4.f90: New test. * testsuite/libgomp.fortran/lastprivate1.f90: New test. * testsuite/libgomp.fortran/lastprivate2.f90: New test. * testsuite/libgomp.fortran/lib4.f90: New test. * testsuite/libgomp.fortran/lock-1.f90: New test. * testsuite/libgomp.fortran/lock-2.f90: New test. * testsuite/libgomp.fortran/nested1.f90: New test. * testsuite/libgomp.fortran/nestedfn4.f90: New test. * testsuite/libgomp.fortran/strassen.f90: New test. * testsuite/libgomp.fortran/tabs1.f90: New test. * testsuite/libgomp.fortran/tabs2.f: New test. * testsuite/libgomp.fortran/task1.f90: New test. * testsuite/libgomp.fortran/task2.f90: New test. * testsuite/libgomp.fortran/vla4.f90: Add dg-warning. * testsuite/libgomp.fortran/vla5.f90: Likewise. * testsuite/libgomp.c/pr26943-2.c: Likewise. * testsuite/libgomp.c/pr26943-3.c: Likewise. * testsuite/libgomp.c/pr26943-4.c: Likewise. Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de> Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Ulrich Drepper <drepper@redhat.com> From-SVN: r136433
2008-06-06 15:01:54 +02:00
(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
gomp_team_barrier_wake): New functions.
* config/linux/mutex.c: Include wait.h instead of libgomp.h and
futex.h.
(gomp_futex_wake, gomp_futex_wait): New variables.
(gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
* config/linux/lock.c: Rewrite to make locks task owned,
for backwards compatibility provide the old entrypoints
if symbol versioning. Include wait.h instead of libgomp.h and
futex.h.
(gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
* config/posix95/lock.c: Rewrite to make locks task owned,
for backwards compatibility provide the old entrypoints
if symbol versioning.
* config/posix/lock.c: Rewrite to make locks task owned,
for backwards compatibility provide the old entrypoints
if symbol versioning.
* config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
(get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
* config/posix/proc.c, config/mingw32/proc.c: Similarly.
* config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/sem.c: Include wait.h instead of libgomp.h and
futex.h.
(gomp_sem_wait_slow): Call do_wait instead of futex_wait.
* config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
* config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
types.
(omp_nest_lock_t): Change owner into void *, add lock field.
* config/posix95/omp-lock.h: Include semaphore.h.
(omp_lock_25_t, omp_nest_lock_25_t): New types.
(omp_lock_t): Use sem_t instead of mutex if semaphores
aren't broken.
(omp_nest_lock_t): Likewise. Change owner to void *.
* config/posix/omp-lock.h: Include semaphore.h.
(omp_lock_25_t, omp_nest_lock_25_t): New types.
(omp_lock_t): Use sem_t instead of mutex if semaphores
aren't broken.
(omp_nest_lock_t): Likewise. Add owner field.
2008-06-06 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/collapse-1.c: New test.
* testsuite/libgomp.c/collapse-2.c: New test.
* testsuite/libgomp.c/collapse-3.c: New test.
* testsuite/libgomp.c/icv-1.c: New test.
* testsuite/libgomp.c/icv-2.c: New test.
* testsuite/libgomp.c/lib-2.c: New test.
* testsuite/libgomp.c/lock-1.c: New test.
* testsuite/libgomp.c/lock-2.c: New test.
* testsuite/libgomp.c/lock-3.c: New test.
* testsuite/libgomp.c/loop-4.c: New test.
* testsuite/libgomp.c/loop-5.c: New test.
* testsuite/libgomp.c/loop-6.c: New test.
* testsuite/libgomp.c/loop-7.c: New test.
* testsuite/libgomp.c/loop-8.c: New test.
* testsuite/libgomp.c/loop-9.c: New test.
* testsuite/libgomp.c/nested-3.c: New test.
* testsuite/libgomp.c/nestedfn-6.c: New test.
* testsuite/libgomp.c/sort-1.c: New test.
* testsuite/libgomp.c/task-1.c: New test.
* testsuite/libgomp.c/task-2.c: New test.
* testsuite/libgomp.c/task-3.c: New test.
* testsuite/libgomp.c/task-4.c: New test.
* testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
to C++ testsuite default compiler options.
* testsuite/libgomp.c++/collapse-1.C: New test.
* testsuite/libgomp.c++/collapse-2.C: New test.
* testsuite/libgomp.c++/ctor-10.C: New test.
* testsuite/libgomp.c++/for-1.C: New test.
* testsuite/libgomp.c++/for-2.C: New test.
* testsuite/libgomp.c++/for-3.C: New test.
* testsuite/libgomp.c++/for-4.C: New test.
* testsuite/libgomp.c++/for-5.C: New test.
* testsuite/libgomp.c++/loop-8.C: New test.
* testsuite/libgomp.c++/loop-9.C: New test.
* testsuite/libgomp.c++/loop-10.C: New test.
* testsuite/libgomp.c++/task-1.C: New test.
* testsuite/libgomp.c++/task-2.C: New test.
* testsuite/libgomp.c++/task-3.C: New test.
* testsuite/libgomp.c++/task-4.C: New test.
* testsuite/libgomp.c++/task-5.C: New test.
* testsuite/libgomp.c++/task-6.C: New test.
* testsuite/libgomp.fortran/allocatable1.f90: New test.
* testsuite/libgomp.fortran/allocatable2.f90: New test.
* testsuite/libgomp.fortran/allocatable3.f90: New test.
* testsuite/libgomp.fortran/allocatable4.f90: New test.
* testsuite/libgomp.fortran/collapse1.f90: New test.
* testsuite/libgomp.fortran/collapse2.f90: New test.
* testsuite/libgomp.fortran/collapse3.f90: New test.
* testsuite/libgomp.fortran/collapse4.f90: New test.
* testsuite/libgomp.fortran/lastprivate1.f90: New test.
* testsuite/libgomp.fortran/lastprivate2.f90: New test.
* testsuite/libgomp.fortran/lib4.f90: New test.
* testsuite/libgomp.fortran/lock-1.f90: New test.
* testsuite/libgomp.fortran/lock-2.f90: New test.
* testsuite/libgomp.fortran/nested1.f90: New test.
* testsuite/libgomp.fortran/nestedfn4.f90: New test.
* testsuite/libgomp.fortran/strassen.f90: New test.
* testsuite/libgomp.fortran/tabs1.f90: New test.
* testsuite/libgomp.fortran/tabs2.f: New test.
* testsuite/libgomp.fortran/task1.f90: New test.
* testsuite/libgomp.fortran/task2.f90: New test.
* testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
* testsuite/libgomp.fortran/vla5.f90: Likewise.
* testsuite/libgomp.c/pr26943-2.c: Likewise.
* testsuite/libgomp.c/pr26943-3.c: Likewise.
* testsuite/libgomp.c/pr26943-4.c: Likewise.
2008-05-23 Jakub Jelinek <jakub@redhat.com>
PR c++/36308
* testsuite/libgomp.c++/ctor-11.C: New test.
* testsuite/libgomp.c++/ctor-12.C: New test.
libgomp.exp: Load torture-options.exp from gcc lib. libgomp: * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib. gcc/doc: * doc/sourcebuild.texi: Document support for torture tests. gcc/testsuite: * lib/torture-options.exp: New support for torture options. * lib/gfortran-dg.exp (gfortran-dg-runtest): Use new torture procs. * lib/c-torture.exp: Define C_TORTURE_OPTIONS instead of TORTURE_OPTIONS; don't define torture_with_loops and torture_without_loops. * lib/gcc-dg.exp: Define DG_TORTURE_OPTIONS instead of TORTURE_OPTIONS; don't define torture_with_loops and torture_without_loops. (gcc-dg-runtest): Use new torture procs if no torture options defined. * lib/fortran-torture.exp: Define FORTRAN_TORTURE_OPTIONS instead of TORTURE_OPTIONS. (fortran-torture-execute): Use torture_with_loops instead of TORTURE_OPTIONS. (fortran-torture): Ditto. * lib/objc-torture.exp: Define OBJC_TORTURE_OPTIONS instead of TORTURE_OPTIONS; don't define torture_with_loops and torture_without_loops. * gcc.c-torture/execute/execute.exp: Use new torture procs. * gcc.c-torture/execute/builtins/builtins.exp: Ditto. * gcc.c-torture/execute/ieee/ieee.exp: Ditto. * gcc.c-torture/unsorted/unsorted.exp: Ditto. * gfortran.fortran-torture/execute/execute.exp: Ditto. * gfortran.fortran-torture/compile/compile.exp: Ditto. * gcc.target/x86_64/abi/abi-x86_64.exp: Ditto. * gcc.target/i386/math-torture/math-torture.exp: Define MATH_TORTURE_OPTIONS, use new torture procs. * gcc.dg/pch/pch.exp: Use new torture procs. * gcc.dg/format/format.exp: Ditto. * gcc.misc-tests/i386-prefetch.exp: Ditto. * gcc.misc-tests/dectest.exp: Ditto. * objc.dg/pch/pch.exp: Ditto. * objc/execute/execute.exp: Ditto. * objc/execute/exceptions/exceptions.exp: Ditto. * objc/compile/compile.exp: Ditto. From-SVN: r135381
2008-05-15 18:59:21 +02:00
2008-05-15 Janis Johnson <janis187@us.ibm.com>
* testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
2008-05-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/36106
* testsuite/libgomp.c/atomic-5.c: New test.
* testsuite/libgomp.c/atomic-6.c: New test.
* testsuite/libgomp.c/autopar-1.c: New test.
2008-04-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
(LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
(LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
(LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
* configure: Regenerate.
* Makefile.in, testsuite/Makefile.in: Likewise.
re PR other/35457 (Error building GCC trunk on CELL SPU) 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * configure.ac: Include override.m4. * configure: Regenerate. libgomp: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libdecnumber: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. gcc: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libstdc++-v3: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libobjc: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. intl: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libgfortran: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libmudflap: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. boehm-gc: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libiberty: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Add override.m4. * configure: Regenerate. libffi: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libssp: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. config: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * confsubdir.m4: Rename to... * override.m4: ... this. Make sure aclocal always picks it. Add more lenient precious variable check, backported from autoconf trunk. libjava/libltdl: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libjava/classpath: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libjava: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. libcpp: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * aclocal.m4: Regenerate. * configure: Regenerate. fixincludes: 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 * Makefile.in: Rewrite aclocal.m4 rule. * aclocal.m4: Regenerate. * configure: Regenerate. From-SVN: r134434
2008-04-18 12:28:53 +02:00
2008-04-18 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/35457
* aclocal.m4: Regenerate.
* configure: Regenerate.
2008-03-18 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35611
* testsuite/libgomp.c/atomic-4.c: New test.
PR libgomp/35625
* iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
(gomp_iter_guided_next): Likewise.
* testsuite/libgomp.c/pr35625.c: New test.
configure.ac: m4_include config/proginstall.m4. 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure.ac: m4_include config/proginstall.m4. * configure: Regenerate. config/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * proginstall.m4: New file, with fixed AC_PROG_INSTALL. libjava/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * Makefile.am (install-data-local): Rewrite to be more efficient, using awk, and `install' with multiple files at once. Do not gather more than 50 files in one go to avoid hitting command line limits. (install_data_local_split): New variable. * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. * gcj/Makefile.in: Likewise. * include/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. boehm-gc/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. * include/Makefile.in: Likewise. libffi/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. * include/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. libgfortran/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. libgomp/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. libmudflap/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. libssp/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. libssp/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. libstdc++-v3/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. * doc/Makefile.in: Likewise. * include/Makefile.in: Likewise. * libmath/Makefile.in: Likewise. * libsupc++/Makefile.in: Likewise. * po/Makefile.in: Likewise. * src/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. zlib/ 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. From-SVN: r133269
2008-03-16 09:19:08 +01:00
2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* aclocal.m4: Regenerate.
* configure: Likewise.
* Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
2008-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35185
* testsuite/libgomp.c++/pr35185.C: New test.
2008-03-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35549
* testsuite/libgomp.c/pr35549.c: New test.
2008-03-06 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/atomic-3.c: New test.
re PR fortran/33197 (Fortran 2008: math functions) PR fortran/33197 gcc/fortran/ * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH, ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N}, ERFC_SCALED, LOG_GAMMA and HYPOT. * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot, gfc_resolve_hypot): New prototypes. * mathbuiltins.def: Add HYPOT builtin. Make complex versions of ACOSH, ASINH and ATANH available. * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values. * lang.opt: Add -std=f2008 option. * libgfortran.h: Define GFC_STD_F2008. * lang-specs.h: Add .f08 and .F08 file suffixes. * iresolve.c (gfc_resolve_hypot): New function. * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008. * check.c (gfc_check_hypot): New function. * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin. * options.c (set_default_std_flags): Allow Fortran 2008 by default. (form_from_filename): Add .f08 suffix. (gfc_handle_option): Handle -std=f2008 option. * simplify.c (gfc_simplify_hypot): New function. * gfortran.texi: Document Fortran 2008 status and file extensions. * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics, as well as HYPOT and ERFC_SCALED. Update documentation of ERF, ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH. * invoke.texi: Document the new -std=f2008 option. libgomp/ * testsuite/libgomp.fortran/fortran.exp: Add .f08 and .F08 file suffixes. gcc/testsuite/ * gfortran.dg/gomp/gomp.exp: Add .f08 and .F08 file suffixes. * gfortran.dg/dg.exp: Likewise. * gfortran.dg/vect/vect.exp: Likewise. * gfortran.fortran-torture/execute/execute.exp: Likewise. * gfortran.fortran-torture/compile/compile.exp: Likewise. * gfortran.dg/gamma_1.f90: Also check log_gamma. * gfortran.dg/invalid_contains_1.f90: Remove warning about empty CONTAINS. * gfortran.dg/gamma_2.f90: Add a few error messages. * gfortran.dg/invalid_contains_2.f90: Remove warning about empty CONTAINS. * gfortran.dg/gamma_3.f90: Adjust error message. * gfortran.dg/gamma_4.f90: Test for log_gamma instead of lgamma. * gfortran.dg/bind_c_usage_9.f03: Adjust error messages. * gfortran.dg/bessel_1.f90: New test. * gfortran.dg/recursive_check_3.f90: Remove warnings. * gfortran.dg/besxy.f90: Also check for new F2008 intrinsics. * gfortran.dg/derived_function_interface_1.f90: Remove warning. * gfortran.dg/contains_empty_1.f03: New test. * gfortran.dg/erfc_scaled_1.f90: New test. * gfortran.dg/hypot_1.f90: New test. * gfortran.dg/contains_empty_2.f03: New test. libgfortran/ * intrinsics/erfc_scaled_inc.c: New file. * intrinsics/erfc_scaled.c: New file. * gfortran.map (GFORTRAN_1.0): Add _gfortran_erfc_scaled_r*. * Makefile.am: Add intrinsics/erfc_scaled.c. * config.h.in: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. From-SVN: r132846
2008-03-04 00:46:20 +01:00
2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33197
* testsuite/libgomp.fortran/fortran.exp: Add .f08 and
re PR fortran/33197 (Fortran 2008: math functions) PR fortran/33197 gcc/fortran/ * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH, ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N}, ERFC_SCALED, LOG_GAMMA and HYPOT. * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot, gfc_resolve_hypot): New prototypes. * mathbuiltins.def: Add HYPOT builtin. Make complex versions of ACOSH, ASINH and ATANH available. * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values. * lang.opt: Add -std=f2008 option. * libgfortran.h: Define GFC_STD_F2008. * lang-specs.h: Add .f08 and .F08 file suffixes. * iresolve.c (gfc_resolve_hypot): New function. * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008. * check.c (gfc_check_hypot): New function. * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin. * options.c (set_default_std_flags): Allow Fortran 2008 by default. (form_from_filename): Add .f08 suffix. (gfc_handle_option): Handle -std=f2008 option. * simplify.c (gfc_simplify_hypot): New function. * gfortran.texi: Document Fortran 2008 status and file extensions. * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics, as well as HYPOT and ERFC_SCALED. Update documentation of ERF, ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH. * invoke.texi: Document the new -std=f2008 option. libgomp/ * testsuite/libgomp.fortran/fortran.exp: Add .f08 and .F08 file suffixes. gcc/testsuite/ * gfortran.dg/gomp/gomp.exp: Add .f08 and .F08 file suffixes. * gfortran.dg/dg.exp: Likewise. * gfortran.dg/vect/vect.exp: Likewise. * gfortran.fortran-torture/execute/execute.exp: Likewise. * gfortran.fortran-torture/compile/compile.exp: Likewise. * gfortran.dg/gamma_1.f90: Also check log_gamma. * gfortran.dg/invalid_contains_1.f90: Remove warning about empty CONTAINS. * gfortran.dg/gamma_2.f90: Add a few error messages. * gfortran.dg/invalid_contains_2.f90: Remove warning about empty CONTAINS. * gfortran.dg/gamma_3.f90: Adjust error message. * gfortran.dg/gamma_4.f90: Test for log_gamma instead of lgamma. * gfortran.dg/bind_c_usage_9.f03: Adjust error messages. * gfortran.dg/bessel_1.f90: New test. * gfortran.dg/recursive_check_3.f90: Remove warnings. * gfortran.dg/besxy.f90: Also check for new F2008 intrinsics. * gfortran.dg/derived_function_interface_1.f90: Remove warning. * gfortran.dg/contains_empty_1.f03: New test. * gfortran.dg/erfc_scaled_1.f90: New test. * gfortran.dg/hypot_1.f90: New test. * gfortran.dg/contains_empty_2.f03: New test. libgfortran/ * intrinsics/erfc_scaled_inc.c: New file. * intrinsics/erfc_scaled.c: New file. * gfortran.map (GFORTRAN_1.0): Add _gfortran_erfc_scaled_r*. * Makefile.am: Add intrinsics/erfc_scaled.c. * config.h.in: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. From-SVN: r132846
2008-03-04 00:46:20 +01:00
.F08 file suffixes.
2008-03-03 Peter O'Gorman <pogma@thewrittenword.com>
PR libgomp/33131
* configure.ac: Add ACX_HEADER_STRING.
* env.c: Include strings.h.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2008-02-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35196
* testsuite/libgomp.c/pr35196.c: New test.
PR middle-end/35130
* testsuite/libgomp.fortran/pr35130.f90: New test.
* testsuite/libgomp.c/pr35130.c: New test.
2008-01-25 Jakub Jelinek <jakub@redhat.com>
PR middle-end/33880
* testsuite/libgomp.c/pr33880.c: New test.
* testsuite/libgomp.fortran/pr33880.f90: New test.
2008-01-24 17:25:43 +01:00
2008-01-24 David Edelsohn <edelsohn@gnu.org>
* configure: Regenerate.
2008-01-08 Jakub Jelinek <jakub@redhat.com>
* configure.ac: Move futex checking into ../config/futex.m4.
* configure: Rebuilt.
* aclocal.m4: Rebuilt.
* Makefile.in: Rebuilt.
* configure.tgt: Rename have_tls to gcc_cv_have_tls to match
2007-10-15 ../config/tls.m4 change.
2007-12-19 Jakub Jelinek <jakub@redhat.com>
PR c++/34513
* testsuite/libgomp.c/pr34513.c: New test.
* testsuite/libgomp.c++/pr34513.C: New test.
2007-12-17 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/32765
* testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
2007-12-04 Jakub Jelinek <jakub@redhat.com>
* omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes.
2007-12-03 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/private-1.c: New test.
2007-11-29 Andris Pavenis <andris.pavenis@iki.fi>
Paolo Bonzini <bonzini@gnu.org>
* Makefile.am: Use space as vpath separator. Use 'vpath %'
instead of 'VPATH ='.
* Makefile.in: Regenerate.
2007-11-23 Matthias Klose <doko@ubuntu.com>
* configure.ac: Adjust makeinfo version check.
* configure: Regenerate.
2007-11-10 Jakub Jelinek <jakub@redhat.com>
PR fortran/34020
* testsuite/libgomp.fortran/pr34020.f90: New test.
2007-11-06 Jakub Jelinek <jakub@redhat.com>
PR c++/33894
* testsuite/libgomp.c++/atomic-1.C: New test.
2007-10-25 Jakub Jelinek <jakub@redhat.com>
PR libgomp/33275
* testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
Make x and y integers rather than (implicit) reals. Add private (j)
clause to the last omp parallel.
2007-10-15 Maciej W. Rozycki <macro@linux-mips.org>
* configure: Regenerate following changes to ../config/tls.m4.
2007-09-28 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/stack.f90: New test.
2007-09-10 Danny Smith <dannysmith@users.sourceforge.net>
* config/mingw32/proc.c: New file.
cpuid.h: New file. * gcc/config/i386/cpuid.h: New file. * gcc/config/i386/driver-i386.c: Include cpuid.h. (describe_cache): Shrink size and line strings to 100 bytes. (detect_caches_amd): Return "" for unsupported max_ext_level. Use __cpuid function. (detect_caches_intel): Return "" for unsupported max_level. Use __cpuid function. (host_detect_local_cpu): Change feature flag variables to unsigned int. Initialize only extended feature flag variables. Use __get_cpuid_max to determine max supported cpuid level. Use __cpuid function to determine supported features. Fix calculation of family id. Remove is_amd and check signature directly. Check for Geode signature. Handle family 4 id. [PROCESSOR_GENERIC32]: New default for unknown family id. Move cpu discovery code to other part of the function. [PROCESSOR_PENTIUM, PROCESSOR_K6, PROCESSOR_ATHLON]: Do not tune for sub-architecture. [PROCESSOR_PENTIUMPRO]: Simplify cpu discovery code. [PROCESSOR_K8]: Add k8-sse3 architecture. [PROCESSOR_GENERIC64]: Remove. * gcc/config/i386/x-i386 (driver-i386.o): Depend on cpuid.h. * gcc/config/i386/crtfastmath.c: Include cpuid.h. Use __get_cpuid to check for SSE and FXSAVE support. * gcc/config/i386/t-crtfm (crtfastmath.o): Depend on cpuid.h. Add -minline-all-stringops. * gcc/config.gcc (i[34567]86-*-*): Add cpuid.h to extra_headers. (x86_64-*-*): Ditto. testsuite/ChangeLog: * gcc.dg/i386-cpuid.h: Remove. * gcc.target/i386/mmx-check.h: Include cpuid.h. Use __get_cpuid. * gcc.target/i386/sse-check.h: Ditto. * gcc.target/i386/sse2-check.h: Ditto. * gcc.target/i386/sse3-check.h: Ditto. * gcc.target/i386/ssse3-check.h: Ditto. * gcc.target/i386/sse4_1-check.h: Ditto. * gcc.target/i386/sse4_2-check.h: Ditto. * gcc.target/i386/sse4a-check.h: Ditto. * gcc.dg/torture/pr16104-1.c: Ditto. * gcc.target/i386/mmx-4.c: Do not use NOINLINE. * gcc.target/i386/sse-6.c: Ditto. * gcc.target/i386/sse-7.c: Ditto. * g++.dg/other/i386-1.C: Include cpuid.h. (main): New function. Use __get_cpuid to check target fetaures. libgomp/ChangeLog: * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets. (main): Use __get_cpuid to get i386 target fetaures. * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets. (main): Use __get_cpuid to get x86_64 target fetaures. From-SVN: r128141
2007-09-05 19:43:01 +02:00
2007-09-05 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
(main): Use __get_cpuid to get i386 target fetaures.
* testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
(main): Use __get_cpuid to get x86_64 target fetaures.
2007-08-15 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/32765
* testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
* testsuite/libgomp.fortran/crayptr2.f90: Likwise.
2007-07-12 Jakub Jelinek <jakub@redhat.com>
PR fortran/32550
* testsuite/libgomp.fortran/pr32550.f90: New test.
* testsuite/libgomp.fortran/crayptr2.f90: New test.
2007-07-05 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
2007-07-05 Tobias Burnus <burnus@net-b.de>
PR fortran/32359
* testsuite/libgomp.fortran/pr32359.f90: New.
2007-07-02 Jakub Jelinek <jakub@redhat.com>
PR libgomp/32468
* sections.c (GOMP_parallel_sections_start): Only decrease
number of threads to COUNT if dyn_var is true.
* testsuite/libgomp.c/pr32468.c: New test.
2007-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR libgomp/26308
* config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
2007-06-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/32362
* testsuite/libgomp.c/pr32362-1.c: New test.
* testsuite/libgomp.c/pr32362-2.c: New test.
* testsuite/libgomp.c/pr32362-3.c: New test.
2007-06-07 Jakub Jelinek <jakub@redhat.com>
* team.c (gomp_team_start): Fix setting up thread_attr
stack size.
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
* configure: Regenerate.
2007-05-23 Steve Ellcey <sje@cup.hp.com>
* Makefile.in: Regenerate.
* configure: Regenerate.
* aclocal.m4: Regenerate.
* testsuite/Makefile.in: Regenerate.
2007-05-04 Jakub Jelinek <jakub@redhat.com>
* config/linux/proc.c: New file.
PR libgomp/28482
* configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
2007-04-19 Daniel Franke <franke.daniel@gmail.com>
* libgomp.texi (GOMP_CPU_AFFINITY): Updated.
2007-04-16 Matthias Klose <doko@debian.org>
* configure.tgt (i[456]86-*-linux*): Only add ia32 specific
flags if not building with -m64.
* testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
flag for i?86-*-* targets, if current target matches -m64.
2007-04-14 Steve Ellcey <sje@cup.hp.com>
* Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
* Makefile.in: Regenerate.
2007-04-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/31369
* testsuite/libgomp.c++/c++.exp: Don't use concat when setting
ld_library_path.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
2007-04-04 Jakub Jelinek <jakub@redhat.com>
* libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
decls.
(gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
* env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
(parse_affinity): New function.
(initialize_env): Call it and gomp_init_affinity.
* team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
create new pthread_attr_t and call gomp_init_thread_affinity
on it for each thread before passing the attribute to pthread_create.
* config/linux/affinity.c: New file.
* config/posix/affinity.c: New file.
* configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
* configure: Rebuilt.
* config.h.in: Rebuilt.
* Makefile.am (libgomp_la_SOURCES): Add affinity.c.
* Makefile.in: Rebuilt.
2007-03-23 Andreas Tobler <a.tobler@schweiz.org>
* testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
*-*-darwin*.
* testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
and use it if found.
2007-03-18 Uros Bizjak <ubizjak@gmail.com>
* testsuite/config/default.exp: New file.
* testsuite/lib/libgomp.exp: New file.
* testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
load_lib *, load_gcc_lib *): Move to libgomp.exp.
(libgomp_load): Remove.
* testsuite/lib/libgomp.exp (libgomp_init): Compute
always_ld_library_path, not ld_library_path. Set additional_flags
to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
(target_compile): Do not call libgomp_init. Append lang_library_path
and lang_link_flags to options.
* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set
ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH
here.
* testsuite/libgomp.c++/c++.exp: Set ld_library_path from
always_ld_library_path. Set LD_LIBRARY_PATH here.
* testsuite/libgomp.fortran/fortran.exp: Ditto.
* testsuite/libgomp.c/atomic-1.c: Set dg-options to
"-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
CX8 flag.
* testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
* testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
* testsuite/libgomp.c/pr29947-1.c: Ditto.
* testsuite/libgomp.c/atomic-10.c: Ditto.
2007-03-21 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
dg-final cleanup-modules line.
* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
* testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
* testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
* testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
* testsuite/libgomp.fortran/reduction5.f90: Likewise.
* testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
* testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
2007-03-18 Andreas Schwab <schwab@suse.de>
* acinclude.m4: Adjust regular expression for ld version
extraction.
* configure: Regenerate.
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
* Makefile.am: Add install-pdf target as copied from
automake v1.10 rules.
* Makefile.in: Regenerate
2007-02-07 Jakub Jelinek <jakub@redhat.com>
PR libgomp/28486
* configure: Regenerate.
PR c++/30703
* testsuite/libgomp.c++/pr30703.C: New test.
2007-02-02 Jakub Jelinek <jakub@redhat.com>
Revert:
2006-07-05 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on host OS.
* configure: Regenerate.
2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libgomp.texi: Fix spacing after abbreviations.
2007-01-31 Daniel Franke <franke.daniel@gmail.com>
PR libgomp/30546
* configure.ac: Add check for makeinfo
* Makefile.am: Redefined target libgomp.info, build libgomp.info only
if an appropiate version of makeinfo is found.
* aclocal.m4: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
2007-01-29 Daniel Franke <franke.daniel@gmail.com>
PR libgomp/30540
* libgomp.texi: More about implementation-dependent settings.
2007-01-26 Tobias Burnus <burnus@net-b.de>
* testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
2007-01-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/30494
* testsuite/libgomp.c/pr30494.c: New test.
2007-01-15 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.
* configure.ac: Fixed comment.
2007-01-14 Daniel Franke <franke.daniel@gmail.com>
* libgomp.texi: Document implementation specific default values of
environment variables.
2006-12-21 Daniel Franke <franke.daniel@gmail.com>
PR libgomp/28209
* libgomp.texi: New file.
* configure.ac: Add --enable-generated-files-in-srcdir option.
* Makefile.am: Add info, dvi, pdf, html targets. On request, copy
files to srcdir.
* Makefile.in: Regenerated.
* config.h.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* NOTES: Removed.
2006-12-04 Daniel Franke <franke.daniel@gmail.com>
PR libgomp/29949
* env.c (omp_set_num_threads): Set illegal thread count to 1.
2006-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
* configure: Regenerate.
2006-12-04 Jakub Jelinek <jakub@redhat.com>
PR libgomp/29947
* loop.c (gomp_loop_init): Make parameters signed. Set ws->end to
start if there shouldn't be any loop iterations.
(gomp_loop_ordered_static_start): Remove start == end test.
* testsuite/libgomp.c/pr29947-1.c: New test.
* testsuite/libgomp.c/pr29947-2.c: New test.
2006-12-02 Eric Botcazou <ebotcazou@libertysurf.fr>
* configure.tgt: Force initial-exec TLS model on Linux only.
2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
* configure: Regenerated.
2006-11-09 Uros Bizjak <ubizjak@gmail.com>
* env.c (parse_schedule): Reject out of range values.
(parse_unsigned_long): Reject out of range, negative or zero values.
2006-10-29 Jakub Jelinek <jakub@redhat.com>
PR fortran/29629
* testsuite/libgomp.fortran/pr29629.f90: New test.
2006-10-24 Eric Botcazou <ebotcazou@libertysurf.fr>
PR libgomp/29494
* configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
* config/posix95: New directory.
* config/posix95/omp-lock.h: New file.
* config/posix95/lock.c: Likewise.
2006-10-14 Geoffrey Keating <geoffk@apple.com>
* aclocal.m4: Regenerate.
* configure: Regenerate.
2006-10-05 Danny Smith <dannysmith@users.sourceforge.net>
* testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
'<' to '<='.
2006-10-05 Danny Smith <dannysmith@users.sourceforge.net>
* acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
test.
* configure: Regenerate.
* fortran.c (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
2006-09-26 Jakub Jelinek <jakub@redhat.com>
PR middle-end/25261
PR middle-end/28790
* testsuite/libgomp.c/nestedfn-4.c: New test.
* testsuite/libgomp.c/nestedfn-5.c: New test.
* testsuite/libgomp.fortran/nestedfn3.f90: New test.
PR fortran/29097
* testsuite/libgomp.fortran/condinc1.f: New test.
* testsuite/libgomp.fortran/condinc2.f: New test.
* testsuite/libgomp.fortran/condinc3.f90: New test.
* testsuite/libgomp.fortran/condinc4.f90: New test.
* testsuite/libgomp.fortran/condinc1.inc: New file.
2006-09-18 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.
2006-09-13 Joseph S. Myers <joseph@codesourcery.com>
PR c/28768
PR preprocessor/14634
* configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
to AC_DEFINE.
* configure: Regenerate.
2006-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
* testsuite/libgomp.fortran/reduction3.f90: Change
-2147483648 to -huge(i)-1 to avoid overflow.
* testsuite/libgomp.fortran/reduction4.f90: Change
Z'ffffffff' to not(0) to avoid overflow.
2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
PR libgomp/25938
* Makefile.am (libsubincludedir): New.
(nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
* Makefile.in: Regenerate.
2006-08-17 Jakub Jelinek <jakub@redhat.com>
PR libgomp/28725
* env.c: Include ctype.h.
(parse_schedule, parse_unsigned_long, parse_boolean): Allow
leading and/or trailing whitespace and compare strings case
insensitively.
2006-07-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/28390
* testsuite/libgomp.fortran/pr28390.f: New test.
2006-07-05 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on host OS.
* configure: Regenerate.
2006-06-21 Jakub Jelinek <jakub@redhat.com>
* critical.c (GOMP_critical_name_start): Fix *pptr initialization
when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
defined.
2006-06-20 Jakub Jelinek <jakub@redhat.com>
PR libgomp/26175
PR libgomp/26477
* configure.ac: If neither --enable-linux-futex nor
--disable-linux-futex is passed, determine the default by checking
for compiling and/or running against NPTL. With --enable-linux-futex,
check if SYS_gettid and SYS_futex are defined.
* configure: Rebuilt.
2006-06-14 Richard Henderson <rth@redhat.com>
PR libgomp/28008
* env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
undefined. Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
2006-06-09 Richard Henderson <rth@redhat.com>
* env.c (gomp_nthreads_var): Change to unsigned long.
(gomp_run_sched_chunk): Likewise.
(parse_unsigned_long): Rename from parse_num_threads and generalize.
(initialize_env): Initialize gomp_thread_attr.
* libgomp.h (gomp_nthreads_var): Update decl.
(gomp_run_sched_chunk): Likewise.
(gomp_thread_attr): Declare.
* team.c (gomp_thread_attr): Export.
(initialize_team): Don't initialize it.
2006-06-09 Jakub Jelinek <jakub@redhat.com>
PR fortran/27916
* testsuite/libgomp.fortran/pr27916-1.f90: New test.
* testsuite/libgomp.fortran/pr27916-2.f90: New test.
2006-06-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* config/mingw32/time.c: New file.
* configure.tgt: Use it.
2006-05-23 Carlos O'Donell <carlos@codesourcery.com>
* Makefile.am: Add install-html target. Add install-html to .PHONY
* Makefile.in: Regenerate.
2006-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR libgomp/27612
* testsuite/libgomp.c/sections-1.c: Require sync_int_long.
* testsuite/libgomp.c/critical-1.c: Likewise.
* testsuite/libgomp.c/loop-1.c: Likewise.
* testsuite/libgomp.c/loop-2.c: Likewise.
* testsuite/libgomp.c/single-1.c: Likewise.
* testsuite/libgomp.c/ordered-1.c: Likewise.
* testsuite/libgomp.c/ordered-2.c: Likewise.
2006-05-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/27416
* libgomp.fortran/pr27416-1.f90: New test.
2006-05-03 Jakub Jelinek <jakub@redhat.com>
PR fortran/27395
* testsuite/libgomp.fortran/pr27395-1.f90: New test.
* testsuite/libgomp.fortran/pr27395-2.f90: New test.
2006-05-02 Jakub Jelinek <jakub@redhat.com>
PR c++/26943
* testsuite/libgomp.c/pr26943-1.c: New test.
* testsuite/libgomp.c/pr26943-2.c: New test.
* testsuite/libgomp.c/pr26943-3.c: New test.
* testsuite/libgomp.c/pr26943-4.c: New test.
* testsuite/libgomp.c++/pr27337.C: Remove barrier.
* testsuite/libgomp.c++/pr26943.C: New test.
2006-05-02 Jakub Jelinek <jakub@redhat.com>
PR middle-end/27337
* testsuite/libgomp.c++/pr27337.C: New test.
2006-04-26 Jakub Jelinek <jakub@redhat.com>
PR c/26171
* testsuite/libgomp.c/pr26171.c: New test.
2006-04-25 Richard Henderson <rth@redhat.com>
PR libgomp/25865
* configure.ac: Use GCC_CHECK_TLS.
* acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
* Makefile.in, aclocal.m4, configure: Regenerate.
2006-04-10 Matthias Klose <doko@debian.org>
* testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
directory names containing underscores.
2006-03-21 Jakub Jelinek <jakub@redhat.com>
PR c++/26691
* testsuite/libgomp.c++/pr26691.C: New test.
2006-03-13 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/retval2.f90: New test.
2006-03-09 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.c++: New directory.
2006-02-25 Shantonu Sen <ssen@opendarwin.org>
* config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
* config/posix/sem.c: Implement the above.
2006-02-25 Andreas Tobler <a.tobler@schweiz.ch>
* configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
define HAVE_BROKEN_POSIX_SEMAPHORES.
* configure: Rebuilt.
* config.h.in: Rebuilt.
2006-02-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR bootstrap/26161
* configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
for the other pthread check.
* configure: Regenerate.
* config.h.in: Regenerate.
2006-02-15 Jakub Jelinek <jakub@redhat.com>
PR libgomp/25938
PR libgomp/25984
* Makefile.am (fincludedir): New variable.
(nodist_include_HEADERS): Remove Fortran files.
(nodist_finclude_HEADERS): New variable.
* Makefile.in: Regenerated.
re PR fortran/25162 (Issue with OpenMP COPYIN and gfortran) gcc/fortran/ 2006-02-14 Jakub Jelinek <jakub@redhat.com> Richard Henderson <rth@redhat.com> Diego Novillo <dnovillo@redhat.com> * invoke.texi: Document -fopenmp. * gfortran.texi (Extensions): Document OpenMP. Backport from gomp-20050608-branch * trans-openmp.c: Call build_omp_clause instead of make_node when creating OMP_CLAUSE_* trees. (gfc_trans_omp_reduction_list): Remove argument 'code'. Adjust all callers. * trans.h (build4_v): Define. * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes. Call build3_v to create OMP_SECTIONS nodes. PR fortran/25162 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced on all symbols added to the variable list. * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC procedure symbol in REDUCTION. * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE. * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in that statement block. (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do for non-ordered non-static combined loops. (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do. * openmp.c: Include target.h and toplev.h. (gfc_match_omp_threadprivate): Emit diagnostic if target does not support TLS. * Make-lang.in (fortran/openmp.o): Add dependencies on target.h and toplev.h. * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT. * trans-openmp.c (gfc_omp_privatize_by_reference): Make DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT. (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT. (gfc_trans_omp_variable): New function. (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it. * trans.h (GFC_DECL_RESULT): Define. * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function. * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define. * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype. * trans-openmp.c (gfc_omp_privatize_by_reference): Return true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set. (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New functions. (gfc_trans_omp_clauses): Add WHERE argument. Call gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list for reductions. (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections, gfc_trans_omp_single): Adjust gfc_trans_omp_clauses callers. * openmp.c (omp_current_do_code): New var. (gfc_resolve_omp_do_blocks): New function. (gfc_resolve_omp_parallel_blocks): Call it. (gfc_resolve_do_iterator): Add CODE argument. Don't propagate predetermination if argument is !$omp do or !$omp parallel do iteration variable. * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller. * fortran.h (gfc_resolve_omp_do_blocks): New prototype. (gfc_resolve_do_iterator): Add CODE argument. * trans.h (gfc_omp_predetermined_sharing, gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New prototypes. (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define. * trans-openmp.c (gfc_omp_predetermined_sharing, gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New functions. * trans-common.c (build_equiv_decl, build_common_decl, create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls. * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE on the decl. * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING, LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR, LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define. * openmp.c (resolve_omp_clauses): Remove extraneous comma. * symbol.c (check_conflict): Add conflict between cray_pointee and threadprivate. * openmp.c (gfc_match_omp_threadprivate): Fail if gfc_add_threadprivate returned FAILURE. (resolve_omp_clauses): Diagnose Cray pointees in SHARED, {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in {FIRST,LAST}PRIVATE and REDUCTION clauses. * resolve.c (omp_workshare_flag): New variable. (resolve_function): Diagnose use of non-ELEMENTAL user defined function in WORKSHARE construct. (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag is set to correct value in different contexts. * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing variable name. (resolve_omp_atomic): Likewise. PR fortran/24493 * scanner.c (skip_free_comments): Set at_bol at the beginning of the loop, not before it. (skip_fixed_comments): Handle ! comments in the middle of line here as well. (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if not at BOL. (gfc_next_char_literal): Fix expected canonicalized *$omp string. * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit initialization to build OMP_FOR instead of build. * trans-decl.c (gfc_gimplify_function): Invoke diagnose_omp_structured_block_errors. * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER. (gfc_trans_omp_ordered): Use OMP_ORDERED. * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks, gfc_resolve_omp_parallel_blocks): New prototypes. * resolve.c (resolve_blocks): Renamed to... (gfc_resolve_blocks): ... this. Remove static. (gfc_resolve_forall): Adjust caller. (resolve_code): Only call gfc_resolve_blocks if code->block != 0 and not for EXEC_OMP_PARALLEL* directives. Call gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives. Call gfc_resolve_do_iterator if resolved successfully EXEC_DO iterator. * openmp.c: Include pointer-set.h. (omp_current_ctx): New variable. (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New functions. * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h. * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor, look up symbol if it exists, use its name instead and, if it is not INTRINSIC, issue diagnostics. * parse.c (parse_omp_do): Handle implied end do properly. (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO, return it instead of continuing. * trans-openmp.c (gfc_trans_omp_critical): Update for changed operand numbering. (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections, gfc_trans_omp_single): Likewise. * trans.h (gfc_omp_privatize_by_reference): New prototype. * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine to gfc_omp_privatize_by_reference. * trans-openmp.c (gfc_omp_privatize_by_reference): New function. * trans-stmt.h (gfc_trans_omp_directive): Add comment. * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument. Disallow COMMON matching if it is set. (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers. (resolve_omp_clauses): Show locus in error messages. Check that variable types in reduction clauses are appropriate for reduction operators. * resolve.c (resolve_symbol): Don't error if a threadprivate module variable isn't SAVEd. * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY. Fix typo in condition. Fix DOVAR initialization. * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor rather than .min. etc. * trans-openmpc.c (omp_not_yet): Remove. (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel. Force creation of BIND_EXPR around the workshare construct. (gfc_trans_omp_parallel_sections): Likewise. (gfc_trans_omp_parallel_workshare): Likewise. * types.def (BT_I16, BT_FN_I16_VPTR_I16, BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add. * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT. (gfc_trans_omp_code): New function. (gfc_trans_omp_do): Use it, remove omp_not_yet uses. (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise. (gfc_trans_omp_sections): Likewise. Only treat empty last section specially if lastprivate clause is present. * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP builtin. * trans-openmp.c (gfc_trans_omp_variable_list): Update for OMP_CLAUSE_DECL name change. (gfc_trans_omp_do): Likewise. * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION clauses. (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding sync builtins directly. (gfc_trans_omp_single): Build OMP_SINGLE statement. * trans-openmp.c (gfc_trans_add_clause): New. (gfc_trans_omp_variable_list): Take a tree code and build the clause node here. Link it to the head of a list. (gfc_trans_omp_clauses): Update to match. (gfc_trans_omp_do): Use gfc_trans_add_clause. * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to gfc_omp_clauses *. Use gfc_evaluate_now instead of creating temporaries by hand. (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros. (gfc_trans_omp_do): New function. (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL. (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller. Use buildN_v macros. (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections, gfc_trans_omp_single, gfc_trans_omp_workshare): New functions. (gfc_trans_omp_directive): Use them. * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP. * openmp.c (resolve_omp_clauses): Check for list items present in multiple clauses. (resolve_omp_do): Check that iteration variable is not THREADPRIVATE and is not present in any clause variable lists other than PRIVATE or LASTPRIVATE. * gfortran.h (symbol_attribute): Add threadprivate bit. (gfc_common_head): Add threadprivate member, change use_assoc and saved into char to save space. (gfc_add_threadprivate): New prototype. * symbol.c (check_conflict): Handle threadprivate. (gfc_add_threadprivate): New function. (gfc_copy_attr): Copy threadprivate. * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and OMP_CLAUSE_ORDERED. * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol outside a module and not in COMMON has is not SAVEd. (resolve_equivalence): Ensure THREADPRIVATE objects don't get EQUIVALENCEd. * trans-common.c: Include target.h and rtl.h. (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE. * trans-decl.c: Include rtl.h. (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE. * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE. * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H). (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H). * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block is from current namespace. (gfc_match_omp_threadprivate): Rewrite. (resolve_omp_clauses): Check some clause restrictions. * module.c (ab_attribute): Add AB_THREADPRIVATE. (attr_bits): Add THREADPRIVATE. (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate. (load_commons, write_common, write_blank_common): Adjust for type change of saved, store/load threadprivate bit from the integer as well. * types.def (BT_FN_UINT_UINT): New. (BT_FN_VOID_UINT_UINT): Remove. * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier, gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master, gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions. (gfc_trans_omp_directive): Use them. * openmp.c (expr_references_sym): Add SE argument, don't look into SE tree. (is_conversion): New function. (resolve_omp_atomic): Adjust expr_references_sym callers. Handle promoted expressions. * trans-openmp.c (gfc_trans_omp_atomic): New function. (gfc_trans_omp_directive): Call it. * f95-lang.c (builtin_type_for_size): New function. (gfc_init_builtin_functions): Initialize synchronization and OpenMP builtins. * types.def: New file. * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and fortran/types.def. * trans-openmp.c: Rename GOMP_* tree codes into OMP_*. * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name is NULL. * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New functions. (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes. * parse.c (parse_omp_do): Call pop_state before next_statement. * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do): New functions. (gfc_resolve_omp_directive): Call them. * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement leaves an OpenMP structured block or if EXIT terminates !$omp do loop. * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o. (F95_OBJS): Add fortran/trans-openmp.o. (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS). * lang.opt: Add -fopenmp option. * options.c (gfc_init_options): Initialize it. (gfc_handle_option): Handle it. * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL, ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER, ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO, ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE, ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE, ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED, ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS, ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION, ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New statement codes. (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE, OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN, OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT, OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV, OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND, OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM): New OpenMP variable list types. (gfc_omp_clauses): New typedef. (gfc_get_omp_clauses): Define. (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER, EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO, EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE, EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE, EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT, EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes. (struct gfc_code): Add omp_clauses, omp_name, omp_namelist and omp_bool fields to ext union. (flag_openmp): Declare. (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes. * scanner.c (openmp_flag, openmp_locus): New variables. (skip_free_comments, skip_fixed_comments, gfc_next_char_literal): Handle OpenMP directive lines and conditional compilation magic comments. * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state. * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic, parse_omp_structured_block): New functions. (next_free, next_fixed): Parse OpenMP directives. (case_executable, case_exec_markers, case_decl): Add ST_OMP_* codes. (gfc_ascii_statement): Handle ST_OMP_* codes. (parse_executable): Rearrange the loop slightly, so that parse_omp_do can return next_statement. * match.h (gfc_match_omp_eos, gfc_match_omp_atomic, gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do, gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered, gfc_match_omp_parallel, gfc_match_omp_parallel_do, gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare, gfc_match_omp_sections, gfc_match_omp_single, gfc_match_omp_threadprivate, gfc_match_omp_workshare, gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes. * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives. (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_* directives. * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for EXEC_OMP_* directives. * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing. * trans-stmt.h (gfc_trans_omp_directive): New prototype. * openmp.c: New file. * trans-openmp.c: New file. gcc/testsuite/ 2006-02-14 Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> Uros Bizjak <uros@kss-loka.si> * gfortran.dg/gomp: New directory. libgomp/ 2006-02-14 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.fortran/vla7.f90: Add -w to options. Remove tests for returning assumed character length arrays. Co-Authored-By: Diego Novillo <dnovillo@redhat.com> Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Uros Bizjak <uros@kss-loka.si> From-SVN: r110984
2006-02-14 17:38:03 +01:00
2006-02-13 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
Remove tests for returning assumed character length arrays.
2006-02-12 Roger Sayle <roger@eyesopen.com>
John David Anglin <dave@hiauly1.hia.nrc.ca>
PR libgomp/25936
* configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
2006-02-08 Ulrich Weigand <uweigand@de.ibm.com>
* testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
2006-02-07 Eric Botcazou <ebotcazou@libertysurf.fr>
* testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
part of LD_LIBRARY_PATH manually.
2006-02-03 H.J. Lu <hongjiu.lu@intel.com>
PR libgomp/25852
* testsuite/lib/libgomp-dg.exp (blddir): Set it in
libgomp_init.
2005-01-25 Paolo Bonzini <bonzini@gnu.org>
PR libgomp/25884
* Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
* configure.ac (PERL): Don't set.
(gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
(OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
* omp.h.in: Wrap the new configure substitutions with @ characters.
* omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
* aclocal.m4, configure, Makefile.in: Regenerate.
* mkomp_h.pl: Delete.
2005-01-24 Paolo Bonzini <bonzini@gnu.org>
PR libgomp/25259
* configure.ac: Use GCC_HEADER_STDINT.
* libgomp.h: Include gstdint.h.
* libgomp_f.h.in: Don't include stdint.h or inttypes.h.
* configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
2006-01-24 Richard Henderson <rth@redhat.com>
PR libgomp/25942
* configure.ac: Add AM_MAINTAINER_MODE.
* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
2006-01-24 Diego Novillo <dnovillo@redhat.com>
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
2006-01-23 Andreas Tobler <a.tobler@schweiz.ch>
* config/posix/proc.c: Conditional include of sys/loadavg.h for
Solaris.
* configure.ac: Add check for loadavg.h.
(link_gomp): Adjust comment.
* configure: Regenerate.
* config.h.in: Regenerate.
2006-01-21 Steve Ellcey <sje@cup.hp.com>
PR libgomp/25877
* configure.ac: Remove check for alloca.h.
* configure: Regenerate.
* config.h.in: Regenerate.
* libgomp.h: define gomp_alloca to be __builtin_alloca.
* team.c: Remove use of alloca.h.
Call gomp_alloca instead of alloca.
2006-01-20 Steve Ellcey <sje@cup.hp.com>
PR libgomp/25877
* team.c: Add include of alloca.h.
* configure.ac: Add check for alloca.h.
* configure: Regenerate.
* config.h.in: Regenerate.
[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
2006-01-17 Jakub Jelinek <jakub@redhat.com>
PR fortran/25219
* testsuite/libgomp.fortran/pr25219.f90: New test.
2005-12-05 Uros Bizjak <uros@kss-loka.si>
* testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
testsuite/libgomp.fortran/threadprivate1.f90,
testsuite/libgomp.fortran/threadprivate2.f90,
testsuite/libgomp.fortran/threadprivate3.f90,
testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
testsuite/libgomp.fortran/omp_parse3.f90: Change required
effective-target to TLS runtime.
* testsuite/libgomp.fortran/pr25162.f: Require
effective-target TLS runtime.
2005-12-01 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/nestedfn2.f90: New test.
* testsuite/libgomp.c/nestedfn-3.c: New test.
2005-11-30 Jakub Jelinek <jakub@redhat.com>
PR fortran/25162
* testsuite/libgomp.fortran/pr25162.f: New test.
2005-11-28 Jakub Jelinek <jakub@redhat.com>
* config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
2005-11-25 Jakub Jelinek <jakub@redhat.com>
* alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
single.c, team.c, work.c, config/linux/alpha/futex.h,
config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
config/linux/powerpc/futex.h, config/linux/s390/futex.h,
config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
FSF address.
2005-11-18 Jakub Jelinek <jakub@redhat.com>
* Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
to nodist_noinst_HEADERS.
* Makefile.in: Rebuilt.
* config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
add integer count field.
* config/posix/lock.c (omp_destroy_nest_lock): Adjust for
omp_nest_lock_t type change.
(omp_init_nest_lock): Likewise. Initialize count to 0.
(omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
Increment count.
(omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
Decrement count.
(omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
Increment count if successful and return the new nesting level.
* config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
* omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
* testsuite/libgomp.c/lib-1.c: New test.
* testsuite/libgomp.fortran/lib1.f90: New test.
* testsuite/libgomp.fortran/lib2.f: New test.
* testsuite/libgomp.fortran/lib3.f: New test.
2005-11-17 Richard Henderson <rth@redhat.com>
PR 24845
* Makefile.am (nodist_toolexeclib_HEADERS): New.
* configure.ac (link_gomp): New. Substitute it.
(AC_CONFIG_FILES): Add libgomp.spec.
* libgomp.spec.in: New file.
* Makefile.in, testsuite/Makefile.in, configure: Rebuild.
* testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
2005-11-18 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/reduction1.f90: Adjust for
reduction(-:var) behaving the same as reduction(+:var).
* testsuite/libgomp.c/reduction-4.c: New test.
2005-11-15 Uros Bizjak <uros@kss-loka.si>
* testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
testsuite/libgomp.c/copyin-3.c,
testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
testsuite/libgomp.c++/pr24455.C,
testsuite/libgomp.fortran/threadprivate1.f90,
testsuite/libgomp.fortran/threadprivate2.f90,
testsuite/libgomp.fortran/threadprivate3.f90,
testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
testsuite/libgomp.fortran/omp_parse3.f90: Require
effective-target TLS.
2005-11-14 Diego Novillo <dnovillo@redhat.com>
* HEADER: Remove.
2005-11-13 Jakub Jelinek <jakub@redhat.com>
PR libgomp/24797
* team.c (initialize_team): Pass NULL rather than free as
pthread_key_create destructor. Initialize thread specific data
pointer in initial thread to a static local variable rather than
malloced memory.
2005-11-11 Uros Bizjak <uros@kss-loka.si>
* testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
its location to ld_library_path.
2005-11-10 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.c/c.exp: Rename from dg.exp.
2005-11-10 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.c: Rename from libgomp.dg.
2005-11-09 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.c++/pr24455.C: Add copyin clause for
threadprivate variable 'i'.
2005-11-09 Jakub Jelinek <jakub@redhat.com>
* config/linux/s390/futex.h: New file.
* configure.tgt: Use it.
* testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
before the parallel.
2005-11-08 Jakub Jelinek <jakub@redhat.com>
PR c++/24734
* testsuite/libgomp.c++/master-1.C: New test.
2005-11-07 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.dg/copyin-3.c: New test.
2005-11-07 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/retval1.f90: New test.
* testsuite/libgomp.fortran/vla7.f90: New test.
2005-11-06 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/vla2.f90: New test.
* testsuite/libgomp.fortran/vla3.f90: New test.
* testsuite/libgomp.fortran/vla4.f90: New test.
* testsuite/libgomp.fortran/vla5.f90: New test.
* testsuite/libgomp.fortran/vla6.f90: New test.
2005-11-01 Jakub Jelinek <jakub@redhat.com>
* config/linux/sparc/futex.h: New file.
* configure.tgt: Use it.
* testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
* critical.c: Include stdlib.h.
* acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
ignoring return value.
* configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
LIBGOMP_CHECK_SYNC_BUILTINS check.
* configure: Rebuilt.
2005-10-31 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/vla1.f90: New test.
2005-10-31 Richard Henderson <rth@redhat.com>
* testsuite/libgomp.fortran/character2.f90: Fix race condition
setting 's' in different threads.
2005-10-31 Jakub Jelinek <jakub@redhat.com>
* libgomp.h (attribute_hidden, ialias): Define.
* config/posix/proc.c (omp_get_num_procs): Add ialias.
* config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
* config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
omp_test_lock, omp_test_nest_lock): Likewise.
* config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
omp_test_lock, omp_test_nest_lock): Likewise.
* env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
omp_get_dynamic, omp_get_nested): Likewise.
* parallel.c (omp_get_num_threads, omp_get_max_threads,
omp_get_thread_num, omp_in_parallel): Likewise.
* fortran.c (ialias_redirect): Define.
(omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
omp_set_num_threads, omp_get_dynamic, omp_get_nested,
omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
omp_get_wtime): Add ialias_redirect.
2005-10-30 Jakub Jelinek <jakub@redhat.com>
* fortran.c: Include stdlib.h.
2005-10-29 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
* Makefile.in: Regenerated.
2005-10-28 Jakub Jelinek <jakub@redhat.com>
* mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
* libgomp_f.h.in (omp_check_defines): New function.
* env.c: Include libgomp_f.h.
(initialize_env): Call omp_check_defines.
* testsuite/libgomp.dg/copyin-2.c: New test.
* testsuite/libgomp.c++/copyin-2.C: New test.
* testsuite/libgomp.fortran/threadprivate3.f90: New test.
* testsuite/libgomp.fortran/threadprivate2.f90: New test.
* testsuite/libgomp.fortran/sharing2.f90: New test.
* testsuite/libgomp.dg/copyin-1.c: New test.
* testsuite/libgomp.c++/copyin-1.C: New test.
2005-10-26 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/crayptr1.f90: New test.
* testsuite/libgomp.fortran/workshare1.f90: New test.
* libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
only test.
* libgomp.fortran/sharing1.f90: New test.
2005-10-24 Jakub Jelinek <jakub@redhat.com>
PR c++/24502
* testsuite/libgomp.c++/loop-7.C: New test.
* testsuite/libgomp.dg/nestedfn-2.c: New test.
* testsuite/libgomp.dg/nestedfn-1.c: New test.
* testsuite/libgomp.fortran/reduction6.f90: New test.
* testsuite/libgomp.fortran/nestedfn1.f90: New test.
2005-10-23 Richard Henderson <rth@redhat.com>
* testsuite/libgomp.c++/ctor-1.C: New.
* testsuite/libgomp.c++/ctor-2.C: New.
* testsuite/libgomp.c++/ctor-3.C: New.
* testsuite/libgomp.c++/ctor-4.C: New.
* testsuite/libgomp.c++/ctor-5.C: New.
* testsuite/libgomp.c++/ctor-6.C: New.
* testsuite/libgomp.c++/ctor-7.C: New.
* testsuite/libgomp.c++/ctor-8.C: New.
* testsuite/libgomp.c++/ctor-9.C: New.
2005-10-21 Diego Novillo <dnovillo@redhat.com>
PR 24455
* testsuite/libgomp.c++/pr24455-1.C: New test.
* testsuite/libgomp.c++/pr24455.C: New test.
* testsuite/libgomp.dg/pr24455-1.c: New test.
* testsuite/libgomp.dg/pr24455.c: New test.
2005-10-20 Richard Henderson <rth@redhat.com>
* testsuite/libgomp.c++/loop-6.C: New.
* testsuite/libgomp.dg/loop-3.c: New.
2005-10-20 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/jacobi.f: Don't make i and j
explicitly private.
* testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
explicitly shared.
2005-10-19 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.fortran/jacobi.f: New test.
2005-10-19 Richard Henderson <rth@redhat.com>
* configure.tgt (i?86-linux): Default to with_arch instead of
CFLAGS. Add -mtune to match target_cpu.
(x86_64-linux): Tune to i686.
* fortran.c (omp_test_nest_lock_): Fix typo.
2005-10-19 Jakub Jelinek <jakub@redhat.com>
* ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
gomp_ordered_sync): Do nothing if team->nthreads == 1.
* testsuite/libgomp.dg/ordered-3.c: New test.
* testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
Remove volatile keyword.
* testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
in COMMON block to avoid warnings on 64-bit targets.
2005-10-18 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/shared-3.c: New test.
2005-10-18 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
* testsuite/libgomp.fortran/reduction5.f90: New test.
2005-10-18 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
dg-options.
* testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise. Enable
flush loop now that __sync_synchronize has proper memory barrier.
* testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
Add -ffixed-form to dg-options.
2005-10-17 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.fortran/fortran.exp: Also gather tests
from subdirectories.
* testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
* testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
2005-10-17 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.dg/dg.exp: Only unset lang_* if
lang_library_path exists. Use find instead of glob to gather tests.
* testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
2005-10-17 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
* testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
* testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
2005-10-15 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.dg/vla-1.c: New test.
* testsuite/libgomp.fortran/reference2.f90: New test.
* testsuite/libgomp.fortran/character2.f90: Remove explicit
declaration of omp_get_thread_num.
* testsuite/libgomp.fortran/threadprivate1.f90: Likewise. Add
use omp_lib.
* testsuite/libgomp.fortran/reduction1.f90: New test.
* testsuite/libgomp.fortran/reduction2.f90: New test.
* testsuite/libgomp.fortran/reduction3.f90: New test.
* testsuite/libgomp.fortran/reduction4.f90: New test.
2005-10-13 Richard Henderson <rth@redhat.com>
* Makefile.am (libgomp_la_SOURCES): Add bar.c.
* Makefile.in: Regenerate.
* barrier.c (GOMP_barrier): Use gomp_barrier_wait.
* libgomp.h: Include bar.h.
(struct gomp_barrier): Remove.
(struct gomp_team): Add barrier. Replace master_barrier with
master_release. Replace threads with ordered_release.
(struct gomp_thread): Replace barrier with release.
* ordered.c (gomp_ordered_first): Update for ordered_release change.
(gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
gomp_ordered_static_next, gomp_ordered_sync): Likewise.
* single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
(GOMP_single_copy_end): Likewise.
* team.c (gomp_threads_dock): New.
(gomp_barrier_init, gomp_barrier_destroy): Remove.
(gomp_thread_start): Use gomp_barrier_wait.
(new_team, free_team): Update for gomp_team changes.
(gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
(gomp_team_end): Use gomp_barrier_wait.
(initialize_team): Update for gomp_thread changes.
* work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
(gomp_work_share_end_nowait): Use atomic ops when available.
* config/linux/bar.c, config/linux/bar.h: New files.
* config/posix/bar.c, config/posix/bar.h: New files.
2005-10-13 Jakub Jelinek <jakub@redhat.com>
* single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
* testsuite/libgomp.dg/single-2.c: New test.
* testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
lang_link_flags): Unset, so that they aren't inherited from previously
sourced *.exp.
* testsuite/libgomp.fortran/threadprivate1.f90: New test.
2005-10-12 Richard Henderson <rth@redhat.com>
* testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
(libgomp_init): Use lang_test_file, lang_library_path, and
lang_link_flags, set by the subdirectory files. Add -fopenmp here.
* testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
(lang_test_file, lang_link_flags): New.
(DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
* testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
testsuite/libgomp.c++/parallel-1.C,
testsuite/libgomp.c++/reduction-1.C,
testsuite/libgomp.c++/reduction-2.C,
testsuite/libgomp.c++/reduction-3.C,
testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
New files, largely cribbed from the C testsuite.
2005-10-12 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/character1.f90: New test.
* testsuite/libgomp.fortran/character2.f90: New test.
* testsuite/libgomp.dg/nested-1.c: New test.
* testsuite/libgomp.dg/nested-2.c: New test.
* testsuite/libgomp.fortran/do1.f90: New test.
* testsuite/libgomp.fortran/do2.f90: New test.
* testsuite/libgomp.fortran/reference1.f90: New test.
2005-10-11 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.dg/reduction-1.c: New test.
* testsuite/libgomp.dg/reduction-2.c: New test.
* testsuite/libgomp.dg/reduction-3.c: New test.
2005-10-10 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.dg/atomic-1.c: New test.
* testsuite/libgomp.dg/atomic-2.c: New test.
2005-10-09 Richard Henderson <rth@redhat.com>
* critical.c (atomic_lock): New.
(initialize_critical): Initialize it.
(GOMP_atomic_start, GOMP_atomic_end): New.
* libgomp.map: Export them.
* libgomp_g.h: Declare them.
* testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
2005-10-02 Richard Henderson <rth@redhat.com>
* configure.ac: Move save_CFLAGS hack earlier. Append -Wall/-Werror
to XCFLAGS instead of CFLAGS.
2005-09-30 Richard Henderson <rth@redhat.com>
* configure.ac: Determine whether -pthread or -lpthread is needed.
* Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
* Makefine.in, configure: Rebuild.
2005-09-28 Richard Henderson <rth@redhat.com>
* testsuite/libgomp.dg/omp-loop03.c: Fix return code.
* testsuite/libgomp.dg/omp-single-3.c: New test.
2005-09-28 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/omp-single-2.c: New test.
* testsuite/libgomp.dg/shared-2.c: Fix return code.
2005-09-27 Richard Henderson <rth@redhat.com>
* testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
* testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
2005-09-27 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.dg/omp-loop03.c: New test.
2005-09-27 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/omp-parallel-for.c: New test.
2005-09-27 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/omp-single-1.c: New test.
* testsuite/libgomp.dg/shared-1.c: Return 0.
Add prototype for abort.
* testsuite/libgomp.dg/shared-2.c: Likewise.
2005-09-26 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
constructs.
2005-09-26 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/shared-1.c: New test.
* testsuite/libgomp.dg/shared-2.c: New test.
2005-09-24 Richard Henderson <rth@redhat.com>
* testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
2005-09-24 Richard Henderson <rth@redhat.com>
* iter.c (gomp_iter_static_next): Round up when computing number
of iterations. Don't bother distributing a remainder equally.
* testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
Don't call srand. Zero b before testing.
(main): New.
2005-09-24 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/omp_atomic1.f90: New test.
* testsuite/libgomp.fortran/omp_atomic2.f90: New test.
2005-09-23 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
without !$omp end do, followed immediately by subroutine end.
2005-09-23 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/omp-parallel-if.c: New test.
2005-09-22 Richard Henderson <rth@redhat.com>
* critical.c (GOMP_critical_name_start): Change argument to void**.
Reuse the pointer space if the mutex fits.
(GOMP_critical_name_end): Likewise.
(initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
* libgomp_g.h (GOMP_critical_name_start): Update decl.
(GOMP_critical_name_end): Likewise.
* config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
* config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
2005-09-20 Richard Henderson <rth@redhat.com>
* critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
(create_lock_lock): New.
(initialize_critical): Initialize it.
* libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
* libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
2005-09-20 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
2005-09-20 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/omp-loop01.c: New test.
* testsuite/libgomp.dg/omp-loop02.c: New test.
2005-09-20 Jakub Jelinek <jakub@redhat.com>
* configure.ac (AC_PROG_FC): Add.
(USE_FORTRAN): New automake conditional.
* configure: Rebuilt.
* Makefile.am (libgomp_la_SOURCES): Add fortran.c.
(nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
Add rules to build them.
* Makefile.in: Rebuilt.
* mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
OMP_NEST_LOCK_KIND.
* libgomp.map: Add Fortran wrappers.
* libgomp_f.h.in: New file.
* omp_lib.h.in: New file.
* omp_lib.f90.in: New file.
* fortran.c: New file.
* testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
Append libgfortran directory to LD_LIBRARY_PATH if it exists.
Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
libgfortran has been built.
* testsuite/libgomp.fortran/fortran.exp: New file.
* testsuite/libgomp.fortran/omp_cond1.f: New test.
* testsuite/libgomp.fortran/omp_cond2.f: New test.
* testsuite/libgomp.fortran/omp_cond3.F90: New test.
* testsuite/libgomp.fortran/omp_cond4.F90: New test.
* testsuite/libgomp.fortran/omp_hello.f: New test.
* testsuite/libgomp.fortran/omp_orphan.f: New test.
* testsuite/libgomp.fortran/omp_parse1.f90: New test.
* testsuite/libgomp.fortran/omp_parse2.f90: New test.
* testsuite/libgomp.fortran/omp_parse3.f90: New test.
* testsuite/libgomp.fortran/omp_parse4.f90: New test.
* testsuite/libgomp.fortran/omp_reduction.f: New test.
* testsuite/libgomp.fortran/omp_workshare1.f: New test.
* testsuite/libgomp.fortran/omp_workshare2.f: New test.
2005-08-30 Richard Henderson <rth@redhat.com>
* loop.c (GOMP_loop_static_start): Provide fallback wrapper
function for when aliases are not usable.
(GOMP_loop_dynamic_start, GOMP_loop_guided_start,
GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
GOMP_loop_dynamic_next, GOMP_loop_guided_next,
GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
GOMP_loop_ordered_guided_next): Likewise.
* ordered.c (GOMP_ordered_start): Likewise.
2005-08-01 Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/dg.exp: Use -O2 for now.
* testsuite/libgomp.dg/omp_hello.c: Fix return code
* testsuite/libgomp.dg/omp_matvec.c: Likewise.
* testsuite/libgomp.dg/omp_orphan.c: Likewise
* testsuite/libgomp.dg/omp_reduction.c: Likewise
* testsuite/libgomp.dg/omp_workshare1.c: Likewise
* testsuite/libgomp.dg/omp_workshare2.c: Likewise
* testsuite/libgomp.dg/omp_workshare3.c: Likewise
* testsuite/libgomp.dg/omp_workshare4.c: Likewise
2005-07-07 Eric Christopher <echristo@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
* testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
up code.
* testsuite/libgomp.dg/omp_matvec.c: Ditto.
* testsuite/libgomp.dg/omp_orphan.c: Ditto.
* testsuite/libgomp.dg/omp_reduction.c: Ditto.
* testsuite/libgomp.dg/omp_workshare1.c: Ditto.
* testsuite/libgomp.dg/omp_workshare2.c: Ditto.
* testsuite/libgomp.dg/omp_workshare3.c: Ditto.
* testsuite/libgomp.dg/omp_workshare4.c: Ditto.
2005-06-13 Diego Novillo <dnovillo@redhat.com>
* TOPLEVEL.patch: Remove.
2005-05-16 Richard Henderson <rth@redhat.com>
* configure.ac: Test for clock_gettime.
* config.h.in, configure: Rebuild.
* config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
(omp_get_wtime): Use clock_gettime if available.
(omp_get_wtick): Use clock_getres if available.
2005-05-11 Richard Henderson <rth@redhat.com>
* config/linux/ia64/futex.h: New file.
* configure.tgt: Use it.
* team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
2005-05-07 Richard Henderson <rth@redhat.com>
* config/linux/powerpc/futex.h: New file.
* configure.tgt: Use it.
* config/linux/i486/futex.h: Merge ...
* config/linux/x86_64/futex.h: ... into ...
* config/linux/x86/futex.h: ... here.
* configure.tgt: Update to match.
2005-05-06 Richard Henderson <rth@redhat.com>
* config/linux/alpha/futex.h: Conditionally define SYS_futex.
* config/linux/i486/futex.h: Likewise.
* config/linux/x86_64/futex.h: Likewise.
* config/linux/lock.c: New file.
* config/linux/omp-lock.h: New file.
* critical.c, env.h: Don't include omp.h
* config/posix/lock.c: Include libgomp.h instead of omp.h.
* config/posix/time.c: Likewise.
* config/posix/omp-lock.h: New file.
* libgomp.h: Include omp-lock.h and omp.h.
* Makefile.am (nodist_include_HEADERS): New.
(omp.h): New rule.
* configure.ac (PERL): New.
* mkomp_h.pl: New file.
* omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
with templates.
* Makefile.in, configure, testsuite/Makefile.in: Rebuild.
* testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
build directory. Re-add -march=i486 hack.
* testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
(libgomp_link_flags): Remove.
(libgomp_initialized): Remove.
(libgomp_init): Don't protect from reinitialization. Copy code
from libstdc++ for getting the multilib set correctly.
2005-05-05 Richard Henderson <rth@redhat.com>
* config/linux/alpha/futex.h: New file.
* configure.tgt (alpha*-*-linux*): Use it.
* config/posix/mutex.c: New file.
* config/posix/sem.c: Use libgomp.h.
* configure.tgt (x86_64-linux): Also test CC for -m32.
* config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
* testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
[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
after $gccpath.
* Makefile.am (SUBDIRS): New.
(libgomp_la_LDFLAGS): Add -lpthread.
* configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
* Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
* libgomp_g.h: New file.
* libgomp.h: Split out all public declarations to libgomp_g.h.
Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
* config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
* config/linux/sem.h: Likewise.
* config/posix/sem.h: Likewise.
* Makefile.am (AM_LDFLAGS): New.
(libgomp_version_script): Split out from ...
(libgomp_la_LDFLAGS): ... here.
(libgomp_version_info): New.
* acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
(LIBGOMP_ENABLE): New.
(LIBGOMP_CHECK_LINKER_FEATURES): New.
(LIBGOMP_ENABLE_SYMVERS): New.
* configure.ac (AC_INIT): Version 1.0.
(enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
(enable-linux-futex): Likewise. Rename from enable-futex.
(libtool_VERSION): New.
(LIBGOMP_ENABLE_SYMVERS): Use it.
* configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
* Makefile.in, aclocal.m4, configure: Rebuild.
* config/linux/mutex.c: Include libgomp.h instead of mutex.h.
(gomp_mutex_unlock_slow): Fix typo.
* config/linux/sem.c: Similarly.
(gomp_sem_post_slow): Fix typo.
* config/linux/sem.h (gomp_sem_post_slow): Fix typo.
* config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
[__PIC__] (sys_futex0): Don't use tmp output in asm.
* Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
(libgomp_la_LDFLAGS): Add top_srcdir to path.
* acinclude.m4: Copy libtool.m4 stuff from libgfortran.
* configure.ac: Check for getloadavg. Substitute XCFLAGS and
XLDFLAGS. Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
* configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
LDFLAGS. Pull enable_futex check to top-level.
* libgomp.h: Fix sem.h and mutex.h includes. Define ATTRIBUTE_HIDDEN.
* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
First attempt at real configury.
* Makefile, config.h: Remove file.
* Makefile.am, Makefile.in: New file.
* acinclude.m4 aclocal.m4: New file.
* configure.ac, configure.tgt, configure: New file.
* config/posix/lock.c: Rename from sys-lock.c.
* config/posix/mutex.h: Rename from sys-mutex.h.
* config/posix/sem.c: Rename from sys-sem.c.
* config/posix/sem.h: Rename from sys-sem.h.
* config/posix/proc.c: Rename from sys-proc.c.
* config/posix/time.c: Rename from sys-proc.c.
* config/linux/mutex.c: New file.
* config/linux/mutex.h: New file.
* config/linux/sem.c: New file.
* config/linux/sem.h: New file.
* config/linux/i486/futex.h: New file.
* config/linux/x86_64/futex.h: New file.
2005-05-04 Richard Henderson <rth@redhat.com>
* iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
* libgomp.h: Declare them.
* loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
2005-05-04 Richard Henderson <rth@redhat.com>
* libgomp-1 code drop
2005-05-04 Richard Henderson <rth@redhat.com>
* iter.c (gomp_iter_static_next): Return tri-state on 0.
* ordered.c (gomp_ordered_static_next): Remove not_last argument.
* libgomp.h (struct gomp_team_state): Make static_trip unsigned.
(gomp_iter_static_next): Update.
(gomp_ordered_static_next): Update.
* loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
(gomp_loop_ordered_static_start): Likewise. Exit early for a
totally empty range.
(gomp_loop_ordered_static_next): Refine test for calling
gomp_ordered_static_next.
* testsuite/ordered-1.c: Add case for more threads than iterations.
* iter.c (gomp_iter_runtime_next_locked): Remove.
* loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
gomp_loop_guided_start, gomp_loop_ordered_static_start,
[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
gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
gomp_loop_ordered_guided_next): Downcase name, make static, add
an external alias with the old name.
(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
switch and call one of the above static functions.
* libgomp.h: Update.
* work.c (gomp_work_share_start): Lock the mutex for !first too.
* loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
GOMP_loop_guided_start, GOMP_loop_runtime_start,
GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
GOMP_loop_ordered_guided_start): Update to match.
* sections.c (GOMP_sections_start): Likewise.
* single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
* ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
Use bounds check instead of modulus.
(gomp_ordered_sync): Split out of GOMP_ordered_start.
(gomp_ordered_last): Don't sync with ordered_owner here.
(gomp_ordered_next): Likewise.
(gomp_ordered_static_loop_next): Likewise.
* loop.c, libgomp.h: Update to match.
* libgomp.h (GOMP_barrier): Declare.
* testsuite/barrier-1.c: New file.
* testsuite/critical-1.c: New file.
* testsuite/ordered-2.c: New file.
* testsuite/ordered-1.c: New file.
* testsuite/sections-1.c: New file.
* testsuite/single-1.c: New file.
* testsuite/Makefile (TESTS): Add them.
2005-05-04 Richard Henderson <rth@redhat.com>
* libgomp.h (struct gomp_work_share): Add ordered_owner.
* loop.c (GOMP_loop_static_start): If not the startup thread,
acquire the mutex to wait for initialization complete.
(GOMP_loop_ordered_static_start): Likewise.
(GOMP_loop_ordered_runtime_start): Likewise.
(GOMP_loop_ordered_static_first): Remove.
(GOMP_loop_ordered_dynamic_first): Remove.
(GOMP_loop_ordered_guided_first): Remove.
(GOMP_loop_ordered_runtime_first): Remove.
* ordered.c (gomp_ordered_loop_first): Post to own release when
we're the first thread.
(gomp_ordered_loop_last): Wait on release if not owner.
(gomp_ordered_loop_next): Likewise.
(gomp_ordered_static_loop_init): New.
(gomp_ordered_static_loop_next): Use ordered_owner.
(GOMP_ordered_start): Likewise.
* work.c (gomp_new_work_share): Initialize ordered_owner.
2005-05-03 Richard Henderson <rth@redhat.com>
* Makefile (OPT): New.
(CFLAGS): Use it.
* loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
* sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
* libgomp.h, libgomp.map, NOTES: Update to match.
* team.c (struct gomp_thread_start_data): Remove ts, fn, data.
Add initialized and thr members.
(gomp_thread_start): Pause when initially spawned to wait for
the whole team to be created.
(gomp_team_start): Release team members at the end.
* testsuite/loop-1.c (N): New. Use it instead of hardcoded 100.
(f_foo_1): Use GOMP_loop_end.
(f_foo_2): Use GOMP_loop_end_nowait.
* testsuite/loop-2.c: New file.
* testsuite/Makefile (TESTS): Add it.
2005-05-03 Richard Henderson <rth@redhat.com>
* iter.c (gomp_iter_static_next): Fix overflow check typo.
(gomp_iter_dynamic_next_locked): Fix overflow check thinko.
* team.c (new_team): Initialize oldest_live_gen to 1 if no
initial work_share.
* testsuite/Makefile: New file.
* testsuite/loop-1.c: New file.
2005-05-03 Richard Henderson <rth@redhat.com>
Initial implementation and checkin.