Commit Graph

153748 Commits

Author SHA1 Message Date
Trevor Saunders
8f9b31f7f1 move several bitmaps from gc memory to the default obstack and use auto_bitmap
These places where probably trying to use the default bitmap obstack,
but passing 0 to bitmap_initialize actually uses gc allocation.  In any
case they are all cleaned up before going out of scope so using
auto_bitmap should be fine.

gcc/ChangeLog:

2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
	management with auto_bitmap.
	(fix_inter_tick): Likewise.
	(fix_recovery_deps): Likewise.
	* ira.c (add_store_equivs): Likewise.
	(find_moveable_pseudos): Likewise.
	(split_live_ranges_for_shrink_wrap): Likewise.
	* print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
	(rtx_reuse_manager::seen_def_p): Likewise.
	(rtx_reuse_manager::set_seen_def): Likewise.
	* print-rtl.h (class rtx_reuse_manager): Likewise.

From-SVN: r248022
2017-05-14 00:38:53 +00:00
Trevor Saunders
0e3de1d41e use auto_bitmap more
gcc/ChangeLog:

2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
	lifetime.
	(migrate_btr_def): Likewise.
	* cfgloop.c (get_loop_body_in_bfs_order): Likewise.
	* df-core.c (loop_post_order_compute): Likewise.
	(loop_inverted_post_order_compute): Likewise.
	* hsa-common.h: Likewise.
	* hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
	* init-regs.c (initialize_uninitialized_regs): Likewise.
	* ipa-inline.c (resolve_noninline_speculation): Likewise.
	(inline_small_functions): Likewise.
	* ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
	* ira.c (combine_and_move_insns): Likewise.
	(build_insn_chain): Likewise.
	* loop-invariant.c (find_invariants): Likewise.
	* lower-subreg.c (propagate_pseudo_copies): Likewise.
	* predict.c (tree_predict_by_opcode): Likewise.
	(predict_paths_leading_to): Likewise.
	(predict_paths_leading_to_edge): Likewise.
	(estimate_loops_at_level): Likewise.
	(estimate_loops): Likewise.
	* shrink-wrap.c (try_shrink_wrapping): Likewise.
	(spread_components): Likewise.
	* tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
	* tree-loop-distribution.c (rdg_build_partitions): Likewise.
	* tree-predcom.c (tree_predictive_commoning_loop): Likewise.
	* tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
	* tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
	* tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
	* tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
	* tree-ssa-threadupdate.c (compute_path_counts): Likewise.
	(mark_threaded_blocks): Likewise.
	(thread_through_all_blocks): Likewise.
	* tree-ssa.c (verify_ssa): Likewise.
	(execute_update_addresses_taken): Likewise.
	* tree-ssanames.c (verify_ssaname_freelists): Likewise.

From-SVN: r248021
2017-05-14 00:38:48 +00:00
Trevor Saunders
792bb49bb0 replace some manual stacks with auto_vec
gcc/ChangeLog:

2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* cfganal.c (mark_dfs_back_edges): Replace manual stack with
	auto_vec.
	(post_order_compute): Likewise.
	(inverted_post_order_compute): Likewise.
	(pre_and_rev_post_order_compute_fn): Likewise.

From-SVN: r248020
2017-05-14 00:38:40 +00:00
Trevor Saunders
a5c9f2b736 allow constructing a auto_vec with a preallocation, and a possibly larger actual allocation size
This allows us to set the capacity of the vector when we construct it,
and still use a stack buffer when the size is small enough.

gcc/ChangeLog:

2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* genrecog.c (int_set::int_set): Explicitly construct our
	auto_vec base class.
	* vec.h (auto_vec::auto_vec): New constructor.

From-SVN: r248019
2017-05-14 00:38:35 +00:00
Trevor Saunders
4b5c84f497 allow auto_bitmap to use other bitmap obstacks
gcc/ChangeLog:

2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* bitmap.h (class auto_bitmap): New constructor taking
	bitmap_obstack * argument.

