Commit Graph

55 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
Ghassan Shobaki db34470d17 2009-06-08 Ghassan Shobaki <ghassan.shobaki@amd.com>
Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
        
        * tree-ssa-loop-prefetch.c 
        (gather_memory_references): Introduced a counter for the number of 
        memory references.
        (anything_to_prefetch_p): Introduced a counter for the number of 
        prefetches.
        (is_loop_prefetching_profitable): New function with a cost model 
        for prefetching.
        (loop_prefetch_arrays): Use the new cost model to determine if 
        prefetching is profitable.
        * params.def (MIN_INSN_TO_PREFETCH_RATIO, 
        PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
        * params.h (MIN_INSN_TO_PREFETCH_RATIO, 
        PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
        * doc/invoke.texi (MIN_INSN_TO_PREFETCH_RATIO, 
        PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.


Co-Authored-By: Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>

From-SVN: r148277
2009-06-08 16:00:13 +00:00
Martin Jambor 0674b9d090 tree-sra.c: New implementation of SRA.
2009-05-29  Martin Jambor  <mjambor@suse.cz>

	* tree-sra.c:  New implementation of SRA.

	* params.def (PARAM_SRA_MAX_STRUCTURE_SIZE): Removed.
	(PARAM_SRA_MAX_STRUCTURE_COUNT): Removed.
	(PARAM_SRA_FIELD_STRUCTURE_RATIO): Removed.
	* params.h (SRA_MAX_STRUCTURE_SIZE): Removed.
	(SRA_MAX_STRUCTURE_COUNT): Removed.
	(SRA_FIELD_STRUCTURE_RATIO): Removed.
	* doc/invoke.texi (sra-max-structure-size): Removed.
	(sra-field-structure-ratio): Removed.

	* testsuite/gfortran.dg/pr25923.f90: XFAIL warning expectation.
	* testsuite/gcc.dg/tree-ssa/ssa-fre-7.c: Compile with -fno-tree-sra.
	* testsuite/gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
	* testsuite/gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
	* testsuite/gcc.dg/memcpy-1.c: Removed param sra-max-structure-size.
	* testsuite/gcc.dg/tree-ssa/sra-2.c: Likewise.
	* testsuite/gcc.dg/tree-ssa/sra-3.c: Likewise.
	* testsuite/gcc.dg/tree-ssa/sra-1.c: Likewise.
	* testsuite/gcc.dg/tree-ssa/sra-4.c: Changed comment.
	* testsuite/gcc.dg/tree-ssa/sra-5.c: New file.
	* testsuite/gcc.dg/tree-ssa/sra-6.c: New file.
	* testsuite/gcc.c-torture/compile/sra-1.c: New file.

From-SVN: r147980
2009-05-29 18:47:31 +02:00
Ira Rosen a70d634247 passes.texi (Tree-SSA passes): Document SLP pass.
* doc/passes.texi (Tree-SSA passes): Document SLP pass.
	* tree-pass.h (pass_slp_vectorize): New pass.
	* params.h (SLP_MAX_INSNS_IN_BB): Define.
	* timevar.def (TV_TREE_SLP_VECTORIZATION): Define.
	* tree-vectorizer.c (timevar.h): Include.
	(user_vect_verbosity_level): Declare.
	(vect_location): Fix comment.
	(vect_set_verbosity_level): Update user_vect_verbosity_level
	instead of vect_verbosity_level.
	(vect_set_dump_settings): Add an argument. Ignore user defined
	verbosity if dump flags require higher level of verbosity. Print to
	stderr only for loop vectorization.
	(vectorize_loops): Update call to vect_set_dump_settings.
	(execute_vect_slp): New function.
	(gate_vect_slp): Likewise.
	(struct gimple_opt_pass pass_slp_vectorize): New.
	* tree-vectorizer.h (struct _bb_vec_info): Define along macros to
	access its members.
	(vec_info_for_bb): New function.
	(struct _stmt_vec_info): Add bb_vinfo and a macro for its access.
	(VECTORIZATION_ENABLED): New macro.
	(SLP_ENABLED, SLP_DISABLED): Likewise.
	(vect_is_simple_use): Add bb_vec_info argument.
	(new_stmt_vec_info, vect_analyze_data_ref_dependences,
	vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment,
	vect_analyze_data_ref_accesses, vect_analyze_data_refs,
	vect_schedule_slp, vect_analyze_slp): Likewise.
	(vect_analyze_stmt): Add slp_tree argument.
	(find_bb_location): Declare.
	(vect_slp_analyze_bb, vect_slp_transform_bb): Likewise.
	* tree-vect-loop.c (new_loop_vec_info): Adjust function calls.
	(vect_analyze_loop_operations, vect_analyze_loop,
	get_initial_def_for_induction, vect_create_epilog_for_reduction,
	vect_finalize_reduction, vectorizable_reduction,
	vectorizable_live_operation, vect_transform_loop): Likewise.
	* tree-data-ref.c (dr_analyze_innermost): Update comment,
	skip evolution analysis if analyzing a basic block.
	(dr_analyze_indices): Likewise.
	(initialize_data_dependence_relation): Skip the test whether the
	object is invariant for basic blocks.
	(compute_all_dependences): Skip dependence analysis for data
	references in basic blocks.
	(find_data_references_in_stmt): Don't fail in case of invariant
	access in basic block.
	(find_data_references_in_bb): New function.
	(find_data_references_in_loop): Move code to
	find_data_references_in_bb    and add a call to it.
	(compute_data_dependences_for_bb): New function.
	* tree-data-ref.h (compute_data_dependences_for_bb): Declare.
	* tree-vect-data-refs.c (vect_check_interleaving): Adjust to the case
	that STEP is 0.
	(vect_analyze_data_ref_dependence): Check for interleaving in case of
	unknown dependence in basic block and fail in case of dependence in
	basic block.
	(vect_analyze_data_ref_dependences): Add bb_vinfo argument, get data
	dependence instances from either loop or basic block vectorization
	info.
	(vect_compute_data_ref_alignment): Check if it is loop vectorization
	before calling nested_in_vect_loop_p.
	(vect_compute_data_refs_alignment): Add bb_vinfo argument, get data
	dependence instances from either loop or basic block vectorization
	info.
	(vect_verify_datarefs_alignment): Likewise.
	(vect_enhance_data_refs_alignment): Adjust function calls.
	(vect_analyze_data_refs_alignment): Likewise.
	(vect_analyze_group_access): Fix printing. Skip different checks if
	DR_STEP is 0. Keep strided stores either in loop or basic block
	vectorization data structure. Fix indentation.
	(vect_analyze_data_ref_access): Fix comments, allow zero step in
	basic blocks.
	(vect_analyze_data_ref_accesses): Add bb_vinfo argument, get data
	dependence instances from either loop or basic block vectorization
	info.
	(vect_analyze_data_refs): Update comment. Call
	compute_data_dependences_for_bb to analyze basic blocks.
	(vect_create_addr_base_for_vector_ref): Check for outer loop only in
	case of loop vectorization. In case of basic block vectorization use
	data-ref itself   as  a base.
	(vect_create_data_ref_ptr): In case of basic block vectorization:
	don't advance the pointer, add new statements before the current
	statement.  Adjust function calls.
	(vect_supportable_dr_alignment): Support only aligned accesses in
	basic block vectorization.
	* common.opt (ftree-slp-vectorize): New flag.
	* tree-vect-patterns.c (widened_name_p): Adjust function calls.
	(vect_pattern_recog_1): Likewise.
	* tree-vect-stmts.c (process_use): Likewise.
	(vect_init_vector): Add new statements in the beginning of the basic
	block in case of basic block SLP.
	(vect_get_vec_def_for_operand): Adjust function calls.
	(vect_finish_stmt_generation): Likewise.
	(vectorizable_call): Add assert that it is loop vectorization, adjust
	function calls.
	(vectorizable_conversion, vectorizable_assignment): Likewise.
	(vectorizable_operation): In case of basic block SLP, take
	vectorization factor from statement's type and skip the relevance
	check. Adjust function calls.
	(vectorizable_type_demotion): Add assert that it is loop
	vectorization, adjust function calls.
	(vectorizable_type_promotion): Likewise.
	(vectorizable_store): Check for outer loop only in case of loop
	vectorization. Adjust function calls. For basic blocks, skip the
	relevance check and don't advance pointers.
	(vectorizable_load): Likewise.
	(vectorizable_condition): Add assert that it is loop vectorization,
	adjust function calls.
	(vect_analyze_stmt): Add argument. In case of basic block SLP, check
	that it is not reduction, get vector type, call only supported
	functions, skip loop    specific parts.
	(vect_transform_stmt): Check for outer loop only in case of loop
	vectorization.
	(new_stmt_vec_info): Add new argument and initialize bb_vinfo.
	(vect_is_simple_use): Fix comment, add new argument, fix conditions
	for external definition.
	* passes.c (pass_slp_vectorize): New pass.
	* tree-vect-slp.c (find_bb_location): New function.
	(vect_get_and_check_slp_defs): Add argument, adjust function calls,
	check for patterns only in loops.
	(vect_build_slp_tree): Add argument, adjust function calls, fail in
	case of multiple types in basic block SLP.
	(vect_mark_slp_stmts_relevant): New function.
	(vect_supported_load_permutation_p): Fix comment.
	(vect_analyze_slp_instance): Add argument. In case of basic block
	SLP, take vectorization factor from statement's type, check that
	unrolling factor is 1. Adjust function call. Save SLP instance in
	either loop or basic block vectorization structure. Return FALSE,
	if SLP failed.
	(vect_analyze_slp): Add argument. Get strided stores groups from
	either loop or basic block vectorization structure. Return FALSE
	if basic block SLP failed.
	(new_bb_vec_info): New function.
	(destroy_bb_vec_info, vect_slp_analyze_node_operations,
	vect_slp_analyze_operations, vect_slp_analyze_bb): Likewise.
	(vect_schedule_slp): Add argument. Get SLP instances from either
	loop or basic block vectorization structure. Set vectorization factor
	to be 1 for basic block SLP.
	(vect_slp_transform_bb): New function.
	* params.def (PARAM_SLP_MAX_INSNS_IN_BB): Define.

From-SVN: r147829
2009-05-24 08:44:56 +00:00
Steven Bosscher 3906a4a1bc invoke.texi (max_gcse_passes): Remove documentation.
* doc/invoke.texi (max_gcse_passes): Remove documentation.
	* params.def (PARAM_MAX_GCSE_PASSES): Remove.
	* params.h (MAX_GCSE_PASSES): Remove.
	* gcse.c (gcse_main): Run CPROP1, PRE or HOIST, and CPROP2
	in sequence.  Remove ability to run multiple passes.
	(bypass_jumps): Report run as third CPROP pass.

From-SVN: r145987
2009-04-12 19:43:46 +00:00
Richard Guenther 5006671f1a re PR middle-end/13146 (inheritance for nonoverlapping_component_refs_p)
2009-04-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/13146
	PR tree-optimization/23940
	PR tree-optimization/33237
	PR middle-end/33974
	PR middle-end/34093
	PR tree-optimization/36201
	PR tree-optimization/36230
	PR tree-optimization/38049
	PR tree-optimization/38207
	PR tree-optimization/38230
	PR tree-optimization/38301
	PR tree-optimization/38585
	PR middle-end/38895
	PR tree-optimization/38985
	PR tree-optimization/39299
	* tree-ssa-structalias.h: Remove.
	* tree-ssa-operands.h (NULL_USE_OPERAND_P): Make of type use_operand_p.
	(NULL_DEF_OPERAND_P): Make of type def_operand_p.
	(struct vuse_element_d): Remove.
	(struct vuse_vec_d): Likewise.
	(VUSE_VECT_NUM_ELEM, VUSE_VECT_ELEMENT_NC, VUSE_ELEMENT_PTR_NC,
	VUSE_ELEMENT_VAR_NC, VUSE_VECT_ELEMENT, VUSE_ELEMENT_PTR,
	SET_VUSE_VECT_ELEMENT, SET_VUSE_ELEMENT_VAR, SET_VUSE_ELEMENT_PTR,
	VUSE_ELEMENT_VAR): Likewise.
	(struct voptype_d): Likewise.
	(NUM_VOP_FREE_BUCKETS): Likewise.
	(struct ssa_operands): Remove vop_free_buckets and mpt_table fields.
	(struct stmt_operands_d): Remove.
	(VUSE_OP_PTR, VUSE_OP, SET_VUSE_OP, VUSE_NUM, VUSE_VECT,
	VDEF_RESULT_PTR, VDEF_RESULT, VDEF_OP_PTR, VDEF_OP, SET_VDEF_OP,
	VDEF_NUM, VDEF_VECT): Likewise.
	(copy_virtual_operands): Remove.
	(operand_build_cmp): Likewise.
	(create_ssa_artificial_load_stmt): Likewise.
	(enum ssa_op_iter_type): Remove ssa_op_iter_vdef.
	(struct ssa_operand_iterator_d): Remove vuses, vdefs, mayusesm
	vuse_index and mayuse_index members.  Pack and move done and iter_type
	members to the front.
	(SSA_OP_VMAYUSE): Remove.
	(SSA_OP_VIRTUAL_USES): Adjust.
	(FOR_EACH_SSA_VDEF_OPERAND): Remove.
	(unlink_stmt_vdef): Declare.
	(add_to_addressable_set): Remove.
	* tree-vrp.c (stmt_interesting_for_vrp): Adjust.
	(vrp_visit_stmt): Likewise.
	* doc/tree-ssa.texi (Alias analysis): Update.
	* doc/invoke.texi (max-aliased-vops): Remove docs.
	(avg-aliased-vops): Likewise.
	* tree-into-ssa.c (syms_to_rename): Remove.
	(need_to_update_vops_p): Likewise.
	(need_to_initialize_update_ssa_p): Rename to ...
	(update_ssa_initialized_fn): ... this.  Track function we are
	initialized for.
	(symbol_marked_for_renaming): Simplify.
	(add_new_name_mapping): Do not set need_to_update_vops_p.
	(dump_currdefs): Use SYMS_TO_RENAME.
	(rewrite_update_stmt): Always walk all uses/defs.
	(dump_update_ssa): Adjust.
	(init_update_ssa): Take function argument.  Track what we are
	initialized for.
	(delete_update_ssa): Reset SYMS_TO_RENAME and update_ssa_initialized_fn.
	(create_new_def_for): Initialize for cfun, assert we are initialized
	for cfun.
	(mark_sym_for_renaming): Simplify.
	(mark_set_for_renaming): Do not initialize update-ssa.
	(need_ssa_update_p): Simplify.  Take function argument.
	(name_mappings_registered_p): Assert we ask for the correct function.
	(name_registered_for_update_p): Likewise.
	(ssa_names_to_replace): Likewise.
	(release_ssa_name_after_update_ssa): Likewise.
	(update_ssa): Likewise.  Use SYMS_TO_RENAME.
	(dump_decl_set): Do not print a newline.
	(debug_decl_set): Do it here.
	(dump_update_ssa): And here.
	* tree-ssa-loop-im.c (move_computations): Adjust.
	(movement_possibility): Likewise.
	(determine_max_movement): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-dump.c (dequeue_and_dump): Do not handle SYMBOL_MEMORY_TAG
	or NAME_MEMORY_TAG.
	* tree-complex.c (update_all_vops): Remove.
	(expand_complex_move): Adjust.
	* tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE.
	Simplify test for memory referencing statement.  Exclude
	non-invariant ADDR_EXPRs.
	* tree-pretty-print.c (dump_generic_node): Do not handle memory tags.
	* tree-loop-distribution.c (generate_memset_zero): Adjust.
	(rdg_flag_uses): Likewise.
	* tree-tailcall.c (suitable_for_tail_opt_p): Remove memory-tag
	related code.
	(tree_optimize_tail_calls_1): Also split the
	edge from the entry block if we have degenerate PHI nodes in
	the first basic block.
	* tree.c (init_ttree): Remove memory-tag related code.
	(tree_code_size): Likewise.
	(tree_node_structure): Likewise.
	(build7_stat): Re-write to be build6_stat.
	* tree.h (MTAG_P, TREE_MEMORY_TAG_CHECK, TMR_TAG): Remove.
	(SSA_VAR_P): Adjust.
	(struct tree_memory_tag): Remove.
	(struct tree_memory_partition_tag): Likewise.
	(union tree_node): Adjust.
	(build7): Re-write to be build6.
	* tree-pass.h (pass_reset_cc_flags): Remove.
	(TODO_update_address_taken): New flag.
	(pass_simple_dse): Remove.
	* ipa-cp.c (ipcp_update_callgraph): Update SSA form.
	* params.h (MAX_ALIASED_VOPS): Remove.
	(AVG_ALIASED_VOPS): Likewise.
	* omp-low.c (expand_omp_taskreg): Update SSA form.
	* tree-ssa-dse.c (dse_optimize_stmt): Properly query if the rhs
	aliases the lhs in a copy stmt.
	* tree-ssa-dse.c (struct address_walk_data): Remove.
	(memory_ssa_name_same): Likewise.
	(memory_address_same): Likewise.
	(get_kill_of_stmt_lhs): Likewise.
	(dse_possible_dead_store_p): Simplify, use the oracle.  Handle
	unused stores.  Look through PHI nodes into post-dominated regions.
	(dse_optimize_stmt): Simplify.  Properly remove stores.
	(tree_ssa_dse): Compute dominators.
	(execute_simple_dse): Remove.
	(pass_simple_dse): Likewise.
	* ipa-reference.c (scan_stmt_for_static_refs): Open-code
	gimple_loaded_syms and gimple_stored_syms computation.
	* toplev.c (dump_memory_report): Dump alias and pta stats.
	* tree-ssa-sccvn.c (vn_reference_compute_hash): Simplify.
	(vn_reference_eq): Likewise.
	(vuses_to_vec, copy_vuses_from_stmt, vdefs_to_vec,
	copy_vdefs_from_stmt, shared_lookup_vops, shared_vuses_from_stmt,
	valueize_vuses): Remove.
	(get_def_ref_stmt_vuses): Simplify.  Rename to ...
	(get_def_ref_stmt_vuse): ... this.
	(vn_reference_lookup_2): New function.
	(vn_reference_lookup_pieces): Use walk_non_aliased_vuses for
	walking equivalent vuses.  Simplify.
	(vn_reference_lookup): Likewise.
	(vn_reference_insert): Likewise.
	(vn_reference_insert_pieces): Likewise.
	(visit_reference_op_call): Simplify.
	(visit_reference_op_load): Likewise.
	(visit_reference_op_store): Likewise.
	(init_scc_vn): Remove shared_lookup_vuses initialization.
	(free_scc_vn): Remove shared_lookup_vuses freeing.
	(sort_vuses, sort_vuses_heap): Remove.
	(get_ref_from_reference_ops): Export.
	* tree-ssa-sccvn.h (struct vn_reference_s): Replace vuses
	vector with single vuse pointer.
	(vn_reference_lookup_pieces, vn_reference_lookup,
	vn_reference_insert, vn_reference_insert_pieces): Adjust prototypes.
	(shared_vuses_from_stmt): Remove.
	(get_ref_from_reference_ops): Declare.
	* tree-ssa-loop-manip.c (slpeel_can_duplicate_loop_p): Adjust.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
	memory-tag related code.
	* tree-ssa-ccp.c (get_symbol_constant_value): Remove memory-tag code.
	(likely_value): Add comment, skip static-chain of call statements.
	(surely_varying_stmt_p): Adjust.
	(gimplify_and_update_call_from_tree): Likewise.
	(execute_fold_all_builtins): Do not rebuild alias info.
	(gimplify_and_update_call_from_tree): Properly update VOPs.
	* tree-ssa-loop-ivopts.c (get_ref_tag): Remove.
	(copy_ref_info): Remove memory-tag related code.
	* tree-call-cdce.c (tree_call_cdce): Rename the VOP.
	* ipa-pure-const.c (check_decl): Remove memory-tag related code.
	(check_stmt): Open-code gimple_loaded_syms and gimple_stored_syms
	computation.
	* tree-ssa-dom.c (gimple_p): Remove typedef.
	(eliminate_redundant_computations): Adjust.
	(record_equivalences_from_stmt): Likewise.
	(avail_expr_hash): Likewise.
	(avail_expr_eq): Likewise.
	* tree-ssa-propagate.c (update_call_from_tree): Properly
	update VOPs.
	(stmt_makes_single_load): Likewise.
	(stmt_makes_single_store): Likewise.
	* tree-ssa-alias.c: Rewrite completely.
	(debug_memory_partitions, dump_mem_ref_stats, debug_mem_ref_stats,
	debug_mem_sym_stats, dump_mem_sym_stats_for_var,
	debug_all_mem_sym_stats, debug_mp_info, update_mem_sym_stats_from_stmt,
	delete_mem_ref_stats, create_tag_raw, dump_points_to_info,
	dump_may_aliases_for, debug_may_aliases_for, new_type_alias):
	Remove public functions.
	(pass_reset_cc_flags): Remove.
	(pass_build_alias): Move ...
	* tree-ssa-structalias.c (pass_build_alias): ... here.
	* tree-ssa-alias.c (may_be_aliased): Move ...
	* tree-flow-inline.h (may_be_aliased): ... here.
	tree-ssa-alias.c (struct count_ptr_d, count_ptr_derefs,
	count_uses_and_derefs): Move ...
	* gimple.c: ... here.
	* gimple.h (count_uses_and_derefs): Declare.
	* tree-ssa-alias.c (dump_alias_stats, ptr_deref_may_alias_global_p,
	ptr_deref_may_alias_decl_p, ptr_derefs_may_alias_p,
	same_type_for_tbaa, nonaliasing_component_refs_p, decl_refs_may_alias_p,
	indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p,
	ref_maybe_used_by_call_p, ref_maybe_used_by_stmt_p,
	call_may_clobber_ref_p, stmt_may_clobber_ref_p, maybe_skip_until,
	get_continuation_for_phi, walk_non_aliased_vuses, walk_aliased_vdefs):
	New functions.
	* tree-dfa.c (refs_may_alias_p): Move ...
	* tree-ssa-alias.c (refs_may_alias_p): ... here.  Extend.
	* tree-ssa-alias.h: New file.
	* tree-ssa-sink.c (is_hidden_global_store): Adjust.
	(statement_sink_location): Likewise.
	* opts.c (decode_options): Do not adjust max-aliased-vops or
	avg-aliased-vops values.
	* timevar.def (TV_TREE_MAY_ALIAS): Remove.
	(TV_CALL_CLOBBER): Likewise.
	(TV_FLOW_SENSITIVE): Likewise.
	(TV_FLOW_INSENSITIVE): Likewise.
	(TV_MEMORY_PARTITIONING): Likewise.
	(TV_ALIAS_STMT_WALK): New timevar.
	* tree-ssa-loop-ivcanon.c (empty_loop_p): Adjust.
	* tree-ssa-address.c (create_mem_ref_raw): Use build6.
	(get_address_description): Remove memory-tag related code.
	* tree-ssa-ifcombine.c (bb_no_side_effects_p): Adjust.
	* treestruct.def (TS_MEMORY_TAG, TS_MEMORY_PARTITION_TAG): Remove.
	* tree-eh.c (cleanup_empty_eh): Do not leave stale SSA_NAMEs
	and immediate uses in statements.  Document.
	* gimple-pretty-print.c (dump_gimple_mem_ops): Adjust.
	(dump_symbols): Remove.
	(dump_gimple_mem_ops): Do not dump loaded or stored syms.
	* alias.c (get_deref_alias_set): New function split out from ...
	(get_alias_set): ... here.
	* alias.h (get_deref_alias_set): Declare.
	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Remove unused
	type parameter.  Remove restrict pointer handling.  Create a
	ref-all pointer in case type-based alias sets do not conflict.
	(vect_analyze_data_refs): Remove SMT related code.
	* tree-vect-stmts.c (vectorizable_store): Re-instantiate TBAA assert.
	(vectorizable_load): Likewise.
	* tree-data-ref.h (struct dr_alias): Remove symbol_tag field.
	(DR_SYMBOL_TAG, DR_VOPS): Remove.
	* tree-data-ref.c (dr_may_alias_p): Use the alias-oracle.
	Ignore vops and SMTs.
	(dr_analyze_alias): Likewise..
	(free_data_ref): Likewise.
	(create_data_ref): Likewise.
	(analyze_all_data_dependences): Likewise.
	(get_references_in_stmt): Adjust.
	* tree-flow-inline.h (gimple_aliases_computed_p,
	gimple_addressable_vars, gimple_call_clobbered_vars,
	gimple_call_used_vars, gimple_global_var, may_aliases, memory_partition,
	factoring_name_p, mark_call_clobbered, clear_call_clobbered,
	compare_ssa_operands_equal, symbol_mem_tag, set_symbol_mem_tag,
	gimple_mem_ref_stats): Remove.
	(gimple_vop): New function.
	(op_iter_next_use): Remove vuses and mayuses cases.
	(op_iter_next_def): Remove vdefs case.
	(op_iter_next_tree): Remove vuses, mayuses and vdefs cases.
	(clear_and_done_ssa_iter): Do not set removed fields.
	(op_iter_init): Likewise.  Skip vuse and/or vdef if requested.
	Assert we are not iterating over vuses or vdefs if not also
	iterating over uses or defs.
	(op_iter_init_use): Likewise.
	(op_iter_init_def): Likewise.
	(op_iter_next_vdef): Remove.
	(op_iter_next_mustdef): Likewise.
	(op_iter_init_vdef): Likewise.
	(compare_ssa_operands_equal): Likewise.
	(link_use_stmts_after): Handle vuse operand.
	(is_call_used): Use is_call_clobbered.
	(is_call_clobbered): Global variables are always call clobbered,
	query the call-clobbers bitmap.
	(mark_call_clobbered): Ignore global variables.
	(clear_call_clobbered): Likewise.
	* tree-ssa-coalesce.c (create_outofssa_var_map): Adjust
	virtual operands sanity check.
	* tree.def (NAME_MEMORY_TAG, SYMBOL_MEMORY_TAG, MEMORY_PARTITION_TAG):
	Remove.
	(TARGET_MEM_REF): Remove TMR_TAG operand.
	* tree-dfa.c (add_referenced_var): Initialize call-clobber state.
	Remove call-clobber related code.
	(remove_referenced_var): Likewise.  Do not clear mpt or symbol_mem_tag.
	(dump_variable): Do not dump SMTs, memory stats, may-aliases or
	partitions or escape reason.
	(get_single_def_stmt, get_single_def_stmt_from_phi,
	get_single_def_stmt_with_phi): Remove.
	(dump_referenced_vars): Tidy.
	(get_ref_base_and_extent): Allow bare decls.
	(collect_dfa_stats): Adjust.
	* graphite.c (rename_variables_in_stmt): Adjust.
	(graphite_copy_stmts_from_block): Likewise.
	(translate_clast): Likewise.
	* tree-ssa-pre.c (struct bb_bitmap_sets): Add expr_dies bitmap.
	(EXPR_DIES): New.
	(translate_vuse_through_block): Use the oracle.
	(phi_translate_1): Adjust.
	(value_dies_in_block_x): Use the oracle.  Cache the outcome
	in EXPR_DIES.
	(valid_in_sets): Check if the VUSE for
	a REFERENCE is available.
	(eliminate): Do not remove stmts during elimination,
	instead queue and remove them afterwards.
	(do_pre): Do not rebuild alias info.
	(pass_pre): Run TODO_rebuild_alias before PRE.
	* tree-ssa-live.c (remove_unused_locals): Remove memory-tag code.
	* tree-sra.c (sra_walk_function): Use gimple_references_memory_p.
	(mark_all_v_defs_stmt): Remove.
	(mark_all_v_defs_seq): Adjust.
	(sra_replace): Likewise.
	(scalarize_use): Likewise.
	(scalarize_copy): Likewise.
	(scalarize_init): Likewise.
	(scalarize_ldst): Likewise.
	(todoflags): Remove.
	(tree_sra): Do not rebuild alias info.
	(tree_sra_early): Adjust.
	(pass_sra): Run TODO_update_address_taken before SRA.
	* tree-predcom.c (set_alias_info): Remove.
	(prepare_initializers_chain): Do not call it.
	(mark_virtual_ops_for_renaming): Adjust.
	(mark_virtual_ops_for_renaming_list): Remove.
	(initialize_root_vars): Adjust.
	(initialize_root_vars_lm): Likewise.
	(prepare_initializers_chain): Likewise.
	* tree-ssa-copy.c (may_propagate_copy): Remove memory-tag related code.
	(may_propagate_copy_into_stmt): Likewise.
	(merge_alias_info): Do nothing for now.
	(propagate_tree_value_into_stmt): Adjust.
	(stmt_may_generate_copy): Likewise.
	* tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): Do
	not mark symbols for renaming.
	(forward_propagate_addr_expr): Match up push/pop_stmt_changes
	with the same statement, make sure to update the new pointed-to one.
	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not copy
	call statements, do not mark symbols for renaming.
	(mark_operand_necessary): Dump something.
	(ref_may_be_aliased): New function.
	(mark_aliased_reaching_defs_necessary_1): New helper function.
	(mark_aliased_reaching_defs_necessary): Likewise.
	(mark_all_reaching_defs_necessary_1): Likewise.
	(mark_all_reaching_defs_necessary): Likewise.
	(propagate_necessity): Do not process virtual PHIs.  For
	non-aliased loads mark all reaching definitions as necessary.
	For aliased loads and stores mark the immediate dominating
	aliased clobbers as necessary.
	(visited): New global static.
	(perform_tree_ssa_dce): Free visited bitmap after propagating
	necessity.
	(remove_dead_phis): Perform simple dead virtual PHI removal.
	(remove_dead_stmt): Properly unlink virtual operands when
	removing stores.
	(eliminate_unnecessary_stmts): Schedule PHI removal after
	stmt removal.
	* tree-ssa-ter.c (is_replaceable_p): Adjust.
	(process_replaceable): Likewise.
	(find_replaceable_in_bb): Likewise.
	* tree-ssa.c (verify_ssa_name): Verify all VOPs are
	based on the single gimple vop.
	(verify_flow_insensitive_alias_info): Remove.
	(verify_flow_sensitive_alias_info): Likewise.
	(verify_call_clobbering): Likewise.
	(verify_memory_partitions): Likewise.
	(verify_alias_info): Likewise.
	(verify_ssa): Adjust..
	(execute_update_addresses_taken): Export.  Update SSA
	manually.  Optimize only when optimizing.  Use a local bitmap.
	(pass_update_address_taken): Remove TODO_update_ssa, add
	TODO_dump_func.
	(pass_update_address_taken): Just use TODO_update_address_taken.
	(init_tree_ssa): Do not initialize addressable_vars.
	(verify_ssa): Verify new VUSE / VDEF properties.
	Verify that all stmts definitions have the stmt as SSA_NAME_DEF_STMT.
	Do not call verify_alias_info.
	(delete_tree_ssa): Clear the VUSE, VDEF operands.
	Do not free the loaded and stored syms bitmaps.  Reset the escaped
	and callused solutions.  Do not free addressable_vars.
	Remove memory-tag related code.
	(warn_uninitialized_var): Aliases are always available.
	* tree-ssa-loop-prefetch.c (gather_memory_references): Adjust.
	* lambda-code.c (can_put_in_inner_loop): Adjust.
	(can_put_after_inner_loop): Likewise.
	(perfect_nestify): Likewise.
	* tree-vect-stmts.c (vect_stmt_relevant_p): Adjust.
	(vect_gen_widened_results_half): Remove CALL_EXPR handling.
	(vectorizable_conversion): Do not mark symbols for renaming.
	* tree-inline.c (remap_gimple_stmt): Clear VUSE/VDEF.
	(expand_call_inline): Unlink the calls virtual operands before
	replacing it.
	(tree_function_versioning): Do not call update_ssa if we are not
	updating clones.  Simplify.
	* tree-ssa-phiprop.c (phivn_valid_p): Adjust.
	(propagate_with_phi): Likewise..
	* tree-outof-ssa.c (create_temp): Remove memory tag and call
	clobber code.  Assert we are not aliased or global.
	* tree-flow.h: Include tree-ssa-alias.h
	(enum escape_type): Remove.
	(struct mem_sym_stats_d): Likewise.
	(struct mem_ref_stats_d): Likewise.
	(struct gimple_df): Add vop member.  Remove global_var,
	call_clobbered_vars, call_used_vars, addressable_vars,
	aliases_compted_p and mem_ref_stats members.  Add syms_to_rename,
	escaped and callused members.
	(struct ptr_info_def): Remove all members, add points-to solution
	member pt.
	(struct var_ann_d): Remove in_vuse_list, in_vdef_list,
	call_clobbered, escape_mask, mpt and symbol_mem_tag members.
	* Makefile.in (TREE_FLOW_H): Add tree-ssa-alias.h.
	(tree-ssa-structalias.o): Remove tree-ssa-structalias.h.
	(tree-ssa-alias.o): Likewise.
	(toplev.o): Add tree-ssa-alias.h
	(GTFILES): Remove tree-ssa-structalias.h, add tree-ssa-alias.h.
	* gimple.c (gimple_set_bb): Fix off-by-one error.
	(is_gimple_reg): Do not handle memory tags.
	(gimple_copy): Also copy virtual operands.
	Delay updating the statement.  Do not reset loaded and stored syms.
	(gimple_set_stored_syms): Remove.
	(gimple_set_loaded_syms): Likewise.
	(gimple_call_copy_skip_args): Copy the virtual operands
	and mark the new statement modified.
	* tree-ssa-structalias.c (may_alias_p): Remove.
	(set_uids_in_ptset): Take the alias set to prune with as
	parameter.  Fold in the alias test of may_alias_p.
	(compute_points_to_sets): Compute whether a ptr is dereferenced
	in a local sbitmap.
	(process_constraint): Deal with &ANYTHING on the lhs, reject all
	other ADDRESSOF constraints on the lhs.
	(get_constraint_for_component_ref): Assert that we don't get
	ADDRESSOF constraints from the base of the reference.
	Properly generate UNKNOWN_OFFSET for DEREF if needed.
	(struct variable_info): Remove collapsed_to member.
	(get_varinfo_fc): Remove.
	(new_var_info): Do not set collapsed_to.
	(dump_constraint): Do not follow cycles.
	(dump_constraint_graph): Likewise.
	(build_pred_graph): Likewise.
	(build_succ_graph): Likewise.
	(rewrite_constraints): Likewise.
	(do_simple_structure_copy): Remove.
	(do_rhs_deref_structure_copy): Remove.
	(do_lhs_deref_structure_copy): Remove.
	(collapse_rest_of_var): Remove.
	(do_structure_copy): Re-implement.
	(pta_stats): New global variable.
	(dump_pta_stats): New function.
	(struct constraint_expr): Make offset signed.
	(UNKNOWN_OFFSET): Define special value.
	(dump_constraint): Dump UNKNOWN_OFFSET as UNKNOWN.
	(solution_set_expand): New helper function split out from ...
	(do_sd_constraint): ... here.
	(solution_set_add): Handle UNKNOWN_OFFSET.  Handle negative offsets.
	(do_ds_constraint): Likewise.
	(do_sd_constraint): Likewise.  Do not special-case ESCAPED = *ESCAPED
	and CALLUSED = *CALLUSED.
	(set_union_with_increment): Make inc argument signed.
	(type_safe): Remove.
	(get_constraint_for_ptr_offset): Handle unknown and negative
	constant offsets.
	(first_vi_for_offset): Handle offsets before start.  Bail
	out early for offsets beyond the variable extent.
	(first_or_preceding_vi_for_offset): New function.
	(init_base_vars): Add ESCAPED = ESCAPED + UNKNOWN_OFFSET constraint.
	Together with ESCAPED = *ESCAPED this properly computes reachability.
	(find_what_var_points_to): New function.
	(find_what_p_points_to): Implement in terms of find_what_var_points_to.
	(pt_solution_reset, pt_solution_empty_p, pt_solution_includes_global,
	pt_solution_includes_1, pt_solution_includes, pt_solutions_intersect_1,
	pt_solutions_intersect): New functions.
	(compute_call_used_vars): Remove.
	(compute_may_aliases): New main entry into PTA computation.
	* gimple.h (gimple_p): New typedef.
	(struct gimple_statement_base): Remove references_memory_p.
	(struct gimple_statement_with_memory_ops_base): Remove
	vdef_ops, vuse_ops, stores and loads members.  Add vdef and vuse
	members.
	(gimple_vuse_ops, gimple_set_vuse_ops, gimple_vdef_ops,
	gimple_set_vdef_ops, gimple_loaded_syms, gimple_stored_syms,
	gimple_set_references_memory): Remove.
	(gimple_vuse_op, gimple_vdef_op, gimple_vuse, gimple_vdef,
	gimple_vuse_ptr, gimple_vdef_ptri, gimple_set_vuse, gimple_set_vdef):
	New functions.
	* tree-cfg.c (move_block_to_fn): Fix off-by-one error.
	(verify_expr): Allow RESULT_DECL.
	(gimple_duplicate_bb): Do not copy virtual operands.
	(gimple_duplicate_sese_region): Adjust.
	(gimple_duplicate_sese_tail): Likewise.
	(mark_virtual_ops_in_region): Remove.
	(move_sese_region_to_fn): Do not call it.
	* passes.c (init_optimization_passes): Remove pass_reset_cc_flags
	and pass_simple_dse.
	(execute_function_todo): Handle TODO_update_address_taken,
	call execute_update_addresses_taken for TODO_rebuild_alias.
	(execute_todo): Adjust.
	(execute_one_pass): Init dump files early.
	* ipa-struct-reorg.c (finalize_var_creation): Do not mark vars
	call-clobbered.
	(create_general_new_stmt): Clear vops.
	* tree-ssa-reassoc.c (get_rank): Adjust.
	* tree-vect-slp.c (vect_create_mask_and_perm): Do not mark
	symbols for renaming.
	* params.def (PARAM_MAX_ALIASED_VOPS): Remove.
	(PARAM_AVG_ALIASED_VOPS): Likewise.
	* tree-ssanames.c (init_ssanames): Allocate SYMS_TO_RENAME.
	(duplicate_ssa_name_ptr_info): No need to copy the shared bitmaps.
	* tree-ssa-operands.c: Simplify for new virtual operand
	representation.
	(operand_build_cmp, copy_virtual_operands,
	create_ssa_artificial_load_stmt, add_to_addressable_set,
	gimple_add_to_addresses_taken): Remove public functions.
	(unlink_stmt_vdef): New function.

	* gcc.dg/pr19633-1.c: Adjust.
	* gcc.dg/torture/pta-callused-1.c: Likewise.
	* gcc.dg/torture/pr39074-2.c: Likewise.
	* gcc.dg/torture/pr39074.c: Likewise.
	* gcc.dg/torture/pta-ptrarith-3.c: New testcase.
	* gcc.dg/torture/pr30375.c: Adjust.
	* gcc.dg/torture/pr33563.c: Likewise.
	* gcc.dg/torture/pr33870.c: Likewise.
	* gcc.dg/torture/pr33560.c: Likewise.
	* gcc.dg/torture/pta-structcopy-1.c: New testcase.
	* gcc.dg/torture/ssa-pta-fn-1.c: Likewise.
	* gcc.dg/tree-ssa/alias-15.c: Remove.
	* gcc.dg/tree-ssa/ssa-dce-4.c: New testcase.
	* gcc.dg/tree-ssa/pr26421.c: Adjust.
	* gcc.dg/tree-ssa/ssa-fre-10.c: XFAIL.
	* gcc.dg/tree-ssa/ssa-dce-5.c: New testcase.
	* gcc.dg/tree-ssa/pr23382.c: Adjust.
	* gcc.dg/tree-ssa/ssa-fre-20.c: New testcase.
	* gcc.dg/tree-ssa/alias-16.c: Adjust.
	* gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
	* gcc.dg/tree-ssa/alias-18.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-15.c: Likewise.
	* gcc.dg/tree-ssa/ssa-lim-3.c: Likewise.
	* gcc.dg/tree-ssa/alias-19.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-1.c: New testcase.
	* gcc.dg/tree-ssa/pr13146.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-23.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-18.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-24.c: New XFAILed testcase.
	* gcc.dg/tree-ssa/ssa-fre-19.c: New testcase.
	* gcc.dg/tree-ssa/alias-20.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-12.c: Likewise.
	* gcc.dg/tree-ssa/pr38895.c: Likewise.
	* gcc.dg/uninit-B.c: XFAIL.
	* gcc.dg/vect/no-vfa-vect-43.c: Adjust.
	* gcc.dg/uninit-pr19430.c: XFAIL.
	* g++.dg/tree-ssa/pr13146.C: New testcase.
	* g++.dg/opt/pr36187.C: Adjust.
	* g++.dg/torture/20090329-1.C: New testcase.

From-SVN: r145494
2009-04-03 10:24:28 +00:00
Jakub Jelinek b1fb9f5699 re PR middle-end/39157 (Code that compiles fine in 1GB of memory with 4.1.2 requires > 20GB in 4.2.* and higher)
PR middle-end/39157
	* Makefile.in (loop-invariant.o): Depend on $(PARAMS_H).
	* params.h (LOOP_INVARIANT_MAX_BBS_IN_LOOP): Define.
	* params.def (loop-invariant-max-bbs-in-loop): New parameter.
	* opts.c (decode_options): Set loop-invariant-max-bbs-in-loop
	parameter to 1000 for -O1 by default.
	* doc/invoke.texi (loop-invariant-max-bbs-in-loop): Document new
	parameter.
	* loop-invariant.c: Include params.h.
	(move_loop_invariants): Don't call move_single_loop_invariants on
	very large loops.

From-SVN: r144320
2009-02-20 13:56:01 +01:00
Vladimir Makarov 311aab0649 re PR rtl-optimization/38583 (huge test case makes register allocator run out of memory while constructing the conflict graph)
2009-01-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/38583
	* params.h (IRA_MAX_CONFLICT_TABLE_SIZE): New macro.

	* params.def (ira-max-conflict-table-size): New.

	* doc/invoke.texi (ira-max-conflict-table-size): Decribe.
	
	* ira.h (ira_conflicts_p): New external definition.
	
	* ira-conflicts.c (build_conflict_bit_table): Do not build too big
	table.  Report this.  Return result of building.
	(ira_build_conflicts): Use ira_conflicts_p.  Check result of
	building conflict table.

	* ira-color.c (fast_allocation): Use num instead of
	ira_allocnos_num.
	(ira_color): Use ira_conflicts_p.
	
	* global.c: Include ira.h.
	(pseudo_for_reload_consideration_p, build_insn_chain): Use
	ira_conflicts_p.

	* Makefile.in (global.o): Add ira.h.
	
	* ira-build.c (mark_all_loops_for_removal,
	propagate_some_info_from_allocno): New.
	(remove_unnecessary_allocnos): Call
	propagate_some_info_from_allocno.
	(remove_low_level_allocnos): New.
	(remove_unnecessary_regions): Add parameter.  Call
	mark_all_loops_for_removal and remove_low_level_allocnos.  Pass
	parameter to remove_unnecessary_regions.
	(ira_build): Remove all regions but root if the conflict table was
	not built.  Update conflict hard regs for allocnos crossing calls.

	* ira.c (ira_conflicts_p): New global.
	(ira): Define and use ira_conflicts_p.

	* reload1.c (compute_use_by_pseudos, reload, count_pseudo,
	count_spilled_pseudo, find_reg, alter_reg, finish_spills,
	emit_input_reload_insns, delete_output_reload): Use
	ira_conflicts_p.

From-SVN: r143112
2009-01-06 03:50:07 +00:00
Vladimir Makarov 058e97ecf3 [multiple changes]
2008-08-26  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c,
	ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files.

	* doc/passes.texi: Describe IRA.

	* doc/tm.texi (IRA_COVER_CLASSES,
	IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros.

	* doc/invoke.texi (ira-max-loops-num): Describe the new parameter.
	(-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills,
	-fira-propagate-cost, -fno-ira-share-save-slots,
	-fno-ira-share-spill-slots, -fira-verbose): Describe new options.

	* flags.h (ira_algorithm): New enumeration.
	(flag_ira_algorithm, flag_ira_verbose): New external variable
	declarations.

	* postreload.c (gate_handle_postreload): Don't do post reload
	optimizations unless the reload is completed.

	* reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for
	IRA.

	* tree-pass.h (pass_ira): New external variable declaration.

	* reload.h: Add 2008 to the Copyright.
    
	* cfgloopanal.c: Include params.h.
	(estimate_reg_pressure_cost): Decrease cost for IRA optimization
	mode.
    
	* params.h (IRA_MAX_LOOPS_NUM): New macro.

	* toplev.c (ira.h): New include.
	(flag_ira_algorithm, flag_ira_verbose): New external variables.
	(backend_init_target): Call ira_init.
	(backend_init): Call ira_init_once.
	(finalize): Call finish_ira_once.

	* toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills,
	flag_ira_share_save_slots, flag_ira_share_spill_slots): New
	external variables.

	* regs.h (contains_reg_of_mode, move_cost, may_move_in_cost,
	may_move_out_cost): New external variable declarations.
	(move_table): New typedef.
    
	* caller-save.c: Include headers output.h and ira.h.
	(no_caller_save_reg_set): New global variable.
	(save_slots_num, save_slots): New variables.
	(reg_save_code, reg_restore_code, add_stored_regs): Add
	prototypes.
	(init_caller_save): Set up no_caller_save_reg_set.
	(init_save_areas): Reset save_slots_num.
	(saved_hard_reg): New structure.
	(hard_reg_map, saved_regs_num, all_saved_regs): New variables.
	(initiate_saved_hard_regs, new_saved_hard_reg,
	finish_saved_hard_regs, saved_hard_reg_compare_func): New
	functions.
	(setup_save_areas): Add code for sharing stack slots.
	(all_blocks): New variable.
	(save_call_clobbered_regs): Process pseudo-register too.
	(mark_set_regs): Process pseudo-register too.
	(insert_one_insn): Put the insn after bb note in a empty basic
	block.  Add insn check.
    
	* global.c (eliminable_regset): Make it external.
	(mark_elimination): Use DF_LR_IN for IRA.
	(pseudo_for_reload_consideration_p): New.
	(build_insn_chain): Make it external.  Don't ignore spilled
	pseudos for IRA.  Use pseudo_for_reload_consideration_p.
	(gate_handle_global_alloc): New function.
	(pass_global_alloc): Add the gate function.

	* opts.c (decode_options): Set up flag_ira.  Print the warning for
	-fira.
	(common_handle_option): Process -fira-algorithm and -fira-verbose.

	* timevar.def (TV_IRA, TV_RELOAD): New passes.

	* regmove.c (regmove_optimize): Don't do replacement of output for
	IRA.

	* hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses):
	New external variable declarations.

	* local-alloc.c (update_equiv_regs): Make it external.  Return
	true if jump label rebuilding should be done.  Rescan new_insn for
	notes.
	(gate_handle_local_alloc): New function.
	(pass_local_alloc): Add the gate function.

	* alias.c (value_addr_p, stack_addr_p): New functions.
	(nonoverlapping_memrefs_p): Use them for IRA.

	* common.opt (fira, fira-algorithm, fira-coalesce,
	fira-move-spills, fira-share-save-slots, fira-share-spill-slots,
	fira-verbose): New options.

	* regclass.c (reg_class_subclasses, contains_reg_of_mode,
	move_cost, may_move_in_cost, may_move_out_cost): Make the
	variables external.
	(move_table): Remove typedef.
	(init_move_cost): Make it external.
	(allocate_reg_info, resize_reg_info, setup_reg_classes): New
	functions.

	* rtl.h (init_move_cost, allocate_reg_info, resize_reg_info,
	setup_reg_classes): New function prototypes.
	(eliminable_regset): New external variable declaration.
	(build_insn_chain, update_equiv_regs): New function prototypes.
    
	* Makefile.in (IRA_INT_H): New definition.
	(OBJS-common): Add ira.o, ira-build.o, ira-costs.o,
	ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o.
	(reload1.o, toplev.o): Add dependence on ira.h.
	(cfgloopanal.o): Add PARAMS_H.
	(caller-save.o): Add dependence on output.h and ira.h.
	(ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o,
	ira-emit.o, ira-lives.o): New entries.

	* passes.c (pass_ira): New pass.

	* params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter.

	* reload1.c (ira.h): Include the header.
	(changed_allocation_pseudos): New bitmap.
	(init_reload): Initiate the bitmap.
	(compute_use_by_pseudos): Permits spilled registers in FROM.
	(temp_pseudo_reg_arr): New variable.
	(reload): Allocate and free temp_pseudo_reg_arr.  Sort pseudos for
	IRA.  Call alter_reg with the additional parameter.  Don't clear
	spilled_pseudos for IRA.  Restore original insn chain for IRA.
	Clear changed_allocation_pseudos at the end of reload.
	(calculate_needs_all_insns): Call IRA's mark_memory_move_deletion.
	(hard_regno_to_pseudo_regno): New variable.
	(count_pseudo): Check spilled pseudos.  Set up
	hard_regno_to_pseudo_regno.
	(count_spilled_pseudo): Check spilled pseudos. Update
	hard_regno_to_pseudo_regno.
	(find_reg): Use better_spill_reload_regno_p.  Check
	hard_regno_to_pseudo_regno.
	(alter_reg): Set up spilled_pseudos.  Add a new parameter.  Add
	code for IRA.
	(eliminate_regs_1): Use additional parameter for alter_reg.
	(finish_spills): Set up pseudo_previous_regs only for spilled
	pseudos.  Call reassign_pseudos once for all spilled pseudos, pass
	more arguments.  Don't clear live_throughout and dead_or_set for
	spilled pseudos.  Use additional parameter for alter_reg.  Call
	mark_allocation_change.  Set up changed_allocation_pseudos.
	Remove sanity check.
	(emit_input_reload_insns, delete_output_reload): Use additional
	parameter for alter_reg.  Call mark_allocation_change.
	(substitute, gen_reload_chain_without_interm_reg_p): New
	functions.
	(reloads_conflict): Use gen_reload_chain_without_interm_reg_p.
    
	* testsuite/gcc.dg/20080410-1.c: New file.
	
	* config/s390/s390.h (IRA_COVER_CLASSES,
	IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define.

	* config/sparc/sparc.h (IRA_COVER_CLASSES): New macro.

	* config/i386/i386.h (IRA_COVER_CLASSES): Ditto.

	* config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.

	* config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto.

	* config/arm/arm.h (IRA_COVER_CLASSES): Ditto.
    
	* config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto.
    
	2008-08-24  Jeff Law  <law@redhat.com>
	* ira.c (setup_reg_class_intersect_union): Prefer smallest class
	when ignoring unavailable registers.

	2008-08-24  Jeff Law  <law@redhat.com>
	* ira-color.c (coalesced_pseudo_reg_slot_compare): Check
	FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD.
	* ira.c (setup_eliminable_regset): Check stack_realign_needed.
	* config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro.

	2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com>
	* ira-build.c (allocno_range_compare_func): Stabilize sort.

	2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com>
	* config/avr/avr.h (IRA_COVER_CLASSES): New macro.
	* reload1.c (find_reg): Process registers in register allocation order.

	2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
	* toplev.c (backend_init_target): Move ira_init call from
	here...
	(lang_dependent_init_target): ...to here.

	2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
	* ira.c (setup_class_subset_and_memory_move_costs): Don't
	calculate memory move costs for NO_REGS.

	2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
	* ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
	STACK_REGS is defined.

	2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
	* config/spu/spu.h (IRA_COVER_CLASSES): New macro.

	2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com>
	* config/bfin/bfin.h (IRA_COVER_CLASSES): New macro.

	2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org>
	* config/sh/sh.h (IRA_COVER_CLASSES): Define.
	* config/sh/sh.md (movsicc_true+3): Check if emit returns a
	barrier.

From-SVN: r139590
2008-08-26 12:39:58 +00:00
Martin Jambor b6e99746ac Makefile.in (tree-switch-conversion.o): Add.
2008-07-01  Martin Jambor  <mjambor@suse.cz>
        * Makefile.in (tree-switch-conversion.o): Add.
        (OBJS-common): Add tree-swtch-conversion.o.
        * passes.c (init_optimization_passes): Add pass_convert_switch.
        * tree-pass.h: (pass_convert_switch): Add.
        * tree-switch-conversion.c: New file.
        * gcc.dg/tree-ssa/cswtch.c: New testcase.
        * common.opt (ftree-cswtch): New option.
        * params.h (PARAM_SWITCH_CONVERSION_BRANCH_RATIO): New parameter.
        * params.def (PARAM_SWITCH_CONVERSION_BRANCH_RATIO): New parameter.
        * opts.c (decode_options): Set flag_tree_switch_conversion when
        optimization level is >= 2.
        * doc/invoke.texi (Optimize Options): Added description of
        -ftree-swtch-conversion and switch-conversion-max-branch-ratio.

From-SVN: r137313
2008-07-01 10:54:18 +02:00
Richard Guenther 1353232d3d invoke.texi (-fdump-tree-salias): Remove documentation.
2008-05-08  Richard Guenther  <rguenther@suse.de>

	* doc/invoke.texi (-fdump-tree-salias): Remove documentation.
	(-ftree-salias): Likewise.
	(salias-max-implicit-fields): Remove param documentation.
	(salias-max-array-elements): Likewise.
	* tree-pass.h (pass_create_structure_vars): Remove.
	* params.h (SALIAS_MAX_IMPLICIT_FIELDS): Remove.
	(SALIAS_MAX_ARRAY_ELEMENTS): Likewise.
	* tree-ssa-alias.c (create_structure_vars): Remove.
	(gate_structure_vars): Likewise.
	(pass_create_structure_vars): Likewise.
	(gate_build_alias): Likewise.
	(pass_build_alias): Adjust to run always and dump the function.
	* common.opt (ftree-salias): Hide.
	* passes.c (init_optimization_passes): Remove
	pass_create_structure_vars, adjust comment.
	* params.def (PARAM_SALIAS_MAX_IMPLICIT_FIELDS): Remove.
	(PARAM_SALIAS_MAX_ARRAY_ELEMENTS): Likewise.
	* opts.c (decode_options): Do not set flag_tree_salias.
	(common_handle_option): Add OPT_ftree_salias to the backward
	compatibility section.

	* gcc.dg/tree-ssa/20040911-1.c: Adjust.
	* gcc.dg/tree-ssa/20040517-1.c: Likewise.
	* gcc.dg/tree-ssa/pr26421.c: Likewise.
	* gcc.dg/tree-ssa/pr23382.c: Likewise.
	* gcc.dg/tree-ssa/alias-15.c: Likewise.
	* gcc.dg/tree-ssa/inline_asm-1.c: Likewise.
	* gcc.dg/tree-ssa/inline_asm-2.c: Likewise.
	* gcc.dg/tree-ssa/pta-fp.c: Likewise.
	* gcc.dg/tree-ssa/20031015-1.c: Likewise.
	* gcc.dg/tree-ssa/alias-12.c: Likewise.

From-SVN: r135111
2008-05-09 09:37:36 +00:00
Olga Golovanevsky e1dc98b235 ipa-type-escape.h: Expose function is_array_access_through_pointer_and_index.
2007-10-24  Olga Golovanevsky  <olga@il.ibm.com>

      * ipa-type-escape.h: Expose function
      is_array_access_through_pointer_and_index.
      * ipa-type-escape.c
      (is_array_access_through_pointer_and_index):
      Add three new parameters. Add support of
      POINTER_PLUS_EXPR tree code.

2007-10-24  Olga Golovanevsky  <olga@il.ibm.com>

      * ipa-struct-reorg.c, ipa-struct-reorg.h: New files.
      * tree-pass.h: Add pass_ipa_struct_reorg.
      * common.opt: Add ipa-struct-reorg flag.
      * Makefile.in: Add ipa-strcut-reorg.o compilation.
      * passes.c: Add pass pass_ipa_struct_reorg.
      * params.h:  Add STRUCT_REORG_COLD_STRUCT_RATIO.
      * params.def: Add PARAM_STRUCT_REORG_COLD_STRUCT_RATIO.

From-SVN: r129600
2007-10-24 10:36:30 +00:00
Zdenek Dvorak 46cb04410d invoke.texi (l1-cache-size): Update documentation.
* doc/invoke.texi (l1-cache-size): Update documentation.
	(l2-cache-size): Document.
	* params.h (L2_CACHE_SIZE): New macro.
	* tree-ssa-loop-prefetch.c (L1_CACHE_SIZE_BYTES): Reflect
	that L1_CACHE_SIZE is in kB now.
	(L2_CACHE_SIZE_BYTES): New macro.
	(tree_ssa_prefetch_arrays): Show size in kB.
	* config/i386/i386.h (struct processor_costs): Add l1_cache_size
	and l2_cache_size fields.
	* config/i386/driver-i386.c (describe_cache): Detect cache size
	in kB.
	* config/i386/i386.c (size_cost, i386_cost, i486_cost,pentium_cost,
	pentiumpro_cost, geode_cost, k6_cost, athlon_cost, k8_cost,
	amdfam10_cost, pentium4_cost, nocona_cost, core2_cost,
	generic64_cost, generic32_cost): Add l1_cache_size and l2_cache_size.
	(override_options): Set l1-cache-size and l2-cache-size to default
	values if not specified otherwise.
	* params.def (PARAM_L1_CACHE_SIZE): Change to set in kB.
	(PARAM_L2_CACHE_SIZE): New.

From-SVN: r127117
2007-08-01 10:57:03 +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
Douglas Gregor 7313518b90 params.def (PARAM_VERIFY_CANONICAL_TYPES): Remove.
2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>

       * params.def (PARAM_VERIFY_CANONICAL_TYPES): Remove.
       (PARAM_USE_CANONICAL_TYPES): New; decides whether to use canonical
       types or not.
       * params.h (VERIFY_CANONICAL_TYPES): Remove.
       (USE_CANONICAL_TYPES): New.
       * doc/invoke.texi (verify-canonical-types): Remove.
       (use-canonical-types): Add.

2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>

       * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
       canonical types; otherwise, fall back to structural type
       comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
       internal compiler error if the canonical types are wrong.

From-SVN: r126550
2007-07-11 13:50:13 +00:00
Diego Novillo e9e0aa2c96 re PR tree-optimization/30735 (50% slow down due to mem-ssa merge)
PR 30735
	PR 31090
	* doc/invoke.texi: Document --params max-aliased-vops and
	avg-aliased-vops.
	* tree-ssa-operands.h (get_mpt_for, dump_memory_partitions,
	debug_memory_partitions): Move to tree-flow.h
	* params.h (AVG_ALIASED_VOPS): Define.
	* tree-ssa-alias.c (struct mp_info_def): Remove.  Update all
	users.
	(mp_info_t): Likewise.
	(get_mem_sym_stats_for): New.
	(set_memory_partition): Move from tree-flow-inline.h.
	(mark_non_addressable): Only clear the set of symbols for the
	partition if it exists.
	(dump_memory_partitions): Move from tree-ssa-operands.c
	(debug_memory_partitions): Likewise.
	(need_to_partition_p): New.
	(dump_mem_ref_stats): New.
	(debug_mem_ref_stats): New.
	(dump_mem_sym_stats): New.
	(debug_mem_sym_stats): New.
	(update_mem_sym_stats_from_stmt): New.
	(compare_mp_info_entries): New.
	(mp_info_cmp): Call it.
	(sort_mp_info): Change argument to a list of mem_sym_stats_t
	objects.
	(get_mpt_for): Move from tree-ssa-operands.c.
	(find_partition_for): New.
	(create_partition_for): Remove.
	(estimate_vop_reduction): New.
	(update_reference_counts): New.
	(build_mp_info): New.
	(compute_memory_partitions): Refactor.
	Document new heuristic.
	Call build_mp_info, update_reference_counts,
	find_partition_for and estimate_vop_reduction.
	(compute_may_aliases): Populate virtual operands before
	calling debugging dumps.
	(delete_mem_sym_stats): New.
	(delete_mem_ref_stats): New.
	(init_mem_ref_stats): New.
	(init_alias_info): Call it.
	(maybe_create_global_var): Remove alias_info argument.
	Get number of call sites and number of pure/const call sites
	from gimple_mem_ref_stats().
	(dump_alias_info): Call dump_memory_partitions first.
	(dump_points_to_info_for): Show how many times a pointer has
	been dereferenced.
	* opts.c (decode_options): For -O2 set --param
	max-aliased-vops to 500.
	For -O3 set --param max-aliased-vops to 1000 and --param
	avg-aliased-vops to 3.
	* fortran/options.c (gfc_init_options): Remove assignment to
	MAX_ALIASED_VOPS.
	* tree-flow-inline.h (gimple_mem_ref_stats): New.
	* tree-dfa.c (dump_variable): Dump memory reference
	statistics.
	Dump NO_ALIAS* settings.
	(referenced_var_lookup): Tidy.
	(mem_sym_stats): New.
	* tree-ssa-copy.c (may_propagate_copy): Return true if DEST
	and ORIG are different SSA names for a memory partition.
	* tree-ssa.c (delete_tree_ssa): Call delete_mem_ref_stats.
	* tree-flow.h (struct mem_sym_stats_d): Define.
	(mem_sym_stats_t): Define.
	(struct mem_ref_stats_d): Define.
	(struct gimple_df): Add field mem_ref_stats.
	(enum noalias_state): Define.
	(struct var_ann_d): Add bitfield noalias_state.
	(mem_sym_stats, delete_mem_ref_stats, dump_mem_ref_stats,
	debug_mem_ref_stats, debug_memory_partitions,
	debug_mem_sym_stats): Declare.
	* tree-ssa-structalias.c (update_alias_info): Update call
	sites, pure/const call sites and asm sites in structure
	returned by gimple_mem_ref_stats.
	Remove local variable IS_POTENTIAL_DEREF.
	Increase NUM_DEREFS if the memory expression is a potential
	dereference.
	Call update_mem_sym_stats_from_stmt.
	If the memory references memory, call
	update_mem_sym_stats_from_stmt for all the direct memory
	symbol references found.
	(intra_create_variable_infos): Set noalias_state field for
	pointer arguments according to the value of
	flag_argument_noalias.
	* tree-ssa-structalias.h (struct alias_info): Remove fields
	num_calls_found and num_pure_const_calls_found.
	(update_mem_sym_stats_from_stmt): Declare.
	* params.def (PARAM_MAX_ALIASED_VOPS): Change description.
	Set default value to 100.
	(PARAM_AVG_ALIASED_VOPS): Define.

From-SVN: r123719
2007-04-11 12:14:06 -04:00
Dorit Nuzman acdc40dfd2 param.h (MIN_VECT_LOOP_BOUND): New.
* param.h (MIN_VECT_LOOP_BOUND): New.
        * params.def (MIN_VECT_LOOP_BOUND): New.
        * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Takes another
        argument - minimum threshold for number of iterations.
        * tree-vectorizer.h (slpeel_tree_peel_loop_to_edge): Add another
        argument to declaration.
        * tree-vect-analyze.c (vect_analyze_operations): Check value of
        MIN_VECT_LOOP_BOUND.
        * tree-vect-transform.c (vect_do_peeling_for_loop_bound): Call
        slpeel_tree_peel_loop_to_edge with additional argument.
        (vect_do_peeling_for_alignment): Likewise.
        * doc/invoke.texi (min-vect-loop-bound): Document new param option.

From-SVN: r120770
2007-01-14 12:42:40 +00:00
Douglas Gregor 06d40de8bb c-common.c (c_common_nodes_and_builtins): Since variants of void_type_node get built before it is given a name...
2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>

	* c-common.c(c_common_nodes_and_builtins): Since variants of
	void_type_node get built before it is given a name, we need to
	give those variants the name, too. 
	(complete_array_type): We need to work with the canonical main
	type of the array, from which we will build the qualified version.
	* params.def (PARAM_VERIFY_CANONICAL_TYPES): New.
	* print-tree.c (print_node): Display canonical type information
	for each type.
	* stor-layout.c (layout_type): When we don't know the
	alignment of a type for which we're building an array, we end up
	guessing wrong, so make the type require structural equality.
	* tree.c (make_node_stat): When we build a new type, it is its
	own canonical type.
	(build_type_attribute_qual_variant): When building an attribute
	variant, its canonical type is the non-attribute variant. However,
	if the attributes are target-dependent and they differ, we need to
	use structural equality checks for this type.
	(build_qualified_type): A qualified type is not equivalent to its
	unqualified variant; set the canonical type appropriately.
	(build_distinct_type_copy): When building a distinct type from
	another type, the new type is its own canonical type.
	(build_variant_type_copy): When building a new type variant, we
	assume that it is equivalent to the original type.
	(build_pointer_type_for_mode): When building a pointer type, also
	build a canonical type pointer.
	(build_reference_type_for_mode): When building a reference type,
	also build a canonical type reference.
	(build_index_type): When we can't hash an index type (e.g.,
	because its maximum value is negative), the index type requires
	structural equality tests.
	(build_array_type): Build the canonical form of an array type.
	(build_function_type): Function types require structural equality,
	because they contain default arguments, attributes, etc. 
	(build_method_type_directly): Ditto for method types.
	(build_offset_type): Build the canonical offset type.
	(build_complex_type): Build the canonical vector type.
	(make_vector_type): Build the canonical vector type.
	* tree.h (TYPE_CANONICAL): New.
	(TYPE_STRUCTURAL_EQUALITY_P): New.
	(SET_TYPE_STRUCTURAL_EQUALITY): New.
	(struct tree_type): Added "canonical" field.
	* params.h (VERIFY_CANONICAL_TYPES): New.
	* doc/c-tree.texi (TYPE_CANONICAL): Document.
	(TYPE_STRUCTURAL_EQUALITY_P): Document.
	(SET_TYPE_STRUCTURAL_EQUALITY): Document.
	* doc/invoke.texi (verify-canonical-types): Document --param
	parameter for verifying canonical types.
	
2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>

	* typeck.c (structural_comptypes): Renamed from "comptypes".
	(comptypes): Use canonical type information to perform fast type
	comparison. When VERIFY_CANONICAL_TYPES, verify that the
	canonical type comparison returns the same results as we would see
	from the current, structural check. Support COMPARE_STRUCTURAL
	when we need structural checks.
	* decl.c (typename_compare): Fix comment.
	(build_typename_type): TYPENAME_TYPE nodes require structural
	equality checks, because they resolve different based on the
	current class type.
	(make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
	require structural equality checks (for now).
	(build_ptrmemfunc_type): Build the canonical pointer to member
	function type.
	(compute_array_index_type): Whenever we build a new index type
	to represent the size of an array in a template, we need to mark
	this index type as requiring structural equality. This goes for
	arrays with value-dependent sizes with the current ABI, or all
	arrays with ABI-1.
	* tree.c (cplus_array_hash): New.
	(struct cplus_array_info): New.
	(cplus_array_compare): New.
	(cplus_array_htab): New.
	(build_cplus_array_type_1): Use a hash table to cache the array
	types we build. Build the canonical array type for each array
	type.
	(cp_build_qualified_type_real): When building a cv-qualified array
	type, use the hash table of array types and build canonical array
	types as necessary.
	(bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
	use structural equality (for now).
	* cp-tree.h (COMPARE_STRUCTURAL): New.
	* pt.c (canonical_template_parms): New.
	(canonical_type_parameter): New.
	(process_template_parm): Find the canonical type parameter.
	(lookup_template_class): When we have named the primary template
	type, set the canonical type for our template class to the primary
	template type. If any of the template arguments need structural
	equality checks, the template class needs structural equality
	checks.
	(tsubst): When reducing the level of a template template
	parameter, we require structural equality tests for the resulting
	parameter because its template parameters have not had their types
	canonicalized. When reducing a template type parameter, find the
	canonical reduced type parameter.
	(any_template_arguments_need_structural_equality_p): New.

2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
	
	* objc-act.c (objc_build_volatilized_type): Keep track of
	canonical types.
	(objc_get_protocol_qualified_type): Ditto.

From-SVN: r120341
2007-01-02 14:23:26 +00:00
Diego Novillo 38635499e9 [multiple changes]
2006-12-11  Diego Novillo  <dnovillo@redhat.com>

	* doc/tree-ssa.texi: Update documentation for virtual operands
	and the use of push_stmt_changes/pop_stmt_changes.
	* doc/invoke.texi: Remove documentation for params
	global-var-threshold.
	Update documentation on max-aliased-vops.

	* tree-into-ssa.c: Cleanup comments, variables and
	spacing in various functions.
	(regs_to_rename): Declare.
	(mem_syms_to_rename): Declare.
	(dump_update_ssa): Declare.
	(debug_update_ssa): Declare.
	(dump_names_replaced_by): Declare.
	(debug_names_replaced_by): Declare.
	(dump_def_blocks): Declare.
	(debug_def_blocks): Declare.
	(dump_defs_stack): Declare.
	(debug_defs_stack): Declare.
	(dump_currdefs): Declare.
	(debug_currdefs): Declare.
	(mark_def_sites): Do not handle virtual operands.
	(compute_idf): Rename from find_idf.  Update users.
	(register_new_def): Make local.  Convert second argument
	to 'tree'.
	Use BLOCK_DEFS_STACK directly.
	If pushing a non-register, also push the underlying
	symbol.
	(rewrite_stmt): Do not handle virtual operands.
	(dump_tree_ssa): Call dump_def_blocks, dump_defs_stack,
	dump_currdefs and dump_tree_ssa_stats.
	(dump_tree_ssa_stats): Also dump REPL_TBL.
	(replace_use): Remove.  Update all users to call SET_USE
	instead.
	(rewrite_blocks): Move code to free memory to
	fini_ssa_renamer.
	(mark_def_site_blocks): Move initialization code to
	init_ssa_renamer.
	(init_ssa_renamer): New.
	(fini_ssa_renamer): New.
	(rewrite_into_ssa): Call them.
	(prepare_block_for_update): Process SSA_OP_ALL_USES first
	and SSA_OP_ALL_DEFS later.  Do not process virtual
	operands separately.
	(dump_update_ssa): Call dump_decl_set.
	(init_update_ssa): Initialize regs_to_rename and
	mem_syms_to_rename.
	Call init_ssa_renamer.
	(delete_update_ssa): Call fini_ssa_renamer.
	Free blocks_with_phis_to_rewrite.
	(mark_sym_for_renaming): If the variable has
	sub-variables, also mark them.
	If the variable belongs to a partition, also mark it.
	(mark_set_for_renaming): Call mark_sym_for_renaming on
	every symbol in the set.
	(switch_virtuals_to_full_rewrite): Call
	mark_set_for_renaming.
	(update_ssa): Separate syms_to_rename into regs_to_rename
	and mem_syms_to_rename.

	* tree-dump.c (dump_options): Add TDF_MEMSYMS.
	* tree-pretty-print.c (debug_generic_expr): Add TDF_MEMSYMS.
	(debug_generic_stmt): Likewise.
	(debug_tree_chain): Likewise.
	(dump_symbols): New.
	(dump_generic_node): Check for TDF_MEMSYMS.
	Handle MEMORY_PARTITION_TAG.
	If the statement references memory and TDF_MEMSYMS is
	given, call dump_symbols.
	Indicate default names with (D).
	(dump_vops): Update for new virtual operator format.

	* tree.c (init_ttree): Add MEMORY_PARTITION_TAG to
	tree_contains_struct.
	(tree_code_size): Handle MEMORY_PARTITION_TAG.
	(tree_node_structure): Likewise.
	(needs_to_live_in_memory): Handle SSA names.
	* tree.h (MTAG_P): Likewise.
	(struct tree_memory_partition_tag): Declare.
	(MPT_SYMBOLS): Define.
	(union tree_node): Add field 'mpt'.
	* treestruct.def (TS_MEMORY_PARTITION_TAG): Define.
	* tree.def (MEMORY_PARTITION_TAG): Define.

	* tree-pass.h (TDF_MEMSYMS): Define.

	* params.h (GLOBAL_VAR_THRESHOLD): Remove.

	* tree-ssa-alias.c: Include pointer-set.h
	(struct alias_map_d): Remove fields total_alias_vops,
	grouped_p and may_aliases.  Update all users.
	(struct mp_info_def): Declare.
	(mp_info_t): New type.
	(get_smt_for): Rename from get_tmt_for.  Update all
	users.
	(add_may_alias): Add argument ALREADY_ADDED.  If given,
	use it to avoid adding duplicate entries to alias sets.
	(replace_may_alias): Remove.  Update all users.
	(total_alias_vops_cmp): Remove.  Update all users.
	(group_aliases_into): Remove.  Update all users.
	(tree_pointer_compare): Remove.  Update all users.
	(compact_name_tags): Remove.  Update all users.
	(group_aliases): Remove.  Update all users.
	(mark_non_addressable): Move from tree-flow-inline.h.
	Remove the symbol from the partition holding it, if
	needed.
	(dump_mp_info): New.
	(debug_mp_info): New.
	(sort_mp_info): New.
	(create_partition_for): New.
	(rewrite_alias_set_for): New.
	(compute_memory_partitions): New.
	(compute_may_aliases): Call it.
	(init_alias_info): If computing aliases for the first
	time, mark every memory symbol for renaming.
	(have_common_aliases_p): New.
	(compute_flow_insensitive_aliasing): Call it.
	(setup_pointers_and_addressables): Do not cache
	num_referenced_vars.
	For register promoted symbols, mark their former
	partition for renaming.
	(maybe_create_global_var): Only create .GLOBAL_VAR if
	there are no call-clobbered variables and a mix of pure
	and non-pure functions were found.
	(may_alias_p): Tidy comments.
	(create_tag_raw): Remove unused variable new_type.
	(dump_alias_info): call dump_memory_partitions.
	(dump_points_to_info_for): Call dump_decl_set.
	(may_be_aliased): Tidy comments and formatting.

	* timevar.def (TV_MEMORY_PARTITIONING): Define.
	* tree-vectorizer.c (vect_memsyms_to_rename): Rename from
	vect_vnames_to_rename.  Set DECL_UIDs instead of SSA name
	versions in it.
	(slpeel_update_phi_nodes_for_guard1): Ignore memory PHIs.
	* tree-vect-transform.c (vect_transform_loop): Call
	mark_set_for_renaming with vect_memsyms_to_rename.
	* tree-flow-inline.h (zero_imm_uses_p): New.
	(memory_partition): New.
	(set_memory_partition): New.
	(factoring_name_p): New.
	(symbol_mem_tag): New.  Update every function that used
	to access the annotation directly.
	(set_symbol_mem_tag): Likewise.

	* tree-ssa-copy.c (may_propagate_copy): Allow copies
	between a partition and a symbol as long as the symbol
	belongs to the partition.
	(merge_alias_info): Ignore merge requests when memory
	partitions are involved.

	* tree-ssa.c (verify_ssa_name): Check that default
	definitions have empty defining statements.
	(verify_use): Remove argument IS_VIRTUAL.
	Don't call verify_ssa_name.
	(verify_phi_args): Call verify_ssa_name.
	(verify_flow_insensitive_alias_info): Handle MPTs.
	(verify_flow_sensitive_alias_info): Likewise.
	(verify_name_tags): Likewise.
	(verify_call_clobbering): Likewise.
	(verify_ssa): Check for VOPs only after aliasing
	information is available.
	Check virtuals and real operands separately.
	Call verify_ssa_name on every operand.
	(stmt_references_memory_p): Move to tree-ssa-operands.c.
	(walk_use_def_chains_1): Guard against NULL PHI
	arguments.

	* tree-ssa-operands.c (stmt_references_memory_p): Move from
	tree-ssa.c.
	(get_mpt_for): New.
	(dump_memory_partitions): New.
	(debug_memory_partitions): New.

	* tree-flow.h (struct var_ann_d): Add field mpt.
	(struct stmt_ann_d): Add bitfield references_memory.
	* Makefile.in (tree-ssa-structalias.o): Include
	pointer-set.h
	(tree-ssa-alias.o): Likewise.
	* tree-ssa-structalias.c: (update_alias_info): Use
	STORED_SYMS to determine which variables are being
	written to by the store operation.
	* tree-ssa-structalias.h (struct alias_info)
	<total_alias_vops>: Remove.  Update all users.
	<written_vars>: Change to a pointer set.  Update all
	users.
	<dereferenced_ptrs_store>: Likewise.
	<dereferenced_ptrs_load>: Likewise.
	(NUM_REFERENCES): Remove.  Update all users.
	(NUM_REFERENCES_CLEAR): Remove.  Update all users.
	(NUM_REFERENCES_INC): Remove.  Update all users.
	(NUM_REFERENCES_SET): Remove.  Update all users.

	* params.def (PARAM_GLOBAL_VAR_THRESHOLD): Remove.
	Update all users.
	(PARAM_MAX_ALIASED_VOPS): Set to 10.
	* tree-ssanames.c (make_ssa_name): Initialize
	SSA_NAME_IS_DEFAULT_DEF to 0.

2006-12-11  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-dse.c (aggregate_vardecl_d): New.
	(dse_global_data): Add aggregate_vardecl field.
	(dse_possible_dead_store_p): New.
	Add prev_defvar variable.
	Allow immediate uses and previous immediate uses to differ
	if they are setting different parts of the whole.
	(get_aggregate_vardecl): New.
	(dse_record_partial_aggregate_store): New.
	(dse_whole_aggregate_clobbered_p): New.
	(dse_partial_kill_p): New.
	(dse_optimize_stmt): Abstract code checking a possible dead store
	into new function dse_possible_dead_store_p().
	Call dse_maybe_record_aggregate_store().
	When checking whether a STMT and its USE_STMT refer to the
	same memory address, check also for partial kills that clobber
	the whole.
	Move some variable definitions to the block where they are used.
	(aggregate_vardecl_hash): New.
	(aggregate_vardecl_eq): New.
	(aggregate_vardecl_free): New.
	(aggregate_whole_store_p): New.
	(tree_ssa_dse): Initialize and free aggregate_vardecl.
	Mark which aggregate stores we care about.

2006-12-11  Andrew Macleod  <amacleod@redhat.com>

	* tree-ssa-operands.h (struct vuse_element_d): Declare.
	(vuse_element_t): Declare.
	(struct vuse_vec_d): Declare.
	(vuse_vec_p): Declare.
	(VUSE_VECT_NUM_ELEM): Define.
	(VUSE_VECT_ELEMENT_NC): Define.
	(VUSE_ELEMENT_PTR_NC): Define.
	(VUSE_ELEMENT_VAR_NC): Define.
	(VUSE_VECT_ELEMENT): Define.
	(VUSE_ELEMENT_PTR): Define.
	(VUSE_ELEMENT_VAR): Define.
	(struct maydef_optype_d) <use_var>: Remove.
	<use_ptr>: Remove.
	<usev>: Add.
	(struct vuse_optype_d) <kill_var>: Remove.
	<use_ptr>: Remove.
	<usev>: Add.
	(struct mustdef_optype_d) <kill_var>: Remove.
	<use_ptr>: Remove.
	<usev>: Add.
	(VUSE_OP_PTR): Add argument.  Use VUSE_ELEMENT_PTR.
	(VUSE_OP): Add argument.  Use VUSE_ELEMENT_PTR.
	(VUSE_NUM): Define.
	(VUSE_VECT): Define.
	(MAYDEF_OP_PTR): Add argument.  Use VUSE_OP_PTR.
	(MAYDEF_OP): Add argument.  Use VUSE_OP.
	(MAYDEF_NUM): Define.
	(MAYDEF_VECT): Define.
	(MUSTDEF_KILL_PTR): Use VUSE_OP_PTR.
	(MUSTDEF_KILL): Use VUSE_OP.
	(MUSTDEF_NUM): Define.
	(MUSTDEF_VECT): Define.
	(realloc_maydef): Declare.
	(realloc_vuse): Declare.
	(struct ssa_operand_iterator_d) <vuse_index>: Add.
	<mayuse_index>: Add.
	(LOADED_SYMS): Define.
	(STORED_SYMS): Define.
	(FOR_EACH_SSA_MUSTDEF_OPERAND): Call op_iter_next_mustdef.
	* tree-into-ssa.c: Adapt for multi-operand V_MAY_DEF and VUSE
	operators.
	* tree-pretty-print.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-flow-inline.h: Likewise.
	(op_iter_next_mustdef): New.
	* tree-ssa-operands.c: Likewise.
	(ALLOC_OPTYPE): Remove.
	Update all users.
	(alloc_def): New.
	(alloc_use): New.
	(alloc_maydef): New.
	(alloc_vuse): New.
	(alloc_mustdef): New.
	(realloc_maydef): New.
	(realloc_vuse): New.

2006-12-11  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-operands.c: Remove build_v_must_defs.
	(init_ssa_operands): Delete build_v_must_defs.
	(finalize_ssa_v_must_def_ops): Remove.
	(finalize_ssa_v_must_defs): Remove.
	(finalize_ssa_stmt_operands): Do not call
	finalize_ssa_v_must_defs.
	(start_ssa_stmt_operands): Do not check build_v_must_defs.
	(append_v_must_def): Delete.
	(copy_virtual_operands): Do not copy V_MUST_DEFs.
	(get_modify_expr_operands): Remove reference to V_MUST_DEF from
	comment.  Remove opf_kill_def.
	(build_ssa_operands): Remove references to v_must_defs.
	(copy_virtual_operands): Same.
	(copy_virtual_operands): Same.
	(fini_ssa_operands): Same.
	(free_ssa_operands): Same.
	(add_mustdef_op): Remove.
	Remove mustdef_optype_p.
	(alloc_mustdef): Remove.
	Remove references to V_MUST_DEFs in comment at top of file.
	(get_expr_operands): Remove opf_kill_def.
	(opf_kill_def): Remove.
	(add_virtual_operand): Remove opf_kill_def.
	(get_indirect_ref_operands): Same.
	(get_tmr_operands): Same.

	* tree-vectorizer.c (rename_variables_in_bb): Remove
	SSA_OP_ALL_KILLS.

	* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Remove
	SSA_OP_ALL_KILLS.
	(check_loop_closed_ssa_stmt): Same.

	* tree-ssa.c (verify_def): Remove V_MUST_DEF from comment.
	(verify_use): Same.
	(verify_ssa): Remove V_MUST_DEFs traces.
	(verify_ssa): Remove SSA_OP_ALL_KILLS.

	* tree-into-ssa.c (mark_def_sites): Change SSA_OP_VMUSTDEF to
	SSA_OP_VMAYDEF.
	(rewrite_update_stmt): Remove SSA_OP_VIRTUAL_KILLS.
	(rewrite_stmt): Remove SSA_OP_ALL_KILLS.

	* tree-ssa-operands.h (struct stmt_operands_d): Remove V_MUST_DEF
	references.
	(MUSTDEF_OPS): Remove.
	(SSA_OP_VMUSTDEF): Remove.
	(FOR_EACH_SSA_MUSTDEF_OPERAND): Remove.
	(struct mustdef_optype_d): Remove.
	Remove mustdef_optype_p.
	(struct stmt_operands_d): Remove mustdef_ops.
	(ssa_operand_iterator_d): Remove mustdefs and mustkills.
	(SSA_OP_VIRTUAL_DEFS): Remove SSA_OP_VMUSTDEF.
	(MUSTDEF_RESULT_PTR): Remove.
	(MUSTDEF_RESULT): Remove.
	(MUSTDEF_KILL_PTR): Remove.
	(MUSTDEF_KILL): Remove.
	(MUSTDEF_NUM): Remove.
	(MUSTDEF_VECT): Remove.
	(SSA_OP_VIRTUAL_KILLS): Remove.
	(SSA_OP_ALL_VIRTUALS): Remove SSA_OP_VIRTUAL_KILLS.
	(SSA_OP_VMUSTKILL): Remove.
	(SSA_OP_ALL_KILLS): Remove.
	(SSA_OP_ALL_OPERANDS): Remove SSA_OP_ALL_KILLS.

	* tree-flow-inline.h (op_iter_init_def): Remove
	SSA_OP_VIRTUAL_KILLS.
	(delink_stmt_imm_use): Remove SSA_OP_ALL_KILLS.

	* tree-ssa-pre.c (compute_rvuse_and_antic_safe): Remove
	SSA_OP_VIRTUAL_KILLS.

	* tree-ssa-loop-im.c (determine_max_movement): Remove
	SSA_OP_VIRTUAL_KILLS.
	(gather_mem_refs_stmt): Same.
	(gather_mem_refs_stmt): Same.

	* tree-ssa-dce.c (mark_really_necessary_kill_operand_phis): Delete.
	(perform_tree_ssa_dce): Remove call to
	mark_really_necessary_kill_operand_phis.

	* tree-flow-inline.h (op_iter_init): Remove setting of mustdefs
	and mustkills.
	(op_iter_next_use): Do not check mustkills.
	(op_iter_next_def): Do not check mustdefs.
	(op_iter_next_tree): Do not check mustkills or mustdefs.
	(clear_and_done_ssa_iter): Do not set mustdefs or mustkills.
	(op_iter_next_maymustdef): Do not check mustkills.
	(op_iter_init_must_and_may_def): Remove SSA_OP_VMUSTKILL.
	(op_iter_init_mustdef): Remove.

	* tree-ssa-live.c (create_ssa_var_map): Change SSA_OP_VMUSTDEF to
	SSA_OP_VMAYDEF.

	* tree-ssa-dse.c (dse_optimize_stmt): Remove SSA_OP_VMUSTDEF.

	* tree-ssa-ccp.c: Remove V_MUST_DEF traces from comments.
	(visit_assignment): Same.

	* tree-ssa-copy.c (copy_prop_visit_assignment): Same.

	* tree-sra.c (mark_all_v_defs_1): Remove V_MUST_DEF from comment.

	* tree-outof-ssa.c (check_replaceable): Remove SSA_OP_VMUSTDEF.

	* tree-pretty-print.c (dump_vops): Remove printing of V_MUST_DEF.
	Remove kill_p variable.

	* tree-dfa.c (struct dfa_stats_d): Remove num_v_must_defs.
	(dump_dfa_stats): Remove code related to V_MUST_DEFs.
	(collect_dfa_stats_r): Do not set num_v_must_defs.
	(mark_new_vars_to_rename): Remove v_must_defs_{before,after}
	code.

	* tree-into-ssa.c (mark_def_sites): Change SSA_OP_VMUSTKILL to
	SSA_OP_VMAYUSE.

	* tree-ssa-pre.c (compute_rvuse_and_antic_safe): Remove
	SSA_OP_VMUSTDEF and SSA_OP_VMUSTKILL.

	* tree-ssa-propagate.c (stmt_makes_single_store): Remove
	SSA_OP_VMUSTDEF.

From-SVN: r119760
2006-12-11 20:48:51 -05:00
Zdenek Dvorak 47eb5b329b params.c (set_param_value): Initialize the "set" field.
* params.c (set_param_value): Initialize the "set" field.
	* params.h (struct param_info): Add "set" field.
	(PARAM_SET_P): New macro.
	(PREFETCH_LATENCY, SIMULTANEOUS_PREFETCHES, L1_CACHE_SIZE,
	L1_CACHE_LINE_SIZE): New macros.
	* toplev.c (DEFPARAM): Initialize the "set" field.
	* tree-ssa-loop-prefetch.c (PREFETCH_LATENCY,
	SIMULTANEOUS_PREFETCHES): Removed.
	(PREFETCH_BLOCK): Use L1_CACHE_LINE_SIZE.
	(tree_ssa_prefetch_arrays): Dump the values of the parameters.
	* config/sparc/sparc.c: Include params.h.
	(sparc_override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.c: Include params.h.
	(k8_cost): Change default value for SIMULTANEOUS_PREFETCHES.
	(override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sh/sh.h (SIMULTANEOUS_PREFETCHES): Removed.
	(OPTIMIZATION_OPTIONS): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.c (ia64_optimization_options): Set
	SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.h (SIMULTANEOUS_PREFETCHES, PREFETCH_BLOCK):
	Removed.
	* params.def (PARAM_PREFETCH_LATENCY, PARAM_SIMULTANEOUS_PREFETCHES,
	PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE): New params.
	* doc/invoke.texi: Document new params.

From-SVN: r118728
2006-11-12 19:17:02 +00:00
Eric Botcazou 6f8dd94be5 params.def (PARAM_MAX_SCHED_READY_INSNS): New parameter, defaulting to 100.
* params.def (PARAM_MAX_SCHED_READY_INSNS): New parameter,
	defaulting to 100.
	* params.h (MAX_SCHED_READY_INSNS): New macro.
	* haifa-sched.c: (queue_to_ready): Re-queue insns for the next cycle
	past MAX_SCHED_READY_INSNS during the first scheduling pass.
	(schedule_block): Delay insns past MAX_SCHED_READY_INSNS in
	the ready list for 1 cycle during the first scheduling pass.
	* doc/invoke.texi (--param): New parameter max-sched-ready-insns.

From-SVN: r112936
2006-04-14 00:07:48 +00:00
Daniel Berlin 98035a75ac re PR tree-optimization/26260 (PTA is slow with large structs (hits clisp))
2006-02-14  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/26260

	* doc/invoke.texi (max-fields-for-field-sensitive): Document
	param.
	* params.h (MAX_FIELDS_FOR_FIELD_SENSITIVE): New.
	* params.def (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE): Ditto.
	* tree-ssa-structalias.c (create_variable_info_for): Use
	MAX_FIELDS_FOR_FIELD_SENSITIVE.

From-SVN: r110972
2006-02-14 14:49:13 +00:00
Richard Guenther a916f21d3c re PR tree-optimization/22548 (Aliasing can not tell array members apart)
2006-01-14  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/22548
	PR tree-optimization/22555
	PR tree-optimization/22501
	* Makefile.in (tree-ssa-structalias.o): Depend on $(PARAMS_H).
	* params.def (salias-max-array-elements): New parameter.
	* params.h (SALIAS_MAX_ARRAY_ELEMENTS): Define.
	* doc/invoke.texi (salias-max-array-elements): Document.
	* tree-flow-inline.h (var_can_have_subvars): We also handle
	arrays now.
	* tree-ssa-alias.c (find_used_portions): Handle ARRAY_REF like
	COMPONENT_REF.
	* tree-ssa-structalias.c (params.h): Include.
	(push_fields_onto_fieldstack): Handle ARRAY_TYPE.
	(find_func_aliases): Handle multiple constraints from ARRAY_REF.
	(get_constraint_for): For ADDR_EXPR operating on something
	containing an ARRAY_REF, add all subvars to the solution.
	(handle_ptr_arith): Handle ARRAY_TYPE like RECORD_TYPE types.
	* tree-ssa-operands.c (parse_ssa_operands): Handle ARRAY_REF
	for creating MUST_DEFs.
	(get_expr_operands): Treat ARRAY_REF like COMPONENT_REF wrt subvars.

	* gcc.dg/tree-ssa/alias-4.c: New testcase.
	* gcc.dg/tree-ssa/alias-5.c: Likewise.
	* gcc.dg/tree-ssa/alias-6.c: Likewise.
	* gcc.dg/tree-ssa/alias-7.c: Likewise.
	* gcc.dg/tree-ssa/alias-8.c: Likewise.
	* gcc.dg/tree-ssa/alias-9.c: Likewise.
	* gcc.dg/tree-ssa/alias-10.c: Likewise.
	* gcc.dg/tree-ssa/alias-11.c: Likewise.
	* gcc.dg/tree-ssa/alias-12.c: Likewise.

From-SVN: r109703
2006-01-14 14:30:33 +00:00
Richard Henderson 460f84ed3d re PR middle-end/21529 (code size regression (+40%) with -Os from GCC-3.4.3 to 4.1)
PR 21529
        * params.def (PARAM_SRA_MAX_STRUCTURE_COUNT): New.
        * params.h (SRA_MAX_STRUCTURE_COUNT): New.
        * tree-sra.c (decide_block_copy): Use it.  Disable element copy
        if we'd have to instantiate too many members.

From-SVN: r102761
2005-08-04 19:42:06 -07:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Diego Novillo 84d658141e [multiple changes]
2005-04-22  Diego Novillo  <dnovillo@redhat.com>

	* Makefile.in (tree-into-ssa.o): Add dependency on PARAMS_H.
	* lambda-code.c (perfect_nestify): Mark virtual operands in
	the moved statement for renaming.
	* params.def (PARAM_MIN_VIRTUAL_MAPPINGS): Define.
	(PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO): Define.
	* params.h (MIN_VIRTUAL_MAPPINGS): Define.
	(VIRTUAL_MAPPINGS_TO_SYMS_RATIO): Define.
	* tree-flow.h (struct var_ann_d): Update comments.
	(rewrite_to_new_ssa_names_bb, rewrite_to_new_ssa_names,
	allocate_ssa_names, find_phi_node_for, dump_tree_ssa,
	debug_tree_ssa, debug_def_blocks, dump_tree_ssa_stats,
	debug_tree_ssa_stats, rewrite_ssa_into_ssa,
	dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by,
	debug_names_replaced_by): Remove declarations.
	(delete_update_ssa, get_current_def, set_current_def): Declare.
	(rewrite_into_loop_closed_ssa): Add new argument.  Update
	all callers.
	* tree-into-ssa.c: Include params.h.
	(old_virtual_ssa_names): Remove.  Update all users.
	(need_to_replace_names_p): Remove.  Update all users.
	(struct update_ssa_stats_d): Declare.
	(update_ssa_stats): New local.
	(dump_tree_ssa, debug_tree_ssa, debug_def_blocks,
	dump_tree_ssa_stats, debug_tree_ssa_stats,
	dump_update_ssa, debug_update_ssa,
	dump_names_replaced_by, debug_names_replaced_by): Declare.
	(get_current_def, set current_def): Make extern.
	(is_old_name, is_new_name): Protect against references
	past the end of the sets.
	(add_new_name_mapping): Assert that OLD and NEW are
	different SSA names for the same symbol.
	When adding a virtual mapping, update stats for virtual
	mapping heuristic.
	(insert_phi_nodes_for): If UPDATE_P is true, create the
	LHS of the new PHI by duplicating SSA name VAR.
	(insert_phi_nodes_1): Remove.  Update all users.
	(insert_phi_nodes): Remove second argument.  Update all
	users.
	(maybe_replace_use, maybe_replace_def): New.
	(rewrite_update_stmt): Call them.
	(mark_def_interesting): Remove calls to is_gimple_reg.
	(prepare_phi_args_for_update): Remove.  Update all users.
	(prepare_block_for_update): Only process virtual operands
	and GIMPLE registers in normal form.
	(prepare_use_sites_for): New.
	(prepare_names_to_update): Rename from prepare_def_sites.
	Call prepare_use_sites_for.
	(dump_update_ssa): Rename from dump_repl_tbl.
	Update all users.
	Show statistics for virtual mapping heuristic.
	(debug_update_ssa): Rename from debug_debug_repl_tbl.
	(init_update_ssa): Initialize UPDATE_SSA_STATS.
	(delete_update_ssa): Make extern.
	(mark_set_for_renaming): If the set is empty, do nothing.
	(release_ssa_name_after_update_ssa): Update comment.
	(insert_updated_phi_nodes_for): Do not remove existing
	PHI nodes for symbols.
	(switch_virtuals_to_full_rewrite_p): New.
	(switch_virtuals_to_full_rewrite): New.
	(update_ssa): Call them.
	Clear REWRITE_THIS_STMT and REGISTER_DEFS_IN_THIS_STMT
	for every statement before updating.
	If all the names in NEW_SSA_NAMES have been marked for
	removal, do nothing.
	Only start at the top of the CFG if there are symbols in
	SYMS_TO_RENAME.
	(ssa_rewrite_finalize_block): Remove.
	(ssa_register_new_def): Remove.
	(ssa_rewrite_stmt): Remove.
	(ssa_rewrite_phi_arguments): Remove.
	(ssa_rewrite_initialize_block): Remove.
	(ssa_mark_def_sites): Remove.
	(ssa_mark_def_sites_initialize_block): Remove.
	(ssa_mark_phi_uses): Remove.
	(rewrite_ssa_into_ssa): Remove.
	* tree-phinodes.c (find_phi_node_for): Remove.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely):
	Call update_ssa.
	* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops):
	Remove calls to verify_dominators and
	verify_loop_structure.
	(tree_unswitch_single_loop): Call update_ssa.
	* tree-ssa.c (verify_ssa): Assert that need_ssa_update_p
	returns false.
	Call verify_stmts.
	(delete_tree_ssa): Assert that need_ssa_update_p returns
	false.
	* tree-vect-transform.c (vect_transform_loop): Call update_ssa.
	* tree-vectorizer.c (allocate_new_names, rename_def_op,
	free_new_names): Remove.  Update all users.
	(rename_use_op): Call get_current_def.
	(rename_variables_in_bb): Do not handle any real or
	virtual definition.
	(slpeel_update_phis_for_duplicate_loop): Call
	get_current_def and set_current_def instead of using
	SSA_NAME_AUX.
	(slpeel_update_phi_nodes_for_guard2): Reformat comments.
	(slpeel_can_duplicate_loop_p): Call need_ssa_update_p,
	ssa_names_to_replace and delete_update_ssa.
	* doc/invoke.texi: Document --param min-virtual-mappings
	and --param virtual-mappings-ratio.

2005-04-22  Zdenek Dvorak  <dvorakz@suse.cz>
	    Diego Novillo  <dnovillo@redhat.com>

	* tree-cfg.c (tree_duplicate_bb): Call create_new_def_for
	for newly created PHI nodes.
	Call create_new_def_for for every new V_MAY_DEF and
	V_MUST_DEF on the copied statement.
	(struct ssa_name_map_entry): Remove.
	(ssa_name_map_entry_hash): Remove.
	(ssa_name_map_entry_eq): Remove.
	(allocate_ssa_names): Remove.
	(rewrite_to_new_ssa_names_def): Remove.
	(rewrite_to_new_ssa_names_use): Remove.
	(rewrite_to_new_ssa_names_bb): Remove.
	(rewrite_to_new_ssa_names): Remove.
	(tree_duplicate_sese_region): Remove variables ver,
	definitions, phi, ssa_name_map and bi.
	Call need_ssa_update_p instead of any_marked_for_rewrite_p.
	Call update_ssa.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Call
	update_ssa instead of rewrite_ssa_into_ssa.
	* tree-ssa-loop-manip.c (add_exit_phis_edge): Call
	create_new_def_for.
	(find_uses_to_rename_use): Add argument 'need_phis'.
	(find_uses_to_rename_stmt): Do not scan virtual operands.
	(find_uses_to_rename): Only scan PHI nodes for
	non-virtual names.
	(rewrite_into_loop_closed_ssa): Call update_ssa.
	(check_loop_closed_ssa_use): Ignore virtual operands.
	(check_loop_closed_ssa_stmt): Likewise.
	(verify_loop_closed_ssa): Do nothing if CURRENT_LOOPS is
	NULL.
	(rename_variables, set_phi_def_stmts): Remove.
	(tree_duplicate_loop_to_header_edge): Reformat comment.
	Remove variables BB, I and DEFINITIONS.
	Call need_ssa_update_p.
	Call update_ssa.
	(lv_adjust_loop_header_phi): Reformat comment.
	* tree-ssanames.c (ssa_names_to_rewrite): Remove.
	(marked_for_rewrite_p, any_marked_for_rewrite_p,
	mark_for_rewrite, unmark_all_for_rewrite,
	marked_ssa_names): Remove.  Update all users.
	(release_ssa_name): If VAR has been registered for SSA
	updating, do nothing.
	* tree-vrp.c (new_ssa_names, old_ssa_names): Remove.
	(build_assert_expr_for): Call register_new_name_mapping.
	(insert_range_assertions): Update call to update_ssa.
	* tree.h (mark_for_rewrite, unmark_all_for_rewrite,
	marked_for_rewrite_p, any_marked_for_rewrite_p,
	marked_ssa_names): Remove.

From-SVN: r98599
2005-04-22 20:59:54 -04:00
Daniel Berlin 31617ef157 params.def (PARAM_SALIAS_MAX_IMPLICIT_FIELDS): New
2005-04-06  Daniel Berlin  <dberlin@dberlin.org>

	* params.def (PARAM_SALIAS_MAX_IMPLICIT_FIELDS): New
	* params.h (SALIAS_MAX_IMPLICIT_FIELDS): New
	* doc/invoke.texi: Documnet salias-max-implicit-fields.
	* tree-ssa-alias.c (struct used_part): Add implicit_uses and
	explicit_uses members.
	(get_or_create_used_part_for): Initialize new fields.
	(fieldoff_compare): New function.
	(create_overlap_variables_for): Count number of fields, use
	heuristic to determine whether to create subvars for vars with
	only implicit uses.
	Sort the field list by offset and avoid creating duplicate SFT's.

From-SVN: r97746
2005-04-06 20:03:15 +00:00
Kazu Hirata 35fd3193de alias.c, [...]: Fix comment typos.
* alias.c, c-common.h, c-incpath.c, c-incpath.h, expr.c,
	fold-const.c, gimplify.c, params.h, tree-data-ref.c,
	tree-if-conv.c, tree-nested.c, tree-outof-ssa.c,
	tree-ssa-dom.c, tree-vectorizer.c, tree.def, config/darwin.c,
	config/freebsd-spec.h, config/arm/arm.h,
	config/h8300/h8300.md, config/i386/i386.md,
	config/i386/predicates.md, config/i386/sse.md,
	config/ia64/ia64.c, config/ip2k/ip2k.c, config/s390/s390.c,
	config/vax/vax.md: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r94112
2005-01-23 15:05:49 +00:00
Kazu Hirata e42febca21 params.def, [...]: Update copyright.
* params.def, params.h, predict.c, tree-ssa-loop-im.c: Update
	copyright.

From-SVN: r93961
2005-01-20 12:45:13 +00:00
Jakub Jelinek 49c3b9a846 re PR rtl-optimization/15139 (cc1 uses excessive amounts of memory compiling small routine)
PR rtl-optimization/15139
	* combine.c: Include params.h.
	(count_rtxs): New function.
	(record_value_for_reg): If replace_rtx would replace at least
	2 occurrences of REG in VALUE and TEM is really large, replace REG with
	(clobber (const_int 0)) instead of TEM.
	* params.def (PARAM_MAX_LAST_VALUE_RTL): New.
	* params.h (MAX_LAST_VALUE_RTL): New.
	* Makefile.in (combine.o): Depend on $(PARAMS_H).
	* doc/invoke.texi (--param max-last-value-rtl=N): Document.

	* gcc.dg/20050111-2.c: New test.

From-SVN: r93892
2005-01-19 10:31:16 +01:00
Nathan Sidwell e06c0febd9 re PR middle-end/18667 (ice with --parm integer-share-limit=0)
PR middle-end/18667
	* params.c (set_param_value): Add range check.
	* params.def: Add min and max values. Reformat long strings.
	* params.h (struct param_info): Add min and max fields.
	(enum compiler_param): Adjust DEFPARAM.
	* toplev.c (lang_independent_params): Likewise.

From-SVN: r91567
2004-12-01 16:46:25 +00:00
Nathan Sidwell d41ca8e68f opts.c (decode_options): Do not set max-inline-insns-rtl.
* opts.c (decode_options): Do not set max-inline-insns-rtl.
	(common_handle_option): Likewise.
	* params.def (PARAM_MAX_INLINE_INSNS_RTL): Remove.
	* params.h (MAX_INLINE_INSNS_RTL): Remove.
	* doc/invoke.texi (max-inline-insns-rtl): Remove.

From-SVN: r91463
2004-11-29 09:33:10 +00:00
Ben Elliston 61b5800161 params.def (PARAM_SRA_MAX_STRUCTURE_SIZE): New.
* params.def (PARAM_SRA_MAX_STRUCTURE_SIZE): New.
	(PARAM_SRA_FIELD_STRUCTURE_RATIO): Likewise.
	* params.h (SRA_MAX_STRUCTURE_SIZE): New.
	(SRA_FIELD_STRUCTURE_RATIO): Likewise.
	* tree-sra.c: Include "params.h".
	(decide_block_copy): Use new parameters.
	* doc/invoke.texi (Optimize Options): Document new SRA pass
	parameters sra-max-structure-size and sra-field-structure-ratio.

[testsuite]
	* gcc.dg/tree-ssa/sra-1.c: Pass --param sra-max-structure-size.

From-SVN: r89711
2004-10-28 07:02:16 +10:00
Revital Eres f37a4f143d Makefile.in (loop-unroll.o): Add VARRAY_H dependency.
2004-10-18  Revital Eres  <eres@il.ibm.com>

        * Makefile.in (loop-unroll.o): Add VARRAY_H dependency.
        * loop-unroll.c: Include varray.h.
        (struct var_to_expand, struct opt_info): Rename split_ivs_info to
        opt_info and expand it to support variable expansion.
        (analyze_insns_in_loop): Rename analyze_ivs_to_split and
        expand it to support variable expansion.
        (pt_info_start_duplication): Rename si_info_start_duplication.
        (apply_opt_in_copies): Rename split_ivs_in_copies and add support
        to the variable expansion optimization.
        (free_opt_info): Rename free_si_info.
        (analyze_insn_to_expand_var, referenced_in_one_insn_in_loop_p,
        expand_var_during_unrolling, insert_var_expansion_initialization,
        combine_var_copies_in_loop_exit, release_var_copies,
        get_expansion): New functions.
        (peel_loop_completely, unroll_loop_constant_iterations,
        unroll_loop_runtime_iterations, peel_loop_simple,
        unroll_loop_stupid): Change uses of struct si_info
        to struct opt_info
        and add uses of fvariable-expansion-in-unroller flag.
        * params.def: Add parameter to restrict the number of expansions.
        * params.h: (MAX_VARIABLE_EXPANSIONS): New define to restrict
        the number of expansions.
        * common.opt: (fvariable-expansion-in-unroller): New flag.
        * doc/invoke.texi: (fvariable-expansion-in-unroller): Document.

From-SVN: r89197
2004-10-18 05:31:28 +00:00
Nathan Sidwell 89b0433e3a tree.h (TYPE_CACHED_VALUES_P): New.
* tree.h (TYPE_CACHED_VALUES_P): New.
	(TYPE_CACHED_VALUES): New.
	(TYPE_ORIG_SIZE_TYPE): Adjust.
	* tree.def (INTEGER_CST): Update documentation.
	* tree.c: Inlcude params.h.
	(build_int_cst): Cache small values.
	(build_type_copy): Do not copy the value cache.
	* c-common.c (c_common_nodes_and_builtins): Add comment, remove
	unneeded zeroing.
	* c-typeck.c (build_c_cast): Add comment about OVERFLOW setting.
	* expmed.c (const_mult_add_overflow_p): Clear type copy's value
	cache.
	* fold-const.c (force_fit_type): Copy value when setting
	overflows.
	(int_const_binop): Likewise.
	* stor-layout.c: Include params.h
	(set_sizetype): Create values cache.
	(fixup_unsigned_type): Set UNSIGNED_P before caching any values.
	* params.def (PARAM_INTEGER_SHARE_LIMIT): New.
	* params.h (INTEGER_SHARE_LIMIT): New.
	* Makefile.in (tree.o, stor-layout.o): Depend on PARAMS_H.

	* cp/decl.c (finish_enum): Do not copy value node early, copy
	later.
	* cp/lex.c (cxx_init): Force null_node to be unique.

	* java/parse.h (JAVA_RADIX10_FLAG): Rename to ...
	(JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
	* java/lex.c (do_java_lex): Adjust.
	(error_if_numeric_overflow): Likewise.

From-SVN: r86247
2004-08-19 10:36:07 +00:00
Ayal Zaks e56261981b ddg.h, [...]: New files.
* ddg.h, ddg.c, modulo-sched.c: New files.
 	* cfglayout.c (duplicate_insn_chain): Remove "static" and push
 	internals to "dupicate_insn".
 	(duplicate_insn): New function.
 	* cfglayout.h (duplicate_insn_chain, duplicate_insn): New
 	declarations.
 	* common.opt (fmodulo-sched): New flag.
 	* df.c (df_bb_regno_last_use_find, df_bb_regno_first_def_find):
 	Remove static and forward declaration.
 	(df_find_def, df_reg_used, df_bb_regno_last_def_find): New
 	functions.
 	* df.h (df_bb_regno_last_use_find, df_bb_regno_first_def_find,
 	df_bb_regno_last_def_find, df_find_def, df_reg_used): New
 	declarations.
 	* flags.h (flag_modulo_sched): New flag.
 	* opts.c (common_handle_option): Handle modulo-sched flag.
 	* params.def (max-sms-loop-number, sms-max-ii-factor,
 	sms-dfa-history, sms-loop-average-count-threshold): New
 	parameters.
	* params.h (MAX_SMS_LOOP_NUMBER, SMS_MAX_II_FACTOR,
 	SMS_DFA_HISTORY, SMS_LOOP_AVERAGE_COUNT_THRESHOLD): New
 	parameters.
 	* passes.c ("sms", "sms-vcg"): New dumps.
 	(rest_of_handle_sched): Call sms_schedule.
 	* rtl.h (sms_schedule): New declaration.
 	* timevar.def (TV_SMS): New.
 	* toplev.c (flag_modulo_sched): Initialize.
 	(f_options): Handle -fmodulo-sched option.
 	* docs/invoke.texi: Document -fmodulo-sched & -dm options.
 	* docs/passes.texi: Document new SMS pass.f toplev.c doc/invoke.texi doc/passes.texi

Co-Authored-By: Mostafa Hagog <mustafa@il.ibm.com>

From-SVN: r82235
2004-05-25 12:55:06 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Kazu Hirata ca2b05bae5 c-incpath.c, [...]: Update copyright.
gcc/
	* c-incpath.c, c-incpath.h, c-pch.c, c.opt, cppexp.c,
	et-forest.h, genattr.c, ggc-none.c, hosthooks-def.h,
	hosthooks.h, params.h, ra-colorize.c, web.c,
	config/darwin-c.c, config/alpha/freebsd.h, config/arm/pe.c,
	config/avr/avr-protos.h, config/avr/avr.md,
	config/fr30/fr30-protos.h, config/fr30/fr30.md,
	config/h8300/fixunssfsi.c, config/i386/darwin.h,
	config/i386/freebsd.h, config/i386/freebsd64.h,
	config/ia64/hpux.h, config/ia64/unwind-ia64.c,
	config/ip2k/libgcc.S, config/m32r/xm-m32r.h,
	config/mmix/mmix-modes.def, config/ns32k/netbsd.h,
	config/ns32k/ns32k.md, config/pa/pa64-hpux.h,
	config/pa/pa64-regs.h, config/rs6000/aix41.h,
	config/rs6000/aix43.h, config/rs6000/host-darwin.c,
	config/sparc/aout.h, config/sparc/freebsd.h,
	config/sparc/litecoff.h, config/vax/vax-protos.h,
	doc/hostconfig.texi, doc/include/gcc-common.texi: Update
	copyright.

gcc/cp/
	* cp-lang.c, ptree.c: Update copyright.

From-SVN: r79506
2004-03-15 18:20:51 +00:00
Mostafa Hagog f9957958fe common.opt: Add description of the new -fgcse-after-reload flag.
2004-03-03  Mostafa Hagog  <mustafa@il.ibm.com>

        * common.opt: Add description of the new -fgcse-after-reload flag.

        * flags.h (flag_gcse_after_reload): Declaration of global variable.

        * gcse.c (reg_used_on_edge ,reg_set_between_after_reload_p,
        reg_used_between_after_reload_p, rtx get_avail_load_store_reg,
        is_jump_table_basic_block, bb_has_well_behaved_predecessors,
        get_bb_avail_insn, hash_scan_set_after_reload,
        compute_hash_table_after_reload, eliminate_partially_redundant_loads,
        gcse_after_reload, get_bb_avail_insn): New functions to implement
        gcse-after-reload.
        (gcse_after_reload_main): New function, the main entry point to
        gcse-after-reload.

        * rtl.h (gcse_after_reload_main): Declaration of the new function.

        * opts.c (common_handle_option): Handle the -fgcse-after-reload flag.

        * toplev.c (flag_gcse_after_reload): Initialization.

        * passes.c (rest_of_handl_gcse2): Call gcse_after_reload_main.

        * params.def (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION,
        PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION): New parameters for tuning
        the gcse after reload optimization.

        * params.h (GCSE_AFTER_RELOAD_PARTIAL_FRACTION,
        GCSE_AFTER_RELOAD_CRITICAL_FRACTION): Two macros to access the tuning
        parameters.

        * doc/invoke.texi: Documentation for the new flag gcse-after-reload.

From-SVN: r78842
2004-03-03 11:32:45 -05:00
Andreas Jaeger 3d7aafde11 genrecog.c: Use ISO C90 prototypes.
* genrecog.c: Use ISO C90 prototypes.
	(nodes_identical): Correct declaration to match prototype.
	(maybe_both_true): Likewise.
	(merge_trees): Likewise.

	* genpeep.c (gen_peephole): Remove #if 0 code.
	Use ISO C90 prototypes.

	* genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code.
	Remove #if 0'ed function simplify_by_alternatives.
	(optimize_attrs): Remove #if 0'ed code.
	Remove ^L.
	Use ISO C90 prototypes.
	(make_canonical): Remove #if 0'ed code.
	(convert_const_symbol_ref): Remove #if 0'ed function.

	* gen-protos.c (main): Check for argument.

	* rtl.h: Use ISO C90 prototypes for functions from lists.c.

	* params.h: Use ISO C90 prototypes.
	* params.c: Likewise.
	* intl.c: Likewise.
	* intl.h: Likewise.
	* lists.c: Likewise.
	* errors.c: Likewise.
	* errors.h: Likewise.
	* gencodes.c: Likewise.
	* genpreds.c: Likewise.
	* genattr.c: Likewise.
	* gen-protos.c: Likewise.
	* genflags.c: Likewise
	* genconditions.c: Likewise.
	* genautomata.c: Likewise.
	* gencheck.c: Likewise.
	* genconfig.c: Likewise.
	* genconstants.c: Likewise.
	* genemit.c: Likewise.
	* genextract.c: Likewise.
	* gengenrtl.c: Likewise.
	* gengtype.c: Likewise.
	* gengtype.h: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c: Likewise.
	* gensupport.c: Likewise.
	* gensupport.h: Likewise.

From-SVN: r67296
2003-06-01 17:59:10 +02:00
Kurt Garloff bc52247263 params.def: Introduce parameter max-inline-insns-rtl for a separate limit for the RTL inliner.
2003-03-02  Kurt Garloff  <garloff@suse.de>

	* params.def: Introduce parameter max-inline-insns-rtl for
	a separate limit for the RTL inliner.
	* params.h: Likewise.
	* integrate.c (function_cannot_inline_p): Use it.
	* toplev.c (decode_f_option): Set multiple parameters
	controlling inlining with -finline-limit.
	* params.def: Fix orthographic and typographic errors.
	* doc/invoke.texi: Document parameters controlling inlining
	and the way -finline-limit sets multiple of them.

	* tree.h (struct tree_decl): Introduce inlined_function_flag,
	recording whether the function became eligible for inlining
	by a compiler flag rather than the declaration.
	Provide DID_INLINE_FUNC macro to access it.
	* c-decl.c (grokdeclarator): Set DID_INLINE_FUNC.
	* cp/decl.c (grokfndecl): Likewise.
	* toplev.c (rest_of_compilation): Likewise.
	* cp/optimize (maybe_clone_body): Copy DID_INLINE_FUNC.
	* print-tree.c (print_node): Report it.
	* params.def: Introduce new max-inline-insns-auto limit.
	* params.h: Likewise.
	* tree-inline.c (inlinable_function_p): Apply it to functions
	with DID_INLINE_FUNC set.
	* toplev.c (decode_f_option): Initialize it from -finline-limit
	value.
	* doc/invoke.texi: Document new parameter.

From-SVN: r63688
2003-03-02 21:18:16 +00:00
Kazu Hirata 6a4d67604e params.c: Fix formatting.
* params.c: Fix formatting.
	* params.h: Likewise.
	* predict.c: Likewise.
	* prefix.c: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.

From-SVN: r53670
2002-05-20 18:06:55 +00:00
Kurt Garloff a62271540b tree-inline.c (inlinable_function_p): Improve heuristics by using a smoother function to cut down allowable inlinable...
* tree-inline.c (inlinable_function_p): Improve heuristics
        by using a smoother function to cut down allowable inlinable size.
        * param.def: Add parameters max-inline-insns-single,
        max-inline-slope, min-inline-insns that determine the exact
        shape of the above function.
        * param.h: Likewise.

From-SVN: r52832
2002-04-27 11:59:40 -07:00
Michael Meissner 03e9dbc91c Add --param max-unrolled-insns=<n> support
From-SVN: r50787
2002-03-14 23:31:50 +00:00
Zack Weinberg bd571ffcd0 params.h: Rename arguments of DEFPARAM so that it will be recognized as a translation keyword.
* params.h: Rename arguments of DEFPARAM so that it will be
	recognized as a translation keyword.

From-SVN: r49122
2002-01-23 02:57:04 +00:00
Kaveh R. Ghazi 8b60264b0d builtins.c (expand_builtin_setjmp_receiver): Const-ify.
* builtins.c (expand_builtin_setjmp_receiver): Const-ify.
	* c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length):
	Likewise.
	* c-dump.c (dump_option_value_info): Likewise.
	* c-format.c (format_length_info, format_char_info,
	format_flag_spec, format_flag_pair, format_kind_info): Likewise.
	* collect2.c (names): Likewise.
	* cppdefault.h (default_include): Likewise.
	* cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise.
	* flow.c (life_analysis): Likewise.
	* gcc.c (dir_separator_str, modify_target, option_map,
	target_option_translations, spec_list_1, extra_specs_1,
	init_spec): Likewise.
	* gcov.c (gcov_version_string): Likewise.
	* genattr.c (write_units): Likewise.
	* genattrtab.c (make_length_attrs, write_function_unit_info): Likewise.
	* gengenrtl.c (rtx_definition, defs): Likewise.
	* genrecog.c (pred_table): Likewise.
	* global.c (global_alloc): Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (find_free_reg): Likewise.
	* params.h (param_info): Likewise.
	* predict.c (predictor_info): Likewise.
	* protoize.c (unexpansion_struct): Likewise.
	* real.c (bmask): Likewise.
	* recog.h (insn_operand_data, insn_data): Likewise.
	* regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise.
	* stmt.c (expand_nl_goto_receiver): Likewise.
	* toplev.c (da, debug_args, lang_opt, documented_lang_options,
	target_switches, target_options): Likewise.
	* tradcif.y (token, tokentab2, yylex): Likewise.
	* tree.h (attribute_spec): Likewise.

	* alpha.c (override_options, alpha_lookup_xfloating_lib_func):
	Likewise.
	* arc.c (arc_output_function_epilogue): Likewise.
	* arm.c (processors, all_cores, all_architectures,
	arm_override_options, isr_attribute_arg, isr_attribute_args,
	arm_isr_value): Likewise.
	* avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc):
	Likewise.
	* c4x.c (c4x_int_reglist): Likewise.
	* d30v.c (override_options): Likewise.
	* h8300.c (shift_insn): Likewise.
	* i386.c (size_cost, i386_cost, i486_cost, pentium_cost,
	pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost,
	ix86_expand_sse_comi, ix86_expand_sse_compare, override_options,
	builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg,
	ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise.
	* i386.h (processor_costs, ix86_cost): Likewise.
	* m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise.
	* m68hc11.h (processor_costs, m68hc11_cost): Likewise.
	* m68k.c (codes_68881, codes_FPA): Likewise.
	* m88k.c (mode_from_align, max_from_align, all_from_align,
	best_from_align, m_options): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* mcore.c (mode_from_align): Likewise.
	* mips/elf64.h (UNIQUE_SECTION): Likewise.
	* mips/iris6gld.h (UNIQUE_SECTION): Likewise.
	* mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise.
	* mips.h (mips_regno_to_class): Likewise.
	* ns32k.c (scales): Likewise.
	* pa.c (import_string, magic_milli): Likewise.
	* rs6000.c (alt_reg_names, rs6000_override_options): Likewise.
	* sparc.c (leaf_reg_remap, sparc_override_options,
	reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders):
	Likewise.
	* sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise.

cp:
	* class.c (build_vtable_entry_ref): Const-ify.
	* decl.c (predefined_identifier,
	initialize_predefined_identifiers): Likewise.
	* init.c (build_new_1): Likewise.
	* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
	Likewise.

f:
	* bad.c (_ffebad_message_, ffebad_messages_): Const-ify.
	* bld.c (ffebld_arity_op_): Likewise.
	* bld.h (ffebld_arity_op_): Likewise.
	* com.c (ffecom_init_0): Likewise.
	* intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, names, gens, imps, specs, cc_pair,
	cc_descriptions, cc_summaries): Likewise.
	* intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_,
	ffeintrin_imps_, ffeintrin_specs_): Likewise.

java:
	* jcf-io.c (format_uint): Const-ify.
	* lang.c (java_tree_code_type, java_tree_code_length): Likewise.
	* lex.c (java_get_line_col): Likewise.
	* parse.y (build_incdec): Likewise.

From-SVN: r46062
2001-10-07 16:51:11 +00:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Andrew MacLeod 4a121cc34c params.def (PARAM_MAX_PENDING_LIST_LENGTH): Add parameter to limit length of dependancy flush list.
2001-07-26  Andrew MacLeod  <amacleod@redhat.com>

	* params.def (PARAM_MAX_PENDING_LIST_LENGTH): Add parameter to
	limit length of dependancy flush list.
	* params.h (MAX_PENDING_LIST_LENGTH): Define.
	* sched-int.h  (struct deps): Add pending_flush_length field.
	* sched-deps.c (flush_pending_lists): Last_pending_memory_flush now
	has 1 element in it.
	(sched_analyze_1): Use MAX_PENDING_LIST_LENGTH.
	(sched_analyze): After a jump, if the pending memory flush list is too
	large, flush the pending lists.
	(init_deps): Initialize pending_flush_length to 0.
	* doc/invoke.texi (max_pending_list_length): Document parameter.

From-SVN: r44398
2001-07-26 13:59:22 +00:00
Daniel Berlin 740f35a0a1 invoke.texi: Add description of max-gcse-passes param.
2001-06-26  Daniel Berlin  <dan@cgsoftware.com>

	* doc/invoke.texi: Add description of max-gcse-passes param.

	* gcse.c (gcse_main): Use MAX_GCSE_PASSES instead of MAX_PASSES.
	(MAX_PASSES): Remove now unneeded macro.

	* params.h (MAX_GCSE_PASSES): New macro, to get parameter value of
	max-gcse-passes param.

	* params.def (PARAM_MAX_GCSE_PASSES): New parameter, controlling
	maximum number of GCSE passes to run. Defaults to 1 (which is what
	MAX_PASSES in gcse.c used to be).

From-SVN: r43610
2001-06-27 14:35:24 +00:00
Richard Henderson 88657302b7 Standardize header guards.
From-SVN: r42615
2001-05-25 18:31:47 -07:00