Commit Graph

492 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
Tristan Gingold 30ed9d3dbe ia64.c (ia64_attribute_table): Add "common_object" entry.
* config/ia64/ia64.c (ia64_attribute_table): Add "common_object"
	entry.
	(SECTION_VMS_OVERLAY): Define.
	(ia64_vms_common_object_attribute): Added.  Handle the "common_object"
	attribute.
	(ia64_vms_elf_asm_named_section): Added.  Generate .section pseudo-op
	for common_object.
	(ia64_vms_output_aligned_decl_common): Added.  Generate pseudo-op for
	common_object declarations.
	(ia64_section_type_flags): Set section flag for common_object.
	* config/ia64/ia64-protos.h
	(ia64_vms_output_aligned_decl_common): Declare.
	(ia64_vms_elf_asm_named_section): Declare.


Co-Authored-By: Douglas B Rupp <rupp@gnat.com>

From-SVN: r151148
2009-08-27 20:08:49 +00:00
Anatoly Sokolov 7b5cbb5703 hooks.h (hook_bool_const_int_const_int_true): Declare.
* hooks.h (hook_bool_const_int_const_int_true): Declare.
	* hooks.c (hook_bool_const_int_const_int_true): New function.
	* target.h (struct gcc_target): Add can_eliminate field.
	* target-def.h (TARGET_CAN_ELIMINATE): Define.
	(TARGET_INITIALIZER): Use TARGET_CAN_ELIMINATE.
	* ira.c (setup_eliminable_regset): Use can_eliminate target hook.
	* reload1.c (update_eliminables, init_elim_table): (Ditto.).
	(elim_table): Revise comment.
	* system.h (CAN_ELIMINATE): Poison.
	* defaults.h (CAN_ELIMINATE): Remove.
	* doc/tm.texi (CAN_ELIMINATE): Revise documentation.

	* config/alpha/vms.h (CAN_ELIMINATE): Remove macro.
	* config/alpha/alpha.c (TARGET_CAN_ELIMINATE) [TARGET_ABI_OPEN_VMS]:
	Define macro.
	(alpha_vms_can_eliminate): Declare as static, change return type to
	bool.
	* config/alpha/alpha-protos.h (alpha_vms_can_eliminate): Remove.

	* config/arm/arm.h (CAN_ELIMINATE): Remove macro.
	* config/arm/arm.c (TARGET_CAN_ELIMINATE): Define macro.
	(arm_can_eliminate): New function.

	* config/avr/avr.h (CAN_ELIMINATE): Remove macro.
	* config/avr/avr.c (TARGET_CAN_ELIMINATE): Define macro.
	(avr_can_eliminate): Declare as static.
	* config/avr/avr-protos.h (avr_can_eliminate): Remove.

	* config/bfin/bfin.h (CAN_ELIMINATE): Remove macro.
	* config/bfin/bfin.c (TARGET_CAN_ELIMINATE): Define macro.
	(bfin_can_eliminate): New function.

	* config/crx/crx.h (CAN_ELIMINATE): Remove macro.
	* config/crx/crx.c (TARGET_CAN_ELIMINATE): Define macro.
	(crx_can_eliminate): New function.
	
	* config/fr30/fr30.h (CAN_ELIMINATE): Remove macro.
	* config/fr30/fr30.c (TARGET_CAN_ELIMINATE): Define macro.
	(fr30_can_eliminate): New function.

	* config/frv/frv.h (CAN_ELIMINATE): Remove macro.
	* config/frv/frv.c (TARGET_CAN_ELIMINATE): Define macro.
	(frv_can_eliminate): New function.

	* config/h8300/h8300.h (CAN_ELIMINATE): Remove macro.
	* config/h8300/h8300.c (TARGET_CAN_ELIMINATE): Define macro.
	(h8300_can_eliminate): New function.

	* config/i386/i386.h (CAN_ELIMINATE): Remove macro.
	* config/i386/i386.c (TARGET_CAN_ELIMINATE): Define macro.
	(i386_can_eliminate): Declare as static, change return type to bool.
	* config/i386/i386-protos.h (i386_can_eliminate): Remove.

	* config/ia64/ia64.h (CAN_ELIMINATE): Remove macro.
	* config/ia64/ia64.c (TARGET_CAN_ELIMINATE): Define macro.
	(ia64_can_eliminate): New function.

	* config/iq2000/iq2000.h (CAN_ELIMINATE): Remove macro.
	* config/iq2000/iq2000.c (TARGET_CAN_ELIMINATE): Define macro.
	(iq2000_can_eliminate): New function.

	* config/m32r/m32r.h (CAN_ELIMINATE): Remove macro.
	* config/m32r/m32r.c (TARGET_CAN_ELIMINATE): Define macro.
	(m32r_can_eliminate): New function.

	* config/m68hc11/m68hc11.h (CAN_ELIMINATE): Remove macro.
	* config/m68hc11/m68hc11.c (TARGET_CAN_ELIMINATE): Define macro.
	(m68hc11_can_eliminate): New function.

	* config/m68k/m68k.h (CAN_ELIMINATE): Remove macro.
	* config/m68k/m68k.c (TARGET_CAN_ELIMINATE): Define macro.
	(m68k_can_eliminate): New function.

	* config/mep/mep.h (CAN_ELIMINATE): Remove macro.
	* config/mep/mep.c (TARGET_CAN_ELIMINATE): Define macro.
	(mep_can_eliminate): New function.

	* config/mips/mips.h (CAN_ELIMINATE): Remove macro.
	* config/mips/mips.c (TARGET_CAN_ELIMINATE): Define macro.
	(mips_can_eliminate): New function.

	* config/rs6000/rs6000.h (CAN_ELIMINATE): Remove macro.
	* config/rs6000/rs6000.c (TARGET_CAN_ELIMINATE): Define macro.
	(rs6000_can_eliminate): New function.

	* config/s390/s390.h (CAN_ELIMINATE): Remove macro.
	* config/s390/s390.c (TARGET_CAN_ELIMINATE): Define macro.
	(s390_can_eliminate): Declare as static.
	* config/s390/s390-protos.h (sparc_can_eliminate): Remove.

	* config/score/score.h (CAN_ELIMINATE): Remove macro.
	* config/score/score.c (TARGET_CAN_ELIMINATE): Define macro.
	(score_can_eliminate): New function.

	* config/sparc/sparc.h (CAN_ELIMINATE): Remove macro.
	* config/sparc/sparc.c (TARGET_CAN_ELIMINATE): Define macro.
	(sparc_can_eliminate): Declare as static.
	* config/sparc/sparc-protos.h (sparc_can_eliminate): Remove.

	* config/stormy16/stormy16.h (CAN_ELIMINATE): Remove macro.
	* config/stormy16/stormy16.c (TARGET_CAN_ELIMINATE): Define macro.
	(xstormy16_can_eliminate): New function.

	* config/v850/v850.h (CAN_ELIMINATE): Remove macro.
	* config/v850/v850.c (TARGET_CAN_ELIMINATE): Define macro.
	(v850_can_eliminate): New function.

From-SVN: r151096
2009-08-26 01:09:00 +04:00
Steve Ellcey c331341273 ia64.c (ia64_promote_function_mode): Call default_promote_function_mode when not VMS.
2009-08-24  Steve Ellcey  <sje@cup.hp.com>

	* config/ia64/ia64.c (ia64_promote_function_mode): Call
	default_promote_function_mode when not VMS.

From-SVN: r151064
2009-08-24 21:35:16 +00:00
Douglas B Rupp f2972bf8bf ia64.c: Include libfuncs.h.
* config/ia64/ia64.c: Include libfuncs.h.
	(TARGET_PROMOTE_FUNCITON_MODE): Define target macro.
	(ia64_expand_call): Use reg 25 on VMS.
	(ia64_initialize_trampoline): Fix for VMS ABI.
	(ia64_function_arg_offset): Always returns 0 when TARGET_ABI_OPEN_VMS.
	(ia64_function_arg): Initialize reg 25 on VMS.
	Fix OpenVMS ABI issues for varargs.
	For OpenVMS, emit the Argument Information register set in the
	incoming/sibcall case as well.
	(ia64_arg_type): New function.
	(ia64_function_arg_advance): Keep track of cum->words.
	Fix OpenVMS ABI issues for varargs.
	(ia64_function_value): On VMS, promote mode of non-aggregate types.
	(ia64_override_options): Set flag_no_common on VMS.
	(ia64_init_builtins): Disable FWRITE builtin.
	(ia64_asm_output_external): Call DO_CRTL_NAMES.
	(ia64_vms_init_libfuncs): Add decc$ routines.
	(ia64_vms_valid_pointer_mode): New function.
	(ia64_struct_value_rtx): Allways NULL_RTX on VMS.
	(ia64_promote_function_mode): New function
	* config/ia64/ia64.h (TARGET_ABI_OPEN_VMS): Define as 0 for default.
	(LONG_DOUBLE_TYPE_SIZE): Force to 64 on VMS.
	(LIBCGC2_LONG_DOUBLE_TYPE_SIZE): Likewise.
	(INIT_CUMULATIVE_ARGS): Add atypes for VMS.
	(INIT_CUMULATIVE_INCOMING_ARGS): Likewise.
	(ASM_OUTPUT_DEF): Use ISDIGIT instead of isdigit.
	Suppress trailing '#' if VALUE is numeric.
	* config/ia64/vms.h (PROMOTE_FUNCTION_MODE): Remove, code moved to
	ia64_promote_function_mode.
	(TARGET_VALID_POINTER_MODE): Define.


Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r151009
2009-08-22 02:50:30 +00:00
Jakub Jelinek dc0c6451cd method.c (use_thunk): Call free_after_compilation after assemble_end_function.
* method.c (use_thunk): Call free_after_compilation after
	assemble_end_function.

	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Don't call
	free_after_compilation.
	* config/score/score7.c (score7_output_mi_thunk): Likewise.
	* config/score/score3.c (score3_output_mi_thunk): Likewise.
	* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
	* config/m68k/m68k.c (m68k_output_mi_thunk): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.

