Commit Graph

46 Commits

Author SHA1 Message Date
Alexandre Oliva b5b8b0ac64 invoke.texi (-fvar-tracking-assignments): New.
gcc/ChangeLog:
* doc/invoke.texi (-fvar-tracking-assignments): New.
(-fvar-tracking-assignments-toggle): New.
(-fdump-final-insns=file): Mark filename as optional.
(--param min-nondebug-insn-uid): New.
(-gdwarf-@{version}): Mention version 4.
* opts.c (common_handle_option): Accept it.
* tree-vrp.c (find_assert_locations_1): Skip debug stmts.
* regrename.c (regrename_optimize): Drop last.  Don't count debug
insns as uses.  Don't reject change because of debug insn.
(do_replace): Reject DEBUG_INSN as chain starter.  Take base_regno
from the chain starter, and check for inexact matches in
DEBUG_INSNS.
(scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
(build_def_use): Simplify and fix the marking of DEBUG_INSNs.
* sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
* fwprop.c (forward_propagate_and_simplify): ...into debug insns.
* doc/gimple.texi (is_gimple_debug): New.
(gimple_debug_bind_p): New.
(is_gimple_call, gimple_assign_cast_p): End sentence with period.
* doc/install.texi (bootstrap-debug): More details.
(bootstrap-debug-big, bootstrap-debug-lean): Document.
(bootstrap-debug-lib): More details.
(bootstrap-debug-ckovw): Update.
(bootstrap-time): New.
* tree-into-ssa.c (mark_def_sites): Skip debug stmts.
(insert_phi_nodes_for): Insert debug stmts.
(rewrite_stmt): Take iterator.  Insert debug stmts.
(rewrite_enter_block): Adjust.
(maybe_replace_use_in_debug_stmt): New.
(rewrite_update_stmt): Use it.
(mark_use_interesting): Return early for debug stmts.
* tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug
stmts before replacing stmt.
(move_computations_stmt): Likewise.
* ira-conflicts.c (add_copies): Skip debug insns.
* regstat.c (regstat_init_n_sets_and_refs): Discount debug insns.
(regstat_bb_compute_ri): Skip debug insns.
* tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts.
* tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
check_loop_closed_ssa_stmt): Skip debug stmts.
* tree-tailcall.c (find_tail_calls): Likewise.
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
* tree.h (MAY_HAVE_DEBUG_STMTS): New.
(build_var_debug_value_stat): Declare.
(build_var_debug_value): Define.
(target_for_debug_bind): Declare.
* reload.c (find_equiv_reg): Skip debug insns.
* rtlanal.c (reg_used_between_p): Skip debug insns.
(side_effects_p): Likewise.
(canonicalize_condition): Likewise.
* ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
insns never depend on debug insns.
(create_ddg_dep_no_link): Likewise.
(add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
Don't add inter-loop dependencies for debug insns.
(build_intra_loop_deps): Likewise.
(create_ddg): Count debug insns.
* ddg.h (struct ddg::num_debug): New.
(num_backargs): Pair up with previous int field.
* diagnostic.c (diagnostic_report_diagnostic): Skip notes on
-fcompare-debug-second.
* final.c (get_attr_length_1): Skip debug insns.
(rest_of_clean-state): Don't dump CFA_RESTORE_STATE.
* gcc.c (invoke_as): Call compare-debug-dump-opt.
(driver_self_specs): Map -fdump-final-insns to
-fdump-final-insns=..
(get_local_tick): New.
(compare_debug_dump_opt_spec_function): Test for . argument and
compute output name.  Compute temp output spec without flag name.
Compute -frandom-seed.
(OPT): Undef after use.
* cfgloopanal.c (num_loop_insns): Skip debug insns.
(average_num_loop_insns): Likewise.
* params.h (MIN_NONDEBUG_INSN_UID): New.
* gimple.def (GIMPLE_DEBUG): New.
* ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts.
* auto-inc-dec.c (merge_in_block): Skip debug insns.
(merge_in_block): Fix whitespace.
* toplev.c (flag_var_tracking): Update comment.
(flag_var_tracking_assignments): New.
(flag_var_tracking_assignments_toggle): New.
(process_options): Don't open final insns dump file if we're not
going to write to it.  Compute defaults for var_tracking.
* df-scan.c (df_insn_rescan_debug_internal): New.
(df_uses_record): Handle debug insns.
* haifa-sched.c (ready): Initialize n_debug.
(contributes_to_priority): Skip debug insns.
(dep_list_size): New.
(priority): Use it.
(rank_for_schedule): Likewise.  Schedule debug insns as soon as
they're ready.  Disregard previous debug insns to make decisions.
(queue_insn): Never queue debug insns.
(ready_add, ready_remove_first, ready_remove): Count debug insns.
(schedule_insn): Don't reject debug insns because of issue rate.
(get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns.
(queue_to_ready): Skip and discount debug insns.
(choose_ready): Let debug insns through.
(schedule_block): Check boundary debug insns.  Discount debug
insns, schedule them early.  Adjust whitespace.
(set_priorities): Check for boundary debug insns.
(add_jump_dependencies): Use dep_list_size.
(prev_non_location_insn): New.
(check_cfg): Use it.
* tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug
stmts.
(remove_unused_ivs): Reset debug stmts.
* modulo-sched.c (const_iteration_count): Skip debug insns.
(res_MII): Discount debug insns.
(loop_single_full_bb_p): Skip debug insns.
(sms_schedule): Likewise.
(sms_schedule_by_order): Likewise.
(ps_has_conflicts): Likewise.
* caller-save.c (refmarker_fn): New.
(save_call_clobbered_regs): Replace regs with saved mem in
debug insns.
(mark_referenced_regs): Take pointer, mark and arg.  Adjust.
Call refmarker_fn mark for hardregnos.
(mark_reg_as_referenced): New.
(replace_reg_with_saved_mem): New.
* ipa-pure-const.c (check_stmt): Skip debug stmts.
* cse.c (cse_insn): Canonicalize debug insns.  Skip them when
searching back.
(cse_extended_basic_block): Skip debug insns.
(count_reg_usage): Likewise.
(is_dead_reg): New, split out of...
(set_live_p): ... here.
(insn_live_p): Use it for debug insns.
* tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts.
(execute_optimize_stdarg): Likewise.
* tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
* tree-ssa-propagate.c (substitute_and_fold): Don't regard
changes in debug stmts as changes.
* sel-sched.c (moving_insn_creates_bookkeeping_block_p): New.
(moveup_expr): Don't move across debug insns.  Don't move
debug insn if it would create a bookkeeping block.
(moveup_expr_cached): Don't use cache for debug insns that
are heads of blocks.
(compute_av_set_inside_bb): Skip debug insns.
(sel_rank_for_schedule): Schedule debug insns first.  Remove
dead code.
(block_valid_for_bookkeeping_p); Support lax searches.
(create_block_for_bookkeeping): Adjust block numbers when
encountering debug-only blocks.
(find_place_for_bookkeeping): Deal with debug-only blocks.
(generate_bookkeeping_insn): Accept no place to insert.
(remove_temp_moveop_nops): New argument full_tidying.
(prepare_place_to_insert): Deal with debug insns.
(advance_state_on_fence): Debug insns don't start cycles.
(update_boundaries): Take fence as argument.  Deal with
debug insns.
(schedule_expr_on_boundary): No full_tidying on debug insns.
(fill_insns): Deal with debug insns.
(track_scheduled_insns_and_blocks): Don't count debug insns.
(need_nop_to_preserve_insn_bb): New, split out of...
(remove_insn_from_stream): ... this.
(fur_orig_expr_not_found): Skip debug insns.
* rtl.def (VALUE): Move up.
(DEBUG_INSN): New.
* tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug
stmts.
(nearest_common_dominator_of_uses): Take debug_stmts argument.
Set it if debug stmts are found.
(statement_sink_location): Skip debug stmts.  Propagate
moving defs into debug stmts.
* ifcvt.c (first_active_insn): Skip debug insns.
(last_active_insns): Likewise.
(cond_exec_process_insns): Likewise.
(noce_process_if_block): Likewise.
(check_cond_move_block): Likewise.
(cond_move_convert_if_block): Likewise.
(block_jumps_and_fallthru_p): Likewise.
(dead_or_predicable): Likewise.
* dwarf2out.c (debug_str_hash_forced): New.
(find_AT_string): Add comment.
(gen_label_for_indirect_string): New.
(get_debug_string_label): New.
(AT_string_form): Use it.
(mem_loc_descriptor): Handle non-TLS symbols.  Handle MINUS , DIV,
MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING.  Accept but
discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and
several operations that cannot be represented with DWARF opcodes.
(loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND.  Require
dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value.
(dwarf2out_var_location): Take during-call mark into account.
(output_indirect_string): Update comment.  Output if there are
label and references.
(prune_indirect_string): New.
(prune_unused_types): Call it if debug_str_hash_forced.
More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>:
(dw_long_long_const): Remove.
(struct dw_val_struct): Change val_long_long type to rtx.
(print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for
val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
(output_die): Likewise.  Use HOST_BITS_PER_WIDE_INT size of each
component instead of HOST_BITS_PER_LONG.
(output_loc_operands): Likewise.   For const8* assert
HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
(output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
rather than HOST_BITS_PER_LONG is >= 64.
(add_AT_long_long): Remove val_hi and val_lo arguments, add
val_const_double.
(size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of
HOST_BITS_PER_LONG for dw_val_class_long_long.
(add_const_value_attribute): Adjust add_AT_long_long caller.  Don't
handle TLS SYMBOL_REFs.  If CONST wraps a constant, tail recurse.
(dwarf_stack_op_name): Handle DW_OP_implicit_value and
DW_OP_stack_value.
(size_of_loc_descr, output_loc_operands, output_loc_operands_raw):
Handle DW_OP_implicit_value.
(extract_int): Move prototype earlier.
(mem_loc_descriptor): For SUBREG punt if inner
mode size is wider than DWARF2_ADDR_SIZE.  Handle SIGN_EXTEND
and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}.  Handle
EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN,
UMAX, SIGN_EXTRACT, ZERO_EXTRACT.
(loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE
instead of Pmode size.
(loc_descriptor): Add MODE argument.  Handle CONST_INT, CONST_DOUBLE,
CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode,
attempt to handle other expressions.  Don't handle TLS SYMBOL_REFs.
(concat_loc_descriptor, concatn_loc_descriptor,
loc_descriptor_from_tree_1): Adjust loc_descriptor callers.
(add_location_or_const_value_attribute): Likewise.  For single
location loc_lists attempt to use add_const_value_attribute
for constant decls.  Add DW_AT_const_value even if
NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING
in its expression.
* cfgbuild.c (inside_basic_block_p): Handle debug insns.
(control_flow_insn_p): Likewise.
* tree-parloops.c (eliminate_local_variables_stmt): Handle debug
stmt.
(separate_decls_in_region_debug_bind): New.
(separate_decls_in_region): Process debug bind stmts afterwards.
* recog.c (verify_changes): Handle debug insns.
(extract_insn): Likewise.
(peephole2_optimize): Skip debug insns.
* dse.c (scan_insn): Skip debug insns.
* sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument.
Pass it on.
(setup_id_for_insn): Handle debug insns.
(maybe_tidy_empty_bb): Adjust whitespace.
(tidy_control_flow): Skip debug insns.
(sel_remove_insn): Adjust for debug insns.
(sel_estimate_number_of_insns): Skip debug insns.
(create_insn_rtx_from_pattern): Handle debug insns.
(create_copy_of_insn_rtx): Likewise.
* sel-sched-.h (sel_bb_end): Declare.
(sel_bb_empty_or_nop_p): New.
(get_all_loop_exits): Use it.
(_eligible_successor_edge_p): Likewise.
(return_nop_to_pool): Adjust.
* tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts.
* ira-lives.c (process_bb_node_lives): Skip debug insns.
* gimple-pretty-print.c (dump_gimple_debug): New.
(dump_gimple_stmt): Use it.
(dump_bb_header): Skip gimple debug stmts.
* regmove.c (optimize_reg_copy_1): Discount debug insns.
(fixup_match_2): Likewise.
(regmove_backward_pass): Likewise.  Simplify combined
replacement.  Handle debug insns.
* function.c (instantiate_virtual_regs): Handle debug insns.
* function.h (struct emit_status): Add x_cur_debug_insn_uid.
* print-rtl.h: Include cselib.h.
(print_rtx): Print VALUEs.  Split out and recurse for
VAR_LOCATIONs.
* df.h (df_inns_rescan_debug_internal): Declare.
* gcse.c (alloc_hash_table): Estimate n_insns.
(cprop_insn): Don't regard debug insns as changes.
(bypass_conditional_jumps): Skip debug insns.
(one_pre_gcse_pass): Adjust.
(one_code_hoisting_pass): Likewise.
(compute_ld_motion_mems): Skip debug insns.
(one_cprop_pass): Adjust.
* tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts.
(if_convertible_stmt_p): Handle debug stmts.
* init-regs.c (initialize_uninitialized_regs): Skip debug insns.
* tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts.
* ira-build.c (create_bb_allocnos): Skip debug insns.
* tree-flow-inline.h (has_zero_uses): Discount debug stmts.
(has_single_use): Likewise.
(single_imm_use): Likewise.
(num_imm_uses): Likewise.
* tree-ssa-phiopt.c (empty_block_p): Skip debug stmts.
* tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts.
(create_outofssa_var_map): Likewise.
* lower-subreg.c (adjust_decomposed_uses): New.
(resolve_debug): New.
(decompose_multiword_subregs): Use it.
* tree-dfa.c (find_referenced_vars): Skip debug stmts.
* emit-rtl.c: Include params.h.
(cur_debug_insn_uid): Define.
(set_new_first_and_last_insn): Set cur_debug_insn_uid too.
(copy_rtx_if_shared_1): Handle debug insns.
(reset_used_flags): Likewise.
(set_used_flags): LIkewise.
(get_max_insn_count): New.
(next_nondebug_insn): New.
(prev_nondebug_insn): New.
(make_debug_insn_raw): New.
(emit_insn_before_noloc): Handle debug insns.
(emit_jump_insn_before_noloc): Likewise.
(emit_call_insn_before_noloc): Likewise.
(emit_debug_insn_before_noloc): New.
(emit_insn_after_noloc): Handle debug insns.
(emit_jump_insn_after_noloc): Likewise.
(emit_call_insn_after_noloc): Likewise.
(emit_debug_insn_after_noloc): Likewise.
(emit_insn_after): Take loc from earlier non-debug insn.
(emit_jump_insn_after): Likewise.
(emit_call_insn_after): Likewise.
(emit_debug_insn_after_setloc): New.
(emit_debug_insn_after): New.
(emit_insn_before): Take loc from later non-debug insn.
(emit_jump_insn_before): Likewise.
(emit_call_insn_before): Likewise.
(emit_debug_insn_before_setloc): New.
(emit_debug_insn_before): New.
(emit_insn): Handle debug insns.
(emit_debug_insn): New.
(emit_jump_insn): Handle debug insns.
(emit_call_insn): Likewise.
(emit): Likewise.
(init_emit): Take min-nondebug-insn-uid into account.
Initialize cur_debug_insn_uid.
(emit_copy_of_insn_after): Handle debug insns.
* cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite
location of single rhs in place.
(maybe_dump_rtl_for_gimple_stmt): Dump lineno.
(floor_sdiv_adjust): New.
(cell_sdiv_adjust): New.
(cell_udiv_adjust): New.
(round_sdiv_adjust): New.
(round_udiv_adjust): New.
(wrap_constant): Moved from cselib.
(unwrap_constant): New.
(expand_debug_expr): New.
(expand_debug_locations): New.
(expand_gimple_basic_block): Drop hiding redeclaration.  Expand
debug bind stmts.
(gimple_expand_cfg): Expand debug locations.
* cselib.c: Include tree-pass.h.
(struct expand_value_data): New.
(cselib_record_sets_hook): New.
(PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New.
(cselib_clear_table): Move, and implemnet in terms of...
(cselib_reset_table_with_next_value): ... this.
(cselib_get_next_unknown_value): New.
(discard_useless_locs): Don't discard preserved values.
(cselib_preserve_value): New.
(cselib_preserved_value_p): New.
(cselib_preserve_definitely): New.
(cselib_clear_preserve): New.
(cselib_preserve_only_values): New.
(new_cselib_val): Take rtx argument.  Dump it in details.
(cselib_lookup_mem): Adjust.
(expand_loc): Take regs_active in struct.  Adjust.  Silence
dumps unless details are requested.
(cselib_expand_value_rtx_cb): New.
(cselib_expand_value_rtx): Rename and reimplment in terms of...
(cselib_expand_value_rtx_1): ... this.  Adjust.  Silence dumps
without details.  Copy more subregs.  Try to resolve values
using a callback.  Wrap constants.
(cselib_subst_to_values): Adjust.
(cselib_log_lookup): New.
(cselib_lookup): Call it.
(cselib_invalidate_regno): Don't count preserved values as
useless.
(cselib_invalidate_mem): Likewise.
(cselib_record_set): Likewise.
(struct set): Renamed to cselib_set, moved to cselib.h.
(cselib_record_sets): Adjust.  Call hook.
(cselib_process_insn): Reset table when it would be cleared.
(dump_cselib_val): New.
(dump_cselib_table): New.
* tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts.
(remove_forwarder_block): Support moving debug stmts.
* cselib.h (cselib_record_sets_hook): Declare.
(cselib_expand_callback): New type.
(cselib_expand_value_rtx_cb): Declare.
(cselib_reset_table_with_next_value): Declare.
(cselib_get_next_unknown_value): Declare.
(cselib_preserve_value): Declare.
(cselib_preserved_value_p): Declare.
(cselib_preserve_only_values): Declare.
(dump_cselib_table): Declare.
* cfgcleanup.c (flow_find_cross_jump): Skip debug insns.
(try_crossjump_to_edge): Likewise.
(delete_unreachable_blocks): Remove dominant GIMPLE blocks after
dominated blocks when debug stmts are present.
* simplify-rtx.c (delegitimize_mem_from_attrs): New.
* tree-ssa-live.c (remove_unused_locals): Skip debug stmts.
(set_var_live_on_entry): Likewise.
* loop-invariant.c (find_invariants_bb): Skip debug insns.
* cfglayout.c (curr_location, last_location): Make static.
(set_curr_insn_source_location): Don't avoid bouncing.
(get_curr_insn_source_location): New.
(get_curr_insn_block): New.
(duplicate_insn_chain): Handle debug insns.
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate
into debug stmts.
* common.opt (fcompare-debug): Move to sort order.
(fdump-unnumbered-links): Likewise.
(fvar-tracking-assignments): New.
(fvar-tracking-assignments-toggle): New.
* tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks
because of debug stmts.
(mark_stmt_if_obviously_necessary): Mark debug stmts.
(eliminate_unnecessary_stmts): Walk dominated blocks before
dominators.
* tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts.
* ira.c (memref_used_between_p): Skip debug insns.
(update_equiv_regs): Likewise.
* sched-deps.c (sd_lists_size): Accept empty list.
(sd_init_insn): Mark debug insns.
(sd_finish_insn): Unmark them.
(sd_add_dep): Reject non-debug deps on debug insns.
(fixup_sched_groups): Give debug insns group treatment.
Skip debug insns.
(sched_analyze_reg): Don't mark debug insns for sched before call.
(sched_analyze_2): Handle debug insns.
(sched_analyze_insn): Compute next non-debug insn.  Handle debug
insns.
(deps_analyze_insn): Handle debug insns.
(deps_start_bb): Skip debug insns.
(init_deps): Initialize last_debug_insn.
* tree-ssa.c (target_for_debug_bind): New.
(find_released_ssa_name): New.
(propagate_var_def_into_debug_stmts): New.
(propagate_defs_into_debug_stmts): New.
(verify_ssa): Skip debug bind stmts without values.
(warn_uninialized_vars): Skip debug stmts.
* target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default.
* rtl.c (rtx_equal_p_cb): Handle VALUEs.
(rtx_equal_p): Likewise.
* ira-costs.c (scan_one_insn): Skip debug insns.
(process_bb_node_for_hard_reg_moves): Likewise.
* rtl.h (DEBUG_INSN_P): New.
(NONDEBUG_INSN_P): New.
(MAY_HAVE_DEBUG_INSNS): New.
(INSN_P): Accept debug insns.
(RTX_FRAME_RELATED_P): Likewise.
(INSN_DELETED_P): Likewise
(PAT_VAR_LOCATION_DECL): New.
(PAT_VAR_LOCATION_LOC): New.
(PAT_VAR_OCATION_STATUS): New.
(NOTE_VAR_LOCATION_DECL): Reimplement.
(NOTE_VAR_LOCATION_LOC): Likewise.
(NOTE_VAR_LOCATION_STATUS): Likewise.
(INSN_VAR_LOCATION): New.
(INSN_VAR_LOCATION_DECL): New.
(INSN_VAR_LOCATION_LOC): New.
(INSN_VAR_LOCATION_STATUS): New.
(gen_rtx_UNKNOWN_VAR_LOC): New.
(VAR_LOC_UNKNOWN_P): New.
(NOTE_DURING_CALL_P): New.
(SCHED_GROUP_P): Accept debug insns.
(emit_debug_insn_before): Declare.
(emit_debug_insn_before_noloc): Declare.
(emit_debug_insn_beore_setloc): Declare.
(emit_debug_insn_after): Declare.
(emit_debug_insn_after_noloc): Declare.
(emit_debug_insn_after_setloc): Declare.
(emit_debug_insn): Declare.
(make_debug_insn_raw): Declare.
(prev_nondebug_insn): Declare.
(next_nondebug_insn): Declare.
(delegitimize_mem_from_attrs): Declare.
(get_max_insn_count): Declare.
(wrap_constant): Declare.
(unwrap_constant): Declare.
(get_curr_insn_source_location): Declare.
(get_curr_insn_block): Declare.
* tree-inline.c (insert_debug_decl_map): New.
(processing_debug_stmt): New.
(remap_decl): Don't create new mappings in debug stmts.
(remap_gimple_op_r): Don't add references in debug stmts.
(copy_tree_body_r): Likewise.
(remap_gimple_stmt): Handle debug bind stmts.
(copy_bb): Skip debug stmts.
(copy_edges_for_bb): Likewise.
(copy_debug_stmt): New.
(copy_debug_stmts): New.
(copy_body): Copy debug stmts at the end.
(insert_init_debug_bind): New.
(insert_init_stmt): Take id.  Skip and emit debug stmts.
(setup_one_parameter): Remap variable earlier, register debug
mapping.
(estimate_num_insns): Skip debug stmts.
(expand_call_inline): Preserve debug_map.
(optimize_inline_calls): Check for no debug_stmts left-overs.
(unsave_expr_now): Preserve debug_map.
(copy_gimple_seq_and_replace_locals): Likewise.
(tree_function_versioning): Check for no debug_stmts left-overs.
Init and destroy debug_map as needed.  Split edges unconditionally.
(build_duplicate_type): Init and destroy debug_map as needed.
* tree-inline.h: Include gimple.h instead of pointer-set.h.
(struct copy_body_data): Add debug_stmts and debug_map.
* sched-int.h (struct ready_list): Add n_debug.
(struct deps): Add last_debug_insn.
(DEBUG_INSN_SCHED_P): New.
(BOUNDARY_DEBUG_INSN_P): New.
(SCHEDULE_DEBUG_INSN_P): New.
(sd_iterator_cond): Accept empty list.
* combine.c (create_log_links): Skip debug insns.
(combine_instructions): Likewise.
(cleanup_auto_inc_dec): New.  From Jakub Jelinek: Make sure the
return value is always unshared.
(struct rtx_subst_pair): New.
(auto_adjust_pair): New.
(propagate_for_debug_subst): New.
(propagate_for_debug): New.
(try_combine): Skip debug insns.  Propagate removed defs into
debug insns.
(next_nonnote_nondebug_insn): New.
(distribute_notes): Use it.  Skip debug insns.
(distribute_links): Skip debug insns.
* tree-outof-ssa.c (set_location_for_edge): Likewise.
* resource.c (mark_target_live_regs): Likewise.
* var-tracking.c: Include cselib.h and target.h.
(enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and
MO_VAL_SET.
(micro_operation_type_name): New.
(enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN.
(struct micro_operation_def): Update comments.
(decl_or_value): New type.  Use instead of decls.
(struct emit_note_data_def): Add vars.
(struct attrs_def): Use decl_or_value.
(struct variable_tracking_info_def): Add permp, flooded.
(struct location_chain_def): Update comment.
(struct variable_part_def): Use decl_or_value.
(struct variable_def): Make var_part a variable length array.
(valvar_pool): New.
(scratch_regs): New.
(cselib_hook_called): New.
(dv_is_decl_p): New.
(dv_is_value_p): New.
(dv_as_decl): New.
(dv_as_value): New.
(dv_as_opaque): New.
(dv_onepart_p): New.
(dv_pool): New.
(IS_DECL_CODE): New.
(check_value_is_not_decl): New.
(dv_from_decl): New.
(dv_from_value): New.
(dv_htab_hash): New.
(variable_htab_hash): Use it.
(variable_htab_eq): Support values.
(variable_htab_free): Free from the right pool.
(attrs_list_member, attrs_list_insert): Use decl_or_value.
(attrs_list_union): Adjust.
(attrs_list_mpdv_union): New.
(tie_break_pointers): New.
(canon_value_cmp): New.
(unshare_variable): Return possibly-modified slot.
(vars_copy_1): Adjust.
(var_reg_decl_set): Adjust.  Split out of...
(var_reg_set): ... this.
(get_init_value): Adjust.
(var_reg_delete_and_set): Adjust.
(var_reg_delete): Adjust.
(var_regno_delete): Adjust.
(var_mem_decl_set): Split out of...
(var_mem_set): ... this.
(var_mem_delete_and_set): Adjust.
(var_mem_delete): Adjust.
(val_store): New.
(val_reset): New.
(val_resolve): New.
(variable_union): Adjust.  Speed up merge of 1-part vars.
(variable_canonicalize): Use unshared slot.
(VALUED_RECURSED_INTO): New.
(find_loc_in_1pdv): New.
(struct dfset_merge): New.
(insert_into_intersection): New.
(intersect_loc_chains): New.
(loc_cmp): New.
(canonicalize_loc_order_check): New.
(canonicalize_values_mark): New.
(canonicalize_values_star): New.
(variable_merge_over_cur): New.
(variable_merge_over_src): New.
(dataflow_set_merge): New.
(dataflow_set_equiv_regs): New.
(remove_duplicate_values): New.
(struct dfset_post_merge): New.
(variable_post_merge_new_vals): New.
(variable_post_merge_perm_vals): New.
(dataflow_post_merge_adjust): New.
(find_mem_expr_in_1pdv): New.
(dataflow_set_preserve_mem_locs): New.
(dataflow_set_remove_mem_locs): New.
(dataflow_set_clear_at_call): New.
(onepart_variable_different_p): New.
(variable_different_p): Use it.
(dataflow_set_different_1): Adjust.  Make detailed dump
more verbose.
(track_expr_p): Add need_rtl parameter.  Don't generate rtl
if not needed.
(track_loc_p): Pass it true.
(struct count_use_info): New.
(find_use_val): New.
(replace_expr_with_values): New.
(log_op_type): New.
(use_type): New, partially split out of...
(count_uses): ... this.  Count new micro-ops.
(count_uses_1): Adjust.
(count_stores): Adjust.
(count_with_sets): New.
(VAL_NEEDS_RESOLUTION): New.
(VAL_HOLDS_TRACK_EXPR): New.
(VAL_EXPR_IS_COPIED): New.
(VAL_EXPR_IS_CLOBBERED): New.
(add_uses): Adjust.  Generate new micro-ops.
(add_uses_1): Adjust.
(add_stores): Generate new micro-ops.
(add_with_sets): New.
(find_src_status): Adjust.
(find_src_set_src): Adjust.
(compute_bb_dataflow): Use dataflow_set_clear_at_call.
Handle new micro-ops.  Canonicalize value equivalances.
(vt_find_locations): Compute total size of hash tables for
dumping.  Perform merge for var-tracking-assignments.  Don't
disregard single-block loops.
(dump_attrs_list): Handle decl_or_value.
(dump_variable): Take variable.  Deal with decl_or_value.
(dump_variable_slot): New.
(dump_vars): Use it.
(dump_dataflow_sets): Adjust.
(set_slot_part): New, extended to support one-part variables
after splitting out of...
(set_variable_part): ... this.
(clobber_slot_part): New, split out of...
(clobber_variable_part): ... this.
(delete_slot_part): New, split out of...
(delete_variable_part): .... this.
(check_wrap_constant): New.
(vt_expand_loc_callback): New.
(vt_expand_loc): New.
(emit_note_insn_var_location): Adjust.  Handle values.  Handle
EMIT_NOTE_AFTER_CALL_INSN.
(emit_notes_for_differences_1): Adjust.  Handle values.
(emit_notes_for_differences_2): Likewise.
(emit_notes_for_differences): Adjust.
(emit_notes_in_bb): Take pointer to set.  Emit AFTER_CALL_INSN
notes.  Adjust.  Handle new micro-ops.
(vt_add_function_parameters): Adjust.  Create and bind values.
(vt_initialize): Adjust.  Initialize scratch_regs and
valvar_pool, flooded and perm..  Initialize and use cselib.  Log
operations.  Move some code to count_with_sets and add_with_sets.
(delete_debug_insns): New.
(vt_debug_insns_local): New.
(vt_finalize): Release permp, valvar_pool, scratch_regs.  Finish
cselib.
(var_tracking_main): If var-tracking-assignments is enabled
but var-tracking isn't, delete debug insns and leave.  Likewise
if we exceed limits or fail the stack adjustments tests, and
after all var-tracking processing.
More in var-tracking, from Jakub Jelinek <jakub@redhat.com>:
(dataflow_set): Add traversed_vars.
(value_chain, const_value_chain): New typedefs.
(value_chain_pool, value_chains): New variables.
(value_chain_htab_hash, value_chain_htab_eq, add_value_chain,
add_value_chains, add_cselib_value_chains, remove_value_chain,
remove_value_chains, remove_cselib_value_chains): New functions.
(shared_hash_find_slot_unshare_1, shared_hash_find_slot_1,
shared_hash_find_slot_noinsert_1, shared_hash_find_1): New
static inlines.
(shared_hash_find_slot_unshare, shared_hash_find_slot,
shared_hash_find_slot_noinsert, shared_hash_find): Update.
(dst_can_be_shared): New variable.
(unshare_variable): Unshare set->vars if shared, use shared_hash_*.
Clear dst_can_be_shared.  If set->traversed_vars is non-NULL and
different from set->vars, look up slot again instead of using the
passed in slot.
(dataflow_set_init): Initialize traversed_vars.
(variable_union): Use shared_hash_*.  Use initially NO_INSERT
lookup if set->vars is shared.  Don't keep slot cleared before
calling unshare_variable.  Unshare set->vars if needed.  Adjust
unshare_variable callers.  Clear dst_can_be_shared if needed.
Even ->refcount == 1 vars must be unshared if set->vars is shared
and var needs to be modified.
(dataflow_set_union): Set traversed_vars during canonicalization.
(VALUE_CHANGED, DECL_CHANGED): Define.
(set_dv_changed, dv_changed_p): New static inlines.
(track_expr_p): Clear DECL_CHANGED.
(dump_dataflow_sets): Set it.
(variable_was_changed): Call set_dv_changed.
(emit_note_insn_var_location): Likewise.
(changed_variables_stack): New variable.
(check_changed_vars_1, check_changed_vars_2): New functions.
(emit_notes_for_changes): Do nothing if changed_variables is
empty.  Traverse changed_variables with check_changed_vars_1,
call check_changed_vars_2 on each changed_variables_stack entry.
(emit_notes_in_bb): Add SET argument.  Just clear it at the
beginning, use it instead of local &set, don't destroy it at the
end.
(vt_emit_notes): Call dataflow_set_clear early on all
VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
computed set, dataflow_set_clear also VTI(bb)->in when we are
done with the basic block.  Initialize changed_variables_stack,
free it afterwards.  If ENABLE_CHECKING verify that after noting
differences to an empty set value_chains hash table is empty.
(vt_initialize): Initialize value_chains and value_chain_pool.
(vt_finalize): Delete value_chains htab, free value_chain_pool.
(variable_tracking_main): Call dump_dataflow_sets before calling
vt_emit_notes, not after it.
* tree-flow.h (propagate_defs_into_debug_stmts): Declare.
(propagate_var_def_into_debug_stmts): Declare.
* df-problems.c (df_lr_bb_local_compute): Skip debug insns.
(df_set_note): Reject debug insns.
(df_whole_mw_reg_dead_p): Take added_notes_p argument.  Don't
add notes to debug insns.
(df_note_bb_compute): Adjust.  Likewise.
(df_simulate_uses): Skip debug insns.
(df_simulate_initialize_backwards): Likewise.
* reg-stack.c (subst_stack_regs_in_debug_insn): New.
(subst_stack_regs_pat): Reject debug insns.
(convert_regs_1): Handle debug insns.
* Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H.
(print-rtl.o): Depend on cselib.h.
(cselib.o): Depend on TREE_PASS_H.
(var-tracking.o): Depend on cselib.h and TARGET_H.
* sched-rgn.c (rgn_estimate_number_of_insns): Discount
debug insns.
(init_ready_list): Skip boundary debug insns.
(add_branch_dependences): Skip debug insns.
(free_block_dependencies): Check for blocks with only debug
insns.
(compute_priorities): Likewise.
* gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
(gimple_build_with_ops_stat): Take subcode as unsigned.  Adjust
all callers.
(gimple_build_debug_bind_stat): New.
(empty_body_p): Skip debug stmts.
(gimple_has_side_effects): Likewise.
(gimple_rhs_has_side_effects): Likewise.
* gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New.
(gimple_build_debug_bind_stat): Declare.
(gimple_build_debug_bind): Define.
(is_gimple_debug): New.
(gimple_debug_bind_p): New.
(gimple_debug_bind_get_var): New.
(gimple_debug_bind_get_value): New.
(gimple_debug_bind_get_value_ptr): New.
(gimple_debug_bind_set_var): New.
(gimple_debug_bind_set_value): New.
(GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro.
(gimple_debug_bind_reset_value): New.
(gimple_debug_bind_has_value_p): New.
(gsi_next_nondebug): New.
(gsi_prev_nondebug): New.
(gsi_start_nondebug_bb): New.
(gsi_last_nondebug_bb): New.
* sched-vis.c (print_pattern): Handle VAR_LOCATION.
(print_insn): Handle DEBUG_INSN.
* tree-cfg.c (remove_bb): Walk stmts backwards.  Let loc
of first insn prevail.
(first_stmt): Skip debug stmts.
(first_non_label_stmt): Likewise.
(last_stmt): Likewise.
(has_zero_uses_1): New.
(single_imm_use_1): New.
(verify_gimple_debug): New.
(verify_types_in_gimple_stmt): Handle debug stmts.
(verify_stmt): Likewise.
(debug_loop_num): Skip debug stmts.
(remove_edge_and_dominated_blocks): Remove dominators last.
* tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into
debug stmts.
(linearize_expr): Likewise.
* config/i386/i386.c (ix86_delegitimize_address): Call
default implementation.
* config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug
insns.
(group_barrier_needed): Skip debug insns.
(emit_insn_group_barriers): Likewise.
(emit_all_insn_group_barriers): Likewise.
(ia64_variable_issue): Handle debug insns.
(ia64_dfa_new_cycle): Likewise.
(final_emit_insn_group_barriers): Skip debug insns.
(ia64_dwarf2out_def_steady_cfa): Take frame argument.  Don't
def cfa without frame.
(process_set): Likewise.
(process_for_unwind_directive): Pass frame on.
* config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define.
(rs6000_delegitimize_address): New.
(rs6000_debug_adjust_cost): Handle debug insns.
(is_microcoded_insn): Likewise.
(is_cracked_insn): Likewise.
(is_nonpipeline_insn): Likewise.
(insn_must_be_first_in_group): Likewise.
(insn_must_be_last_in_group): Likewise.
(force_new_group): Likewise.
* cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block
contains only debug insns.
(rtl_merge_blocks): Skip debug insns.
(purge_dead_edges): Likewise.
(rtl_block_ends_with_call_p): Skip debug insns.
* dce.c (deletable_insn_p): Handle VAR_LOCATION.
(mark_reg_dependencies): Skip debug insns.
* params.def (PARAM_MIN_NONDEBUG_INSN_UID): New.
* tree-ssanames.c (release_ssa_name): Propagate def into
debug stmts.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts): Skip debug stmts.
* regcprop.c (replace_oldest_value_addr): Skip debug insns.
(replace_oldest_value_mem): Use ALL_REGS for debug insns.
(copyprop_hardreg_forward_1): Handle debug insns.
* reload1.c (reload): Skip debug insns.  Replace unassigned
pseudos in debug insns with their equivalences.
(eliminate_regs_in_insn): Skip debug insns.
(emit_input_reload_insns): Skip debug insns at first, adjust
them later.
* tree-ssa-operands.c (add_virtual_operand): Reject debug stmts.
(get_indirect_ref_operands): Pass opf_no_vops on.
(get_expr_operands): Likewise.  Skip debug stmts.
(parse_ssa_operands): Scan debug insns with opf_no_vops.
gcc/testsuite/ChangeLog:
* gcc.dg/guality/guality.c: New.
* gcc.dg/guality/guality.h: New.
* gcc.dg/guality/guality.exp: New.
* gcc.dg/guality/example.c: New.
* lib/gcc-dg.exp (cleanup-dump): Remove .gk files.
(cleanup-saved-temps): Likewise, .gkd files too.
gcc/cp/ChangeLog:
* cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
* cp-lang.c (cxx_dwarf_name): Pass it.
* error.c (count_non_default_template_args): Take flags as
argument.  Adjust all callers.  Skip counting of default
arguments if the new flag is given.
ChangeLog:
* Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug.
* Makefile.in: Rebuilt.
contrib/ChangeLog:
* compare-debug: Look for .gkd files and compare them.
config/ChangeLog:
* bootstrap-debug.mk: Add comments.
* bootstrap-debug-big.mk: New.
* bootstrap-debug-lean.mk: New.
* bootstrap-debug-ckovw.mk: Add comments.
* bootstrap-debug-lib.mk: Drop CFLAGS for stages.  Use -g0
for TFLAGS in stage1.  Drop -fvar-tracking-assignments-toggle.

From-SVN: r151312
2009-09-02 02:42:21 +00:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Bingfeng Mei 71a6fe66e7 check alias sets in add_inter_loop_mem_dep
From-SVN: r143540
2009-01-21 11:39:19 +00:00
Kenneth Zadeck 57512f5363 re PR middle-end/37448 (cannot compile big function)
2008-10-11  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/37448
	* df.h: (df_ref_class): New enum.
	(DF_REF_TYPE_NAMES, df_ref_extract): Removed.
	(struct df_ref): Replaced with union df_ref_d.
	(df_base_ref, df_artificial_ref, df_regular_ref, df_extract_ref):
	New members of df_ref_d union.
	(DF_REF_REAL_REG, DF_REF_REGNO, DF_REF_REAL_LOC, DF_REF_REG,
	DF_REF_LOC, DF_REF_BB, DF_REF_INSN_INFO, DF_REF_INSN,
	DF_REF_CLASS, DF_REF_TYPE, DF_REF_CHAIN, DF_REF_ID, DF_REF_FLAGS,
	DF_REF_ORDER, DF_REF_IS_ARTIFICIAL, DF_REF_NEXT_REG,
	DF_REF_PREV_REG, DF_REF_EXTRACT_WIDTH, DF_REF_EXTRACT_OFFSET,
	DF_REF_EXTRACT_MODE): Replaced definition to access union
	df_ref_d.
       	(DF_MWS_REG_DEF_P, DF_MWS_REG_USE_P, DF_MWS_TYPE): New macros.
	(df_scan_bb_info, df_bb_regno_first_def_find,
	df_bb_regno_last_def_find, df_find_def, df_find_use,
	df_refs_chain_dump, df_regs_chain_dump, df_ref_debug,
	debug_df_ref, df_chain_create, df_chain_unlink, df_chain_copy,
	df_ref_create, df_ref_remove, df_compute_accessed_bytes,
	df_get_artificial_defs, df_get_artificial_uses, union_defs)
	Replaced struct df_ref * with df_ref.
	* df-scan.c (df_collection_rec, df_null_ref_rec,
	df_ref_chain_delete_du_chain, df_ref_chain_delete, df_install_ref,
	df_grow_ref_info, df_ref_create, df_reg_chain_unlink,
	df_ref_compress_rec, df_ref_remove, df_ref_chain_delete_du_chain,
	df_ref_chain_delete, df_free_collection_rec, df_insn_rescan,
	df_reorganize_refs_by_reg_by_reg,
	df_reorganize_refs_by_reg_by_insn, df_reorganize_refs_by_reg,
	df_ref_change_reg_with_loc_1, df_notes_rescan, df_swap_refs,
	df_sort_and_compress_refs, df_install_ref, df_install_refs,
	df_ref_record, df_get_conditional_uses, df_get_call_refs,
	df_bb_refs_record, df_exit_block_uses_collect,
	df_record_exit_block_uses, df_reg_chain_mark,
	df_reg_chain_verify_unmarked, df_refs_verify): Replaced struct
	df_ref * with df_ref.
	(df_ref_record, df_uses_record, df_ref_create_structure): Added
	df_ref_class parameter.
	(df_scan_problem_data): Added new pools for different types of
	refs.
	(df_scan_free_internal, df_scan_alloc, df_free_ref,
	df_ref_create_structure): Processed new ref pools.
	(df_scan_start_dump): Added counts of refs and insns.
	(df_ref_create, df_notes_rescan, df_def_record_1, df_uses_record,
	df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect,
	df_entry_block_defs_collect, df_exit_block_uses_collect): Added
	code to pass df_ref_class down to ref creation functions.
	(df_reg_chain_unlink, df_ref_remove, df_ref_change_reg_with_loc_1,
	df_reg_chain_mark): Use macros to hide references to df_refs.
	(df_ref_chain_change_bb): Removed.
	(df_insn_change_bb): Remove calls to df_ref_insn_change_bb.
	(df_ref_equal_p, df_ref_compare, df_ref_create_structure):
	Enhanced to understand df_ref union structure.
	* fwprop.c (local_ref_killed_between_p, use_killed_between,
	all_uses_available_at, update_df, try_fwprop_subst,
	forward_propagate_subreg, forward_propagate_and_simplify,
	forward_propagate_into, fwprop, fwprop_addr): Replaced struct
	df_ref * with df_ref.
	(use_killed_between, all_uses_available_at): Use macros to hide
	references to df_refs.
	* regstat.c (regstat_bb_compute_ri,
	regstat_bb_compute_calls_crossed): Replaced struct df_ref * with
	df_ref.
	* see.c (see_handle_relevant_defs, see_handle_relevant_uses,
	see_handle_relevant_refs, see_analyze_one_def,
	see_update_relevancy, see_propagate_extensions_to_uses): Replaced
	struct df_ref * with df_ref.
	* ra-conflict.c (record_one_conflict, clear_reg_in_live,
	global_conflicts): Replaced struct df_ref * with df_ref.
	* ddg.c (create_ddg_dep_from_intra_loop_link,
	add_cross_iteration_register_deps, build_inter_loop_deps):
	Replaced struct df_ref * with df_ref.
	(create_ddg_dep_from_intra_loop_link,
	add_cross_iteration_register_deps): Use macros to hide references
	to df_refs.
	* auto-inc-dec.c (find_inc, merge_in_block): Replaced struct
	df_ref * with df_ref.
	* df-core.c (df_bb_regno_first_def_find,
	df_bb_regno_last_def_find, df_find_def, df_find_use,
	df_refs_chain_dump, df_regs_chain_dump, df_ref_debug,
	debug_df_ref): Replaced struct df_ref * with df_ref.
	(df_mws_dump, df_ref_debug): Use macros to hide references to
	df_refs.
	* cse.c (cse_extended_basic_block): Replaced struct df_ref * with
	df_ref.
	* web.c (union_defs, entry_register, replace_ref, web_main):
	Replaced struct df_ref * with df_ref.
	(union_defs, replace_ref): Use macros to hide references to
	df_refs.
	* global.c (compute_regs_asm_clobbered, build_insn_chain):
	Replaced struct df_ref * with df_ref.
	* ifcvt.c (dead_or_predicable): Replaced struct df_ref * with
	df_ref.
	* sel-sched-ir.c (maybe_downgrade_id_to_use, setup_id_reg_sets, ):
	Replaced struct df_ref * with df_ref.
	* ira-lives.c (mark_ref_live, def_conflicts_with_inputs_p,
	mark_ref_dead, process_bb_node_lives): Replaced struct df_ref *
	with df_ref.
	* local-alloc.c (block_alloc): Replaced struct df_ref * with
	df_ref.
	* df-byte-scan.c (df_compute_accessed_bytes_extract,
	df_compute_accessed_bytes_strict_low_part,
	df_compute_accessed_bytes_subreg, df_compute_accessed_bytes):
	Replaced struct df_ref * with df_ref.
	(df_compute_accessed_bytes): Use macros to hide references to
	df_refs.
	* init-regs.c (initialize_uninitialized_regs): Replaced struct
	df_ref * with df_ref.
	* loop-invariant.c (invariant_for_use, hash_invariant_expr_1,
	check_dependency, check_dependencies, record_uses): Replaced
	struct df_ref * with df_ref.
	(invariant_for_use, check_dependency): Use macros to hide
	references to df_refs.
	* loop-iv.c (iv_analysis_loop_init, iv_get_reaching_def,
	get_biv_step_1, get_biv_step, record_iv, iv_analyze_def,
	iv_analyze, biv_p): Replaced struct df_ref * with df_ref.
	(iv_analysis_loop_init, iv_get_reaching_def): Use macros to hide
	references to df_refs.
	* ira.c (compute_regs_asm_clobbered): Replaced struct df_ref * with df_ref.
	* combine.c (create_log_links): Replaced struct df_ref * with df_ref.
	* df-problems.c (df_rd_bb_local_compute_process_def,
	df_lr_bb_local_compute, df_live_bb_local_compute, df_chain_create,
	df_chain_unlink_1, df_chain_unlink, df_chain_copy,
	df_chain_remove_problem, df_chain_create_bb_process_use,
	df_chain_create_bb, df_chain_top_dump, df_chain_bottom_dump,
	df_byte_lr_check_regs, df_byte_lr_bb_local_compute,
	df_byte_lr_simulate_defs, df_byte_lr_simulate_uses,
	df_byte_lr_simulate_artificial_refs_at_top,
	df_byte_lr_simulate_artificial_refs_at_end, df_create_unused_note,
	df_note_bb_compute, df_note_add_problem, df_simulate_defs,
	df_simulate_uses, df_simulate_artificial_refs_at_end,
	df_simulate_artificial_refs_at_top): Replaced struct df_ref * with df_ref.
	(df_chain_dump): Use macros to hide
	references to df_refs.
	* config/mips/mips.c (r10k_simplify_address): Replaced struct
	df_ref * with df_ref.
	* dce.c (mark_nonreg_stores, delete_corresponding_reg_eq_notes,
	mark_artificial_uses, mark_reg_dependencies,
	byte_dce_process_block): Replaced struct df_ref * with df_ref.

From-SVN: r141067
2008-10-11 23:39:21 +00:00
Steven Bosscher 50e94c7e58 df.h (struct df_ref): Replace 'insn' field with 'insn_info' field.
* df.h (struct df_ref): Replace 'insn' field with 'insn_info' field.
	(DF_REF_INSN_INFO): New.
	(DF_REF_INSN, DF_REF_INSN_UID): Rewrite macros using DF_REF_INSN_INFO.
	(DF_REF_IS_ARTIFICIAL): Artificial refs are now identified as refs
	with a NULL DF_REF_INSN_INFO.
	(DF_INSN_INFO_GET, DF_INSN_INFO_SET): Renamed from DF_INSN_GET and
	DF_INSN_SET.
	(DF_INSN_INFO_LUID, DF_INSN_INFO_DEFS, DF_INSN_INFO_USES,
	DF_INSN_INFO_EQ_USES): New.
	(DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, DF_INSN_EQ_USES,
	DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES,
	DF_INSN_UID_EQ_USES): Rewrite using DF_INSN_INFO_* macros.
	* df-core.c: Update comment for above changes.
	(df_insn_debug_regno): Use DF_INSN_INFO_GET instead of INSN_UID and
	DF_INSN_UID_* macros.
	(df_ref_debug): Check for NULL DF_REF_INSN_INFO.
	* df-scan.c (df_ref_record): Take a df_insn_info instead of an
	insn rtx.  Update all callers.
	(df_def_record_1, df_defs_record, df_uses_record, df_get_call_refs,
	df_ref_create_structure, df_insn_refs_collect): Likewise.
	(df_ref_equal_p): Compare DF_REF_INSN_INFO pointers for the refs.
	* df-problems.c (df_chain_dump): Test for non-NULL DF_REF_INSN_INFO.
	(df_live_bb_local_compute): Retrieve DF_INSN_INFO, use DF_INSN_INFO_*
	macros to access the insn refs.
	(df_chain_top_dump, df_chain_bottom_dump, df_byte_lr_alloc): Likewise.
	* fwprop.c (use_killed_between): Use DF_REF_INSN accessor macro.
	(all_uses_available): Retrieve DF_INSN_INFO for def_insn, and use it
	for accessing the refs.
	(try_fwprop_subst): Likewise.
	* ddg.c (add_cross_iteration_register_deps): Use DF_REF_INSN macro.
	* web.c (union_defs): Retrieve DF_INSN_INFO for def_insn, and use it
	for accessing the refs.
	* loop-invariant.c (invariant_for_use): Use DF_REF_BB macro.
	(check_dependencies): Use DF_INSN_INFO_GET, use DF_INSN_INFO_* macros
	to look at the insn refs.
	(record_uses): Likewise.
	* dce.c (deletable_insn_p): Don't tolerate artificial DEFs in this
	function anymore.
	(mark_artificial_uses): Don't mark_insn for artificial refs.
	(mark_reg_rependencies): Likewise.

	* doc/rtl.texi: Remove documentation of ADDRESSOF.

From-SVN: r136885
2008-06-18 05:42:23 +00:00
Kenneth Zadeck 963acd6f89 re PR tree-optimization/26854 (Inordinate compile times on large routines)
2008-01-22  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/26854
	PR rtl-optimization/34400
	PR rtl-optimization/34884
	* ddg.c (create_ddg_dep_from_intra_loop_link): Use
	DF_RD->gen.
	* df.h (df_changeable_flags.DF_RD_NO_TRIM): Deleted
	(df_rd_bb_info.expanded_lr_out): Deleted
	* loop_invariant.c (find_defs): Deleted DF_RD_NO_TRIM flag.
	* loop_iv.c (iv_analysis_loop_init): Ditto.  * df-problems.c
	(df_rd_free_bb_info, df_rd_alloc, df_rd_confluence_n,
	df_rd_bb_local_compute, df_rd_transfer_function, df_rd_free):
	Removed code to allocate, initialize or free expanded_lr_out.
	(df_rd_bb_local_compute_process_def): Restructured to make more
	understandable.
	(df_rd_confluence_n): Removed code to no apply invalidate_by_call
	sets if the sets are being trimmed.

From-SVN: r131719
2008-01-22 13:57:01 +00:00
Kenneth Zadeck 2b49e1a09d re PR tree-optimization/26854 (Inordinate compile times on large routines)
2008-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/26854
	PR rtl-optimization/34400
	* ddg.c (create_ddg_dep_from_intra_loop_link): Do not use
	DF_RD->gen.
	* df.h (df_changeable_flags.DF_RD_NO_TRIM): New.
	(df_rd_bb_info.expanded_lr_out): New.
	* loop_invariant.c (find_defs): Added DF_RD_NO_TRIM flag.
	* loop_iv.c (iv_analysis_loop_init): Ditto.
	* df-problems.c (df_rd_free_bb_info, df_rd_alloc, df_rd_confluence_n,
	df_rd_bb_local_compute, df_rd_transfer_function, df_rd_free):
	Added code to allocate, initialize or free expanded_lr_out.
	(df_rd_bb_local_compute_process_def): Restructured to make
	more understandable.
	(df_rd_confluence_n): Add code to do nothing with fake edges and
	code to no apply invalidate_by_call sets if the sets are being trimmed.
	(df_lr_local_finalize): Renamed to df_lr_finalize.
	(df_live_local_finalize): Renamed to df_live_finalize.

From-SVN: r131670
2008-01-20 01:48:25 +00:00
Maxim Kuvyrkov a750daa285 sched-ebb.c: Surround code with '#ifdef INSN_SCHEDULING'.
* sched-ebb.c: Surround code with '#ifdef INSN_SCHEDULING'.
	* ddg.c: Ditto.
	* sched-deps.c: Ditto.  Remove nested #ifdef's INSN_SCHEDULING.
	* sched-int.h: Surround declarations with '#ifdef INSN_SCHEDULING'.
	(print_insn): Move declaration to ...
	* rtl.h (print_insn): ... here.

From-SVN: r129417
2007-10-17 19:50:55 +00:00
Mircea Namolaru 46dc0789fe Modulo-scheduling improvements. Patch 2 of 2
Co-Authored-By: Andrey Belevantsev <abel@ispras.ru>
Co-Authored-By: Revital Eres <eres@il.ibm.com>
Co-Authored-By: Vladimir Yanovsky <yanov@il.ibm.com>

From-SVN: r127848
2007-08-28 06:52:16 +00:00
Maxim Kuvyrkov e2f6ff946a sched-int.h (struct _dep): Rename field 'kind' to 'type'.
* sched-int.h (struct _dep): Rename field 'kind' to 'type'.
	(DEP_KIND): Rename to DEP_TYPE.  Update all uses.
	(dep_def): New typedef.
	(init_dep_1, sd_debug_dep): Declare functions.
	(DEP_LINK_KIND): Rename to DEP_LINK_TYPE.
	(debug_dep_links): Remove.
	(struct _deps_list): New field 'n_links'.
	(DEPS_LIST_N_LINKS): New macro.
	(FOR_EACH_DEP_LINK): Remove.
	(create_deps_list, free_deps_list, delete_deps_list): Remove
	declaration.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con, move_dep_link): Ditto.
	(struct haifa_insn_data): Split field 'back_deps' into 'hard_back_deps'
	and 'spec_back_deps'.  New field 'resolved_forw_deps'.  Remove field
	'dep_count'.
	(INSN_BACK_DEPS): Remove.
	(INSN_HARD_BACK_DEPS, INSN_SPEC_BACK_DEPS, INSN_RESOLVED_FORW_DEPS):
	New macros.
	(INSN_DEP_COUNT): Remove.
	(enum DEPS_ADJUST_RESULT): Add new constant DEP_NODEP.  Fix comments.
	(spec_info, haifa_recovery_block_was_added_during_scheduling_p):
	Declare global variables.
	(deps_pools_are_empty_p, sched_free_deps): Declare functions.
	(add_forw_dep, compute_forward_dependences): Remove declarations.
	(add_or_update_back_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.
	(debug_ds, sched_insn_is_legitimate_for_speculation_p): Declare
	functions.
	(SD_LIST_NONE, SD_LIST_HARD_BACK, SD_LIST_SPEC_BACK, SD_LIST_FORW): New
	constants.
	(SD_LIST_RES_BACK, SD_LIST_RES_FORW, SD_LIST_BACK): Ditto.
	(sd_list_types_def): New typedef.
	(sd_next_list): Declare function.
	(struct _sd_iterator): New type.
	(sd_iterator_def): New typedef.
	(sd_iterator_start, sd_iterator_cond, sd_iterator_next): New inline
	functions.
	(FOR_EACH_DEP): New cycle wrapper.
	(sd_lists_size, sd_lists_empty_p, sd_init_insn, sd_finish_insn):
	Declare functions.
	(sd_find_dep_between, sd_add_dep, sd_add_or_update_dep): Ditto.
	(sd_resolve_dep, sd_copy_back_deps, sd_delete_dep, sd_debug_lists):
	Ditto.

	* sched-deps.c (init_dep_1): Make global.
	(DUMP_DEP_PRO, DUMP_DEP_CON, DUMP_DEP_STATUS, DUMP_DEP_ALL): New
	constants.
	(dump_dep): New static function.
	(dump_dep_flags): New static variable.
	(sd_debug_dep): New function.
	(add_to_deps_list, remove_from_deps_list): Update 'n_links' field of
	the list.
	(move_dep_link): Use remove_from_deps_list (), instead of
	detach_dep_link ().
	(dep_links_consistent_p, dump_dep_links, debug_dep_links): Remove.
	(dep_link_is_detached_p): New static function.
	(deps_obstack, dl_obstack, dn_obstack): Remove.  Use dn_pool, dl_pool
	instead.
	(dn_pool, dl_pool): New alloc_pools.
	(dn_pool_diff, dl_pool_diff): New static variables.
	(create_dep_node, delete_dep_node): New static function.
	(create_deps_list): Make it static.  Use alloc_pool 'dl_pool'.
	(deps_list_empty_p): Make it static.  Use 'n_links' field.
	(deps_pools_are_empty_p): New static function.
	(alloc_deps_list, delete_deps_list): Remove.
	(dump_deps_list, debug_deps_list, add_back_dep_to_deps_list): Remove.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Remove.  Use sd_copy_back_deps () instead.
	(forward_dependency_cache): Remove.
	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Remove
	'back' from the names.  Change signature to use dep_t instead of
	equivalent quad.
	(add_back_dep): Ditto.  Make global.
	(check_dep_status): Rename to check_dep ().
	(sd_next_list, sd_lists_size, sd_lists_empty_p, sd_init_insn):
	New functions.
	(sd_finish_insn): Ditto.
	(sd_find_dep_between_no_cache): New static function.
	(sd_find_dep_between): New function.
	(ask_dependency_caches, set_dependency_caches): New static functions.
	(update_dependency_caches, change_spec_dep_to_hard, update_dep): Ditto.
	(add_or_update_dep_1): Separate pieces of functionality into
	ask_dependency_caches (), update_dependency_caches (),
	change_spec_dep_to_hard (), update_dep ().
	(get_back_and_forw_lists): New static function.
	(sd_add_dep): Separate setting of dependency caches into
	set_dependency_caches ().
	(sd_add_or_update_dep, sd_resolve_dep, sd_copy_back_deps):
	New functions.
	(sd_delete_dep): Ditto.
	(DUMP_LISTS_SIZE, DUMP_LISTS_DEPS, DUMP_LISTS_ALL): New constants.
	(dump_lists): New static function.
	(sd_debug_lists): New debug function.
	(delete_all_dependences, fixup_sched_groups): Update to use
	sd_* infrastructure.
	(sched_analyze_2): Create data-speculative dependency only if
	data-speculation is enabled.
	(sched_analyze_insn): If insn cannot be speculative, make all its
	dependencies non-speculative.
	(sched_analyze): Use sd_init_insn ().
	(add_forw_dep, compute_forward_dependencies): Remove.
	(delete_dep_nodes_in_back_deps): New static function.
	(sched_free_deps): New function.
	(init_dependency_caches): Init alloc_pools.
	(extend_depedency_caches): Update after removing of
	forward_dependency_cache.
	(free_dependency_caches): Ditto.  Free alloc_pools.
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Remove.
	(delete_forw_dep, add_or_update_back_dep, add_or_update_back_forw_dep):
	Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.
	(add_dependence): Use init_dep ().
	(get_dep_weak_1): New static function.
	(get_dep_weak): Move logic to get_dep_weak_1 ().
	(dump_ds): New static function moved from haifa-sched.c:
	debug_spec_status ().
	(debug_ds): New debug function.
	(check_dep_status): Rename to check_dep ().  Update to check whole
	dependencies.

	* haifa-sched.c (spec_info): Make global.
	(added_recovery_block_p): Rename to
	'haifa_recovery_block_was_added_during_current_schedule_block_p'.
	(haifa_recovery_block_was_added_during_scheduling_p): New variable.
	(dep_cost, priority, rank_for_schedule, schedule_insn): Update
	to use new interfaces.
	(ok_for_early_queue_removal): Ditto.
	(schedule_block): Initialize logical uids of insns emitted by the
	target.
	(sched_init): Initialize new variable.
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	interfaces.
	(extend_global): Initialize insn data.
	(init_h_i_d): Remove code that is now handled in sd_init_insn ().
	(process_insn_forw_deps_be_in_spec): Change signature.  Update to use
	new interfaces.
	(add_to_speculative_block): Update to use new interfaces.
	(create_recovery_block): Set new variables.
	(create_check_block_twin, fix_recovery_deps): Update to use new
	interfaces.
	(sched_insn_is_legitimate_for_speculation_p): New function.
	(speculate_insn): Move checking logic to
	sched_insn_is_legitimate_for_speculation_p ().
	(sched_remove_insn): Finalize sched-deps information of instruction.
	(clear_priorities, add_jump_dependencies): Update to use new
	interfaces.
	(debug_spec_status): Rename to dump_ds () and move to sched-deps.c.
	
	* sched-rgn.c (set_spec_fed, find_conditional_protection): Update
	to use new interfaces.
	(is_conditionally_protected, is_pfree, is_prisky) Ditto.
	(new_ready): Try to use control speculation only if it is available.
	(add_branch_dependences): Update to use new interfaces.
	(compute_block_backward_dependences): Rename to
	compute_block_dependences ().  Call
	targetm.sched.dependencies_evaluation_hook ().
	(free_block_dependencies): New static function.
	(debug_dependencies): Update to use new interfaces.
	(schedule_region): Remove separate computation of forward dependencies.
	Move call of targetm.sched.dependencies_evaluation_hook () to
	compute_block_dependences ().  Free dependencies at the end of
	scheduling the region.

	* sched-ebb.c (earliest_block_with_similiar_load): Update to use
	new interfaces.
	(add_deps_for_risky_insns): Ditto.
	(schedule_ebb): Remove separate computation of forward dependencies.
	Free dependencies at the end of	scheduling the ebb.

	* ddg.c (create_ddg_dependence): Update to use new interfaces.
	(build_intra_loop_deps): Ditto.  Remove separate computation of forward
	dependencies.  Free sched-deps dependencies.

	* config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Update
	to use new interfaces.
	(ia64_dfa_new_cycle, ia64_gen_check): Ditto.

	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Update to use
	new interfaces.
	(is_costly_group): Ditto.

From-SVN: r127405
2007-08-14 06:40:34 +00:00
Vladimir Yanovsky 76b4f0f724 Remove profitability check
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r127293
2007-08-08 12:21:37 +00:00
Vladimir Yanovsky 517d76faef New flag to control reg-moves generation
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r127223
2007-08-05 09:43:07 +00:00
H.J. Lu e439ba2803 ddg.c (add_cross_iteration_register_deps): Declare bb_info only if ENABLE_CHECKING is defined.
2007-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	* ddg.c (add_cross_iteration_register_deps): Declare bb_info
	only if ENABLE_CHECKING is defined.

From-SVN: r127103
2007-07-31 11:43:55 -07:00
Revital Eres e0ab232eb4 SMS: Change the ddg's construction
From-SVN: r127085
2007-07-31 10:24:34 +00:00
Kaveh R. Ghazi 7bc980e1d9 alias.c (record_set, [...]): Constify.
* alias.c (record_set, memory_modified_1): Constify.
	* bt-load.c (note_btr_set): Likewise.
	* caller-save.c (mark_set_regs, add_stored_regs): Likewise.
	* combine.c (set_nonzero_bits_and_sign_copies,
	expand_field_assignment, record_dead_and_set_regs_1,
	use_crosses_set_p, reg_dead_at_p_1, can_combine_p,
	likely_spilled_retval_1): Likewise.
	* config/frv/frv.c (frv_registers_update_1, frv_io_check_address,
	frv_io_handle_set): Likewise.
	* config/mips/mips.c (mips_sim_record_set,
	vr4130_true_reg_dependence_p_1): Likewise.
	* config/mt/mt.c (insn_dependent_p_1): Likewise.
	* config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
	* config/sh/sh.c (flow_dependent_p_1): Likewise.
	* cselib.c (cselib_invalidate_rtx_note_stores): Likewise.
	* dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise.
	* ddg.c (mark_mem_store): Likewise.
	* df-problems.c (df_urec_mark_reg_change): Likewise.
	* function.c (update_epilogue_consts): Likewise.
	* gcse.c (record_set_info, record_last_set_info,
	mems_conflict_for_gcse_p, canon_list_insert, reg_set_info,
	reg_clear_last_set): Likewise.
	* global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live):
	Likewise.
	* jump.c (reversed_comparison_code_parts): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, no_equiv,
	reg_is_set): Likewise.
	* loop-iv.c (mark_altered): Likewise.
	* mode-switching.c (reg_becomes_live): Likewise.
	* optabs.c (no_conflict_move_test): Likewise.
	* postreload-gcse.c (record_last_set_info, find_mem_conflicts):
	Likewise.
	* postreload.c (reload_combine_note_store, move2add_note_store):
	Likewise.
	* regmove.c (flags_set_1): Likewise.
	* regrename.c (note_sets, kill_clobbered_value, kill_set_value):
	Likewise.
	* reload1.c (mark_not_eliminable, forget_old_reloads_1):
	Likewise. 
	* resource.c (update_live_status): Likewise.
	* rtl.h (set_of, note_stores): Likewise.
	* rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of,
	note_stores, parms_set): Likewise.
	* sched-rgn.c (sets_likely_spilled_1): Likewise.
	* stack-ptr-mod.c (notice_stack_pointer_modification_1):
	Likewise. 
	* var-tracking.c (count_stores, add_stores): Likewise.

From-SVN: r127065
2007-07-30 16:30:18 +00:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Kaveh R. Ghazi 5f754896d3 c-lex.c (c_lex_with_flags, lex_string): Constify.
* c-lex.c (c_lex_with_flags, lex_string): Constify.
	* c-ppoutput.c (print_line, pp_dir_change): Likewise.
	* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
	* cfg.c (bb_copy_original_hash, bb_copy_original_eq): Likewise.
	* cfgloop.c (loop_exit_hash, loop_exit_eq): Likewise.
	* ddg.c (compare_sccs): Likewise.
	* df-scan.c (df_ref_compare, df_mw_compare): Likewise.
	* dfp.c (decimal_real_from_string, decimal_to_decnumber,
	decimal_to_binary, decimal_do_compare, decimal_real_to_decimal,
	decimal_do_fix_trunc, decimal_real_to_integer,
	decimal_real_to_integer2, decimal_real_maxval): Likewise.
	* dse.c (const_group_info_t): New.
	(invariant_group_base_eq, invariant_group_base_hash): Constify.
	* dwarf2out.c (const_dw_die_ref): New.
	(decl_die_table_hash, decl_die_table_eq, file_info_cmp): Constify.
	* tree-browser.c (TB_parent_eq): Likewise.
	* unwind-dw2-fde.c (__register_frame_info_bases,
	__deregister_frame_info_bases, fde_unencoded_compare, fde_split,
	add_fdes, linear_search_fdes, binary_search_unencoded_fdes):
	Likewise.
	* unwind-dw2-fde.h (get_cie, next_fde): Likewise.
	* unwind-dw2.c (uw_frame_state_for): Likewise.
	* value-prof.c (histogram_hash, histogram_eq): Likewise.
	* value-prof.h (const_histogram_value): New.

From-SVN: r126920
2007-07-25 18:14:57 +00:00
H.J. Lu 72b31363fb ddg.c (check_sccs): Define only if ENABLE_CHECKING is defined.
2007-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	* ddg.c (check_sccs): Define only if ENABLE_CHECKING is
	defined.

From-SVN: r126258
2007-07-03 07:19:33 -07:00
Revital Eres 8cec1624c5 modulo-sched: print sccs and check it
From-SVN: r126249
2007-07-03 10:27:19 +00:00
Vladimir Yanovsky 7ee1ad8483 Fix missed initialization of scc_nodes.
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r126167
2007-07-01 14:03:51 +00:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Maxim Kuvyrkov b198261f9c re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
* sched-int.h (ds_to_dk, dk_to_ds): Declare functions.
	
	(struct _dep): New type.
	(dep_t): New typedef.
	(DEP_PRO, DEP_CON, DEP_KIND): New access macros.
	(DEP_STATUS): New access macro.  The macro with the same name was
	renamed to DEP_LINK_STATUS.
	(dep_init): Declare function

	(struct _dep_link): New type.
	(dep_link_t): New typedef.
	(DEP_LINK_NODE, DEP_LINK_NEXT, DEP_LINK_PREV_NEXTP): New access macros.
	(DEP_LINK_DEP, DEP_LINK_PRO, DEP_LINK_CON, DEP_LINK_KIND): New macros.
	(DEP_LINK_STATUS): New macro.
	(debug_dep_links): New debug function.

	(struct _deps_list): New type.
	(deps_list_t): New typedef.
	(DEPS_LIST_FIRST): New access macro.
	(FOR_EACH_DEP_LINK): New cycle macro.
	(create_deps_list, free_deps_list, delete_deps_list): Declare
	functions.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Ditto.

	(move_dep_link): Declare function.

	(struct _dep_node): New type.
	(dep_node_t): New typedef.
	(DEP_NODE_BACK, DEP_NODE_DEP, DEP_NODE_FORW): New access macros.

	(struct haifa_insn_data.back_deps): New field to hold backward
	dependencies of the insn.
	(struct haifa_insn_data.depend): Rename to forw_deps.  Change its type
	to deps_list_t.
	(struct haifa_insn_data.resolved_deps): Rename to resolved_back_deps.
	Change its type	to deps_list_t.
	(INSN_BACK_DEPS): New access macro to use instead of LOG_LINKS.
	(INSN_DEPEND): Rename to INSN_FORW_DEPS.
	(RESOLVED_DEPS): Rename to INSN_RESOLVED_BACK_DEPS.

	(INSN_COST): Move to haifa-sched.c.  Use insn_cost () instead.
	
	(DEP_STATUS): Rename to DEP_LINK_STATUS.  Fix typo in the comment.

	(add_forw_dep, delete_back_forw_dep, insn_cost): Update declaration and
	all callers.
	(dep_cost): Declare.
	
	* sched-deps.c (CHECK): New macro to (en/dis)able sanity checks.
	(ds_to_dk, dk_to_ds): New functions.
	
	(init_dep_1): New static function.
	(init_dep): New function.
	(copy_dep): New static function.
	
	(dep_link_consistent_p, attach_dep_link, add_to_deps_list): New static
	functions.
	(detach_dep_link): New static function.
	(move_dep_link): New function.
	
	(dep_links_consistent_p, dump_dep_links): New static functions.
	(debug_dep_links): New debugging function.
	
	(deps_obstack, dl_obstack, dn_obstack): New static variables.
	
	(alloc_deps_list, init_deps_list): New static functions.
	(create_deps_list): New function.
	(clear_deps_list): New static function.
	(free_deps_list, delete_deps_list, deps_list_empty_p): New functions.
	(deps_list_consistent_p, dump_deps_list): New static functions.
	(debug_deps_list): New function.
	(add_back_dep_to_deps_list, find_link_by_pro_in_deps_list): New
	functions.
	(find_link_by_con_in_deps_list, copy_deps_list_change_con): Ditto.

	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Update to
	use new scheduler dependencies lists.
	(add_back_dep, delete_all_dependences, fixup_sched_groups): Ditto.
	(sched_analyze): Ditto.  Initialize dependencies lists.
	(add_forw_dep, compute_forward_dependences): Update to use new
	scheduler dependencies lists.
	
	(init_dependency_caches): Init deps_obstack.
	(free_dependency_caches): Free deps_obstack.
	
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Update to use
	new scheduler dependencies lists.
	(delete_forw_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.

	* sched-rgn.c (set_spec_fed, find_conditional_protection, is_pfree):
	Update to use new scheduler dependencies lists.
	(is_conditionally_protected, is_prisky, add_branch_dependences): Ditto.
	(debug_dependencies): Ditto.
	(schedule_region): Update comments.
	
	* sched-ebb.c (earliest_block_with_similiar_load): Update to use new
	scheduler dependencies lists.
	(schedule_ebb): Update comments.
	
	* rtl.def (DEPS_LIST): Remove.
	
	* lists.c (unused_deps_list): Remove.
	(free_list): Update assertions.
	
	(alloc_DEPS_LIST, free_DEPS_LIST_list, free_DEPS_LIST_node): Remove.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.

	* rtl.h (free_DEPS_LIST_list, alloc_DEPS_LIST): Remove declarations.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.
	
	* haifa-sched.c (comments): Update.
	(insn_cost1): Remove.  Inline the code into insn_cost ().
	(insn_cost): Update to use new scheduler dependencies lists.  Move
	processing of the dependency cost to dep_cost ().
	(dep_cost): New function.  Use it instead of insn_cost () when
	evaluating cost of the dependency.  Use compatible interface to
	interact with the target.
	(priority): Update to use new scheduler dependencies lists.
	(rank_for_schedule): Ditto.  Optimize heuristic that prefers the insn
	with greater number of insns that depend on the insn.
	(schedule_insn): Update to use new scheduler dependencies lists.  Add
	code to free backward dependencies lists.  Inline and optimize code
	from resolve_dep () - see PR28071.
	(ok_for_early_queue_removal): Update to use new scheduler dependencies
	lists.  Update call to targetm.sched.is_costly_dependence hook.
	
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	scheduler dependencies lists.
	
	(resolve_dep): Remove.  Move the logic to schedule_insn ().
	(init_h_i_d): Initialize dependencies lists.
	
	(process_insn_depend_be_in_spec): Rename to
	process_insn_forw_deps_be_in_spec.  Update to use new scheduler
	dependencies lists.
	(add_to_speculative_block, create_check_block_twin, fix_recovery_deps):
	Update to use new scheduler dependencies lists.
	(clear_priorities, calc_priorities, add_jump_dependencies): Ditto.
	
	* ddg.c (create_ddg_dependence, create_ddg_dep_no_link): Update to use
	new scheduler dependencies lists.
	(build_intra_loop_deps): Ditto.
	
	* target.h (struct _dep): Declare to use in
	gcc_target.sched.is_costly_dependence.
	(struct gcc_target.sched.adjust_cost): Fix typo.
	(struct gcc_target.sched.is_costly_dependence): Change signature to use
	single dep_t parameter instead of an equivalent triad.
	(struct gcc_target.sched.adjust_cost_2): Remove.

	* target-def.h (TARGET_SCHED_ADJUST_COST_2): Remove.

	* reg-notes.def (DEP_TRUE, DEP_OUTPUT, DEP_ANTI): Update comments.

	* doc/tm.texi (TARGET_SCHED_IS_COSTLY_DEPENDENCE): Update
	documentation.
	(TARGET_SCHED_ADJUST_COST_2): Remove documentation.

	* doc/rtl.texi (LOG_LINKS): Remove part about instruction scheduler.
	(REG_DEP_TRUE): Document.
	
	* config/ia64/ia64.c (ia64_adjust_cost_2): Rename to ia64_adjust_cost.
	Change signature to correspond to the targetm.sched.adjust_cost hook.  
	Update use in TARGET_SCHED_ADJUST_COST_2.
	(TARGET_SCHED_ADJUST_COST_2): Rename to TARGET_SCHED_ADJUST_COST.
	(ia64_dependencies_evaluation_hook, ia64_dfa_new_cycle): Update to use
	new scheduler dependencies lists.
	(ia64_gen_check): Ditto.

	* config/mips/mips.c (vr4130_swap_insns_p): Update to use new scheduler
	dependencies lists.
	
	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Change
	signature to correspond to the targetm.sched.is_costly_dependence hook.
	(is_costly_group): Update to use new scheduler dependencies lists.

	* config/spu/spu.c (spu_sched_adjust_cost): Use insn_cost () function
	instead of INSN_COST () macro.

From-SVN: r121494
2007-02-02 09:11:11 +00:00
Roger Sayle 428aba16aa builtins.c (expand_builtin_mathfn_3): Correct coding style.
* builtins.c (expand_builtin_mathfn_3): Correct coding style.
	* ddg.c (print_ddg_edge): Likewise.
	* dwarf2out.c (prune_unused_types_walk): Likewise.
	* ifcvt.c (noce_try_cmove_arith): Likewise.
	* langhooks.c (add_builtin_function): Likewise.
	* reg-stack.c (subst_stack_regs_pat): Likewise.
	* tree.c (expanded_location): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.

From-SVN: r118187
2006-10-30 17:51:46 +00:00
Kenneth Zadeck 1a1a5f4b25 re PR rtl-optimization/26375 (Swing modulo scheduling results in ICE)
2006-05-22  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/26375
	PR rtl-optimization/26855
	* df-problems (df_ru_bb_local_compute_process_def): Removed update
	to gen set.
	(df_ru_bb_local_compute): Reversed statements and removed bogus
	comment explaining why they should be in wrong order.
	(df_ru_dump, df_rd_dump): Enhanced debug info.     
	* modulo-sched.c (sms_schedule, tree_opt_pass pass_sms): Enhanced
	debug info.       
	* ddg.c (add_deps_for_def): Converted use of reaching defs to
        reaching uses and fixed space problem.

From-SVN: r114010
2006-05-23 01:17:29 +00:00
Maxim Kuvyrkov 496d7bb032 target.h (struct spec_info_def): New opaque declaration.
2006-03-16  Maxim Kuvyrkov <mkuvyrkov@ispras.ru>

        * target.h (struct spec_info_def): New opaque declaration.
        (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended,
        speculate_insn, needs_block_p, gen_check,
        first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags.
        * target-def.h (TARGET_SCHED_ADJUST_COST_2,
        TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN,
        TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK,
        TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC,
        TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in
        gcc_target.sched.
        (TARGET_SCHED): Use new macros.
        * rtl.h (copy_DEPS_LIST_list): New prototype.
        * sched-int.h (struct sched_info): Change signature of new_ready field,
	adjust all initializations. New fields: add_remove_insn,
        begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg,
	region_head_or_leaf_p.
        (struct spec_info_def): New structure declaration.
        (spec_info_t): New typedef.
        (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec,
        recovery_block, orig_pat.
        (glat_start, glat_end): New variables declaraions.
        (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT):
	New access macros.
        (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB,
        DETACH_LIFE_INFO, USE_GLAT.
        (enum SPEC_SCHED_FLAGS): New enumeration.
        (NOTE_NOTE_BB_P): New macro.
        (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block,
        attach_life_info, debug_spec_status, check_reg_live): New functions.
        (get_block_head_tail): Change signature to get_ebb_head_tail, adjust
        all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c,
        sched-ebb.c
	(get_dep_weak, ds_merge): Prototype functions from sched-deps.c .
        * ddg.c (get_block_head_tail): Adjust all uses.
        * modulo-sched.c (get_block_head_tail): Adjust all uses.
	(sms_sched_info): Initialize new fields.
	(contributes_to_priority): Removed.
        * haifa-sched.c (params.h): New include.
	(get_block_head_tail): Adjust all uses.
        (ISSUE_POINTS): New macro.
        (glat_start, glat_end): New global variables.
        (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data,
	nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header,
	old_last_basic_block, before_recovery, current_sched_info_var,
	rgn_n_insns, luid): New static variables.
        (insn_cost1): New function.  Move logic from insn_cost to here.
        (find_insn_reg_weight1): New function.  Move logic from
        find_insn_reg_weight to here.
        (reemit_notes, move_insn, max_issue): Change signature.
        (move_insn1): Removed.
        (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d,
        extend_bb): New static functions to support extension of scheduler's
        data structures.
        (generate_recovery_code, process_insn_depend_be_in_spec,
        begin_speculative_block, add_to_speculative_block,
        init_before_recovery, create_recovery_block, create_check_block_twin,
        fix_recovery_deps): New static functions to support
        generation of recovery code.
        (fix_jump_move, find_fallthru_edge, dump_new_block_header,
        restore_bb_notes, move_block_after_check, move_succs): New static
        functions to support ebb scheduling.
        (init_glat, init_glat1, attach_life_info1, free_glat): New static
        functions to support handling of register live information.
        (associate_line_notes_with_blocks, change_pattern, speculate_insn,
	sched_remove_insn, clear_priorities, calc_priorities, bb_note,
	add_jump_dependencies):	New static functions.
        (check_cfg, has_edge_p, check_sched_flags): New static functions for
	consistancy checking.
	(debug_spec_status): New function to call from debugger.
	(priority): Added code to handle speculation checks.
	(rank_for_schedule): Added code to distinguish speculative instructions.
	(schedule_insn): Added code to handle speculation checks.
	(unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes):
	Fixed to handle ebbs.
        (move_insn): Added code to handle ebb scheduling.
	(max_issue): Added code to use ISSUE_POINTS of instructions.
        (choose_ready): Added code to choose between speculative and
        non-speculative instructions.
        (schedule_block): Added code to handle ebb scheduling and scheduling of
        speculative instructions.
        (sched_init): Initialize new variables.
        (sched_finish): Free new variables.  Print statistics.
        (try_ready): Added code to handle speculative instructions.
        * lists.c (copy_DEPS_LIST_list): New function.
        * sched-deps.c (extend_dependency_caches): New function.  Move logic
        from create_dependency_caches to here.
	(get_dep_weak, ds_merge): Make global.
        * genattr.c (main): Code to output prototype for
        dfa_clear_single_insn_cache.
        * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros.
        (output_dfa_clean_insn_cache_func): Code to output
        dfa_clear_single_insn_cache function.
        * sched-ebb.c (target_n_insns): Remove.  Adjust all users to use
	n_insns.
        (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs):
        Removed.
        (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb):
        New static variables.
        (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb,
	fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from
	struct sched_info.
        (ebb_sched_info): Initialize new fields.
	(get_block_head_tail): Adjust all uses.
	(compute_jump_reg_dependencies): Fixed to use glat_start.
	(schedule_ebb): Code to remove unreachable last block.
        (schedule_ebbs): Added code to update register live information.
        * sched-rgn.c (region_sched_info): Initialize new fields.
	(get_block_head_tail): Adjust all uses.
	(last_was_jump): Removed.  Adjust users.
        (begin_schedule_ready, add_remove_insn, insn_points, extend_regions,
	add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p):
	Implement new hooks.
        (check_dead_notes1): New static function.
        (struct region): New fields: dont_calc_deps, has_real_ebb.
        (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros.
        (BB_TO_BLOCK): Fixed to handle EBBs.
        (EBB_FIRST_BB, EBB_LAST_BB): New macros.
        (ebb_head): New static variable.
        (debug_regions, contributes_to_priority): Fixed to handle EBBs.
        (find_single_block_regions, find_rgns, find_more_rgns): Initialize
	new fields.
	(compute_dom_prob_ps): New assertion.
        (check_live_1, update_live_1): Fixed to work with glat_start instead of
        global_live_at_start.
	(init_ready_list): New assertions.
	(can_schedule_ready_p): Split update code to begin_schedule_ready.
	(new_ready): Add support for BEGIN_CONTROL speculation.
        (schedule_insns): Fixed code that updates register live information
        to handle EBBs.
        (schedule_region): Fixed to handle EBBs.
	(init_regions): Use extend_regions and check_dead_notes1.
        * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY,
        PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters.
	* doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED,
	TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P,
	TARGET_SCHED_GEN_CHECK,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC,
	TARGET_SCHED_SET_SCHED_FLAGS): Document.
        * doc/invoke.texi (max-sched-insn-conflict-delay,
	sched-spec-prob-cutoff): Document.

From-SVN: r112128
2006-03-16 05:27:03 +00:00
Maxim Kuvyrkov ddbd543924 ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call.
2006-03-16  Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
            Andrey Belevantsev <abel@ispras.ru>

	* ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call.
        * lists.c (unused_deps_list): New variable.
	(free_list): Add assertions to verify the proper distinguishing 
        between INSN_LISTs and DEPS_LISTs.
        (find_list_elem, remove_list_elem, remove_list_node): New static
	functions.
        (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node,
        remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem,
        remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions.
        (alloc_INSN_LIST): Assert that the list we're working on is indeed
	an INSN_LIST.
        (free_INSN_LIST_node): Likewise.
	* modulo-sched.c (current_sched_info): Initialize flags field.
	* reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT.
	* rtl.def (DEPS_LIST): Define.
        * rtl.h: Declare new functions from lists.c.
        * sched-deps.c (spec_dependency_cache): New static variable.
        (maybe_add_or_update_back_dep_1, add_back_dep): New static functions.
        (add_dependence): Change return type to void.  Move the logic to ...
        (add_or_update_back_dep_1): ... here.  Handle speculative dependencies.
        (delete_all_dependences): Add comment about forward_dependency_cache.
	Handle spec_dependency_cache.  Handle DEPS_LISTs.
        (fixup_sched_groups): Clarify the change of priority of output
        and anti dependencies.
        (sched_analyze_2): Adjust add_dependence calls to create data
	speculative dependence.
        (add_forward_dependence): Renamed to add_forw_dep, change prototype.
	Adjust all callers.  Handle DEPS_LISTS.
        (compute_forward_dependences): Use add_forw_dep.  Sort LOG_LINKs in
	presence of speculation.
        (init_dependency_caches, free_dependency_caches):
	Handle spec_dependency_cache.
        (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep,
	estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status):
	New static functions.
        (add_or_update_back_dep, add_or_update_back_forw_dep,
	add_back_forw_dep, delete_back_forw_dep): New functions.
	* sched-int.h (ds_t, dw_t): New typedefs.
	(struct sched_info): Add new field flags.
	(struct haifa_insn_data): Add new bitfield has_internal_dep.
	Prototype new sched-deps.c functions.
        (HAS_INTERNAL_DEP, DEP_STATUS): New access macros.
	(BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK,
	MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA,
	BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC,
	SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE,
	SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP):
	New constants.
        (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS):
	New enums.
	* sched-rgn.c (current_sched_info): Initialize flags field.
	(schedule_insns): Initialize current_sched_info before the sched_init
	call.
	* sched-ebb.c (current_sched_info): Initialize flags field.
	(add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P.
	Call add_or_update_back_dep instead of add_dependence.
	Create control speculative dependencies.
	(schedule_insns): Initialize current_sched_info before the sched_init
	call.

Co-Authored-By: Andrey Belevantsev <abel@ispras.ru>

From-SVN: r112125
2006-03-16 05:17:41 +00:00
Zdenek Dvorak 10d2256750 tree-vrp.c (execute_vrp): Do not pass dump argument to.
* tree-vrp.c (execute_vrp): Do not pass dump argument to.
	loop_optimizer_init and loop_optimizer_finalize
	* tree-ssa-sink.c (execute_sink_code): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init,
	tree_ssa_loop_done): Ditto.
	* tree-ssa-pre.c (init_pre, fini_pre): Ditto.
	* sched-ebb.c: Include output.h.
	(schedule_ebbs): Do not use dump argument.
	* value-prof.h (struct profile_hooks): Remove profile_dump_file.
	* loop.c (loop_dump_stream): Removed.
	(loop_optimize, rest_of_handle_loop_optimize): Do not use dump
	argument.
	(scan_loop, move_movables, find_and_verify_loops, mark_loop_jump,
	emit_prefetch_instructions, loop_bivs_find, loop_bivs_check,
	final_biv_value, loop_biv_eliminable_p, loop_givs_rescan,
	loop_iterations, strength_reduce, record_biv, record_giv,
	final_giv_value, check_final_value, check_ext_dependent_givs,
	combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems,
	try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use
	dump_file instead of loop_dump_stream.
	* ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call
	argument dump_file.
	* reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use
	dump argument.
	* flow.c (life_analysis, rest_of_handle_life): Ditto.
	* haifa-sched.c: Include output.h
	(schedule_insns, sched_init): Do not use dump argument.
	* mode-switching.c (optimize_mode_switching): Ditto.
	* modulo-sched.c (stats_file): Removed.
	(print_node_sched_params): Do not call argument dump_file.
	(sms_schedule_by_order, loop_canon_p, sms_schedule,
	rest_of_handle_sms): Do not use dump argument.  Use dump_file instead
	of stats_file.
	* cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not
	use dump argument.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize,
	rtl_loop_init, rtl_loop_done): Ditto.
	* global.c (global_alloc, rest_of_handle_global_alloc): Ditto.
	* predict.c (combine_predictions_for_bb, tree_estimate_probability):
	Ditto.
	* recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto.
	* lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto.
	* regmove.c (fixup_match_1, fixup_match_2, regmove_optimize,
	rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto.
	* emit-rtl.c (renumber_insns): Ditto.
	* cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr,
	expand_gimple_basic_block, tree_expand_cfg): Ditto.
	* regclass.c (regclass): Ditto.
	* tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts,
	remove_ssa_form, rewrite_out_of_ssa): Ditto.
	* reg-stack.c (compensate_edge, compensate_edges, convert_regs_1,
	convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs):
	Ditto.
	* sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto.
	* local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file
	to regclass.
	* gcse.c (gcse_file, debug_stderr): Removed.
	(gcse_main, bypass_jumps, rest_of_handle_jump_bypass,
	rest_of_handle_gcse): Do not use dump argument.
	(cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets,
	one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb,
	pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass,
	compute_code_hoist_vbeinout, compute_code_hoist_data,
	one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores,
	compute_store_table, build_store_vectors, insert_insn_start_bb,
	insert_store, remove_reachable_equiv_notes, replace_store_insn,
	store_motion): Use dump_file instead of gcse_file.
	* ipa-type-escape.c (type_escape_execute): Remove debugging comments.
	* profile.c (profile_dump_file): Removed.
	(branch_prob): Use dump_file instead of profile_dump_file.
	* ipa.c (cgraph_remove_unreachable_nodes): Do not call argument
	dump_file.
	* tree-ssa-copy.c (dump_copy_of): Ditto.
	* rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass
	dump file to life_analysis.
	* bt-load.c (branch_target_load_optimize): Ditto.
	* cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to
	renumber_insns.
	* rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs,
	regclass, dbr_schedule): Declaration changed.
	* sched-int.h (sched_init): Declaration changed.
	* tree-profile.c (tree_profile_dump_file): Removed.
	(tree_profile_hooks): Removed profile_dump_file hook.
	* rtl-profile (rtl_profile_dump_file): Removed.
	(rtl_profile_hooks): emoved profile_dump_file hook.
	* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration
	changed.
	* c-gimplify.c (c_genericize): Do not call local variable dump_file.
	* tree-cfg.c (build_tree_cfg): Ditto.
	* Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency.
	* basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm):
	Declaration changed.
	* config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to
	life_analysis and schedule_insns.
	* config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to
	life_analysis.
	* config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to
	dbr_schedule.
	* config/mips/mips.c (mips_reorg): Ditto.
	* config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to
	schedule_ebbs.

From-SVN: r110656
2006-02-06 18:20:47 +00:00
Daniel Berlin 4d779342f0 df.h (DF_SCAN, [...]): New macros.
2005-01-11  Danny Berlin <dberlin@dberlin.org>
            Kenneth Zadeck <zadeck@naturalbridge.com>

	* df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN,
	DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN,
	DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS,
	DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO,
	DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT,
	DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN,
	DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO,
	DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO,
	DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN,
	DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG,
	DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P,
	DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P,
	DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET,
	DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET,
	DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF,
	DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET,
	DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES,
	DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS,
	DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL,
	DF_SCAN_POST_ALLOC): New macros.
	(df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function,
	df_free_bb_function, df_local_compute_function, df_init_function,
	df_dataflow_function, df_confluence_function_0,
	df_confluence_function_n, df_transfer_function,
	df_finalizer_function, df_free_function, df_dump_problem_function,
	df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link,
	df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info,
	df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info,
	df_urec_bb_info, ) New types.
	(df_invalidated_by_call, df_all_hard_regs, df_state) New public
	variables.
	(df_init, df_add_problem, df_set_blocks, df_finish, df_analyze,
	df_analyze_simple_change_some_blocks,
	df_analyze_simple_change_one_block, df_compact_blocks,
	df_bb_replace, df_bb_regno_last_use_find,
	df_bb_regno_first_def_find, df_bb_regno_last_def_find,
	df_insn_regno_def_p, df_find_def, df_find_use,
	df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump,
	df_regs_chain_dump, df_insn_debug, df_insn_debug_regno,
	df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno,
	debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref,
	debug_df_chain, df_get_dependent_problem, df_chain_create,
	df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out,
	df_grow_bb_info, df_chain_dump, df_print_bb_index,
	df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem,
	df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info,
	df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem,
	df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem,
	df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem,
	df_rescan_blocks, df_ref_create, df_get_artificial_defs,
	df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink,
	df_ref_remove, df_insn_refs_delete, df_refs_delete,
	df_reorganize_refs, df_set_state, df_hard_reg_init,
	df_read_modify_subreg_p) New public functions.
        * df-core.c: The core dataflow solver and glue routines for rtl
	dataflow.
	(df_init, df_add_problem, df_set_blocks, df_finish,
	df_hybrid_search_forward, df_hybrid_search_backward,
	df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem,
	df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace,
	df_bb_regno_last_use_find, df_bb_regno_first_def_find,
	df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def,
	df_reg_defined, df_find_use, df_reg_used, df_dump,
	df_refs_chain_dump, df_regs_chain_dump, df_insn_debug,
	df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn,
	debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno,
	debug_df_useno, reset_df_after_reload): New functions.
	* df-scan.c: The scanning fuctions, once in df.c, completely
	rewritten so that they now fully model the functionality of
	register usage at the backend.
	(df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info,
	df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump,
	df_scan_add_problem, df_grow_reg_info, df_grow_ref_info,
	df_grow_insn_info, df_rescan_blocks, df_ref_create,
	df_get_artificial_defs, df_get_artificial_uses,
	df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink,
	df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete,
	df_refs_delete, df_reorganize_refs, df_set_state,
	df_ref_create_structure, df_ref_record, df_read_modify_subreg_p,
	df_def_record_1, df_defs_record, df_uses_record,
	df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record,
	df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg,
	df_record_exit_block_uses, df_hard_reg_init): New functions.

	* df-problems.c: Seven concrete dataflow problems that use the
	scanning in df-scan.c and are solved by the engine in df-core.c.
	(df_get_dependent_problem, df_chain_create, df_chain_unlink,
	df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info,
	df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen,
	df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info,
	df_ru_free_bb_info, df_ru_alloc,
	df_ru_bb_local_compute_process_def,
	df_ru_bb_local_compute_process_use, df_ru_bb_local_compute,
	df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n,
	df_ru_transfer_function, df_ru_free, df_ru_dump,
	df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info,
	df_rd_free_bb_info, df_rd_alloc,
	df_rd_bb_local_compute_process_def, df_rd_bb_local_compute,
	df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n,
	df_rd_transfer_function, df_rd_free, df_rd_dump,
	df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info,
	df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute,
	df_lr_local_compute, df_lr_init, df_lr_confluence_0,
	df_lr_confluence_n, df_lr_transfer_function, df_lr_free,
	df_lr_dump, df_lr_add_problem, df_ur_get_bb_info,
	df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc,
	df_ur_bb_local_compute, df_ur_local_compute, df_ur_init,
	df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function,
	df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info,
	df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc,
	df_urec_mark_reg_change, df_urec_check_earlyclobber,
	df_urec_mark_reg_use_for_earlyclobber,
	df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute,
	df_urec_local_compute, df_urec_init, df_urec_local_finalize,
	df_urec_confluence_n, df_urec_transfer_function, df_urec_free,
	df_urec_dump, df_urec_add_problem, df_chain_alloc,
	df_chain_create_bb_process_use, df_chain_create_bb,
	df_chain_finalize, df_chain_free, df_chains_dump,
	df_chain_add_problem, df_ri_alloc, df_ri_bb_compute,
	df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem,
	df_reg_lifetime): New functions.
	* df.c: Deleted file.
        * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code
	consistent with new df api.
        * modulo-sched.c (sms_schedule, rest_of_handle_sms,
        rest_of_handle_sms): Ditto.
        * web.c (unionfind_union, union_defs, entry_register, web_main):
	Ditto.
	* loop_invariant.c (invariant_for_use, hash_invariant_expr_1,
	invariant_expr_equal_p, find_defs, check_dependencies,
	find_invariant_insn, find_invariants_to_move, move_invariant_reg,
	free_inv_motion_data, move_loop_invariants): Ditto.
	* sched-deps.c (sched_analyze_1): Ditto.


Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>

From-SVN: r109577
2006-01-11 12:57:18 +00:00
Ben Elliston dfea6c85d8 bt-load.c (link_btr_uses): Fix uninitialised warnings.
* bt-load.c (link_btr_uses): Fix uninitialised warnings.
	* cfganal.c (find_edge_index): Ditto.
	* combine.c (combine_instructions): Ditto.
	* ddg.c (create_scc): Ditto.
	(find_successors): Ditto.
	(find_predecessors): Ditto.
	(find_nodes_on_paths): Ditto.
	(longest_simple_path): Ditto.
	* flow.c (update_life_info): Ditto.
	(count_or_remove_death_notes): Ditto.
	(clear_log_links): Ditto.
	* modulo-sched.c (generate_reg_moves): Ditto.
	(find_max_asap): Ditto.
	(find_max_hv_min_mob): Ditto.
	(find_max_dv_min_mob): Ditto.
	* sbitmap.c (sbitmap_first_set_bit): Ditto.
	* sched-rgn.c (extract_edgelst): Ditto.
	* tree-into-ssa.c (prepare_names_to_update): Ditto.
	(dump_update_ssa): Ditto.
	(ssa_names_to_replace) Ditto.
	(switch_virtuals_to_full_rewrite): Ditto.
	(update_ssa): Ditto.
	* tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto.

From-SVN: r102151
2005-07-19 14:08:32 +10:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kazu Hirata b6e7e9af04 sbitmap.h (sbitmap_iterator, [...]): New.
* sbitmap.h (sbitmap_iterator, sbitmap_iter_init,
	sbitmap_iter_cond, sbitmap_iter_next): New.
	* bt-load.c, cfganal.c, combine.c, ddg.c, flow.c,
	modulo-sched.c, sbitmap.c, sched-rgn.c, tree-into-ssa.c,
	tree-outof-ssa.c, tree-ssa-alias.c, tree-ssa-live.c: Update
	uses of EXECUTE_IF_SET_IN_SBITMAP to the new style.

From-SVN: r100709
2005-06-07 14:30:25 +00:00
Kazu Hirata 0fa2e4df47 c-common.c, [...]: Fix comment typos.
* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h,
	cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c,
	ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c,
	tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c,
	tree-ssa-operands.c, tree-vect-analyze.c,
	tree-vect-transform.c, tree-vectorizer.c, tree.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/frv/frv.md, config/i386/i386.c, config/i386/sse.md,
	config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md,
	config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md,
	config/sh/ushmedia.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos.
	Follow spelling conventions.

From-SVN: r100218
2005-05-26 18:15:27 +00:00
Kazu Hirata 5f99662735 builtin-types.def, [...]: Update copyright.
* builtin-types.def, c-convert.c, c-format.c, ddg.c, debug.c,
	debug.h, et-forest.c, et-forest.h, gcov.c, rtl-profile.c,
	rtlhooks-def.h, rtlhooks.c, sdbout.c, tree-inline.h,
	tree-profile.c, tsystem.h, value-prof.h: Update copyright.

From-SVN: r97209
2005-03-29 22:15:53 +00:00
Mostafa Hagog d331e20402 Fix PR middle-end/20177 and add test case.
From-SVN: r96828
2005-03-21 18:49:29 +00:00
Nathan Sidwell 7932a3db21 bitmap.h (struct bitmap_obstack): New obstack type.
* bitmap.h (struct bitmap_obstack): New obstack type.
	(struct bitmap_head_def): Replace using_obstack with obstack
	pointer.
	(bitmap_default_obstack): New.
	(bitmap_initialize): Make inline, does not do allocation.
	(bitmap_release_memory): Remove.
	(bitmap_obstack_initialize, bitmap_obstack_release): Declare.
	(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
	bitmap_obstack_free, bitmap_malloc_free): Declare.
	(BITMAP_OBSTACK_ALLOC, BITMAP_GGC_ALLOC, BITMAP_XMALLOC): Adjust.
	(BITMAP_FREE): Replace with ...
	(BITMAP_OBSTACK_FREE): ... this.
	(BITMAP_XFREE): Adjust.
	(BITMAP_INIT_ONCE): Remove.
	* bitmap.c (bitmap_obstack, bitmap_obstack_init, bitmap_free: Remove.
	(bitmap_default_obstack): New.
	(bitmap_elem_to_freelist): Adjust.
	(bitmap_element_allocate): Adjust. Break initialization into ...
	(bitmap_obstack_initialize): ... here.
	(bitmap_release_memory): Replace with ...
	(bitmap_obstack_release): ... this.
	(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
	bitmap_obstack_free, bitmap_malloc_free): New.
	(bitmap_ior_and_compl, bitmap_ior_and_compl_into): Use
	bitmap_initialize.
	(bitmap_initialize): Move to bitmap.h.
	* gengtype.c (open_base_files): Add obstack.h to ifiles.
	* Makefile.in (BASIC_BLOCK_H, REGS_H): Add obstack.h.
	* basic-block.h (INIT_REG_SET): Allocate from reg_obstack.
	(INITIALIZE_REG_SET): Remove.
	(FREE_REG_SET): Use BITMAP_OBSTACK_FREE.
	(INIT_ONCE_REG_SET, MAX_REGNO_REG_SET): Remove.
	(flow_obstack): Do not declare.
	(reg_obstack): Declare.
	* regs.h: Include obstack.h.
	* tree-optimize.c (tree_rest_of_compilation): Initialize and
	release bitmap obstack here.
	* bb-reorder.c: #include regs, not basic-block.
	(fix_crossing_conditional_branches): Allocate regsets from
	reg_obstack.
	* bt-load.c: Do not inlude bitmap.h, sbitmap.h, basic-block.h or
	obstack.h.
	* caller-save.c: Include regs.h earlier.
	* cfg.c: Do not include basic-block.h or obstack.h.
	(reg_obstack): Define.
	* cfganal.c: Include obstack.h
	* cfgcleanyp.c: Do not include basic-block.h. Include regs.h
	earlier.
	* cfglayout.c: Do not include obstack.h.
	(flow_obstack): Remove declaration.
	(cfg_layout_duplicate_bb): Use reg_obstack.
	* cfgloop.c, cfgloopanal.c, cfgloopmanip.c: Include obstack.h.
	* cfgrtl.c (rtl_split_block): Use reg_obstack.
	(force_nonfallthru_and_redirect, rtl_split_edge): Likewise.
	(safe_insert_insn_on_edge): Use OBSTACK_ALLOC_REG_SET, adjust.
	(cfg_layout_split_edge): Use reg_obstack.
	* cse.c: Include regs.h earlier.
	* ddg.c: Do not include basic-block.h.
	* dominance.c: Inlude obstack.h.
	* flow.c (update_life_info): Use OBSTACK_ALLOC_REG_SET, adjust.
	(calculate_global_regs_live): Likewise.
	(allocate_bb_life_data): Use reg_obstack.
	(init_propagate_block_info): Use OBSTACK_ALLOC_REGSET.
	* global.c: Do not include basic-block.h.
	(build_insn_chain): Use OBSTACK_ALLOC_REG_SET, adjust.
	* graph.c: Include obstack.h.
	* haifa-sched.c: Do not include basic-block.h.
	* ifcvt.c: Use OBSTACK_ALLOC_REG_SET, adjust.
	* local-alloc.c: Do not include basic-block.h.
	* loop-init.c, loop-invariant.c: Include obstack.h.
	* loop-iv.c: Likewise.
	(simplify_using_initial_values): Use OBSTACK_ALLOC_REG_SET,
	adjust.
	* loop-unroll.c, loop-unswitch.c: Inlude obstack.h.
	* modulo-sched.c: Do not include basic-block.h.
	* passes.c (rest_of_handle_final): Do not call
	regset_release_memory.
	* ra-debug.c: Include regs.h earlier. Do not include
	basic-block.h.
	* recog.c (peephole2_optimize): Use OBSTACK_ALLOC_REG_SET, adjust.
	* regclass.c (init_reg_sets): Do not call INIT_ONCE_REG_SET.
	(allocate_reg_info): Do not call MAX_REGNO_REG_SET.
	(regset_release_memory): Remove.
	* resource.c: Do not include basic-block.h.
	* rtlanal.c: Do not include basic-block.h.
	* sbitmap.c: Include obstack.h.
	* sched-deps.c: Do not include basic-block.h.
	(reg_pending_sets_head, reg_pending_clobbers_head,
	reg_pending_uses_head): Remove.
	(init_deps_global): Use OBSTACK_ALLOC_REG_SET.
	* sched-ebb.c: Do not include basic-block.h.
	* sched-rgn.c: Likewise.
	* tree-if-conv.c (get_loop_body_in_if_conv_order): Use
	BITMAP_XFREE.
	* tree-outof-ssa.c (perform_edge_inserts): Use BITMAP_XFREE.
	* tree-sra.c (decide_instantiations): Adjust bitmap
	initialization.
	* tree-ssa-dce.c: Include obstack.h.
	* tree-ssa-pre.c (grand_bitmap_obstack): Make a bitmap_obstack.
	(value_insert_into_set_bitmap): Remove useless bitmap_clear.
	(bitmap_set_new): Likewise.
	(init_pre): Initialize bitmap obstack.
	(fini_pre): Release bitmap obstack.
	* tree-ssanames.c (ssa_names_to_rewrite): Make static.
	(marked_for_rewrite_p): ssa_names_to_rewrite is never NULL.
	(mark_for_rewrite, unmark_for_rewrite): Likewise.
	(marked_ssa_names): Likewise.
	(init_ssanames): Use BITMAP_XMALLOC.
	(fini_ssanames): Use BITMAP_XFREE.
	* web.c: Include obstack.h

From-SVN: r91009
2004-11-22 12:23:59 +00:00
Nathan Sidwell 3cd8c58a83 bitmap.c (bitmap_print): Make bitno unsigned.
* bitmap.c (bitmap_print): Make bitno unsigned.
	* bt-load.c (clear_btr_from_live_range,
	btr_def_live_range): Likewise.
	* caller-save.c (save_call_clobbered_regs): Likewise.
	* cfganal.c (compute_dominance_frontiers_1): Likewise.
	* cfgcleanup.c (thread_jump): Likewise.
	* cfgrtl.c (safe_insert_insn_on_edge): Likewise.
	* conflict.c (conflict_graph_compute): Likewise.
	* ddg.c (add_deps_for_use): Likewise.
	* df.c (df_refs_update): Likewise.
	* except.c (remove_eh_handler): Likewise.
	* flow.c (verify_local_live_at_start, update_life_info,
	initialize_uninitialized_subregs, propagate_one_insn,
	free_propagate_block_info, propagate_block, find_use_as_address,
	reg_set_to_hard_reg_set): Likewise.
	* gcse.c (clear_modify_mem_tables): Likewise.
	* global.c (global_conflicts, build_insn_chain): Likewise.
	* ifcvt.c (dead_or_predicable): Likewise.
	* local-alloc.c (update_equiv_regs): Likewise.
	* loop.c (load_mems): Likewise.
	* ra-build.c (livethrough_conflicts_bb, conflicts_between_webs):
	Likewise.
	* ra-rewrite.c (reloads_to_loads, rewrite_program2, actual_spill):
	Likewise.
	* reload1.c (order_regs_for_reload, finish_spills): Likewise.
	* sched-deps.c (sched_analyze_insn, free_deps): Likewise.
	* sched-rgn.c (propagate_deps
	* tree-cfg.c (tree_purge_all_dead_eh_edges): Likewise.
	* tree-dfa.c (dump_dfa_stats
	tree-into-ssa.c (compute_global_livein, insert_phi_nodes,
	insert_phi_nodes_for, debug_def_blocks_r, invalidate_name_tags):
	Likewise.
	* tree-outof-ssa.c (coalesce_ssa_name, coalesce_vars,
	free_temp_expr_table, find_replaceable_exprs): Likewise.
	* tree-sra.c (scan_function, scalarize_parms): Likewise.
	* tree-ssa-alias.c (init_alias_info,
	compute_points_to_and_addr_escape,
	compute_flow_sensitive_aliasing, maybe_create_global_var): Likewise.
	* tree-ssa-dce.c (mark_control_dependent_edges_necessary): Likewise.
	* tree-ssa-live.c (new_tree_live_info, live_worklist,
	calculate_live_on_entry, calculate_live_on_exit, compare_pairs,
	sort_coalesce_list, build_tree_conflict_graph, dump_live_info
	tree-ssa-loop-manip.c (add_exit_phis_var): Likewise.
	tree-ssa-operands.c (get_asm_expr_operands, add_call_clobber_ops,
	add_call_read_ops): Likewise.
	* tree-ssa-pre.c (bitmap_print_value_set, insert_aux): Likewise.
	* tree-ssa-live.h (num_var_partitions): Return unsigned.

From-SVN: r90053
2004-11-04 08:41:16 +00:00
Zdenek Dvorak 87c476a22c bitmap.h (EXECUTE_IF_SET_IN_BITMAP, [...]): Changed to iterator style.
* bitmap.h (EXECUTE_IF_SET_IN_BITMAP, EXECUTE_IF_AND_COMPL_IN_BITMAP,
	EXECUTE_IF_AND_IN_BITMAP): Changed to iterator style.
	(bitmap_iterator): New type.
	(bmp_iter_common_next_1, bmp_iter_single_next_1, bmp_iter_single_init,
	bmp_iter_end_p, bmp_iter_single_next, bmp_iter_and_not_next_1,
	bmp_iter_and_not_init, bmp_iter_and_not_next, bmp_iter_and_next_1,
	bmp_iter_and_init, bmp_iter_and_next): New functions.
	* basic-block.h (EXECUTE_IF_SET_IN_REG_SET,
	EXECUTE_IF_AND_COMPL_IN_REG_SET, EXECUTE_IF_AND_IN_REG_SET): Changed to
	use iterator-style EXECUTE_IF_IN_BITMAP macros.
	* bitmap.c (bitmap_print): Ditto.
	* bt-load.c (clear_btr_from_live_range, add_btr_to_live_range,
	btr_def_live_range): Ditto.
	* cfganal.c (compute_dominance_frontiers_1) Ditto.
	* cgraphunit.c (convert_UIDs_in_bitmap, cgraph_characterize_statics):
	Ditto.
	* ddg.c (build_inter_loop_deps): Ditto.
	* df.c (FOR_EACH_BB_IN_BITMAP, df_bb_reg_info_compute, df_refs_update):
	Ditto.
	* except.c (remove_eh_handler): Ditto.
	* flow.c (reg_set_to_hard_reg_set): Ditto.
	* gcse.c (clear_modify_mem_tables): Ditto.
	* global.c (build_insn_chain): Ditto.
	* ifcvt.c (dead_or_predicable): Ditto.
	* loop-invariant.c (get_inv_cost, set_move_mark, move_invariant_reg):
	Ditto.
	* ra-build.c (livethrough_conflicts_bb, conflicts_between_webs): Ditto.
	* ra-rewrite.c (reloads_to_loads, rewrite_program2,
	detect_web_parts_to_rebuild, delete_useless_defs, actual_spill): Ditto.
	* tree-cfg.c (allocate_ssa_names, tree_duplicate_sese_region,
	tree_purge_all_dead_eh_edges): Ditto.
	* tree-into-ssa.c (compute_global_livein, insert_phi_nodes,
	insert_phi_nodes_for, debug_def_blocks_r, invalidate_name_tags,
	rewrite_ssa_into_ssa): Ditto.
	* tree-outof-ssa.c (find_replaceable_exprs): Ditto.
	* tree-sra.c (scan_function, decide_instantiations, scalarize_parms):
	Ditto.
	* tree-ssa-alias.c (init_alias_info, compute_points_to_and_addr_escape,
	compute_flow_sensitive_aliasing, maybe_create_global_var,
	dump_points_to_info_for): Ditto.
	* tree-ssa-dce.c (EXECUTE_IF_CONTROL_DEPENDENT): Ditto.
	* tree-ssa-dse.c (dse_finalize_block): Ditto.
	* tree-ssa-live.c (live_worklist, calculate_live_on_entry,
	calculate_live_on_exit, build_tree_conflict_graph, dump_live_info):
	Ditto.
	* tree-ssa-loop-ivopts.c (find_induction_variables,
	find_interesting_uses, add_old_ivs_candidates, alloc_use_cost_map,
	determine_use_iv_costs, determine_set_costs, find_best_candidate,
	set_cost_up_to, create_new_ivs, remove_unused_ivs, free_loop_data):
	Ditto.
	* tree-ssa-loop-manip.c (add_exit_phis_var, add_exit_phis): Ditto.
	* tree-ssa-operands.c (get_asm_expr_operands, add_call_clobber_ops,
	add_call_read_ops): Ditto.
	* tree-ssa-pre.c (bitmap_print_value_set, insert_aux): Ditto.

From-SVN: r88145
2004-09-26 19:53:13 +00:00
Kazu Hirata b01d837fa2 basic-block.h, [...]: Fix comment typos.
* basic-block.h, c-decl.c, c-parse.in, cgraphunit.c, ddg.c,
	gimplify.c, lambda-code.c, optabs.c, predict.c,
	tree-scalar-evolution.c, tree-sra.c, tree-ssa-loop-ch.c,
	tree-ssa.c, vec.h: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r87637
2004-09-17 09:14:12 +00:00
Nathan Sidwell ced3f397be dbxout.c (dbxout_type, [...]): Use gcc_assert and gcc_unreachable.
* dbxout.c (dbxout_type, dbxout_type_name, dbxout_symbol): Use
	gcc_assert and gcc_unreachable.
	* ddg.c (create_ddg_dependence, add_deps_for_def,
	add_deps_for_use, create_ddg, add_edge_to_ddg): Likewise.
	* df.c (df_ref_unlink, df_ref_record, df_uses_record,
	df_reg_def_chain_create, df_reg_use_chain_create, df_analyze,
	df_insn_delete, df_refs_reg_replace, df_ref_reg_replace,
	df_insns_modify, df_pattern_emit_before, df_bb_reg_live_start_p,
	df_bb_reg_live_end_p, df_bb_regs_lives_compare,
	df_bb_single_def_use_insn_find, dataflow_set_a_op_b,
	dataflow_set_copy, hybrid_search, diagnostic.c,
	diagnostic_build_prefix, diagnostic_count_diagnostic): Likewise.
	* dojump.c (do_jump): Likewise.
	* dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree,
	compute_dom_fast_query, calculate_dominance_info,
	free_dominance_info, get_immediate_dominator,
	set_immediate_dominator, get_dominated_by,
	redirect_immediate_dominators, nearest_common_dominator,
	dominated_by_p, verify_dominators, recount_dominator,
	iterate_fix_dominators, add_to_dominance_info,
	delete_from_dominance_info): Likewise.
	* dwarf2asm.c (size_of_encoded_value, eh_data_format_name,
	dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
	dw2_force_const_mem, dw2_asm_output_encoded_addr_rtx): Likewise.
	* dwarf2out.c (expand_builtin_init_dwarf_reg_sizes, reg_save,
	initial_return_save, stack_adjust_offset, dwarf2out_stack_adjust,
	flush_queued_reg_saves, dwarf2out_frame_debug_expr,
	dwarf2out_frame_debug, dw_cfi_oprnd1_desc, output_cfi,
	output_call_frame_info, output_loc_operands, build_cfa_loc,
	decl_ultimate_origin, AT_flag, AT_int, AT_unsigned, AT_string,
	AT_string_form, add_AT_specification, AT_ref, set_AT_ref_external,
	AT_loc, AT_loc_list, AT_addr, AT_lbl, add_child_die,
	splice_child_die, attr_checksum, same_dw_val_p,
	break_out_includes, build_abbrev_table, size_of_die, mark_dies,
	unmark_dies, value_format, output_loc_list, output_die,
	output_pubnames, output_aranges, base_type_die, is_base_type,
	modified_type_die, dbx_reg_number, multiple_reg_loc_descriptor,
	mem_loc_descriptor, loc_descriptor, loc_descriptor_from_tree_1,
	field_byte_offset, add_data_member_location_attribute,
	add_const_value_attribute, rtl_for_decl_location,
	add_location_or_const_value_attribute, add_byte_size_attribute,
	add_bit_offset_attribute, add_bit_size_attribute,
	add_abstract_origin_attribute, pop_decl_scope, scope_die_for,
	decl_start_label, gen_formal_parameter_die,
	gen_type_die_for_member, gen_subprogram_die, gen_label_die,
	gen_typedef_die, gen_type_die, gen_tagged_type_instantiation_die,
	force_decl_die, force_type_die, gen_decl_die,
	dwarf2out_imported_module_or_decl, prune_unused_types_prune,
	dwarf2out_finish): Likewise.

From-SVN: r87176
2004-09-08 07:47:45 +00:00
Jerry Quinn 4b4bf9414f alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
2004-07-08  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (nonlocal_mentioned_p, nonlocal_referenced_p,
	nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P,
	NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
	* bb-reorder.c (mark_bb_for_unlikely_executed_section,
	add_labels_and_missing_jumps, find_jump_block,
	fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
	Likewise.
	* bt-load.c (btr_referenced_p, compute_defs_uses_and_gen,
	link_btr_uses, move_btr_def): Likewise.
	* builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto,
	expand_builtin_expect_jump): Likewise.
	* caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise.
	* calls.c (expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (forwarder_block_p): Likewise.
	* cfgbuild.c (inside_basic_block_p, count_basic_blocks,
	make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1,
	find_bb_boundaries): Likewise.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	merge_blocks_move_predecessor_nojumps,
	merge_blocks_move_successor_nojumps, insns_match_p,
	flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge,
	try_optimize_cfg): Likewise.
	* cfgexpand.c (expand_block, construct_exit_block): Likewise.
	* cfglayout.c (skip_insns_after_block, label_for_bb,
	record_effective_endpoints, insn_locators_initialize,
	fixup_reorder_chain, update_unlikely_executed_notes): Likewise.
	* cfgmainloop.c (create_loop_notes): Likewise.
	* cfgrtl.c (delete_insn, delete_insn_chain,
	create_basic_block_structure, rtl_delete_block, free_bb_for_insn,
	update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks,
	block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
	redirect_branch_edge, force_nonfallthru_and_redirect,
	rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p,
	rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb,
	update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info,
	purge_dead_edges, cfg_layout_redirect_edge_and_branch,
	cfg_layout_delete_block, cfg_layout_can_merge_blocks_p,
	cfg_layout_merge_blocks, rtl_block_ends_with_call_p,
	need_fake_edge_p, rtl_flow_call_edges_add): Likewise.
	* combine.c (combine_instructions, can_combine_p, try_combine,
	find_split_point, record_dead_and_set_regs, reg_dead_at_p,
	distribute_notes, distribute_links, insn_cuid): Likewise.
	* cse.c (fold_rtx, cse_insn, cse_around_loop,
	invalidate_skipped_block, cse_set_around_loop,
	cse_end_of_basic_block, cse_main, cse_basic_block,
	cse_condition_code_reg): Likewise.
	* cselib.c (cselib_process_insn): Likewise.
	* ddg.c (create_ddg): Likewise.
	* df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify):
	Likewise.
	* dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug,
	gen_label_die, dwarf2out_var_location): Likewise.
	* emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn,
	next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn,
	last_call_insn, active_insn_p, next_label, prev_label,
	link_cc0_insns, next_cc0_user, try_split, add_insn_after,
	add_insn_before, remove_insn, add_function_usage_to,
	reorder_insns, find_line_note, remove_unnecessary_notes,
	emit_insn_after_1, classify_insn): Likewise.
	* except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before,
	connect_post_landing_pads, sjlj_mark_call_sites,
	sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers,
	can_throw_internal, can_throw_external, set_nothrow_function_flags,
	convert_to_eh_region_ranges): Likewise.
	* explow.c (optimize_save_area_alloca): Likewise.
	* expr.c (expand_expr_real): Likewise.
	* final.c (insn_current_reference_address, compute_alignments,
	shorten_branches, final, scan_ahead_for_unlikely_executed_note,
	final_scan_insn, output_asm_label, leaf_function_p): Likewise.
	* flow.c (first_insn_after_basic_block_note, delete_dead_jumptables,
	propagate_block_delete_insn, propagate_one_insn,
	init_propagate_block_info, propagate_block, libcall_dead_p,
	mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment):
	Likewise.
	* function.c (instantiate_virtual_regs,	reorder_blocks_1,
	expand_function_start, expand_function_end, contains,
	thread_prologue_and_epilogue_insns,
	reposition_prologue_and_epilogue_notes): Likewise.
	* gcse.c (constprop_register, bypass_conditional_jumps,
	insert_insn_end_bb, gcse_after_reload): Likewise.
	* genemit.c (gen_expand, gen_split): Likewise.
	* genpeep.c (gen_peephole, main): Likewise.
	* global.c (build_insn_chain): Likewise.
	* graph.c (node_data, print_rtl_graph_with_bb): Likewise.
	* haifa-sched.c (unlink_other_notes, unlink_line_notes,
	get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes,
	restore_line_notes, rm_redundant_line_notes, rm_other_notes,
	ok_for_early_queue_removal, set_priorities, sched_init): Likewise.
	* ifcvt.c (count_bb_insns, first_active_insn, last_active_insn,
	cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block,
	merge_if_block, block_jumps_and_fallthru_p, find_if_block,
	dead_or_predicable): Likewise.
	* integrate.c (try_constants): Likewise.
	* jump.c (rebuild_jump_labels, cleanup_barriers,
	purge_line_number_notes, init_label_info, mark_all_labels,
	squeeze_notes, get_label_before, get_label_after,
	reversed_comparison_code_parts, simplejump_p, pc_set,
	returnjump_p, onlyjump_p, follow_jumps, mark_jump_label,
	delete_barrier, delete_prior_computation, delete_computation,
	delete_related_insns, delete_for_peephole, redirect_jump):
	Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc):
	Likewise.
	* loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise.
	* loop-invariant.c (find_exits, find_invariants_bb): Likewise.
	* loop-iv.c (simplify_using_assignment): Likewise.
	* loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg,
	libcall_benefit, skip_consec_insns, move_movables, prescan_loop,
	find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop,
	loop_bivs_init_find, strength_reduce, check_insn_for_bivs,
	check_insn_for_givs, check_final_value, update_giv_derive,
	basic_induction_var, product_cheap_p, check_dbra_loop,
	loop_insn_first_p, last_use_this_basic_block,
	canonicalize_condition, get_condition, loop_regs_scan, load_mems,
	try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise.
	* modulo-sched.c (doloop_register_get, find_line_note, sms_schedule,
	sms_schedule_by_order): Likewise.
	* optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise.
	* postreload.c (reload_cse_simplify_operands, reload_combine,
	reload_cse_move2add): Likewise.
	* predict.c (can_predict_insn_p, estimate_probability,
	expected_value_to_br_prob, process_note_predictions): Likewise.
	* print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise.
	* profile.c (branch_prob): Likewise.
	* ra-build.c (live_out_1, livethrough_conflicts_bb,
	detect_webs_set_in_cond_jump): Likewise.
	* ra-debug.c (ra_print_rtx_object, ra_debug_insns,
	ra_print_rtl_with_bb): Likewise.
	* ra-rewrite.c (insert_stores, rewrite_program2): Likewise.
	* recog.c (next_insn_tests_no_inequality, find_single_use,
	split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise.
	* reg-stack.c (next_flags_user, record_label_references,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs,
	compensate_edge, convert_regs_1): Likewise.
	* regclass.c (scan_one_insn): Likewise.
	* regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2,
	regmove_optimize, fixup_match_1, single_set_for_csa,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise.
	* reload.c (find_reloads, find_reloads_address_1, subst_reloads,
	find_equiv_reg): Likewise.
	* reload1.c (reload, calculate_needs_all_insns, set_label_offsets,
	reload_as_needed, emit_input_reload_insns, do_output_reload,
	delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges):
	Likewise.
	* reorg.c (find_end_label, emit_delay_sequence,
	delete_from_delay_slot, delete_scheduled_jump, optimize_skip,
	get_jump_flags, rare_destination, mostly_true_jump,
	try_merge_delay_insns, redundant_insn, own_thread_p,
	fill_simple_delay_slots, fill_slots_from_thread,
	fill_eager_delay_slots, relax_delay_slots, make_return_insns,
	dbr_schedule): Likewise.
	* resource.c (find_basic_block, next_insn_no_annul,
	find_dead_or_set_registers, mark_target_live_regs): Likewise.
	* rtl.h (RTX_PREV): Likewise.
	* rtlanal.c (global_reg_mentioned_p, no_labels_between_p,
	no_jumps_between_p, reg_used_between_p, reg_referenced_between_p,
	reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage,
	find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1,
	tablejump_p, computed_jump_p, insns_safe_to_move_p,
	find_first_parameter_load, can_hoist_insn_p): Likewise.
	* sched-deps.c (get_condition, add_dependence, sched_analyze_2,
	sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise.
	* sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns,
	schedule_ebbs): Likewise.
	* sched-rgn.c (is_cfg_nonregular, find_conditional_protection,
	is_conditionally_protected, can_schedule_ready_p,
	add_branch_dependences, debug_dependencies): Likewise.
	* stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable):
	Likewise.
	* unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p,
	reg_dead_after_loop, loop_find_equiv_value, loop_iterations,
	set_dominates_use, ujump_to_loop_cont): Likewise.
	* var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.

From-SVN: r84341
2004-07-09 03:29:35 +00:00
Jerry Quinn d9c4ef55bd alias.c (get_alias_set, [...]): Use MEM_P.
2004-07-01  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (get_alias_set, canon_rtx, get_addr,
	nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1):
	Use MEM_P.
	* builtins.c (expand_builtin_prefetch, expand_builtin_profile_func,
	expand_builtin): Likewise.
	* calls.c (expand_call, emit_library_call_value_1, store_one_arg):
	Likewise.
	* combine.c (can_combine_p, combinable_i3pat, try_combine,
	find_split_point, combine_simplify_rtx, simplify_set, make_extraction,
	rtx_equal_for_field_assignment_p, gen_lowpart_for_combine,
	record_dead_and_set_regs_1, get_last_value_validate,
	mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise.
	* cse.c (check_dependence, canon_hash, equiv_constant,
	gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers,
	cse_around_loop, cse_check_loop_start, cse_set_around_loop,
	count_reg_usage): Likewise.
	* cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup,
	cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set,
	cselib_record_sets): Likewise.
	* dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol,
	dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise.
	* ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise.
	* df.c (df_uses_record): Likewise.
	* dojump (do_jump): Likewise.
	* dwarf2out.c (stack_adjust_offset, mem_loc_descriptor,
	loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info,
	decl_start_label): Likewise.
	* emit-rtl.c (gen_complex_constant_part, gen_highpart,
	operand_subword, change_address_1, make_safe_from): Likewise.
	* explow.c (break_out_memory_refs, copy_all_regs, validize_mem,
	stabilize, force_not_mem): Likewise.
	* expmed.c (store_bit_field, store_split_bit_field, extract_bit_field,
	expand_mult_const, expand_divmod, emit_store_flag): Likewise.
	* expr.c (convert_move, convert_modes, emit_block_move,
	emit_group_load, emit_group_store, clear_storage, emit_move_insn,
	emit_move_insn_1, expand_assignment, store_expr,
	store_constructor_field, store_constructor, store_field,
	force_operand, safe_from_p, expand_expr_real_1, expand_increment):
	Likewise.
	* final.c (cleanup_subreg_operands, alter_subreg,
	get_mem_expr_from_op): Likewise.
	* flow.c (notice_stack_pointer_modification_1,
	init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs):
	Likewise.
	* function.c (mark_temp_addr_taken, preserve_temp_slots,
	preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1,
	optimize_bit_field, flush_addressof, purge_addressof_1,
	instantiate_decl, instantiate_virtual_regs_1, assign_parms,
	setjmp_protect, setjmp_protect_args, fix_lexical_addr,
	keep_stack_depressed): Likewise.
	* ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok,
	noce_process_if_block, find_memory): Likewise.
	* integrate.c (subst_constants, allocate_initial_values): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p,
	update_equiv_regs): Likewise.
	* loop.c (scan_loop, prescan_loop, note_addr_stored, check_store,
	maybe_eliminate_biv_1, find_mem_in_note_1): Likewise.
	* optabs.c (expand_abs, emit_unop_insn): Likewise.
	* passes.c (rest_of_handle_final): Likewise.
	* postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands,
	move2add_note_store): Likewise.
	* ra-build.c (detect_remat_webs): Likewise.
	* ra-debug.c (dump_static_insn_cost): Likewise.
	* ra-rewrite.c (slots_overlap_p, insert_stores): Likewise.
	* recog.c (validate_change, apply_change_group, cancel_changes,
	validate_replace_rtx_1, general_operand, register_operand,
	nonmemory_operand, push_operand, pop_operand, memory_operand,
	indirect_operand, asm_operand_ok, offsettable_memref_p,
	offsettable_nonstrict_memref_p, constrain_operands,
	store_data_bypass_p): Likewise.
	* reg-stack.c (subst_stack_regs_pat): Likewise.
	* regclass.c (record_operand_costs, scan_one_insn, record_reg_classes,
	copy_cost, reg_scan_mark_refs): Likewise.
	* regmove.c (optimize_reg_copy_3, stack_memref_p,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (copyprop_hardreg_forward_1): Likewise.
	* reload.c (can_reload_into, push_reload, decompose, immune_p,
	find_reloads, find_reloads_address, find_reloads_address_1,
	reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p,
	find_equiv_reg): Likewise.
	* reload1.c (reload, eliminate_regs, eliminate_regs_in_insn,
	reload_as_needed, choose_reload_regs, emit_input_reload_insns,
	do_input_reload, emit_reload_insns, gen_reload, delete_output_reload,
	delete_address_reloads): Likewise.
	* resource.c (mark_referenced_resources): Likewise.
	* rtlanal.c (get_jump_table_offset, count_occurrences,
	reg_referenced_p, reg_set_p, set_of_1, set_noop_p,
	reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1,
	num_sign_bit_copies1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise.
	* sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol,
	sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms,
	sdbout_global_decl): Likewise.
	* simplify-rtx.c (simplify_subreg): Likewise.
	* stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl,
	expand_anon_union_decl, expand_end_case_type): Likewise.
	* unroll.c (calculate_giv_inc): Likewise.
	* var-tracking.c (stack_adjust_offset_pre_post,
	bb_stack_adjust_offset, track_expr_p, count_uses, add_uses,
	add_stores, compute_bb_dataflow, vt_get_decl_and_offset,
	vt_add_function_parameters): Likewise.
	* varasm.c (make_var_volatile, notice_global_symbol,
	assemble_external, decode_addr_const, mark_weak,
	default_encode_section_info): Likewise.

From-SVN: r83978
2004-07-01 12:42:07 +00:00
Kazu Hirata 61ada8ae18 c-typeck.c, [...]: Fix comment typos.
* c-typeck.c, cfgexpand.c, ddg.c, ddg.h, df.c, fold-const.c,
	gcov.c, gimplify.c, modulo-sched.c, passes.c, tree-cfg.c,
	tree-mudflap.c, tree-nrv.c, tree-outof-ssa.c, tree-ssa-dom.c,
	tree-ssa-dse.c, tree-ssa-operands.c, tree-ssa-pre.c,
	tree-tailcall.c: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r83703
2004-06-26 05:03:55 +00:00
Kazu Hirata 9cf737f89f bb-reorder.c, [...]: Fix comment formatting.
* bb-reorder.c, builtins.c, c-common.c, c-gimplify.c,
	c-incpath.c, cgraphunit.c, ddg.c, defaults.h, dwarf2out.c,
	expmed.c, flags.h, gcc.c, gensupport.c, gimplify.c, global.c,
	passes.c, reg-stack.c, target.h, toplev.c, tree-alias-ander.c,
	tree-alias-common.c, tree-cfg.c, tree-complex.c, tree-dfa.c,
	tree-eh.c, tree-mudflap.c, tree-mudflap.h, tree-outof-ssa.c,
	tree-phinodes.c, tree-pretty-print.c, tree-ssa-alias.c,
	tree-ssa-ccp.c, tree-ssa-live.c, tree-ssa-live.h,
	tree-ssa-pre.c, tree.h, value-prof.h, varasm.c: Fix comment
	formatting.

From-SVN: r82463
2004-05-30 18:32:31 +00:00
Kazu Hirata 1ea7e6ad84 c-common.c, [...]: Fix comment typos.
* c-common.c, calls.c, cfgcleanup.c, cgraph.c, cgraphunit.c,
	ddg.c, ddg.h, df.c, df.h, except.c, expr.c, flags.h,
	fold-const.c, gcc.c, gimplify.c, haifa-sched.c,
	modulo-sched.c, tree-inline.c, tree-into-ssa.c, tree-nested.c,
	tree-nrv.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-live.c,
	tree-ssa-loop.c, tree-ssa-pre.c, tree-tailcall.c, tree.h: Fix
	comment typos.  Follow spelling conventions.

From-SVN: r82439
2004-05-30 07:12:58 +00:00
Mostafa Hagog d397e8c672 New files for implementing sms in gcc.
From-SVN: r82236
2004-05-25 12:58:32 +00:00