From-SVN: r248018
2017-05-14 00:38:29 +00:00
Trevor Saunders
a4d51bfbc6 store the bitmap_head within the auto_bitmap
This gets rid of one allocation per bitmap.  Often the bitmap_head is
now on the stack, when it isn't its part of some other struct on the
heap instead of being refered to by that struct.  On 64 bit platforms
this will increase the size of such structs by 24 bytes, but its an over
all win since we don't need an 8 byte pointer pointing at the
bitmap_head.  Given that the auto_bitmap owns the bitmap_head anyway we
know there would never be a place where two auto_bitmaps would refer to
the same bitmap_head object.

gcc/ChangeLog:

2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* bitmap.h (class auto_bitmap): Change type of m_bits to
	bitmap_head, and adjust ctor / dtor and member operators.

From-SVN: r248017
2017-05-14 00:38:24 +00:00
GCC Administrator
470e7e5650 Daily bump.
From-SVN: r248016
2017-05-14 00:16:26 +00:00
Nicolas Koenig
28ae01cd23 re PR fortran/80442 (Rejects DATA statement with array slice)
2017-05-09  Nicolas Koenig  <koenigni@student.ethz.ch>

	PR fortran/80442
	* array.c (gfc_ref_dimen_size): Simplify stride
	expression
	* data.c (gfc_advance_section): Simplify start,
	end and stride expressions
	(gfc_advance_section): Simplify start and end
	expressions
	(gfc_get_section_index): Simplify start expression 

2017-05-09  Nicolas Koenig  <koenigni@student.ethz.ch>

	PR fortran/80442
	* gfortran.dg/impl_do_var_data.f90: New Test

From-SVN: r248012
2017-05-13 23:38:36 +00:00
Uros Bizjak
364490206e compare-elim.c (equivalent_reg_at_start): Return NULL_RTX when returned register mode doesn't match original mode.
* compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
	when returned register mode doesn't match original mode.

From-SVN: r248009
2017-05-13 23:07:49 +02:00
Jerry DeLisle
2263019d60 io.c (gfc_resolve_dt): Fix returns to bool type.
2017-05-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io.c (gfc_resolve_dt): Fix returns to bool type.

