1. 27 Sep, 2012 1 commit
    • tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. · 2f13f2de
      2012-09-27  Dehao Chen  <dehao@google.com>
      
      	* tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION.
      	(extern void protected_set_expr_location): Likewise.
      	(function_args_iter_next): Likewise.
      	(inlined_function_outer_scope_p): Likewise.
      	* input.h (IS_UNKNOWN_LOCATION): Likewise.
      	* fold-const.c (expr_location_or): Likewise.
      	* lto-cgraph.c (output_node_opt_summary): Likewise.
      	* dwarf2out.c (add_src_coords_attributes): Likewise.
      	* tree-eh.c (lower_try_finally_dup_block): Likewise.
      	* profile.c (branch_prob):
      	* cfgexpand.c (expand_gimple_cond): Likewise.
      	(expand_gimple_basic_block): Likewise.
      	(construct_exit_block): Likewise.
      	(gimple_expand_cfg): Likewise.
      	* cfgcleanup.c (try_forward_edges): Likewise.
      	* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
      	(dump_scope_block): Likewise.
      	* ipa-prop.c (ipa_write_jump_function): Likewise.
      	* rtl.h (extern void rtl_check_failed_flag): Likewise.
      	* gimple.h (gimple_set_location): Likewise.
      	(gimple_has_location): Likewise.
      	* cfgrtl.c (unique_locus_on_edge_between_p): Likewise.
      	(force_nonfallthru_and_redirect): Likewise.
      	(fixup_reorder_chain): Likewise.
      	(cfg_layout_merge_blocks): Likewise.
      
      From-SVN: r191810
      Dehao Chen committed
  2. 19 Sep, 2012 1 commit
    • Integrate lexical block into source_location. · 5368224f
      gcc:
      	2012-09-19  Dehao Chen  <dehao@google.com>
      
      	* toplev.c (general_init): Init block_locations.
      	* tree.c (tree_set_block): New.
      	(tree_block): Change to use LOCATION_BLOCK.
      	* tree.h (TREE_SET_BLOCK): New.
      	* final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK.
      	(final_start_function): Likewise.
      	* input.c (expand_location_1): Likewise.
      	* input.h (LOCATION_LOCUS): New.
      	(LOCATION_BLOCK): New.
      	(IS_UNKNOWN_LOCATION): New.
      	* fold-const.c (expr_location_or): Change to use new location.
      	* reorg.c (emit_delay_sequence): Likewise.
      	(try_merge_delay_insns): Likewise.
      	* modulo-sched.c (dump_insn_location): Likewise.
      	* lto-streamer-out.c (lto_output_location_bitpack): Likewise.
      	* lto-cgraph.c (output_node_opt_summary): Likewise.
      	* jump.c (rtx_renumbered_equal_p): Likewise.
      	* ifcvt.c (noce_try_move): Likewise.
      	(noce_try_store_flag): Likewise.
      	(noce_try_store_flag_constants): Likewise.
      	(noce_try_addcc): Likewise.
      	(noce_try_store_flag_mask): Likewise.
      	(noce_try_cmove): Likewise.
      	(noce_try_cmove_arith): Likewise.
      	(noce_try_minmax): Likewise.
      	(noce_try_abs): Likewise.
      	(noce_try_sign_mask): Likewise.
      	(noce_try_bitop): Likewise.
      	(noce_process_if_block): Likewise.
      	(cond_move_process_if_block): Likewise.
      	(find_cond_trap): Likewise.
      	* ipa-prop.c (ipa_set_jf_constant): Likewise.
      	(ipa_write_jump_function): Likewise.
      	* dwarf2out.c (add_src_coords_attributes): Likewise.
      	* expr.c (expand_expr_real): Likewise.
      	* tree-parloops.c (create_loop_fn): Likewise.
      	* recog.c (peep2_attempt): Likewise.
      	* function.c (free_after_compilation): Likewise.
      	(expand_function_end): Likewise.
      	(set_insn_locations): Likewise.
      	(thread_prologue_and_epilogue_insns): Likewise.
      	* print-rtl.c (print_rtx): Likewise.
      	* profile.c (branch_prob): Likewise.
      	* trans-mem.c (ipa_tm_scan_irr_block): Likewise.
      	* gimplify.c (gimplify_call_expr): Likewise.
      	* except.c (duplicate_eh_regions_1): Likewise.
      	* emit-rtl.c (try_split): Likewise.
      	(make_insn_raw): Likewise.
      	(make_debug_insn_raw): Likewise.
      	(make_jump_insn_raw): Likewise.
      	(make_call_insn_raw): Likewise.
      	(emit_pattern_after_setloc): Likewise.
      	(emit_pattern_after): Likewise.
      	(emit_debug_insn_after): Likewise.
      	(emit_pattern_before): Likewise.
      	(emit_insn_before_setloc): Likewise.
      	(emit_jump_insn_before): Likewise.
      	(emit_call_insn_before_setloc): Likewise.
      	(emit_call_insn_before): Likeise.
      	(emit_debug_insn_before_setloc): Likewise.
      	(emit_copy_of_insn_after): Likewise.
      	(insn_locators_alloc): Remove.
      	(insn_locators_finalize): Remove.
      	(insn_locators_free): Remove.
      	(set_curr_insn_source_location): Remove.
      	(get_curr_insn_source_location): Remove.
      	(set_curr_insn_block): Remove.
      	(get_curr_insn_block): Remove.
      	(locator_scope): Remove.
      	(insn_scope): Change to use new location.
      	(locator_location): Remove.
      	(insn_line): Change to use new location.
      	(locator_file): Remove.
      	(insn_file): Change to use new location.
      	(locator_eq): Remove.
      	(insn_locations_init): New.
      	(insn_locations_finalize): New.
      	(set_curr_insn_location): New.
      	(curr_insn_location): New.
      	* cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location.
      	(expand_gimple_cond): Likewise.
      	(expand_call_stmt): Likewise.
      	(expand_gimple_stmt_1): Likewise.
      	(expand_gimple_basic_block): Likewise.
      	(construct_exit_block): Likewise.
      	(gimple_expand_cfg): Likewise.
      	* cfgcleanup.c (try_forward_edges): Likewise.
      	* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
      	(dump_scope_block): Likewise.
      	(remove_unused_locals): Likewise.
      	* rtl.c (rtx_equal_p_cb): Likewise.
      	(rtx_equal_p): Likewise.
      	* rtl.h (XUINT): New.
      	(INSN_LOCATOR): Remove.
      	(CURR_INSN_LOCATION): Remove.
      	(INSN_LOCATION): New.
      	(INSN_HAS_LOCATION): New.
      	* tree-inline.c (remap_gimple_op_r): Change to use new location.
      	(copy_tree_body_r): Likewise.
      	(copy_phis_for_bb): Likewise.
      	(expand_call_inline): Likewise.
      	* tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise.
      	* tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise.
      	* gimple-streamer-out.c (output_gimple_stmt): Likewise.
      	* combine.c (try_combine): Likewise.
      	* tree-outof-ssa.c (set_location_for_edge): Likewise.
      	(insert_partition_copy_on_edge): Likewise.
      	(insert_value_copy_on_edge): Likewise.
      	(insert_rtx_to_part_on_edge): Likewise.
      	(insert_part_to_rtx_on_edge): Likewise.
      	* basic-block.h (edge_def): Remove field.
      	* gimple.h (gimple_statement_base): Remove field.
      	(gimple_bb): Change to use new location.
      	(gimple_set_block): Likewise.
      	(gimple_has_location): Likewise.
      	* tree-cfg.c (make_cond_expr_edges): Likewise.
      	(make_goto_expr_edges): Likewise.
      	(gimple_can_merge_blocks_p): Likewise.
      	(move_stmt_op): Likewise.
      	(move_block_to_fn): Likewise.
      	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
      	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
      	* config/i386/i386.c (x86_output_mi_thunk): Likewise.
      	* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
      	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
      	* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
      	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
      	* config/score/score.c (score_output_mi_thunk): Likewise.
      	* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
      	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
      	* cfgrtl.c (unique_locus_on_edge_between_p): Likewise.
      	(unique_locus_on_edge_between_p): Likewise.
      	(emit_nop_for_unique_locus_between): Likewise.
      	(force_nonfallthru_and_redirect): Likewise.
      	(fixup_reorder_chain): Likewise.
      	(cfg_layout_merge_blocks): Likewise.
      	* stmt.c (emit_case_nodes): Likewise.
      
      gcc/lto:
      	2012-09-19  Dehao Chen  <dehao@google.com>
      
      	* lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
      
      libcpp:
      	2012-09-19  Dehao Chen  <dehao@google.com>
      
      	* include/line-map.h (MAX_SOURCE_LOCATION): New value.
      	(location_adhoc_data_fini): New.
      	(get_combined_adhoc_loc): New.
      	(get_data_from_adhoc_loc): New.
      	(get_location_from_adhoc_loc): New.
      	(location_adhoc_data_map): New.
      	(COMBINE_LOCATION_DATA): New.
      	(IS_ADHOC_LOC): New.
      	(expanded_location): New field.
      	(line_maps): New field.
      	* line-map.c (location_adhoc_data): New.
      	(location_adhoc_data_hash): New.
      	(location_adhoc_data_eq): New.
      	(location_adhoc_data_update): New.
      	(get_combined_adhoc_loc): New.
      	(get_data_from_adhoc_loc): New.
      	(get_location_from_adhoc_loc): New.
      	(location_adhoc_data_init): New.
      	(location_adhoc_data_fini): New.
      	(linemap_init): Initialize location_adhoc_data.
      	(linemap_lookup): Change to use new location.
      	(linemap_ordinary_map_lookup): Likewise.
      	(linemap_macro_map_lookup): Likewise.
      	(linemap_macro_map_loc_to_def_point): Likewise.
      	(linemap_macro_map_loc_unwind_toward_spel): Likewise.
      	(linemap_get_expansion_line): Likewise.
      	(linemap_get_expansion_filename): Likewise.
      	(linemap_location_in_system_header_p): Likewise.
      	(linemap_location_from_macro_expansion_p): Likewise.
      	(linemap_macro_loc_to_spelling_point): Likewise.
      	(linemap_macro_loc_to_def_point): Likewise.
      	(linemap_macro_loc_to_exp_point): Likewise.
      	(linemap_resolve_location): Likewise.
      	(linemap_unwind_toward_expansion): Likewise.
      	(linemap_unwind_to_first_non_reserved_loc): Likewise.
      	(linemap_expand_location): Likewise.
      	(linemap_dump_location): Likewise.
      	(linemap_line_start): Likewise.
      
      From-SVN: r191494
      Dehao Chen committed
  3. 17 Sep, 2012 1 commit
  4. 13 Sep, 2012 1 commit
    • ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of… · df92c640
      ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name.
      
      	* ipa-pure-const.c (state_from_flags, local_pure_const): Use
      	current_function_name instead of lang_hooks.decl_printable_name.
      
      	* function.h (fndecl_name): New prototype.
      	* function.c (fndecl_name): New function.
      	* vecir.h (cgraph_node_p): New standard IR VEC type.
      	* trans-mem.c (cgraph_node_p): No need anymore to define it here.
      	* ipa-utils.h (ipa_get_nodes_in_cycle): New prototype.
      	* ipa-utils.c (ipa_get_nodes_in_cycle): New function.
      	* ipa-reference.c: Don't include langhooks.h, and certainly not twice.
      	Fix many formatting issues (long lines, short lines, spacing, etc.).
      	(get_static_name): Use fndecl_name.
      	(dump_static_vars_set_to_file): New function split out from propagate.
      	(union_static_var_sets): New function, union two sets and collapse
      	to all_module_statics as quickly as possible.
      	(intersect_static_var_sets): New function, similar to above.
      	(copy_static_var_set): Renamed from copy_global_bitmap and rewritten
      	to allocate a copy on the same bitmap_obstack as the source set.
      	(propagate_bits): Simplify, and clarify by using union_static_var_sets.
      	(generate_summary): Remove bm_temp.  Print UID of promotable globals.
      	(read_write_all_from_decl): Use pass-by-reference, bless C++.
      	(get_read_write_all_from_node): New function, split out from propagate.
      	(propagate): Simplify and clarify with helper functions.  Use
      	ipa_get_nodes_in_cycle to walk all nodes in a reduced node.
      	(ipa_reference_read_optimization_summary): Use fndecl_name instead of
      	lang_hooks.decl_printable_name.
      
      	* rtl.h (print_rtl_single_with_indent): New prototype.
      	* print-rtl.c (print_rtl_single_with_indent): New function.
      	* cfghooks.h (empty_block_p, split_block_before_cond_jump): New hooks.
      	* cfghooks.c (empty_block_p, split_block_before_cond_jump): Implement.
      	* cfgrtl.c (rtl_block_empty_p, rtl_split_block_before_cond_jump):
      	Implement RTL specific hooks.
      	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Register the new hooks.
      	* tree-cfg.c (gimple_empty_block_p,
      	gimple_split_block_before_cond_jump): Implement GIMPLE specific hooks.
      	(gimple_cfg_hooks): Register the new hooks.
      	* tree-ssa-phiopt.c (empty_block_p): Remove in favor of new hook.
      
      From-SVN: r191255
      Steven Bosscher committed
  5. 12 Sep, 2012 1 commit
  6. 23 Aug, 2012 1 commit
    • alias.c (rtx_equal_for_memref_p): Convert constant cases. · d8116890
      2012-08-23  Kenneth Zadeck <zadeck@naturalbridge.com>
      
      	* alias.c (rtx_equal_for_memref_p): Convert constant cases.
      	* combine.c (find_single_use_1, mark_used_regs_combine): Convert
      	to CASE_CONST_ANY.
       	* cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1,
      	count_reg_usage): Convert constant cases.
      	* cselib.c (cselib_expand_value_rtx_1): Convert to
      	CASE_CONST_ANY.
      	(cselib_subst_to_values): Convert constant cases.
      	* df-scan.c (df_uses_record): Ditto.
      	* dse.c (const_or_frame_p): Convert case statements to explicit
      	if-then-else using mode classes.
      	* emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases.
      	* explow.c (convert_memory_address_addr_space): Ditto.
      	* gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto.
      	* genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto.
      	* ira.c (equiv_init_varies_p, contains_replace_regs,
      	memref_referenced_p, rtx_moveable_p): Ditto.
      	* jump.c (mark_jump_label_1): Remove constant cases.
      	(rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE.
      	* loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1,
      	invariant_expr_equal_p): Convert to CASE_CONST_ANY.
      	* postreload-gcse.c (oprs_unchanged_p): Convert constant cases.
      	* reginfo.c (reg_scan_mark_refs): Ditto.
      	* regrename.c (scan_rtx): Ditto.
      	* reload1.c (eliminate_regs_1, elimination_effects,
      	scan_paradoxical_subregs): Ditto.
      	* reload.c (operands_match_p, subst_reg_equivs):  Ditto.
      	* resource.c (mark_referenced_resources, mark_set_resources): Ditto.
      	* rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences)
      	(reg_mentioned_p, modified_between_p, modified_in_p)
      	(volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1,
      	inequality_comparisons_p, computed_jump_p_1): Ditto.
      	* rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto.
      	* sched-deps.c (sched_analyze_2): Ditto.
      	* valtrack.c (cleanup_auto_inc_dec): Ditto.
      	* rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, 
      	CASE_CONST_ANY): New macros.
      
      From-SVN: r190627
      Kenneth Zadeck committed
  7. 02 Aug, 2012 2 commits
    • cfgexpand.c (expand_debug_locations): Encapsulate test for CONST_DOUBLE in macro. · 48175537
      2012-08-02  Kenneth Zadeck <zadeck@naturalbridge.com>
      
      	* cfgexpand.c (expand_debug_locations):  Encapsulate test for
      	CONST_DOUBLE in macro.
      	* combine.c (try_combine, gen_lowpart_for_combine): Ditto.
      	* cprop.c (implicit_set_cond_p): Ditto.
      	* cselib.c (rtx_equal_for_cselib_1): Ditto.
      	* expmed.c (expand_mult): Ditto.
      	* expr.c (convert_modes): Ditto.
      	* ira-costs.c (record_reg_classes): Ditto.
      	* ira-lives.c (single_reg_class): Ditto.
      	* optabs.c (expand_copysign_absneg, expand_copysign): Ditto.
      	* print-rtl.c (print_rtx): Ditto.
      	* recog.c (simplify_while_replacing, const_double_operand)
      	(asm_operand_ok, constrain_operands): Ditto.
      	* reg-stack.c (subst_stack_regs_pat): Ditto.
      	* reload.c (find_reloads, find_equiv_reg): Ditto.
      	* rtlanal.c (replace_rtx): Remove test.
      	* rtlanal.c (constant_pool_constant_p, split_double): Encapsulate test for
      	CONST_DOUBLE in macro.
      	* simplify-rtx.c (mode_signbit_p, avoid_constant_pool_reference)
      	(simplify_unary_operation_1, simplify_const_unary_operation)
      	(simplify_binary_operation_1, simplify_const_binary_operation)
      	(simplify_relational_operation_1)
      	(simplify_const_relational_operations)
      	(implify_subreg): Ditto.
      	* varasm.c (output_constant_pool_2): Ditto.
      	* rtl.h (CONST_DOUBLE_AS_INT_P, CONST_DOUBLE_AS_FLOAT_P): New
      	macros.
      	* rtl.def (CONST_DOUBLE):  Updated comments.
      
      From-SVN: r190105
      Kenneth Zadeck committed
    • re PR debug/52983 (internal compiler error: in df_uses_record, at df-scan.c:3243) · 08df6c0d
      PR debug/52983
      * valtrack.h, valtrack.c: New.
      * Makefile.in (VALTRACK_H): New.
      (OBJS): Add valtrack.o.
      (valtrack.o): New.
      (cselib.o, dce.o, df-problems.o, combine.o): Add VALTRACK_H.
      * combine.c: Include valtrack.h.
      (make_compound_operation): Publish.
      (cleanup_auto_inc_dec): Move to valtrack.c.
      (struct rtx_subst_pair, propagate_for_debug_subst): Likewise.
      (propagate_for_debug): Likewise.  Add this_basic_block parameter.
      Adjust all callers.
      * cselib.c: Include valtrack.h.
      * dce.c: Likewise.
      * df-problems.c: Likewise.
      (dead_debug_init, dead_debug_reset_uses): Move to valtrack.c.
      (dead_debug_finish, dead_debug_add): Likewise.
      (dead_debug_insert_temp): Likewise.
      * df.h (struct dead_debug_use): Move to valtrack.h.
      (struct dead_debug, enum debug_temp_where): Likewise.
      (dead_debug_init, dead_debug_reset_uses): Move to valtrack.h.
      (dead_debug_finish, dead_debug_add): Likewise.
      (dead_debug_insert_temp): Likewise.
      * rtl.h (make_compound_operation): Declare.
      
      From-SVN: r190061
      Alexandre Oliva committed
  8. 31 Jul, 2012 1 commit
    • re PR pch/53880 (compile time regression when generating precompiled headers for boost) · 3ad45f7f
      	PR pch/53880
      	* gengtype.c (struct walk_type_data): Add have_this_obj field.
      	(walk_type): For functions that take a this_obj argument and
      	that process fields with a GTY((length)) argument, write the
      	test that write_types_local_process_field will write also at the
      	head of the loop, effectively unswitching the loop.
      	(write_func_for_structure, write_local_func_for_structure): Clear
      	have_this_obj before calling walk_type.
      	(write_local_func_for_structure): Set have_this_obj before walk_type.
      	(write_array): Set have_this_obj for output of local pointer walking
      	functions but not for marker functions.
      	(write_types_local_process_field): Assert have_this_obj is set.
      
      	* rtl.h (simplify_using_condition): Adjust prototype using bitmap
      	from coretypes.h.
      
      From-SVN: r189999
      Steven Bosscher committed
  9. 24 Jul, 2012 1 commit
  10. 17 Jul, 2012 1 commit
    • dumpfile.h (TDF_COMMENT): New define. · a315c44c
      	* dumpfile.h (TDF_COMMENT): New define.
      	* basic-block.h (EDGE_FALLTHRU, EDGE_ABNORMAL, EDGE_ABNORMAL_CALL,
      	EDGE_EH, EDGE_FAKE, EDGE_DFS_BACK, EDGE_CAN_FALLTHRU,
      	EDGE_IRREDUCIBLE_LOOP, EDGE_SIBCALL, EDGE_LOOP_EXIT, EDGE_TRUE_VALUE,
      	EDGE_FALSE_VALUE, EDGE_EXECUTABLE, EDGE_CROSSING, EDGE_PRESERVE):
      	Move to new file cfg-flags.h.
      	(enum cfg_edge_flags): New enum, using cfg-flags.h.
      	(EDGE_ALL_FLAGS): Compute value automatically.
      	(BB_NEW, BB_REACHABLE, BB_IRREDUCIBLE_LOOP, BB_SUPERBLOCK,
      	BB_DISABLE_SCHEDULE, BB_HOT_PARTITION, BB_COLD_PARTITION,
      	BB_DUPLICATED, BB_NON_LOCAL_GOTO_TARGET, BB_RTL,
      	BB_FORWARDER_BLOCK, BB_NONTHREADABLE_BLOCK, BB_MODIFIED, BB_VISITED,
      	BB_IN_TRANSACTION): Move to new file cfg-flags.h.
      	(enum bb_flags): Rename to cfg_bb_flags.  Use cfg-flags.h.
      	(BB_ALL_FLAGS): New, compute value automatically.
      	(dump_bb_info): Update prototype.
      	(dump_edge_info): Update prototype.
      	* cfg-flags.h: New file.
      	* cfg.c (dump_edge_info): Take flags argument.  Be verbose only if
      	TDF_DETAILS and not TDF_SLIM.  Include cfg-flags.h for bitnames.
      	Check that the edge flags are within the range of EDGE_ALL_FLAGS.
      	(debug_bb): Update dump_bb call.
      	(dump_cfg_bb_info): Remove.
      	(dump_bb_info): New function.  Use cfg-flags.h for bitnames.
      	Adjust verbosity using TDF_* flags.  Check that the basic block flags
      	are within the range of BB_ALL_FLAGS.
      	(brief_dump_cfg): Use dump_bb_info instead of dump_cfg_bb_info.
      	* cfghooks.h (struct cfghooks): Update dump_bb hook, take a FILE
      	first for consistency with other dump functions.
      	(dump_bb): Update prototype accordingly.
      	* cfghooks.c: Include dumpfile.h.
      	(verify_flow_info): Update dump_edge_info calls.
      	(dump_bb): Take a flags argument and pass it around.
      	Use dump_bb_info to dump common information about a basic block.
      	(dump_flow_info): Moved here from cfgrtl.c.  Make IL agnostic.
      	(debug_flow_info): Moved here from cfgrtl.c.
      	* profile.c (is_edge_inconsistent): Update dump_bb calls.
      	* loop-invariant.c (find_defs): Update print_rtl_with_bb call.
      	* rtl.h (debug_bb_n_slim, debug_bb_slim, print_rtl_slim,
      	print_rtl_slim_with_bb): Remove prototypes.
      	(dump_insn_slim): Adjust prototype to take a const_rtx.
      	(print_rtl_with_bb): Adjust prototype.
      	* sched-rgn.c (debug_region): Use dump_bb instead of debug_bb_n_slim.
      	* sched-vis.c (dump_insn_slim): Take a const_rtx.
      	(debug_insn_slim): Prototype here near DEBUG_FUNCTION marker.
      	(print_rtl_slim_with_bb): Remove.
      	(print_rtl_slim): Rename to debug_rtl_slim.  Print only insn info,
      	not basic block info (print_rtl_with_bb with TDF_SLIM should be used
      	for that.  Prototype here near DEBUG_FUNCTION marker.
      	(debug_bb_slim): Prototype here near DEBUG_FUNCTION marker.
      	Use dump_bb.
      	(debug_bb_n_slim): Prototype here near DEBUG_FUNCTION marker.
      	* tree-cfg.c (gimple_can_merge_blocks_p): Use EDGE_COMPLEX.
      	(remove_bb): Update dump_bb call.
      	(gimple_debug_bb): Use dump_bb.
      	(dump_function_to_file): Update gimple_dump_bb call.
      	(print_loops_bb): Likewise.
      	* tree-flow.h (gimple_dump_bb): Update prototype.
      	* gimple-pretty-print.c (dump_bb_header): Rename to
      	dump_gimple_bb_header.  Write to a stream instead of a pretty
      	printer.  Use dump_bb_info to dump basic block info.
      	(dump_bb_end): Rename to dump_gimple_bb_footer.  Write to a
      	stream instead of a pretty printer.  Use dump_bb_info.
      	(gimple_dump_bb_buff): Do not call dump_bb_header and dump_bb_end.
      	(gimple_dump_bb): Do it here with dump_gimple_bb_header and
      	dump_gimple_bb_footer.
      	* cfgrtl.c (rtl_dump_bb): Update prototype.  Only dump DF if the
      	dump flags have TDF_DETAILS.  Use dump_insn_slim if TDF_SLIM.
      	(print_rtl_with_bb): Take a flags argument and pass it around.
      	Use dump_insn_slim if TDF_SLIM.
      	(dump_bb_info): Removed and re-incarnated in cfg.c.
      	(dump_flow_info): Moved to cfghooks.c.
      	(debug_flow_info): Moved to cfghooks.c.
      	* passes.c (execute_function_dump): Unconditionally use
      	print_rtl_with_bb for RTL dumps, now that it understands TDF_SLIM.
      	* final.c (dump_basic_block_info): Update dump_edge_info calls.
      	* tree-vrp.c (dump_asserts_for): Likewise.
      	* ifcvt.c (if_convert): Unconditionally use print_rtl_with_bb.
      	* tree-if-conv.c (if_convertible_bb_p): Don't look at
      	EDGE_ABNORMAL_CALL, it has no meaning in the GIMPLE world.
      	* trans-mem.c (make_tm_edge): Don't set EDGE_ABNORMAL_CALL,
      	for the same reason.
      	* config/rl78/rl78.c (rl78_reorg): Update print_rtl_with_bb calls.
      
      From-SVN: r189590
      Steven Bosscher committed
  11. 13 Jul, 2012 1 commit
  12. 11 Jul, 2012 1 commit
    • basic-block.h (struct edge_def): Use basic_block instead of basic_block_def *. · b8244d74
      	* basic-block.h (struct edge_def): Use basic_block instead of
      	basic_block_def *.
      	* cfgloop.h (struct loop_exit, struct loop): Likewise.
      	* gengenrtl.c (type_from_format): Likewise.  Also for 'tree'
      	instead of union tree_node *.
      	* rtl.h (union rtunion_def, emit_insn_before_noloc,
      	emit_insn_after_noloc, add_insn_before, add_insn_after,
      	debug_bb_slim): Likewise.
      	* tree-inline.h (struct copy_body_data): Likewise.
      	* sched-rgn.c (dump_region_dot): Likewise.
      	* gimple.h (struct gimple_statement_base, gimple_set_bb,
      	gsi_move_to_bb_end): Likewise.
      	* sched-vis.c (debug_bb_slim): Likewise.
      	(debug_bb_n_slim): Likewise.
      	* config/mn10300/mn10300.c (mn10300_insert_setlb_lcc): Likewise.
      	(mn10300_block_contains_call):
      
      From-SVN: r189424
      Steven Bosscher committed
  13. 08 Jul, 2012 1 commit
    • basic-block.h: Re-group most prototypes per file. · 532aafad
      gcc/
      	* basic-block.h: Re-group most prototypes per file.
      	(struct edge_list): Remove num_blocks field.
      	(dump_bb_info): Adjust prototypes.
      	(dump_reg_info): Move prototype to regs.h.
      	* function.h: Do not include tree.h.
      	Include vec.h, vecir.h, input.h and machmode.h to compensate.
      	(function_name): New prototype.
      	* gimple.h: Include tree.h to compensate for basic-block.h change.
      	* langhooks.h: Note that tree.h is only necessary for enum tree_code.
      	* regs.h (dump_reg_info): Prototype here.
      	* regset.h: Adjust file reference in comment.
      	(debug_regset): Remove prototype.
      	* rtl.h: Include flags.h for flag_var_tracking_assignments.
      	(MAY_HAVE_DEBUG_INSNS): Define as flag_var_tracking_assignments
      	instead of no-longer-available tree.h's MAY_HAVE_DEBUG_STMTS.
      	(dump_reg_info, dump_flow_info): Remove prototypes.
      	* bb-reorder.c (set_edge_can_fallthru_flag): Move from cfganal.c
      	to here, the only user.  Make static.
      	(reorder_basic_blocks): Call dump_reg_info before dump_flow_info.
      	* cfg.c: Do not include tm.h, tree.h, rtl.h, hard-reg-set.h, regs.h,
      	flags.h, function.h, except.h, diagnostic-core.h, tm_p.h, timevar.h,
      	tree-pass.h, cfgloop.h, and tree-flow.h.
      	Include basic-block.h, the first header I'd expect to be included.
      	(reg_obstack): Move to df-core.c.
      	(free_edge): Remove bogus ATTRIBUTE_UNUSED.
      	(remove_edge_raw): Do not call tree-ssa's redirect_edge_var_map_clear.
      	(redirect_edge_succ_nodup): Move to cfghooks.c.
      	(dump_regset, debug_regset): Move to df-core.c.
      	(dump_bb_info): Move to cfgrtl.c.
      	(dump_reg_info): Move to regstat.c.
      	(dump_flow_info): Move to cfgrtl.c.
      	(debug_flow_info): Likewise.
      	(dump_edge_info): Do not look at cfun, a CFG without cfun is nonsense.
      	* cfganal.c: Do not include tm.h, rtl.h, obstack.h, hard-reg-set.h,
      	insn-config.h, recog.h, diagnostic-core.h, tm_p.h, and cfgloop.h.
      	(flow_active_insn_p, forwarder_block_p, can_fallthru,
      	could_fall_through): Move to cfgrtl.c.
      	(set_edge_can_fallthru_flag): Moved to bb-reorder.c.
      	(create_edge_list): Do not set edge_list's removed num_blocks.
      	(print_edge_list): Look at n_basic_blocks instead of num_blocks.
      	(flow_nodes_print): Remove.
      	(flow_edge_list_print): Remove.
      	(inverted_post_order_compute): Use FOR_ALL_BB.
      	*cfgrtl.c (dump_flow_info): Moved from cfg.c.
      	Do not call dump_reg_info.
      	(debug_flow_info): Moved from cfg.c
      	(dump_bb_info): Moved from cfg.c.  Take 'verbose' argument
      	to avoid looking at TDF_* flags from tree-pass.h.
      	(flow_active_insn_p, forwarder_block_p, can_fallthru,
      	could_fall_through): Moved from cfganal.c.
      	(print_rtl_with_bb): Adjust dump_bb_info calls.
      	* cfghooks.c (redirect_edge_succ_nodup): Moved from cfg.c.
      	(remove_edge): Call redirect_edge_var_map_clear if IR_GIMPLE.
      	(cfgcleanup.c): Look at MAY_HAVE_DEBUG_INSNS, not MAY_HAVE_DEBUG_STMTS.
      	* cselib.c: Include tree.h with a FIXME.
      	* df-core.c (reg_obstack): Moved from cfg.c.
      	(dump_regset): Likewise.
      	(debug_regset): Likewise.  Make a DEBUG_FUNCTION.
      	* final.c (compute_alignments): Call dump_reg_info before
      	dump_flow_info.
      	* function.c (function_name): New function.
      	(current_function_name): Use it.
      	* ifcvt.c (rest_of_handle_if_conversion): Call dump_reg_info before
      	dump_flow_info.
      	* ira-conflicts.c: Include tree.h with a note.
      	* regstat.c (dump_reg_info): Moved here from cfg.c.
      	* loop-init.c: Include regs.h instead of hard-reg-set.h.
      	(rtl_loop_init): Call dump_reg_info before dump_flow_info.
      	(rtl_loop_done): Likewise.
      	* mcf.c: Include tree.h before langhooks.h.
      	* predict.c (maybe_hot_count_p): Assert we have cfun.
      	(probably_never_executed_bb_p): Likewise.
      	* profile.c (compute_branch_probabilities): Use gimple_dump_cfg
      	instead of dump_flow_info.
      	* sched-deps.c: Include tree.h with a FIXME.
      	(call_may_noreturn_p): Add FIXME note why this function has to
      	look at function decls instead of function decl flags.
      	* sched-vis.c: Include tree.h with a FIXME.
      	(print_rtl_slim): Adjust dump_bb_info uses.
      	* statistics.c (statistics_fini_pass_2): Use current_function_name
      	to avoid including tree.h.
      	(statistics_counter_event): Use function_name for the same reason.
      	(statistics_histogram_event): Likewise.
      	* tracer.c (tracer): Remove bogus gcc_assert.  Use brief_dump_cfg
      	instead of dump_flow_info.
      	* var-tracking.c (variable_tracking_main_1): Call dump_reg_info
      	before dump_flow_info.
      	* doc/cfg.texi: Update CFG documentation.
      	* Makefile.in (RTL_H): Depend on FLAGS_H.
      	(GIMPLE_H): Depend on TREE_H.
      	(FUNCTION_H): Depend on VEC_H, vecir.h, INPUT_H and MACHMODE_H,
      	but no longer on TREE_H.
      	(C_COMMON_H): Depend on TREE_H.
      	(cselib.o, cse.o, cfganal.o, loop-init.o, ira-conflicts.o,
      	sched-deps.o, sched-vis.o): Fixup dependencies.
      
      c-family/
      	* c-common.h: Include tree.h.
      
      cp/
      	* decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
      
      From-SVN: r189359
      Steven Bosscher committed
  14. 17 Jun, 2012 3 commits
    • output.h (split_double): Move prototype to rtl.h. · ca3f2950
      	* output.h (split_double): Move prototype to rtl.h.
      	(constructor_static_from_elts_p): Move prototype to tree.c.
      	* rtl.h (split_double): Moved here from output.h.
      	* tree.h (constructor_static_from_elts_p): Moved here from output.h.
      	* final.c (split_double): Move from here ...
      	* rtlanal.c (split_double): ... to here.
      	* expr.c: Do not include output.h.
      
      From-SVN: r188714
      Steven Bosscher committed
    • cfglayout.h: Remove. · 78bde837
      2012-06-17  Steven Bosscher  <steven@gcc.gnu.org>
      
      	* cfglayout.h: Remove.
      	* cfglayout.c: Remove.
      	* function.h (struct function): Remove x_last_location field.
      	* function.c: Do not include cfglayout.h.
      	(expand_function_start): Do not call no-op force_next_line_note.
      	(expand_function_end): Likewise.
      	* cfgrtl.c: Do not include cfglayout.h.  Include gt-cfgrtl.h.
      	(unlink_insn_chain): Moved here from cfglayout.c.
      	(skip_insns_after_block, label_for_bb, record_effective_endpoints,
      	into_cfg_layout_mode, outof_cfg_layout_mode,
      	pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode,
      	relink_block_chain, fixup_reorder_chain, verify_insn_chain,
      	fixup_fallthru_exit_predecessor, force_one_exit_fallthru,
      	cfg_layout_can_duplicate_bb_p, duplicate_insn_chain,
      	cfg_layout_duplicate_bb, cfg_layout_initialize, break_superblocks,
      	cfg_layout_finalize): Likewise.
      	(rtl_can_remove_branch_p): Likewise.
      	* rtl.h (insn_scope): Move prototype from cfglayout.h here.
      	(duplicate_insn_chain): Likewise.
      	(force_next_line_note): Remove prototype.
      	* emit-rtl.c: Do not include tree-flow.h, egad.  Include vecprim.h.
      	(last_location): Remove #define to emit.x_last_location.
      	(force_next_line_note): Remove no-op function.
      	(init_emit): Don't set x_last_location.
      	(block_locators_locs, block_locators_blocks, locations_locators_locs,
      	locations_locators_vals, prologue_locator, epilogue_locator,
      	curr_location, last_location, curr_block, last_block, curr_rtl_loc):
      	Move POD to here from cfglayout.c.
      	(insn_locators_alloc, insn_locators_finalize, insn_locators_free,
      	set_curr_insn_source_location, get_curr_insn_source_location,
      	set_curr_insn_block, get_curr_insn_block, curr_insn_locator,
      	locator_scope, insn_scope, locator_location, locator_line, insn_line,
      	locator_file, insn_file, locator_eq): Move to here from cfglayout.c.
      	* cfghooks.h: Remove double-include protection.
      	(can_copy_bbs_p, copy_bbs): Move prototypes from cfglayout.h to here.
      	* cfghooks.c (can_copy_bbs_p, copy_bbs): Move to here from cfglayout.c.
      	* final.c: Do not include cfglayout.h.
      	(choose_inner_scope, change_scope): Move to here from cfglayout.c.
      	(reemit_insn_block_notes): Likewise.  Make static.
      	* tree-flow.h (tree_could_trap_p, operation_could_trap_helper_p,
      	operation_could_trap_p, tree_could_throw_p): Move from here...
      	* tree.h: ... to here.
      	* gengtype.c (open_base_files): Remove cfglayout.h from the list.
      	* profile.c: Do not include cfghooks.h.
      	* cfgloopmanip.c: Do not include cfglayout.h and cfghooks.h.
      	* modulo-sched.c: Likewise.
      	* loop-unswitch.c: Do not include cfglayout.h.
      	* sched-ebb.c: Likewise.
      	* tracer.c: Likewise.
      	* ddg.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* loop-init.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* hw-doloop.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* bb-reorder.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* config/alpha/alpha.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* Makefile.in (CFGAYOUT_H): Remove, and fixup users.
      	* config/rs6000/t-rs6000 (rs6000.o): Do not depend on cfglayout.h.
      	* config/spu/t-spu-elf (spu.o: $): Likewise.
      	* config/sparc/t-sparc (sparc.o): Do not depend on CFGLAYOUT_H.
      
      From-SVN: r188712
      Steven Bosscher committed
    • expmed.c (ceil_log2): Move from here... · 46d33ae9
      	* expmed.c (ceil_log2): Move from here...
      	* hwint.c: ... to here for older GCCs...
      	* hwint.h: ... and here for newer GCCs.
      	* rtl.h (ceil_log2): Remove prototype.
      
      	* tree-phinodes.c: Do not include rtl.h.
      	* Makefile.in (tree-phinodes.o): Do not depend on RTL_H.
      
      From-SVN: r188710
      Steven Bosscher committed
  15. 31 May, 2012 1 commit
  16. 29 May, 2012 1 commit
    • rtl.h (assign_stack_temp, [...]): Remove 'keep' argument. · 9474e8ab
      	* rtl.h (assign_stack_temp, assign_stack_temp_for_type,
      	assign_temp): Remove 'keep' argument.
      	(mark_temp_addr_taken): Remove prototype.
      	* tree.h (expand_decl): Remove prototype.
      	* function.c (struct temp_slot): Remove addr_taken and keep
      	member.
      	(assign_stack_temp_for_type) Don't initialize above, remove
      	keep argument.
      	(assign_stack_temp, assign_temp): Remove keep argument.
      	(mark_temp_addr_taken): Remove.
      	(preserve_temp_slots): Remove handling of addr_taken and keep
      	members.
      	(free_temp_slots): Ditto.
      	* expr.c (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Remove
      	dead code.
      	* stmt.c (expand_asm_operands): Remove dead code.
      	(expand_decl): Remove.
      	* c-decl.c (finish_struct): Don't call expand_decl.
      	* builtins.c (expand_builtin_cexpi): Adjust calls to assign_temp
      	and assign_stack_temp.
      	* calls.c (save_fixed_argument_area, initialize_argument_information,
      	expand_call, emit_library_call_value_1, store_one_arg): Ditto.
      	* expmed.c (extract_bit_field_1): Ditto.
      	* expr.c (emit_group_load_1, emit_group_store,
      	copy_blkmode_from_reg, emit_push_insn, expand_assignment,
      	store_field, expand_constructor, expand_cond_expr_using_cmove,
      	expand_expr_real_2, expand_expr_real_1): Ditto.
      	* stmt.c (expand_asm_operands, expand_return): Ditto.
      
      	* function.c (pop_temp_slots): Call free_temp_slots.
      	* calls.c (store_one_arg): Don't call preserve_temp_slots or
      	free_temp_slots.
      	* expr.c (expand_assignment): Don't call free_temp_slots.
      
      	* config/arm/arm.c (neon_expand_vector_init): Ditto.
      	* config/i386/i386.c (ix86_expand_vector_set): Ditto.
      	(ix86_expand_vector_extract): Ditto.
      	* config/ia64/ia64.c (spill_xfmode_rfmode_operand,
      	ia64_expand_movxf_movrf): Ditto.
      	* config/mips/mips.c (mips_expand_vi_general): Ditto.
      	* config/mmix/mmix.md (floatdisf2, floatunsdisf2, truncdfsf2,
      	extendsfdf2): Ditto.
      	* config/rs6000/rs6000.c (rs6000_expand_vector_init,
      	rs6000_expand_vector_set, rs6000_expand_vector_extract,
      	rs6000_allocate_stack_temp): Ditto.
      	* config/rs6000/rs6000.md (fix_trunctfsi2_fprs): Ditto.
      	* config/sparc/sparc.c (emit_soft_tfmode_libcall,
      	sparc_emit_float_lib_cmp, sparc_emit_float_lib_cmp,
      	sparc_expand_vector_init): Ditto.
      
      From-SVN: r187965
      Michael Matz committed
  17. 09 May, 2012 1 commit
    • re PR bootstrap/53249 (Bootstrap failure) · 372d6395
      gcc/
      	PR middle-end/53249
      	* dwarf2out.h (get_address_mode): Move declaration to...
      	* rtl.h: ...here.
      	* dwarf2out.c (get_address_mode): Move definition to...
      	* rtlanal.c: ...here.
      	* var-tracking.c (get_address_mode): Delete.
      	* combine.c (find_split_point): Use get_address_mode instead of
      	targetm.addr_space.address_mode.
      	* cselib.c (cselib_record_sets): Likewise.
      	* dse.c (canon_address, record_store): Likewise.
      	* emit-rtl.c (adjust_address_1, offset_address): Likewise.
      	* expr.c (move_by_pieces, emit_block_move_via_loop, store_by_pieces)
      	(store_by_pieces_1, expand_assignment, store_expr, store_constructor)
      	(expand_expr_real_1): Likewise.
      	* ifcvt.c (noce_try_cmove_arith): Likewise.
      	* optabs.c (maybe_legitimize_operand_same_code): Likewise.
      	* reload.c (find_reloads): Likewise.
      	* sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise.
      	* sel-sched-dump.c (debug_mem_addr_value): Likewise.
      
      From-SVN: r187320
      Richard Sandiford committed
  18. 05 May, 2012 1 commit
    • rtl.h (plus_constant, [...]): Merge into a single plus_constant function. · 0a81f074
      gcc/
      	* rtl.h (plus_constant, plus_constant_mode): Merge into a single
      	plus_constant function.
      	* explow.c (plus_constant, plus_constant_mode): Likewise.  Assert
      	that the mode is sensible.
      	(use_anchored_address, round_push, allocate_dynamic_stack_space)
      	(probe_stack_range, anti_adjust_stack_and_probe): Update calls to
      	plus_constant.
      
      	* alias.c (canon_rtx): Likewise.
      	(init_alias_analysis): Likewise.
      	* builtins.c (expand_builtin_return_addr)
      	(expand_builtin_setjmp_setup, expand_builtin_longjmp)
      	(expand_builtin_nonlocal_goto, expand_builtin_update_setjmp_buf)
      	(expand_builtin_apply_args_1, expand_builtin_apply, expand_movstr)
      	(expand_builtin_stpcpy): Likewise.
      	* calls.c (save_fixed_argument_area, restore_fixed_argument_area)
      	(compute_argument_addresses, internal_arg_pointer_based_exp)
      	(expand_call, emit_library_call_value_1): Likewise.
      	* cfgexpand.c (expand_one_stack_var_at, expand_debug_expr): Likewise.
      	* combine-stack-adj.c (try_apply_stack_adjustment): Likewise.
      	* combine.c (combine_simplify_rtx, force_to_mode): Likewise.
      	* cse.c (insert_const_anchor, find_reg_offset_for_const)
      	(use_related_value, fold_rtx): Likewise.
      	* cselib.c (cselib_subst_to_values): Likewise.
      	* dse.c (record_store, check_mem_read_rtx): Likewise.
      	* dwarf2out.c (rtl_for_decl_location, gen_variable_die): Likewise.
      	* emit-rtl.c (adjust_address_1): Likewise.
      	* except.c (sjlj_emit_function_enter)
      	(expand_builtin_extract_return_addr)
      	(expand_builtin_frob_return_addr): Likewise.
      	* expmed.c (expand_divmod): Likewise.
      	* expr.c (move_by_pieces, store_by_pieces, store_by_pieces_1)
      	(emit_move_resolve_push, push_block, emit_push_insn, store_expr)
      	(expand_expr_addr_expr_1, expand_expr_real_1): Likewise.
      	* function.c (assign_stack_local_1)
      	(instantiate_virtual_regs_in_rtx): Likewise.
      	* optabs.c (prepare_cmp_insn): Likewise.
      	* recog.c (offsettable_address_addr_space_p): Likewise.
      	* reload.c (find_reloads_address, form_sum)
      	(find_reloads_subreg_address): Likewise.
      	* reload1.c (init_reload, eliminate_regs_1)
      	(eliminate_regs_in_insn): Likewise.
      	* simplify-rtx.c (simplify_unary_operation_1)
      	(simplify_binary_operation_1, simplify_plus_minus): Likewise.
      	* var-tracking.c (compute_cfa_pointer, prepare_call_arguments)
      	(vt_add_function_parameter): Likewise.
      
      	* config/alpha/alpha.h (EH_RETURN_HANDLER_RTX): Likewise.
      	* config/alpha/vms.h (EH_RETURN_HANDLER_RTX): Likewise.
      	* config/alpha/alpha.c (alpha_legitimize_address_1)
      	(get_unaligned_address, alpha_expand_unaligned_load)
      	(alpha_expand_unaligned_store, alpha_expand_unaligned_load_words)
      	(alpha_expand_unaligned_store_words, alpha_expand_block_clear)
      	(alpha_expand_builtin_establish_vms_condition_handler)
      	(alpha_setup_incoming_varargs, emit_frame_store_1)
      	(alpha_expand_prologue, alpha_expand_epilogue)
      	(alpha_use_linkage): Likewise.
      	* config/alpha/alpha.md: Likewise.
      
      	* config/arm/arm.c (arm_trampoline_init, legitimize_pic_address)
      	(arm_load_pic_register, arm_pic_static_addr, arm_legitimize_address)
      	(thumb_legitimize_address, arm_gen_load_multiple_1)
      	(arm_gen_store_multiple_1, arm_gen_multiple_op, gen_ldm_seq)
      	(gen_stm_seq, gen_const_stm_seq, arm_block_move_unaligned_straight)
      	(arm_block_move_unaligned_loop, arm_gen_movmemqi, arm_reload_in_hi)
      	(arm_reload_out_hi, arm_reorg, vfp_emit_fstmd, emit_multi_reg_push)
      	(emit_sfm, thumb_set_frame_pointer, arm_expand_prologue)
      	(thumb1_emit_multi_reg_push, thumb1_expand_prologue)
      	(thumb_expand_movmemqi, arm_set_return_address)
      	(thumb_set_return_address): Likewise.
      	* config/arm/arm.md: Likewise.
      
      	* config/avr/avr.c (avr_incoming_return_addr_rtx)
      	(avr_prologue_setup_frame, expand_epilogue)
      	(avr_const_address_lo16): Likewise.
      
      	* config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Likewise.
      	* config/bfin/bfin.c (setup_incoming_varargs, bfin_load_pic_reg)
      	(bfin_expand_prologue, bfin_trampoline_init, bfin_expand_call)
      	(bfin_output_mi_thunk): Likewise.
      
      	* config/c6x/c6x.c (c6x_initialize_trampoline)
      	(c6x_output_mi_thunk): Likewise.
      
      	* config/cr16/cr16.h (EH_RETURN_HANDLER_RTX): Likewise.
      	* config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise.
      
      	* config/cris/cris.c (cris_return_addr_rtx, cris_split_movdx)
      	(cris_expand_prologue, cris_expand_epilogue, cris_gen_movem_load)
      	(cris_emit_movem_store, cris_trampoline_init): Likewise.
      	* config/cris/cris.md: Likewise.
      
      	* config/darwin.c (machopic_indirect_data_reference)
      	(machopic_legitimize_pic_address): Likewise.
      
      	* config/epiphany/epiphany.c (epiphany_emit_save_restore)
      	(epiphany_expand_prologue, epiphany_expand_epilogue)
      	(epiphany_trampoline_init): Likewise.
      	* config/epiphany/epiphany.md: Likewise.
      
      	* config/fr30/fr30.c (fr30_move_double): Likewise.
      
      	* config/frv/frv.c (frv_dwarf_store, frv_expand_prologue)
      	(frv_expand_block_move, frv_expand_block_clear, frv_return_addr_rtx)
      	(frv_index_memory, unspec_got_name, frv_find_base_term)
      	(frv_output_dwarf_dtprel): Likewise.
      
      	* config/h8300/h8300.c (h8300_push_pop, h8300_return_addr_rtx)
      	(h8300_swap_into_er6, h8300_swap_out_of_er6): Likewise.
      
      	* config/i386/i386.h (RETURN_ADDR_RTX): Likewise.
      	* config/i386/i386.c (setup_incoming_varargs_64)
      	(setup_incoming_varargs_ms_64, choose_baseaddr)
      	(ix86_emit_save_reg_using_mov, ix86_adjust_stack_and_probe)
      	(ix86_emit_probe_stack_range, ix86_expand_prologue)
      	(ix86_emit_restore_reg_using_pop, ix86_emit_leave)
      	(ix86_expand_epilogue, legitimize_pic_address, ix86_legitimize_address)
      	(ix86_split_long_move, ix86_expand_movmem, ix86_expand_setmem)
      	(ix86_static_chain, ix86_trampoline_init, x86_this_parameter)
      	(x86_output_mi_thunk): Likewise.
      	* config/i386/i386.md: Likewise.
      
      	* config/ia64/ia64.c (ia64_expand_load_address)
      	(ia64_expand_tls_address, ia64_expand_move, ia64_split_tmode)
      	(do_spill, ia64_trampoline_init): Likewise.
      
      	* config/iq2000/iq2000.c (iq2000_va_start)
      	(iq2000_emit_frame_related_store, iq2000_expand_prologue)
      	(iq2000_expand_eh_return, iq2000_setup_incoming_varargs)
      	(iq2000_print_operand, iq2000_legitimize_address): Likewise.
      
      	* config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise.
      
      	* config/m32c/m32c.c (m32c_return_addr_rtx)
      	(m32c_expand_insv): Likewise.
      
      	* config/m32r/m32r.c (m32r_setup_incoming_varargs)
      	(m32r_legitimize_pic_address, m32r_print_operand)
      	(m32r_print_operand_address): Likewise.
      
      	* config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
      	* config/m68k/m68k.h (RETURN_ADDR_RTX): Likewise.
      	(EH_RETURN_HANDLER_RTX): Likewise.
      	* config/m68k/m68k.c (m68k_emit_movem, m68k_expand_prologue)
      	(m68k_expand_epilogue, legitimize_pic_address)
      	(m68k_output_mi_thunk): Likewise.
      	* config/m68k/m68k.md: Likewise.
      
      	* config/mcore/mcore.c (mcore_expand_prolog): Likewise.
      	(mcore_expand_epilog): Likewise.
      	* config/mcore/mcore.md: Likewise.
      
      	* config/mep/mep.c (mep_allocate_initial_value)
      	(mep_expand_prologue, mep_expand_epilogue): Likewise.
      
      	* config/microblaze/microblaze.c (double_memory_operand)
      	(microblaze_block_move_loop): Likewise.
      
      	* config/mips/mips.c (mips_strip_unspec_address, mips_add_offset)
      	(mips_setup_incoming_varargs, mips_va_start, mips_block_move_loop)
      	(mips_print_operand, mips16e_save_restore_reg, mips_save_restore_reg)
      	(mips_expand_prologue, mips_epilogue_set_cfa)
      	(mips_expand_epilogue): Likewise.
      	* config/mips/mips.md: Likewise.
      
      	* config/mmix/mmix.c (mmix_dynamic_chain_address, mmix_return_addr_rtx)
      	(mmix_expand_prologue, mmix_expand_epilogue): Likewise.
      
      	* config/mn10300/mn10300.c (mn10300_gen_multiple_store)
      	(mn10300_builtin_saveregs, mn10300_trampoline_init): Likewise.
      
      	* config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Likewise.
      	(EH_RETURN_HANDLER_RTX): Likewise.
      	* config/moxie/moxie.c (moxie_static_chain): Likewise.
      
      	* config/pa/pa.c (legitimize_pic_address, hppa_legitimize_address)
      	(store_reg, set_reg_plus_d, pa_expand_prologue, load_reg)
      	(pa_return_addr_rtx, hppa_builtin_saveregs)
      	(pa_trampoline_init): Likewise.
      	* config/pa/pa.md: Likewise.
      
      	* config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise.
      
      	* config/picochip/picochip.c (picochip_static_chain): Likewise.
      
      	* config/rs6000/rs6000.h (RS6000_SAVE_TOC): Likewise.
      	* config/rs6000/rs6000.c (rs6000_legitimize_address)
      	(setup_incoming_varargs, print_operand, rs6000_return_addr)
      	(rs6000_emit_eh_reg_restore, rs6000_emit_probe_stack_range)
      	(rs6000_emit_epilogue)
      	(rs6000_machopic_legitimize_pic_address): Likewise.
      
      	* config/rx/rx.c (gen_rx_rtsd_vector, gen_rx_popm_vector): Likewise.
      
      	* config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Likewise.
      	(DYNAMIC_CHAIN_ADDRESS): Likewise.
      	* config/s390/s390.c (s390_decompose_address, legitimize_pic_address)
      	(s390_delegitimize_address, print_operand, annotate_constant_pool_refs)
      	(replace_constant_pool_ref, s390_return_addr_rtx, s390_back_chain_rtx)
      	(save_fpr, restore_fpr, save_gprs, restore_gprs, s390_emit_prologue)
      	(s390_emit_epilogue, s390_function_profiler): Likewise.
      	* config/s390/s390.md: Likewise.
      
      	* config/score/score.c (score_add_offset, score_prologue): Likewise.
      
      	* config/sh/sh.c (expand_block_move, push_regs, sh_builtin_saveregs)
      	(sh_output_mi_thunk): Likewise.
      	* config/sh/sh.md: Likewise.
      
      	* config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS, FRAME_ADDR_RTX)
      	(RETURN_ADDR_RTX, INCOMING_RETURN_ADDR_RTX): Likewise.
      	* config/sparc/sparc.c (sparc_legitimize_pic_address)
      	(sparc_emit_probe_stack_range, emit_save_or_restore_regs)
      	(emit_window_save, sparc_flat_expand_prologue, sparc_struct_value_rtx)
      	(emit_and_preserve): Likewise.
      	* config/sparc/sparc.md: Likewise.
      
      	* config/spu/spu.h (DYNAMIC_CHAIN_ADDRESS): Likewise.
      	* config/spu/spu.c (spu_expand_insv, spu_machine_dependent_reorg)
      	(spu_setup_incoming_varargs, ea_load_store_inline)
      	(spu_expand_load): Likewise.
      
      	* config/stormy16/stormy16.c (xstormy16_expand_prologue)
      	(combine_bnp): Likewise.
      
      	* config/tilegx/tilegx.h (DYNAMIC_CHAIN_ADDRESS): Likewise.
      	* config/tilegx/tilegx.c (tilegx_setup_incoming_varargs)
      	(tilegx_expand_unaligned_load, tilegx_trampoline_init): Likewise.
      
      	* config/tilepro/tilepro.h (DYNAMIC_CHAIN_ADDRESS): Likewise.
      	* config/tilepro/tilepro.c (tilepro_setup_incoming_varargs)
      	(tilepro_expand_unaligned_load, tilepro_trampoline_init): Likewise.
      
      	* config/v850/v850.c (expand_prologue, expand_epilogue): Likewise.
      	* config/v850/v850.md: Likewise.
      
      	* config/vax/elf.h (EH_RETURN_STACKADJ_RTX): Likewise.
      	(EH_RETURN_HANDLER_RTX): Likewise.
      	* config/vax/vax.h (DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX): Likewise.
      	* config/vax/vax.c (vax_add_reg_cfa_offset, vax_expand_prologue)
      	(print_operand_address, vax_trampoline_init): Likewise.
      
      	* config/xtensa/xtensa.c (xtensa_expand_prologue, xtensa_return_addr)
      	(xtensa_function_value_regno_p): Likewise.
      
      From-SVN: r187199
      Richard Sandiford committed
  19. 01 May, 2012 1 commit
    • Makefile.in (lower-subreg.o, [...]): Depend on lower-subreg.h. · af4ba423
      gcc/
      2012-03-31  Kenneth Zadeck  <zadeck@naturalbridge.com>
      	    Richard Sandiford  <r.sandiford@uk.ibm.com>
      
      	* Makefile.in (lower-subreg.o, target-globals.o): Depend on
      	lower-subreg.h.
      	* lower-subreg.h: New file.
      	* target-globals.h (this_target_lower_subreg): Declare.
      	(target_globals): Add lower_subreg;
      	(restore_target_globals): Restore this_target_lower_subreg.
      	* target-globals.c: Include it.
      	(default_target_globals): Add default_target_lower_subreg.
      	(save_target_globals): Initialize target_lower_subreg.
      	* rtl.h (init_lower_subreg): Added declaration.
      	* toplev.c (backend_init_target): Call initializer for lower-subreg
      	pass.
      	* lower-subreg.c (LOG_COSTS, FORCE_LOWERING): New macros.
      	(default_target_lower_subreg): New variable.
      	(this_target_lower_subreg): Likewise.
      	(twice_word_mode, choices): New macros.
      	(shift_cost, compute_splitting_shift, compute_costs)
      	(init_lower_subreg): New functions.
      	(resolve_simple_move): Add speed_p argument.  Check choices.
      	(find_pseudo_copy): Don't check the mode size here.
      	(resolve_simple_move): Assert the mode size.
      	(find_decomposable_shift_zext): Add speed_p argument and return
      	a bool.  Check choices.
      	(resolve_shift_zext): Add comment.
      	(dump_shift_choices, dump_choices): New functions.
      	(decompose_multiword_subregs): Dump list of profitable
      	transformations.  Add code to skip non profitable transformations.
      	Update calls to simple_move and find_decomposable_shift_zext.
      
      Co-Authored-By: Richard Sandiford <r.sandiford@uk.ibm.com>
      
      From-SVN: r187015
      Kenneth Zadeck committed
  20. 21 Apr, 2012 1 commit
    • re PR bootstrap/53021 (bootstrap failure on Linux/ia32) · 9e412ca3
      gcc/
      	PR bootstrap/53021
      	* rtl.def (ADDRESS): Use "i" rather than "w".
      	* rtl.h (find_base_term): Delete.
      	(may_be_sp_based_p): Declare.
      	* rtl.c (rtx_code_size): Remove ADDRESS special case.
      	* alias.h (UNIQUE_BASE_VALUE_SP, UNIQUE_BASE_VALUE_ARGP)
      	(UNIQUE_BASE_VALUE_FP, UNIQUE_BASE_VALUE_HFP): Move to...
      	* alias.c: ...here.
      	(find_base_term): Make static.
      	(may_be_sp_based_p): New function.
      	* dse.c (record_store): Use it.
      	* store-motion.c (store_killed_in_insn): Likewise.
      
      From-SVN: r186657
      Richard Sandiford committed
  21. 14 Apr, 2012 1 commit
    • cfgcleanup.c (try_optimize_cfg): Replace call to delete_insn_chain by call to delete_insn. · 03fbe718
      2012-04-14  Tom de Vries  <tom@codesourcery.com>
      
      	* cfgcleanup.c (try_optimize_cfg): Replace call to delete_insn_chain by
      	call to delete_insn.  Remove code to reorder BASIC_BLOCK note and
      	DELETED_LABEL note, and move it to ...
      	* cfgrtl.c (delete_insn): ... here.  Change return type to void.
      	(delete_insn_and_edges): Likewise.
      	(delete_insn_chain): Handle new return type of delete_insn.  Delete
      	chain backwards rather than forwards.
      	* rtl.h (delete_insn, delete_insn_and_edges): Change return type to
      	void.
      	* cfglayout.c (fixup_reorder_chain): Delete unused label.
      
      From-SVN: r186451
      Tom de Vries committed
  22. 11 Apr, 2012 1 commit
    • re PR target/16458 (PowerPC - redundant compare) · 7bc14a04
      gcc/
      	PR target/16458
      	* rtlanal.c (unsigned_reg_p): New function.
      	Update copyright notice dates.
      	* rtl.h (unsigned_reg_p): Prototype it.
      	Update copyright notice dates.
      	* config/rs6000/rs6000.c (rs6000_generate_compare): Use it.
      	Update comment.
      	* expr.c (expand_expr_real_1): Set register attributes.
      	* stmt.c (expand_case): Likewise.
      
      gcc/testsuite/
      	PR target/16458
      	* gcc.target/powerpc/pr16458-1.c: New test.
      	* gcc.target/powerpc/pr16458-2.c: Likewise.
      	* gcc.target/powerpc/pr16458-3.c: Likewise.
      	* gcc.target/powerpc/pr16458-4.c: Likewise.
      
      Co-Authored-By: Michael Matz <matz@suse.de>
      
      From-SVN: r186312
      Peter Bergner committed
  23. 04 Apr, 2012 1 commit
    • rtl.texi (const_double): Document as sign-extending. · 929e10f4
      	* doc/rtl.texi (const_double): Document as sign-extending.
      	* expmed.c (expand_mult): Ensure we don't use shift
      	incorrectly.
      	* emit-rtl.c (immed_double_int_const): Refine to state the
      	value is signed.
      	* simplify-rtx.c (mode_signbit_p): Add a fixme for wider than
      	CONST_DOUBLE integers.
      	(simplify_const_unary_operation, UNSIGNED_FLOAT): Ensure no
      	negative values are converted.  Fix conversions bigger than
      	HOST_BITS_PER_WIDE_INT.
      	(simplify_binary_operation_1): Ensure we don't use shift
      	incorrectly.
      	(simplify_immed_subreg): Sign-extend CONST_DOUBLEs.
      	* explow.c (plus_constant_mode): Add.
      	(plus_constant): Implement with plus_constant_mode.
      	* rtl.h (plus_constant_mode): Add.
      
      From-SVN: r186147
      Mike Stump committed
  24. 02 Apr, 2012 1 commit
  25. 29 Mar, 2012 1 commit
    • cgraph.h (cgraph_materialize_all_clones): Remove. · 711417cd
      2012-03-29  Richard Guenther  <rguenther@suse.de>
      
      	* cgraph.h (cgraph_materialize_all_clones): Remove.
      	(reset_inline_failed): Likewise.
      	* cgraphunit.c (cgraph_materialize_all_clones): Make static.
      	* cgraphbuild.c (reset_inline_failed): Remove.
      	* rtl.h (cse_main): Remove.
      	(extended_count): Likewise.
      	* cse.c (dump_class): Mark as DEBUG_FUNCTION.
      	(cse_main): Make static.
      	* combine.c (extended_count): Remove.
      	(dump_combine_stats): Mark as DEBUG_FUNCTION.
      	* basic-block.h (reorder_basic_blocks): Remove.
      	* bb-reorder.c (reorder_basic_blocks): Make static.
      	* Makefile.in (dse.o): Remove dse.h dependency.
      	* dse.h: Remove.
      	* dse.c (gate_dse): Remove.
      	(clear_alias_mode_eq): Likewise.
      	(clear_alias_mode_hash): Likewise.
      	(dse_record_singleton_alias_set): Likewise.
      	(dse_invalidate_singleton_alias_set): Likewise.
      
      From-SVN: r185962
      Richard Guenther committed
  26. 07 Mar, 2012 1 commit
  27. 06 Mar, 2012 1 commit
  28. 24 Jan, 2012 2 commits
    • rtl.texi (MEM_IN_STRUCT_P, [...]): Delete. · 55356334
      gcc/
      	* doc/rtl.texi (MEM_IN_STRUCT_P, MEM_SCALAR_P): Delete.
      	(in_struct, return_val): Remove MEM documentation.
      	* rtl.h (rtx_def): Remove MEM meanings from in_struct and return_val.
      	(MEM_IN_STRUCT_P, MEM_SCALAR_P): Delete.
      	(MEM_COPY_ATTRIBUTES): Remove references to MEM_IN_STRUCT_P
      	and MEM_SCALAR.
      	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
      	* cfgexpand.c (add_alias_set_conflicts): Likewise.
      	* expr.c (store_field): Likewise.
      	* function.c (assign_stack_temp_for_type): Likewise.
      	* ifcvt.c (noce_try_cmove_arith): Likewise.
      	* reload1.c (reload): Likewise.
      	* config/alpha/alpha.c (alpha_set_memflags_1): Likewise.
      	(alpha_set_memflags): Likewise.
      	* config/m32c/m32c.c (m32c_immd_dbl_mov): Nullify.
      
      gcc/testsuite/
      	* gcc.dg/memcpy-4.c: Don't expect /s on MEMs.
      
      From-SVN: r183486
      Richard Sandiford committed
    • rtl.h (true_dependence, [...]): Remove varies parameter. · 53d9622b
      gcc/
      	* rtl.h (true_dependence, canon_true_dependence): Remove varies
      	parameter.
      	* alias.c (fixed_scalar_and_varying_struct_p): Delete.
      	(true_dependence_1, write_dependence_p, may_alias_p): Don't call it.
      	(true_dependence_1, true_dependence, canon_true_dependence): Remove
      	varies parameter.
      	* cselib.c (cselib_rtx_varies_p): Delete.
      	(cselib_invalidate_mem): Update call to canon_true_dependence.
      	* dse.c (record_store, check_mem_read_rtx): Likewise.
      	(scan_reads_nospill): Likewise.
      	* cse.c (check_dependence): Likewise.
      	(cse_rtx_varies_p): Delete.
      	* expr.c (safe_from_p): Update call to true_dependence.
      	* ira.c (validate_equiv_mem_from_store): Likewise.
      	(memref_referenced_p): Likewise.
      	* postreload-gcse.c (find_mem_conflicts): Likewise.
      	* sched-deps.c (sched_analyze_2): Likewise.
      	* store-motion.c (load_kills_store): Likewise.
      	* config/frv/frv.c (frv_registers_conflict_p_1): Likewise.
      	* gcse.c (mems_conflict_for_gcse_p): Likewise.
      	(compute_transp): Update call to canon_true_dependence.
      
      From-SVN: r183485
      Richard Sandiford committed
  29. 09 Dec, 2011 1 commit
  30. 06 Nov, 2011 1 commit
    • regset.h (fixed_reg_set_regset): Declare. · 9e582b1d
              * regset.h (fixed_reg_set_regset): Declare.
              * dse.c: Include regset.h .
              (struct insn_info): Add member fixed_regs_live.
              (note_add_store_info): New typedef.
              (note_add_store): New function.
              (emit_inc_dec_insn_before): Expect arg to be of type insn_info_t .
              Use gen_add3_insn / gen_move_insn.
              Check new insn for unwanted clobbers before emitting it.
              (check_for_inc_dec): Rename to...
              (check_for_inc_dec_1:) ... this.  Return bool.  Take insn_info
              parameter.  Changed all callers in file.
              (check_for_inc_dec, copy_fixed_regs): New functions.
              (scan_insn): Set fixed_regs_live field of insn_info.
              * rtl.h (check_for_inc_dec): Update prototype.
              * postreload.c (reload_cse_simplify): Take new signature of
              check_ind_dec into account.
              * reginfo.c (fixed_reg_set_regset): New variable.
              (init_reg_sets_1): Initialize it.
      
      Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
      
      From-SVN: r181046
      Joern Rennecke committed
  31. 30 Oct, 2011 1 commit
  32. 21 Oct, 2011 1 commit
    • reg-notes.def (DEP_CONTROL): New. · e2724e63
      	* reg-notes.def (DEP_CONTROL): New.
      	* sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when
      	not doing speculation.
      	* rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets,
      	record_hard_reg_uses_1, record_hard_reg_uses): New functions.
      	* function.c (record_hard_reg_sets, record_hard_reg_uses,
      	record_hard_reg_uses_1): Remove; move to rtlanal.c.
      	* lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions.
      	* haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h".
      	(MUST_RECOMPUTE_SPEC_P): New macro.
      	(real_insn_for_shadow): New function.
      	(cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions,
      	toggle_cancelled_flags): New static functions.
      	(schedule_insn): Relax an assert to only check for empty hard back
      	dependencies.  Skip cancelled dependencies.  Call
      	check_clobbered_conditions.
      	(copy_insn_list): Remove function, renamed moved to lists.c.
      	(save_backtrack_point): Use new spelling copy_INSN_LIST.
      	(unschedule_insns_until): Ensure TODO_SPEC is reset properly.
      	(restore_last_backtrack_point): Likewise.  Call toggle_cancelled_flags.
      	(estimate_insn_tick): Ignore cancelled dependencies.
      	(haifa_speculate_insn): Move declaration.
      	(try_ready): Move code into recompute_todo_spec and call it.  Tweak
      	some asserts.  Ensure predicated patterns are restored if necessary.
      	Dump DEP_CONTROL flag.
      	(haifa_change_pattern): Merge with sched_change_pattern.
      	(sched_change_pattern): Remove function.
      	* sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove.  All
      	uses changed to simply not test NON_FLUSH_JUMP_P.
      	(ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle
      	REG_DEP_CONTROL.
      	(dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative.
      	(reg_pending_control_uses, control_dependency_cache): New static
      	variables.
      	(sched_get_reverse_condition_uncached): New function.
      	(sd_find_dep_between): Remove pointless assert.  Look in
      	control_dependency_cache.
      	(ask_dependency_caches, set_dependency_caches, sd_delete_dep,
      	extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL
      	and control_dependency_cache.
      	(sd_unresolve_dep): Use dep_spec_p.
      	(add_dependence): Now a wrapper around add_dependence_1, handling
      	REG_DEP_CONTROL specially.
      	(flush_pending_lists): Clear pending_jump_insns.
      	(sched_analyze_1): Handle pending_jump_insns like a memory flush.
      	(sched_analyze_2): Unconditionally add to pending memory flushes,
      	keep previous behaviour but apply it to pending_jump_insns instead.
      	(sched_analyze_insn): Defer adding jump reg dependencies using
      	reg_pending_control_uses; add them to the control_uses list.  Handle
      	pending_jump_insns and control_uses when adding dependence lists.
      	(deps_analyze_insn): Update INSN_COND_DEPS.
      	(deps_analyze_insn): Add jumps to pending_jump_insns rather than
      	last_pending_memory_flush.
      	(init_deps): Initialize pending_jump_insns.
      	(free_deps): Free control_uses.
      	(remove_from_deps): Remove from pending_jump_insns.
      	(init_deps_global): Allocate reg_pending_control_uses).
      	(finish_deps_global): Free it.
      	(add_dependence_1): Renamed from add_dependence.  Handle
      	REG_DEP_CONTROL.
      	* rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare.
      	(copy_INSN_LIST, concat_INSN_LIST): Declare.
      	* sched-int.h (struct deps_reg): Add control_uses.
      	(struct deps_desc): Add pending_jump_insns.
      	(struct _haifa_deps_insn_data): Add cond_deps.
      	(struct _haifa_insn_data): Add must_recompute_spec and predicated_pat.
      	(INSN_COND_DEPS, PREDICATED_PAT): New macros.
      	(BITS_PER_DEP_WEAK): Adjust for two extra bits in the word.
      	(DEP_CONTROL): New macro.
      	(DEP_TYPES): Include it.
      	(HARD_DEP): Adjust definition.
      	(DEP_CANCELLED): New macro.
      	(enum SCHED_FLAGS): Add DO_PREDICATION.
      	(sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare.
      	* sched-rgn.c (concat_INSN_LIST): Remove function.
      	(deps_join): Handle pending_jump_insns.
      	(free_pending_lists): Likewise.
      	* config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final
      	schedule.
      
      From-SVN: r180302
      Bernd Schmidt committed
  33. 19 Oct, 2011 1 commit
    • re PR middle-end/49310 (Compile time hog in var-tracking emit) · 09dbcd96
      PR debug/49310
      * var-tracking.c (loc_exp_dep, onepart_aux): New structs.
      (variable_part): Replace offset with union.
      (enum onepart_enum, onepart_enum_t): New.
      (variable_def): Drop cur_loc_changed, add onepart.
      (value_chain_def, const_value_chain): Remove.
      (VAR_PART_OFFSET, VAR_LOC_1PAUX): New macros, with checking.
      (VAR_LOC_DEP_LST, VAR_LOC_DEP_LSTP): New macros.
      (VAR_LOC_FROM, VAR_LOC_DEPTH, VAR_LOC_DEP_VEC): Likewise.
      (value_chain_pool, value_chains): Remove.
      (dropped_values): New.
      (struct parm_reg): Only if HAVE_window_save.
      (vt_stack_adjustments): Don't record register arguments.
      (dv_as_rtx): New.
      (dv_onepart_p): Return a onepart_enum_t.
      (onepart_pool): New.
      (dv_pool): Remove.
      (dv_from_rtx): New.
      (variable_htab_free): Release onepart aux data.  Reset flags.
      (value_chain_htab_hash, value_chain_htab_eq): Remove.
      (unshare_variable): Use onepart field.  Propagate onepart aux
      data or offset.  Drop cur_loc_changed.
      (val_store): Cope with NULL insn.  Rephrase dump output.  Check
      for unsuitable locs.  Add FIXME on using cselib locs.
      (val_reset): Remove FIXME of unfounded concerns.
      (val_resolve): Check for unsuitable locs.  Add FIXME on using
      cselib locs.
      (variable_union): Use onepart field, adjust access to offset.
      (NO_LOC_P): New.
      (VALUE_CHANGED, DECL_CHANGED): Update doc.
      (set_dv_changed): Clear NO_LOC_P when changed.
      (find_loc_in_1pdv): Use onepart field.
      (intersect_loc_chains): Likewise.
      (unsuitable_loc): New.
      (loc_cmp): Keep ENTRY_VALUEs at the end of the loc list.
      (add_value_chain, add_value_chains): Remove.
      (add_cselib_value_chains, remove_value_chain): Likewise.
      (remove_value_chains, remove_cselib_value_chains): Likewise.
      (canonicalize_loc_order_check): Use onepart.  Drop cur_loc_changed.
      (canonicalize_values_star, canonicalize_vars_star): Use onepart.
      (variable_merge_over_cur): Likewise.  Adjust access to offset.
      Drop cur_loc_changed.
      (variable_merge_over_src): Use onepart field.
      (remove_duplicate_values): Likewise.
      (variable_post_merge_new_vals): Likewise.
      (find_mem_expr_in_1pdv): Likewise.
      (dataflow_set_preserve_mem_locs): Likewise.  Drop cur_loc_changed
      and value chains.
      (dataflow_set_remove_mem_locs): Likewise.  Use VAR_LOC_FROM.
      (variable_different_p): Use onepart field.  Move onepart test out
      of the loop.
      (argument_reg_set): Drop.
      (add_uses, add_stores): Preserve but do not record in dynamic
      tables equivalences for ENTRY_VALUEs and CFA_based addresses.
      Avoid unsuitable address expressions.
      (EXPR_DEPTH): Unlimit.
      (EXPR_USE_DEPTH): Repurpose PARAM_MAX_VARTRACK_EXPR_DEPTH.
      (prepare_call_arguments): Use DECL_RTL_IF_SET.
      (dump_var): Adjust access to offset.
      (variable_from_dropped, recover_dropped_1paux): New.
      (variable_was_changed): Drop cur_loc_changed.  Use onepart.
      Preserve onepart aux in empty_var.  Recover empty_var and onepart
      aux from dropped_values.
      (find_variable_location_part): Special-case onepart.  Adjust
      access to offset.
      (set_slot_part): Use onepart.  Drop cur_loc_changed.  Adjust
      access to offset.  Initialize onepaux.  Drop value chains.
      (delete_slot_part): Drop value chains.  Use VAR_LOC_FROM.
      (VEC (variable, heap), VEC (rtx, stack)): Define.
      (expand_loc_callback_data): Drop dummy, cur_loc_changed,
      ignore_cur_loc.  Add expanding, pending, depth.
      (loc_exp_dep_alloc, loc_exp_dep_clear): New.
      (loc_exp_dep_insert, loc_exp_dep_set): New.
      (notify_dependents_of_resolved_value): New.
      (update_depth, vt_expand_var_loc_chain): New.
      (vt_expand_loc_callback): Revamped.
      (resolve_expansions_pending_recursion): New.
      (INIT_ELCD, FINI_ELCD): New.
      (vt_expand_loc): Use the new macros above.  Drop ignore_cur_loc
      parameter, adjust all callers.
      (vt_expand_loc_dummy): Drop.
      (vt_expand_1pvar): New.
      (emit_note_insn_var_location): Operate on non-debug decls only.
      Revamp multi-part cur_loc recomputation and one-part expansion.
      Drop cur_loc_changed.  Adjust access to offset.
      (VEC (variable, heap)): Drop.
      (changed_variables_stack, changed_values_stack): Drop.
      (check_changed_vars_0, check_changed_vars_1): Remove.
      (check_changed_vars_2, check_changed_vars_3): Remove.
      (values_to_stack, remove_value_from_changed_variables): New.
      (notify_dependents_of_changed_value, process_changed_values): New.
      (emit_notes_for_changes): Revamp onepart updates.
      (emit_notes_for_differences_1): Use onepart.  Drop cur_loc_changed
      and value chains.  Propagate onepaux.  Recover empty_var and onepaux
      from dropped_values.
      (emit_notes_for_differences_2): Drop value chains.
      (emit_notes_in_bb): Adjust.
      (vt_emit_notes): Drop value chains, changed_variables_stack.
      Initialize and release dropped_values.
      (create_entry_value): Revamp.
      (vt_add_function_parameter): Use new interface.
      (note_register_arguments): Remove.
      (vt_initialize): Drop value chains and register arguments.
      (vt_finalize): Drop value chains.  Release windowed_parm_regs only
      if HAVE_window_save.
      * rtl.h: Document various pass-local uses of RTL flags.
      * tree.h (DECL_RTL_KNOWN_SET): New.
      * doc/invoke.texi (param max-vartrack-expr-depth): Update
      description and default.
      
      From-SVN: r180194
      Alexandre Oliva committed
  34. 15 Oct, 2011 1 commit
    • re PR rtl-optimization/49941 (segmentation fault in redirect_jump_2) · 387748de
      	PR rtl-optimization/49941
      	* jump.c (mark_jump_label_1): Set JUMP_LABEL for simple_return jumps.
      
      	* rtl.h (set_return_jump_label): Declare.
      	* function.c (set_return_jump_label): New function, extracted..
      	(thread_prologue_and_epilogue_insns): ..from here.  Use it in
      	another instance to set return jump_label.
      	* cfgrtl.c (force_nonfallthru_and_redirect): Use set_return_jump_label.
      	* reorg.c (find_end_label): Likewise.
      
      From-SVN: r180027
      Alan Modra committed
  35. 27 Sep, 2011 1 commit
    • rtl.h (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE from 3 x MAX_MACHINE_MODE. · e7c82a99
      	* rtl.h (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE
      	from 3 x MAX_MACHINE_MODE.
      	(CONSTM1_RTX): Define.
      	* emit-rtl.c (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE
              from 3 x MAX_MACHINE_MODE.
      	(gen_rtx_CONST_VECTOR): Use CONSTM1_RTX if all inner constants are
      	CONSTM1_RTX.
      	(init_emit_once): Initialize CONSTM1_RTX for MODE_INT and
      	MODE_VECTOR_INT modes.
      	* simplify-rtx.c (simplify_binary_operation_1) <case IOR, XOR, AND>:
      	Optimize if one operand is CONSTM1_RTX.
      	* config/i386/i386.c (ix86_expand_sse_movcc): Optimize mask ? -1 : x
      	into mask | x.
      
      From-SVN: r179238
      Jakub Jelinek committed
  36. 27 Aug, 2011 1 commit
    • rtl.texi (simple_return): Document. · 26898771
      	* doc/rtl.texi (simple_return): Document.
      	(parallel, PATTERN): Here too.
      	* doc/md.texi (return): Mention it's allowed to expand to simple_return
      	in some cases.
      	(simple_return): Document standard pattern.
      	* gengenrtl.c (special_rtx): SIMPLE_RETURN is special.
      	* final.c (final_scan_insn): Use ANY_RETURN_P on body.
      	* reorg.c (function_return_label, function_simple_return_label):
      	New static variables, replacing...
      	(end_of_function_label): ... this.
      	(simplejump_or_return_p): New static function.
      	(optimize_skip, steal_delay_list_from_fallthrough,
      	fill_slots_from_thread): Use it.
      	(relax_delay_slots): Likewise.  Use ANY_RETURN_P on body.
      	(rare_destination, follow_jumps): Use ANY_RETURN_P on body.
      	(find_end_label): Take a new arg which is one of the two return
      	rtxs.  Depending on which, set either function_return_label or
      	function_simple_return_label.  All callers changed.
      	(make_return_insns): Make both kinds.
      	(dbr_schedule): Adjust for two kinds of end labels.
      	* function.c (emit_return_into_block): Set JUMP_LABEL properly.
      	* genemit.c (gen_exp): Handle SIMPLE_RETURN.
      	(gen_expand, gen_split): Use ANY_RETURN_P.
      	* df-scan.c (df_uses_record): Handle SIMPLE_RETURN.
      	* rtl.def (SIMPLE_RETURN): New code.
      	* ifcvt.c (find_if_case_1): Be more careful about
      	redirecting jumps to the EXIT_BLOCK.
      	* jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p,
      	returnjump_p_1): Handle SIMPLE_RETURNs.
      	* print-rtl.c (print_rtx): Likewise.
      	* rtl.c (copy_rtx): Likewise.
      	* bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P.
      	* combine.c (simplify_set): Likewise.
      	* resource.c (find_dead_or_set_registers, mark_set_resources):
      	Likewise.
      	* emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1,
      	copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs.
      	(init_emit_regs): Initialize simple_return_rtx.
      	* cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to
      	force_nonfallthru_and_redirect.
      	* rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN.
      	(GR_SIMPLE_RETURN): New enum value.
      	(simple_return_rtx): New macro.
      	* basic-block.h (force_nonfallthru_and_redirect): Adjust
      	declaration.
      	* cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label
      	argument.  All callers changed.  Be careful about what kinds of
      	returnjumps to generate.
      	* config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb,
      	ix86_pad_short_function): Likewise.
      	* config/arm/arm.c (arm_final_prescan_insn): Handle both kinds
      	of return.
      	* config/mips/mips.md (any_return): New code_iterator.
      	(optab): Add cases for return and simple_return.
      	(return): Expand to a simple_return.
      	(simple_return): New pattern.
      	(*<optab>, *<optab>_internal for any_return): New patterns.
      	(return_internal): Remove.
      	* config/mips/mips.c (mips_expand_epilogue): Make the last insn
      	a simple_return_internal.
      
      From-SVN: r178135
      Bernd Schmidt committed