From-SVN: r150938
2009-08-19 17:27:48 +02:00
Paolo Bonzini cde0f3fd8a expr.c (store_constructor): Use promote_decl_mode.
2009-04-17  Paolo Bonzini  <bonzini@gnu.org>

	* expr.c (store_constructor): Use promote_decl_mode.  Remove
	now write-only variable unsignedp.
	(expand_expr_real_1): Use promote_decl_mode.
	* expr.h (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Remove last argument.
	* function.c (assign_temp): Drop last argument of promote_mode.
	(assign_parm_find_data_types): Use promote_function_mode.
	(assign_parm_setup_reg): Likewise.
	(expand_function_end): Use promote_function_mode.
	* calls.c (initialize_argument_information): Use promote_function_mode.
	(precompute_arguments): Use promote_mode instead of checking if
	only PROMOTE_FUNCTION_MODE is defined.
	(expand_call): When making sibcall decisions, use promote_function_mode.
	Below, remove an if for targetm.calls.promote_function_return and
	and use promote_function_mode.
	(emit_library_call_value_1): Use promote_function_mode, fix bug
	where promote_mode was passed FOR_CALL == 0 for a return value in an
	assertion.
	* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
	* explow.c (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Keep only the FOR_CALL == 0 case.
	* combine.c (setup_incoming_promotion): Remove test of
	promote_function_args.  Use promote_function_mode.
	* stmt.c (expand_value_return): Use promote_decl_mode.
	(expand_decl): Use promote_decl_mode.

	* expr.c (store_constructor): Use promote_decl_mode.  Remove
	now write-only variable unsignedp.
	(expand_expr_real_1): Use promote_decl_mode.
	* expr.h (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Remove last argument.
	* function.c (assign_temp): Drop last argument of promote_mode.
	(assign_parm_find_data_types): Use promote_function_mode.
	(assign_parm_setup_reg): Likewise.
	(expand_function_end): Use promote_function_mode.
	* calls.c (initialize_argument_information): Use promote_function_mode.
	(precompute_arguments): Use promote_mode instead of checking if
	only PROMOTE_FUNCTION_MODE is defined.
	(expand_call): When making sibcall decisions, use promote_function_mode.
	Below, remove an if for targetm.calls.promote_function_return and
	and use promote_function_mode.
	(emit_library_call_value_1): Use promote_function_mode, fix bug
	where promote_mode was passed FOR_CALL == 0 for a return value in an
	assertion.
	* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
	* explow.c (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Keep only the FOR_CALL == 0 case.
	* combine.c (setup_incoming_promotion): Remove test of
	promote_function_args.  Use promote_function_mode.
	* stmt.c (expand_value_return): Use promote_decl_mode.
	(expand_decl): Use promote_decl_mode.

	* explow.c (promote_function_mode): Just call the target hook.
	* targhooks.c (default_promote_function_mode,
	default_promote_function_mode_always_promote): New.
	* targhooks.h (default_promote_function_mode,
	default_promote_function_mode_always_promote): Declare.
	* target.h (promote_function_args, promote_function_return): Remove.
	(promote_function_mode): New.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Remove.
	(TARGET_PROMOTE_FUNCTION_MODE): New.
	(TARGET_CALLS): Adjust.
	* system.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison.

	* config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move...
	* config/s390/s390.c (s390_promote_function_mode): ... here,
	with pointer handling.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move...
	* config/sparc/sparc.c (sparc_promote_function_mode): ... here,
	with pointer handling.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
	
	* config/sh/sh-protos.h (sh_promote_function_mode): New.
	* config/sh/sh.c (sh_promote_function_mode): New.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move...
	* config/cris/cris.c (cris_promote_function_mode): ... here.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS): Remove.

	* config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move...
	* config/mmix/mmix.c (mmix_promote_function_mode): ... here.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS): Remove.

	* config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move...
	* config/arm/arm.c (arm_promote_function_mode): ... here, without complex
	type handling.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/pa/pa.c (pa_promote_function_mode): New.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Remove.
	(TARGET_PROMOTE_FUNCTION_MODE): Define equivalently.
	* config/xtensa/xtensa.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/picochip/picochip.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/score/score.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/ia64/ia64.c: Likewise (disabled though).

	* config/frv/frv.h: Remove pointless remark.

	* doc/tm.texi (PROMOTE_FUNCTION_MODE,
	TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into...
	(TARGET_PROMOTE_FUNCTION_MODE): ... this.

From-SVN: r150336
2009-08-01 22:03:34 +00:00
H.J. Lu d575725b25 ia64.c (ia64_handle_model_attribute): Remove an extra 'decl' for error_at.
2009-07-07  H.J. Lu  <hongjiu.lu@intel.com>

	* config/ia64/ia64.c (ia64_handle_model_attribute): Remove
	an extra 'decl' for error_at.

From-SVN: r149330
2009-07-07 07:25:58 -07:00
Manuel López-Ibáñez c5d753640d cgraphunit.c: Replace %J by an explicit location.
2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* cgraphunit.c: Replace %J by an explicit location. Update all
	calls.
	* c-decl.c: Likewise.
	* function.c: Likewise.
	* varasm.c: Likewise.
	* tree-ssa.c: Likewise.
	* c-common.c: Likewise.
	* tree-cfg.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/v850/v850.c: Likewise.
java/	
	* class.c: Replace %J by an explicit location. Update all calls.
objc/	
	* objc-act.c: Replace %J by an explicit location. Update all
	calls.
cp/
	* init.c: Replace %J by an explicit location. Update all calls.
	* decl.c: Likewise.
	* typeck2.c: Likewise.
	* pt.c: Likewise.
	* name-lookup.c: Likewise.

From-SVN: r149312
2009-07-07 02:55:59 +00:00
H.J. Lu 2ca57608ec re PR target/40489 (gcc.dg/builtin-unreachable-3.c doesn't work on ia64)
2009-06-27  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/40489
	* config/ia64/ia64.c (ia64_reorg): Check NULL insn.

From-SVN: r149014
2009-06-27 09:43:28 -07:00
Steve Ellcey f3a8311127 ia64-protos.h (ia64_dconst_0_5): New.
* config/ia64/ia64-protos.h (ia64_dconst_0_5): New.
	(ia64_dconst_0_375): New.
	* config/ia64/ia64.c (ia64_override_options): Remove
	-minline-sqrt-min-latency warning.
	(ia64_dconst_0_5_rtx, ia64_dconst_0_5): New.
	(ia64_dconst_0_375_rtx, ia64_dconst_0_375): New
	* config/ia64/ia64.md (*sqrt_approx): Remove.
	(sqrtsf2): Remove #if 0.
	(sqrtsf2_internal_thr): Rewrite and move to div.md.
	(sqrtdf): Remove assert.
	(sqrtdf2_internal_thr): Rewrite and move to div.md.
	(sqrtxf2): Remove #if 0.
	(sqrtxf2_internal_thr): Rewrite and move to div.md.
	* div.md (sqrt_approx_rf): New.
	(sqrtsf2_internal_thr): New implementation.
	(sqrtsf2_internal_lat): New.
	(sqrtdf2_internal_thr: New implementation.
	(sqrtxf2_internal): New implementation.

From-SVN: r147713
2009-05-19 18:18:08 +00:00
Ian Lance Taylor 09639a8397 passes.c (finish_optimization_passes): Change i to int.
./:	* passes.c (finish_optimization_passes): Change i to int.
	* plugin.c (plugins_active_p): Change event to int.
	(dump_active_plugins): Likewise.
	* reginfo.c (invalid_mode_change_p): Change to to unsigned int.
	Add cast.
	* tree.c (tree_range_check_failed): Change c to unsigned int.
	(omp_clause_range_check_failed): Likewise.
	(build_common_builtin_nodes): Change mode to int.  Add cast.
	* config/ia64/ia64.c (is_emitted): Change r to unsigned int.
	(ia64_hard_regno_rename_ok, ia64_eh_uses): Likewise.

	* c-typeck.c (build_unary_op): If -Wc++-compat, warn about using
	++ or -- with a variable of enum type.
cp/:
	* class.c (layout_class_type): Change itk to unsigned int.
	* decl.c (finish_enum): Change itk to unsigned int.
	* parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
	casts.
fortran/:
	* decl.c (match_attr_spec): Change d to unsigned int.
	* dump-parse-tree.c (show_namespace): Change op to int.  Add cast.
	* interface.c (gfc_check_interfaces): Change i to int.  Add casts.
	* module.c (read_module): Change i to int.  Add cast.
	(write_module): Change i to int.
	* symbol.c (gfc_get_namespace): Change in to int.
	(gfc_free_namespace): Change i to int.
	* trans-io.c (gfc_build_io_library_fndecls): Change ptype to
	unsigned int.  Add cast.
	* trans-types.c (gfc_init_kinds): Change mode to unsigned int.
	Add casts.
testsuite/:
	* gcc.dg/Wcxx-compat-9.c: New testcase.

From-SVN: r147544
2009-05-14 21:29:48 +00:00
Paolo Bonzini f90b7a5a79 Merge cond-optab branch.
From-SVN: r147425
2009-05-12 09:43:48 +00:00
Joseph Myers 29d08eba74 arc.c (arc_handle_interrupt_attribute): Use %qE for identifiers in diagnostics.
* config/arc/arc.c (arc_handle_interrupt_attribute): Use %qE for
	identifiers in diagnostics.
	* config/arm/arm.c (arm_handle_fndecl_attribute,
	arm_handle_isr_attribute): Likewise.
	* config/avr/avr.c (avr_handle_progmem_attribute,
	avr_handle_fndecl_attribute, avr_handle_fntype_attribute):
	Likewise.
	* config/bfin/bfin.c (handle_int_attribute,
	bfin_handle_longcall_attribute, bfin_handle_l1_text_attribute,
	bfin_handle_l1_data_attribute, bfin_handle_longcall_attribute,
	bfin_handle_l1_text_attribute, bfin_handle_l1_data_attribute):
	Likewise.
	* config/darwin.c (darwin_handle_kext_attribute,
	darwin_handle_weak_import_attribute): Likewise.
	* config/h8300/h8300.c (h8300_handle_fndecl_attribute,
	h8300_handle_eightbit_data_attribute,
	h8300_handle_tiny_data_attribute): Likewise.
	* config/i386/i386.c (ix86_handle_cconv_attribute,
	ix86_handle_abi_attribute, ix86_handle_struct_attribute):
	Likewise.
	* config/i386/winnt.c (ix86_handle_shared_attribute,
	ix86_handle_selectany_attribute): Likewise.
	* config/ia64/ia64.c (ia64_handle_model_attribute): Likewise.
	* config/m32c/m32c.c (function_vector_handler): Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_handle_page0_attribute,
	m68hc11_handle_fntype_attribute): Likewise.
	* config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise.
	* config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise.
	* config/mips/mips.c (mips_insert_attributes,
	mips_merge_decl_attributes, mips_expand_builtin): Likewise.
	* config/rs6000/rs6000.c (rs6000_handle_longcall_attribute,
	rs6000_handle_struct_attribute): Likewise.
	* config/sh/sh.c (sh_insert_attributes,
	sh_handle_resbank_handler_attribute,
	sh_handle_interrupt_handler_attribute,
	sh2a_handle_function_vector_handler_attribute,
	sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
	Likewise.
	* config/sh/symbian.c (sh_symbian_mark_dllimport): Likewise.
	* config/spu/spu.c (spu_handle_fndecl_attribute,
	spu_handle_vector_attribute): Likewise.
	* config/stormy16/stormy16.c
	(xstormy16_handle_interrupt_attribute): Likewise.
	* config/v850/v850-c.c (ghs_pragma_section): Likewise.
	* config/v850/v850.c (v850_handle_interrupt_attribute): Likewise.

From-SVN: r147334
2009-05-10 11:29:35 +01:00
Ian Lance Taylor 81f40b7964 collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind.
./:	* collect2.c (is_ctor_dtor): Change type of ret field in struct
	names to symkind.
	* dce.c (run_fast_df_dce): Change type of old_flags to int.
	* df-core.c (df_set_flags): Change return type to int.  Change
	type of old_flags to int.
	(df_clear_flags): Likewise.
	* df-scan.c (df_def_record_1): Change 0 to VOIDmode.
	(df_get_conditional_uses): Likewise.
	* df.h (df_set_flags, df_clear_flags): Update declarations.
	* dwarf2out.c (struct indirect_string_node): Change type of form
	field to enum dwarf_form.
	(AT_string_form): Change return type to enum dwarf_form.
	* fixed-value.c (fixed_compare): Add cast to enum type.
	* fwprop.c (update_df): Change 0 to VOIDmode.
	* gensupport.c: Change 0 to UNKNOWN.
	* gimple.h (gimple_cond_code): Add cast to enum type.
	* haifa-sched.c (reemit_notes): Add cast to enum type.
	* hooks.c (hook_int_void_no_regs): Remove function.
	* hooks.h (hook_int_void_no_regs): Remove declaration.
	* optabs.c (expand_widen_pattern_expr): Change 0 to VOIDmode.
	* predict.c (combine_predictions_for_insn): Add casts to enum
	type.
	* real.c (real_arithmetic): Add cast to enum type.
	(real_compare): Likewise.
	* target.h (struct gcc_target): Change return type of
	branch_target_register_class to enum reg_class.
	* target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define as
	default_branch_target_register_class.
	* targhooks.c (default_branch_target_register_class): New
	function.
	* targhooks.h (default_branch_target_register_class): Declare.
	* tree-data-ref.c (print_direction_vector): Add cast to enum
	type.
	* tree-vect-data-refs.c (vect_supportable_dr_alignment): Remove
	cast to int.
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Change 0 to
	ERROR_MARK.
	* tree-vect-slp.c (vect_build_slp_tree): Change 0 to
	vect_uninitialized_def.  Change 0 to ERROR_MARK.
	* tree-vect-stmts.c (supportable_widening_operation): Don't
	initialize icode1 and icode2.
	* tree-vectorizer.h (enum vect_def_type): Add
	vect_uninitialized_def.
	* config/sol2-c.c (cmn_err_length_specs): Change 0 to FMT_LEN_none
	and to STD_C89.
	(cmn_err_flag_specs): Change 0 to STD_C89.
	(cmn_err_char_table): Likewise.
	* config/arm/arm.c (get_arm_condition_code): Change type of code
	to enum arm_cond_code.
	(IWMMXT_BUILTIN): Change 0 to UNKNOWN.
	(IWMMXT_BUILTIN2): Likewise.
	(neon_builtin_type_bits): Don't define typedef.
	(neon_builtin_datum): Change type of bits field to int.
	(arm_expand_neon_args): Add cast to enum type.
	* config/ia64/ia64.c (tls_symbolic_operand_type): Change 0 to
	TLS_MODEL_NONE.
	* config/i386/i386.c (bdesc_multi_arg): Change 0 to UNKNOWN.  Add
	casts to enum type.
	* config/mips/mips.c (LOONGSON_BUILTIN_ALIAS): Change 0 to
	MIPS_FP_COND_f.
	* config/mips/mips.md (jal_macro): Return enum constant.
	(single_insn): Likewise.
	* config/rs6000/rs6000.c (bdesc_altivec_preds): Change 0 to
	CODE_FOR_nothing.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	casts to enum type.
	* config/s390/s390.c (s390_tune_flags): Change type to int.
	(s390_arch_flags): Likewise.
	(s390_handle_arch_option): Change flags field of struct pta to
	int.
	* config/s390/s390.h (s390_tune_flags): Update declaration.
	(s390_arch_flags): Likewise.
	* config/sh/sh.c (prepare_move_operands): Compare
	tls_symbolic_operand result with enum constant.
	(sh_reorg): Change PUT_MODE to PUT_REG_NOTE_KIND.
	(sh_expand_prologue): Add cast to enum type.
	(sh_expand_epilogue): Likewise.
	(tls_symbolic_operand): Change return type to enum tls_model.
	(fpscr_set_from_mem): Add cast to enum type.
	(legitimize_pic_address): Compare tls_symbolic_operand result with
	enum constant.
	(sh_target_reg_class): Change return type to enum reg_class.
	* config/sh/sh.h (OVERRIDE_OPTIONS): Change CPU_xxx to
	PROCESSOR_xxx.
	* config/sh/sh-protos.h (tls_symbolic_operand): Update
	declaration.
	* config/sparc/sparc.c (sparc_override_options): Add cast to enum
	type.
	* config/sparc/sparc.md (empty_delay_slot): Return enum constant.
	(pic, calls_alloca, calls_eh_return, leaf_function): Likewise.
	(delayed_branch, tls_call_delay): Likewise.
	(eligible_for_sibcall_delay): Likewise.
	(eligible_for_return_delay): Likewise. 
	* config/spu/spu.c (expand_builtin_args): Add cast to enum type.
	(spu_expand_builtin_1): Likewise.

	* c-typeck.c (convert_for_assignment): Issue -Wc++-compat warnings
	for all types of conversions.
	(output_init_element): Issue -Wc++-compat warning if needed when
	initializing a bitfield with enum type.
	* c-parser.c (c_parser_expression): Set original_type to
	original_type of right hand operand of comman operator.
cp/:
	* semantics.c (finish_omp_clauses): Change type of c_kind to enum
	omp_clause_code.
fortran/:
	* trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
	type.
	* trans-io.c (st_parameter_field): Add casts to enum type.
java/:
	* builtins.c (java_builtins): Add casts to enum type.
	* verify-impl.c (check_class_constant): Add cast to enum type.
	(check_constant, check_wide_constant): Likewise.
objc/:
	* objc-act.c (objc_gimplify_expr): Add casts to enum type.
testsuite/:
	* gcc.dg/Wcxx-compat-5.c: New testcase.
	* gcc.dg/Wcxx-compat-6.c: New testcase.

From-SVN: r146855
2009-04-27 20:25:48 +00:00
Steve Ellcey 735b94a740 ia64.md (movfs_internal): Allow flt constants.
* config/ia64/ia64.md (movfs_internal): Allow flt constants.
	(movdf_internal): Ditto.
	* config/ia64/ia64.c (ia64_legitimate_constant_p): Allow
	SFmode and DFmode constants.
	(ia64_print_operand): Add 'G' format for printing
	floating point constants.

From-SVN: r146743
2009-04-24 19:35:52 +00:00
Ian Lance Taylor 32e8bb8ebf combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
gcc/:
	* combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
	(record_dead_and_set_regs): Likewise.
	* df.h (struct df_mw_hardreg): Change flags field to int.
	(struct df_base_ref): Likewise.
	(struct df): Change changeable_flags field to int.
	* df-scan.c (df_defs_record): Change clobber_flags to int.
	* dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum
	constants rather than #define macros.
	(enum dwarf_attribute, enum dwarf_location_atom): Likewise.
	(enum dwarf_type, enum dwarf_endianity_encoding): Likewise.
	(enum dwarf_calling_convention): Likewise.
	(enum dwarf_line_number_x_ops): Likewise.
	(enum dwarf_call_frame_info): Likewise.
	(enum dwarf_source_language): Likewise.
	* dwarf2out.c (int_loc_descriptor): Add cast to enum type.
	(add_calling_convention_attribute): Likewise.
	* fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
	type.
	(combine_comparisons): Change compcode to int.  Add cast to enum
	type.
	* genrecog.c (maybe_both_true_2): Change c to int.
	(write_switch): Likewise.  Add cast to enum type.
	* gimplify.c (gimplify_omp_for): Handle return values from
	gimplify_expr using MIN rather than bitwise or.
	(gimplify_expr): Add cast to enum type.
	* ipa-prop.c (update_jump_functions_after_inlining): Change
	IPA_BOTTOM to IPA_JF_UNKNOWN.
	* ira.c (setup_class_subset_and_memory_move_costs): Change mode to
	int.  Add casts to enum type.
	(setup_cover_and_important_classes): Change cl to int.  Add casts
	to enum type.
	(setup_class_translate): Change cl and mode to int.
	(ira_init_once): Change mode to int.
	(free_register_move_costs): Likewise.
	(setup_prohibited_mode_move_regs): Add casts to enum type.
	* langhooks.c (add_builtin_function_common): Rework assertion that
	value fits bitfield.
	* mcf.c (add_fixup_edge): Change type parameter to edge_type.
	* omega.c (omega_do_elimination): Avoid math on enum types.
	* optabs.c (expand_vec_shift_expr): Remove casts to int.
	* opts.c (set_debug_level): Change 2 to enum constant.  Use new
	int local to handle integral_argment value.
	* regmove.c (try_auto_increment): Change PUT_MODE to
	PUT_REG_NOTE_KIND.
	* reload.c (push_secondary_reload): Add casts to enum type.
	(secondary_reload_class, find_valid_class): Likewise.
	* reload1.c (emit_input_reload_insns): Likewise.
	* rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
	* sel-sched.c (init_hard_regs_data): Change cur_mode to int.
	* sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum
	constant.
	* tree.c (build_common_builtin_nodes): Add casts to enum type.
	* tree-complex.c (complex_lattice_t): Typedef to int rather than
	enum type.
	(expand_complex_libcall): Add casts to enum type.
	* tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant.
	* tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code
	with ERROR_MARK, not NUM_TREE_CODES.
	(vect_create_epilog_for_reduction): Likewise.
	(vectorizable_reduction): Don't initialize epiloc_reduc_code.
	When not using it, set it to ERROR_MARK rather than
	NUM_TREE_CODES.
	* tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
	enum machine_mode.
	* tree-vect-stmts.c (new_stmt_vec_info): Change 0 to
	vect_unused_in_loop.  Change 0 to loop_vect.
	* tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
	type.
	* var-tracking.c (get_init_value): Change return type to enum
	var_init_status.
	* vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
	* config/arm/arm.c (fp_model_for_fpu): Change to array to enum
	arm_fp_model.
	(arm_override_options): Add casts to enum type.
	(arm_emit_tls_decoration): Likewise.
	* config/i386/i386.c (ix86_function_specific_restore): Add casts
	to enum type.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Likewise.
	* config/ia64/ia64.c (ia64_expand_compare): Change magic to int.
	* config/rs6000/rs6000.c (rs6000_override_options): Add casts to
	enum type.
	* config/s390/s390.c (code_for_builtin_64): Change to array of
	enum insn_code.
	(code_for_builtin_31): Likewise.
	(s390_expand_builtin): Change code_for_builtin to enum insn_code
	const *.
	* config/sparc/sparc.c (sparc_override_options): Change value
	field in struct code_model to enum cmodel.  In initializer change
	0 to NULL and add cast to enum type.

	* c-typeck.c (build_modify_expr): Add lhs_origtype parameter.
	Change all callers.  Issue a -Wc++-compat warning using
	lhs_origtype if necessary.
	(convert_for_assignment): Issue -Wc++-compat warnings about
	invalid conversions to enum type on assignment.
	* c-common.h (build_modify_expr): Update declaration.

gcc/cp/:
	* call.c (build_temp): Change 0 to enum constant.
	* cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
	type.
	* cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
	* decl2.c (constrain_visibility): Likewise.
	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
	(cp_parser_flags): Typedef to int rather than enum type.
	(cp_parser_expression_stack_entry): Change prec field to enum
	cp_parser_prec.

	* typeck.c (build_modify_expr): Add lhs_origtype parameter.
	Change all callers.

gcc/fortran/:
	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
	out of struct gfc_symbol.
	(struct gfc_symbol): Use enum gfc_symbol_type.
	(enum gfc_array_ref_dimen_type): New named enum type, broken out
	of struct gfc_array_ref).
	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
	(mod_pointee_as): Update declaration.
	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
	(gfc_mod_pointee_as): Change return type to "match".
	* module.c (mio_array_ref): Add cast to enum type.
	(mio_symbol): Likewise.
	* resolve.c (resolve_global_procedure): Change type to enum
	gfc_symbol_type.
	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
	int.

gcc/java/:
	* jcf-parse.c (handle_constant): Add cast to enum type.

gcc/objc/:
	* objc-act.c (get_super_receiver): Update calls to
	build_modify_expr to pass new argument.

gcc/testsuite/:
	* gcc.dg/Wcxx-compat-4.c: New testcase.

From-SVN: r146735
2009-04-24 15:31:38 +00:00
Ian Lance Taylor bbbbb16a88 Fix enum conversions which are invalid in C++:
gcc/:
	Fix enum conversions which are invalid in C++:
	* auto-inc-dec.c (attempt_change): Change 0 to SET in function
	call.
	* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
	call.
	* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
	* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
	* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
	call.
	(dbxout_parms): Likewise.
	* df-core.c (df_set_flags): Change changeable_flags parameter to
	int.
	(df_clear_flags): Likewise.
	* df-problems.c (df_rd_bb_local_compute_process_def): Change
	top_flag parameter to int.
	(df_chain_create_bb_process_use): Likewise.
	(df_chain_add_problem): Change chain_flags parameter to unsigned
	int.  Remove cast.
	* df-scan.c (df_ref_create): Change ref_flags parameter to int.
	(df_ref_create_structure, df_def_record_1): Likewise.
	(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
	(df_notes_rescan): Change 0 to VOIDmode in function call.
	(df_get_call_refs, df_insn_refs_collect): Likewise.
	(df_bb_regs_collect): Likewise.
	(df_entry_block_defs_collect): Likewise.
	(df_exit_block_uses_collect): Likewise.
	* df.h: Update declarations.
	* double-int.c (double_int_divmod): Add cast to enum type.
	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
	* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
	(based_loc_descr): Likewise.
	(loc_descriptor_from_tree_1): Change first_op and second_op to
	enum dwarf_location_atom.  Add cast to enum type.
	* expmed.c (init_expmed): Change 0 to SET in function call.
	* expr.c (init_expr_target): Change 0 to VOIDmode in function
	call.
	(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
	(do_store_flag): Likewise.
	* fixed-value.h (struct fixed_value): Change mode to enum
	machine_mode.
	* function.c (assign_parms): Change 0 to VOIDmode in function
	call.
	* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
	function call.
	(insert_insn_decl, insert_decl, insert_state): Likewise.
	(automata_list_finish): Likewise.
	* genrecog.c (process_define_predicate): Add cast to enum type.
	* gensupport.c (init_predicate_table): Add cast to enum type.
	* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
	function call.
	(gimple_build_call_1, gimple_build_label): Likewise.
	(gimple_build_goto, gimple_build_asm_1): Likewise.
	(gimple_build_switch_1, gimple_build_cdt): Likewise.
	* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
	call.
	(enum fallback): Rename from enum fallback_t.
	(fallback_t): Typedef as int.
	* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
	GSI_SAME_STMT in function call.
	* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
	enum type.
	(setup_reg_class_relations): Likewise.
	(setup_reg_class_nregs): Change cl to int.  Add casts to enum
	type.
	(setup_prohibited_class_mode_regs): Add cast to enum type.
	(setup_prohibited_mode_move_regs): Likewise.
	* ira-costs.c (record_reg_classes): Change rclass to enum
	reg_class.
	(record_address_regs): Change i to enum reg_class.
	* lists.c (alloc_EXPR_LIST): Add cast to enum type.
	* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
	(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
	(GET_MODE_2XWIDER_MODE): Likewise.
	(GET_CLASS_NARROWEST_MODE): Likewise.
	* omp-low.c (expand_omp_for): Add cast to enum type.
	* optabs.c (debug_optab_libfuncs): Add casts to enum type.
	* opts.c (enable_warning_as_error): Change kind to diagostic_t.
	* postreload.c (reload_cse_simplify_operands): Change rclass local
	to enum reg_class.
	* predict.c (combine_predictions_for_insn): Change best_predictor
	and predictor to enum br_predictor.
	(combine_predictions_for_bb): Likewise.
	(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
	use SET_PREDICT_EXPR_OUTCOME.
	* real.c (real_arithmetic): Change icode to code in function
	call.
	* reginfo.c (init_move_cost): Add casts to enum type.
	(init_reg_sets_1, init_fake_stack_mems): Likewise.
	* regmove.c (regclass_compatible_p): Change class0 and class1 to
	enum reg_class.
	* reload.c (find_valid_class): Add casts to enum type.
	(push_reload): Change 0 to NO_REGS in function call.
	(find_reloads): Change this_alternative to array of enum
	reg_class.  Remove some now-unnecessary casts.
	(make_memloc): Change 0 to VOIDmode in function call.
	* reload1.c (reload): Change 0 to VOIDmode in function call.
	(eliminate_regs_1, elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(emit_input_reload_insns): Add cast to enum type.
	(delete_output_reload): Change 0 to VOIDmode in function call.
	* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
	to enum type in function call.
	* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
	(SET_PREDICT_EXPR_OUTCOME): Define.
	* tree-dump.c (get_dump_file_info): Change phase parameter to
	int.
	(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
	(dump_initialized_p, dump_flag_name, dump_end): Likewise.
	(dump_function): Likewise.
	* tree-dump.h: Update declarations.
	* tree-pass.h: Update declarations.
	* varasm.c (assemble_integer): Change mclass to enum mode_class.
	* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
	enum type.
	(arm_rtx_costs_1): Correct parenthesization.
	(arm_rtx_costs): Add casts to enum type.
	(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
	(vfp_emit_fstmd): Use add_rg_note.
	(emit_multi_reg_push, emit_sfm): Likewise.
	(thumb_set_frame_pointer): Likewise.
	(arm_expand_prologue): Likewise.
	(arm_regno_class): Change return type to enum reg_class.
	(thumb1_expand_prologue): Use add_reg_note.
	* config/arm/arm-protos.h (arm_regno_class): Update declaration.
	* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
	in function call.
	* config/arm/gentune.sh: Add cast to enum type.
	* config/arm/arm-tune.md: Rebuild.
	* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
	(ix86_split_fp_branch, predict_jump): Likewise.
	(ix86_expand_multi_arg_builtin): Change sub_code from enum
	insn_code to enum rtx_code.
	(ix86_builtin_vectorized_function): Add cast to enum type.
	* config/i386/i386.md (truncdfsf2): Change slot to enum
	ix86_stack_slot.
	(truncxf<mode>2, isinf<mode>2): Likewise.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
	enum type.
	* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
	(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
	(insert_bundle_state): Change 1 to INSERT in function call.
	(ia64_add_bundle_selector_before): Likewise.
	* config/ia64/ia64.md (cpu attr): Add cast to enum type.
	(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
	(restore_stack_nonlocal): Likewise.
	* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
	function call.
	* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
	function call.
	(mips_rtx_costs): Likewise.
	(mips_override_options): Add casts to enum type.
	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
	in function call.
	* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
	(store_reg, set_reg_plus_d): Likewise.
	(hppa_expand_prologue, hppa_profile_hook): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
	cast to enum type.
	(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
	function call.
	(emit_unlikely_jump): Use add_reg_note.
	(rs6000_emit_allocate_stack): Likewise.
	(rs6000_frame_related, rs6000_emit_prologue): Likewise.
	(output_toc): Change 1 to INSERT in function call.
	(output_profile_hook): Change 0 to LCT_NORMAL in function call.
	(rs6000_initialize_trampoline): Likewise.
	(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
	function call.
	* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
	(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
	(s390_expand_setmem, s390_expand_cmpmem): Likewise.
	(save_gprs): Use add_reg_note.
	(s390_emit_prologue): Likewise.
	(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
	call.
	* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
	(sparc_fold_builtin): Add cast to enum type.
	* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
	enum insn_code.
	(spu_expand_prologue): Use add_reg_note.
	(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
	call.

	* c-parser.c (c_parser_attributes): Change VEC back to tree list.
	(c_parser_postfix_expression_after_primary): Get VEC for list of
	arguments.  Get original types of arguments.  Call
	build_function_call_vec.
	(cached_expr_list_1, cached_expr_list_2): New static variables.
	(c_parser_expr_list): Change return type to VEC *.  Add
	p_orig_types parameter.  Change all callers.
	(c_parser_release_expr): New static function.
	(c_parser_vec_to_tree_list): New static function.
	* c-typeck.c (build_function_call): Rewrite to build a VEC and
	call build_function_call_vec.
	(build_function_call_vec): New function, based on old
	build_function_call.
	(convert_arguments): Remove nargs and argarray parameters.  Change
	values to a VEC.  Add origtypes parameter.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	(convert_for_assignment): Add origtype parameter.  Change all
	callers.  If warn_cxx_compat, check for conversion to an enum
	type when calling a function.
	(store_init_value): Add origtype parameter.  Change all callers.
	(digest_init): Likewise.
	(struct init_node): Add origtype field.
	(add_pending_init): Add origtype parameter.  Change all callers.
	(output_init_element): Likewise.
	(output_pending_init_elements): Pass origtype from init_node to
	output_init_element.
	(process_init_elemnt): Pass origtype from c_expr to
	output_init_element.
	(c_finish_return): Add origtype parameter.  Change all callers.
	* c-common.c (sync_resolve_size): Change params to VEC *.  Change
	caller.
	(sync_resolve_params): Likewise.
	(sync_resolve_return): Change params to first_param.  Change
	caller.
	(resolve_overloaded_builtins): Change params to VEC *.  Change
	callers.   Save first parameter around call to
	build_function_call_vec.
	* c-decl.c (finish_decl): Add origtype parameter.  Change all
	callers.  Call build_function_call_vec rather than
	build_function_call for cleanup.
	* c-tree.h: Update declarations.
	* c-common.h: Update declarations.
	* stub-objc.c (objc_rewrite_function_call): Change parameter from
	params to first_param.
	* target.h (struct gcc_target): Change resolve_overloaded_builtin
	params parameter from tree to void *.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Change arglist parameter to have type void *, and to be a pointer
	to a VEC.
	* config/rs6000/rs6000-protos.h
	(altivec_resolve_overloaded_builtin): Update declaration.
	* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
	fnargs parameter to have type void *, and to be a pointer to a
	VEC.  Call build_function_call_vec instead of
	build_function_call.
	* config/spu/spu-protos.h (spu_expand_builtin): Update
	declaration.

gcc/cp/:
	* typeck.c (build_function_call_vec): New function.
	(cp_build_function_call): Only pass first parameter to
	objc_rewrite_function_call.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	* decl.c (finish_decl): Add origtype parameter.  Change all
	callers.
	* semantics.c (finish_call_expr): Pass VEC to
	resolve_overloaded_builtin.

gcc/objc:
	* objc-act.c (objc_rewrite_function_call): Change parameter from
	params to first_param.  Change all callers.

gcc/testsuite:
	* gcc.dg/Wcxx-compat-3.c: New testcase.

From-SVN: r146451
2009-04-20 19:35:00 +00:00
Uros Bizjak fcb82ab00f ia64.c (ia64_builtins): Add IA64_BUILTIN_HUGE_VALQ.
2009-04-07  Uros Bizjak  <ubizjak@gmail.com>

	* config/ia64/ia64.c (ia64_builtins): Add IA64_BUILTIN_HUGE_VALQ.
	(ia64_init_builtins): Handle IA64_BUILTIN_HUGE_VALQ.
	(ia64_expand_builtin): Likewise.

From-SVN: r145690
2009-04-07 09:19:02 -07:00
Steven Bosscher bbb6eae87e ia64.c (ia64_handle_option): Inform user that Itanium1 tuning is deprecated if...
* config/ia64/ia64.c (ia64_handle_option): Inform user that Itanium1
	tuning is deprecated if -mtune value is set to an Itanium1 variant.

From-SVN: r145427
2009-04-01 19:47:01 +00:00
Alexander Monakov cd510f15b8 ia64.c (ia64_set_sched_flags): Zero spec_info->mask when neither of haifa/selective schedulers are working.
2009-03-25  Andrey Belevantsev  <abel@ispras.ru>
            Alexander Monakov  <amonakov@ispras.ru>

        * config/ia64/ia64.c (ia64_set_sched_flags): Zero spec_info->mask when
	neither of haifa/selective schedulers are working.

        * gcc.target/ia64/20090324-1.c: New test.

From-SVN: r145055
2009-03-25 13:04:36 +03:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Steve Ellcey c208436c7b re PR target/38056 (Missed tail calls on ia64)
PR target/38056
	* config/ia64/ia64.c (ia64_function_ok_for_sibcall): Check
	TARGET_CONST_GP.
	* gcc.target/ia64/sibcall-opt-1.c: New test.
	* gcc.target/ia64/sibcall-opt-2.c: New test.

From-SVN: r144168
2009-02-13 21:59:32 +00:00
H.J. Lu c252db2030 longlong.h (sub_ddmmss): New for ia64.
gcc/

2009-02-12  Uros Bizjak  <ubizjak@gmail.com>

	* longlong.h (sub_ddmmss): New for ia64. Ported from GMP 4.2.
	(umul_ppmm): Likewise.
	(count_leading_zeros): Likewise.
	(count_trailing_zeros): Likewise.
	(UMUL_TIME): Likewise.

2009-02-12  H.J. Lu  <hongjiu.lu@intel.com>

	* config.gcc: Add ia64/t-fprules-softfp soft-fp/t-softfp to
	tmake_file for ia64*-*-linux*.

	* config/ia64/ia64.c (ia64_soft_fp_init_libfuncs): New.
	(ia64_expand_compare): Use HPUX library for TFmode only for
	HPUX.
	(ia64_builtins): Add IA64_BUILTIN_COPYSIGNQ, IA64_BUILTIN_FABSQ
	and IA64_BUILTIN_INFQ.
	(ia64_init_builtins): Initialize __builtin_infq,
	__builtin_fabsq and __builtin_copysignq if not HPUX.
	(ia64_expand_builtin): Handle IA64_BUILTIN_COPYSIGNQ,
	IA64_BUILTIN_FABSQ and IA64_BUILTIN_INFQ.

	* config/ia64/lib1funcs.asm (__divtf3): Define only if
	SHARED is defined.
	(__fixtfti): Likewise.
	(__fixunstfti): Likewise.
	(__floattitf): Likewise.

	* config/ia64/libgcc-glibc.ver: New.
	* config/ia64/t-fprules-softfp: Likewise.
	* config/ia64/sfp-machine.h: Likewise.

	* config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): New.
	(LIBGCC2_TF_CEXT): Likewise.
	(TF_SIZE): Likewise.
	(TARGET_INIT_LIBFUNCS): Likewise.

	* config/ia64/t-glibc: Add $(srcdir)/config/ia64/libgcc-glibc.ver
	to SHLIB_MAPFILES.

libgcc/

2009-02-12  H.J. Lu  <hongjiu.lu@intel.com>

	* config.host: Add ia64/t-fprules-softfp ia64/t-softfp-compat
	to tmake_file for ia64*-*-linux*.

	* Makefile.in (gen-hide-list): Ignore .*_compat and .*@.*.

	* config/ia64/__divxf3.asm: New.
	* config/ia64/_fixtfdi.asm: Likewise.
	* config/ia64/_fixunstfdi.asm: Likewise.
	* config/ia64/_floatditf.asm: Likewise.
	* config/ia64/t-fprules-softfp: Likewise.
	* config/ia64/t-softfp-compat: Likewise.
	* config/ia64/tf-signs.c: Likewise.

From-SVN: r144130
2009-02-12 08:30:53 -08:00
Uros Bizjak 974920dc24 re PR middle-end/37908 (atomic NAND op generate wrong code; __sync_nand_and_fetch, __sync_fetch_and_nand)
PR middle-end/37908
	* config/ia64/ia64.c (ia64_expand_atomic_ope): Properly handle NAND
	case by calculating ~(new_reg & val) instead of (~new_reg & val).
	* config/ia64/sync.md (sync_nand<mode>): Change insn RTX
	to (not:IMODE (and:IMODE (...))).
	(sync_old_nand<mode>): Ditto.
	(sync_new_nand<mode>): Ditto.

From-SVN: r142082
2008-11-21 08:28:27 +01:00
Andrey Belevantsev 388092d5b4 target.h (struct gcc_target): Update prototypes of needs_block_p and gen_spec_check.
2008-10-14  Andrey Belevantsev  <abel@ispras.ru>
	    Dmitry Melnik  <dm@ispras.ru>
	    Dmitry Zhurikhin  <zhur@ispras.ru>
	    Alexander Monakov  <amonakov@ispras.ru>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>

	* target.h (struct gcc_target): Update prototypes of needs_block_p
	and gen_spec_check.
	* haifa-sched.c (create_check_block_twin): Update calls to the above.
	* sel-sched.c (create_speculation_check): Likewise.
	* doc/tm.texi: Provide documentation for new target hooks.
		
	* config/ia64/ia64.c: Include sel-sched.h.  Rewrite speculation hooks.
	(ia64_gen_spec_insn): Removed.
	(get_spec_check_gen_function, insn_can_be_in_speculative_p,
	ia64_gen_spec_check): New static functions.
	(ia64_alloc_sched_context, ia64_init_sched_context, 
	ia64_set_sched_context, ia64_clear_sched_context, 
	ia64_free_sched_context, ia64_get_insn_spec_ds, 
	ia64_get_insn_checked_ds, ia64_skip_rtx_p): Declare functions.
	(ia64_needs_block_p): Change prototype.
	(ia64_gen_check): Rename to ia64_gen_spec_check.
	(ia64_adjust_cost): Rename to ia64_adjust_cost_2.  Add new parameter 
	into declaration, add special memory dependencies handling.
	(TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT,
	TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
	TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_SPEC_DS,
	TARGET_SCHED_GET_INSN_CHECKED_DS, TARGET_SCHED_SKIP_RTX_P): 
	Define new target hooks.
	(TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK.
	(ia64_optimization_options): Turn on selective scheduling with -O3, 
	disable -fauto-inc-dec. Set mflag_sched_control_spec to true by default
	with selective scheduling.
	(ia64_override_options): Initialize align_loops and align_functions 
	to 32 and 64, respectively.  Set global selective scheduling flags 
	according to target-dependent flags.
	(rtx_needs_barrier): Support UNSPEC_LDS_A.
	(group_barrier_needed): Use new mstop-bit-before-check flag. 
	Add heuristic.
	(dfa_state_size): Make global.
	(spec_check_no, max_uid): Remove.
        (mem_ops_in_group, current_cycle): New variables.
	(ia64_sched_init): Disable checks for !SCHED_GROUP_P after reload.
        Initialize new variables.
        (is_load_p, record_memory_reference): New functions.
        (ia64_dfa_sched_reorder): Lower priority of loads when limit is
        reached.
	(ia64_variable_issue): Change use of current_sched_info to 
	sched_deps_info.  Update comment.  Note if a load or a store is issued.
        (ia64_first_cycle_multipass_dfa_lookahead_guard_spec): Require a cycle
        advance if maximal number of loads or stores was issued on current 
        cycle.
	(scheduled_good_insn): New static helper function.
        (ia64_dfa_new_cycle): Assert that last_scheduled_insn is set when 
        a group barrier is needed.  Fix vertical spacing.  Guard the code
        doing state transition with last_scheduled_insn check.                
        Mark that a stop bit should be before current insn if there was a 
        cycle advance.  Update current_cycle and mem_ops_in_group.
	(ia64_h_i_d_extended): Change use of current_sched_info to
        sched_deps_info. Reallocate stops_p by larger chunks.
	(struct _ia64_sched_context): New structure.
	(ia64_sched_context_t): New typedef.
	(ia64_alloc_sched_context, ia64_init_sched_context, 
	ia64_set_sched_context, ia64_clear_sched_context,
	ia64_free_sched_context): New static functions.
	(gen_func_t): New typedef.
	(get_spec_load_gen_function): New function.
	(SPEC_GEN_EXTEND_OFFSET): Declare.	
	(ia64_set_sched_flags): Check common_sched_info instead of *flags.
	(get_mode_no_for_insn): Change the condition that prevents use of 
	special hardware registers so it can now handle pseudos.
	(get_spec_unspec_code): New function.
	(ia64_skip_rtx_p, get_insn_spec_code, ia64_get_insn_spec_ds,
	ia64_get_insn_checked_ds, ia64_gen_spec_load): New static functions.
	(ia64_speculate_insn, ia64_needs_block_p): Support branchy checks
	during selective scheduling.
	(ia64_speculate_insn): Use ds_get_speculation_types when 
	determining whether we need to change the pattern.
	(SPEC_GEN_LD_MAP, SPEC_GEN_CHECK_OFFSET): Declare.
	(ia64_spec_check_src_p): Support new speculation/check codes.
	(struct bundle_state): New field.
	(issue_nops_and_insn): Initialize it.
	(insert_bundle_state): Minimize mid-bundle stop bits.
	(important_for_bundling_p): New function.
	(get_next_important_insn): Use important_for_bundling_p.
	(bundling): When shifting TImode from unimportant insns, ignore 
	also group barriers.  Assert that best state is found before 
	the backward bundling pass.  Print number of mid-bundle stop bits.  
	Minimize mid-bundle stop bits.  Check correct calculation of 
	mid-bundle stop bits.
	(ia64_sched_finish, final_emit_insn_group_barriers): Fix formatting.
	(final_emit_insn_group_barriers): Emit stop bits before insns starting
	a new cycle.
	(sel2_run): New variable.
	(ia64_reorg): When flag_selective_scheduling2 is set, run the selective 
	scheduling pass instead of schedule_ebbs.  
	
	* config/ia64/ia64.md (speculable1, speculable2): New attributes.
	(UNSPEC_LDS_A): New UNSPEC.
	(movqi_internal, movhi_internal, movsi_internal, movdi_internal, 
	movti_internal, movsf_internal, movdf_internal, 
	movxf_internal): Make visible.  Add speculable* attributes.
	(output_c_nc): New mode attribute.
	(mov<mode>_speculative_a, zero_extend<mode>di2_speculative_a,
	mov<mode>_nc, zero_extend<mode>di2_nc, 
	advanced_load_check_nc_<mode>): New insns.
	(zero_extend*): Add speculable* attributes.

	* config/ia64/ia64.opt (msched_fp_mem_deps_zero_cost): New option.
	(msched-stop-bits-after-every-cycle): Likewise.
	(msched-max-memory-insns,
        msched-max-memory-insns-hard-limit): Likewise.
	(msched-spec-verbose): Remove.
	(msched-prefer-non-data-spec-insns,
        msched-prefer-non-control-spec-insns, msched-count-spec-in-critical-path,
	msel-sched-dont-check-control-spec): Use Target 
        Report Var instead of Common Report Var.

	* config/ia64/itanium2.md: Remove incorrect bypass.
	
	* config/ia64/t-ia64 (ia64.o): Add dependency on sel-sched.h.

Co-Authored-By: Alexander Monakov <amonakov@ispras.ru>
Co-Authored-By: Dmitry Melnik <dm@ispras.ru>
Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru>
Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r141108
2008-10-14 16:52:19 +04:00
H.J. Lu faae4ae73f re PR target/37394 (Segfault in ia64_variable_issue with -O -fschedule-insns2)
gcc/

2008-09-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37394
	* config/ia64/ia64.c (ia64_optimization_options): Move
	checking and setting flag_schedule_insns_after_reload and
	ia64_flag_schedule_insns2 back to ...
	(ia64_override_options): Here.

gcc/testsuite/

2008-09-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37394
	* g++.dg/other/pr37394.C: New.

From-SVN: r140475
2008-09-18 13:27:36 -07:00
Andrey Belevantsev 7ab5df4871 Fixed typo in date of the 2008-09-01 MOVE_RATIO commit.
2008-09-02  Alexander Monakov  <amonakov@ispras.ru>

        Fixed typo in date of the 2008-09-01 MOVE_RATIO commit.

        * config/ia64/ia64.opt (msched-ar-data-spec): Default to 1.
        * config/ia64/ia64.c (ia64_set_sched_flags): Always initialize
        spec_info->mask.

From-SVN: r139889
2008-09-02 17:02:44 +04:00
Andreas Schwab 8a88c2763a * config/ia64/ia64.c (TARGET_ADDRESS_COST): Update.
From-SVN: r139861
2008-09-01 12:35:24 +00:00
Andrey Belevantsev e855c69d16 sel-sched.h, [...]: New files.
2008-08-31  Andrey Belevantsev  <abel@ispras.ru>
        Dmitry Melnik  <dm@ispras.ru>
        Dmitry Zhurikhin  <zhur@ispras.ru>
        Alexander Monakov  <amonakov@ispras.ru>
        Maxim Kuvyrkov  <maxim@codesourcery.com>

	* sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c,
	sel-sched-dump.c, sel-sched-ir.c: New files.
	* Makefile.in (OBJS-common): Add selective scheduling object
	files.
	(sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries.
	(SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries.
	(sched-vis.o): Add dependency on $(INSN_ATTR_H).
	* cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes.
	* cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions.
	(make_forwarder_block): Update loop latch if we have redirected
	the loop latch edge.
	* cfgloop.c (get_loop_body_in_custom_order): New function.
	* cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field.
	(CP_FALLTHRU_PREHEADERS): Likewise.
	(get_loop_body_in_custom_order): Declare.
	* cfgloopmanip.c (has_preds_from_loop): New.
	(create_preheader): Honor CP_FALLTHRU_PREHEADERS.
	Assert that the preheader edge will be fall thru when it is set.
	* common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining,
	fsel-sched-pipelining-outer-loops, fsel-sched-renaming,
	fsel-sched-substitution, fselective-scheduling): New flags.
    	* cse.c (hash_rtx_cb): New.
	(hash_rtx): Use it.
	* dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt,
	sel_sched_insn_cnt): New counters. 
	* final.c (compute_alignments): Export.  Free dominance info after loop_optimizer_finalize.
	* genattr.c (main): Output maximal_insn_latency prototype.
	* genautomata.c (output_default_latencies): New. Factor its code from ...
	(output_internal_insn_latency_func): ... here.
	(output_internal_maximal_insn_latency_func): New.
	(output_maximal_insn_latency_func): New.
	* hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally.
	(struct hard_reg_set_iterator): New.
	(hard_reg_set_iter_init, hard_reg_set_iter_set,
	hard_reg_set_iter_next): New functions.
	(EXECUTE_IF_SET_IN_HARD_REG_SET): New macro.
	* lists.c (remove_free_INSN_LIST_node,
	remove_free_EXPR_LIST_node): New functions.
	* loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS,
	set CP_FALLTHRU_PREHEADERS when calling create_preheaders.
	(loop_optimizer_finalize): Do not verify flow info after reload.
	* recog.c (validate_replace_rtx_1): New parameter simplify.
	Default it to true.  Update all uses.  Factor out simplifying
	code to ...
	(simplify_while_replacing): ... this new function.
	(validate_replace_rtx_part,
	validate_replace_rtx_part_nosimplify): New.
	* recog.h (validate_replace_rtx_part,
	validate_replace_rtx_part_nosimplify): Declare.
	* rtl.c (rtx_equal_p_cb): New.
	(rtx_equal_p): Use it.
	* rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare.
	(remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node,
	debug_bb_n_slim, debug_bb_slim,    print_rtl_slim): Likewise.
	* vecprim.h: Add a vector type for unsigned int. 
	* haifa-sched.c: Include vecprim.h and cfgloop.h.
	(issue_rate, sched_verbose_param, note_list, dfa_state_size,
	ready_try, cycle_issued_insns, spec_info): Make global.
	(readyp): Initialize.
	(dfa_lookahead): New global variable.
	(old_max_uid, old_last_basic_block): Remove.
	(h_i_d): Make it a vector.
	(INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work
	through HID macro.
	(after_recovery, adding_bb_to_current_region_p):
	New variables to handle correct insertion of the recovery code.
	(struct ready_list): Move declaration to sched-int.h.
	(rgn_n_insns): Removed.
	(rtx_vec_t): Move to sched-int.h.
	(find_insn_reg_weight): Remove.
	(find_insn_reg_weight1): Rename to find_insn_reg_weight.
	(haifa_init_h_i_d, haifa_finish_h_i_d):
	New functions to initialize / finalize haifa instruction data.
	(extend_h_i_d, init_h_i_d): Rewrite.
	(unlink_other_notes): Move logic to add_to_note_list.  Handle
	selective scheduler.
	(ready_lastpos, ready_element, ready_sort, reemit_notes,
	find_fallthru_edge): Make global, remove static prototypes.
	(max_issue): Make global.  Add privileged_n and state parameters.  Use
	them.  
	(extend_global, extend_all): Removed.
	(init_before_recovery): Add new param.  Fix the handling of the case
	when we insert a recovery code before the EXIT which has a predecessor
	with a fallthrough edge to it.
	(create_recovery_block): Make global.  Rename to
	sched_create_recovery_block.  Update.
	(change_pattern): Rename to sched_change_pattern.  Make global.
	(speculate_insn): Rename to sched_speculate_insn.  Make global.
	Split haifa-specific functionality into ...
	(haifa_change_pattern): New static function.
	(sched_extend_bb): New static function.
	(sched_init_bbs): New function.
	(current_sched_info): Change type to struct haifa_sched_info.
	(insn_cost): Adjust for selective scheduling.
	(dep_cost_1): New function.  Move logic from ...
	(dep_cost): ... here.
	(dep_cost): Use dep_cost_1.
	(contributes_to_priority_p): Use sched_deps_info instead of
	current_sched_info.
	(priority): Adjust to work with selective scheduling.  Process the
	corner case when all dependencies don't contribute to priority.
	(rank_for_schedule): Use ds_weak instead of dep_weak.
	(advance_state): New function.  Move logic from ...
	(advance_one_cycle): ... here.
	(add_to_note_list, concat_note_lists): New functions.
	(rm_other_notes): Make static.  Adjust for selective scheduling.
	(remove_notes, restore_other_notes): New functions.
	(move_insn): Add two arguments.  Update assert.  Don't call
	reemit_notes.
	(choose_ready): Remove lookahead variable, use dfa_lookahead.
	Remove more_issue, max_points.  Move the code to initialize
	max_lookahead_tries to max_issue.
	(schedule_block): Remove rgn_n_insns1 parameter.  Don't allocate
	ready.  Adjust use of move_insn.  Call restore_other_notes.
	(luid): Remove.
	(sched_init, sched_finish): Move Haifa-specific initialization/
	finalization to ...
	(haifa_sched_init, haifa_sched_finish): ... respectively.
	New functions.
	(setup_sched_dump): New function.
	(haifa_init_only_bb): New static function.
	(haifa_speculate_insn): New static function.
	(try_ready): Use haifa_* instead of speculate_insn and
	change_pattern.
	(extend_ready, extend_all): Remove.
	(sched_extend_ready_list, sched_finish_ready_list): New functions.
	(create_check_block_twin, add_to_speculative_block): Use
	haifa_insns_init instead of extend_global.  Update to use new
	initialization functions.  Change parameter.  Factor out code from
	create_check_block_twin to ...
	(sched_create_recovery_edges) ... this new function.
	(add_block): Remove.
	(sched_scan_info): New.
	(extend_bb): Use sched_scan_info.
	(init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New
	static functions for walking through scheduling region.
	(sched_luids): New vector variable to replace uid_to_luid.
	(luids_extend_insn): New function.
	(sched_max_luid): New variable.
	(luids_init_insn): New function.
	(sched_init_luids, sched_finish_luids): New functions.
	(insn_luid): New debug function.
	(sched_extend_target): New function.
	(haifa_init_insn): New static function.
	(sched_init_only_bb): New hook.
	(sched_split_block): New hook.
	(sched_split_block_1): New function.
	(sched_create_empty_bb): New hook.
	(sched_create_empty_bb_1): New function.	
	(common_sched_info, ready): New global variables.
	(current_sched_info_var): Remove.
	(move_block_after_check): Use common_sched_info.		
	(haifa_luid_for_non_insn): New static function.	
	(init_before_recovery): Use haifa_init_only_bb instead of
	add_block.
	(increase_insn_priority): New.
	* modulo-sched.c: (issue_rate): Remove static declaration.
	(sms_sched_info): Change type to haifa_sched_info.
	(sms_sched_deps_info, sms_common_sched_info): New variables.
	(setup_sched_infos): New.
	(sms_schedule): Initialize them.  Call haifa_sched_init/finish.
	Do not call regstat_free_calls_crossed.
	(sms_print_insn): Use const_rtx.
	* params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS,
	PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD,
	PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME,
	PARAM_SCHED_MEM_TRUE_DEP_COST): New.
	* sched-deps.c (sched_deps_info): New.  Update all relevant uses of
	current_sched_info to use it.
	(enum reg_pending_barrier_mode): Move to sched-int.h.
	(h_d_i_d): New variable. Initialize to NULL.
	({true, output, anti, spec, forward}_dependency_cache): Initialize
	to NULL.
	(estimate_dep_weak): Remove static declaration.
	(sched_has_condition_p): New function.  Adjust users of
	sched_get_condition to use it instead.
	(conditions_mutex_p): Add arguments indicating which conditions are
	reversed.  Use them.
	(sched_get_condition_with_rev): Rename from sched_get_condition.  Add
	argument to indicate whether returned condition is reversed.  Do not
	generate new rtx when condition should be reversed; indicate it by
	setting new argument instead.
	(add_dependence_list_and_free): Add deps parameter.
	Update all users.  Do not free dependence list when
	deps context is readonly.
	(add_insn_mem_dependence, flush_pending_lists): Adjust for readonly
	contexts.
	(remove_from_dependence_list, remove_from_both_dependence_lists): New.
	(remove_from_deps): New. Use the above functions.	
	(cur_insn, can_start_lhs_rhs_p): New static variables.
	(add_or_update_back_dep_1): Initialize present_dep_type.
	(haifa_start_insn, haifa_finish_insn, haifa_note_reg_set,
	haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep,
	haifa_note_dep): New functions implementing dependence hooks for
	the Haifa scheduler.
	(note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep,
	note_dep): New functions.
	(ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New
	functions.
	(init_deps): Initialize last_reg_pending_barrier and deps->readonly.
	(free_deps): Initialize deps->reg_last.
	(sched_analyze_reg, sched_analyze_1, sched_analyze_2,
	sched_analyze_insn): Update to use dependency hooks infrastructure
	and readonly contexts.
	(deps_analyze_insn): New function.  Move part of logic from ...
	(sched_analyze): ... here.  Also move some logic to ...
	(deps_start_bb): ... here.  New function.
	(add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with
	sel_sched_p.
	(sched_deps_init): New function.  Move code from ...
	(init_dependency_caches): ... here.  Remove.
	(init_deps_data_vector): New.
	(sched_deps_finish): New function.  Move code from ...
	(free_dependency_caches): ... here.  Remove.
	(init_deps_global, finish_deps_global): Adjust for use with
	selective scheduling.
	(get_dep_weak): Move logic to ...
	(get_dep_weak_1): New function.
	(ds_merge): Move logic to ...
	(ds_merge_1): New static function.
	(ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions.
	(ds_get_max_dep_weak): New function.
	* sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns.
	(n_insns): Rename to rgn_n_insns.
	(debug_ebb_dependencies): New function.
	(init_ready_list): Use it.
	(begin_schedule_ready): Use sched_init_only_bb.
	(ebb_print_insn): Indicate when an insn starts a new cycle.
	(contributes_to_priority, compute_jump_reg_dependencies,
	add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names.
	(add_block1): Remove to ebb_add_block.
	(ebb_sched_deps_info, ebb_common_sched_info): New variables.
	(schedule_ebb): Initialize them.  Use remove_notes instead of
	rm_other_notes.  Use haifa_local_init/finish.
	(schedule_ebbs): Use haifa_sched_init/finish.
	* sched-int.h: Include vecprim.h, remove rtl.h.
	(struct ready_list): Delete declaration.
	(sched_verbose_param, enum sched_pass_id_t,
	bb_vec_t, insn_vec_t, rtx_vec_t): New.
	(struct sched_scan_info_def): New structure.
	(sched_scan_info, sched_scan, sched_init_bbs,
	sched_init_luids, sched_finish_luids, sched_extend_target,
	haifa_init_h_i_d, haifa_finish_h_i_d): Declare.
	(struct common_sched_info_def): New.
	(common_sched_info, haifa_common_sched_info,
	sched_emulate_haifa_p): Declare.
	(sel_sched_p): New.
	(sched_luids): Declare.
	(INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare.
	(sched_max_luid, insn_luid): Declare.
	(note_list, remove_notes, restore_other_notes, bb_note): Declare.
	(sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes,
	print_insn, print_pattern, print_value, haifa_classify_insn,
	sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state,
	setup_sched_dump, sched_init, sched_finish,
	sel_insn_is_speculation_check): Export.
	(struct ready_list): Move from haifa-sched.c.
	(ready_try, ready, max_issue): Export.
	(ebb_compute_jump_reg_dependencies, find_fallthru_edge,
	sched_init_only_bb, sched_split_block, sched_split_block_1,
	sched_create_empty_bb, sched_create_empty_bb_1,
	sched_create_recovery_block, sched_create_recovery_edges): Export.
	(enum reg_pending_barrier_mode): Export.
	(struct deps): New fields `last_reg_pending_barrier' and `readonly'.
	(deps_t): New.
	(struct sched_info): Rename to haifa_sched_info.  Use const_rtx for
	print_insn field.  Move add_block and fix_recovery_cfg to
	common_sched_info_def.  Move compute_jump_reg_dependencies, use_cselib  ...
	(struct sched_deps_info_def): ... this new structure.
	(sched_deps_info): Declare.
	(struct spec_info_def): Remove weakness_cutoff, add
	data_weakness_cutoff and control_weakness_cutoff.
	(spec_info): Declare.
	(struct _haifa_deps_insn_data): Split from haifa_insn_data.  Add
	dep_count field.
	(struct haifa_insn_data): Rename to struct _haifa_insn_data.
	(haifa_insn_data_def, haifa_insn_data_t): New typedefs.
	(current_sched_info): Change type to struct haifa_sched_info.
	(haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs.
	(h_d_i_d): New variable.
	(HDID): New accessor macro.
	(h_i_d): Change type to VEC (haifa_insn_data_def, heap) *.
	(HID): New accessor macro.  Rewrite h_i_d accessor macros through HID
	and HDID.
	(IS_SPECULATION_CHECK_P): Update for selective scheduler.
	(enum SCHED_FLAGS): Update for selective scheduler.
	(enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL.
	(init_dependency_caches, free_dependency_caches): Delete declarations.
	(deps_analyze_insn, remove_from_deps, get_dep_weak_1,
	estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak,
	ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init,
	sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use,
	haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb,
	ds_to_dt): Export.
	(rm_other_notes): Delete declaration.
	(schedule_block): Remove one argument.
	(cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort,
	ready_element, ready_lastpos, sched_extend_ready_list,
	sched_finish_ready_list, sched_change_pattern, sched_speculate_insn,
	concat_note_lists): Export.
	(struct region): Move from sched-rgn.h.
	(nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
	RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
	BLOCK_TO_BB, CONTAINING_RGN): Export.
	(ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise.
	(current_nr_blocks, current_blocks, target_bb): Likewise.
	(dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init,
	sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies,
	sched_rgn_local_init, extend_regions,
	rgn_make_new_region_out_of_new_block, compute_priorities,
	debug_rgn_dependencies, free_rgn_deps, contributes_to_priority,
	extend_rgns, deps_join rgn_setup_common_sched_info,
	rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot,
	dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export.
	(get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, 
	increase_insn_priority): Likewise.
	* sched-rgn.c: Include sel-sched.h.
	(ref_counts): New static variable.  Use it ...
	(INSN_REF_COUNT): ... here.  Rewrite and move closer to uses.
	(FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro.
	(sched_is_disabled_for_current_region_p): Delete static declaration.
	(struct region): Move to sched-int.h.
	(nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
	ebb_head): Define and initialize.
	(RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
	BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions,
	BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to
	sched-int.h.
	(find_single_block_region): Add new argument to indicate that EBB
	regions should be constructed.
	(debug_live): Delete declaration.
	(current_nr_blocks, current_blocks, target_bb): Remove static qualifiers.
	(compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete
	declaration.
	(init_regions): Delete declaration.
	(debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot,
	rgn_estimate_number_of_insns): New.
	(too_large): Use estimate_number_of_insns.
	(haifa_find_rgns): New. Move the code from ...
	(find_rgns): ... here.  Call either sel_find_rgns or haifa_find_rgns.
	(free_trg_info): New.
	(compute_trg_info): Allocate candidate tables here instead of ...
	(init_ready_list): ... here.
	(rgn_print_insn): Use const_rtx.
	(contributes_to_priority, extend_regions): Delete static declaration.
	(add_remove_insn, fix_recovery_cfg): Add rgn_ to function names.
	(add_block1): Rename to rgn_add_block.
	(debug_rgn_dependencies): Delete static qualifier.
	(new_ready): Use sched_deps_info.  Simplify.
	(rgn_common_sched_info, rgn_const_sched_deps_info,
	rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New.
	(region_sched_info): Rename to rgn_const_sched_info.
	(deps_join): New, extracted from ...
	(propagate_deps): ... here.
	(compute_block_dependences, debug_dependencies): Update for selective
	scheduling.
	(free_rgn_deps, compute_priorities): New functions.
	(sched_rgn_init, sched_rgn_finish, rgn_setup_region,
	sched_rgn_compute_dependencies): New functions.
	(schedule_region): Use them.
	(sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish,
	rgn_setup_common_sched_info, rgn_setup_sched_infos):
	New functions.
	(schedule_insns): Call new functions that were split out.
	(rgn_make_new_region_out_of_new_block): New.
	(get_rgn_sched_max_insns_priority): New.
	(rest_of_handle_sched, rest_of_handle_sched2): Call selective
	scheduling when appropriate.
	* sched-vis.c: Include insn-attr.h.
	(print_value, print_pattern): Make global.
	(print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions.
	* target-def.h (TARGET_SCHED_ADJUST_COST_2,
	TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT,
	TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
	TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS,
	TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target
	hooks.  Initialize them to 0.
	(TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK.
	* target.h (struct gcc_target): Add them.  Rename gen_check field to
	gen_spec_check.
	* flags.h (sel_sched_switch_set): Declare.
	* opts.c (sel_sched_switch_set): New variable.
	(decode_options): Unset flag_sel_sched_pipelining_outer_loops if
	pipelining is disabled from command line.
	(common_handle_option): Record whether selective scheduling is
	requested from command line.
	* doc/invoke.texi: Document new flags and parameters.
	* doc/tm.texi: Document new target hooks.
	* config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check.
	(dfa_state_size): Do not declare locally.
	* config/ia64/ia64.opt (msched-ar-data-spec): Default to 0.
	* config/rs6000/rs6000.c (rs6000_init_sched_context,
	rs6000_alloc_sched_context, rs6000_set_sched_context,
	rs6000_free_sched_context): New functions.
	(struct _rs6000_sched_context): New.
	(rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective
	scheduling.
	(rs6000_sched_finish): Do not run for selective scheduling. 

Co-Authored-By: Alexander Monakov <amonakov@ispras.ru>
Co-Authored-By: Dmitry Melnik <dm@ispras.ru>
Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru>
Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r139854
2008-09-01 12:57:00 +04:00
Jan Hubicka f40751dd34 fwprop.c (should_replace_address): Add speed attribute.
* fwprop.c (should_replace_address): Add speed attribute.
	(PR_OPTIMIZE_FOR_SPEED): New flag.
	(propagate_rtx_1): Use it.
	(propagate_rtx): Set it.
	(try_fwprop_subst): Update call of rtx_costs.
	(forward_propagate_and_simplify): LIkewise.
	* hooks.c (hook_int_rtx_bool_0): New
	(hook_bool_rtx_int_int_intp_false): Replace by ...
	(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
	* hooks.h (hook_int_rtx_bool_0): New
	(hook_bool_rtx_int_int_intp_false): Replace by ...
	(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
	* optabs.c (avoid_expensive_constant): UPdate call of rtx_cost.
	(prepare_cmp_insn): UPdate call of rtx_cost.
	* postreload.c (reload_cse_simplify_set): Update call of rtx_cost.
	(reload_cse_simplify_operands): Update call of rtx_cost.
	(reload_cse_move2add): call of rtx_cost.
	* target.h (struct gcc_target): Update rtx_costs and address_costs.
	* rtlanal.c (rtx_cost): Add speed argument.
	(address_cost): Add speed argument
	(default_address_cost): Likewise.
	(insn_rtx_cost): Likewise.
	* cfgloopanal.c (seq_cost): Add speed argument.
	(target_reg_cost, target_spill_cost): Turn to array.
	(init_set_costs): Update for speed.
	(estimate_reg_pressure_cost): Add speed argument.
	* auto-inc-dec.c (attempt_change): Update call of rtx_cost.
	* dojump.c (prefer_and_bit_test): UPdate call of rtx_cost.
	* tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed.
	(seq_cost): Add speed argument.
	(computation_cost): Add speed arugment.
	(add_cost, multiply_by_const, get_address_cost): add speed argument.
	(force_expr_to_var_cost): Update for profile info.
	(force_var_cost): Likewise.
	(split_address_cost): Likewise.
	(ptr_difference_cost): Likewise.
	(difference_cost): Likewise.
	(get_computation_cost_at): Likewise.
	(determine_iv_cost): Likewise.
	(ivopts_global_cost_for_size): Likewise.
	(rewrite_use_address): Likewise.
	(tree_ssa_iv_optimize_loop): Initialize speed field.
	* cse.c (optimize_this_for_speed_p): New static var.
	(notreg_cost): Update call of rtx_cost.
	(cse_extended_basic_block): set optimize_this_for_speed_p.
	* ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost.
	(noce_try_cmove_arith): Likewise.
	(noce_try_sign_mask): LIkewise.
	* expr.c (compress_float_constant): Update rtx_cost calls.
	* tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument.
	(addr_to_parts): Likewise.
	(create_mem_ref): Likewise.
	* dse.c (find_shift_sequence): Add speed argument.
	(replace_read): Update call.
	* calls.c (precompute_register_parameters): Update call of rtx_cost.
	* expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost,
	* neg_cost, shift_cost, shiftadd_cost,
	shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost,
	mul_highpart_cost): Increase dimension.
	(init_expmed): Initialize for both size and speed.
	(expand_shift): Use profile.
	(synth_mult): Use profile.
	(choose_mult_variant): Use profile.
	(expand_mult): Use profile.
	(expand_mult_highpart_optab): Use profile.
	(expand_mult_highpart): Use profile.
	(expand_smod_pow2): Use profile.
	(expand_divmod): Use profile.
	* simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost.
	* loop-invariant.c (create_new_invariant): Use profile.
	(gain_for_invariant): Add speed parameter.
	(best_gain_for_invariant): Likewise.
	(find_invariants_to_move): Likewise.
	(move_single_loop_invariants): Set it.
	* target-def.h (TARGET_RTX_COSTS): Use hook.
	* rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe.
	(optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
	* output.h (default_address_cost): Update prototype.
	* combine.c (optimize_this_for_speed_p): New static var.
	(combine_validate_cost): Update call of rtx_cost.
	(combine_instructions): Set optimize_this_for_speed_p.
	(expand_compound_operation): Update call of rtx_cost.
	(make_extraction):Update call of rtx_cost.
	(force_to_mode):Update call of rtx_cost.
	(distribute_and_simplify_rtx):Update call of rtx_cost.
	* cfgloop.h (target_reg_cost, target_spill_cost): Turn to array.
	(estimate_reg_pressure_cost): Update prototype.
	* tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype.
	* basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p):
	Remove.
	* config/alpha/alpha.c (alpha_rtx_costs): Update.
	(alpha_rtx_costs): Update.
	* config/frv/frv.c (frv_rtx_costs): Update.
	* config/s390/s390.c (s390_rtx_costs): Update.
	* config/m32c/m32c.c (m32c_memory_move_cost): Update.
	(m32c_rtx_costs): Update.
	* config/spu/spu.c (TARGET_ADDRESS_COST): Upate.
	(spu_rtx_costs): Update.
	* config/sparc/sparc.c (sparc_rtx_costs): Update.
	* config/m32r/m32r.c (m32r_rtx_costs): Update.
	* config/i386/i386.c (:ix86_address_cost): Update.
	(ix86_rtx_costs): Update.
	* config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update.
	* config/pdp11/pdp11.c (pdp11_rtx_costs): Update.
	* config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update.
	* config/crx/crx.c (crx_address_cost): Update.
	* config/xtensa/xtensa.c (xtensa_rtx_costs): Update.
	* config/stormy16/stormy16.c
	(xstormy16_address_cost, xstormy16_rtx_costs): Update.
	* config/m68hc11/m68hc11.c
	(m68hc11_address_cost, m68hc11_rtx_costs): Update.
	* config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update.
	* config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update.
	* config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update
	* config/ia64/ia64.c (ia64_rtx_costs): Update.
	* config/m68k/m68k.c (m68k_rtx_costs): Update.
	* config/rs6000/rs6000.c (rs6000_rtx_costs): Update.
	* config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update.
	* config/mcore/mcore.c (TARGET_ADDRESS_COST): Update.
	(mcore_rtx_costs): update.
	* config/score/score3.c (score3_rtx_costs): Update.
	* config/score/score7.c (score7_rtx_costs): Update.
	* config/score/score3.h (score3_rtx_costs):Update.
	* config/score/score7.h (score7_rtx_costs): Update.
	* config/score/score.c (score_rtx_costs): Update.
	* config/arm/arm.c (arm_address_cost): Update.
	(arm_rtx_costs_1): Update.
	(arm_rtx_costs_1): Update.
	(arm_size_rtx_costs): Update.
	(arm_size_rtx_costs): Update.
	(arm_size_rtx_costs): Update.
	(arm_xscale_rtx_costs): Update.
	(arm_thumb_address_cost): Update.
	* config/pa/pa.c (hppa_address_cost): Update.
	* config/mips/mips.c (mips_rtx_costs): Update.
	* config/vax/vax.c (vax_address_cost): Update.
	* config/h8300/h8300.c (h8300_shift_costs): Update.
	(h8300_rtx_costs): Update.
	* config/v850/v850.c (TARGET_ADDRESS_COST): Update.
	(v850_rtx_costs): Update.
	* config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update.
	* config/bfin/bfin.c
	(bfin_address_cost): Update.
	(bfin_rtx_costs): Update.
	* stmt.c (lshift_cheap_p): Update.

From-SVN: r139821
2008-08-31 09:44:25 +00:00
Michael Meissner 5779e7133d Change attribute((option(...))) to attribute((target(...))); Do not allocate tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop}
From-SVN: r139812
2008-08-30 23:50:40 +00:00
Kaveh R. Ghazi 0a2aaaccca alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords.
* config/alpha/alpha.c (alpha_preferred_reload_class,
	alpha_secondary_reload, alpha_emit_set_const_1, function_value,
	alpha_output_mi_thunk_osf): Avoid C++ keywords.
	* config/arm/arm.c (output_move_vfp, output_move_neon): Likewise.
	* config/arm/arm.md: Likewise.
	* config/avr/avr-protos.h (preferred_reload_class,
	test_hard_reg_class, avr_simplify_comparison_p,
	out_shift_with_cnt, class_max_nregs): Likewise.
	* config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p,
	output_movqi, output_movhi, output_movsisf, out_shift_with_cnt,
	preferred_reload_class, test_hard_reg_class): Likewise.
	* config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok,
	bfin_memory_move_cost, bfin_secondary_reload,
	bfin_output_mi_thunk): Likewise.
	* config/crx/crx.c (crx_secondary_reload_class,
	crx_memory_move_cost): Likewise.
	* config/frv/frv-protos.h (frv_secondary_reload_class,
	frv_class_likely_spilled_p, frv_class_max_nregs): Likewise.
	* config/frv/frv.c (frv_override_options, frv_alloc_temp_reg,
	frv_secondary_reload_class, frv_class_likely_spilled_p,
	frv_class_max_nregs): Likewise.
	* config/h8300/h8300.c (h8300_classify_operand,
	h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count):
	Likewise.
	* config/i386/winnt.c (i386_pe_declare_function_type): Likewise.
	* config/ia64/ia64.c (ia64_preferred_reload_class,
	ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise.
	* config/iq2000/iq2000.c (gen_int_relational): Likewise.
	* config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare):
	Likewise.
	* config/m68hc11/m68hc11.c (preferred_reload_class,
	m68hc11_memory_move_cost): Likewise.
	* config/mcore/mcore.c (mcore_secondary_reload_class,
	mcore_reload_class): Likewise.
	* config/mips/mips.c (mips_hard_regno_mode_ok_p,
	mips_class_max_nregs, mips_cannot_change_mode_class,
	mips_preferred_reload_class, mips_secondary_reload_class,
	mips_output_mi_thunk): Likewise.
	* config/mmix/mmix.c (mmix_preferred_reload_class,
	mmix_preferred_output_reload_class, mmix_secondary_reload_class):
	Likewise.
	* config/mn10300/mn10300.c (mn10300_secondary_reload_class):
	Likewise.
	* config/pa/pa.c (pa_secondary_reload, pa_combine_instructions,
	pa_can_combine_p, pa_cannot_change_mode_class): Likewise.
	* config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
	* config/rs6000/rs6000.c (paired_expand_vector_init,
	rs6000_secondary_reload_class, rs6000_output_mi_thunk,
	compare_section_name, rs6000_memory_move_cost): Likewise.
	* config/s390/s390.c (s390_emit_compare_and_swap,
	s390_preferred_reload_class, s390_secondary_reload,
	legitimize_pic_address, legitimize_tls_address,
	legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic,
	s390_class_max_nregs): Likewise.
	* config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
	* config/s390/s390.md: Likewise.
	* config/score/score-protos.h (score_secondary_reload_class,
	score_preferred_reload_class): Likewise.
	* config/score/score.c (score_preferred_reload_class,
	score_secondary_reload_class): Likewise.
	* config/score/score3.c (score3_output_mi_thunk,
	score3_preferred_reload_class, score3_secondary_reload_class,
	score3_hard_regno_mode_ok): Likewise.
	* config/score/score3.h (score3_preferred_reload_class,
	score3_secondary_reload_class): Likewise.
	* config/score/score7.c (score7_output_mi_thunk,
	score7_preferred_reload_class, score7_secondary_reload_class,
	score7_hard_regno_mode_ok): Likewise.
	* config/score/score7.h (score7_preferred_reload_class,
	score7_secondary_reload_class): Likewise.
	* config/sh/sh.c (prepare_move_operands, output_far_jump,
	output_branchy_insn, add_constant, gen_block_redirect,
	sh_insn_length_adjustment, sh_cannot_change_mode_class,
	sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload):
	Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
	* config/stormy16/stormy16.c (xstormy16_output_cbranch_hi,
	xstormy16_output_cbranch_si, xstormy16_secondary_reload_class,
	xstormy16_preferred_reload_class): Likewise.
	* config/xtensa/xtensa.c (xtensa_expand_compare_and_swap,
	xtensa_expand_atomic, override_options,
	xtensa_preferred_reload_class, xtensa_secondary_reload_class):
	Likewise.
	* reorg.c (try_merge_delay_insns): Likewise.
	* tree.c (merge_dllimport_decl_attributes): Likewise.

	* config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA.

From-SVN: r138813
2008-08-06 16:12:51 +00:00
Richard Biener 726a989a8b backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2008-07-28  Richard Guenther  <rguenther@suse.de>

	Merge from gimple-tuples-branch.

	* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
	* gimple.def: New file.
	* gsstruct.def: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* tree-gimple.c: Removed.  Merged into ...
	* gimple.c: ... here.  New file.
	* tree-gimple.h: Removed.  Merged into ...
	* gimple.h: ... here.  New file.

	* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
	* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
	--enable-checking=gimple flag.
	* config.in: Likewise.
	* configure: Regenerated.

	* tree-ssa-operands.h: Tuplified.
	* tree-vrp.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-complex.c: Likewise.
	* cgraphbuild.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tracer.c: Likewise.
	* gengtype.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* value-prof.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-tailcall.c: Likewise.
	* value-prof.h: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* tree-pass.h: Likewise.
	* ipa-cp.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-scalar-evolution.h: Likewise.
	* target.h: Likewise.
	* lambda-mat.c: Likewise.
	* tree-phinodes.c: Likewise.
	* diagnostic.h: Likewise.
	* builtins.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* cfghooks.c: Likewise.
	* fold-const.c: Likewise.
	* cfghooks.h: Likewise.
	* omp-low.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* ipa-reference.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* toplev.c: Likewise.
	* tree-gimple.c: Likewise.
	* tree-gimple.h: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* cgraphunit.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* c-format.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* ipa-utils.c: Likewise.
	* tree-ssa-propagate.h: Likewise.
	* tree-ssa-alias.c: Likewise.
	* gimple-low.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* ipa-inline.c: Likewise.
	* c-semantics.c: Likewise.
	* dwarf2out.c: Likewise.
	* expr.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* predict.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* matrix-reorg.c: Likewise.
	* c-decl.c: Likewise.
	* tree-eh.c: Likewise.
	* c-pretty-print.c: Likewise.
	* lambda-trans.c: Likewise.
	* function.c: Likewise.
	* langhooks.c: Likewise.
	* ebitmap.h: Likewise.
	* tree-vectorizer.c: Likewise.
	* function.h: Likewise.
	* langhooks.h: Likewise.
	* tree-vectorizer.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* domwalk.c: Likewise.
	* tree-if-conv.c: Likewise.
	* profile.c: Likewise.
	* domwalk.h: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-affine.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* c-typeck.c: Likewise.
	* gimplify.c: Likewise.
	* coretypes.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* calls.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree.def: Likewise.
	* tree-dfa.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* cfgexpand.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-predcom.c: Likewise.
	* lambda.h: Likewise.
	* tree-mudflap.c: Likewise.
	* ipa-prop.c: Likewise.
	* print-tree.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* ipa-prop.h: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* ggc-page.c: Likewise.
	* c-omp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-ssa.c: Likewise.
	* lambda-code.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-iterator.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* cfgloop.c: Likewise.
	* system.h: Likewise.
	* tree-profile.c: Likewise.
	* cfgloop.h: Likewise.
	* c-gimplify.c: Likewise.
	* c-common.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-flow.h: Likewise.
	* c-common.h: Likewise.
	* basic-block.h: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-ssa-structalias.h: Likewise.
	* tree-cfg.c: Likewise.
	* passes.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* cfgrtl.c: Likewise.
	* varpool.c: Likewise.
	* stmt.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* langhooks-def.h: Likewise.
	* tree-ssa-operands.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32c/m32c-protos.h: Likewise.
	* config/spu/spu.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/mips/mips.c: Likewise.

From-SVN: r138207
2008-07-28 14:33:56 +00:00
Michael Meissner a51fa0f4ca Fix IA-64 breakage...
Fix IA-64 breakage; Make hot/cold optimization conversation port specific; Move
disabling of scheduling from OVERRIDE_OPTIONS to OPTIMIZATION_OPTIONS

Files modified:
gcc/doc/extend.texi
gcc/doc/tm.texi
gcc/target.h
gcc/ChangeLog
gcc/testsuite/gcc.target/i386/cmov8.c
gcc/testsuite/gcc.target/i386/funcspec-10.c
gcc/testsuite/gcc.target/i386/funcspec-11.c
gcc/testsuite/ChangeLog
gcc/target-def.h
gcc/c-common.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c

From-SVN: r138154
2008-07-25 23:44:24 +00:00
H.J. Lu 9eb578c8e3 re PR target/36720 (ia64_split_tmode_move doesn't work on little endian)
2008-07-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/36720
	* config/ia64/ia64.c (ia64_split_tmode): Fix typo in TImode
	constant for little endian.

From-SVN: r137547
2008-07-06 17:34:16 -07:00
Steve Ellcey 103a641100 ia64.c (ia64_cannot_force_const_mem): Do not allow RFmode constants.
* config/ia64/ia64.c (ia64_cannot_force_const_mem): Do not allow
	RFmode constants.

From-SVN: r137324
2008-07-01 20:46:31 +00:00
Kaveh R. Ghazi 5ead67f603 c-format.c (handle_format_attribute): Fix -Wc++-compat and/or -Wcast-qual warnings.
* c-format.c (handle_format_attribute): Fix -Wc++-compat and/or
	-Wcast-qual warnings.
	* c-pragma.c (dpm_eq, handle_pragma_push_macro,
	handle_pragma_pop_macro): Likewise.
	* collect2.c (resolve_lib_name): Likewise.
	* config/arc/arc.c (arc_init): Likewise.
	* config/arm/arm.c (neon_builtin_compare,
	locate_neon_builtin_icode): Likewise.
	* config/arm/pe.c (arm_mark_dllexport, arm_pe_unique_section):
	Likewise.
	* config/bfin/bfin.c (bfin_init_machine_status,
	bfin_optimize_loop): Likewise.
	* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/cris/cris.c (cris_init_expanders): Likewise.
	* config/darwin-c.c (frameworks_in_use, add_framework): Likewise.
	* config/darwin.c (machopic_indirection_eq,
	machopic_indirection_name, machopic_output_indirection):
	Likewise.
	* config/frv/frv.c (frv_init_machine_status, frv_compare_insns,
	frv_io_check_address, frv_io_handle_set, frv_io_handle_use_1,
	frv_optimize_membar): Likewise.
	* config/i386/cygwin.h (mingw_scan,
	GCC_DRIVER_HOST_INITIALIZATION): Likewise.
	* config/i386/cygwin1.c (mingw_scan): Likewise.
	* config/i386/i386.c (machopic_output_stub): Likewise.
	* config/i386/winnt.c (gen_stdcall_or_fastcall_suffix,
	i386_pe_unique_section): Likewise.
	* config/ia64/ia64.c (ia64_init_machine_status,
	ia64_h_i_d_extended, get_free_bundle_state, bundling, ia64_reorg):
	Likewise.
	* config/iq2000/iq2000.c, iq2000_init_machine_status): Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_encode_label): Likewise.
	* config/m68k/m68k.c (m68k_handle_option,
	m68k_sched_md_init_global): Likewise.
	* config/mcore/mcore.c (mcore_mark_dllexport,
	mcore_mark_dllimport, mcore_unique_section): Likewise.
	* config/mips/mips.c (mips_block_move_straight,
	mips16_rewrite_pool_refs, mips_sim_wait_regs_2,
	mips_sim_record_set): Likewise.
	* config/mmix/mmix.c (mmix_init_machine_status,
	mmix_encode_section_info): Likewise.
	* config/pa/pa.c (pa_init_machine_status, hppa_encode_label):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_init_machine_status,
	print_operand_address, output_toc, redefine_groups,
	rs6000_elf_encode_section_info, machopic_output_stub): Likewise.
	* config/s390/s390.c (s390_init_machine_status): Likewise.
	* config/score/score.c (score_block_move_straight,
	score_block_move_loop_body): Likewise.
	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
	* emit-rtl.c (find_auto_inc): Likewise.
	* gcc.c (translate_options, process_command): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* sdbout.c (sdbout_start_source_file, sdbout_init): Likewise.
	* xcoffout.c (xcoffout_declare_function): Likewise.

From-SVN: r137191
2008-06-27 16:53:54 +00:00
Jan Hubicka e3b5732b21 re PR testsuite/35843 (-fdump-rtl-expand does not exist anymore)
PR testsuite/35843
	* cfgexpand.c (pass_expand): Turn into RTL pass.
	* passes.c (execute_one_pass): Do pass typechecking after execution.
	* tree-pass.h (pass_expand): Turn into RTL pass.

	* function.h (struct rtl_data): Move here fields
	accesses_prior_frames, calls_eh_return, saves_all_registers,
	has_nonlocal_goto, has_asm_statement, is_thunk,
	all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool,
	uses_pic_offset_table, uses_eh_lsda, tail_call_emit,
	arg_pointer_save_area_init from struct function; turn into bool.
	(struct function): Move
	calls_eh_return, saves_all_registers, has_nonlocal_goto,
	has_asm_statement, is_thunk, all_throwers_are_sibcalls, limit_stack,
	profile, uses_const_pool, uses_pic_offset_table, uses_eh_lsda,
	tail_call_emit, arg_pointer_save_area_init
	into struct rtl_data.  Remove recursive_call_emit and gimplified flags.
	(current_function_returns_struct, current_function_returns_pcc_struct,
	current_function_calls_setjmp, current_function_calls_alloca,
	current_function_accesses_prior_frames,
	current_function_calls_eh_return, current_function_is_thunk,
	current_function_stdarg, current_function_profile,
	current_function_limit_stack, current_function_uses_pic_offset_table,
	current_function_uses_const_pool, current_function_has_nonlocal_label,
	current_function_saves_all_registers,
	current_function_has_nonlocal_goto,
	current_function_has_asm_statement): Remove accesor macros.
	* ra-conflict.c (global_conflicts): Update.
	* tree-tailcall.c (suitable_for_tail_opt_p): Update.
	(suitable_for_tail_call_opt_p): Update.
	* builtins.c (expand_builtin_return_addr): Update.
	(expand_builtin_setjmp_setup): Update.
	(expand_builtin_nonlocal_goto): Update.
	* final.c (final_start_function): Update.
	(profile_function): Update.
	(leaf_function_p): Update.
	(only_leaf_regs_used): Update.
	* df-scan.c (df_get_exit_block_use_set): Update.
	* dojump.c (clear_pending_stack_adjust): Update.
	* tree-stdarg.c (gate_optimize_stdarg): Update.
	* gimple-low.c (lower_function_body): Update.
	* global.c (compute_regsets): Update.
	(global_alloc): Update.
	* dwarf2out.c (dwarf2out_begin_prologue): Update.
	* expr.c (expand_assignment): Update.
	* dse.c (dse_step0): Update.
	(dse_step1): Update.
	* c-decl.c (store_parm_decls): Update.
	* local-alloc.c (combine_regs): Update.
	(find_free_reg): Update.
	* function.c (assign_parms_augmented_arg_list): Update.
	(assign_parm_find_data_types): Update.
	(assign_parms): Update.
	(allocate_struct_function): Update.
	(expand_function_start): Update.
	(expand_function_end): Update.
	(get_arg_pointer_save_area): Update.
	(thread_prologue_and_epilogue_insns): Update.
	(rest_of_match_asm_constraints): Update.
	* stor-layout.c (variable_size): Update.
	* gcse.c (gcse_main): Update.
	(bypass_jumps): Update.
	* gimplify.c (gimplify_function_tree): Update.
	* calls.c (emit_call_1): Update.
	(expand_call): Update.
	* bt-load.c (compute_defs_uses_and_gen): Update.
	* except.c (sjlj_assign_call_site_values): Update.
	(sjlj_emit_function_enter): Update.
	(can_throw_external): Update.
	(set_nothrow_function_flags): Update.
	(expand_builtin_unwind_init): Update.
	(expand_eh_return): Update.
	(convert_to_eh_region_ranges): Update.
	(output_function_exception_table): Update.
	* emit-rtl.c (gen_tmp_stack_mem): Update.
	* cfgexpand.c (expand_used_vars): Update.
	(tree_expand_cfg): Update.
	* cfgcleanup.c (rest_of_handle_jump): Update.
	* explow.c (allocate_dynamic_stack_space): Update.
	* varasm.c (assemble_start_function): Update.
	(force_const_mem): Update.
	(mark_constant_pool): Update.
	* tree-optimize.c (tree_rest_of_compilation): Update.
	* stack-ptr-mod.c (notice_stack_pointer_modification): Update.
	* tree-cfg.c (notice_special_calls): Update.
	(is_ctrl_altering_stmt): Update.
	(tree_can_make_abnormal_goto): Update.
	(tree_purge_dead_abnormal_call_edges): Update.
	* config/alpha/predicates.md: Update.
	* config/alpha/alpha.c (alpha_sa_mask): Update.
	(alpha_sa_size): Update.
	(alpha_does_function_need_gp): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_output_function_end_prologue): Update.
	(alpha_expand_epilogue): Update.
	* config/frv/frv.c (frv_stack_info): Update.
	(frv_expand_epilogue): Update.
	* config/s390/s390.c (s390_regs_ever_clobbered): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_init_frame_layout): Update.
	(s390_can_eliminate): Update.
	(save_gprs): Update.
	* config/spu/spu.c (spu_split_immediate): Update.
	(need_to_save_reg): Update.
	(spu_expand_prologue): Update.
	(spu_expand_epilogue): Update.
	* config/sparc/sparc.md: Update.
	* config/sparc/sparc.c (eligible_for_return_delay): Update.
	(sparc_tls_got): Update.
	(legitimize_pic_address): Update.
	(sparc_emit_call_insn): Update.
	(sparc_expand_prologue): Update.
	(output_return): Update.
	(print_operand): Update.
	(sparc_function_ok_for_sibcall): Update.
	* config/sparc/sparc.h (EXIT_IGNORE_STACK): Update.
	* config/m32r/m32r.md: Update.
	* config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Update.
	(m32r_compute_frame_size): Update.
	(m32r_expand_prologue): Update.
	(m32r_expand_epilogue): Update.
	(m32r_legitimize_pic_address): Update.
	* config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Update.
	* config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
	* config/i386/i386.c (ix86_frame_pointer_required): Update.
	(gen_push): Update.
	(ix86_save_reg): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_prologue): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh5_schedule_saves): Update.
	(sh_expand_prologue): Update.
	(sh_expand_epilogue): Update.
	(sh_setup_incoming_varargs): Update.
	(sh_allocate_initial_value): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Update.
	* config/sh/sh.md (label:): Update.
	* config/avr/avr.c (out_movhi_mr_r): Update.
	* config/crx/crx.h (enum): Update.
	* config/xtensa/xtensa.h (along): Update.
	* config/stormy16/stormy16.c Update.
	(xstormy16_compute_stack_layout): Update.
	* config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Update.
	(fr30_expand_prologue): Update.
	* config/cris/cris.c (cris_conditional_register_usage): Update.
	(cris_reg_saved_in_regsave_area): Update.
	(cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	(cris_expand_pic_call_address): Update.
	(cris_asm_output_symbol_ref): Update.
	(cris_asm_output_label_ref): Update.
	* config/cris/cris.md Update.
	* config/iq2000/iq2000.c (compute_frame_size): Update.
	(iq2000_expand_epilogue): Update.
	* config/mt/mt.h (save_direction): Update.
	* config/mn10300/mn10300.c (mn10300_function_value): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_secondary_reload_class): Update.
	* config/m68k/m68k.c (m68k_save_reg): Update.
	(m68k_expand_prologue): Update.
	(m68k_expand_epilogue): Update.
	(legitimize_pic_address): Update.
	* config/rs6000/rs6000.c (rs6000_got_register): Update.
	(first_reg_to_save): Update.
	(first_altivec_reg_to_save): Update.
	(compute_vrsave_mask): Update.
	(compute_save_world_info): Update.
	(rs6000_stack_info): Update.
	(spe_func_has_64bit_regs_p): Update.
	(rs6000_ra_ever_killed): Update.
	(rs6000_emit_eh_reg_restore): Update.
	(rs6000_emit_allocate_stack): Update.
	(rs6000_emit_prologue): Update.
	(rs6000_emit_epilogue): Update.
	(rs6000_output_function_epilogue): Update.
	(output_profile_hook): Update.
	(rs6000_elf_declare_function_name): Update.
	* config/rs6000/rs6000.h (rs6000_args): Update.
	* config/rs6000/rs6000.md: Update.
	* config/mcore/mcore.c (mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_output_function_epilogue): Update.
	* config/arc/arc.h (FRAME_POINTER_REQUIRED): Update.
	* config/darwin.c (machopic_function_base_name): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	(rpush): Update.
	(rpop): Update.
	(score3_epilogue): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	(score7_prologue): Update.
	(score7_epilogue): Update.
	* config/score/score.h (FRAME_POINTER_REQUIRED): Update.
	* config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(require_pic_register): Update.
	(arm_load_pic_register): Update.
	(arm_compute_save_reg0_reg12_mask): Update.
	(arm_compute_save_reg_mask): Update.
	(thumb1_compute_save_reg_mask): Update.
	(output_return_instruction): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_pushpop): Update.
	(thumb_exit): Update.
	(thumb1_expand_prologue): Update.
	(thumb1_expand_epilogue): Update.
	(arm_unwind_emit): Update.
	(arm_output_fn_unwind): Update.
	* config/arm/arm.h (FRAME_POINTER_REQUIRED): Update.
	* config/arm/arm.md: Update.
	* config/pa/pa.md: Update.
	* config/pa/pa.c (legitimize_pic_address): Update.
	(compute_frame_size): Update.
	(hppa_expand_prologue): Update.
	(hppa_expand_epilogue): Update.
	(borx_reg_operand): Update.
	* config/pa/pa.h (FRAME_POINTER_REQUIRED): Update.
	(HARD_REGNO_RENAME_OK): Update.
	* config/mips/mips.c (mips_global_pointer): Update.
	(mips_save_reg_p): Update.
	(mips_compute_frame_info): Update.
	(mips_frame_pointer_required): Update.
	(mips_expand_prologue): Update.
	(mips_expand_epilogue): Update.
	(mips_can_use_return_insn): Update.
	(mips_reorg_process_insns): Update.
	* config/v850/v850.c (compute_register_save_size): Update.
	* config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Update.
	* config/mmix/mmix.c (along): Update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (legitimize_pic_address): Update.
	(must_save_p): Update.
	(stack_frame_needed_p): Update.
	(add_to_reg): Update.
	(bfin_expand_prologue): Update.
	* stmt.c (expand_asm_operands): Update.
	* reload1.c (reload): Update.
	(init_elim_table): Update.

From-SVN: r134682
2008-04-25 23:14:40 +00:00
James E Wilson 07acc7b3e1 ia64.c (rtx_needs_barrier): Handle UNSPEC_FR_SQRT_RECIP_APPROX_RES.
* config/ia64/ia64.c (rtx_needs_barrier): Handle
UNSPEC_FR_SQRT_RECIP_APPROX_RES.
* config/ia64/ia64.c (UNSPEC_FR_SQRT_RECIP_APPROX_RES): Define.
(divsi3_internal, divdi3_internal_lat, divdi3_internal_thr,
divsf3_internal_lat, sqrt_approx, sqrtsf2_internal_thr,
divdf3_internal_lat, sqrtdf2_internal_thr, divxf3_internal_lat,
divxf3_internal_thr, sqrtxf2_internal_thr, recip_approx): Use it.

From-SVN: r134295
2008-04-14 16:38:40 -07:00
Jan Hubicka 38173d38cc function.h (incomming_args): Break out of struct function.
* function.h (incomming_args): Break out of struct function.
	(function_subsections): Break out of struct function.
	(rtl_data): Add args, subsections fields. Break out outgoing_args_size,
	return_rtx and hard_reg_initial_vals from struct function.
	Kill inl_max_label_num.
	(current_function_pops_args, current_function_args_info,
	current_function_args_size, current_function_args_size,
	current_function_pretend_args_size,
	current_function_outgoing_args_size,
	current_function_internal_arg_pointer, current_function_return_rtx):
	Kill compatibility accestor macros.
	* builtins.c (expand_builtin_apply_args_1): Update.
	(expand_builtin_next_arg): Update.
	* df-scan.c (df_get_call_refs): Update.
	* dbxout.c (dbxout_function_end): Update.
	* dwarf2out.c (dwarf2out_switch_text_section): Update.
	(output_line_info): Update.
	(secname_for_decl): Update.
	(dwarf2out_var_location): Update.
	* function.c (free_after_compilation): Update.
	(assign_parm_find_stack_rtl): Update.
	(assign_parms): Update.
	(expand_dummy_function_end): Update.
	(expand_function_end): Update.
	* calls.c (mem_overlaps_already_clobbered_arg_p): Update.
	(expand_call): Update.
	(emit_library_call_value_1): Update.
	(store_one_arg): Update.
	* varasm.c (initialize_cold_section_name): Update.
	(unlikely_text_section): Update.
	(unlikely_text_section_p): Update.
	(assemble_start_function): Update.
	(assemble_end_function): Update.
	(default_section_type_flags): Update.
	(switch_to_section): Update.
	* integrate.c (set_decl_abstract_flags): Update.
	(get_hard_reg_initial_val): Update.
	(has_hard_reg_initial_val): Update.
	(allocate_initial_values): Update.
	* resource.c (init_resource_info): Update.
	* config/alpha/alpha.c (NUM_ARGS): Update.
	(direct_return): Update.
	(alpha_va_start): Update.
	(alpha_sa_size): Update.
	(alpha_initial_elimination_offset): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_expand_epilogue): Update.
	(unicosmk_initial_elimination_offset):
	* config/alpha/alpha.md (call expander): Update.
	* config/s390/s390.c (s390_register_info): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_initial_elimination_offset): Update.
	(s390_build_builtin_va_list): Update.
	(s390_va_start): Update.
	* config/spu/spu.c (direct_return): Update.
	(spu_expand_prologue): Update.
	(spu_initial_elimination_offset): Update.
	(spu_build_builtin_va_list): Update.
	(spu_va_start): Update.
	* config/sparc/sparc.c (sparc_init_modes): Update.
	(sparc_compute_frame_size): Update.
	(function_value): Update.
	* config/m32r/m32r.c (m32r_compute_frame_size): Update.
	* config/i386/i386.md (return expander): Update.
	* config/i386/i386.c (ix86_va_start): Update.
	(ix86_can_use_return_insn_p): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh_expand_prologue): Update.
	(sh_builtin_saveregs): Update.
	(sh_va_start): Update.
	(initial_elimination_offset): Update.
	(sh_allocate_initial_value): Update.
	(sh_function_ok_for_sibcall): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.md (return expander): Update.
	* config/avr/avr.c (frame_pointer_required_p): UPdate.
	* config/crx/crx.c (crx_compute_frame): UPdate.
	(crx_initial_elimination_offset): UPdate.
	* config/xtensa/xtensa.c (compute_frame_size): Update
	(xtensa_builtin_saveregs): Update.
	(xtensa_va_start): Update.
	(order_regs_for_local_alloc): Update.
	* config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update.
	(xstormy16_expand_builtin_va_start): Update.
	* config/fr30/fr30.c (fr30_compute_frame_size): Update.
	* config/m68hc11/m68hc11.md (return expanders): Update.
	* config/m68hc11/m68hc11.c (expand_prologue): Update.
	(expand_epilogue): Update.
	* config/cris/cris.c (cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	* config/iq2000/iq2000.c (iq2000_va_start): Update.
	(compute_frame_size): Update.
	* config/mt/mt.c (mt_compute_frame_size): Update.
	* config/mn10300/mn10300.c (expand_prologue): Update.
	(expand_epilogue): Update.
	(initial_offset): Update.
	(mn10300_builtin_saveregs):
	* config/mn10300/mn10300.md (return expander): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_expand_prologue): Update.
	* config/m68k/m68k.md (return expander): Update.
	* config/rs6000/rs6000.c (rs6000_va_start): Update.
	(rs6000_stack_info): Update.
	* config/mcore/mcore.c (layout_mcore_frame): Update.
	(mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_compute_frame_size): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(thumb_find_work_register): Update.
	(arm_compute_save_reg_mask): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_size_return_regs): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_exit): Update.
	(thumb_unexpanded_epilogue): Update.
	(thumb1_output_function_prologue): Update.
	* config/pa/pa.md (return expander): Update.
	* config/pa/pa.c (compute_frame_size): Update.
	(hppa_builtin_saveregs): Update.
	* config/mips/mips.c (mips_va_start): Update.
	(mips16_build_function_stub): Update.
	(mips_compute_frame_info): Update.
	(mips_restore_gp): Update.
	(mips_output_function_prologue): Update.
	(mips_expand_prologue): Update.
	* config/v850/v850.c (compute_frame_size): Update.
	(expand_prologue): * config/mmix/mmix.c (along): update.
	(mmix_initial_elimination_offset): update.
	(mmix_reorg): update.
	(mmix_use_simple_return): update.
	(mmix_expand_prologue): update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (bfin_initial_elimination_offset): Update.
	(emit_link_insn): Update.

From-SVN: r134087
2008-04-08 08:59:34 +00:00
Jan Hubicka 6b0c2336ba re PR target/35795 (Revision 133787 breaks ia64)
2008-04-03  Jan Hubicka  <jh@suse.cz>

	PR tree-optimization/35795
	* alpha/alpha.c (alpha_output_mi_thunk_osf): Free after compilation.
	* sparc/sparc.c (sparc_output_mi_thunk): Likewise.
	* ia64/ia64.c (ia64_output_mi_thunk): Likewise.
	* m68k/m68k.c (m68k_output_mi_thunk): Likewise.
	* score/score3.c (score3_output_mi_thunk): Likewise.
	* score/score7.c (score7_output_mi_thunk): Likewise.
	* mips/mips.c (mips_output_mi_thunk): Likewise.

From-SVN: r133868
2008-04-03 05:49:27 -07:00
James E Wilson 1def9c3f7d re PR target/35695 (-funroll-loops breaks inline float divide)
PR target/35695
* config/ia64/div.md (recip_approx_rf): Use UNSPEC not DIV.
* config/ia64/ia64.c (rtx_needs_barrier): Handle
UNSPEC_FR_RECIP_APPROX_RES.
* config/ia64/ia64.md (UNSPEC_FR_RECIP_APPROX_RES): Define.

From-SVN: r133772
2008-03-31 12:51:50 -07:00
Richard Sandiford 38ae765115 rtl.def (SUBREG): Update comments.
gcc/
	* rtl.def (SUBREG): Update comments.
	* rtl.h (reg_attrs): Be explicit about the type of offset used.
	(set_reg_attrs_from_mem): Rename to...
	(set_reg_attrs_from_value): ...this.
	(adjust_reg_mode, byte_lowpart_offset): Declare.
	* emit-rtl.c (byte_lowpart_offset): New function.
	(update_reg_offset): Remove special offset handling for big-endian
	targets.
	(gen_rtx_REG_offset, gen_reg_rtx_offset): Explicitly say that the
	offset parameter is added to REG_OFFSET.
	(adjust_reg_mode): New function.
	(set_reg_attrs_for_mem): Rename to...
	(set_reg_attrs_for_value): ...this and generalize to all values.
	If the register is a lowpart of the value, adjust the offset
	accordingly.
	(set_reg_attrs_for_parm): Update after the above renaming.
	(set_reg_attrs_for_decl_rtl): New function, split out from
	set_decl_incoming_rtl.  Set the offset of plain REGs to the
	offset of the REG's mode from the decl's.  Assert that all
	subregs are lowparts and handle their inner registers in the
	same way as plain REGs.
	(set_decl_rtl, set_incoming_decl_rtl): Use reg_attrs_for_decl_rtl.
	(subreg_lowpart_offset): Explicitly say that the returned offset
	is a SUBREG_BYTE.
	* combine.c (do_SUBST_MODE, try_combine, undo_all): Use adjust_reg_mode
	instead of PUT_MODE.
	* final.c (alter_subreg): Fix/update argument to gen_rtx_REG_offset.
	* config/ia64/ia64.c (ia64_expand_load_address): Likewise.
	* regclass.c (reg_scan_mark_refs): Use set_reg_attrs_from_value.
	* reload.c (find_reloads_subreg_address): Call set_mem_offset
	when offseting a MEM.
	* var-tracking.c (offset_valid_for_tracked_p): Delete.
	(mode_for_reg_attrs): Replace with...
	(track_loc_p): ...this new function.  Return the mode and offset
	to the caller, checking that the latter is valid.  If the rtx is
	a paradoxical lowpart of the decl, use the decl's mode instead.
	Do the same when storing to a register that contains the entire decl.
	(var_lowpart): Use byte_lowpart_offset rather than
	subreg_lowpart_offset when adjusting the offset attribute.
	(count_uses, add_uses, add_stores): Use track_reg_p instead of
	REG_EXPR, MEM_EXPR, REG_OFFSET, INT_MEM_OFFSET, track_expr_p,
	offset_valid_for_tracked_p and mode_for_reg_attrs.  Generate
	lowparts for MEMs as well as REGs.
	(vt_add_function_parameters): When obtaining the information from
	the decl_rtl, adjust the offset to match incoming.  Use track_loc_p
	and var_lowpart.

From-SVN: r131055
2007-12-19 09:54:24 +00:00
Jakub Jelinek 444a356a3b ia64.c (struct reg_write_state): Change into unsigned short bitfields rather than unsigned int...
* config/ia64/ia64.c (struct reg_write_state): Change into
	unsigned short bitfields rather than unsigned int, decrease
	first_pred to just 10 bits.
	(rws_insn): Change into a bitmap or if not ENABLE_CHECKING
	into two char array.
	(rws_insn_set, rws_insn_test): New functions.
	(in_safe_group_barrier): New variable.
	(rws_update): Remove first argument, always set rws_sum array.
	(rws_access_regno): Use rws_insn_set macro.  Only call rws_update
	or update rws_sum if !in_safe_group_barrier, adjust rws_update
	args.
	(rtx_needs_barrier): Use rws_insn_test macro.
	(safe_group_barrier_needed): Don't save/restore rws_sum array,
	instead set/clear in_safe_group_barrier flag.

From-SVN: r129861
2007-11-02 21:38:11 +01:00
Paolo Bonzini 215b063c9d target.h (unspec_may_trap_p): New target hook.
2007-10-16  Paolo Bonzini  <bonzini@gnu.org>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>

	* target.h (unspec_may_trap_p): New target hook.
	* target-def.h (TARGET_UNSPEC_MAY_TRAP_P): New macro.
	* targhooks.c (default_unspec_may_trap_p): Default implementation of
	the hook.
	* targhooks.h (default_unspec_may_trap_p): Declare it.
	* doc/tm.texi (TARGET_UNSPEC_MAY_TRAP_P): Document new hook.
	* rtlanal.c (may_trap_p_1): Use new hook.  Make global.
	* rtl.h (may_trap_p_1): Declare.
	
	* config/ia64/ia64.c (ia64_unspec_may_trap_p): New function to
	override default hook implementation.
	(TARGET_UNSPEC_MAY_TRAP_P): Override default implementation of the
	hook.
	
	* gcc.target/ia64/20040709-2.c: New test.

Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r129378
2007-10-16 09:13:47 +00:00
Jakub Jelinek 2951f79b35 re PR target/32337 (Error: Register number out of range 0..1)
PR target/32337
	* config/ia64/ia64.c (find_gr_spill): Don't decrement
	current_frame_info.n_local_regs.  Don't return emitted local
	regs.
	(ia64_compute_frame_size): Improve unwind hack to put
	RP, PFS, FP in that order by allowing some of the registers
	been already emitted, as long as they are emitted to the
	desired register.

From-SVN: r128490
2007-09-14 11:56:59 +02:00
Jakub Jelinek c93646bd3c re PR target/32338 (Error: .prologue within prologue)
PR target/32338
	* config/ia64/ia64.c (ia64_expand_epilogue): Emit blockage
	before sp restoration even when total_size is 0, but
	frame_pointer_needed.

	* gcc.dg/pr32338-1.c: New test.
	* gcc.dg/pr32338-2.c: New test.

From-SVN: r128446
2007-09-12 23:19:51 +02:00
Kaveh R. Ghazi 3101faab46 alpha.c (alpha_mangle_type, [...]): Constify.
* config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp,
	alpha_in_small_data_p, alpha_split_complex_arg,
	alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
	Constify.
	* config/arm/arm-protos.h (arm_mangle_type): Likewise.
	* config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type):
	Likewise.
	* config/bfin/bfin.c (funkind, bfin_comp_type_attributes,
	TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
	* config/darwin-protos.h (darwin_binds_local_p): Likewise.
	* config/darwin.c (darwin_binds_local_p): Likewise.
	* config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p):
	Likewise.
	* config/i386/i386-protos.h (i386_pe_binds_local_p,
	i386_pe_valid_dllimport_attribute_p): Likewise.
	* config/i386/i386.c (ix86_function_regparm,
	ix86_comp_type_attributes, ix86_ms_bitfield_layout_p,
	x86_can_output_mi_thunk, ix86_mangle_type,
	TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
	* config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p,
	i386_pe_binds_local_p): Likewise.
	* config/ia64/ia64.c
	(ia64_first_cycle_multipass_dfa_lookahead_guard_spec,
	ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type,
	ia64_invalid_conversion, ia64_invalid_unary_op,
	ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
	Likewise.
	* config/m32c/m32c.c (m32c_comp_type_attributes): Likewise.
	* config/m32r/m32r.c (m32r_in_small_data_p): Likewise.
	* config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
	* config/mips/mips.c (mips_use_blocks_for_constant_p,
	mips_in_small_data_p, mips_use_anchors_for_symbol_p,
	mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	mips_near_type_p, mips_far_type_p, mips_global_symbol_p,
	mips_symbol_binds_local_p, mips_classify_symbol): Likewise.
	* config/pa/pa.c (pa_commutative_p): Likewise.
	* config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_invalid_within_doloop,
	rs6000_ms_bitfield_layout_p, rs6000_mangle_type,
	rs6000_use_blocks_for_constant_p,
	rs6000_vector_alignment_reachable, rs6000_is_opaque_type,
	invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise.
	* config/s390/s390.c (s390_mangle_type,
	TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP):
	Likewise.
	* config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	th_in_small_data_p): Likewise.
	* config/sh/sh.c (sh_ms_bitfield_layout_p,
	sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
	Likewise.
	* config/sparc/sparc.c (sparc_can_output_mi_thunk,
	sparc_mangle_type): Likewise.
	* config/spu/spu.c (spu_vector_alignment_reachable): Likewise.
	* config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise.
	* emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq):
	Likewise.
	* hooks.c (hook_bool_mode_const_rtx_false,
	hook_bool_mode_const_rtx_true,
	hook_bool_const_tree_hwi_hwi_const_tree_false,
	hook_bool_const_tree_hwi_hwi_const_tree_true,
	hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
	hook_constcharptr_const_tree_null,
	hook_constcharptr_const_rtx_null,
	hook_constcharptr_const_tree_const_tree_null,
	hook_constcharptr_int_const_tree_null,
	hook_constcharptr_int_const_tree_const_tree_null): New.
	(hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
	hook_bool_tree_hwi_hwi_tree_false,
	hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
	hook_int_tree_tree_1, hook_constcharptr_tree_null,
	hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): Delete.
	(default_can_output_mi_thunk_no_vcall): Constify.
	* hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
	hook_bool_tree_hwi_hwi_tree_false,
	hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
	hook_int_tree_tree_1, hook_constcharptr_tree_null,
	hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): Delete.
	(hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true,
	hook_bool_const_tree_hwi_hwi_const_tree_false,
	hook_bool_const_tree_hwi_hwi_const_tree_true,
	hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
	hook_constcharptr_const_tree_null,
	hook_constcharptr_const_rtx_null,
	hook_constcharptr_const_tree_const_tree_null,
	hook_constcharptr_int_const_tree_null,
	hook_constcharptr_int_const_tree_const_tree_null): New.
	(default_can_output_mi_thunk_no_vcall): Constify.
	* integrate.c (function_attribute_inlinable_p): Likewise.
	* integrate.h (function_attribute_inlinable_p): Likewise.
	* jump.c (rtx_renumbered_equal_p): Likewise.
	* output.h (decl_readonly_section, categorize_decl_for_section,
	default_use_anchors_for_symbol_p, default_binds_local_p,
	default_binds_local_p_1): Likewise.
	* rtl.h (rtx_renumbered_equal_p, decl_default_tls_model):
	Likewise.
	* target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P,
	TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P,
	TARGET_COMP_TYPE_ATTRIBUTES,
	TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P,
	TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE,
	TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP,
	TARGET_DWARF_CALLING_CONVENTION): Likewise.
	* target.h (can_output_mi_thunk, needs_block_p,
	first_cycle_multipass_dfa_lookahead_guard_spec,
	vector_alignment_reachable, comp_type_attributes,
	function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type,
	commutative_p, use_blocks_for_constant_p,
	use_anchors_for_symbol_p, in_small_data_p, binds_local_p,
	vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook,
	invalid_within_doloop, valid_dllimport_attribute_p,
	split_complex_arg, invalid_arg_for_unprototyped_fn,
	invalid_conversion, invalid_unary_op, invalid_binary_op):
	Likewise.
	* targhooks.c (default_invalid_within_doloop,
	hook_invalid_arg_for_unprototyped_fn,
	default_builtin_vector_alignment_reachable): Likewise.
	(hook_bool_rtx_commutative_p): Delete.
	(hook_bool_const_rtx_commutative_p): New.
	* targhooks.h (default_invalid_within_doloop,
	default_builtin_vector_alignment_reachable,
	hook_invalid_arg_for_unprototyped_fn): Constify.
	(hook_bool_rtx_commutative_p): Delete.
	(hook_bool_const_rtx_commutative_p): New.
	* varasm.c (bss_initializer_p, decl_default_tls_model,
	categorize_decl_for_section, decl_readonly_section,
	default_use_anchors_for_symbol_p, default_binds_local_p,
	default_binds_local_p_1): Constify.

From-SVN: r127785
2007-08-24 19:00:59 +00:00
Kaveh R. Ghazi 586de21898 arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard.
* config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg):
	Wrap in RTX_CODE macro guard.
	* config/arm/pe.c (arm_dllexport_p, arm_dllimport_p,
	arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport,
	arm_mark_dllimport, arm_pe_encode_section_info,
	arm_pe_unique_section): Use ISO-C function declarations.
	* config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION,
	c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE,
	c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored):
	Likewise.
	* config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning.
	* config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before
	defining.
	* config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise.
	* config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise.
	(register_move_cost): Use ISO-C function declarations.
	* config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings.
	* config/score/score-protos.h (score_declare_object): Add
	ATTRIBUTE_PRINTF_4.
	* config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* final.c (profile_function): Avoid empty if-bodies.
	
	
	* calls.c (must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Constify.
	* config/alpha/alpha-protos.h (function_value): Likewise.
	* config/alpha/alpha.c (alpha_return_in_memory,
	alpha_pass_by_reference, function_value,
	unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/arm/arm-protos.h (arm_return_in_memory,
	arm_pad_arg_upward, arm_function_value): Likewise.
	* config/arm/arm.c (arm_pass_by_reference,
	arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	arm_function_value, arm_return_in_memory, arm_pad_arg_upward):
	Likewise.
	* config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
	* config/avr/avr-protos.h (avr_function_value): Likewise.
	* config/avr/avr.c (avr_return_in_memory,
	gas_output_limited_string, gas_output_ascii, avr_function_value,
	avr_return_in_memory): Likewise.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise.
	* config/bfin/bfin.c (bfin_pass_by_reference,
	bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN):
	Likewise.
	* config/cris/cris.c (cris_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS): Likewise.
	* config/crx/crx.c (crx_return_in_memory): Likewise.
	* config/darwin.c (function_base, machopic_function_base_name):
	Likewise.
	* config/fr30/fr30.c (fr30_must_pass_in_stack,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/frv/frv.c (frv_must_pass_in_stack): Likewise.
	* config/h8300/h8300.c (h8300_return_in_memory): Likewise.
	* config/i386/i386-protos.h (ix86_return_in_memory,
	ix86_sol10_return_in_memory): Likewise.
	* config/i386/i386.c (ix86_function_value,
	ix86_function_sseregparm, ix86_must_pass_in_stack,
	type_natural_mode, classify_argument, examine_argument,
	construct_container, ix86_pass_by_reference, function_value_32,
	function_value_64, ix86_function_value_1, return_in_memory_32,
	return_in_memory_64, return_in_memory_ms_64,
	ix86_return_in_memory, ix86_sol10_return_in_memory,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/ia64/ia64-protos.h (ia64_function_value,
	ia64_hpux_function_arg_padding): Likewise.
	* config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory,
	ia64_function_value, bundle_state_hash, bundle_state_eq_p,
	ia64_hpux_function_arg_padding): Likewise.
	* config/iq2000/iq2000-protos.h (function_arg,
	iq2000_function_value): Likewise.
	* config/iq2000/iq2000.c (iq2000_return_in_memory,
	iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg, iq2000_function_value): Likewise.
	* config/m32c/m32c-protos.h (m32c_function_value,
	m32c_promote_function_return): Likewise.
	* config/m32c/m32c.c (m32c_pass_by_reference,
	m32c_promote_prototypes, m32c_promote_function_return,
	m32c_function_value): Likewise.
	* config/m32r/m32r.c (m32r_return_in_memory,
	m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	m32r_in_small_data_p): Likewise.
	* config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding):
	Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_return_in_memory,
	m68hc11_function_arg_padding): Likewise.
	* config/m68k/m68k-protos.h (m68k_function_value): Likewise.
	* config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES,
	m68k_function_value): Likewise.
	* config/mcore/mcore-protos.h (mcore_num_arg_regs,
	mcore_function_value): Likewise.
	* config/mcore/mcore.c (handle_structs_in_regs,
	mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	mcore_num_arg_regs, mcore_function_value): Likewise.
	* config/mips/mips-protos.h (mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb,
	mips_return_in_memory, mips_pass_by_reference, mips_callee_copies,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mmix/mmix-protos.h (mmix_function_outgoing_value):
	Likewise.
	* config/mmix/mmix.c (mmix_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value,
	mmix_encode_section_info): Likewise.
	* config/mn10300/mn10300-protos.h (mn10300_function_value):
	Likewise.
	* config/mn10300/mn10300.c (mn10300_return_in_memory,
	mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	mn10300_function_value): Likewise.
	* config/mt/mt-protos.h (mt_function_value): Likewise.
	* config/mt/mt.c (mt_pass_by_reference, mt_function_value,
	mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/pa/pa-protos.h (function_arg_padding, function_value,
	pa_return_in_memory): Likewise.
	* config/pa/pa.c (pa_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg_padding, function_value, pa_return_in_memory):
	Likewise.
	* config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise.
	* config/rs6000/rs6000-protos.h (rs6000_function_value,
	function_arg_padding): Likewise.
	* config/rs6000/rs6000.c (rs6000_return_in_memory,
	rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
	rs6000_pass_by_reference, rs6000_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_padding, altivec_expand_dst_builtin,
	altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins,
	altivec_init_builtins, rs6000_common_init_builtins,
	rs6000_function_value): Likewise.
	* s390/s390-protos.h (s390_function_value): Likewise.
	* config/s390/s390.c (s390_function_arg_size,
	s390_pass_by_reference, s390_return_in_memory,
	s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
	* config/score/score-protos.h (score_function_value): Likewise.
	* config/score/score.c (score_arg_partial_bytes,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, score_return_in_memory,
	score_pass_by_reference, score_add_offset, score_function_value):
	Likewise.
	* config/sh/sh-protos.h (sh_attr_renesas_p,
	sh_promote_prototypes): Likewise.
	* config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference,
	sh_callee_copies, sh_promote_prototypes, shcompact_byref,
	sh_attr_renesas_p): Likewise.
	* config/sparc/sparc-protos.h (function_value,
	function_arg_padding): Likewise.
	* config/sparc/sparc.c (sparc_promote_prototypes,
	sparc_return_in_memory, sparc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_record_value_2, function_arg_record_value_1,
	function_arg_record_value, function_arg_record_value,
	function_arg_padding, function_value): Likewise.
	* config/spu/spu-protos.h (spu_function_value): Likewise.
	* config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory,
	spu_function_value): Likewise.
	* config/stormy16/stormy16-protos.h (xstormy16_function_value):
	Likewise.
	* config/stormy16/stormy16.c (xstormy16_return_in_memory,
	xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/v850/v850.c (v850_return_in_memory,
	v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/xtensa/xtensa.c (xtensa_return_in_msb,
	xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* explow.c (promote_mode, hard_function_value): Likewise.
	* expr.h (hard_function_value, promote_mode): Likewise.
	* function.c (aggregate_value_p): Likewise.
	* hooks.c (hook_bool_const_tree_true): New.
	* hooks.h (hook_bool_const_tree_true): New.
	* sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	TARGET_RETURN_IN_MSB): Likewise.
	* target.h (promote_function_args, promote_function_return,
	promote_prototypes, return_in_memory, return_in_msb,
	pass_by_reference, must_pass_in_stack, callee_copies,
	function_value): Likewise.
	* targhooks.c (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise. 
	* targhooks.h (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise.
	* tree-ssa-structalias.c (const_equiv_class_label_t): New.
	(equiv_class_label_hash, equiv_class_label_eq): Constify.
	* tree-vectorizer.c (bb_in_loop_p): Likewise.
	* tree.c (needs_to_live_in_memory): Likewise.
	* tree.h (struct tree_type, needs_to_live_in_memory,
	aggregate_value_p, must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Likewise.
	* vmsdbgout.c (write_debug_addr, write_debug_delta4,
	write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg,
	lookup_filename): Likewise.

From-SVN: r127743
2007-08-23 15:49:56 +00:00