Age | Commit message (Collapse) | Author | Files | Lines |
|
* bitmap.h: Add explanation of sparse set as linked-list bitmap.
* sbitmap.h: Add explanation about non-sparse sets as simple bitmap.
(TEST_BIT): Make a static inline function for stronger type checking.
(SET_BIT): Don't handle sbitmaps with popcount.
(RESET_BIT): Likewise.
(SET_BIT_WITH_POPCOUNT): New, like SET_BIT but with popcount.
(RESET_BIT_WITH_POPCOUNT): New, like RESET_BIT but with popcount.
* ebitmap.c (ebitmap_clear_bit): Use SET_BIT_WITH_POPCOUNT and
RESET_BIT_WITH_POPCOUNT on wordmask bitmaps.
(ebitmap_set_bit, ebitmap_and_into, ebitmap_and, ebitmap_ior_into,
ebitmap_and_compl_into, ebitmap_and_compl): Likewise.
* sparseset.h: Add explanation of sparse set representation.
From-SVN: r189888
|
|
* bitmap.c (bitmap_descriptor): Adjust order of parameters to
match MEM_STAT_DECL.
* statistics.h (ALONE_FINAL_MEM_STAT_DECL): Correct typo.
From-SVN: r189819
|
|
gcc/
* sbitmap.h (SBITMAP_ELT_BITS): Use "1u" trick as for BITMAP_WORD_BITS.
Move test to check that there is a popcount function for the the number
of bits in SBITMAP_ELT_BITS to sbitmap.c.
* sbitmap.c: Test SBITMAP_ELT_BITS, not HOST_BITS_PER_WIDEST_FAST_INT.
MEM_STAT_INFO): Define in terms of their ALONE counterparts.
* configure.ac (GATHER_STATISTICS): Always define, non-zero if enabled.
* configure: Regenerate.
* statistics.h (GATHER_STATISTICS): Error out if it is not defined.
(GCC_MEM_STAT_ARGUMENTS): New define.
(ALONE_MEM_STAT_DECL): Define in terms of GCC_MEM_STAT_ARGUMENTS.
(ALONE_FINAL_MEM_STAT_DECL, ALONE_FINAL_PASS_MEM_STAT): New defines.
(MEM_STAT_DECL, FINAL_MEM_STAT_DECL, PASS_MEM_STAT, FINAL_PASS_MEM_STAT,
* ggc-internal.h (ggc_record_overhead): Use FINAL_MEM_STAT_DECL.
* ggc.h (ggc_record_overhead, ggc_free_overhead,
ggc_prune_overhead_list): Remove internal prototypes, they are defined
already in ggc-internal.h.
* ggc-common.c (struct loc_descriptor): Remove #ifdef GATHER_STATISTICS
wrappers.
(add_statistics): Likewise.
(dump_ggc_loc_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* ggc-zone.c (struct page_entry): Remove #ifdef GATHER_STATISTICS
wrappers around "survived" and "stats" members.
(alloc_large_page): Always initialize survived.
(ggc_internal_alloc_zone_stat): Likewise.
Remove #ifdef GATHER_STATISTICS wrappers. Record overhead if
GATHER_STATISTICS is non-0.
(ggc_free): Convert #ifdef GATHER_STATISTICS to if-code.
(sweep_pages): Always increase survived.
(ggc_collect_1): Convert #ifdef GATHER_STATISTICS to if-code.
(calculate_average_page_survival): Always define.
(ggc_collect): Convert #ifdef GATHER_STATISTICS to if-code.
(ggc_print_statistics): Likewise.
(ggc_pch_read): Likewise.
* ggc-page.c (struct globals): Always define "stats" member.
(ggc_internal_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
(ggc_free): Likewise.
(ggc_collec): Likewise.
(ggc_print_statistics): Likewise.
* bitmap.h (struct bitmap_head_def): Always define "desc" member.
(bitmap_initialize_stat): Convert #ifdef GATHER_STATISTICS to if-code.
* gimple.h (enum gimple_alloc_kind): Always define.
(gimple_alloc_kind): Likewise.
* tree-flow.h (phinodes_print_statistics): Always define.
(ssanames_print_statistics): Likewise.
* vec.h (vec_heap_free): Always define.
(VEC_stack_alloc): Define if GATHER_STATISTICS is non-0.
* alloc-pool.c (alloc_pool_descriptor): Always define.
(create_alloc_pool): Convert #ifdef GATHER_STATISTICS to if-code.
(empty_alloc_pool): Likewise.
(pool_alloc): Likewise.
(pool_free): Likewise.
(dump_alloc_pool_statistics): Likewise.
(print_statistics): Always define.
* bitmap.c (struct bitmap_descriptor): Always define.
(bitmap_register): Pass ALONE_FINAL_PASS_MEM_STAT.
(register_overhead): Always define.
(bitmap_element_free): Convert #ifdef GATHER_STATISTICS to if-code.
(bitmap_element_allocate): Likewise.
(bitmap_elt_clear_from): Likewise.
(bitmap_obstack_alloc_stat): Likewise.
(bitmap_gc_alloc_stat): Likewise.
(bitmap_obstack_free): Likewise.
(bitmap_find_bit): Likewise.
(bitmap_ior_and_into): Likewise.
(bitmap_print): Likewise.
(dump_bitmap_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* gimple.c (gimple_alloc_counts, gimple_alloc_sizes): Always define.
(gimple_alloc_kind_names): Likewise.
(gimple_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
(dump_gimple_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* rtl.c (rtx_alloc_counts, rtx_alloc_sizes, rtvec_alloc_counts,
rtvec_alloc_sizes): Always define.
(rvec_alloc): Convert #ifdef GATHER_STATISTICS to if-code.
(rtx_alloc_stat): Likewise.
(dump_rtx_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* tree.c (_obstack_allocated_p, tree_code_counts, tree_node_counts,
tree_node_sizes, tree_node_kind_names): Always define.
(record_node_allocation_statistics): Convert #ifdef GATHER_STATISTICS
to if-code.
(type_hash_canon): Likewise.
(dump_tree_statistics): Likewise.
* tree-ssanames.c (ssa_name_nodes_reused, ssa_name_nodes_created):
Always define.
(ssanames_print_statistics): Likewise.
(make_ssa_name_fn): Convert #ifdef GATHER_STATISTICS to if-code.
* tree-phinodes.c (phi_nodes_reused, phi_nodes_created): Always define.
(phinodes_print_statistics): Likewise.
(allocate_phi_node): Convert #ifdef GATHER_STATISTICS to if-code.
* vec.c (struct vec_descriptor): Always define.
(hash_descriptor, eq_descriptor, ptr_hash_entry, hash_ptr, eq_ptr,
vec_descriptor, rester_overhead, free_overhead): Likewise.
(cmp_statistic): Likewise.
(vec_heap_free): Convert #ifdef GATHER_STATISTICS to if-code.
(vec_heap_o_reserve_1): Likewise.
(dump_vec_loc_statistics): Likewise.
cp/
* cp/class.c (n_vtables, n_vtable_entries, n_vtable_searches,
n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
n_inner_fields_searched): Always define.
(build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
(print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
* cp/tree.c (depth_reached): Always define global.
(cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
* cp/pt.c (depth_reached): Always define.
(push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
* cp/search.c (n_fields_searched, n_calls_lookup_field,
n_calls_lookup_field_1, n_calls_lookup_fnfields,
n_calls_lookup_fnfields_1, n_calls_get_base_type,
n_outer_fields_searched, n_contexts_saved): Always define.
(lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
(lookup_member): Likewise.
(lookup_fnfields_idx_nolazy): Likewise.
(print_search_statistics): Likewise.
(reinit_search_statistics): Unconditionally re-set counters.
* cp/lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
to if-code.
(cxx_dup_lang_specific_decl): Likewise.
(copy_lang_type): Likewise.
(cxx_make_type): Likewise.
From-SVN: r189803
|
|
From-SVN: r168438
|
|
* bitmap.c: Delete unnecessary includes.
* ebitmap.c: Likewise.
* et-forest.c: Likewise.
* sreal.c: Likewise.
* statistics.c: Likewise.
* stringpool.c: Likewise.
* double-int.c: Add comment for inclusion of tm.h.
From-SVN: r166797
|
|
From-SVN: r161189
|
|
checking asserts.
* bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_compl_and_into, bitmap_ior,
bitmap_ior_into, bitmap_xor, bitmap_xor_into,
bitmap_ior_and_compl, bitmap_ior_and_compl): Turn internal datastructure
checks into checking asserts.
* rtlanal.c (find_reg_note): Use gcc_checking_assert.
* tree-ssa-sccvn.c (VN_INFO): Likewise.
* df-scan.c (df_reorganize_refs_by_reg_by_reg, df_install_ref,
df_ref_create_structure): Likewise.
* alloc-pool.c (create_alloc_pool, empty_alloc_pool, pool_alloc,
pool_free): Use gcc_checking_assert.
* alias.c (get_alias_set): Likewise.
* var-tracking.c (variable_htab_free, shared_hash_copy,
canonicalize_values_mark, variable_merge_over_cur): Likewise.
* lto-streamer.c (bp_unpack_value): Likewise.
From-SVN: r160681
|
|
* bitmap.c (bitmap_elt_insert_after, bitmap_first_set_bit,
bitmap_first_set_bit, bitmap_last_set_bit, bitmap_last_set_bit,
bitmap_and_into, bitmap_and_compl_into, bitmap_set_range,
bitmap_compl_and_into, bitmap_elt_ior): Use checking asserts.
From-SVN: r160516
|
|
* bitmap.c (bitmap_and): Walk array forward.
(bitmap_and_compl_into): Likewise.
(bitmap_xor): Likewise.
(bitmap_xor_into): Likewise.
(bitmap_equal_p): Likewise.
(bitmap_intersect_p): Likewise.
(bitmap_intersect_compl_p): Likewise.
(bitmap_ior_and_into): Likewise.
(bitmap_elt_copy): Likewise.
(bitmap_and_compl): Likewise.
(bitmap_elt_ior): Likewise.
From-SVN: r160502
|
|
gcc/ada:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
allocation.
(init_dummy_type): Likewise.
(gnat_pushlevel): Likewise.
* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
(Subprogram_Body_to_gnu): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(start_stmt_group): Likewise.
(extract_encoding): Likewise.
(decode_name): Likewise.
* gcc-interface/misc.c (gnat_printable_name): Likewise.
* gcc-interface/decl.c (annotate_value): Likewise.
* gcc-interface/ada-tree.h (struct lang_type): Add variable_size
GTY option.
(struct lang_decl): Likewise.
(SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
(SET_DECL_LANG_SPECIFIC): Likewise.
gcc/c-family:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* c-pragma.c (push_alignment): Use typed GC allocation.
(handle_pragma_push_options): Likewise.
* c-common.c (parse_optimize_options): Likewise.
* c-common.h (struct sorted_fields_type): Add variable_size GTY
option.
gcc/cp:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* typeck2.c (abstract_virtuals_error): Likewise.
* pt.c (maybe_process_partial_specialization): Likewise.
(register_specialization): Likewise.
(add_pending_template): Likewise.
(lookup_template_class): Likewise.
(push_tinst_level): Likewise.
* parser.c (cp_lexer_new_main): Likewise.
(cp_lexer_new_from_tokens): Likewise.
(cp_token_cache_new): Likewise.
(cp_parser_context_new): Likewise.
(cp_parser_new): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_template_id): Likewise.
* name-lookup.c (binding_entry_make): Likewise.
(binding_table_construct): Likewise.
(binding_table_new): Likewise.
(cxx_binding_make): Likewise.
(pushdecl_maybe_friend): Likewise.
(begin_scope): Likewise.
(push_to_top_level): Likewise.
* lex.c (init_reswords): Likewise.
(retrofit_lang_decl): Likewise.
(cxx_dup_lang_specific_decl): Likewise.
(copy_lang_type): Likewise.
(cxx_make_type): Likewise.
* decl.c (make_label_decl): Likewise.
(check_goto): Likewise.
(start_preparsed_function): Likewise.
(save_function_data): Likewise.
* cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
* class.c (finish_struct_1): Likewise.
* cp-tree.h (struct lang_type): Add variable_size GTY option.
(struct lang_decl): Likewise.
* parser.c (cp_parser_new): Update comment to not reference
ggc_alloc.
gcc/fortran:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* trans-types.c (gfc_get_nodesc_array_type): Use typed GC
allocation.
(gfc_get_array_type_bounds): Likewise.
* trans-decl.c (gfc_allocate_lang_decl): Likewise.
(gfc_find_module): Likewise.
* f95-lang.c (pushlevel): Likewise.
* trans.h (struct lang_type): Add variable_size GTY option.
(struct lang_decl): Likewise.
gcc/java:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
* jcf-parse.c (java_parse_file): Likewise.
(process_zip_dir): Likewise.
* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
* expr.c (add_type_assertion): Likewise.
* decl.c (make_binding_level): Likewise.
(java_dup_lang_specific_decl): Likewise.
* constants.c (set_constant_entry): Likewise.
(cpool_for_class): Likewise.
* class.c (add_method_1): Likewise.
(java_treetreehash_new): Likewise.
* java-tree.h (struct lang_type): Add variable_size GTY option.
(struct lang_decl): Likewise.
* jch.h (struct cpool_entry): Likewise.
* java-tree.h (java_treetreehash_create): Remove parameter ggc.
* except.c (prepare_eh_table_type): Update
java_treetreehash_create call.
* class.c (add_method_1): Update java_treetreehash_create call.
(java_treetreehash_create): Remove parameter gc. Use
htab_create_ggc.
gcc/lto:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* lto.c (lto_read_in_decl_state): Use typed GC allocation.
(lto_file_read): Likewise.
(new_partition): Likewise.
(read_cgraph_and_symbols): Likewise.
gcc/objc:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
allocation.
* objc-act.c (objc_volatilize_decl): Likewise.
(objc_build_string_object): Likewise.
(hash_init): Likewise.
(hash_enter): Likewise.
(hash_add_attr): Likewise.
(add_class): Likewise.
(start_class): Likewise.
gcc/objcp:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
allocation.
gcc:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* doc/tm.texi (Per-Function Data): Do not reference ggc_alloc.
* doc/gty.texi (GTY Options): Document typed GC allocation and
variable_size GTY option.
* ggc-internal.h: New.
* ggc.h: Update copyright year.
(digit_string): Move to stringpool.c.
(ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots)
(gt_pch_save_stringpool, gt_pch_fixup_stringpool)
(gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object)
(init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size)
(ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write)
(ggc_pch_write_object, ggc_pch_finish, ggc_pch_read)
(ggc_force_collect, ggc_get_size, ggc_statistics)
(ggc_print_common_statistics): Move to ggc-internal.h.
(digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat)
(ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW)
(GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec)
(ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic)
(ggc_min_heapsize_heuristic, ggc_alloc_zone)
(ggc_alloc_zone_pass_stat): Remove.
(ggc_internal_alloc_stat, ggc_internal_alloc)
(ggc_internal_cleared_alloc_stat): New.
(GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine.
(ggc_internal_vec_alloc_stat)
(ggc_internal_cleared_vec_alloc_stat)
(ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc)
(ggc_alloc_atomic_stat, ggc_alloc_atomic)
(ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args)
(ggc_cleared_alloc_ptr_array_two_args): New.
(htab_create_ggc, splay_tree_new_ggc): Redefine.
(ggc_splay_alloc): Change the type of the first argument to
enum gt_types_enum.
(ggc_alloc_string): Make macro.
(ggc_alloc_string_stat): New.
(ggc_strdup): Redefine.
(rtl_zone, tree_zone, tree_id_zone): Declare unconditionally.
(ggc_alloc_rtvec_sized): New.
(ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat.
(ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat)
(ggc_internal_cleared_alloc_zone_stat)
(ggc_internal_zone_alloc_stat)
(ggc_internal_zone_cleared_alloc_stat)
(ggc_internal_zone_vec_alloc_stat)
(ggc_alloc_zone_rtx_def_stat)
(ggc_alloc_zone_tree_node_stat)
(ggc_alloc_zone_cleared_tree_node_stat)
(ggc_alloc_cleared_gimple_statement_d_stat): New.
* ggc-common.c: Include ggc-internal.h.
(ggc_internal_cleared_alloc_stat): Rename from
ggc_alloc_cleared_stat.
(ggc_realloc_stat): Use ggc_internal_alloc_stat.
(ggc_calloc): Remove.
(ggc_cleared_alloc_htab_ignore_args): New.
(ggc_cleared_alloc_ptr_array_two_args): New.
(ggc_splay_alloc): Add obj_type parameter.
(init_ggc_heuristics): Formatting fixes.
* ggc-none.c: Update copyright year.
(ggc_alloc_stat): Rename to ggc_alloc_stat.
(ggc_alloc_cleared_stat): Rename to
ggc_internal_cleared_alloc_stat.
(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.
* ggc-page.c: Update copyright year. Include ggc-internal.h.
Remove references to ggc_alloc in comments.
(ggc_alloc_typed_stat): Call ggc_internal_alloc_stat.
(ggc_alloc_stat): Rename to ggc_internal_alloc_stat.
(new_ggc_zone, destroy_ggc_zone): Remove.
(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.
* ggc-zone.c: Include ggc-internal.h. Remove references to
ggc_alloc in comments.
(ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat.
(ggc_internal_alloc_zone_pass_stat): New.
(ggc_internal_cleared_alloc_zone_stat): New.
(ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat.
(ggc_alloc_stat): Rename ggc_internal_alloc_stat.
(new_ggc_zone, destroy_ggc_zone): Remove.
* stringpool.c: Update copyright year. Include ggc-internal.h
(digit_vector): Make static.
(digit_string): Moved from ggc.h.
(stringpool_ggc_alloc): Use ggc_alloc_atomic.
(ggc_alloc_string): Rename to ggc_alloc_string_stat.
* Makefile.in (GGC_INTERNAL_H): New.
(ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add
$(GGC_INTERNAL_H) to dependencies.
* gentype.c: Update copyright year.
(walk_type): Accept variable_size GTY option.
(USED_BY_TYPED_GC_P): New macro.
(write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output
whitespace at the end of strings.
(get_type_specifier, variable_size_p): New functions.
(alloc_quantity, alloc_zone): New enums.
(write_typed_alloc_def): New function.
(write_typed_struct_alloc_def): Likewise.
(write_typed_typed_typedef_alloc_def): Likewise.
(write_typed_alloc_defns): Likewise.
(output_typename, write_splay_tree_allocator_def): Likewise.
(write_splay_tree_allocators): Likewise.
(main): Call write_typed_alloc_defns and
write_splay_tree_allocators.
* lto-streamer.h (lto_file_decl_data_ptr): New.
* passes.c (order): Define using cgraph_node_ptr.
* strinpool.c (struct string_pool_data): Declare nested_ptr using
ht_identifier_ptr.
* gimple.h (union gimple_statement_d): Likewise.
* rtl.h (struct rtx_def): Likewise.
(struct rtvec_def): Likewise.
* tree.h (union tree_node): Likewise.
* tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise.
* cfgloop.c (record_loop_exits): Use htab_create_ggc.
* tree-scalar-evolution.c (scev_initialize): Likewise.
* alias.c (record_alias_subset): Update splay_tree_new_ggc call.
* dwarf2asm.c (dw2_force_const_mem): Likewise.
* omp-low.c (lower_omp_critical): Likewise.
* bitmap.h (struct bitmap_head_def): Update comment to not
reference ggc_alloc.
* config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC.
* ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC.
* ipa-prop.c (duplicate_ggc_array): Rename to
duplicate_ipa_jump_func_array. Use typed GC allocation.
(ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array.
* gimple.c (gimple_alloc_stat): Use
ggc_alloc_cleared_gimple_statement_d_stat.
* varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def.
* tree.c (make_node_stat): Use
ggc_alloc_zone_cleared_tree_node_stat.
(make_tree_vec_stat): Likewise.
(build_vl_exp_stat): Likewise.
(copy_node_stat): Use ggc_alloc_zone_tree_node_stat.
(make_tree_binfo_stat): Likewise.
(tree_cons_stat): Likewise.
* rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat.
(shallow_copy_rtx_stat): Likewise.
(make_node_stat): Likewise.
* lto-symtab.c: Fix comment.
* tree-cfg.c (create_bb): Update comment to not reference
ggc_alloc_cleared.
* tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is
value.
* varpool.c (varpool_node): Use typed GC allocation.
(varpool_extra_name_alias): Likewise.
* varasm.c (emutls_decl): Likewise.
(get_unnamed_section): Likewise.
(get_noswitch_section): Likewise.
(get_section): Likewise.
(get_block_for_section): Likewise.
(build_constant_desc): Likewise.
(create_constant_pool): Likewise.
(force_const_mem): Likewise.
* tree.c (build_vl_exp_stat): Likewise.
(build_real): Likewise.
(build_string): Likewise.
(decl_debug_expr_insert): Likewise.
(decl_value_expr_insert): Likewise.
(type_hash_add): Likewise.
(build_omp_clause): Likewise.
* tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise.
* tree-ssa.c (init_tree_ssa): Likewise.
* tree-ssa-structalias.c (heapvar_insert): Likewise.
* tree-ssa-operands.c (ssa_operand_alloc): Likewise.
* tree-ssa-loop-niter.c (record_estimate): Likewise.
* tree-ssa-alias.c (get_ptr_info): Likewise.
* tree-scalar-evolution.c (new_scev_info_str): Likewise.
* tree-phinodes.c (allocate_phi_node): Likewise.
* tree-iterator.c (tsi_link_before): Likewise.
(tsi_link_after): Likewise.
* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.
* tree-dfa.c (create_var_ann): Likewise.
* tree-cfg.c (create_bb): Likewise.
* toplev.c (alloc_for_identifier_to_locale): Likewise.
(general_init): Likewise.
* stringpool.c (stringpool_ggc_alloc): Likewise.
(gt_pch_save_stringpool): Likewise.
* sese.c (if_region_set_false_region): Likewise.
* passes.c (do_per_function_toporder): Likewise.
* optabs.c (set_optab_libfunc): Likewise.
(set_conv_libfunc): Likewise.
* lto-symtab.c (lto_symtab_register_decl): Likewise.
* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
(input_eh_region): Likewise.
(input_eh_lp): Likewise.
(make_new_block): Likewise.
(unpack_ts_real_cst_value_fields): Likewise.
* lto-section-in.c (lto_new_in_decl_state): Likewise.
* lto-cgraph.c (input_node_opt_summary): Likewise.
* loop-init.c (loop_optimizer_init): Likewise.
* lambda.h (lambda_vector_new): Likewise.
* lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.
* ira.c (update_equiv_regs): Likewise.
* ipa.c (cgraph_node_set_new): Likewise.
(cgraph_node_set_add): Likewise.
(varpool_node_set_new): Likewise.
(varpool_node_set_add): Likewise.
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
(duplicate_ipa_jump_func_array): Likewise.
(ipa_read_node_info): Likewise.
* ipa-cp.c (ipcp_create_replace_map): Likewise.
* integrate.c (get_hard_reg_initial_val): Likewise.
* gimple.c (gimple_alloc_stat): Likewise.
(gimple_build_omp_for): Likewise.
(gimple_seq_alloc): Likewise.
(gimple_copy): Likewise.
* gimple-iterator.c (gsi_insert_before_without_update): Likewise.
(gsi_insert_after_without_update): Likewise.
* function.c (add_frame_space): Likewise.
(insert_temp_slot_address): Likewise.
(assign_stack_temp_for_type): Likewise.
(allocate_struct_function): Likewise.
(types_used_by_var_decl_insert): Likewise.
* except.c (init_eh_for_function): Likewise.
(gen_eh_region): Likewise.
(gen_eh_region_catch): Likewise.
(gen_eh_landing_pad): Likewise.
(add_call_site): Likewise.
* emit-rtl.c (get_mem_attrs): Likewise.
(get_reg_attrs): Likewise.
(start_sequence): Likewise.
(init_emit): Likewise.
* dwarf2out.c (new_cfi): Likewise.
(queue_reg_save): Likewise.
(dwarf2out_frame_init): Likewise.
(new_loc_descr): Likewise.
(find_AT_string): Likewise.
(new_die): Likewise.
(add_var_loc_to_decl): Likewise.
(clone_die): Likewise.
(clone_as_declaration): Likewise.
(break_out_comdat_types): Likewise.
(new_loc_list): Likewise.
(loc_descriptor): Likewise.
(add_loc_descr_to_each): Likewise.
(add_const_value_attribute): Likewise.
(tree_add_const_value_attribute): Likewise.
(add_comp_dir_attribute): Likewise.
(add_name_and_src_coords_attributes): Likewise.
(lookup_filename): Likewise.
(store_vcall_insn): Likewise.
(dwarf2out_init): Likewise.
* dbxout.c (dbxout_init): Likewise.
* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
* config/score/score7.c (score7_output_external): Likewise.
* config/score/score3.c (score3_output_external): Likewise.
* config/s390/s390.c (s390_init_machine_status): Likewise.
* config/rs6000/rs6000.c (builtin_function_type): Likewise.
(rs6000_init_machine_status): Likewise.
(output_toc): Likewise.
* config/pa/pa.c (pa_init_machine_status): Likewise.
(get_deferred_plabel): Likewise.
* config/moxie/moxie.c (moxie_init_machine_status): Likewise.
* config/mmix/mmix.c (mmix_init_machine_status): Likewise.
* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.
* config/mep/mep.c (mep_init_machine_status): Likewise.
(mep_note_pragma_flag): Likewise.
* config/m32c/m32c.c (m32c_init_machine_status): Likewise.
* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.
* config/ia64/ia64.c (ia64_init_machine_status): Likewise.
* config/i386/winnt.c (i386_pe_record_external_function): Likewise.
(i386_pe_maybe_record_exported_symbol): Likewise.
* config/i386/i386.c (get_dllimport_decl): Likewise.
(ix86_init_machine_status): Likewise.
(assign_386_stack_local): Likewise.
* config/frv/frv.c (frv_init_machine_status): Likewise.
* config/darwin.c (machopic_indirection_name): Likewise.
* config/cris/cris.c (cris_init_machine_status): Likewise.
* config/bfin/bfin.c (bfin_init_machine_status): Likewise.
* config/avr/avr.c (avr_init_machine_status): Likewise.
* config/arm/arm.c (arm_init_machine_status): Likewise.
* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
(alpha_need_linkage): Likewise.
(alpha_use_linkage): Likewise.
* cgraph.c (cgraph_allocate_node): Likewise.
(cgraph_create_edge_1): Likewise.
(cgraph_create_indirect_edge): Likewise.
(cgraph_add_asm_node): Likewise.
* cfgrtl.c (init_rtl_bb_info): Likewise.
* cfgloop.c (alloc_loop): Likewise.
(rescan_loop_exit): Likewise.
* cfg.c (init_flow): Likewise.
(alloc_block): Likewise.
(unchecked_make_edge): Likewise.
* c-parser.c (c_parse_init): Likewise.
(c_parse_file): Likewise.
* c-decl.c (bind): Likewise.
(record_inline_static): Likewise.
(push_scope): Likewise.
(make_label): Likewise.
(lookup_label_for_goto): Likewise.
(finish_struct): Likewise.
(finish_enum): Likewise.
(c_push_function_context): Likewise.
* bitmap.c (bitmap_element_allocate): Likewise.
(bitmap_gc_alloc_stat): Likewise.
* alias.c (record_alias_subset): Likewise.
(init_alias_analysis): Likewise.
include:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* splay-tree.h: Update copyright years.
(splay_tree_s): Document fields.
(splay_tree_new_typed_alloc): New.
* hashtab.h: Update copyright years.
(htab_create_typed_alloc): New.
libcpp:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* include/symtab.h (ht_identifier_ptr): New.
libiberty:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* splay-tree.c: Update copyright years.
(splay_tree_new_typed_alloc): New.
(splay_tree_new_with_allocator): Use it.
* hashtab.c: Update copyright years.
(htab_create_typed_alloc): New.
(htab_create_alloc): Use it.
* functions.texi: Regenerate.
From-SVN: r160425
|
|
* bitmap.c (bitmap_descriptor): Add search_iter.
(bitmap_find_bit): Increment it.
(print_statistics): Print it.
From-SVN: r160148
|
|
* tree-vrp.c (debug_value_range, debug_all_value_ranges,
debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION.
* tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs,
debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks,
debug_names_replaced_by, debug_update_ssa): Likewise.
* sbitmap.c (debug_sbitmap): Likewise.
* genrecog.c (debug_decision, debug_decision_list): Likewise.
* tree-pretty-print.c (debug_generic_expr, debug_generic_stmt,
debug_tree_chain): Likewise.
* tree-loop-distribution.c (debug_rdg_partitions): Likewise.
* cgraph.c (debug_cgraph_node, debug_cgraph): Likewise.
* optabs.c (debug_optab_libfuncs): Likewise.
(verify_loop_closed_ssa): Likewise.
* value-prof.c (verify_histograms): Likewise.
* reload.c (debug_reload_to_stream, debug_reload): Likewise.
* bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise.
* cfghooks.c (verify_flow_info): Likewise.
* fold-const.c (debug_fold_checksum): Likewise.
* omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise.
* cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n):
Likewise.
* omega.c (debug_omega_problem): Likewise.
* cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise.
* tree-ssa-ccp.c (debug_lattice_value): Likewise.
* dominance.c (verify_dominators, debug_dominance_info,
debug_dominance_tree): Likewise.
* df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno,
* df_regno_debug, df_ref_debug,
debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref,
debug_df_defno, debug_df_useno, debug_df_chain): Likewise.
* tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise.
* sel-sched.c (debug_state): Likewise.
* tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise.
* cfganal.c (print_edge_list, verify_edge_list): Likewise.
* dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise.
* tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise.
* gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise.
* c-pretty-print.c (debug_c_tree): Likewise.
* sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn
debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector,
debug_hard_reg_set, debug_mem_addr_value): Likewise.
* ebitmap.c (debug_ebitmap): Likewise.
* function.c (debug_find_var_in_block_tree): Likewise.
* print-rtl.c (debug_rtx): Likewise.
(debug_rtx_count): Likewise.
(debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise.
* stor-layout.c (debug_rli): Likewise.
* ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise.
* tree-data-ref.c (debug_data_references, debug_data_dependence_relations,
debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex,
debug_rdg_component, debug_rdg): Likewise.
* tree-affine.c (debug_aff): Likewise.
* tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise.
* except.c (debug_eh_tree, verify_eh_tree): Likewise.
* emit-rtl.c (verify_rtl_sharing): Likewise.
* tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set,
debug_value_expressions): Likewise.
* tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise.
* sese.c (debug_rename_map, debug_ivtype_map): Likewise.
* print-tree.c (debug_tree, debug_vec_tree): Likewise.
* cfglayout.c (verify_insn_chain): Likewise.
* graphite-clast-to-gimple.c (debug_clast_name_indexes,
debug_clast_stmt, debug_generated_program): Likewise.
* ggc-page.c (debug_print_page_list): Likewise.
* tree-ssa-ter.c (debug_ter): Likewise.
* graphite-dependences.c (debug_pddr): Likewise.
* sched-deps.c (debug_ds): Likewise.
* tree-ssa.c (verify_ssa): Likewise.
* graphite-poly.c (debug_scattering_function, debug_iteration_domain,
debug_scattering_functions, debug_iteration_domains, debug_pdr,
debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop,
debug_cloog, debug_scop_params, debug_lst): Likewise.
* tree-inline.c (debug_find_tree): Likewise.
* graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix,
debug_ppl_powerset_matrix): Likewise.
* var-tracking.c (debug_dv): Likewise.
* system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define.
* cfgloop.c (verify_loop_structure): Likewise.
* plugin.c (dump_active_plugins, debug_active_plugins): Likewise.
* c-common.c (verify_sequence_points): Likewise.
* sched-rgn.c (debug_regions, debug_region, debug_candidate,
debug_candidates, debug_rgn_dependencies): Likewise.
* tree-ssa-structalias.c (debug_constraint, debug_constraints,
* debug_constraint_graph, debug_solution_for_var,
debug_sa_points_to_info): Likewise.
* sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim):
Likewie.
* tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function,
debug_loops, debug_loop, debug_loop_num): Likewise.
* passes.c (debug_pass): Likewise.
(dump_properties): Likewise; add cfglayout property.
(debug_properties): Likewise.
* tree-ssa-reassoc.c (debug_ops_vector): Likewise.
* varpool.c (debug_varpool): Likewise.
* regcprop.c (debug_value_data): Likewise.
* tree-ssa-operands.c (verify_imm_links, debug_immediate_uses,
debug_immediate_uses_for): Likewise.
From-SVN: r160036
|
|
* hwint.h (HOST_LONG_FORMAT): New macro
* bitmap.c, c-decl.c, mips-tfile.c, print-rtl.c, print-tree.c:
Use HOST_PTR_PRINTF.
* system.h (HOST_PTR_PRINTF): Resurrect old macro
* doc/hostconfig.texi (HOST_LONG_FORMAT): Document.
(HOST_PTR_PRINTF): Document.
From-SVN: r151108
|
|
2009-06-27 Paolo Bonzini <bonzini@gnu.org>
* bitmap.h (bitmap_ior_and_into): New.
* bitmap.c (bitmap_ior_and_into): New.
From-SVN: r149009
|
|
* bitmap.c (bitmap_clear): Don't declare as inline.
* gimple.c (gimplify_assign): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise.
* haifa-sched.c (insn_cost): Don't declare with HAIFA_INLINE.
(sched_scan_info): Remove duplicate definition.
From-SVN: r148539
|
|
2009-05-16 Brad Lucier <lucier@math.purdue.edu>
PR middle-end/39301
* hwint.h: Add macro HOST_WIDEST_INT_PRINT.
* bitmap.c (bitmap_descriptor): Make fields HOST_WIDEST_INT.
(output_info): Make field HOST_WIDEST_INT.
(print_statistics): Use HOST_WIDEST_INT_PRINT.
(dump_bitmat_statistics): Same.
From-SVN: r147624
|
|
an int.
2009-04-30 Rafael Avila de Espindola <espindola@google.com>
* alloc-pool.c (alloc_pool_descriptor): Use an insert_opion value
instead of an int.
* bitmap.c (bitmap_descriptor): Likewise.
* ggc-common.c (loc_descriptor): Likewise.
* varray.c (varray_descriptor): Likewise.
* vec.c (vec_descriptor): Likewise.
From-SVN: r147009
|
|
* bitmap.c (bitmap_last_set_bit): New function.
* bitmap.h (bitmap_last_set_bit): Declare.
From-SVN: r145229
|
|
From-SVN: r144324
|
|
about implicit conversion from void * to...
* bitmap.c (bitmap_obstack_alloc_stat): Adjust cast to eliminate
C++ warning about implicit conversion from void * to struct
bitmap_head_def *.
(bitmap_obstack_free): Likewise for bitmap_element *.
From-SVN: r143480
|
|
* alloc-pool.c (hash_descriptor, eq_descriptor,
alloc_pool_descriptor): Fix -Wc++-compat warnings.
* bitmap.c (hash_descriptor, eq_descriptor, bitmap_descriptor):
Likewise.
* ggc-common.c (hash_descriptor, eq_descriptor, hash_ptr, eq_ptr,
loc_descriptor, ggc_prune_ptr, ggc_free_overhead,
final_cmp_statistic, cmp_statistic, dump_ggc_loc_statistics):
Likewise.
* varray.c (hash_descriptor, eq_descriptor, varray_descriptor):
Likewise.
From-SVN: r137446
|
|
2008-07-02 Richard Guenther <rguenther@suse.de>
* bitmap.h (bitmap_set_bit): Return bool.
(bitmap_clear_bit): Likewise.
* bitmap.c (bitmap_set_bit): Return if the bit changed. Only
write to the bitmap if it would.
(bitmap_clear_bit): Likewise.
* tree-ssa-structalias.c (add_implicit_graph_edge): Use
bitmap_set_bit return value.
(add_pred_graph_edge): Likewise.
(add_graph_edge): Likewise.
(do_sd_constraint): Likewise.
(do_ds_constraint): Likewise.
From-SVN: r137345
|
|
* 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
|
|
2007-11-09 Richard Guenther <rguenther@suse.de>
* bitmap.h (bitmap_single_bit_set_p): Declare.
* bitmap.c (bitmap_single_bit_set_p): New function.
* tree-ssa-alias.c (add_may_alias_for_new_tag): Use it.
(maybe_create_global_var): Use bitmap_empty_p.
From-SVN: r130045
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
* bitmap.c (hash_descriptor, eq_descriptor, bitmap_element_zerop,
bitmap_copy, bitmap_clear_bit, popcount_table, bitmap_count_bits,
bitmap_first_set_bit, bitmap_and, bitmap_and_into,
bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior,
bitmap_ior_into, bitmap_xor, bitmap_xor_into, bitmap_equal_p,
bitmap_intersect_p, bitmap_intersect_compl_p,
bitmap_ior_and_compl, bitmap_ior_and_compl_into,
debug_bitmap_file, debug_bitmap, bitmap_print, bitmap_hash):
Constify.
* bitmap.h (bitmap_copy, bitmap_equal_p, bitmap_intersect_p,
bitmap_intersect_compl_p, bitmap_count_bits, bitmap_and,
bitmap_and_into, bitmap_and_compl, bitmap_and_compl_into,
bitmap_compl_and_into, bitmap_ior, bitmap_ior_into, bitmap_xor,
bitmap_xor_into, bitmap_ior_and_compl, bitmap_ior_and_compl_into,
debug_bitmap, debug_bitmap_file, bitmap_print,
bitmap_first_set_bit, bitmap_hash, bmp_iter_set_init,
bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
From-SVN: r126928
|
|
From-SVN: r125624
|
|
2007-02-13 Seongbae Park <seongbae.park@gmail.com>
* bitmap.c (bitmap_and, bitmap_and_compl, bitmap_xor):
Ensure dst->current is valid.
From-SVN: r121903
|
|
* statistics.h (ALONE_PASS_MEM_STAT, ALONE_MEM_STAT_INFO,
ALONE_MEM_STAT_DECL): New macros.
* bitmap.h: Include statistics.h
(struct bitmap_head_def): Add variant with pointer to bitmap descriptor.
(bitmap_initialize_stat): Rename from bitmap_initialize; add statistics.
(bitmap_obstack_alloc_stat, bitmap_gc_alloc_stat): Declare.
* bitmap.c: Include hashtab.h
(bitmap_descriptor): New.
(bitmap_hash): New static variable
(hash_descriptor, eq_descriptor, bitmap_descriptor, register_overhead):
New static functions.
(bitmap_register): New.
(bitmap_element_free, bitmap_element_allocate, bitmap_elt_clear_from,
bitmap_obstack_release): Do accounting.
(bitmap_obstack_alloc_stat): Rename from bitmap_obstack_alloc ; do
accounting.
(bitmap_gc_alloc_stat): Likewise.
(bitmap_obstack_free, bitmap_find_bit): Do statictics.
(print_statistics, dump_bitmap_statistics): New functions.
* toplev.c (finalize): Dump bitmap statistics.
From-SVN: r119573
|
|
* tree-ssa-alias.c (eq_ptr_info, ptr_info_hash): New function.
(create_name_tags): Instead of quadratic checking use hashtable.
* bitmap.h: Include hashtab.h.
(bitmap_hash): Declare.
* bitmap.c (bitmap_hash): New function.
From-SVN: r116285
|
|
From-SVN: r113893
|
|
variants associated with the CURRENT and...
2005-12-29 Kenneth Zadeck <zadeck@naturalbridge.com>
* bitmap.c (bitmap_element_free, bitmap_element_link,
bitmap_elt_insert_after, bitmap_and, bitmap_and_compl,
bitmap_and_compl, bitmap_ior, bitmap_ior_into, bitmap_xor,
bitmap_xor_into): Added code to properly maintain the variants
associated with the CURRENT and HEAD fields.
(bitmap_popcount, bitmap_clear_range, bitmap_compl_and_into): New
functions. * bitmap.h: Added defs for bitmap_popcount,
bitmap_clear_range, and bitmap_compl_and_into.
From-SVN: r109153
|
|
* aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.
* configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR.
* system.h (HOST_PTR_PRINTF): Don't define, poison it.
* bitmap.c, c-decl.c, config/i386/i386-interix.h,
config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c:
Delete HOST_PTR_PRINTF.
* configure, config.in: Regenerate.
cp:
* name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
From-SVN: r103135
|
|
code for this case.
2005-07-08 Kenneth Zadeck <zadeck@naturalbridge.com>
* bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_xor, bitmap_xor_into): Removed "a !=
b" assert and inserted fastpath code for this case.
(bitmap_ior): Removed "a != b" assert.
From-SVN: r101780
|
|
From-SVN: r101317
|
|
2005-05-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* bitmap.c (bitmap_elmt_to_freelist, bitmap_element_allocate,
bitmap_elt_clear_from, bitmap_clear): Changed freelist structure.
* bitmap.h: Fixed comments.
From-SVN: r99605
|
|
From-SVN: r96243
|
|
* bitmap.c, bitmap.h, lambda-code.c, tree-dfa.c, tree-dump.c,
tree-dump.h, tree-ssa-loop-manip.c, value-prof.c,
config/mips/mips.md, config/rs6000/aix.h,
config/rs6000/beos.h, config/rs6000/sysv4.h: Update copyright.
From-SVN: r95064
|
|
* bitmap.h (bitmap_and_compl_into): Return bool.
* bitmap.c (bitmap_and_compl_into): Return changed flag.
From-SVN: r95004
|
|
seems profitable.
* bitmap.c (bitmap_find_bit): Speed up by traversing from
head->first if that seems profitable.
From-SVN: r91335
|
|
* bitmap.c (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
* bitmap.h (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
(BITMAP_XMALLOC): Forward to BITMAP_OBSTACK_ALLOC.
(BITMAP_XFREE): Forward to BITMAP_OBSTACK_FREE.
From-SVN: r91306
|
|
* basic-block.h (OBSTACK_ALLOC_REG_SET): Adjust.
(FREE_REG_SET): Adjust.
* bitmap.c (bitmap_obstack_free): Cope with NULL bitmap.
* bitmap.h (BITMAP_OBSTACK_ALLOC): Rename to ...
(BITMAP_ALLOC): ... here.
(BITMAP_OBSTACK_FREE): Rename to ...
(BITMAP_FREE): Don't check for NULL bitmap here.
* tree-ssa-pre.c (value_insert_into_set_bitmap,
bitmap_set_new): Use new names.
From-SVN: r91281
|
|
* bitmap.c (INLINE): Do not define.
(bitmap_elem_to_freelist, bitmap_element_free,
bitmap_element_allocate, bitmap_clear, bitmap_element_zerop,
bitmap_element_link, bitmap_find_bit): Use inline keyword/macro.
From-SVN: r91168
|
|
* bitmap.h (struct bitmap_obstack): New obstack type.
(struct bitmap_head_def): Replace using_obstack with obstack
pointer.
(bitmap_default_obstack): New.
(bitmap_initialize): Make inline, does not do allocation.
(bitmap_release_memory): Remove.
(bitmap_obstack_initialize, bitmap_obstack_release): Declare.
(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
bitmap_obstack_free, bitmap_malloc_free): Declare.
(BITMAP_OBSTACK_ALLOC, BITMAP_GGC_ALLOC, BITMAP_XMALLOC): Adjust.
(BITMAP_FREE): Replace with ...
(BITMAP_OBSTACK_FREE): ... this.
(BITMAP_XFREE): Adjust.
(BITMAP_INIT_ONCE): Remove.
* bitmap.c (bitmap_obstack, bitmap_obstack_init, bitmap_free: Remove.
(bitmap_default_obstack): New.
(bitmap_elem_to_freelist): Adjust.
(bitmap_element_allocate): Adjust. Break initialization into ...
(bitmap_obstack_initialize): ... here.
(bitmap_release_memory): Replace with ...
(bitmap_obstack_release): ... this.
(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
bitmap_obstack_free, bitmap_malloc_free): New.
(bitmap_ior_and_compl, bitmap_ior_and_compl_into): Use
bitmap_initialize.
(bitmap_initialize): Move to bitmap.h.
* gengtype.c (open_base_files): Add obstack.h to ifiles.
* Makefile.in (BASIC_BLOCK_H, REGS_H): Add obstack.h.
* basic-block.h (INIT_REG_SET): Allocate from reg_obstack.
(INITIALIZE_REG_SET): Remove.
(FREE_REG_SET): Use BITMAP_OBSTACK_FREE.
(INIT_ONCE_REG_SET, MAX_REGNO_REG_SET): Remove.
(flow_obstack): Do not declare.
(reg_obstack): Declare.
* regs.h: Include obstack.h.
* tree-optimize.c (tree_rest_of_compilation): Initialize and
release bitmap obstack here.
* bb-reorder.c: #include regs, not basic-block.
(fix_crossing_conditional_branches): Allocate regsets from
reg_obstack.
* bt-load.c: Do not inlude bitmap.h, sbitmap.h, basic-block.h or
obstack.h.
* caller-save.c: Include regs.h earlier.
* cfg.c: Do not include basic-block.h or obstack.h.
(reg_obstack): Define.
* cfganal.c: Include obstack.h
* cfgcleanyp.c: Do not include basic-block.h. Include regs.h
earlier.
* cfglayout.c: Do not include obstack.h.
(flow_obstack): Remove declaration.
(cfg_layout_duplicate_bb): Use reg_obstack.
* cfgloop.c, cfgloopanal.c, cfgloopmanip.c: Include obstack.h.
* cfgrtl.c (rtl_split_block): Use reg_obstack.
(force_nonfallthru_and_redirect, rtl_split_edge): Likewise.
(safe_insert_insn_on_edge): Use OBSTACK_ALLOC_REG_SET, adjust.
(cfg_layout_split_edge): Use reg_obstack.
* cse.c: Include regs.h earlier.
* ddg.c: Do not include basic-block.h.
* dominance.c: Inlude obstack.h.
* flow.c (update_life_info): Use OBSTACK_ALLOC_REG_SET, adjust.
(calculate_global_regs_live): Likewise.
(allocate_bb_life_data): Use reg_obstack.
(init_propagate_block_info): Use OBSTACK_ALLOC_REGSET.
* global.c: Do not include basic-block.h.
(build_insn_chain): Use OBSTACK_ALLOC_REG_SET, adjust.
* graph.c: Include obstack.h.
* haifa-sched.c: Do not include basic-block.h.
* ifcvt.c: Use OBSTACK_ALLOC_REG_SET, adjust.
* local-alloc.c: Do not include basic-block.h.
* loop-init.c, loop-invariant.c: Include obstack.h.
* loop-iv.c: Likewise.
(simplify_using_initial_values): Use OBSTACK_ALLOC_REG_SET,
adjust.
* loop-unroll.c, loop-unswitch.c: Inlude obstack.h.
* modulo-sched.c: Do not include basic-block.h.
* passes.c (rest_of_handle_final): Do not call
regset_release_memory.
* ra-debug.c: Include regs.h earlier. Do not include
basic-block.h.
* recog.c (peephole2_optimize): Use OBSTACK_ALLOC_REG_SET, adjust.
* regclass.c (init_reg_sets): Do not call INIT_ONCE_REG_SET.
(allocate_reg_info): Do not call MAX_REGNO_REG_SET.
(regset_release_memory): Remove.
* resource.c: Do not include basic-block.h.
* rtlanal.c: Do not include basic-block.h.
* sbitmap.c: Include obstack.h.
* sched-deps.c: Do not include basic-block.h.
(reg_pending_sets_head, reg_pending_clobbers_head,
reg_pending_uses_head): Remove.
(init_deps_global): Use OBSTACK_ALLOC_REG_SET.
* sched-ebb.c: Do not include basic-block.h.
* sched-rgn.c: Likewise.
* tree-if-conv.c (get_loop_body_in_if_conv_order): Use
BITMAP_XFREE.
* tree-outof-ssa.c (perform_edge_inserts): Use BITMAP_XFREE.
* tree-sra.c (decide_instantiations): Adjust bitmap
initialization.
* tree-ssa-dce.c: Include obstack.h.
* tree-ssa-pre.c (grand_bitmap_obstack): Make a bitmap_obstack.
(value_insert_into_set_bitmap): Remove useless bitmap_clear.
(bitmap_set_new): Likewise.
(init_pre): Initialize bitmap obstack.
(fini_pre): Release bitmap obstack.
* tree-ssanames.c (ssa_names_to_rewrite): Make static.
(marked_for_rewrite_p): ssa_names_to_rewrite is never NULL.
(mark_for_rewrite, unmark_for_rewrite): Likewise.
(marked_ssa_names): Likewise.
(init_ssanames): Use BITMAP_XMALLOC.
(fini_ssanames): Use BITMAP_XFREE.
* web.c: Include obstack.h
From-SVN: r91009
|
|
* bitmap.c, bitmap.h, expmed.c, tree-cfg.c: Fix comment
formatting.
From-SVN: r90595
|
|
* bitmap.h (nBITMAP_WORD_BITS): Remove.
(BITMAP_WORD_BITS): Force unsigned by use of 1u.
(BITMAP_ELEMENT_WORDS, BITMAP_ELEMENT_ALL_BITS): Remove
unnecessary casts.
(bitmap_first_set_bit): Return unsigned, use ctzl.
(bitmap_last_set_bit): Remove.
* bitmap.c (bitmap_element_zerop, bitmap_copy): Make iterator
unsigned.
(bitmap_first_set_bit): Return unsigned, require non-empty bitmap,
remove special case code for two word elements.
(bitmap_last_set_bit): Remove.
* ra-build.c (livethrough_conflicts_bb): Replace unnecessary use of
bitmap_first_set_bit with bitmap_empty_p.
* tree-outof-ssa.c (analyze_edges_for_bb): Likewise.
* tree-ssa-pre.c (bitmap_print_value): Use simple flag rather than
bitmap_last_bit_set.
From-SVN: r90478
|
|
* bitmap.h (enum bitmap_bits): Remove.
(bitmap_operation): Remove.
(bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_ior, bitmap_ior_into, bitmap_xor,
bitmap_xor_into): Prototype.
* bitmap.c (bitmap_elt_insert_after, bitmap_elt_clear_from): New.
(bitmap_operation): Remove.
(bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_ior, bitmap_ior_into, bitmap_xor,
bitmap_xor_into): New.
(bitmap_ior_and_compl, bitmap_ior_and_compl_into): Adjust.
From-SVN: r90121
|
|
* bitmap.c (bitmap_print): Make bitno unsigned.
* bt-load.c (clear_btr_from_live_range,
btr_def_live_range): Likewise.
* caller-save.c (save_call_clobbered_regs): Likewise.
* cfganal.c (compute_dominance_frontiers_1): Likewise.
* cfgcleanup.c (thread_jump): Likewise.
* cfgrtl.c (safe_insert_insn_on_edge): Likewise.
* conflict.c (conflict_graph_compute): Likewise.
* ddg.c (add_deps_for_use): Likewise.
* df.c (df_refs_update): Likewise.
* except.c (remove_eh_handler): Likewise.
* flow.c (verify_local_live_at_start, update_life_info,
initialize_uninitialized_subregs, propagate_one_insn,
free_propagate_block_info, propagate_block, find_use_as_address,
reg_set_to_hard_reg_set): Likewise.
* gcse.c (clear_modify_mem_tables): Likewise.
* global.c (global_conflicts, build_insn_chain): Likewise.
* ifcvt.c (dead_or_predicable): Likewise.
* local-alloc.c (update_equiv_regs): Likewise.
* loop.c (load_mems): Likewise.
* ra-build.c (livethrough_conflicts_bb, conflicts_between_webs):
Likewise.
* ra-rewrite.c (reloads_to_loads, rewrite_program2, actual_spill):
Likewise.
* reload1.c (order_regs_for_reload, finish_spills): Likewise.
* sched-deps.c (sched_analyze_insn, free_deps): Likewise.
* sched-rgn.c (propagate_deps
* tree-cfg.c (tree_purge_all_dead_eh_edges): Likewise.
* tree-dfa.c (dump_dfa_stats
tree-into-ssa.c (compute_global_livein, insert_phi_nodes,
insert_phi_nodes_for, debug_def_blocks_r, invalidate_name_tags):
Likewise.
* tree-outof-ssa.c (coalesce_ssa_name, coalesce_vars,
free_temp_expr_table, find_replaceable_exprs): Likewise.
* tree-sra.c (scan_function, scalarize_parms): Likewise.
* tree-ssa-alias.c (init_alias_info,
compute_points_to_and_addr_escape,
compute_flow_sensitive_aliasing, maybe_create_global_var): Likewise.
* tree-ssa-dce.c (mark_control_dependent_edges_necessary): Likewise.
* tree-ssa-live.c (new_tree_live_info, live_worklist,
calculate_live_on_entry, calculate_live_on_exit, compare_pairs,
sort_coalesce_list, build_tree_conflict_graph, dump_live_info
tree-ssa-loop-manip.c (add_exit_phis_var): Likewise.
tree-ssa-operands.c (get_asm_expr_operands, add_call_clobber_ops,
add_call_read_ops): Likewise.
* tree-ssa-pre.c (bitmap_print_value_set, insert_aux): Likewise.
* tree-ssa-live.h (num_var_partitions): Return unsigned.
From-SVN: r90053
|
|
* bitmap.h (bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_ior, bitmap_iot_into,
bitmap_ior_compl, bitmap_xor, bitmap_xor_into): Produce void.
(bitmap_ior_and_compl_into): Produce bool.
(bitmap_union_of_diff): Rename to ...
(bitmap_ior_and_compl): ... here. Produce bool.
* bitmap.c (bitmap_ior_and_compl_into): Return bool. Use
bitmap_operation directly.
(bitmap_union_of_diff): Rename to ...
(bitmap_ior_and_compl): ... here. Return bool, use
bitmap_operation directly.
* df.c (df_rd_transfer_function): Use bitmap_ior_and_compl.
(df_ru_transfer_function, df_lr_transfer_function): Likewise.
* global.c (modify_bb_reg_pav): Likewise.
From-SVN: r89982
|
|
* bitmap.h (bitmap_equal_p): Return bool.
(bitmap_intersect_p, bitmap_intersect_compl_p): Declare.
* bitmap.c (bitmap_equal_p): Return bool. Compare directly.
(bitmap_intersect_p, bitmap_intersect_compl_p): New.
* flow.c (calculate_global_regs_live): Use bitmap_intersect_p and
bitmap_intersect_compl_p.
* ifcvt (dead_or_predicable): Likewise.
From-SVN: r89981
|