1. 03 Dec, 2013 1 commit
    • re PR target/58864 (ICE in connect_traces, at dwarf2cfi.c:NNNN) · 7f2f0a01
      	PR target/58864
      	* dojump.c (save_pending_stack_adjust, restore_pending_stack_adjust):
      	New functions.
      	* expr.h (struct saved_pending_stack_adjust): New type.
      	(save_pending_stack_adjust, restore_pending_stack_adjust): New
      	prototypes.
      	* optabs.c (emit_conditional_move): Call save_pending_stack_adjust
      	and get_last_insn before do_pending_stack_adjust, call
      	restore_pending_stack_adjust after delete_insns_since.
      	* expr.c (expand_expr_real_2): Don't call do_pending_stack_adjust
      	before calling emit_conditional_move.
      	* expmed.c (expand_sdiv_pow2): Likewise.
      	* calls.c (expand_call): Use {save,restore}_pending_stack_adjust.
      
      	* g++.dg/opt/pr58864.C: New test.
      
      From-SVN: r205618
      Jakub Jelinek committed
  2. 19 Nov, 2013 2 commits
    • Factor unrelated declarations out of tree.h. · d8a2d370
      This patch applies the rule that functions defined in FOO.c must be
      declared in FOO.h. One of the worst offenders in the code base is
      tree.h, unsurprisingly.
      
      The patch creates several new headers: attribs.h calls.h fold-const.h
      gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h
      tree-nested.h tree-object-size.h varasm.h.
      
      Functions in each corresponding .c file got moved to those headers and
      others that already existed. I wanted to make this patch as mechanical
      as possible, so I made no attempt to fix problems like having
      build_addr defined in tree-inline.c. I left that for later.
      
      There were some declarations that I could not move out of tree.h
      because of header poisoning or the use of target macros. We forbid the
      inclusion of things like expr.h from FE files. While that's a
      reasonable idea, the FE file *still* manage to at expr.c functionality
      because the declarations they want to use were defined in tree.h.
      
      The affected files are builtins.h, emit-rtl.h and expr.h.
      
      If that functionality is allowed to be accessed from the FEs,
      then I will later move those functions out of expr.c into tree.c.
      I have moved these declarations to the bottom of tree.h so they
      are easy to identify later.
      
      There is a namespace collision with libcpp. The file gcc/symtab.c
      cannot use gcc/symtab.h because the #include command picks up
      libcpp/include/symtab.h first. So I named this file gcc-symtab.h
      for now.
      
      Finally, I added a new header to PLUGIN_HEADERS to account for the
      tree.h refactoring. I did not add all headers factored out of tree.h
      because it is unclear (and impossible to tell) what plugins need.
      This adds the one header used by the plugins in the testsuite.
      
      This will be changing quite dramatically as we progress with the header
      refactoring.
      
      This patch should offer some minimal incremental build advantages
      by reducing the size of tree.h. Changes that would otherwise
      affected tree.h, will now go to other headers which are less
      frequently included.
      
      	* tree.h: Include fold-const.h.
      	(aggregate_value_p): Moved to function.h.
      	(alloca_call_p): Moved to calls.h.
      	(allocate_struct_function): Moved to function.h.
      	(apply_tm_attr): Moved to attribs.h.
      	(array_at_struct_end_p): Moved to expr.h.
      	(array_ref_element_size): Moved to tree-dfa.h.
      	(array_ref_low_bound): Moved to tree-dfa.h.
      	(array_ref_up_bound): Moved to tree.h.
      	(assemble_alias): Moved to cgraph.h.
      	(bit_from_pos): Moved to stor-layout.h.
      	(build_addr): Moved to tree-nested.h.
      	(build_duplicate_type): Moved to tree-inline.h.
      	(build_fold_addr_expr): Moved to fold-const.h.
      	(build_fold_addr_expr_with_type): Moved to fold-const.h.
      	(build_fold_addr_expr_with_type_loc): Moved to fold-const.h.
      	(build_fold_indirect_ref): Moved to fold-const.h.
      	(build_fold_indirect_ref_loc): Moved to fold-const.h.
      	(build_personality_function): Moved to tree.h.
      	(build_range_check): Moved to fold-const.h.
      	(build_simple_mem_ref): Moved to fold-const.h.
      	(build_simple_mem_ref_loc): Moved to fold-const.h.
      	(build_tm_abort_call): Moved to trans-mem.h.
      	(byte_from_pos): Moved to stor-layout.h.
      	(call_expr_flags): Moved to calls.h.
      	(can_move_by_pieces): Moved to expr.h.
      	(categorize_ctor_elements): Moved to expr.h.
      	(change_decl_assembler_name): Moved to gcc-symtab.h.
      	(combine_comparisons): Moved to fold-const.h.
      	(complete_ctor_at_level_p): Moved to tree.h.
      	(component_ref_field_offset): Moved to tree-dfa.h.
      	(compute_builtin_object_size): Moved to tree-object-size.h.
      	(compute_record_mode): Moved to stor-layout.h.
      	(constant_boolean_node): Moved to fold-const.h.
      	(constructor_static_from_elts_p): Moved to varasm.h.
      	(cxx11_attribute_p): Moved to attribs.h.
      	(debug_body): Moved to print-tree.h.
      	(debug_find_tree): Moved to tree-inline.h.
      	(debug_fold_checksum): Moved to fold-const.h.
      	(debug_head): Moved to print-tree.h.
      	(debug_head): Moved to print-tree.h.
      	(debug_raw): Moved to print-tree.h.
      	(debug_tree): Moved to print-tree.h.
      	(debug_vec_tree): Moved to print-tree.h.
      	(debug_verbose): Moved to print-tree.h.
      	(debug_verbose): Moved to print-tree.h.
      	(decl_attributes): Moved to attribs.h.
      	(decl_binds_to_current_def_p): Moved to varasm.h.
      	(decl_default_tls_model): Moved to varasm.h.
      	(decl_replaceable_p): Moved to varasm.h.
      	(div_if_zero_remainder): Moved to fold-const.h.
      	(double_int mem_ref_offset): Moved to fold-const.h.
      	(dump_addr): Moved to print-tree.h.
      	(element_precision): Moved to machmode.h.
      	(expand_dummy_function_end): Moved to function.h.
      	(expand_function_end): Moved to function.h.
      	(expand_function_start): Moved to function.h.
      	(expand_label): Moved to stmt.h.
      	(expr_first): Moved to tree-iterator.h.
      	(expr_last): Moved to tree-iterator.h.
      	(finalize_size_functions): Moved to stor-layout.h.
      	(finish_builtin_struct): Moved to stor-layout.h.
      	(finish_record_layout): Moved to stor-layout.h.
      	(fixup_signed_type): Moved to stor-layout.h.
      	(fixup_unsigned_type): Moved to stor-layout.h.
      	(flags_from_decl_or_type): Moved to calls.h.
      	(fold): Moved to fold-const.h.
      	(fold_abs_const): Moved to fold-const.h.
      	(fold_binary): Moved to fold-const.h.
      	(fold_binary_loc): Moved to fold-const.h.
      	(fold_binary_to_constant): Moved to fold-const.h.
      	(fold_build1): Moved to fold-const.h.
      	(fold_build1_initializer_loc): Moved to fold-const.h.
      	(fold_build1_loc): Moved to fold-const.h.
      	(fold_build1_stat_loc): Moved to fold-const.h.
      	(fold_build2): Moved to fold-const.h.
      	(fold_build2_initializer_loc): Moved to fold-const.h.
      	(fold_build2_loc): Moved to fold-const.h.
      	(fold_build2_stat_loc): Moved to fold-const.h.
      	(fold_build3): Moved to fold-const.h.
      	(fold_build3_loc): Moved to fold-const.h.
      	(fold_build3_stat_loc): Moved to fold-const.h.
      	(fold_build_call_array): Moved to fold-const.h.
      	(fold_build_call_array_initializer): Moved to fold-const.h.
      	(fold_build_call_array_initializer_loc): Moved to fold-const.h.
      	(fold_build_call_array_loc): Moved to fold-const.h.
      	(fold_build_cleanup_point_expr): Moved to fold-const.h.
      	(fold_convert): Moved to fold-const.h.
      	(fold_convert_loc): Moved to fold-const.h.
      	(fold_convertible_p): Moved to fold-const.h.
      	(fold_defer_overflow_warnings): Moved to fold-const.h.
      	(fold_deferring_overflow_warnings_p): Moved to fold-const.h.
      	(fold_fma): Moved to fold-const.h.
      	(fold_ignored_result): Moved to fold-const.h.
      	(fold_indirect_ref): Moved to fold-const.h.
      	(fold_indirect_ref_1): Moved to fold-const.h.
      	(fold_indirect_ref_loc): Moved to fold-const.h.
      	(fold_read_from_constant_string): Moved to fold-const.h.
      	(fold_real_zero_addition_p): Moved to fold-const.h.
      	(fold_single_bit_test): Moved to fold-const.h.
      	(fold_strip_sign_ops): Moved to fold-const.h.
      	(fold_ternary): Moved to fold-const.h.
      	(fold_ternary_loc): Moved to fold-const.h.
      	(fold_unary): Moved to tree-data-ref.h.
      	(fold_unary_ignore_overflow): Moved to fold-const.h.
      	(fold_unary_ignore_overflow_loc): Moved to fold-const.h.
      	(fold_unary_loc): Moved to fold-const.h.
      	(fold_unary_to_constant): Moved to fold-const.h.
      	(fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h.
      	(fold_undefer_overflow_warnings): Moved to fold-const.h.
      	(folding_initializer): Moved to fold-const.h.
      	(free_temp_slots): Moved to function.h.
      	(generate_setjmp_warnings): Moved to function.h.
      	(get_attribute_name): Moved to attribs.h.
      	(get_identifier): Moved to stringpool.h.
      	(get_identifier_with_length): Moved to stringpool.h.
      	(get_inner_reference): Moved to tree.h.
      	(gimple_alloca_call_p): Moved to calls.h.
      	(gimplify_parameters): Moved to function.h.
      	(highest_pow2_factor): Moved to expr.h.
      	(indent_to): Moved to print-tree.h.
      	(init_attributes): Moved to attribs.h.
      	(init_dummy_function_start): Moved to function.h.
      	(init_function_start): Moved to function.h.
      	(init_inline_once): Moved to tree-inline.h.
      	(init_object_sizes): Moved to tree-object-size.h.
      	(init_temp_slots): Moved to function.h.
      	(init_tree_optimization_optabs): Moved to optabs.h.
      	(initialize_sizetypes): Moved to stor-layout.h.
      	(initializer_constant_valid_for_bitfield_p): Moved to varasm.h.
      	(initializer_constant_valid_p): Moved to varasm.h.
      	(int_const_binop): Moved to fold-const.h.
      	(internal_reference_types): Moved to stor-layout.h.
      	(invert_tree_comparison): Moved to fold-const.h.
      	(invert_truthvalue): Moved to fold-const.h.
      	(invert_truthvalue_loc): Moved to fold-const.h.
      	(is_tm_ending_fndecl): Moved to trans-mem.h.
      	(is_tm_may_cancel_outer): Moved to trans-mem.h.
      	(is_tm_pure): Moved to trans-mem.h.
      	(is_tm_safe): Moved to trans-mem.h.
      	(layout_decl): Moved to stor-layout.h.
      	(layout_type): Moved to stor-layout.h.
      	(lookup_attribute_spec): Moved to attribs.h.
      	(make_accum_type): Moved to stor-layout.h.
      	(make_decl_one_only): Moved to varasm.h.
      	(make_decl_rtl): Moved to tree.h.
      	(make_decl_rtl_for_debug): Moved to varasm.h.
      	(make_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_signed_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_signed_fract_type): Moved to stor-layout.h.
      	(make_or_reuse_unsigned_accum_type): Moved to stor-layout.h.
      	(make_or_reuse_unsigned_fract_type): Moved to stor-layout.h.
      	(make_range): Moved to fold-const.h.
      	(make_range_step): Moved to fold-const.h.
      	(make_sat_signed_accum_type): Moved to stor-layout.h.
      	(make_sat_signed_fract_type): Moved to stor-layout.h.
      	(make_sat_unsigned_accum_type): Moved to stor-layout.h.
      	(make_sat_unsigned_fract_type): Moved to stor-layout.h.
      	(make_signed_accum_type): Moved to stor-layout.h.
      	(make_signed_fract_type): Moved to stor-layout.h.
      	(make_signed_type): Moved to stor-layout.h.
      	(make_unsigned_accum_type): Moved to stor-layout.h.
      	(make_unsigned_fract_type): Moved to stor-layout.h.
      	(make_unsigned_type): Moved to stor-layout.h.
      	(mark_decl_referenced): Moved to varasm.h.
      	(mark_referenced): Moved to varasm.h.
      	(may_negate_without_overflow_p): Moved to fold-const.h.
      	(maybe_get_identifier): Moved to stringpool.h.
      	(merge_ranges): Moved to fold-const.h.
      	(merge_weak): Moved to varasm.h.
      	(mode_for_size_tree): Moved to stor-layout.h.
      	(multiple_of_p): Moved to fold-const.h.
      	(must_pass_in_stack_var_size): Moved to calls.h.
      	(must_pass_in_stack_var_size_or_pad): Moved to calls.h.
      	(native_encode_expr): Moved to fold-const.h.
      	(native_interpret_expr): Moved to fold-const.h.
      	(non_lvalue): Moved to fold-const.h.
      	(non_lvalue_loc): Moved to fold-const.h.
      	(normalize_offset): Moved to stor-layout.h.
      	(normalize_rli): Moved to stor-layout.h.
      	(notice_global_symbol): Moved to varasm.h.
      	(omit_one_operand): Moved to fold-const.h.
      	(omit_one_operand_loc): Moved to fold-const.h.
      	(omit_two_operands): Moved to fold-const.h.
      	(omit_two_operands_loc): Moved to fold-const.h.
      	(operand_equal_p): Moved to tree-data-ref.h.
      	(parse_input_constraint): Moved to stmt.h.
      	(parse_output_constraint): Moved to stmt.h.
      	(place_field): Moved to stor-layout.h.
      	(pop_function_context): Moved to function.h.
      	(pop_temp_slots): Moved to function.h.
      	(pos_from_bit): Moved to stor-layout.h.
      	(preserve_temp_slots): Moved to function.h.
      	(print_node): Moved to print-tree.h.
      	(print_node_brief): Moved to print-tree.h.
      	(print_rtl): Moved to rtl.h.
      	(process_pending_assemble_externals): Moved to varasm.h.
      	(ptr_difference_const): Moved to fold-const.h.
      	(push_function_context): Moved to function.h.
      	(push_struct_function): Moved to function.h.
      	(push_temp_slots): Moved to function.h.
      	(record_tm_replacement): Moved to trans-mem.h.
      	(relayout_decl): Moved to stor-layout.h.
      	(resolve_asm_operand_names): Moved to stmt.h.
      	(resolve_unique_section): Moved to varasm.h.
      	(rli_size_so_far): Moved to stor-layout.h.
      	(rli_size_unit_so_far): Moved to stor-layout.h.
      	(round_down): Moved to fold-const.h.
      	(round_down_loc): Moved to fold-const.h.
      	(round_up): Moved to fold-const.h.
      	(round_up_loc): Moved to fold-const.h.
      	(set_decl_incoming_rtl): Moved to emit-rtl.h.
      	(set_decl_rtl): Moved to tree.h.
      	(set_min_and_max_values_for_integral_type): Moved to stor-layout.h.
      	(set_user_assembler_name): Moved to varasm.h.
      	(setjmp_call_p): Moved to calls.h.
      	(size_binop): Moved to fold-const.h.
      	(size_binop_loc): Moved to fold-const.h.
      	(size_diffop): Moved to fold-const.h.
      	(size_diffop_loc): Moved to fold-const.h.
      	(size_int_kind): Moved to fold-const.h.
      	(stack_protect_epilogue): Moved to function.h.
      	(start_record_layout): Moved to stor-layout.h.
      	(supports_one_only): Moved to varasm.h.
      	(swap_tree_comparison): Moved to fold-const.h.
      	(tm_malloc_replacement): Moved to trans-mem.h.
      	(tree build_fold_addr_expr_loc): Moved to fold-const.h.
      	(tree build_invariant_address): Moved to fold-const.h.
      	(tree_binary_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_binary_nonzero_warnv_p): Moved to fold-const.h.
      	(tree_call_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_expr_nonnegative_p): Moved to fold-const.h.
      	(tree_expr_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_output_constant_def): Moved to varasm.h.
      	(tree_overlaps_hard_reg_set): Moved to stmt.h.
      	(tree_single_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_single_nonzero_warnv_p): Moved to fold-const.h.
      	(tree_swap_operands_p): Moved to fold-const.h.
      	(tree_unary_nonnegative_warnv_p): Moved to fold-const.h.
      	(tree_unary_nonzero_warnv_p): Moved to fold-const.h.
      	(update_alignment_for_field): Moved to stor-layout.h.
      	(use_register_for_decl): Moved to function.h.
      	(variable_size): Moved to rtl.h.
      	(vector_type_mode): Moved to stor-layout.h.
      	* cgraph.h: Corresponding changes.
      	* emit-rtl.h: Corresponding changes.
      	* expr.h: Corresponding changes.
      	* function.h: Corresponding changes.
      	* optabs.h: Corresponding changes.
      	* trans-mem.h: Corresponding changes.
      	Protect against multiple inclusion.
      	* tree-inline.h: Corresponding changes.
      	* tree-iterator.h: Corresponding changes.
      	* tree-dfa.h: Include expr.h.
      	* tree-ssanames.h: Include stringpool.h.
      	* attribs.h: New file.
      	* calls.h: New file.
      	* fold-const.h: New file.
      	* gcc-symtab.h: New file.
      	* print-rtl.h: New file.
      	* print-tree.h: New file.
      	* stmt.h: New file.
      	* stor-layout.h: New file.
      	* strinpool.h: New file.
      	* tree-nested.h: New file
      	* tree-object-size.h: New file.
      	* varasm.h: New file.
      	* Makefile.in (PLUGIN_HEADERS): Add stringpool.h.
      
      	* alias.c: Include varasm.h.
      	Include expr.h.
      	* asan.c: Include calls.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* attribs.c: Include stringpool.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	* builtins.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	Include tree-object-size.h.
      	* calls.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	Include attribs.h.
      	* cfgexpand.c: Include stringpool.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	Include stmt.h.
      	Include print-tree.h.
      	* cgraph.c: Include varasm.h.
      	Include calls.h.
      	Include print-tree.h.
      	* cgraphclones.c: Include stringpool.h.
      	Include function.h.
      	Include emit-rtl.h.
      	Move inclusion of rtl.h earlier in the file.
      	* cgraphunit.c: Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* cilk-common.c: Include stringpool.h.
      	Include stor-layout.h.
      	* combine.c: Include stor-layout.h.
      	* config/aarch64/aarch64-builtins.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/aarch64/aarch64.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/alpha/alpha.c: Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/arc/arc.c: Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/arm/arm.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/avr/avr-c.c: Include stor-layout.h.
      	* config/avr/avr-log.c: Include print-tree.h.
      	* config/avr/avr.c: Include print-tree.h.
      	Include calls.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* config/bfin/bfin.c: Include varasm.h.
      	Include calls.h.
      	* config/c6x/c6x.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	* config/cr16/cr16.c: Include stor-layout.h.
      	Include calls.h.
      	* config/cris/cris.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include stmt.h.
      	* config/darwin.c: Include stringpool.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	* config/epiphany/epiphany.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	* config/fr30/fr30.c: Include stor-layout.h.
      	Include varasm.h.
      	* config/frv/frv.c: Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* config/h8300/h8300.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	* config/i386/i386.c: Include stringpool.h.
      	Include attribs.h.
      	Include calls.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* config/i386/winnt-cxx.c: Include stringpool.h.
      	Include attribs.h.
      	* config/i386/winnt.c: Include stringpool.h.
      	Include varasm.h.
      	* config/ia64/ia64-c.c: Include stringpool.h.
      	* config/ia64/ia64.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/iq2000/iq2000.c: Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/lm32/lm32.c: Include calls.h.
      	* config/m32c/m32c.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/m32r/m32r.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/m68k/m68k.c: Include calls.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* config/mcore/mcore.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	Include calls.h.
      	* config/mep/mep.c: Include varasm.h.
      	Include calls.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	* config/microblaze/microblaze.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/mips/mips.c: Include varasm.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/mmix/mmix.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/mn10300/mn10300.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/moxie/moxie.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/msp430/msp430.c: Include stor-layout.h.
      	Include calls.h.
      	* config/nds32/nds32.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/pa/pa.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/pdp11/pdp11.c: Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/picochip/picochip.c: Include calls.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	* config/rl78/rl78.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/rs6000/rs6000-c.c: Include stor-layout.h.
      	Include stringpool.h.
      	* config/rs6000/rs6000.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include print-tree.h.
      	Include varasm.h.
      	* config/rx/rx.c: Include varasm.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* config/s390/s390.c: Include print-tree.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/score/score.c: Include stringpool.h.
      	Include calls.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	* config/sh/sh-c.c: Include stringpool.h.
      	Include attribs.h.h.
      	* config/sh/sh.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/sol2-c.c: Include stringpool.h.
      	Include attribs.h.
      	* config/sol2-cxx.c: Include stringpool.h.
      	* config/sol2.c: Include stringpool.h.
      	Include varasm.h.
      	* config/sparc/sparc.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/spu/spu-c.c: Include stringpool.h.
      	* config/spu/spu.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* config/stormy16/stormy16.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/tilegx/tilegx.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/tilepro/tilepro.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/v850/v850-c.c: Include stringpool.h.
      	Include attribs.h.
      	* config/v850/v850.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include calls.h.
      	* config/vax/vax.c: Include calls.h.
      	Include varasm.h.
      	* config/vms/vms.c: Include stringpool.h.
      	* config/vxworks.c: Include stringpool.h.
      	* config/xtensa/xtensa.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include varasm.h.
      	* convert.c: Include stor-layout.h.
      	* coverage.c: Include stringpool.h.
      	Include stor-layout.h.
      	* dbxout.c: Include varasm.h.
      	Include stor-layout.h.
      	* dojump.c: Include stor-layout.h.
      	* dse.c: Include stor-layout.h.
      	* dwarf2asm.c: Include stringpool.h.
      	Include varasm.h.
      	* dwarf2cfi.c: Include stor-layout.h.
      	* dwarf2out.c: Include rtl.h.
      	Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include function.h.
      	Include emit-rtl.h.
      	Move inclusion of rtl.h earlier in the file.
      	* emit-rtl.c: Include varasm.h.
      	* except.c: Include stringpool.h.
      	Include stor-layout.h.
      	* explow.c: Include stor-layout.h.
      	* expmed.c: Include stor-layout.h.
      	* expr.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include attribs.h.
      	Include varasm.h.
      	* final.c: Include varasm.h.
      	* fold-const.c: Include stor-layout.h.
      	Include calls.h.
      	Include tree-iterator.h.
      	* function.c: Include stor-layout.h.
      	Include varasm.h.
      	Include stringpool.h.
      	* genattrtab.c (write_header): Emit includes for varasm.h,
      	stor-layout.h and calls.h.
      	* genautomata.c (main): Likewise.
      	* genemit.c: Likewise.
      	* genopinit.c: Likewise.
      	* genoutput.c (output_prologue): Likewise.
      	* genpeep.c: Likewise.
      	* genpreds.c (write_insn_preds_c): Likewise.
      	* gengtype.c (open_base_files): Add stringpool.h.
      	* gimple-expr.c: Include stringpool.h.
      	Include stor-layout.h.
      	* gimple-fold.c: Include stringpool.h.
      	Include expr.h.
      	Include stmt.h.
      	Include stor-layout.h.
      	* gimple-low.c: Include tree-nested.h.
      	Include calls.h.
      	* gimple-pretty-print.c: Include stringpool.h.
      	* gimple-ssa-strength-reduction.c: Include stor-layout.h.
      	Include expr.h.
      	* gimple-walk.c: Include stmt.h.
      	* gimple.c: Include calls.h.
      	Include stmt.h.
      	Include stor-layout.h.
      	* gimplify.c: Include stringpool.h.
      	Include calls.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	Include stmt.h.
      	Include print-tree.h.
      	Include expr.h.
      	* gimplify-me.c: Include stmt.h
      	Include stor-layout.h
      	* internal-fn.c: Include stor-layout.h.
      	* ipa-devirt.c: Include print-tree.h.
      	Include calls.h.
      	* ipa-inline-analysis.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include print-tree.h.
      	* ipa-inline.c: Include trans-mem.h.
      	Include calls.h.
      	* ipa-prop.c: Include expr.h.
      	Include stor-layout.h.
      	Include print-tree.h.
      	* ipa-pure-const.c: Include print-tree.h.
      	Include calls.h.
      	* ipa-reference.c: Include calls.h.
      	* ipa-split.c: Include stringpool.h.
      	Include expr.h.
      	Include calls.h.
      	* ipa.c: Include calls.h.
      	Include stringpool.h.
      	* langhooks.c: Include stringpool.h.
      	Include attribs.h.
      	* lto-cgraph.c: Include stringpool.h.
      	* lto-streamer-in.c: Include stringpool.h.
      	* lto-streamer-out.c: Include stor-layout.h.
      	Include stringpool.h.
      	* omp-low.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include expr.h.
      	* optabs.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	* passes.c: Include varasm.h.
      	* predict.c: Include calls.h.
      	* print-rtl.c: Include print-tree.h.
      	* print-tree.c: Include varasm.h.
      	Include print-rtl.h.
      	Include stor-layout.h.
      	* realmpfr.c: Include stor-layout.h.
      	* reg-stack.c: Include varasm.h.
      	* sdbout.c: Include varasm.h.
      	Include stor-layout.h.
      	* simplify-rtx.c: Include varasm.h.
      	* stmt.c: Include varasm.h.
      	Include stor-layout.h.
      	* stor-layout.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	Include print-tree.h.
      	* symtab.c: Include rtl.h.
      	Include print-tree.h.
      	Include varasm.h.
      	Include function.h.
      	Include emit-rtl.h.
      	* targhooks.c: Include stor-layout.h.
      	Include varasm.h.
      	* toplev.c: Include varasm.h.
      	Include tree-inline.h.
      	* trans-mem.c: Include calls.h.
      	Include function.h.
      	Include rtl.h.
      	Include emit-rtl.h.
      	* tree-affine.c: Include expr.h.
      	* tree-browser.c: Include print-tree.h.
      	* tree-call-cdce.c: Include stor-layout.h.
      	* tree-cfg.c: Include trans-mem.h.
      	Include stor-layout.h.
      	Include print-tree.h.
      	* tree-complex.c: Include stor-layout.h.
      	* tree-data-ref.c: Include expr.h.
      	* tree-dfa.c: Include stor-layout.h.
      	* tree-eh.c: Include expr.h.
      	Include calls.h.
      	* tree-emutls.c: Include stor-layout.h.
      	Include varasm.h.
      	* tree-if-conv.c: Include stor-layout.h.
      	* tree-inline.c: Include stor-layout.h.
      	Include calls.h.
      	* tree-loop-distribution.c: Include stor-layout.h.
      	* tree-nested.c: Include stringpool.h.
      	Include stor-layout.h.
      	* tree-object-size.c: Include tree-object-size.h.
      	* tree-outof-ssa.c: Include stor-layout.h.
      	* tree-parloops.c: Include stor-layout.h.
      	Include tree-nested.h.
      	* tree-pretty-print.c: Include stor-layout.h.
      	Include expr.h.
      	* tree-profile.c: Include varasm.h.
      	Include tree-nested.h.
      	* tree-scalar-evolution.c: Include expr.h.
      	* tree-sra.c: Include stor-layout.h.
      	* tree-ssa-address.c: Include stor-layout.h.
      	* tree-ssa-ccp.c: Include stor-layout.h.
      	* tree-ssa-dce.c: Include calls.h.
      	* tree-ssa-dom.c: Include stor-layout.h.
      	* tree-ssa-forwprop.c: Include stor-layout.h.
      	* tree-ssa-ifcombine.c: Include stor-layout.h.
      	* tree-ssa-loop-ivopts.c: Include stor-layout.h.
      	* tree-ssa-loop-niter.c: Include calls.h.
      	Include expr.h.
      	* tree-ssa-loop-prefetch.c: Include stor-layout.h.
      	* tree-ssa-math-opts.c: Include stor-layout.h.
      	* tree-ssa-operands.c: Include stmt.h.
      	Include print-tree.h.
      	* tree-ssa-phiopt.c: Include stor-layout.h.
      	* tree-ssa-reassoc.c: Include stor-layout.h.
      	* tree-ssa-sccvn.c: Include stor-layout.h.
      	* tree-ssa-sink.c: Include stor-layout.h.
      	* tree-ssa-strlen.c: Include stor-layout.h.
      	* tree-ssa-structalias.c: Include stor-layout.h.
      	Include stmt.h.
      	* tree-ssa-tail-merge.c: Include stor-layout.h.
      	Include trans-mem.h.
      	* tree-ssa-uncprop.c: Include stor-layout.h.
      	* tree-ssa.c: Include stor-layout.h.
      	* tree-ssanames.c: Include stor-layout.h.
      	* tree-streamer-in.c: Include stringpool.h.
      	* tree-streamer-out.c: Include stor-layout.h.
      	* tree-switch-conversion.c: Include varasm.h.
      	Include stor-layout.h.
      	* tree-tailcall.c: Include stor-layout.h.
      	* tree-vect-data-refs.c: Include stor-layout.h.
      	* tree-vect-generic.c: Include stor-layout.h.
      	* tree-vect-loop.c: Include stor-layout.h.
      	* tree-vect-patterns.c: Include stor-layout.h.
      	* tree-vect-slp.c: Include stor-layout.h.
      	* tree-vect-stmts.c: Include stor-layout.h.
      	* tree-vectorizer.c: Include stor-layout.h.
      	* tree-vrp.c: Include stor-layout.h.
      	Include calls.h.
      	* tree.c: Include stor-layout.h.
      	Include calls.h.
      	Include attribs.h.
      	Include varasm.h.
      	* tsan.c: Include expr.h.
      	* ubsan.c: Include stor-layout.h.
      	Include stringpool.h.
      	* value-prof.c: Include tree-nested.h.
      	Include calls.h.
      	* var-tracking.c: Include varasm.h.
      	Include stor-layout.h.
      	* varasm.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include gcc-symtab.h.
      	Include varasm.h.
      	* varpool.c: Include varasm.h.
      	* vmsdbgout.c: Include varasm.h.
      	* xcoffout.c: Include varasm.h.
      
      ada/ChangeLog
      
      	* gcc-interface/decl.c: Include stringpool.h
      	Include stor-layout.h
      	* gcc-interface/misc.c: Include stor-layout.h
      	Include print-tree.h
      	* gcc-interface/trans.c: Include stringpool.h
      	Include stor-layout.h
      	Include stmt.h
      	Include varasm.h
      	* gcc-interface/utils.c: Include stringpool.h
      	Include stor-layout.h
      	Include attribs.h
      	Include varasm.h
      	* gcc-interface/utils2.c: Include stringpool.h
      	Include stor-layout.h
      	Include attribs.h
      	Include varasm.h
      
      c-family/ChangeLog
      
      	* c-common.c: Include fold-const.h.
      	Include stor-layout.h.
      	Include calls.h.
      	Include stringpool.h.
      	Include attribs.h.
      	Include varasm.h.
      	Include trans-mem.h.
      	* c-cppbuiltin.c: Include stor-layout.h.
      	Include stringpool.h.
      	* c-format.c: Include stringpool.h.
      	* c-lex.c: Include stringpool.h.
      	Include stor-layout.h.
      	* c-pragma.c: Include stringpool.h.
      	Include attribs.h.
      	Include varasm.h.
      	Include gcc-symtab.h.
      	* c-pretty-print.c: Include stor-layout.h.
      	Include attribs.h.
      	* cilk.c: Include stringpool.h.
      	Include calls.h.
      
      c/ChangeLog
      
      	* c-decl.c: Include print-tree.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include stringpool.h.
      	* c-lang.c: Include fold-const.h.
      	* c-parser.c: Include stringpool.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include trans-mem.h.
      	* c-typeck.c: Include stor-layout.h.
      	Include trans-mem.h.
      	Include varasm.h.
      	Include stmt.h.
      
      cp/ChangeLog
      
      	* call.c: Include stor-layout.h.
      	Include trans-mem.h.
      	Include stringpool.h.
      	* class.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include attribs.h.
      	* cp-gimplify.c: Include stor-layout.h.
      	* cvt.c: Include stor-layout.h.
      	* decl.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include calls.h.
      	* decl2.c: Include stringpool.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	Include calls.h.
      	* error.c: Include stringpool.h.
      	* except.c: Include stringpool.h.
      	Include trans-mem.h.
      	Include attribs.h.
      	* init.c: Include stringpool.h.
      	Include varasm.h.
      	* lambda.c: Include stringpool.h.
      	* lex.c: Include stringpool.h.
      	* mangle.c: Include stor-layout.h.
      	Include stringpool.h.
      	* method.c: Include stringpool.h.
      	Include varasm.h.
      	* name-lookup.c: Include stringpool.h.
      	Include print-tree.h.
      	Include attribs.h.
      	* optimize.c: Include stringpool.h.
      	* parser.c: Include print-tree.h.
      	Include stringpool.h.
      	Include attribs.h.
      	Include trans-mem.h.
      	* pt.c: Include stringpool.h.
      	Include varasm.h.
      	Include attribs.h.
      	Include stor-layout.h.
      	* ptree.c: Include print-tree.h.
      	* repo.c: Include stringpool.h.
      	* rtti.c: Include stringpool.h.
      	Include stor-layout.h.
      	* semantics.c: Include stmt.h.
      	Include varasm.h.
      	Include stor-layout.h.
      	Include stringpool.h.
      	* tree.c: Include stor-layout.h.
      	Include print-tree.h.
      	Include tree-iterator.h.
      	* typeck.c: Include stor-layout.h.
      	Include varasm.h.
      	* typeck2.c: Include stor-layout.h.
      	Include varasm.h.
      	* vtable-class-hierarchy.c: Include stringpool.h.
      	Include stor-layout.h.
      
      fortran/ChangeLog
      
      	* decl.c: Include stringpool.h.
      	* iresolve.c: Include stringpool.h.
      	* match.c: Include stringpool.h.
      	* module.c: Include stringpool.h.
      	* target-memory.c: Include stor-layout.h.
      	* trans-common.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* trans-const.c: Include stor-layout.h.
      	* trans-decl.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	Include attribs.h.
      	* trans-expr.c: Include stringpool.h.
      	* trans-intrinsic.c: Include stringpool.h.
      	Include tree-nested.h.
      	Include stor-layout.h.
      	* trans-io.c: Include stringpool.h.
      	Include stor-layout.h.
      	* trans-openmp.c: Include stringpool.h.
      	* trans-stmt.c: Include stringpool.h.
      	* trans-types.c: Include stor-layout.h.
      	Include stringpool.h.
      	* trans.c: Include stringpool.h.
      
      go/ChangeLog
      
      	* go-backend.c: Include stor-layout.h.
      	* go-gcc.cc: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* go-lang.c: Include stor-layout.h.
      
      java/ChangeLog
      
      	* builtins.c: Include stor-layout.h.
      	Include stringpool.h.
      	* class.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include varasm.h.
      	* constants.c: Include stringpool.h.
      	Include stor-layout.h.
      	* decl.c: Include stor-layout.h.
      	Include stringpool.h.
      	Include varasm.h.
      	* except.c: Include stringpool.h.
      	Include stor-layout.h.
      	* expr.c: Include stringpool.h.
      	Include stor-layout.h.
      	* jcf-parse.c: Include stringpool.h.
      	* mangle.c: Include stringpool.h.
      	* resource.c: Include stringpool.h.
      	Include stor-layout.h.
      	* typeck.c: Include stor-layout.h.
      	Include stringpool.h.
      	* verify-glue.c: Include stringpool.h.
      
      lto/ChangeLog
      	* lto-lang.c: Include stringpool.h.
      	Include stor-layout.h.
      	* lto-partition.c: Include gcc-symtab.h.
      	* lto.c: Include stor-layout.h.
      
      objc/ChangeLog
      	* objc-act.c: Include stringpool.h.
      	Include stor-layout.h.
      	Include attribs.h.
      	* objc-encoding.c: Include stringpool.h.
      	Include stor-layout.h.
      	* objc-gnu-runtime-abi-01.c: Include stringpool.h.
      	* objc-next-runtime-abi-01.c:
      	Include stringpool.h.
      	* objc-next-runtime-abi-02.c: Include stringpool.h.
      	* objc-runtime-shared-support.c: Include stringpool.h.
      
      testsuite/ChangeLog
      
      	* gcc.dg/plugin/selfassign.c: Include stringpool.h.
      	* gcc.dg/plugin/start_unit_plugin.c: Likewise.
      
      From-SVN: r205023
      Diego Novillo committed
    • md.texi (setmem): Document new parameter. · 82bb7d4e
      	* md.texi (setmem): Document new parameter.
      	* optabs.c (maybe_gen_insn): Support 9 operands.
      	* builtins.c (determine_block_size): Add probable_max_size;
      	support anti-ranges.
      	(expand_builtin_memcpy. expand_builtin_memset_args): Pass around
      	probable_max_size.
      	* expr.c (emit_block_move_via_movmem, emit_block_move_hints,
      	emit_block_move, clear_storage_hints, set_storage_via_setmem):
      	Likewise.
      	* expr.h (emit_block_move_hints, clear_storage_hints,
      	set_storage_via_setmem): Update prototype.
      	* i386.md (setmem, movmem patterns): Add 9th operand.
      	* i386-protos.h (ix86_expand_set_or_movmem): Update prototype.
      	* i386.c (ix86_expand_set_or_movmem): Take probable_max_size_exp
      	argument; pass it to decide_alg.
      
      	* gcc.target/i386/memcpy-3.c: New testcase.
      
      From-SVN: r204997
      Jan Hubicka committed
  3. 18 Nov, 2013 4 commits
    • cuintp.c (UI_From_gnu): Use tree_to_shwi rather than tree_low_cst. · 386b1f1f
      gcc/ada/
      	* gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi rather than
      	tree_low_cst.
      
      gcc/c-family/
      	* c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
      	tree_low_cst.
      	(complete_array_type): Update comment to refer to tree_to_[su]hwi
      	rather than tree_low_cst.
      
      gcc/c/
      	* c-decl.c (grokdeclarator): Update comment to refer to
      	tree_to_[su]hwi rather than tree_low_cst.
      
      gcc/cp/
      	* decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
      	tree_low_cst.
      	(grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
      	than tree_low_cst.
      
      gcc/
      	* expr.h: Update comments to refer to tree_to_[su]hwi rather
      	than tree_low_cst.
      	* fold-const.c (fold_binary_loc): Likewise.
      	* expr.c (store_constructor): Use tree_to_uhwi rather than
      	tree_low_cst.
      	* ipa-utils.h (possible_polymorphic_call_target_p): Likewise.
      	* stmt.c (emit_case_dispatch_table): Likewise.
      	* tree-switch-conversion.c (emit_case_bit_tests): Likewise.
      
      From-SVN: r204962
      Richard Sandiford committed
    • c-common.c, [...]: Replace tree_low_cst (..., 0) with tree_to_shwi throughout. · 9439e9a1
      gcc/c-family/
      	* c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
      	tree_low_cst (..., 0) with tree_to_shwi throughout.
      
      gcc/c/
      	* c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
      	throughout.
      
      gcc/cp/
      	* class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
      	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
      
      gcc/go/
      	* gofrontend/expressions.cc: Replace tree_low_cst (..., 0) with
      	tree_to_shwi throughout.
      
      gcc/java/
      	* class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
      	throughout.
      
      gcc/objc/
      	* objc-next-runtime-abi-02.c: Replace tree_low_cst (..., 0) with
      	tree_to_shwi throughout.
      
      gcc/
      	* builtins.c, cilk-common.c, config/aarch64/aarch64.c,
      	config/alpha/alpha.c, config/arm/arm.c, config/c6x/predicates.md,
      	config/i386/i386.c, config/ia64/predicates.md, config/s390/s390.c,
      	coverage.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c, expr.h,
      	fold-const.c, gimple-fold.c, godump.c, ipa-prop.c, omp-low.c,
      	predict.c, rtlanal.c, sdbout.c, stmt.c, stor-layout.c, targhooks.c,
      	tree-cfg.c, tree-data-ref.c, tree-inline.c, tree-ssa-forwprop.c,
      	tree-ssa-loop-prefetch.c, tree-ssa-phiopt.c, tree-ssa-sccvn.c,
      	tree-ssa-strlen.c, tree-stdarg.c, tree-vect-data-refs.c,
      	tree-vect-patterns.c, tree.c, tree.h, var-tracking.c, varasm.c:
      	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
      
      From-SVN: r204959
      Richard Sandiford committed
    • cuintp.c: Update comments to refer to tree_fits_shwi_p rather than host_integerp. · 5a36c51b
      gcc/ada/
      	* gcc-interface/cuintp.c: Update comments to refer to
      	tree_fits_shwi_p rather than host_integerp.
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_fits_uhwi_p
      	rather than host_integerp.
      	* gcc-interface/utils.c (rest_of_record_type_compilation): Likewise.
      
      gcc/
      	* expr.h: Update comments to refer to tree_fits_[su]hwi_p rather
      	than host_integerp.
      
      From-SVN: r204957
      Richard Sandiford committed
    • cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. · 9541ffee
      gcc/ada/
      	* gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
      	tree_fits_shwi_p throughout.
      
      gcc/c-family/
      	* c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
      	host_integerp (..., 0) with tree_fits_shwi_p throughout.
      
      gcc/c/
      	* c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
      	throughout.
      
      gcc/cp/
      	* error.c, init.c, parser.c, semantics.c: Replace
      	host_integerp (..., 0) with tree_fits_shwi_p throughout.
      
      gcc/go/
      	* gofrontend/expressions.cc: Replace host_integerp (..., 0) with
      	tree_fits_shwi_p throughout.
      
      gcc/java/
      	* class.c, expr.c: Replace host_integerp (..., 0) with
      	tree_fits_shwi_p throughout.
      
      gcc/
      	* builtins.c, config/alpha/alpha.c, config/c6x/predicates.md,
      	config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c,
      	config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c,
      	expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c,
      	gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c,
      	omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c,
      	stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c,
      	tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c,
      	tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c,
      	tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
      	tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c,
      	tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c,
      	varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
      	throughout.
      
      From-SVN: r204955
      Richard Sandiford committed
  4. 17 Nov, 2013 1 commit
    • md.texi (setmem, movstr): Update documentation. · 3918b108
      	* doc/md.texi (setmem, movstr): Update documentation.
      	* builtins.c (determine_block_size): New function.
      	(expand_builtin_memcpy): Use it and pass it to
      	emit_block_move_hints.
      	(expand_builtin_memset_args): Use it and pass it to
      	set_storage_via_setmem.
      	* expr.c (emit_block_move_via_movmem): Add min_size/max_size parameters;
      	update call to expander.
      	(emit_block_move_hints): Add min_size/max_size parameters.
      	(clear_storage_hints): Likewise.
      	(set_storage_via_setmem): Likewise.
      	(clear_storage): Update.
      	* expr.h (emit_block_move_hints, clear_storage_hints,
      	set_storage_via_setmem): Update prototype.
      	* i386.c (ix86_expand_set_or_movmem): Add bounds; export.
      	(ix86_expand_movmem, ix86_expand_setmem): Remove.
      	(ix86_expand_movmem, ix86_expand_setmem): Remove.
      	* i386.md (movmem, setmem): Pass parameters.
      	
      	* gcc.target/i386/memcpy-2.c: New testcase.
      
      From-SVN: r204926
      Jan Hubicka committed
  5. 14 Nov, 2013 1 commit
    • function.c (assign_parms): Use all.reg_parm_stack_space instead of re-evaluating… · 2e4ceca5
      function.c (assign_parms): Use all.reg_parm_stack_space instead of re-evaluating REG_PARM_STACK_SPACE...
      
      2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
      	    Alan Modra  <amodra@gmail.com>
      
      	* function.c (assign_parms): Use all.reg_parm_stack_space instead
      	of re-evaluating REG_PARM_STACK_SPACE target macro.
      	(locate_and_pad_parm): New parameter REG_PARM_STACK_SPACE.  Use it
      	instead of evaluating target macro REG_PARM_STACK_SPACE every time.
      	(assign_parm_find_entry_rtl): Update call.
      	* calls.c (initialize_argument_information): Update call.
      	(emit_library_call_value_1): Likewise.
      	* expr.h (locate_and_pad_parm): Update prototype.
      
      Co-Authored-By: Alan Modra <amodra@gmail.com>
      
      From-SVN: r204798
      Ulrich Weigand committed
  6. 29 Oct, 2013 2 commits
    • expr.h: Revert change and include tree-core.h. · bdaaa1f1
      	* expr.h: Revert change and include tree-core.h.
      	* rtl.h: Revert change and don't include tree-core.h.
      
      From-SVN: r204167
      Andrew MacLeod committed
    • tree-outof-ssa.h: Remove include files. · 8e9055ae
      	* tree-outof-ssa.h: Remove include files.
      	* tree-outof-ssa.c: Add required include files from tree-outof-ssa.h.
      	* expr.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* ipa-prop.h: Remove gimple.h and tree-core.h from include list.
      	* lto-streamer.h: Likewise.
      	* cgraphbuild.c: Add gimple.h to include list.
      	* data-streamer-in.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* lto-compress.c: Likewise.
      	* ipa-reference.c: Likewise.
      	* data-streamer-out.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* cgraphclones.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* data-streamer.c: Likewise.
      	* ipa-split.c: Likewise.
      	* lto-section-in.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* symtab.c: Likewise.
      	* opts-global.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer.c: Likewise.
      	* rtl.h: Add tree-core.h to include list.
      	* expr.h: Remove tree-core.h from include list.
      	* gimple.h: Likewise.
      	* ipa-utils.h: Likewise.
      	* streamer-hooks.h: Likewise.
      	* streamer-hooks.c: Include input.h.
      
      	* lto/lto-object.c: Add gimple.h to include list.
      	* lto/lto-partition.c: Likewise.
      
      From-SVN: r204158
      Andrew MacLeod committed
  7. 21 Oct, 2013 1 commit
    • Re-factor inclusion of tree.h. · 4d648807
      This moves tree.h out of every header. This exposes dependencies of
      tree.h in files that should probably not need it after tree and gimple
      are separated.
      
      After this change, no header should include tree.h directly. It should
      only be included by a .c file. Unfortunately, I did not find an
      automatic way of forcing this.
      
      Tested on x86_64 with all languages enabled and using
      contrib/config-list.mk.
      
      2013-10-21  Diego Novillo  <dnovillo@google.com>
      
      	* asan.c: Include tree.h
      	* bb-reorder.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* data-streamer-in.c: Likewise.
      	* data-streamer-out.c: Likewise.
      	* data-streamer.c: Likewise.
      	* dwarf2cfi.c: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-optimize-isl.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* ipa-devirt.c: Likewise.
      	* ipa-profile.c: Likewise.
      	* ipa.c: Likewise.
      	* ira.c: Likewise.
      	* loop-init.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lto/lto-object.c: Likewise.
      	* recog.c: Likewise.
      	* reginfo.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* value-prof.c: Likewise.
      	* target-globals.c: Likewise.
      	* expr.h: Include tree-core.h instead of tree.h.
      	* gimple.h: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-utils.h: Likewise.
      	* lto-streamer.h: Likewise.
      	* streamer-hooks.h: Likewise.
      	* ipa-reference.h: Include cgraph.h instead of tree.h.
      	* cgraph.h: Include basic-block.h instead of tree.h.
      	* tree-streamer.h: Do not include tree.h.
      	* genattrtab.c (write_header): Generate inclusion of
      	tree.h.
      	* genautomata.c (main): Likewise.
      	* genemit.c: Likewise.
      	* genopinit.c: Likewise.
      	* genoutput.c (output_prologue): Likewise.
      	* genpeep.c: Likewise.
      
      testsuite/ChangeLog
      
      	* g++.dg/plugin/selfassign.c: Include tree.h.
      	* gcc.dg/plugin/finish_unit_plugin.c: Likewise.
      	* gcc.dg/plugin/ggcplug.c: Likewise.
      	* gcc.dg/plugin/one_time_plugin.c: Likewise.
      	* gcc.dg/plugin/selfassign.c: Likewise.
      	* gcc.dg/plugin/start_unit_plugin.c: Likewise.
      
      From-SVN: r203908
      Diego Novillo committed
  8. 28 Sep, 2013 1 commit
    • expr.h (extract_bit_field): Remove packedp parameter. · c6285bd7
      2013-09-28  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* expr.h (extract_bit_field): Remove packedp parameter.
      	* expmed.c (extract_fixed_bit_field): Remove packedp parameter
      	from forward declaration.
      	(store_split_bit_field): Remove packedp arg from calls to
      	extract_fixed_bit_field.
      	(extract_bit_field_1): Remove packedp parameter and packedp
      	argument from recursive calls and calls to extract_fixed_bit_field.
      	(extract_bit_field): Remove packedp parameter and corresponding
      	arg to extract_bit_field_1.
      	(extract_fixed_bit_field): Remove packedp parameter.  Remove code
      	to issue warnings.
      	(extract_split_bit_field): Remove packedp arg from call to
      	extract_fixed_bit_field.
      	* expr.c (emit_group_load_1): Adjust calls to extract_bit_field.
      	(copy_blkmode_from_reg): Likewise.
      	(copy_blkmode_to_reg): Likewise.
      	(read_complex_part): Likewise.
      	(store_field): Likewise.
      	(expand_expr_real_1): Likewise.
      	* calls.c (store_unaligned_arguments_into_pseudos): Adjust call
      	to extract_bit_field.
      	* config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Adjust
      	call to extract_bit_field.
      	* config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Adjust
      	call to extract_bit_field.
      	* doc/invoke.texi (Code Gen Options): Remove mention of warnings
      	and special packedp behavior from -fstrict-volatile-bitfields
      	documentation.
      
      From-SVN: r203003
      Sandra Loosemore committed
  9. 19 Feb, 2013 1 commit
    • re PR target/52555 (ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))) · 135204dd
      	PR target/52555
      	* genopinit.c (raw_optab_handler): Use this_fn_optabs.
      	(swap_optab_enable): Same.
      	(init_all_optabs): Use argument instead of global.
      	* tree.h (struct tree_optimization_option): New field
      	target_optabs.
      	* expr.h (init_all_optabs): Add argument to prototype.
      	(TREE_OPTIMIZATION_OPTABS): New.
      	(save_optabs_if_changed): Protoize.
      	* optabs.h: Declare this_fn_optabs.
      	* optabs.c (save_optabs_if_changed): New.
      	Declare this_fn_optabs.
      	(init_optabs): Add argument to init_all_optabs() call.
      	* function.c (invoke_set_current_function_hook): Handle per
      	function optabs.
      	* function.h (struct function): New field optabs.
      	* config/mips/mips.c (mips_set_mips16_mode): Handle when
      	optimization_current_node has changed.
      	* target-globals.h (save_target_globals_default_opts): Protoize.
      	* target-globals.c (save_target_globals_default_opts): New.
      c-family/
      	* c-common.c (handle_optimize_attribute): Call
      	save_optabs_if_changed.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r196129
      Aldy Hernandez committed
  10. 10 Jan, 2013 1 commit
  11. 09 Jan, 2013 1 commit
  12. 18 Nov, 2012 3 commits
    • Makefile.in (recog.o): Add insn-codes.h. · fcdd52b7
      gcc/
      	* Makefile.in (recog.o): Add insn-codes.h.
      	* expr.h (extraction_pattern): Move to optabs.h.
      	(mode_for_extraction): Delete.
      	* optabs.h (extraction_insn): New structure.
      	(extraction_pattern): Moved from expr.h.
      	(get_best_reg_extraction_insn, get_best_mem_extraction_insn): Declare.
      	* optabs.c (HAVE_insv, CODE_FOR_insv, HAVE_extv, CODE_FOR_extv)
      	(HAVE_extzv, CODE_FOR_extzv): Provide defaults.
      	(extraction_type): New enum.
      	(get_traditional_extraction_insn, get_extraction_insn)
      	(get_best_reg_extraction_insn, get_best_mem_extraction_insn):
      	New functions.
      	* combine.c (make_extraction): Use get_best_reg_extraction_insn
      	instead of mode_for_extraction.
      	* expmed.c (HAVE_insv, CODE_FOR_insv, gen_insv, HAVE_extv)
      	(CODE_FOR_extv, gen_extv, HAVE_extzv, CODE_FOR_extzv, gen_extzv):
      	Remove fallback definitions.
      	(mode_for_extraction): Delete.
      	(adjust_bit_field_mem_for_reg): New function.
      	(store_bit_field_using_insv): Replace OP_MODE parameter with
      	an extraction_insn.  Pass struct_mode to narrow_bit_field_mem.
      	(extract_bit_field_using_extv): Likewise EXT_MODE.
      	(store_bit_field_1): Use get_best_reg_extraction_insn and
      	get_best_mem_extraction_insn instead of mode_for_extraction.
      	Use adjust_bit_field_mem_for_reg when forcing memory to a
      	register and doing a register insertion.  Update calls to
      	store_bit_field_using_insv.
      	(extract_bit_field_1): Likewise extractions and calls to
      	extract_bit_field_using_extv.
      	(store_Bit_field): When narrowing to a bitregion, don't use the
      	insv mode as a limit.
      	* recog.c: (HAVE_extv, CODE_FOR_extv, HAVE_extzv, CODE_FOR_extzv):
      	Provide defaults.
      	(simplify_while_replacing): Use insn_data instead of
      	mode_for_extraction.
      
      From-SVN: r193605
      Richard Sandiford committed
    • expr.h (adjust_address_1): Add a size parameter. · 5f2cbd0d
      gcc/
      	* expr.h (adjust_address_1): Add a size parameter.
      	(adjust_address, adjust_address_nv, adjust_bitfield_address)
      	(adjust_bitfield_address_nv): Adjust accordingly.
      	(adjust_bitfield_address_size): Define.
      	* emit-rtl.c (adjust_address_1): Add a size parameter.
      	Use it to set the size if MODE has no size.  Check whether
      	the size matches before returning the original memref.
      	Require the size to be known for adjust_object.
      	(adjust_automodify_address_1, widen_memory_access): Update calls
      	to adjust_address_1.
      
      From-SVN: r193601
      Richard Sandiford committed
    • This patch rewrites the old VEC macro-based interface into a new one based on… · 9771b263
      This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
      
      This patch rewrites the old VEC macro-based interface into a new one
      based on the template class 'vec'.  The user-visible changes are
      described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
      
      I have tested the patch pretty extensively:
      
      - Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
      - Bootstraps with --enable-checking=release
      - Bootstraps with --enable-checking=gc,gcac
      - Basic builds on all targets (using contrib/config-list.mk).
      
      We no longer access the vectors via VEC_* macros.  The pattern is
      "VEC_operation (T, A, V, args)" becomes "V.operation (args)".
      
      The only thing I could not do is create proper ctors and dtors for the
      vec class.  Since these vectors are stored in unions, we
      have to keep them as PODs (C++03 does not allow non-PODs in unions).
      
      This means that creation and destruction must be explicit.  There is a
      new method vec<type, allocation, layout>::create() and another vec<type,
      allocation, layout>::destroy() to allocate the internal vector.
      
      For vectors that must be pointers, there is a family of free functions
      that implement the operations that need to tolerate NULL vectors.
      These functions all start with the prefix 'vec_safe_'.  See the wiki
      page for details.
      
      The gengtype change removes the special handling for VEC() that used
      to exist in gengtype. Additionally, it allows gengtype to recognize
      templates of more than one argument and introduces the concept of an
      undefined type (useful for template arguments that may or may not be
      types).
      
      When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
      happens inside a type marked with GTY((user)).  Otherwise, it will
      emit an error.
      
      Finally, gengtype rejects root types marked GTY((user)) that are not
      first class pointers.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* vec.c (register_overhead): Convert it into
      	member function of vec_prefix.
      	(release_overhead): Likewise.
      	(calculate_allocation): Likewise.
      	(vec_heap_free): Remove.
      	(vec_gc_o_reserve_1): Remove.
      	(vec_heap_o_reserve_1): Remove.
      	(vec_stack_o_reserve_1): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(register_stack_vec): New.
      	(stack_vec_register_index): New.
      	(unregister_stack_vec): New.
      	(vec_assert_fail): Remove.
      	* vec.h: Conditionally include ggc.h.  Document conditional
      	hackery.
      	Update top-level documentation.
      	(ALONE_VEC_CHECK_INFO): Remove.
      	(VEC_CHECK_INFO): Remove.
      	(ALONE_VEC_CHECK_DECL): Remove.
      	(VEC_CHECK_DECL): Remove.
      	(ALONE_VEC_CHECK_PASS): Remove.
      	(VEC_CHECK_PASS): Remove.
      	(VEC_ASSERT): Remove.
      	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
      	va_stack.
      	Mark fields alloc_ and num_ as protected.
      	(struct vec_t): Remove.  Remove all function members.
      	(struct vl_embed): Declare.
      	(struct vl_ptr): Declare.
      	(free): Remove.
      	(reserve_exact): Remove.
      	(reserve): Remove.
      	(safe_splice): Remove.
      	(safe_push): Remove.
      	(safe_grow): Remove.
      	(safe_grow_cleared): Remove.
      	(safe_insert): Remove.
      	(DEF_VEC_I): Remove.
      	(DEF_VEC_ALLOC_I): Remove.
      	(DEF_VEC_P): Remove.
      	(DEF_VEC_ALLOC_P): Remove.
      	(DEF_VEC_O): Remove.
      	(DEF_VEC_ALLOC_O): Remove.
      	(DEF_VEC_ALLOC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_I_STACK): Remove.
      	(DEF_VEC_A): Remove.
      	(DEF_VEC_ALLOC_A): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(VEC_length): Remove.
      	(VEC_empty): Remove.
      	(VEC_address): Remove.
      	(vec_address): Remove.
      	(VEC_last): Remove.
      	(VEC_index): Remove.
      	(VEC_iterate): Remove.
      	(VEC_embedded_size): Remove.
      	(VEC_embedded_init): Remove.
      	(VEC_free): Remove.
      	(VEC_copy): Remove.
      	(VEC_space): Remove.
      	(VEC_reserve): Remove.
      	(VEC_reserve_exact): Remove.
      	(VEC_splice): Remove.
      	(VEC_safe_splice): Remove.
      	(VEC_quick_push): Remove.
      	(VEC_safe_push): Remove.
      	(VEC_pop): Remove.
      	(VEC_truncate): Remove.
      	(VEC_safe_grow): Remove.
      	(VEC_replace): Remove.
      	(VEC_quick_insert): Remove.
      	(VEC_safe_insert): Remove.
      	(VEC_ordered_remove): Remove.
      	(VEC_unordered_remove): Remove.
      	(VEC_block_remove): Remove.
      	(VEC_lower_bound): Remove.
      	(VEC_alloc): Remove.
      	(VEC_qsort): Remove.
      
      	(va_heap): Declare.
      	(va_heap::default_layout): New typedef to vl_ptr.
      	(va_heap::reserve): New.
      	(va_heap::release): New.
      	(va_gc): Declare.
      	(va_gc::default_layout): New typedef to vl_embed.
      	(va_gc::reserve): New.
      	(va_gc::release): New.
      	(va_gc_atomic): Declare.  Inherit from va_gc.
      	(va_stack): Declare.
      	(va_stack::default_layout): New typedef to vl_ptr.
      	(va_stack::alloc): New.
      	(va_stack::reserve): New.
      	(va_stack::release): New.
      	(register_stack_vec): Declare.
      	(stack_vec_register_index): Declare.
      	(unregister_stack_vec): Declare.
      
      	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
      	empty vec template.
      	(vec<T, A, vl_embed>): Partial specialization for embedded
      	layout.
      	(vec<T, A, vl_embed>::allocated): New.
      	(vec<T, A, vl_embed>::length): New.
      	(vec<T, A, vl_embed>::is_empty): New.
      	(vec<T, A, vl_embed>::address): New.
      	(vec<T, A, vl_embed>::operator[]): New.
      	(vec<T, A, vl_embed>::last New.
      	(vec<T, A, vl_embed>::space): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::copy): New.
      	(vec<T, A, vl_embed>::splice): New.
      	(vec<T, A, vl_embed>::quick_push New.
      	(vec<T, A, vl_embed>::pop New.
      	(vec<T, A, vl_embed>::truncate): New.
      	(vec<T, A, vl_embed>::quick_insert): New.
      	(vec<T, A, vl_embed>::ordered_remove): New.
      	(vec<T, A, vl_embed>::unordered_remove): New.
      	(vec<T, A, vl_embed>::block_remove): New.
      	(vec<T, A, vl_embed>::qsort): New.
      	(vec<T, A, vl_embed>::lower_bound): New.
      	(vec<T, A, vl_embed>::embedded_size): New.
      	(vec<T, A, vl_embed>::embedded_init): New.
      	(vec<T, A, vl_embed>::quick_grow): New.
      	(vec<T, A, vl_embed>::quick_grow_cleared): New.
      	(vec_safe_space): New.
      	(vec_safe_length): New.
      	(vec_safe_address): New.
      	(vec_safe_is_empty): New.
      	(vec_safe_reserve): New.
      	(vec_safe_reserve_exact): New.
      	(vec_alloc): New.
      	(vec_free): New.
      	(vec_safe_grow): New.
      	(vec_safe_grow_cleared): New.
      	(vec_safe_iterate): New.
      	(vec_safe_push): New.
      	(vec_safe_insert): New.
      	(vec_safe_truncate): New.
      	(vec_safe_copy): New.
      	(vec_safe_splice): New.
      
      	(vec<T, A, vl_ptr>): New partial specialization for the space
      	efficient layout.
      	(vec<T, A, vl_ptr>::exists): New.
      	(vec<T, A, vl_ptr>::is_empty): New.
      	(vec<T, A, vl_ptr>::length): New.
      	(vec<T, A, vl_ptr>::address): New.
      	(vec<T, A, vl_ptr>::operator[]): New.
      	(vec<T, A, vl_ptr>::operator!=): New.
      	(vec<T, A, vl_ptr>::operator==): New.
      	(vec<T, A, vl_ptr>::last): New.
      	(vec<T, A, vl_ptr>::space): New.
      	(vec<T, A, vl_ptr>::iterate): New.
      	(vec<T, A, vl_ptr>::copy): New.
      	(vec<T, A, vl_ptr>::reserve): New.
      	(vec<T, A, vl_ptr>::reserve_exact): New.
      	(vec<T, A, vl_ptr>::splice): New.
      	(vec<T, A, vl_ptr>::safe_splice): New.
      	(vec<T, A, vl_ptr>::quick_push): New.
      	(vec<T, A, vl_ptr>::safe_push): New.
      	(vec<T, A, vl_ptr>::pop): New.
      	(vec<T, A, vl_ptr>::truncate): New.
      	(vec<T, A, vl_ptr>::safe_grow): New.
      	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_grow): New.
      	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_insert): New.
      	(vec<T, A, vl_ptr>::safe_insert): New.
      	(vec<T, A, vl_ptr>::ordered_remove): New.
      	(vec<T, A, vl_ptr>::unordered_remove): New.
      	(vec<T, A, vl_ptr>::block_remove): New.
      	(vec<T, A, vl_ptr>::qsort): New.
      	(vec<T, A, vl_ptr>::lower_bound): New.
      	(vec_stack_alloc): Define.
      	(FOR_EACH_VEC_SAFE_ELT): Define.
      	* vecir.h: Remove.  Update all users.
      	* vecprim.h: Remove.  Update all users.
      	Move uchar to coretypes.h.
      
      	* Makefile.in (VEC_H): Add $(GGC_H).
      	Remove vecir.h and vecprim.h dependencies everywhere.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	* gengtype-lex.l (VEC): Remove.
      	Add characters in the set [\!\>\.-].
      	* gengtype-parse.c (token_names): Remove "VEC".
      	(require_template_declaration): Remove handling of VEC_TOKEN.
      	(type): Likewise.
      	Call create_user_defined_type when parsing GTY((user)).
      	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
      	(write_state_undefined_type): New.
      	(write_state_type): Call write_state_undefined_type for
      	TYPE_UNDEFINED.
      	(read_state_type): Call read_state_undefined_type for
      	TYPE_UNDEFINED.
      	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
      	(create_user_defined_type): Make extern.
      	(type_for_name): Factor out of resolve_typedef.
      	(create_undefined_type): New
      	(resolve_typedef): Call it when we cannot find a previous
      	typedef and the type is not a template.
      	(find_structure): Accept TYPE_UNDEFINED.
      	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
      	default to false.
      	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
      	ALLOWED_UNDEFINED_TYPES is set.
      	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
      	(filter_type_name): Accept templates with more than one
      	argument.
      	(output_mangled_typename): Handle TYPE_UNDEFINED
      	(walk_type): Likewise.
      	(write_types_process_field): Likewise.
      	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
      	should not be a user-defined type.
      	(write_types_local_user_process_field): Handle TYPE_ARRAY,
      	TYPE_NONE and TYPE_UNDEFINED.
      	(write_types_local_process_field): Likewise.
      	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
      	(write_root): Reject user-defined types that are not pointers.
      	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
      	and TYPE_PARAM_STRUCT.
      	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
      	TYPE_ARRAY.
      	(dump_typekind): Handle TYPE_UNDEFINED.
      	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
      	(create_user_defined_type): Declare.
      	(enum gty_token): Remove VEC_TOKEN.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* coretypes.h (uchar): Define.
      	* alias.c: Use new vec API in vec.h.
      	* asan.c: Likewise.
      	* attribs.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* builtins.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine.c: Likewise.
      	* compare-elim.c: Likewise.
      	* coverage.c: Likewise.
      	* cprop.c: Likewise.
      	* data-streamer.h: Likewise.
      	* dbxout.c: Likewise.
      	* dce.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* domwalk.h: Likewise.
      	* dse.c: Likewise.
      	* dwarf2cfi.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* dwarf2out.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* except.c: Likewise.
      	* except.h: Likewise.
      	* expr.c: Likewise.
      	* expr.h: Likewise.
      	* final.c: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* fwprop.c: Likewise.
      	* gcc.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* genattrtab.c: Likewise.
      	* genautomata.c: Likewise.
      	* genextract.c: Likewise.
      	* genopinit.c: Likewise
      	* ggc-common.c: Likewise.
      	* ggc.h: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimple-streamer-in.c: Likewise.
      	* gimple.c: Likewise.
      	* gimple.h: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* graphds.c: Likewise.
      	* graphds.h: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-optimize-isl.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-poly.h: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-scop-detection.h: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* godump.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* hw-doloop.c: Likewise.
      	* hw-doloop.h: Likewise.
      	* ifcvt.c: Likewise.
      	* insn-addr.h: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-inline.h: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-ref-inline.h: Likewise.
      	* ipa-ref.c: Likewise.
      	* ipa-ref.h: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-split.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa-utils.h: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-emit.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lra-lives.c: Likewise.
      	* lra.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.h: Likewise.
      	* lto-symtab.c: Likewise.
      	* mcf.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omp-low.c: Likewise.
      	* opts-common.c: Likewise.
      	* opts-global.c: Likewise.
      	* opts.c: Likewise.
      	* opts.h: Likewise.
      	* passes.c: Likewise.
      	* predict.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* profile.h: Likewise.
      	* read-rtl.c: Likewise.
      	* ree.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regrename.c: Likewise.
      	* regrename.h: Likewise.
      	* reload.c: Likewise.
      	* reload.h: Likewise.
      	* reload1.c: Likewise.
      	* rtl.h: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-int.h: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* sese.c: Likewise.
      	* sese.h: Likewise.
      	* statistics.h: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* tlink.c: Likewise.
      	* toplev.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-browser.c: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chrec.c: Likewise.
      	* tree-chrec.h: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-data-ref.h: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-diagnostic.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-flow.h: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-inline.h: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-iterator.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-sccvn.h: Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* tree-streamer.h: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-generic.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vectorizer.c: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* tree.h: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* vmsdbgout.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/spu/spu-c.c: Likewise.
      	* config/vms/vms.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/epiphany/resolve-sw-modes.c: Likewise.
      
      From-SVN: r193595
      Diego Novillo committed
  13. 20 Oct, 2012 1 commit
    • re PR middle-end/54315 (unnecessary copy of return value for union) · 929634d8
      	PR rtl-optimization/54315
      	* calls.c (expand_call): Don't deal specifically with BLKmode values
      	returned in naked registers.
      	* expr.h (copy_blkmode_from_reg): Adjust prototype.
      	* expr.c (copy_blkmode_from_reg): Rename first parameter into TARGET and
      	make it required.  Assert that SRCREG hasn't BLKmode.  Add a couple of 
      	short-circuits for common cases and be prepared for sub-word registers.
      	(expand_assignment): Call copy_blkmode_from_reg for BLKmode values
      	returned in naked registers.
      	(store_expr): Likewise.
      	(store_field): Likewise.
      
      From-SVN: r192641
      Eric Botcazou committed
  14. 16 Oct, 2012 1 commit
    • [multiple changes] · a4da41e1
      2012-10-15   Easwaran Raman  <eraman@google.com>
      
              * optabs.c (emit_cmp_and_jump_insn_1): Add a new parameter to
              specificy the probability of taking the jump.
              (emit_cmp_and_jump_insns): Likewise.
              (expand_compare_and_swap_loop): Make the jump predicted not taken.
              * dojump.c (do_compare_rtx_and_jump): Remove the code attaching
              REG_BR_PROB note and pass probability to emit_cmp_and_jump_insns.
              * cfgbuild.c (compute_outgoing_frequencies): Do not guess outgoing
              probabilities for branches with more than two successors.
              * expr.c (emit_block_move_via_loop): Predict the loop backedge loop
              to be highly taken.
              (try_casesi): Pass the probability of jumping to the default label.
              (try_tablejump): Likewise.
              (do_tablejump): Likewise.
              * expr.h (try_tablejump): Add a new parameter.
              (try_casesi): Likewise.
              (emit_cmp_and_jump_insns): Add probability as default parameter with a
              default value of -1.
              * except.c (sjlj_emit_function_enter): Pass probability to
              emit_cmp_and_jump_insns.
              * stmt.c (case_node): Add new fields PROB and SUBTREE_PROB.
              (do_jump_if_equal): Pass probability for REG_BR_PROB note.
              (add_case_node): Pass estimated probability of jumping to the case
              label.
              (emit_case_decision_tree): Pass default_prob to emit_case_nodes.
              (get_outgoing_edge_probs): New function.
              (conditional_probability): Likewise.
              (reset_out_edges_aux): Likewise.
              (compute_cases_per_edge): Likewise.
              (emit_case_dispatch_table): Update probabilities of edges coming out
              of the switch statement.
              (expand_case): Compute and propagate default edge probability to
              emit_case_dispatch_table.
              (expand_sjlj_dispatch_table): Update calls to add_case_node and
              emit_case_dispatch_table.
              (balance_case_nodes): Update subtree_prob values.
              (emit_case_nodes): Compute edge probabilities and add pass them to
              emit_cmp_and_jump_insns.
      
      testsuite/ChangeLog:
      2012-10-15   Easwaran Raman  <eraman@google.com> 
              * gcc.dg/tree-prof/switch-case-1.c: New test case.
              * gcc.dg/tree-prof/switch-case-2.c: New test case.
      
      From-SVN: r192488
      Easwaran Raman committed
  15. 14 Sep, 2012 1 commit
    • re PR rtl-optimization/44194 (struct returned by value generates useless stores) · 5ef0b50d
      	PR rtl-optimization/44194
      	* calls.c (expand_call): In the PARALLEL case, copy the return value
      	into pseudos instead of spilling it onto the stack.
      	* emit-rtl.c (adjust_address_1): Rename ADJUST into ADJUST_ADDRESS and
      	add new ADJUST_OBJECT parameter.
      	If ADJUST_OBJECT is set, drop the underlying object if it cannot be
      	proved that the adjusted memory access is still within its bounds.
      	(adjust_automodify_address_1): Adjust call to adjust_address_1.
      	(widen_memory_access): Likewise.
      	* expmed.c (store_bit_field_1): Call adjust_bitfield_address instead
      	of adjust_address.  Do not drop the underlying object of a MEM.
      	(store_fixed_bit_field): Likewise.
      	(extract_bit_field_1): Likewise.  Fix oversight in recursion.
      	(extract_fixed_bit_field): Likewise.
      	* expr.h (adjust_address_1): Adjust prototype.
      	(adjust_address): Adjust call to adjust_address_1.
      	(adjust_address_nv): Likewise.
      	(adjust_bitfield_address): New macro.
      	(adjust_bitfield_address_nv): Likewise.
      	* expr.c (expand_assignment): Handle a PARALLEL in more cases.
      	(store_expr): Likewise.
      	(store_field): Likewise.
      
      	* dse.c: Fix typos in the head comment.
      
      From-SVN: r191302
      Eric Botcazou committed
  16. 11 Sep, 2012 1 commit
    • tree.h (expand_case): Move prototype ... · 9a1b6b7a
      	* tree.h (expand_case): Move prototype ...
      	* expr.h (expand_case): ...here.
      	(expand_sjlj_dispatch_table): New prototype.
      	* stmt.c: Include pointer-set.h instead of bitmap.h.
      	(expand_case): Use a pointer set instead of a bitmap for
      	already-seen labels.  Fold label values here.
      	(add_case_node): Don't fold label values here.
      	(expand_sjlj_dispatch_table): New function.
      	* except.c (sjlj_emit_dispatch_table): Use it.
      
      From-SVN: r191203
      Steven Bosscher committed
  17. 11 Jul, 2012 1 commit
    • expr.h (can_move_by_pieces): Move prototype from here ... · 6bdf3519
      gcc/
      	* expr.h (can_move_by_pieces): Move prototype from here ...
      	* tree.h (can_move_by_pieces): ... to here.
      	* optabs.h (set_widening_optab_handler): Use XCNEW.
      	* gimplify.c: Do not include expr.h.
      
      	* toplev.c: Do not include dwarf2out.h.
      	* config/ia64/ia64.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/sparc/t-sparc (sparc.o): Fix dependencies.
      
      	* Makefile.in (toplev.o): Fix dependencies
      	(c-family/c-gimplify.o): Likewise.
      	(c-family/c-common.o): Likewise.
      
      c-family/
      	* c-gimplify.c: Do not include basic-block.h.
      	* c-common.c: Do not include linfuncs.h.
      
      cp/
      	* method.c: Do not include tree-pass.h.
      
      fortran/
      	* trans.c: Do not include defaults.h.
      	* trans-intrinsic.c: Likewise.
      
      java/
      	* decl.c: Do not include libfuncs.h.
      	* class.c: Do not include defaults.h.
      	* jvgenmain.c: Likewise.
      	* magnle.c: Likewise.
      	* Make-lang.in (decl.o): Fix dependencies.
      
      From-SVN: r189425
      Steven Bosscher committed
  18. 15 Jun, 2012 1 commit
    • re PR tree-optimization/51581 (Integer division by constant is not vectorized) · 079c527f
      	PR tree-optimization/51581
      	* expr.h (choose_multiplier): New prototype.
      	* expmed.c (choose_multiplier): No longer static.
      	Change multiplier_ptr from rtx * to UHWI *.
      	(expand_divmod): Adjust callers.
      	* tree-vect-patterns.c (vect_recog_sdivmod_pow2_pattern):
      	Renamed to...
      	(vect_recog_divmod_pattern): ... this.  Pass bb_vinfo as last
      	argument to new_stmt_vec_info.  Attempt to optimize also divisions
      	by non-pow2 constants if integer vector division isn't supported.
      	* tree-vect-stmts.c (vect_analyze_stmt): If node != NULL,
      	don't look at pattern stmts and sequences.
      
      	* gcc.c-torture/execute/pr51581-1.c: New test.
      	* gcc.c-torture/execute/pr51581-2.c: New test.
      	* gcc.dg/vect/pr51581-1.c: New test.
      	* gcc.dg/vect/pr51581-2.c: New test.
      	* gcc.dg/vect/pr51581-3.c: New test.
      	* gcc.target/i386/avx-pr51581-1.c: New test.
      	* gcc.target/i386/avx-pr51581-2.c: New test.
      	* gcc.target/i386/avx2-pr51581-1.c: New test.
      	* gcc.target/i386/avx2-pr51581-2.c: New test.
      	* gcc.dg/vect/slp-26.c (main1): Divide by 0x8031 instead of 3.
      
      From-SVN: r188656
      Jakub Jelinek committed
  19. 02 Jan, 2012 1 commit
    • expr.h (move_by_pieces_ninsns): Declare. · 0d8f5d62
      gcc/
      	* expr.h (move_by_pieces_ninsns): Declare.
      	* expr.c (move_by_pieces_ninsns): Make external.
      	* config/mips/mips-protos.h (mips_move_by_pieces_p): Declare.
      	(mips_store_by_pieces_p): Likewise.
      	* config/mips/mips.h (MOVE_BY_PIECES_P): Call mips_move_by_pieces_p.
      	(STORE_BY_PIECES_P): Likewise mips_store_by_pieces_p.
      	* config/mips/mips.c (mips_move_by_pieces_p): New function.
      	(mips_store_by_pieces_p): Likewise.
      
      gcc/testsuite/
      	* gcc.dg/memcpy-4.c: Add nomips16 attribute for MIPS targets.
      	Increase copy to 5 bytes.  Look for at least two "mem/s/u"s,
      	rather than a specific number.
      
      From-SVN: r182801
      Richard Sandiford committed
  20. 24 Nov, 2011 1 commit
    • optab.c (maybe_emit_atomic_exchange): New. · 744accb2
      2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
      
      	* optab.c (maybe_emit_atomic_exchange): New.  Try to emit an
      	atomic_exchange pattern.
      	(maybe_emit_sync_lock_test_and_set): New.  Try to emit an exchange
      	using __sync_lock_test_and_set.
      	(maybe_emit_compare_and_swap_exchange_loop): New. Try to emit an
      	exchange using a compare_and_swap loop.
      	(expand_sync_lock_test_and_set): New.  Expand sync_lock_test_and_set.
      	(expand_atomic_test_and_set): New.  Expand test_and_set operation.
      	(expand_atomic_exchange): Use new maybe_emit_* functions.
      	(expand_atomic_store): Use new maybe_emit_* functions.
      	* builtins.c (expand_builtin_sync_lock_test_and_set): Call
      	expand_sync_lock_test_and_set routine.
      	(expand_builtin_atomic_exchange): Remove parameter from call.
      	(expand_builtin_atomic_clear): Use atomic_clear pattern if present.
      	(expand_builtin_atomic_test_and_set): Add target and simply call
      	expand_atomic_test_and_set.
      	(expand_builtin): Add target to expand_builtin_atomic_test_and_set.
      	* expr.h (expand_atomic_exchange): Add parameter.
      	(expand_sync_lock_test_and_set): New prototype.
      	(expand_atomic_test_and_set, expand_atomic_clear): New prototypes.
      
      From-SVN: r181702
      Andrew MacLeod committed
  21. 17 Nov, 2011 1 commit
    • Unify implementations of __builtin_mem_*_fence and __sync_synchronize. · c39169c8
      	* builtins.c (expand_builtin_mem_thread_fence): Remove.
      	(expand_builtin_mem_signal_fence): Remove.
      	(expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence.
      	(expand_builtin_sync_synchronize): Likewise.
      	(expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence.
      	* optabs.c (expand_asm_memory_barrier): Split out from
      	expand_builtin_mem_signal_fence.
      	(expand_mem_thread_fence): New, a combination of code from
      	expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize.
      	(expand_mem_signal_fence): Moved and renamed from
      	expand_builtin_mem_signal_fence.
      	(expand_atomic_exchange): Use expand_mem_thread_fence.
      	(expand_atomic_load, expand_atomic_store): Likewise.
      	* expr.h, optabs.h: Update decls.
      
      From-SVN: r181451
      Richard Henderson committed
  22. 07 Nov, 2011 1 commit
    • atomic_base.h (atomic_thread_fence): Call builtin. · 0669295b
      2011-11-07  Andrew MacLeod  <amacleod@redhat.com>
      
      	libstdc++-v3
      	* include/bits/atomic_base.h (atomic_thread_fence): Call builtin.
      	(atomic_signal_fence): Call builtin.
      	(atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree,
      	otherwise fall back to call __sync_lock_test_and_set.
      	(atomic_flag::clear): Call __atomic_store when it is lockfree,
      	otherwise fall back to call __sync_lock_release.
      
      	gcc
      	* doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and
      	__atomic_store.
      	* optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set
      	only when originated from that builtin.
      	(expand_atomic_store): Expand to __sync_lock_release when originated
      	from that builtin.
      	* builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that
      	expand_atomic_exchange call originated from here.
      	(expand_builtin_sync_lock_release): Add flag that expand_atomic_store
      	call originated from here.
      	(expand_builtin_atomic_exchange): Add origination flag.
      	(expand_builtin_atomic_store): Add origination flag.
      	* expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean 
      	parameters to indicate implementation fall back options.
      
      From-SVN: r181111
      Andrew MacLeod committed
  23. 06 Nov, 2011 1 commit
  24. 12 Oct, 2011 1 commit
    • expr.h (copy_blkmode_to_reg): Declare. · 2ba87a29
      gcc/
      	* expr.h (copy_blkmode_to_reg): Declare.
      	* expr.c (copy_blkmode_to_reg): New function.
      	(expand_assignment): Don't expand register RESULT_DECLs before
      	the lhs.  Use copy_blkmode_to_reg to copy BLKmode values into a
      	RESULT_DECL register.
      	(expand_expr_real_1): Handle BLKmode decls when looking for promotion.
      	* stmt.c (expand_return): Move BLKmode-to-register code into
      	copy_blkmode_to_reg.
      
      From-SVN: r179839
      Richard Sandiford committed
  25. 12 Sep, 2011 1 commit
    • re PR debug/50299 (entryval: bigendian 32bit->64bit extension breaks address match) · 7d810276
      	PR debug/50299
      	* calls.c (load_register_parameters): Use use_reg_mode instead
      	of use_reg when adding a single register CALL_INSN_FUNCTION_USAGE
      	entry.
      	(expand_call): Set EXPR_LIST mode to TYPE_MODE of the argument
      	for stack CALL_INSN_FUNCTION_USAGE uses.
      	* expr.h (use_reg_mode): New prototype.
      	(use_reg): Changed into inline around use_reg_mode.
      	* expr.c (use_reg): Renamed to...
      	(use_reg_mode): ... this.  Added MODE argument, set EXPR_LIST
      	mode to that mode instead of VOIDmode.
      	* var-tracking.c (prepare_call_arguments): Don't track parameters
      	whose EXPR_LIST mode is VOIDmode, BLKmode or X mode isn't convertible
      	to it using lowpart_subreg.  Convert VALUE and REG/MEM to the
      	EXPR_LIST mode.
      
      From-SVN: r178784
      Jakub Jelinek committed
  26. 27 Jul, 2011 1 commit
    • params.h (ALLOW_STORE_DATA_RACES): New. · 1169e45d
      	* params.h (ALLOW_STORE_DATA_RACES): New.
      	* params.def (PARAM_ALLOW_STORE_DATA_RACES): New.
      	* Makefile.in (expr.o): Depend on PARAMS_H.
      	* machmode.h (get_best_mode): Add argument.
      	* fold-const.c (optimize_bit_field_compare): Add argument to
      	get_best_mode.
      	(fold_truthop): Same.
      	* ifcvt.c (noce_emit_move_insn): Add argument to store_bit_field.
      	* expr.c (emit_group_store): Same.
      	(copy_blkmode_from_reg): Same.
      	(write_complex_part): Same.
      	(optimize_bitfield_assignment_op): Add argument.
      	Add argument to get_best_mode.
      	(get_bit_range): New.
      	(expand_assignment): Calculate maxbits and pass it down
      	accordingly.
      	(store_field): New argument.
      	(expand_expr_real_2): New argument to store_field.
      	Include params.h.
      	* expr.h (store_bit_field): New argument.
      	* stor-layout.c (get_best_mode): Restrict mode expansion by taking
      	into account maxbits.
      	* calls.c (store_unaligned_arguments_into_pseudos): New argument
      	to store_bit_field.
      	* expmed.c (store_bit_field_1): New argument.  Use it.
      	(store_bit_field): Same.
      	(store_fixed_bit_field): Same.
      	(store_split_bit_field): Same.
      	(extract_bit_field_1): Pass new argument to get_best_mode.
      	(extract_bit_field): Same.
      	* stmt.c (store_bit_field): Pass new argument to store_bit_field.
      	* doc/invoke.texi: Document parameter allow-store-data-races.
      
      From-SVN: r176824
      Aldy Hernandez committed
  27. 29 Apr, 2011 1 commit
    • expr.h (expand_shift): Rename to ... · eb6c3df1
      2011-04-29  Richard Guenther  <rguenther@suse.de>
      
      	* expr.h (expand_shift): Rename to ...
      	(expand_variable_shift): ... this.
      	(expand_shift): Take a constant shift amount.
      	* expmed.c (expand_shift): Rename to ...
      	(expand_variable_shift): ... this.
      	(expand_shift): New wrapper around expand_variable_shift.
      	* expr.c (convert_move, emit_group_load_1, emit_group_store,
      	optimize_bitfield_assignment_op, store_field, expand_expr_real_2,
      	expand_expr_real_1, reduce_to_bit_field_precision): Adjust.
      	* expmed.c (store_fixed_bit_field, extract_bit_field_1,
      	extract_fixed_bit_field, extract_split_bit_field, expand_mult_const,
      	expand_mult, expand_widening_mult, expand_mult_highpart_adjust,
      	extract_high_half, expand_sdiv_pow2, expand_divmod, emit_cstore,
      	emit_store_flag_1, emit_store_flag): Likewise.
      	* builtins.c (expand_builtin_signbit): Likewise.
      	* calls.c (load_register_parameters): Likewise.
      	* function.c (assign_parm_setup_block): Likewise.
      	* lower-subreg.c (resolve_shift_zext): Likewise.
      	* optabs.c (widen_bswap, expand_abs_nojump,
      	expand_one_cmpl_abs_nojump, expand_float): Likewise.
      	* spu/spu.c (spu_expand_extv): Likewise.
      	* sparc/sparc.c (sparc32_initialize_trampoline): Likewise.
      
      From-SVN: r173157
      Richard Guenther committed
  28. 21 Mar, 2011 1 commit
    • expr.h (prepare_operand): Move to... · 2ef6ce06
      gcc/
      2011-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
      
      	* expr.h (prepare_operand): Move to...
      	* optabs.h (prepare_operand): ...here and change the insn code
      	parameter from "int" to "enum insn_code".
      	(insn_operand_matches): Declare.
      	* expr.c (init_expr_target): Use insn_operand_matches.
      	(compress_float_constant): Likewise.
      	* function.c (safe_insn_predicate, assign_parm_setup_reg): Likewise.
      	* optabs.c (can_compare_p, prepare_cmp_insn): Likewise.
      	(emit_cmp_and_jump_insn_1, gen_add2_insn, gen_add3_insn): Likewise.
      	(have_add2_insn, gen_sub2_insn, gen_sub3_insn, have_sub2_insn): Likewise.
      	(gen_cond_trap): Likewise.
      	(prepare_operand): Likewise.  Change icode to an insn_code.
      	(insn_operand_matches): New function.
      	* reload.c (find_reloads_address_1): Use insn_operand_matches.
      	* reload1.c (gen_reload): Likewise.
      	* targhooks.c (default_secondary_reload): Likewise.
      
      From-SVN: r171270
      Richard Sandiford committed
  29. 03 Mar, 2011 1 commit
    • explow.c (emit_stack_save): Remove 'after' parameter. · 9eac0f2a
              * explow.c (emit_stack_save): Remove 'after' parameter.
              (emit_stack_restore): Likewise.
              * expr.h: Update to match.
              * builtins.c, calls.c, stmt.c: Likewise.
              * config/alpha/alpha.md, config/avr/avr.md: Likewise.
              * config/mips/mips.md, config/pa/pa.md, config/vax/vax.md: Likewise.
              * function.c (expand_function_end): Insert the emit_stack_save
              sequence before parm_birth_insn instead of after.
      
      From-SVN: r170663
      Richard Henderson committed
  30. 22 Oct, 2010 1 commit
    • expr.c (emit_group_load_1): Update calls to extract_bit_field. · 62519f7f
      	* expr.c (emit_group_load_1): Update calls to extract_bit_field.
      	(copy_blkmode_from_reg): Likewise.
      	(read_complex_part): Likewise.
      	(expand_expr_real_1): Calculate packedp and pass it to
      	extract_bit_field.
      	* expr.h (extract_bit_field): Update declaration.
      	* calls.c (store_unaligned_arguments_into_pseudos): Update call
      	to extract_bit_field.
      	* expmed.c (extract_fixed_bit_field): Update calls to
      	extract_fixed_bit_field.
      	(store_split_bit_field): Likewise.
      	(extract_bit_field_1): Add new argument packedp.
      	(extract_bit_field): Add new argument packedp.
      	(extract_fixed_bit_field): Add new argument packedp and let
      	packed attribute override volatile.
      	* stmt.c (expand_return): Update call to extract_bit_field.
      
      From-SVN: r165799
      Jie Zhang committed
  31. 09 Oct, 2010 1 commit
    • re PR rtl-optimization/33721 ([meta-bug] Gcc can't properly align stack variable) · 3a42502d
      	PR rtl-opt/33721
      	* explow.c (allocate_dynamic_stack_space): Add REQUIRED_ALIGN parm,
      	remove TARGET parm, convert KNOWN_ALIGN parm to SIZE_ALIGN.  Honor
      	required_align, tidy the code a bit.  Emit split_stack code in the
      	right place.  Mark the return value with the alignment properly.
      	* expr.h (allocate_dynamic_stack_space): Update decl.
      	* builtins.c (expand_builtin_apply): Update call to
      	allocate_dynamic_stack_space.
      	(expand_builtin_alloca): Likewise.  Remove TARGET parameter.
      	* calls.c (initialize_argument_information): Update call to
      	allocate_dynamic_stack_space.
      	(expand_call): Likewise.
      
      	* cfgexpand.c (get_decl_align_unit): Don't limit alignment.
      	Don't update_stack_alignment here.
      	(alloc_stack_frame_space): Make ALIGN unsigned.
      	(stack_var_cmp): Sort by alignment too.
      	(partition_stack_vars): Don't merge large and small alignment vars.
      	(expand_one_stack_var_at): Add BASE and BASE_ALIGN parameters.
      	Take care when BASE is not virtual_stack_vars_rtx.
      	(expand_stack_vars): Allocate dynamic stack space for large
      	alignment variables.
      	(expand_one_stack_var): Update all to expand_one_stack_var_at.
      	(defer_stack_allocation): True for large alignment vars.
      	(update_stack_alignment): Merge into ...
      	(expand_one_var): ... here.
      	(gimple_expand_cfg): Place code from expand_stack_vars.
      
      From-SVN: r165240
      Richard Henderson committed
  32. 30 Aug, 2010 1 commit
    • Stack usage support · d3c12306
      	Stack usage support
      	* common.opt (-fstack-usage): New option.
      	* doc/invoke.texi (Debugging options): Document it.
      	* builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to
      	allocate_dynamic_stack_space.
      	(expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE
      	and propagate it to allocate_dynamic_stack_space.
      	(expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change.
      	* calls.c (initialize_argument_information): Pass TRUE as 4th
      	argument to allocate_dynamic_stack_space.
      	(expand_call): Set current_function_has_unbounded_dynamic_stack_size
      	to 1 when pushing a variable-sized argument onto the stack.  Pass
      	TRUE as 4th argument to allocate_dynamic_stack_space.
      	Update current_function_pushed_stack_size.
      	(emit_library_call_value_1): Likewise.
      	* explow.c (allocate_dynamic_stack_space): Add 4th bool parameter
      	CANNOT_ACCUMULATE.  If flag_stack_usage, look into the size and
      	attempt to find an upper bound.  Remove redundant code for the
      	SETJMP_VIA_SAVE_AREA case.
      	* expr.h (allocate_dynamic_stack_space): Add 4th bool parameter.
      	* function.h (struct stack_usage): New structure.
      	(current_function_static_stack_size): New macro.
      	(current_function_dynamic_stack_size): Likewise.
      	(current_function_pushed_stack_size): Likewise.
      	(current_function_dynamic_alloc_count): Likewise.
      	(current_function_has_unbounded_dynamic_stack_size): Likewise.
      	(current_function_allocates_dynamic_stack_space): Likewise.
      	(struct function): Add new field 'su'.
      	* function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA,
      	add the value of the dynamic offset to the dynamic stack usage.
      	(gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA
      	for variable-sized objects.
      	(prepare_function_start): Allocate cfun->su if flag_stack_usage.
      	(rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage.
      	* gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to
      	BUILT_IN_ALLOCA for variable-sized objects.
      	* output.h (output_stack_usage): Declare.
      	* toplev.c (stack_usage_file): New file pointer.
      	(output_stack_usage): New function.
      	(open_auxiliary_file): Likewise.
      	(lang_dependent_init): Open file if flag_stack_usage is set.
      	(finalize): Close file if stack_usage_file is not null.
      	* tree.h (ALLOCA_FOR_VAR_P): New macro.
      	* config/alpha/alpha.c (compute_frame_size): New function.
      	(alpha_expand_prologue): Use it.
      	(alpha_start_function): Likewise.
      	(alpha_expand_epilogue): Likewise.  Set stack usage info.
      	* config/i386/i386.c (ix86_expand_prologue): Likewise.
      	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
      	* config/mips/mips.c (mips_expand_prologue): Likewise.
      	* config/pa/pa.c (hppa_expand_prologue): Likewise.
      	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
      	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
      testsuite/
      	* lib/gcc-dg.exp (cleanup-stack-usage): New procedure.
      	* lib/scanasm.exp (scan-stack-usage): Likewise.
      	(scan-stack-usage-not): Likewise.
      	* gcc.dg/stack-usage-1.c: New test.
      	* gcc.target/i386/stack-usage-realign.c: Likewise.
      
      From-SVN: r163660
      Eric Botcazou committed
  33. 03 Jul, 2010 1 commit
    • c-common.c (IN_GCC_FRONTEND): Do not undef. · 4d451982
      2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* c-family/c-common.c (IN_GCC_FRONTEND): Do not undef.
      	Do not include expr.h
      	(vector_mode_valid_p): Move here.
      	* expr.c (vector_mode_valid_p): Move to c-common.c.
      	* expr.h (vector_mode_valid_p): Do not declare here.
      	* system.h: Poison GCC_EXPR_H in front-ends.
      	* Makefile.in: Update dependencies.
      
      From-SVN: r161785
      Manuel López-Ibáñez committed