From-SVN: r248008
2017-05-13 15:33:34 +00:00
Jeff Law
65fdd5e9ac mn10300.c (mn10300_match_ccmode): Fix where we look for cc setter after the compare-elim changes.
2017-05-12  Jeff Law  <law@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
	we look for cc setter after the compare-elim changes.
	* config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
	within the vector to match what compare-elim now expects.
	(subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
	(xorsi3_flags, one_cmplsi2_flags): Likewise.

	* config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
	after the compare-elim changes.
	* config/rx/rx.md (abssi2_flags): Fix order of patterns within
	the vector to match what compare-elim now expects.
	(addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
	(andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
	(iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
	(ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
	(ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.

	* config/visium/visium.c (single_set_and_flags): Fix where
	we look for cc setter after the compare-elim changes.
	* config/visium/visium.md (flags_subst_logic): Fix order of patterns
	with the vector to match what compare-elim now expects.
	(flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
	(add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
	(addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
	(sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
	(subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
	(neg<mode>2_insn_set_overflow): Likewise.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r248007
2017-05-13 08:40:53 -06:00
Pekka Jääskeläinen
c7488b4ffb BRIG FE: Fix an assertion when doing an 'lda' of
a private array offset.

From-SVN: r248006
2017-05-13 11:57:16 +00:00
Jim Wilson
f96bf49a02 Patch for RTL expand bug affecting aarch64 vector code.
gcc/
	PR middle-end/79794
    	* expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
	maybe_expand_insn call, set ops[0].target.  If still set after call,
	set alt_rtl.  Add extra arg to recursive calls.
	(extract_bit_field): Add alt_rtl argument.  Pass to
	extract_bit_field.
	* expmed.h (extract_bit_field): Fix prototype.
	* expr.c (emit_group_load_1, copy_blkmode_from_reg)
	(copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
	to extract_bit_field_calls.
	(expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
	Pass alt_rtl to extract_bit_field calls.
	* calls.c (store_unaligned_arguments_into_psuedos)
	load_register_parameters): Pass extra NULL to extract_bit_field calls.
	* optabs.c (maybe_legitimize_operand): Clear op->target when call
	gen_reg_rtx.
	* optabs.h (struct expand_operand): Add target bitfield.

From-SVN: r248004
2017-05-12 18:32:40 -07:00
GCC Administrator
7f390a7b6c Daily bump.
From-SVN: r248003
2017-05-13 00:16:33 +00:00
François Dumont
3838e0c086 Revert revision 247926.
From-SVN: r247998
2017-05-12 21:19:39 +00:00
Joseph Myers
e9cd48dcee * sv.po: Update.
From-SVN: r247996
2017-05-12 21:29:43 +01:00
Martin Sebor
9b5f12ae40 re PR testsuite/80643 (NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c)
gcc/testsuite/ChangeLog:

	PR testsuite/80643
	* gfortran.dg/mvbits_7.f90: Prune diagnostic output incidental
	to the purpose of the test.

From-SVN: r247993
2017-05-12 13:23:00 -06:00
Uros Bizjak
4f0473fe89 compare-elim.c (try_eliminate_compare): Canonicalize operation with embedded compare to [(set (reg:CCM) (compare:CCM...
* compare-elim.c (try_eliminate_compare): Canonicalize
	operation with embedded compare to
	[(set (reg:CCM) (compare:CCM (operation) (immediate)))
	 (set (reg) (operation)].

	* config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.

From-SVN: r247992
2017-05-12 21:04:05 +02:00
Uros Bizjak
88ce9dc38a re PR target/80723 (FAIL gcc.target/i386/cadd.c scan assembler sbb)
PR target/80723
	* config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
	cost of adding a carry flag for ADC instruction.
	[case MINUS]: Ignore the cost of subtracting a carry flag
	for SBB instruction.

From-SVN: r247991
2017-05-12 20:52:51 +02:00
Steven Munroe
b76f155009 config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h, and x86intrin.h
[gcc]

2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>

	* config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
	and x86intrin.h
	* config/rs6000/bmiintrin.h: New file.
	* config/rs6000/bmi2intrin.h: New file.
	* config/rs6000/x86intrin.h: New file.



[gcc/testsuite]

2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>

	* gcc.target/powerpc/bmi-andn-1.c: New file
	* gcc.target/powerpc/bmi-andn-2.c: New file.
	* gcc.target/powerpc/bmi-bextr-1.c: New file.
	* gcc.target/powerpc/bmi-bextr-2.c: New file.
	* gcc.target/powerpc/bmi-bextr-4.c: New file.
	* gcc.target/powerpc/bmi-bextr-5.c: New file.
	* gcc.target/powerpc/bmi-blsi-1.c: New file.
	* gcc.target/powerpc/bmi-blsi-2.c: New file.
	* gcc.target/powerpc/bmi-blsmsk-1.c: new file.
	* gcc.target/powerpc/bmi-blsmsk-2.c: New file.
	* gcc.target/powerpc/bmi-blsr-1.c: New file.
	* gcc.target/powerpc/bmi-blsr-2.c: New File.
	* gcc.target/powerpc/bmi-check.h: New File.
	* gcc.target/powerpc/bmi-tzcnt-1.c: new file.
	* gcc.target/powerpc/bmi-tzcnt-2.c: New file.
	* gcc.target/powerpc/bmi2-bzhi32-1.c: New file.
	* gcc.target/powerpc/bmi2-bzhi64-1.c: New file.
	* gcc.target/powerpc/bmi2-bzhi64-1a.c: New file.
	* gcc.target/powerpc/bmi2-check.h: New file.
	* gcc.target/powerpc/bmi2-mulx32-1.c: New file.
	* gcc.target/powerpc/bmi2-mulx32-2.c: New file.
	* gcc.target/powerpc/bmi2-mulx64-1.c: New file.
	* gcc.target/powerpc/bmi2-mulx64-2.c: New file.
	* gcc.target/powerpc/bmi2-pdep32-1.c: New file.
	* gcc.target/powerpc/bmi2-pdep64-1.c: New file.
	* gcc.target/powerpc/bmi2-pext32-1.c: New File.
	* gcc.target/powerpc/bmi2-pext64-1.c: New file.
	* gcc.target/powerpc/bmi2-pext64-1a.c: New File.

From-SVN: r247988
2017-05-12 18:34:44 +00:00
Paolo Carlini
2a3fa75aac re PR c++/60430 (static_assert and reference to const/constexpr)
2017-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60430
	* g++.dg/cpp0x/pr60430.C: New.

From-SVN: r247986
2017-05-12 17:53:54 +00:00
Jeff Law
e8bf7c7b75 tree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding markers.
* tree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding
	markers.

	* g++.dg/tree-ssa/ssa-dom-thread-4.c: Update expected output.

From-SVN: r247985
2017-05-12 11:36:01 -06:00
Peter Bergner
284d1f76e9 re PR middle-end/80707 (r247844 causes error: extra outgoing edge)
gcc/
	PR middle-end/80707
	* tree-cfg.c: Remove cfg edges of unreachable case statements.

gcc/testsuite/
	PR middle-end/80707
	* g++.dg/pr80707.C: New test.

From-SVN: r247984
2017-05-12 12:13:07 -05:00
Than McIntosh
da55a299c5 compiler: add calling Bfunction Backend::call_expression
Pass in the calling (containing) Bfunction when invoking the Backend
    method call_expression(), so as to handle the case where generation of
    the call forces the creation of a temp var within the calling
    function.
    
    Reviewed-on: https://go-review.googlesource.com/43270

From-SVN: r247981
2017-05-12 16:36:50 +00:00
Eric Botcazou
9dd19976b1 re PR ada/80117 (Standard'Word_Size is wrong for aarch64 ILP32)
* system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
	instead of Word_Size.

	Revert
	2017-03-28  Andreas Schwab  <schwab@suse.de>

	PR ada/80117
	* system-linux-aarch64-ilp32.ads: New file.
	* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
	from LIBGNAT_TARGET_PAIRS.
	(LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
	(LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
	LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
	or -mabi=ilp32, resp.

From-SVN: r247979
2017-05-12 15:55:46 +00:00
Will Schmidt
302a0e37cf rs6000.c (rs6000_gimple_fold_builtin): Add handling for early expansion of vector divide builtins.
[gcc]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
	early expansion of vector divide builtins.
	(builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
	builtins identified as having unsigned arguments.


[gcc/testsuite]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-div-float.c: New.
	* gcc.target/powerpc/fold-vec-div-floatdouble.c: New.
	* gcc.target/powerpc/fold-vec-div-longlong.c: New.

From-SVN: r247977
2017-05-12 15:40:04 +00:00
Will Schmidt
a7785078b5 rs6000.c (gimple-fold.h): New #include.
[gcc]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (gimple-fold.h): New #include.
	(rs6000_gimple_fold_builtin): Add handling for early GIMPLE
	expansion of vector logical operations (and, andc, or, xor,
	nor, orc, nand)

[gcc/testsuite]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-logical-ands-char.c: New.
	* gcc.target/powerpc/fold-vec-logical-ands-int.c: New.
	* gcc.target/powerpc/fold-vec-logical-ands-longlong.c: New.
	* gcc.target/powerpc/fold-vec-logical-ands-short.c: New.
	* gcc.target/powerpc/fold-vec-logical-ors-char.c: New.
	* gcc.target/powerpc/fold-vec-logical-ors-int.c: New.
	* gcc.target/powerpc/fold-vec-logical-ors-longlong.c: New.
	* gcc.target/powerpc/fold-vec-logical-ors-short.c: New.
	* gcc.target/powerpc/fold-vec-logical-other-char.c: New.
	* gcc.target/powerpc/fold-vec-logical-other-int.c: New.
	* gcc.target/powerpc/fold-vec-logical-other-longlong.c: New.
	* gcc.target/powerpc/fold-vec-logical-other-short.c: New.

From-SVN: r247976
2017-05-12 15:35:17 +00:00
Will Schmidt
edc19e0370 gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>

[gcc]
        * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
        * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.

From-SVN: r247975
2017-05-12 15:22:58 +00:00
Will Schmidt
d6bb7841f2 rs6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of vector multiplies.
[gcc]

2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>

        * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
        early GIMPLE expansion of vector multiplies.

From-SVN: r247974
2017-05-12 15:17:27 +00:00
Jonathan Wakely
f859f912e4 PR libstdc++/78939 make tuple_size<cv T> depend on tuple_size<T>
PR libstdc++/78939
	* include/std/utility (tuple_size<cv T>): Only define partial
	specializations when tuple_size<T>::value is valid.
	* testsuite/20_util/tuple/78939.cc: New.
	* testsuite/20_util/tuple/cv_tuple_size_neg.cc: New.

From-SVN: r247973
2017-05-12 15:43:11 +01:00
Uros Bizjak
48ac9454fa * gcc.target/i386/pr22152.c: Remove unneeded dg-additional-options.
From-SVN: r247972
2017-05-12 16:35:13 +02:00
Prakhar Bahuguna
82600dfc07 [ARM] Add missing TARGET_32BIT conditional to movsi
2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
    TARGET_HAVE_MOVT conditional.
    (movt splitter): Likewise.

From-SVN: r247971
2017-05-12 14:16:52 +00:00
Paolo Carlini
9206028e8c re PR c++/49604 (forward-declared enum's elements in class scope gets default access (class vs struct))
2017-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/49604
	* g++.dg/cpp0x/forw_enum14.C: New.
	* g++.dg/cpp0x/forw_enum15.C: Likewise.

From-SVN: r247969
2017-05-12 13:20:21 +00:00
Ian Lance Taylor
06ace75d4b runtime: fix build for non-split-stack systems
Change memory allocation accounting for stacks to use stacks_sys,
    since that seems to be what it is for.
    
    Reviewed-on: https://go-review.googlesource.com/43297

From-SVN: r247967
2017-05-12 12:49:34 +00:00
Richard Biener
7af1c0ad98 tree-ssa-sccvn.h (has_VN_INFO): Declare.
2017-05-12  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.h (has_VN_INFO): Declare.
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Fold all stmts not inplace.

	* g++.dg/tree-ssa/ssa-dse-2.C: Adjust.

From-SVN: r247966
2017-05-12 12:04:31 +00:00
Paolo Carlini
f7e95bdbca re PR c++/67687 (ICE initializing constexpr member with constexpr constructor)
2017-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/67687
	* g++.dg/cpp0x/constexpr-ice17.C: New.

From-SVN: r247964
2017-05-12 11:24:56 +00:00
Richard Biener
53e788d00c re PR tree-optimization/80713 (recent crash in update_dep_bb)
2017-05-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80713
	* tree-ssa-pre.c (remove_dead_inserted_code): Clear
	inserted_exprs bit for not removed stmts.

	* gcc.dg/torture/pr80713.c: New testcase.

From-SVN: r247963
2017-05-12 10:54:29 +00:00
Andi Kleen
2ead1ab911 Limit perf data buffer during profiling
With high -j parallelism the autofdo tests can randomly fail.
autofdo uses Linux perf to record profiling data.
Linux perf uses a locked perf buffer. By default it has
around 516k buffer per uid (/proc/sys/kernel/perf_event_mlock_kb).

An individual perf record tries to grab the full 516k,
which makes parallel perf record fail.

This patch limits the perf buffer for individual perf record to 8k.
With the default settings this allows a parallelism of the test
cases of 16, which is hopefully good enough

(if not would need to add some kind of semaphore, or ask
the user to increase the limit as root)

I also removed an unneeded -o perf.data option

Thanks to Marcin to finally spotting the problem.

Passes bootstrap and test on x86_64-linux. Ok for trunk?

gcc/testsuite/:

2017-05-12  Andi Kleen  <ak@linux.intel.com>

	PR testsuite/77684
	* lib/target-supports.exp (profopt-perf-wrapper):
	Add -m8 option to increase parallelism.

From-SVN: r247962
2017-05-12 10:09:50 +00:00
Thomas Schwinge
1e47f02b63 OpenACC C front end maintenance: c_parser_oacc_single_int_clause
gcc/c/
	* c-parser.c (c_parser_omp_clause_num_gangs)
	(c_parser_omp_clause_num_workers)
	(c_parser_omp_clause_vector_length): Merge functions into...
	(c_parser_oacc_single_int_clause): ... this new function.  Adjust
	all users.
	gcc/testsuite/
	* c-c++-common/goacc/parallel-dims-1.c: New file.
	* c-c++-common/goacc/parallel-dims-2.c: Likewise.

From-SVN: r247960
2017-05-12 11:33:18 +02:00
Rainer Orth
62ffe9207c Load new scanlang.exp
libitm:
	* testsuite/lib/libitm.exp: Load scanlang.exp.

	libgomp:
	* testsuite/lib/libgomp.exp: Load scanlang.exp.

	libatomic:
	* testsuite/lib/libatomic.exp: Load scanlang.exp.

From-SVN: r247959
2017-05-12 09:20:37 +00:00
Thomas Schwinge
b0f271ce56 [PR middle-end/69921] Use "oacc kernels parallelized" attribute for parallelized OpenACC kernels
gcc/
	PR middle-end/69921
	* tree-parloops.c (create_parallel_loop): Set "oacc kernels
	parallelized" attribute for parallelized OpenACC kernels.
	* omp-offload.c (execute_oacc_device_lower): Use it.
	gcc/testsuite/
	* c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
	* c-c++-common/goacc/classify-kernels.c: Likewise.
	* c-c++-common/goacc/kernels-counter-vars-function-scope.c:
	Likewise.
	* c-c++-common/goacc/kernels-double-reduction-n.c: Likewise.
	* c-c++-common/goacc/kernels-double-reduction.c: Likewise.
	* c-c++-common/goacc/kernels-loop-2.c: Likewise.
	* c-c++-common/goacc/kernels-loop-3.c: Likewise.
	* c-c++-common/goacc/kernels-loop-g.c: Likewise.
	* c-c++-common/goacc/kernels-loop-mod-not-zero.c: Likewise.
	* c-c++-common/goacc/kernels-loop-n.c: Likewise.
	* c-c++-common/goacc/kernels-loop-nest.c: Likewise.
	* c-c++-common/goacc/kernels-loop.c: Likewise.
	* c-c++-common/goacc/kernels-one-counter-var.c: Likewise.
	* c-c++-common/goacc/kernels-reduction.c: Likewise.
	* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
	* gfortran.dg/goacc/classify-kernels.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-2.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-2.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-enter-exit-2.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-enter-exit.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-update.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-n.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop.f95: Likewise.

From-SVN: r247957
2017-05-12 11:18:34 +02:00
Thomas Schwinge
2565163443 Use "oacc kernels" attribute for OpenACC kernels
gcc/
	* omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
	Set "oacc kernels" attribute.
	* omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
	parameter.  Adjust all users.
	(oacc_fn_attrib_kernels_p): Remove function.
	* omp-offload.c (execute_oacc_device_lower): Look for "oacc
	kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
	* tree-ssa-loop.c (gate_oacc_kernels): Likewise.
	* tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
	assert "oacc kernels" attribute is set.
	gcc/testsuite/
	* c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
	* c-c++-common/goacc/classify-kernels.c: Likewise.
	* c-c++-common/goacc/classify-parallel.c: Likewise.
	* c-c++-common/goacc/classify-routine.c: Likewise.
	* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
	* gfortran.dg/goacc/classify-kernels.f95: Likewise.
	* gfortran.dg/goacc/classify-parallel.f95: Likewise.
	* gfortran.dg/goacc/classify-routine.f95: Likewise.

From-SVN: r247955
2017-05-12 11:02:55 +02:00
Thomas Schwinge
ee58b02f11 Test cases to check OpenACC offloaded function's attributes and classification
gcc/testsuite/
	* c-c++-common/goacc/classify-kernels-unparallelized.c: New file.
	* c-c++-common/goacc/classify-kernels.c: Likewise.
	* c-c++-common/goacc/classify-parallel.c: Likewise.
	* c-c++-common/goacc/classify-routine.c: Likewise.
	* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
	* gfortran.dg/goacc/classify-kernels.f95: Likewise.
	* gfortran.dg/goacc/classify-parallel.f95: Likewise.
	* gfortran.dg/goacc/classify-routine.f95: Likewise.

From-SVN: r247953
2017-05-12 10:42:31 +02:00
Thomas Schwinge
9ef6dfbaf2 Typo fixes for "Don't assume __secure_getenv is available"
libgfortran/
	* runtime/environ.c (weak_secure_getenv): Fix "__secure_gettime"
	vs. "__secure_getenv" typo.
	(secure_getenv): Fix "HAVE__SECURE_GETENV"
	vs. "HAVE___SECURE_GETENV" typo.

From-SVN: r247952
2017-05-12 09:56:41 +02:00
Ian Lance Taylor
fa846918fc mksigtab.sh: recurse once when adding signals to SIGLIST
On MIPS, SIGABRT is defined like this:
     #define SIGIOT   6
     #define SIGABRT  SIGIOT
    
    This breaks addsig which tries to append __SIGIOT_ to SIGLIST. Signal
    number 6 is later added to the output and go complains about a
    duplicate signal number.
    
    Fix by recursing once when obtaining the signal number from
    gen-sysinfo.go if the signal is defined as an alias of another signal.
    Also modify the sed expression to 's/.* = //' which is equivalent to
    the original expression but is less misleading given that it might not
    match a number.
    
    Reviewed-on: https://go-review.googlesource.com/43252

From-SVN: r247948
2017-05-12 01:09:42 +00:00
Ian Lance Taylor
b3a7fdc3ea os: use opendir64 and closedir64 on AIX
When using readdir64 on AIX, we must also use
    opendir64 and closedir64.
    
    Issue golang/go#19200
    
    Reviewed-on: https://go-review.googlesource.com/43251

From-SVN: r247947
2017-05-12 00:59:15 +00:00
Nathan Sidwell
2d82ec25dc * lib/gcc-dg.exp (schedule-cleanups): Add lang dump capability.
From-SVN: r247946
2017-05-12 00:28:44 +00:00
GCC Administrator
c7145711b8 Daily bump.
From-SVN: r247945
2017-05-12 00:16:29 +00:00
Ian Lance Taylor
be18b176b7 re PR go/64238 (ICE in get_partitioning_class, at symtab.c:1775)
PR go/64238
	* go-gcc.cc (Gcc_backend::implicit_variable_reference): Set
	DECL_EXTERNAL, clear TREE_STATIC.

From-SVN: r247937
2017-05-11 23:52:54 +00:00
Carl Love
b403beb80a rs6000-c: Add support for built-in functions vector unsigned char vec_popcnt (vector...
gcc/ChangeLog:

2017-05-11  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c: Add support for built-in functions
	vector unsigned char vec_popcnt (vector signed char)
	vector unsigned char vec_popcnt (vector unsigned char)
	vector unsigned short vec_popcnt (vector signed short)
	vector unsigned short vec_popcnt (vector unsigned short)
	vector unsigned int vec_popcnt (vector signed int)
	vector unsigned int vec_popcnt (vector unsigned int)
	vector unsigned long long vec_popcnt (vector signed long long)
	vector unsigned long long vec_popcnt (vector unsigned long long)
	vector signed long long vec_slo (vector signed long long,
                                         vector signed char)
	vector signed long long vec_slo (vector signed long long,
                                         vector unsigned char)
	vector unsigned long long vec_slo (vector unsigned long long,
                                           vector signed char)
	vector unsigned long long vec_slo (vector unsigned long long,
                                           vector unsigned char)
	* config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
	VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
	* config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
	vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
	* doc/extend.texi: Update the built-in documentation file for the
	new built-in functions.


gcc/testsuite/ChangeLog:

2017-05-11  Carl Love  <cel@us.ibm.com>

	* gcc.target/powerpc/builtins-3-p8.c: Add tests for the new built-ins
	to the test suite file.
	* gcc.target/powerpc/builtins-3.c: Add tests for the new built-ins
	to the test suite file.

From-SVN: r247933
2017-05-11 22:10:10 +00:00