1. 13 Apr, 2015 2 commits
  2. 12 Apr, 2015 1 commit
    • Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if -Os. · 0b4a769e
      Testing an x86_64 toolchain configured for a processor with
      TARGET_SOFTWARE_PREFETCHING_BENEFICIAL produces failures
      
      FAIL: g++.dg/pr60518.C  -std=gnu++98 (test for excess errors)
      FAIL: g++.dg/pr60518.C  -std=gnu++11 (test for excess errors)
      FAIL: g++.dg/pr60518.C  -std=gnu++14 (test for excess errors)
      
      where the failure is from the message "pr60518.C:1:0: warning:
      -fprefetch-loop-arrays is not supported with -Os".
      
      Given that lack of support, it seems appropriate for the back end not
      to enable this option in the -Os case; this patch implements that.
      
      Bootstrapped with no regressions on x86_64-unknown-linux-gnu; tested
      for a cross to x86_64-linux-gnu --with-arch=btver2, where those test
      failures duly disappear.
      
      	* config/i386/i386.c (ix86_option_override_internal): Don't set
      	-fprefetch-loop-arrays if optimizing for size.
      
      From-SVN: r222033
      Joseph Myers committed
  3. 11 Apr, 2015 1 commit
  4. 10 Apr, 2015 1 commit
  5. 09 Apr, 2015 4 commits
  6. 08 Apr, 2015 2 commits
    • mkoffload.c (process): Support variable mapping. · d93bdab5
      	gcc/
      	* config/nvptx/mkoffload.c (process): Support variable mapping.
      
      	libgomp/
      	* libgomp.h (target_mem_desc: Remove mem_map field.
      	(acc_dispatch_t): Remove open_device_func, close_device_func,
      	get_device_num_func, set_device_num_func, target_data members.
      	Change create_thread_data_func argument to device number instead of
      	generic pointer.
      	* oacc-async.c (assert.h): Include.
      	(acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
      	(acc_wait_all, acc_wait_all_async): Use current host thread's
      	active device, not base_dev.
      	* oacc-cuda.c (acc_get_current_cuda_device)
      	(acc_get_current_cuda_context, acc_get_cuda_stream)
      	(acc_set_cuda_stream): Likewise.
      	* oacc-host.c (host_dispatch): Don't set open_device_func,
      	close_device_func, get_device_num_func or set_device_num_func.
      	* oacc-init.c (base_dev, init_key): Remove.
      	(cached_base_dev): New.
      	(name_of_acc_device_t): New.
      	(acc_init_1): Initialise default-numbered device, not zeroth.
      	(acc_shutdown_1): Close all devices of a given type.
      	(goacc_destroy_thread): Don't use base_dev.
      	(lazy_open, lazy_init, lazy_init_and_open): Remove.
      	(goacc_attach_host_thread_to_device): New.
      	(acc_init): Reimplement with goacc_attach_host_thread_to_device.
      	(acc_get_num_devices): Don't use base_dev.
      	(acc_set_device_type): Reimplement.
      	(acc_get_device_type): Don't use base_dev.
      	(acc_get_device_num): Tweak logic.
      	(acc_set_device_num): Likewise.
      	(acc_on_device): Use acc_get_device_type.
      	(goacc_runtime_initialize): Initialize cached_base_dev not base_dev.
      	(goacc_lazy_initialize): Reimplement with acc_init and
      	goacc_attach_host_thread_to_device.
      	* oacc-int.h (goacc_thread): Add base_dev field.
      	(base_dev): Remove extern declaration.
      	(goacc_attach_host_thread_to_device): Add prototype.
      	* oacc-mem.c (acc_malloc): Use current thread's device instead of
      	base_dev.
      	(acc_free): Likewise.
      	(acc_memcpy_to_device): Likewise.
      	(acc_memcpy_from_device): Likewise.
      	* oacc-parallel.c (select_acc_device): Remove. Replace calls with
      	goacc_lazy_initialize (throughout).
      	(GOACC_parallel): Use tgt_offset to locate target functions.
      	* target.c (gomp_map_vars): Don't set tgt->mem_map.
      	(gomp_unmap_vars): Use devicep->mem_map pointer not tgt->mem_map.
      	(gomp_load_plugin_for_device): Remove open_device, close_device,
      	get_device_num, set_device_num openacc hook initialisation. Don't set
      	openacc.target_data.
      	* plugin/plugin-host.c (GOMP_OFFLOAD_openacc_open_device)
      	(GOMP_OFFLOAD_openacc_close_device)
      	(GOMP_OFFLOAD_openacc_get_device_num)
      	(GOMP_OFFLOAD_openacc_set_device_num): Remove.
      	(GOMP_OFFLOAD_openacc_create_thread_data): Change (unused) argument
      	to int.
      	* plugin/plugin-nvptx.c (ptx_inited): Remove.
      	(instantiated_devices, ptx_dev_lock): New.
      	(struct ptx_image_data): New.
      	(ptx_devices, ptx_images, ptx_image_lock): New.
      	(fini_streams_for_device): Reorder cuStreamDestroy call.
      	(nvptx_get_num_devices): Remove forward declaration.
      	(nvptx_init): Change return type to bool.
      	(nvptx_fini): Remove.
      	(nvptx_attach_host_thread_to_device): New.
      	(nvptx_open_device): Return struct ptx_device* instead of void*.
      	(nvptx_close_device): Change argument type to struct ptx_device*,
      	return type to void.
      	(nvptx_get_num_devices): Use instantiated_devices not ptx_inited.
      	(kernel_target_data, kernel_host_table): Remove static globals.
      	(GOMP_OFFLOAD_register_image, GOMP_OFFLOAD_get_table): Remove.
      	(GOMP_OFFLOAD_init_device): Reimplement.
      	(GOMP_OFFLOAD_fini_device): Likewise.
      	(GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New.
      	(GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free, GOMP_OFFLOAD_dev2host)
      	(GOMP_OFFLOAD_host2dev): Use ORD argument.
      	(GOMP_OFFLOAD_openacc_open_device)
      	(GOMP_OFFLOAD_openacc_close_device)
      	(GOMP_OFFLOAD_openacc_set_device_num)
      	(GOMP_OFFLOAD_openacc_get_device_num): Remove.
      	(GOMP_OFFLOAD_openacc_create_thread_data): Change argument to int
      	(device number).
      
      	libgomp/testsuite/
      	* libgomp.oacc-c-c++-common/lib-9.c: Fix devnum check in test.
      
      From-SVN: r221922
      Julian Brown committed
    • fix building for alpha-dec-vms · a6330e85
      gcc/
      
      	* config/alpha/alpha.c (alpha_use_linkage): Change type of slot to
      	alpha_links **.
      	(alpha_write_one_linkage): Correct typo.
      
      From-SVN: r221921
      Trevor Saunders committed
  7. 07 Apr, 2015 2 commits
    • [ARM] PR 65489: Accept VSTRUCT constants in arm_legitimate_constant_p · b7c43e24
      	PR target/65489
      	* config/arm/arm.c (arm_legitimate_constant_p_1): Remove restriction
      	on constants for NEON VSTRUCT modes.
      
      From-SVN: r221892
      Kyrylo Tkachov committed
    • re PR target/65614 (PowerPC VSX systems should use XSCPSGNDP to copy scalar fp… · 90e0a702
      re PR target/65614 (PowerPC VSX systems should use XSCPSGNDP to copy scalar fp data to/from Altivec registers)
      
      [gcc]
      2015-04-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/65614
      	* config/rs6000/rs6000.c (struct processor_costs): Add cost field
      	for SF->DF conversions to make FLOAT_EXTEND more expensive, so
      	that LFD is used to load double constants instead of LFS.  Add
      	defaults for all costs structures.  Add comments for missing
      	initialization fields.
      	(size32_cost): Likewise.
      	(size64_cost): Likewise.
      	(rs64a_cost): Likewise.
      	(mpccore_cost): Likewise.
      	(ppc403_cost): Likewise.
      	(ppc405_cost): Likewise.
      	(ppc440_cost): Likewise.
      	(ppc476_cost): Likewise.
      	(ppc601_cost): Likewise.
      	(ppc603_cost): Likewise.
      	(ppc604_cost): Likewise.
      	(ppc604e_cost): Likewise.
      	(ppc620_cost): Likewise.
      	(ppc630_cost): Likewise.
      	(ppccell_cost): Likewise.
      	(ppc750_cost): Likewise.
      	(ppc7450_cost): Likewise.
      	(ppc8540_cost): Likewise.
      	(ppce300c2c3_cost): Likewise.
      	(ppce500mc_cost): Likewise.
      	(ppce500mc64_cost): Likewise.
      	(ppce5500_cost): Likewise.
      	(ppce6500_cost): Likewise.
      	(titan_cost): Likewise.
      	(power4_cost): Likewise.
      	(power6_cost): Likewise.
      	(power7_cost): Likewise.
      	(power8_cost): Likewise.
      	(ppca2_cost): Likewise.
      	(rs6000_rtx_costs): Make FLOAT_EXTEND use SFDF_convert field.
      
      	* config/rs6000/rs6000.md (extendsfdf2_fpr): Generate XSCPSGNDP
      	instead of XXLOR to copy SFmode to clear out dirty bits created
      	when SFmode denormals are generated.
      	(mov<mode>_hardfloat, FMOVE32 case): Likewise.
      	(truncdfsf2_fpr): Add support for ISA 2.07 XSRSP instruction.
      
      [gcc/testsuite]
      2015-04-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/65614
      	* gcc.target/powerpc/compress-float-ppc-pic.c: Run test on power5
      	to get floating point compression.
      	* gcc.target/powerpc/compress-foat-ppc.c: Likewise.
      
      From-SVN: r221888
      Michael Meissner committed
  8. 06 Apr, 2015 3 commits
    • add option for the Samsung Exynos M1 core for AArch64 · 85bb7f7f
      	* doc/invoke.texi (AARCH64/mtune): Add exynos-m1 as an option.
      	* config/aarch64/aarch64-cores.def (exynos-m1): New core.
      	* config/aarch64/aarch64-tune.md: Regenerate.
      
      From-SVN: r221884
      Evandro Menezes committed
    • add option for the Samsung Exynos M1 core · e278ae6f
      	* doc/invoke.texi (ARM/mtune): Add "exynos-m1" as an option.
      	* config/arm/arm.c (arm_issue_rate): Specify "3" for "exynosm1".
      	* config/arm/arm-cores.def (exynos-m1): New core.
      	* config/arm/arm-tune.md: Regenerate.
      	* config/arm/arm-tables.opt: Add entry for "exynos-m1".
      	* config/arm/bpabi.h: Likewise.
      
      From-SVN: r221883
      Evandro Menezes committed
    • libgomp: rework initialization of offloading · a51df54e
      gcc/
      	* config/i386/intelmic-mkoffload.c (generate_host_descr_file): Call
      	GOMP_offload_unregister from the destructor.
      libgomp/
      	* libgomp-plugin.h (struct mapping_table): Replace with addr_pair.
      	* libgomp.h (struct gomp_memory_mapping): Remove.
      	(struct target_mem_desc): Change type of mem_map from
      	gomp_memory_mapping * to splay_tree_s *.
      	(struct gomp_device_descr): Remove register_image_func, get_table_func.
      	Add load_image_func, unload_image_func.
      	Change type of mem_map from gomp_memory_mapping to splay_tree_s.
      	Remove offload_regions_registered.
      	(gomp_init_tables): Remove.
      	(gomp_free_memmap): Change type of argument from gomp_memory_mapping *
      	to splay_tree_s *.
      	* libgomp.map (GOMP_4.0.1): Add GOMP_offload_unregister.
      	* oacc-host.c (host_dispatch): Do not initialize register_image_func,
      	get_table_func, mem_map.is_initialized, mem_map.splay_tree.root,
      	offload_regions_registered.
      	Initialize load_image_func, unload_image_func, mem_map.root.
      	(goacc_host_init): Do not initialize host_dispatch.mem_map.lock.
      	* oacc-init.c (lazy_open): Don't call gomp_init_tables.
      	(acc_shutdown_1): Use dev's lock and splay_tree instead of mem_map's.
      	* oacc-mem.c (lookup_host): Get gomp_device_descr *dev instead of
      	gomp_memory_mapping *.  Use dev's lock and splay_tree.
      	(lookup_dev): Use dev's lock.
      	(acc_deviceptr): Pass dev to lookup_host instead of mem_map.
      	(acc_is_present): Likewise.
      	(acc_map_data): Likewise.
      	(acc_unmap_data): Likewise.  Use dev's lock.
      	(present_create_copy): Likewise.
      	(delete_copyout): Pass dev to lookup_host instead of mem_map.
      	(update_dev_host): Likewise.
      	(gomp_acc_remove_pointer): Likewise.  Use dev's lock.
      	* oacc-parallel.c (GOACC_parallel): Use dev's lock and splay_tree.
      	* plugin/plugin-host.c (GOMP_OFFLOAD_register_image): Remove.
      	(GOMP_OFFLOAD_get_table): Remove
      	(GOMP_OFFLOAD_load_image): New function.
      	(GOMP_OFFLOAD_unload_image): New function.
      	* target.c (register_lock): New mutex for offload image registration.
      	(num_devices): Do not guard with PLUGIN_SUPPORT.
      	(gomp_realloc_unlock): New static function.
      	(gomp_map_vars_existing): Add device descriptor argument.  Unlock mutex
      	before gomp_fatal.
      	(gomp_map_vars): Use dev's lock and splay_tree instead of mem_map's.
      	Pass devicep to gomp_map_vars_existing.  Unlock mutex before gomp_fatal.
      	(gomp_copy_from_async): Use dev's lock and splay_tree instead of
      	mem_map's.
      	(gomp_unmap_vars): Likewise.
      	(gomp_update): Remove gomp_memory_mapping argument.  Use dev's lock and
      	splay_tree instead of mm's.  Unlock mutex before gomp_fatal.
      	(gomp_offload_image_to_device): New static function.
      	(GOMP_offload_register): Add mutex lock.
      	Call gomp_offload_image_to_device for all initialized devices.
      	Replace gomp_realloc with gomp_realloc_unlock.
      	(GOMP_offload_unregister): New function.
      	(gomp_init_tables): Replace with gomp_init_device.  Replace a call to
      	get_table_func from the plugin with calls to init_device_func and
      	gomp_offload_image_to_device.
      	(gomp_free_memmap): Change type of argument from gomp_memory_mapping *
      	to splay_tree_s *.
      	(GOMP_target): Do not call gomp_init_tables.  Use dev's lock and
      	splay_tree instead of mem_map's.  Unlock mutex before gomp_fatal.
      	(GOMP_target_data): Do not call gomp_init_tables.
      	(GOMP_target_update): Likewise.  Remove argument from gomp_update.
      	(gomp_load_plugin_for_device): Replace register_image and get_table
      	with load_image and unload_image in DLSYM ().
      	(gomp_register_images_for_device): Remove function.
      	(gomp_target_init): Do not initialize current_device.mem_map.*,
      	current_device.offload_regions_registered.
      	Remove call to gomp_register_images_for_device.
      	Do not free offload_images and num_offload_images.
      liboffloadmic/
      	* plugin/libgomp-plugin-intelmic.cpp: Include map.
      	(AddrVect, DevAddrVect, ImgDevAddrMap): New typedefs.
      	(num_devices, num_images, address_table): New static vars.
      	(num_libraries, lib_descrs): Remove static vars.
      	(set_mic_lib_path): Rename to ...
      	(init): ... this.  Allocate address_table and get num_devices.
      	(GOMP_OFFLOAD_get_num_devices): return num_devices.
      	(load_lib_and_get_table): Remove static function.
      	(offload_image): New static function.
      	(GOMP_OFFLOAD_get_table): Remove function.
      	(GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New functions.
      
      From-SVN: r221878
      Ilya Verbin committed
  9. 03 Apr, 2015 2 commits
  10. 02 Apr, 2015 6 commits
  11. 01 Apr, 2015 2 commits
    • sync.md (UNSPEC_MOVA): Remove. · 35238bb5
      	* config/i386/sync.md (UNSPEC_MOVA): Remove.
      	(atomic_load<mode>): Change operand 0 predicate to
      	nonimmediate_operand and fix up the destination when needed.
      	Use UNSPEC_LDA.
      	(atomic_loaddi_fpu): Use UNSPEC_LDA.
      	(atomic_store<mode>): Change operand 1 predicate to
      	nonimmendate_operand and move the source to register when needed.
      	Use UNSPEC_STA.
      	(atomic_store<mode>_1): Use UNSPEC_STA.
      	(atomic_storedi_fpu): Change operand 1 to nonimmediate_operand.
      	Fix moves from memory operand.  Use UNSPEC_STA.
      
      From-SVN: r221811
      Uros Bizjak committed
    • re PR target/65624 (ICE in aarch64-builtins.c when expanding 4-argument aarch64 intrinsic.) · 0ff2bf46
      2015-04-01  Max Ostapenko  <m.ostapenko@partner.samsung.com>
      
      	PR target/65624
      
      	gcc/
      	* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_builtin): Increase
      	args array size by one to avoid buffer overflow.
      
      	gcc/testsuite/
      	* gcc.target/aarch64/pr65624.c: New test.
      
      From-SVN: r221807
      Max Ostapenko committed
  12. 31 Mar, 2015 2 commits
    • re PR target/58945 (Improve atomic_compare_and_swap*_doubleword pattern) · 9e91e2cd
      	PR target/58945
      	* config/i386/sync.md (atomic_compare_and_swap<dwi>_doubleword):
      	Do not split operands 0 and operands 2 to halfmode.
      	(atomic_compare_and_swap<mode>): Update for
      	atomic_compare_and_swap<dwi>_doubleword changes.
      
      From-SVN: r221798
      Uros Bizjak committed
    • S/390: Hotpatch: Remove special handling of nested functions. · 2d38d809
      gcc/
      2015-03-31  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	    * config/s390/s390.c (s390_function_num_hotpatch_hw): Allow hotpatching
      	    nested functions.
      	    (s390_reorg): Adapt to new signature of s390_function_num_hotpatch_hw.
      	    (s390_asm_output_function_label): Adapt to new signature of
      	    s390_function_num_hotpatch_hw
      	    Optimise the code generating assembler output.
      	    Add comments to assembler file.
      
      gcc/testsuite/
      2015-03-31  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	    * gcc.target/s390/hotpatch-25.c: New test.
      	    * gcc.target/s390/hotpatch-1.c: Update test.
      	    * gcc.target/s390/hotpatch-10.c: Update test.
      	    * gcc.target/s390/hotpatch-11.c: Update test.
      	    * gcc.target/s390/hotpatch-12.c: Update test.
      	    * gcc.target/s390/hotpatch-13.c: Update test.
      	    * gcc.target/s390/hotpatch-14.c: Update test.
      	    * gcc.target/s390/hotpatch-15.c: Update test.
      	    * gcc.target/s390/hotpatch-16.c: Update test.
      	    * gcc.target/s390/hotpatch-17.c: Update test.
      	    * gcc.target/s390/hotpatch-18.c: Update test.
      	    * gcc.target/s390/hotpatch-19.c: Update test.
      	    * gcc.target/s390/hotpatch-2.c: Update test.
      	    * gcc.target/s390/hotpatch-21.c: Update test.
      	    * gcc.target/s390/hotpatch-22.c: Update test.
      	    * gcc.target/s390/hotpatch-23.c: Update test.
      	    * gcc.target/s390/hotpatch-24.c: Update test.
      	    * gcc.target/s390/hotpatch-3.c: Update test.
      	    * gcc.target/s390/hotpatch-4.c: Update test.
      	    * gcc.target/s390/hotpatch-5.c: Update test.
      	    * gcc.target/s390/hotpatch-6.c: Update test.
      	    * gcc.target/s390/hotpatch-7.c: Update test.
      	    * gcc.target/s390/hotpatch-8.c: Update test.
      	    * gcc.target/s390/hotpatch-9.c: Update test.
      	    * gcc.target/s390/hotpatch-compile-16.c: Update test.
      
      From-SVN: r221794
      Dominik Vogt committed
  13. 27 Mar, 2015 4 commits
    • Add default_binds_local_p_2 and use it for x86 · a5eef8e9
      Protected data symbol means that it can't be pre-emptied.  It doesn't mean
      its address won't be external.  This is true for pointer to protected
      function.  With copy relocation, address of protected data defined in the
      shared library may also be external.  We only know that for sure at
      run-time.  TARGET_BINDS_LOCAL_P should return false on protected data
      symbol.
      
      gcc/
      
      	PR target/65248
      	* output.h (default_binds_local_p_2): New.
      	* varasm.c (default_binds_local_p_2): Renamed to ...
      	(default_binds_local_p_3): This.  Don't return true on protected
      	data symbol if protected data may be external.
      	(default_binds_local_p): Use default_binds_local_p_3.
      	(default_binds_local_p_1): Likewise.
      	(default_binds_local_p_2): New.
      	* config/i386/i386.c (TARGET_BINDS_LOCAL_P): Set to
      	default_binds_local_p_2 if TARGET_MACHO is undefined.
      
      gcc/testsuite/
      
      	PR target/65248
      	* gcc.target/i386/pr65248-1.c: New file.
      	* gcc.target/i386/pr65248-2.c: Likewise.
      	* gcc.target/i386/pr65248-3.c: Likewise.
      	* gcc.target/i386/pr65248-4.c: Likewise.
      
      From-SVN: r221742
      H.J. Lu committed
    • re PR target/65593 (internal compiler error: in extract_insn, at recog.c:2343) · f21a5899
      	PR target/65593
      	* config/i386/i386.c (legitimize_pic_address): If base
      	is SYMBOL_REF or LABEL_REF using %rip addressing, force
      	it to reg to avoid PLUS of SYMBOL_REF/LABEL_REF and register.
      
      	* gcc.c-torture/compile/pr65593.c: New test.
      
      From-SVN: r221741
      Jakub Jelinek committed
    • Allow misaligned volatile stores in C6X. · 2166d2a1
      	* config/c6x/c6x.md (movmisalign<mode>): Use MEM_P, not
      	memory_operand.
      
      From-SVN: r221732
      Bernd Schmidt committed
    • Fix c6x-uclinux build failure. · f50e5fcc
      	* config/c6x/constraints.md (S3): New constraint.
      	* config/c6x/c6x.md (real_jump): Use it.
      
      From-SVN: r221731
      Bernd Schmidt committed
  14. 26 Mar, 2015 3 commits
  15. 25 Mar, 2015 2 commits
  16. 23 Mar, 2015 3 commits