1. 03 Sep, 2014 30 commits
  2. 02 Sep, 2014 10 commits
    • support ggc hash_map and hash_set · b086d530
      gcc/ChangeLog:
      
      	* alloc-pool.c: Include coretypes.h.
      	* cgraph.h, dbxout.c, dwarf2out.c, except.c, except.h, function.c,
      	function.h, symtab.c, tree-cfg.c, tree-eh.c: Use hash_map and
      	hash_set instead of htab.
      	* ggc-page.c (in_gc): New variable.
      	(ggc_free): Do nothing if a collection is taking place.
      	(ggc_collect): Set in_gc appropriately.
      	* ggc.h (gt_ggc_mx(const char *)): New function.
      	(gt_pch_nx(const char *)): Likewise.
      	(gt_ggc_mx(int)): Likewise.
      	(gt_pch_nx(int)): Likewise.
      	* hash-map.h (hash_map::hash_entry::ggc_mx): Likewise.
      	(hash_map::hash_entry::pch_nx): Likewise.
      	(hash_map::hash_entry::pch_nx_helper): Likewise.
      (hash_map::hash_map): Adjust.
      (hash_map::create_ggc): New function.
      (gt_ggc_mx): Likewise.
      (gt_pch_nx): Likewise.
      	* hash-set.h (default_hashset_traits::ggc_mx): Likewise.
      (default_hashset_traits::pch_nx): Likewise.
      (hash_set::hash_entry::ggc_mx): Likewise.
      (hash_set::hash_entry::pch_nx): Likewise.
      (hash_set::hash_entry::pch_nx_helper): Likewise.
      (hash_set::hash_set): Adjust.
      (hash_set::create_ggc): New function.
      (hash_set::elements): Likewise.
      (gt_ggc_mx): Likewise.
      (gt_pch_nx): Likewise.
      	* hash-table.h (hash_table::hash_table): Adjust.
      (hash_table::m_ggc): New member.
      	(hash_table::~hash_table): Adjust.
      	(hash_table::expand): Likewise.
      	(hash_table::empty): Likewise.
      (gt_ggc_mx): New function.
      	(hashtab_entry_note_pointers): Likewise.
      (gt_pch_nx): Likewise.
      
      From-SVN: r214834
      Trevor Saunders committed
    • rs6000-builtin.def (XVCVSXDDP_SCALE): New built-in definition. · 70f0f8b2
      [gcc]
      
      2014-09-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000-builtin.def (XVCVSXDDP_SCALE):  New
      	built-in definition.
      	(XVCVUXDDP_SCALE): Likewise.
      	(XVCVDPSXDS_SCALE): Likewise.
      	(XVCVDPUXDS_SCALE): Likewise.
      	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins):  Add
      	entries for VSX_BUILTIN_XVCVSXDDP_SCALE,
      	VSX_BUILTIN_XVCVUXDDP_SCALE, VSX_BUILTIN_XVCVDPSXDS_SCALE, and
      	VSX_BUILTIN_XVCVDPUXDS_SCALE.
      	* config/rs6000/rs6000-protos.h (rs6000_scale_v2df): New
      	prototype.
      	* config/rs6000/rs6000.c (real.h): New include.
      	(rs6000_scale_v2df): New function.
      	* config/rs6000/vsx.md (UNSPEC_VSX_XVCVSXDDP): New unspec.
      	(UNSPEC_VSX_XVCVUXDDP): Likewise.
      	(UNSPEC_VSX_XVCVDPSXDS): Likewise.
      	(UNSPEC_VSX_XVCVDPUXDS): Likewise.
      	(vsx_xvcvsxddp_scale): New define_expand.
      	(vsx_xvcvsxddp): New define_insn.
      	(vsx_xvcvuxddp_scale): New define_expand.
      	(vsx_xvcvuxddp): New define_insn.
      	(vsx_xvcvdpsxds_scale): New define_expand.
      	(vsx_xvcvdpsxds): New define_insn.
      	(vsx_xvcvdpuxds_scale): New define_expand.
      	(vsx_xvcvdpuxds): New define_insn.
      	* doc/extend.texi (vec_ctf): Add new prototypes.
      	(vec_cts): Likewise.
      	(vec_ctu): Likewise.
      	(vec_splat): Likewise.
      	(vec_div): Likewise.
      	(vec_mul): Likewise.
      
      [gcc/testsuite]
      
      2014-09-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* gcc.target/powerpc/builtins-1.c: Add tests for vec_ctf,
      	vec_cts, and vec_ctu.
      	* gcc.target/powerpc/builtins-2.c: Likewise.
      
      From-SVN: r214831
      Bill Schmidt committed
    • badalloc1.C (arena_size): Scale according to target pointer size. · bb42f968
      	* g++.old-deja/g++.eh/badalloc1.C [!STACK_SIZE && !__FreeBSD__]
      	[!__sun__ && !__hpux__] (arena_size): Scale according to
      	target pointer size.
      
      From-SVN: r214828
      Hans-Peter Nilsson committed
    • re PR fortran/62270 (-Wlogical-not-parentheses warnings) · 86eb9e2f
      	PR fortran/62270
      	* interface.c (compare_parameter): Fix condition.
      	* trans-expr.c (gfc_conv_procedure_call): Likewise.
      
      	* gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
      
      From-SVN: r214827
      Marek Polacek committed
    • [2/2] Vectorise lroundf, lfloorf, lceilf using the new ARMv8-A vcvt* instructions. · e9e67af1
      	PR target/62275
      	* config/arm/neon.md
      	(neon_vcvt<NEON_VCVT:nvrint_variant><su_optab><VCVTF:mode>
      	<v_cmp_result>): New pattern.
      	* config/arm/iterators.md (NEON_VCVT): New int iterator.
      	* config/arm/arm_neon_builtins.def (vcvtav2sf, vcvtav4sf, vcvtauv2sf,
      	vcvtauv4sf, vcvtpv2sf, vcvtpv4sf, vcvtpuv2sf, vcvtpuv4sf, vcvtmv2sf,
      	vcvtmv4sf, vcvtmuv2sf, vcvtmuv4sf): New builtin definitions.
      	* config/arm/arm.c (arm_builtin_vectorized_function): Handle
      	BUILT_IN_LROUNDF, BUILT_IN_LFLOORF, BUILT_IN_LCEILF.
      
      	PR target/62275
      	* gcc.target/arm/vect-lceilf_1.c: New test.
      	* gcc.target/arm/vect-lfloorf_1.c: Likewise.
      	* gcc.target/arm/vect-lroundf_1.c: Likewise.
      
      From-SVN: r214826
      Kyrylo Tkachov committed
    • [ARM][1/2] Implement lceil, lfloor, lround optabs with new ARMv8-A instructions. · ababd936
                                                                                                                                                                                   
            PR target/62275
            * config/arm/iterators.md (FIXUORS): New code iterator.
            (VCVT): New int iterator.
            (su_optab): New code attribute.
            (su): Likewise.
            * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): New pattern.
      
            PR target/62275
            * gcc.target/arm/lceil-vcvt_1.c: New test.
            * gcc.target/arm/lfloor-vcvt_1.c: Likewise.
            * gcc.target/arm/lround-vcvt_1.c: Likewise.
      
      From-SVN: r214825
      Kyrylo Tkachov committed
    • [AArch64] Use CC_Z and CC_NZ with csinc and similar instructions. · cd5660ab
      	* config/aarch64/predicates.md (aarch64_comparison_operation):
      	New special predicate.
      	* config/aarch64/aarch64.md (*csinc2<mode>_insn): Use
      	aarch64_comparison_operation instead of matching an operator.
      	Update operand numbers.
      	(csinc3<mode>_insn): Likewise.
      	(*csinv3<mode>_insn): Likewise.
      	(*csneg3<mode>_insn): Likewise.
      	(ffs<mode>2): Update gen_csinc3<mode>_insn callsite.
      	* config/aarch64/aarch64.c (aarch64_get_condition_code):
      	Return -1 instead of aborting on invalid condition codes.
      	(aarch64_print_operand): Update aarch64_get_condition_code callsites
      	to assert that the returned condition code is valid.
      	* config/aarch64/aarch64-protos.h (aarch64_get_condition_code): Export.
      
      From-SVN: r214824
      Kyrylo Tkachov committed
    • DR 1453 · cec362c9
      /cp
      2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	DR 1453
      	* class.c (check_field_decls): A class of literal type cannot have
      	volatile non-static data members and base classes.
      	(explain_non_literal_class): Update.
      
      /testsuite
      2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	DR 1453
      	* g++.dg/cpp0x/constexpr-volatile.C: New.
      	* g++.dg/ext/is_literal_type2.C: Likewise.
      
      From-SVN: r214823
      Paolo Carlini committed
    • Makefile.in (TAGS): Handle constructs in common.opt, rtl.def, tree.def, and gimple.def · 4e2b2eee
      	* Makefile.in (TAGS): Handle constructs in common.opt, rtl.def,
      	tree.def, and gimple.def
      
      From-SVN: r214822
      Aldy Hernandez committed
    • cilk-builtins.def (__cilkrts_cilk_for_32): New. · 9a771876
      gcc/
      	* cilk-builtins.def (__cilkrts_cilk_for_32): New.
      	(__cilkrts_cilk_for_64): Likewise.
      	* cilk-common.c (declare_cilk_for_builtin): New function.
      	(cilk_init_builtins): Declare __cilkrts_cilk_for_32 and
      	__cilkrts_cilk_for_64 bultins.
      	* cilk.h (enum cilk_tree_index): Added CILK_TI_F_LOOP_32 and
      	CILK_TI_F_LOOP_64.
      	(cilk_for_32_fndecl): New define.
      	(cilk_for_64_fndecl): Likewise.
      	* gimple-pretty-print.c (dump_gimple_omp_for): Correct hadling of
      	GF_OMP_FOR_KIND_CILKFOR cases; Added NE_EXPR case.
      	* gimple.h (enum gf_mask): Added GF_OMP_FOR_KIND_CILKFOR; adjusted
      	GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_SIMD, GF_OMP_FOR_COMBINED,
      	GF_OMP_FOR_COMBINED_INTO.
      	* gimplify.c (gimplify_scan_omp_clauses): Added
      	OMP_CLAUSE__CILK_FOR_COUNT_ case.
      	(gimplify_adjust_omp_clauses): Ditto.
      	(gimplify_omp_for): Added CILK_FOR case.
      	(gimplify_expr): Ditto.
      	* omp-low.c: Include cilk.h.
      	(extract_omp_for_data): Set appropriate kind for
      	GF_OMP_FOR_KIND_CILKFOR; added check for GF_OMP_FOR_KIND_CILKFOR.
      	(scan_sharing_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ cases.
      	(create_omp_child_function_name): Added second argument to handle
      	cilk_for case.
      	(cilk_for_check_loop_diff_type): New function.
      	(expand_cilk_for_call): Likewise.
      	(expand_cilk_for): Likewise.
      	(create_omp_child_function): Set cilk_for_count; handle the cases when
      	it is true; call create_omp_child_function_name with second argument.
      	(expand_omp_taskreg): Set is_cilk_for and handle cases when it's true.
      	(expand_omp_for): Handle case of GF_OMP_FOR_KIND_CILKFOR.
      	* tree-core.h (omp_clause_code): Added OMP_CLAUSE__CILK_FOR_COUNT_.
      	* tree-nested.c (convert_nonlocal_omp_clauses): Added
      	OMP_CLAUSE__CILK_FOR_COUNT_ case.
      	(convert_local_omp_clauses): Ditto.
      	* tree-pretty-print.c (dump_omp_clause): Added
      	OMP_CLAUSE__CILK_FOR_COUNT_ and OMP_CLAUSE_SCHEDULE_CILKFOR cases.
      	(dump_generic_node): Added CILK_FOR case.
      	* tree.c (omp_clause_num_ops): New element
      	OMP_CLAUSE__CILK_FOR_COUNT_ (1).
      	(omp_clause_code_name): New element _Cilk_for_count_.
      	(walk_tree_1): Added OMP_CLAUSE__CILK_FOR_COUNT_ case.
      	* tree.def: Add tree code for CILK_FOR.
      
      gcc/c/
      	* c-parser.c (c_parser_cilk_for): New function.
      	(c_parser_cilk_grainsize): Likewise.
      	(c_get_temp_regvar): Likewise.
      	(c_parser_statement_after_labels): Added RID_CILK_FOR case.
      	(c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
      	(c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
      	* c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
      	case.
      
      gcc/cp/
      	* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
      	simplified.
      	* parser.c (cp_parser_cilk_for): New function.
      	(cp_parser_cilk_grainsize): Likewise.
      	(cp_parser_statement): Added RID_CILK_FOR case.
      	(cp_parser_omp_for_cond): Added CILK_FOR check.
      	(cp_parser_omp_for_loop_init): Change function argument to accept
      	tree_code instead just a bool flag; change the check to use that
      	tree_code; check for initialization declaration in case of Cilk_for.
      	(cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
      	changed call to cp_parser_omp_for_loop_init according new arguments'
      	list.
      	(cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
      	* pt.c (tsubst_expr): Added CILK_FOR case.
      	* semantics.c: Include convert.h.
      	(finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
      	case; added OMP_CLAUSE__CILK_FOR_COUNT_.
      	(handle_omp_for_class_iterator): New argument lastp and its usage;
      	added NE_EXPR case.
      	(finish_omp_for): Changed call to handle_omp_for_class_iterator
      	according new arguments' list; in case of Cilk_for save very first
      	decl and create empty stmt_list block; use block to build correct
      	statement tree.
      
      gcc/c-family/
      	* c-cilkplus.c (cilk_for_number_of_iterations): New function.
      	* c-common.c (c_common_reswords): Added _Cilk_for.
      	* c-common.h (enum rid): Added RID_CILK_FOR.
      	(cilk_for_number_of_iterations): Add declaration.
      	* c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
      	CILK_FOR.
      	* c-pragma.c (init_pragma): Register "grainsize" pragma.
      	* c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
      
      gcc/testsuite/
      	* c-c++-common/cilk-plus/CK/cilk-fors.c: New test.
      	* c-c++-common/cilk-plus/CK/cilk-for-2.c: New test.
      	* c-c++-common/cilk-plus/CK/cilk-for-3.c: New test.
      	* c-c++-common/cilk-plus/CK/cilk_for_errors.c: New test.
      	* c-c++-common/cilk-plus/CK/cilk_for_grain.c: New test.
      	* c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: New test.
      	* c-c++-common/cilk-plus/CK/cilk_for_ptr_iter.c: New test.
      	* c-c++-common/cilk-plus/CK/nested_cilk_for.c: New test.
      	* g++.dg/cilk-plus/CK/cf3.cc: New test.
      	* g++.dg/cilk-plus/CK/cilk-for-tplt.cc: New test.
      	* g++.dg/cilk-plus/CK/for1.cc: New test.
      	* g++.dg/cilk-plus/CK/stl_iter.cc: New test.
      	* g++.dg/cilk-plus/CK/stl_rev_iter.cc: New test.
      	* g++.dg/cilk-plus/CK/stl_test.cc: New test.
      
      Co-Authored-By: Balaji V. Iyer <balaji.v.iyer@intel.com>
      Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com>
      
      From-SVN: r214818
      Jakub Jelinek committed