Commit Graph

1016 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
Paolo Bonzini 666e3cebe1 tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation for for_return == 2.
2009-08-12  Paolo Bonzini  <bonzini@gnu.org>

	* doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation
	for for_return == 2.
	* function.c (assign_parm_setup_reg): Use for_return == 2, improve
	comments.
	* calls.c (expand_call): Fix typo.
	* explow.c (promote_decl_mode): Use for_return == 2 for RESULT_DECL
	and PARM_DECL.
	* stmt.c (expand_value_return): Use promote_function_mode to copy out
	of pseudo.
	* targhooks.c (default_promote_function_mode): Handle for_return == 2.
	* config/cris/cris.c (cris_promote_function_mode): Likewise.
	* config/mmix/mmix.c (mmix_promote_function_mode): Likewise.
	* config/pa/pa.c (pa_promote_function_mode): Likewise.

From-SVN: r150700
2009-08-12 16:23:12 +00: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
Jakub Jelinek ae58e54888 re PR target/40667 (stack frames are generated even with -fomit-frame-pointer)
PR rtl-optimization/40667
	* defaults.h (MINIMUM_ALIGNMENT): Define if not defined.
	* doc/tm.texi (MINIMUM_ALIGNMENT): Document it.
	* config/i386/i386.h (MINIMUM_ALIGNMENT): Define.
	* config/i386/i386.c (ix86_minimum_alignment): New function.
	* config/i386/i386-protos.h (ix86_minimum_alignment): New prototype.
	* cfgexpand.c (expand_one_var): Use MINIMIM_ALIGNMENT.
	* emit-rtl.c (gen_reg_rtx): Likewise.
	* function.c (assign_parms): Likewise.  If nominal_type needs
	bigger alignment than FUNCTION_ARG_BOUNDARY, use its alignment
	rather than passed_type's alignment.

From-SVN: r149513
2009-07-11 19:40:29 +02:00
Jakub Jelinek dd67163fa4 re PR target/40668 (64-bit sparc miscompiles memcpy of argument inside switch)
PR target/40668
	* function.c (assign_parm_setup_stack): Adjust
	MEM_OFFSET (data->stack_parm) if promoted_mode is different
	from nominal_mode on big endian.

	* gcc.c-torture/execute/pr40668.c: New test.

From-SVN: r149511
2009-07-11 11:23:32 +02: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
Richard Henderson 997704f18b re PR bootstrap/40347 (i386-darwin ICEs while building libgcc during stage2)
PR bootstrap/40347
	* function.c (reposition_prologue_and_epilogue_notes): If epilogue
	contained no insns, reposition note before last insn.

From-SVN: r149158
2009-07-01 16:21:17 -07:00
Shujing Zhao 481683e1d5 alias.c: Use REG_P...
2009-06-22  Shujing Zhao  <pearly.zhao@oracle.com>

	* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
	JUMP_TABLE_DATA_P predicates where applicable.
	* auto-inc-dec.c: Ditto.
	* builtins.c: Ditto.
	* caller-save.c: Ditto.
	* calls.c: Ditto.
	* cfgcleanup.c: Ditto.
	* cfglayout.c: Ditto.
	* cfgrtl.c: Ditto.
	* combine.c: Ditto.
	* combine-stack-adj.c: Ditto.
	* cse.c: Ditto.
	* cselib.c: Ditto.
	* dbxout.c: Ditto.
	* df-scan.c: Ditto.
	* dse.c: Ditto.
	* dwarf2asm.c: Ditto.
	* dwarf2out.c: Ditto.
	* emit-rtl.c: Ditto.
	* except.c: Ditto.
	* explow.c: Ditto.
	* expmed.c: Ditto.
	* expr.c: Ditto.
	* final.c: Ditto.
	* function.c: Ditto.
	* fwprop.c: Ditto.
	* gcse.c: Ditto.
	* genpreds.c: Ditto.
	* genrecog.c: Ditto.
	* ifcvt.c: Ditto.
	* ira-costs.c: Ditto.
	* ira-lives.c: Ditto.
	* jump.c: Ditto.
	* loop-iv.c: Ditto.
	* lower-subreg.c: Ditto.
	* modulo-sched.c: Ditto.
	* optabs.c: Ditto.
	* postreload.c: Ditto.
	* print-rtl.c: Ditto.
	* recog.c: Ditto.
	* reginfo.c: Ditto.
	* regmove.c: Ditto.
	* reload1.c: Ditto.
	* reload.c: Ditto.
	* reorg.c: Ditto.
	* rtlanal.c: Ditto.
	* rtl.c: Ditto.
	* sched-vis.c: Ditto.
	* sdbout.c: Ditto.
	* sel-sched-ir.c: Ditto.
	* simplify-rtx.c: Ditto.
	* targhooks.c: Ditto.
	* var-tracking.c: Ditto.
	* vmsdbgout.c: Ditto.

From-SVN: r148786
2009-06-22 10:29:13 +00:00
Aldy Hernandez c2255bc488 java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt.
gcc/java/
	* java-gimplify.c (java_gimplify_block): New argument to
	build_empty_stmt.
	* expr.c (force_evaluation_order): Same.
	* typeck.c: Add location to build_decl or PUSH_FIELD calls.
	* class.c: Same.
	* decl.c: Same.
	* jcf-parse.c: Same.
	* constants.c: Same.
	* resource.c: Same.
	* except.c: Same.
	* builtins.c: Same.
	* expr.c: Same.
	* java-tree.h (PUSH_FIELD): Add location field.
gcc/objc/
	* objc-act.c (finish_var_decl): Pass location to finish_decl.
	(objc_get_parm_info): Same.
	(get_super_receiver): Same.
	* objc-act.c (objc_build_component_ref): Pass location to
	build_compound_ref.
	(build_module_initializer_routine): Pass location to
	c_end_compound_stmt.
	(objc_generate_static_init_call): Pass location to build_stmt.
	(build_typed_selector_reference): New location argument.
	(build_selector_reference): Same.
	(objc_substitute_decl): Pass location to build_array_ref.
	(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
	(objc_begin_catch_clause): Same.
	(objc_finish_try_stmt): Same.
	(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
	(objc_build_throw_stmt): New argument.
	(generate_shared_structures): Pass location to build_c_cast.
	(objc_build_message_expr): Use local location.
	(objc_finish_message_expr): Use input_location.
	(build_objc_method_call): New argument.
	(objc_build_selector_expr): Same.
	(get_super_receiver): Pass location to build_c_cast,
	build_modify_expr, build_compound_expr.
	* objc-act.c: Add location to all calls to start_struct, build_decl,
	finish_struct.
gcc/
	* tree-pretty-print.c (dump_generic_node): Dump column numbers.
	* gimple-pretty-print.c (dump_gimple_stmt): Same.
	* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
	created.
	* c-parser.c (c_parser_binary_expression): Use current column while
	building binary operations.
	* common.opt (fshow-column): Enable by default.
	* tree-vrp.c (check_array_ref): Use warning_at.
	(check_array_bounds): Use location from call back if expr has no
	location.
	* tree.h: Add location argument to maybe_fold_*.
	* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
	(maybe_fold_offset_to_array_ref): Add location argument and use it.
	(maybe_fold_offset_to_component_ref): Same.
	(maybe_fold_offset_to_reference): Same.
	(maybe_fold_offset_to_address): Same.
	(maybe_fold_stmt_indirect): Same.
	(maybe_fold_stmt_addition): Same.
	(fold_stmt_r): Pass location to maybe_fold_*.
	(fold_gimple_assign): Same.
	* c-tree.h: Add location argument to finish_decl,
	default_function_array_conversion, store_init_value.
	* c-decl.c (define_label): Use error_at.
	(c_make_fname_decl): Pass location to finish_decl.
	(finish_decl): New location argument.
	(build_compound_literal): Pass location to store_init_value.
	(grokdeclarator): Pass location to finish_decl.
	(grokfield): Same.
	* c-typeck.c (array_to_pointer_conversion): New location argument.
	(function_to_pointer_conversion): Same.
	(default_function_array_conversion): Same.
	(parser_build_unary_op): Pass location to overflow_warning.
	(parser_build_binary_op): Same.  Use warning_at.
	(build_unary_op): Pass location to array_to_pointer_conversion.
	(build_c_cast): Pass location to digest_init.
	(build_modify_expr): New location argument.
	(convert_for_assignment): Same.
	(store_init_value): Same.
	(digest_init): Same.
	(output_init_element): Pass location to digest_init and
	array_to_pointer_conversion.
	(c_finish_return): Pass location to convert_for_assignment.
	* gimplify.c (gimplify_conversion): Pass location to
	maybe_fold_offset_to_address.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
	to maybe_fold_stmt_addition.
	* c-omp.c (c_finish_omp_atomic): Pass new location to
	build_modify_expr.
	(c_finish_omp_for): Same.
	* c-common.c (overflow_warning): New argument.
	* c-common.h: New argument to build_modify_expr, overflow_warning.
	* c-parser.c (c_parser_declaration_or_fndef): Pass location to
	finish_decl.
	(c_parser_initializer): Pass location to
	default_function_array_conversion.
	(c_parser_initelt): Same.
	(c_parser_initval): Same.
	(c_parser_asm_operands): Same.
	(c_parser_expr_no_commas): Same.  Pass location to build_modify_expr.
	(c_parser_conditional_expression): Same.
	(c_parser_binary_expression): Add location info to stack.  Use it.
	(c_parser_unary_expression): Pass location to
	default_function_array_conversion, parser_build_unary_op,
	build_indirect_ref, c_parser_postfix_expression_after_primary.
	(c_parser_postfix_expression_after_primary): New location argument.
	Use it.
	(c_parser_expression_conv): Pass location to
	default_function_array_conversion.
	(c_parser_expr_list): Same.
	(c_parser_omp_atomic): Same.
	(c_parser_omp_for_loop): Same.
	* c-tree.h: (struct c_declarator): Add comment to id_loc.
	(build_array_declarator): New argument.
	* c-decl.c (build_array_declarator): Add location argument.
	(grokdeclarator): Set id_loc for cdk_array.
	* c-parser.c (c_parser_direct_declarator_inner): Pass location to
	build_array_declarator.
	* tree.c (build_omp_clause): Add location argument.
	* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
	(OMP_CLAUSE_LOCATION): New macro.
	(struct tree_omp_clause): Add location field.
	(build_omp_clause): Add argument.
	* testsuite/gcc.dg/gomp/for-1.c: Fix column.
	* cp/pt.c (tsubst_omp_for_iterator): Pass location to
	build_omp_clause.
	* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
	(cp_parser_omp_clause_collapse): Same.
	(cp_parser_omp_clause_default): Same.
	(cp_parser_omp_clause_if): Same.
	(cp_parser_omp_clause_nowait): Same.
	(cp_parser_omp_clause_num_threads): Same.
	(cp_parser_omp_clause_ordered): Same.
	(cp_parser_omp_clause_schedule): Same.
	(cp_parser_omp_clause_untied): Same.
	(cp_parser_omp_for_loop): Same.
	(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
	* c-tree.h (c_start_case): Add location argument.
	(c_process_expr_stmt): Same.
	(c_finish_goto_*): Same.
	* tree-parloops.c (initialize_reductions): Pass location to
	build_omp_clause.
	(create_parallel_loop): Same.
	* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
	(gfc_trans_omp_reduction_list): Same.
	(gfc_trans_omp_clauses): Same.
	(gfc_trans_omp_do): Same.
	* c-typeck.c (c_finish_goto_label): Same.
	(c_finish_goto_ptr): New location argument.
	(c_start_case): Same.
	(emit_side_effect_warnings): Same.
	(c_process_expr_stmt): Same.
	(c_finish_stmt_expr): Same.
	(c_finish_omp_clauses): Use error_at instead of error.
	* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
	build_omp_clause.
	* c-omp.c (c_split_parallel_clauses): New location argument.
	* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
	to build_omp_clause.
	(convert_local_reference_stmt): Same.
	(convert_gimple_call): Same.
	* c-common.h (c_split_parallel_clauses): New argument.
	* c-parser.c (c_parser_statement_after_labels): Pass location to
	c_finish_goto_label.
	(c_parser_switch_statement): Pass location to c_start_case.
	(c_parser_for_statement): Pass location to c_finish_expr_stmt,
	and c_process_expr_stmt.
	(c_parser_omp_variable_list): Add location argument.
	(c_parser_omp_clause_collapse): Pass location to
	build_omp_clause.
	(c_parser_omp_clause_default): Same.
	(c_parser_omp_clause_if): Same.
	(c_parser_omp_clause_num_threads): Same.
	(-c_parser_omp_clause_ordered): Same.
	(c_parser_omp_clause_reduction): Pass location to
	c_parser_omp_variable_list.
	(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
	(c_parser_omp_clause_untied): Same.
	(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
	(c_parser_omp_parallel): Pass location to
	c_split_parallel_clauses.
	* c-tree.h (check_for_loop_decls, undeclared_variable,
	build_component_ref, build_array_ref, build_external_ref,
	c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
	build_conditional_expr, build_compound_expr, c_cast_expr,
	build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
	c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
	argument.
	* c-semantics.c (build_stmt): Same.
	(build_case_label): Same.
	* c-decl.c (c_finish_incomplete_decl): Pass location on down.
	(undeclared_variable): New argument.
	(make_label): Same.
	(lookup_label): Pass location on down.
	(define_label): Same.
	(finish_decl): Same.
	(build_compound_literal): Same.
	(finish_struct): Same.
	(finish_function): Do not set location here.
	(check_for_loop_decls): New argument.
	* tree.c (save_expr): Set location.
	(build_empty_stmt): New argument.
	* tree.h (build_empty_stmt): New argument to build_empty_stmt.
	(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
	* builtins.c (gimplify_va_arg_expr): Use locations.
	(expand_builtin_sync_operation): Same.
	* c-typeck.c (build_component_ref): New argument.
	(build_array_ref): Same.
	(build_external_ref): Same.
	(c_expr_sizeof_expr): Same.
	(c_expr_sizeof_type): Same.
	(parser_build_unary_op): Same.
	(build_conditional_expr): Same.
	(build_compound_expr): Pass location on down.
	(build_compound_expr): New argument.
	(build_c_cast): Same.
	(c_cast_expr): Same.
	(build_asm_expr): Same.
	(c_finish_return): Same.
	(c_process_expr_stmt): Pass location on down.
	(c_finish_stmt_expr): New argument.
	(push_clenaup): Same.
	(c_finish_omp_parallel): Same.
	(c_finish_omp_task): Same.
	* gimplify.c (gimplify_call_expr): Pass location on down.
	* c-omp.c (c_finish_omp_master): New argument.
	(c_finish_omp_critical): Same.
	(c_finish_omp_ordered): Same.
	(c_finish_omp_barrier): Same.
	(-c_finish_omp_taskwait): Same.
	(c_finish_omp_atomic): Same.
	(c_finish_omp_flush): Same.
	* tree-inline.c (copy_tree_body_r): Pass location on down.
	(inline_forbidden_p): Remove use of input_location.
	* c-gimplify.c (c_build_bind_expr): New argument.
	* c-common.c (c_common_truthvalue_conversion): Pass location on down.
	(c_sizeof_or_alignof_type): New argument.
	(c_alignof_expr): Same.
	(build_va_arg): Same.
	(c_add_case_label): Same.
	* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
	c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
	c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
	c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
	c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
	c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
	New argument.
	* stub-objc.c (objc_build_selector_expr): Same.
	(objc_build_throw_stmt): Same.
	* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
	(c_parser_initelt): Same.
	(c_parser_compound_statement): Same.
	(c_parser_compound_statement_nostart): Same.
	(c_parser_label): Same.
	(c_parser_statement_after_labels): Same.
	(c_parser_if_body): Same.
	(c_parser_else_body): Same.
	(c_parser_if_statement): Same.
	(c_parser_switch_statement): Same.
	(c_parser_while_statement): Same.
	(c_parser_do_statement): Same.
	(c_parser_for_statement): Same.
	(c_parser_asm_statement): Same.
	(c_parser_conditional_expression): Same.
	(c_parser_binary_expression): Same.
	(c_parser_cast_expression): Same.
	(c_parser_unary_expression): Same.
	(c_parser_sizeof_expression): Same.
	(c_parser_alignof_expression): Same.
	(c_parser_postfix_expression): Same.
	(c_parser_expression): Same.
	(c_parser_objc_receiver): Same.
	(c_parser_omp_variable_list): Same.
	(c_parser_omp_structured_block): Same.
	(c_parser_omp_atomic): New argument.
	(c_parser_omp_barrier): Same.
	(c_parser_omp_critical): Same.
	(c_parser_omp_flush): Pass location on down.
	(c_parser_omp_for_loop): New argument.
	(c_parser_omp_for): Same.
	(c_parser_omp_master): Same.
	(c_parser_omp_ordered): Same.
	(c_parser_omp_sections_scope): Same.
	(c_parser_omp_sections): Same.
	(c_parser_omp_parallel): Same.
	(c_parser_omp_single): Same.
	(c_parser_omp_task): Same.
	(c_parser_omp_taskwait): Pass location on down.
	(c_parser_omp_construct): Same.
	(c_parser_omp_threadprivate): Same.
	* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
	builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
	tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
	c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
	c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
	emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
	rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
	tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
	config/i386/i386.c, stmt.c:
	Add location argument to the following function definitions and/or
	function calls: build_decl, objcp_start_struct, objcp_finish_struct,
	start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
	cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
	build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
	do_case, c_finish_bc_stmt, build_compound_literal,
	build_function_call.
	* c-decl.c (build_compound_literal): Add location argument.
	Make all diagnostic calls use location.
	(start_struct): Same.
	(finish_struct): Same.
	(start_enum): Same.
	(build_enumerator): Same.
	(start_function): Same.
	(grokdeclarator): Make all diagnostic calls use location.
	(store_parm_decls_oldstyle): Same.
	* c-typeck.c (build_function_call): Add location argument.
	Make all diagnostic calls use location.
	(do_case): Same.
	(c_finish_bc_stmt): Same.
	* tree-nested.c (get_trampoline_type): Add argument.
	Pass location to build_decl.
	(lookup_tramp_for_decl): Pass location to get_trampoline_type.
	* rtl.h (RTL_LOCATION): New.
	* c-common.c (c_add_case_label): Add location argument.
	Make all diagnostic calls use location.
	* c-common.h: Add location argument to make_fname_decl, do_case,
	c_add_case_label, build_function_call, resolve_overloaded_builtin.
	* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
	Set it appropriately for every case.  Pass enum_loc to start_enum
	call.  Pass value_loc first to build_enumerator.  Pass enum_loc to
	parser_xref_tag.
	(c_parser_struct_or_union_specifier): Save location.  Use it for
	start_struct, finish_struct, and parser_xref_tag.
gcc/testsuite/
	* gcc.dg/old-style-prom-3.c: Add column info.
	* gcc.dg/overflow-warn-1.c
	* gcc.dg/gomp/pr27415.c
	* gcc.dg/gomp/for-1.c: Same.
	* gcc.dg/enum-compat-1.c: Same.
	* gcc.dg/c99-tag-3.c: Same.
	* gcc.dg/Wredundant-decls-2.c: Same.
	* gcc.dg/func-ptr-conv-1.c: Same.
	* gcc.dg/asm-wide-1.c: Same.
	* gcc.dg/nofixed-point-2.c: Same.
	* gcc.dg/cpp/line3.c: Same.
	* gcc.dg/array-10.c: Same.
	* gcc.dg/c99-vla-jump-1.c: Same.
	* gcc.dg/pr20368-1.c: Same.
	* gcc.dg/Wshadow-3.c: Same.
	* gcc.dg/c90-const-expr-8.c: Same.
	* gcc.dg/label-decl-2.c: Same.
	* gcc.dg/dremf-type-compat-2.c: Same.
	* gcc.dg/c90-const-expr-5.c: Same.
	* gcc.dg/builtins-30.c: Same.
	* gcc.dg/Warray-bounds.c: Same.
	* gcc.dg/Wcxx-compat-2.c: Same.
	* gcc.dg/tree-ssa/col-1.c: Same.
	* gcc.dg/old-style-prom-2.c: Same.
	* gcc.dg/cast-function-1.c: Same.
	* gcc.dg/pr15698-1.c: Same.
	* gcc.dg/dremf-type-compat-3.c: Same.
	* gcc.dg/vla-8.c: Same.
	* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
	line.
	* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
	* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
	* gcc.dg/enum-compat-1.c: Same.
	* gcc.dg/dremf-type-compat-2.c: Same.
	* gcc.dg/old-style-prom-2.c: Same.
	* gcc.dg/pr15698-1.c: Same.
	* gcc.dg/pr20368-1.c: Same.
	* gcc.dg/dremf-type-compat-3.c: Same.
	* gcc.dg/builtins-30.c: Same.  Test for columns.
gcc/objcp/
	* objcp-decl.h (c_end_compound_stmt): New argument.
	* objcp-decl.c (objcp_start_struct): Add argument.
	(objcp_finish_struct): Same.
gcc/cp/
	* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
	(build_modify_expr): New arg.
	* semantics.c (finish_unary_op_expr): Pass location to
	overflow_warning.
	(handle_omp_for_class_iterator): Pass location to build_modify_expr.
	* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
	c_sizeof_or_alignof_type.
	(build_array_ref): New argument.
	(build_compound_expr): Same.
	(build_const_cast): Same.
	(build_ptrmemfunc): Pass location to build_c_cast.
	* init.c (avoid_placement_new_aliasing): Pass location to
	build_stmt.
	(build_vec_delete_1): Pass location to cp_build_modify_expr,
	build_compound_expr.
	* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
	* decl.c (poplevel): Pass location to c_build_bind_expr.
	(finish_case_label): Pass location to build_case_label.
	(finish_constructor_body): Same.
	(finish_destructor_body): Pass location to build_stmt.
	(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
	* call.c (build_new_op): Pass location to build_array_ref.
	(build_x_va_arg): Pass location to build_va_arg.
	* except.c (expand_end_catch_block): Pass location to
	build_stmt.
	* cp-tree.h (build_array_ref): New argument.
	(build_compound_expr): Same.
	(build_c_cast): Same.
	* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
	(gimplify_switch_stmt): Same.
	* typeck2.c (split_nonconstant_init_1): Same.
	* pt.c (tsubst_copy): Same.
	* semantics.c (add_decl_expr): Same.
	(do_poplevel): Same.
	(push_cleanup): Same.
	(finish_goto_stmt): Same.
	(finish_expr_stmt): Same.
	(begin_if_stmt): Same.
	(begin_while_stmt): Same.
	(begin_do_stmt): Same.
	(finish_return_stmt): Same.
	(begin_for_stmt): Same.
	(finish_break_stmt): Same.
	(finish_continue_stmt): Same.
	(begin_switch_stmt): Same.
	(begin_try_block): Same.
	(begin_handler): Same.
	(finish_asm_stmt): Same.
	(finish_label_stmt): Same.
	(finish_stmt_expr_expr): Same.
	(finalize_nrv_r): Same.
	(finish_omp_atomic): Same.
	* name-lookup.c (do_using_directive): Same.
	* decl2.c (grok_array_decl): Same.
	* parser.c (cp_parser_cast_expression): Same.
	(cp_parser_selection_statement): Same.
	(cp_parser_implicitly_scoped_statement): Same.
	(cp_parser_objc_selector_expression): Same.
	(cp_parser_objc_synchronized_statement): Same.
	(cp_parser_objc_throw_statement): Same.
	(cp_parser_omp_critical): Same.
	(cp_parser_omp_master): Same.
	* typeck.c (build_function_call): Add location argument.
	* init.c: Add location argument to all build_decl calls.
	* class.c: Same.
	* method.c: Same.
	* rtti.c: Same.
	* tree.c: Same.
	* pt.c: Same.
	* semantics.c: Same.
	* lex.c: Same.
	* decl2.c: Same.
	* cp-gimplify.c: Same.
	* decl.c: Same.
	(cp_make_fname_decl): Add location argument.  Pass location ot
	build_decl.
	(finish_case_label): Same.
	* cp-tree.h (finish_case_label): Add location argument.
	* parser.c (cp_parser_label_for_labeled_statement): Pass location to
	finish_case_label.
gcc/fortran/
	* trans-array.c (gfc_trans_allocate_array_storage): Pass
	location on down.
	(gfc_trans_array_constructor_value): Same.
	(gfc_trans_scalarized_loop_end): Same.
	(gfc_conv_ss_startstride): Same.
	(gfc_trans_g77_array): Same.
	(gfc_trans_dummy_array_bias): Same.
	(gfc_conv_array_parameter): Same.
	(structure_alloc_comps): Same.
	* trans-expr.c (gfc_conv_function_call): Same.
	(fill_with_spaces): Same.
	(gfc_trans_string_copy): Same.
	(gfc_trans_scalar_assign): Same.
	* trans-stmt.c (gfc_trans_goto): Same.
	(gfc_trans_if_1): Same.
	(gfc_trans_simple_do): Same.
	(gfc_trans_do): Same.
	(gfc_trans_do_while): Same.
	(gfc_trans_logical_select): Same.
	(gfc_trans_select): Same.
	(gfc_trans_forall_loop): Same.
	(gfc_trans_nested_forall_loop): Same.
	(generate_loop_for_temp_to_lhs): Same.
	(generate_loop_for_rhs_to_temp): Same.
	(gfc_trans_forall_1): Same.
	(gfc_trans_where_assign): Same.
	(gfc_trans_where_3): Same.
	(gfc_trans_allocate): Same.
	* trans.c (gfc_finish_block): Same.
	(gfc_trans_runtime_check): Same.
	(gfc_call_malloc): Same.
	(gfc_allocate_with_status): Same.
	(gfc_call_free): Same.
	(gfc_deallocate_with_status): Same.
	(gfc_call_realloc): Same.
	(gfc_trans_code): Same.
	* trans-decl.c (gfc_init_default_dt): Same.
	(gfc_generate_constructors): Same.
	* trans-io.c (gfc_trans_io_runtime_check): Same.
	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
	(gfc_conv_intrinsic_fdate): Same.
	(gfc_conv_intrinsic_ttynam): Same.
	(gfc_conv_intrinsic_minmax): Same.
	(gfc_conv_intrinsic_minmax_char): Same.
	(gfc_conv_intrinsic_anyall): Same.
	(gfc_conv_intrinsic_count): Same.
	(gfc_conv_intrinsic_arith): Same.
	(gfc_conv_intrinsic_minmaxloc): Same.
	(gfc_conv_intrinsic_minmaxval): Same.
	(gfc_conv_intrinsic_rrspacing): Same.
	(gfc_conv_intrinsic_array_transfer): Same.
	(gfc_conv_intrinsic_trim): Same.
	(gfc_conv_intrinsic_repeat): Same.

From-SVN: r148442
2009-06-12 22:06:47 +00:00
Joey Ye f85882d8e1 re PR target/39146 (Unnecessary stack alignment)
gcc/

2009-06-12  Joey Ye  <joey.ye@intel.com>

	PR middle-end/39146
	* cfgexpand.c (get_decl_align_unit): Update
	max_used_stack_slot_alignment with align instead of
	stack_alignment_needed.

	* function.c (assign_stack_local_1): Update
	max_used_stack_slot_alignment with alignment_in_bits instead
	of stack_alignment_needed.
	(locate_and_pad_parm): Don't update max_used_stack_slot_alignment
	here.

gcc/testsuite/

2009-06-12  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/39146
	* gcc.target/i386/stackalign/pr39146.c: New.

From-SVN: r148428
2009-06-12 05:54:30 -07:00
Richard Henderson cd9c1ca866 cfgcleanup.c (try_crossjump_to_edge): Only skip past NOTE_INSN_BASIC_BLOCK.
* cfgcleanup.c (try_crossjump_to_edge): Only skip past
	NOTE_INSN_BASIC_BLOCK.
	* cfglayout.c (duplicate_insn_chain): Copy epilogue insn marks.
	Duplicate NOTE_INSN_EPILOGUE_BEG notes.
	* cfgrtl.c (can_delete_note_p): Allow NOTE_INSN_EPILOGUE_BEG
	to be deleted.
	* dwarf2out.c (struct cfa_loc): Change indirect field to bitfield,
	add in_use field.
	(add_cfi): Disable check redefining cfa away from drap.
	(lookup_cfa_1): Add remember argument; handle remember/restore.
	(lookup_cfa): Pass remember argument.
	(cfa_remember): New.
	(compute_barrier_args_size_1): Remove sibcall check.
	(dwarf2out_frame_debug_def_cfa): New.
	(dwarf2out_frame_debug_adjust_cfa): New.
	(dwarf2out_frame_debug_cfa_offset): New.
	(dwarf2out_frame_debug_cfa_register): New.
	(dwarf2out_frame_debug_cfa_restore): New.
	(dwarf2out_frame_debug): Handle REG_CFA_* notes.
	(dwarf2out_begin_epilogue): New.
	(dwarf2out_frame_debug_restore_state): New.
	(dw_cfi_oprnd1_desc): Handle DW_CFA_remember_state,
	DW_CFA_restore_state.
	(output_cfi_directive): Likewise.
	(convert_cfa_to_fb_loc_list): Likewise.
	(dw_cfi_oprnd1_desc): Handle DW_CFA_restore.
	* dwarf2out.h: Update.
	* emit-rtl.c (try_split): Don't split RTX_FRAME_RELATED_P.
	(copy_insn_1): Early out for null.
	* final.c (final_scan_insn): Call dwarf2out_begin_epilogue
	and dwarf2out_frame_debug_restore_state.
	* function.c (prologue, epilogue, sibcall_epilogue): Remove.
	(prologue_insn_hash, epilogue_insn_hash): New.
	(free_after_compilation): Adjust freeing accordingly.
	(record_insns): Create hash table if needed; push insns into
	hash instead of array.
	(maybe_copy_epilogue_insn): New.
	(contains): Search hash table instead of array.
	(sibcall_epilogue_contains): Remove.
	(thread_prologue_and_epilogue_insns): Split eh_return insns
	and mark them as epilogues.
	(reposition_prologue_and_epilogue_notes): Rewrite epilogue
	scanning in terms of basic blocks.
	* insn-notes.def (CFA_RESTORE_STATE): New.
	* jump.c (returnjump_p_1): Accept EH_RETURN.
	(eh_returnjump_p_1, eh_returnjump_p): New.
	* reg-notes.def (CFA_DEF_CFA, CFA_ADJUST_CFA, CFA_OFFSET,
	CFA_REGISTER, CFA_RESTORE): New.
	* rtl.def (EH_RETURN): New.
	* rtl.h (eh_returnjump_p, maybe_copy_epilogue_insn): Declare.

	* config/bfin/bfin.md (UNSPEC_VOLATILE_EH_RETURN): Remove.
	(eh_return_internal): Use eh_return rtx; split w/ epilogue.

	* config/i386/i386.c (gen_push): Update cfa state.
	(pro_epilogue_adjust_stack): Add set_cfa argument.  When true,
	add a CFA_ADJUST_CFA note.
	(ix86_dwarf_handle_frame_unspec): Remove.
	(ix86_expand_prologue): Update cfa state.
	(ix86_emit_restore_reg_using_pop): New.
	(ix86_emit_restore_regs_using_pop): New.
	(ix86_emit_leave): New.
	(ix86_emit_restore_regs_using_mov): Add CFA_RESTORE notes.
	(ix86_expand_epilogue): Add notes for unwinding the epilogue.
	* config/i386/i386.h (struct machine_cfa_state): New.
	(ix86_cfa_state): New.
	* config/i386/i386.md (UNSPEC_EH_RETURN): Remove.
	(eh_return_internal): Merge from eh_return_<mode>,
	use eh_return rtx, split w/ epilogue.

From-SVN: r147995
2009-05-29 17:33:46 -07:00
Taras Glek d1b382088a hashtab.h: Update GTY annotations to new syntax
2009-04-21  Taras Glek <tglek@mozilla.com>

	* include/hashtab.h: Update GTY annotations to new syntax
	* include/splay-tree.h: Likewise


gcc/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* alias.c: Update GTY annotations to new syntax
	* basic-block.h: Likewise
	* bitmap.h: Likewise
	* c-common.h: Likewise
	* c-decl.c: Likewise
	* c-parser.c: Likewise
	* c-pragma.c: Likewise
	* c-tree.h: Likewise
	* cfgloop.h: Likewise
	* cgraph.h: Likewise
	* config/alpha/alpha.c: Likewise
	* config/arm/arm.h: Likewise
	* config/avr/avr.h: Likewise
	* config/bfin/bfin.c: Likewise
	* config/cris/cris.c: Likewise
	* config/darwin.c: Likewise
	* config/frv/frv.c: Likewise
	* config/i386/i386.c: Likewise
	* config/i386/i386.h: Likewise
	* config/i386/winnt.c: Likewise
	* config/ia64/ia64.h: Likewise
	* config/iq2000/iq2000.c: Likewise
	* config/mips/mips.c: Likewise
	* config/mmix/mmix.h: Likewise
	* config/pa/pa.c: Likewise
	* config/pa/pa.h: Likewise
	* config/rs6000/rs6000.c: Likewise
	* config/s390/s390.c: Likewise
	* config/sparc/sparc.c: Likewise
	* config/xtensa/xtensa.c: Likewise
	* cselib.h: Likewise
	* dbxout.c: Likewise
	* dwarf2out.c: Likewise
	* except.c: Likewise
	* except.h: Likewise
	* fixed-value.h: Likewise
	* function.c: Likewise
	* function.h: Likewise
	* gimple.h: Likewise
	* integrate.c: Likewise
	* optabs.c: Likewise
	* output.h: Likewise
	* real.h: Likewise
	* rtl.h: Likewise
	* stringpool.c: Likewise
	* tree-data-ref.c: Likewise
	* tree-flow.h: Likewise
	* tree-scalar-evolution.c: Likewise
	* tree-ssa-address.c: Likewise
	* tree-ssa-alias.h: Likewise
	* tree-ssa-operands.h: Likewise
	* tree.c: Likewise
	* tree.h: Likewise
	* varasm.c: Likewise
	* varray.h: Likewise
	* vec.h: Likewise
	* coretypes.h: Do not define GTY macro if it is already defined
	* doc/gty.texi: Update GTY documentation to new syntax
	* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
	* gengtype-parse.c: Likewise


gcc/ada/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
	* gcc-interface/trans.c: Likewise
	* gcc-interface/utils.c: Likewise


gcc/cp/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* cp-tree.h: Update GTY annotations to new syntax
	* decl.c: Likewise
	* mangle.c: Likewise
	* name-lookup.c: Likewise
	* name-lookup.h: Likewise
	* parser.c: Likewise
	* pt.c: Likewise
	* rtti.c: Likewise
	* semantics.c: Likewise
	* typeck2.c: Likewise


gcc/fortran/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* f95-lang.c: Update GTY annotations to new syntax
	* trans-intrinsic.c: Likewise
	* trans-io.c: Likewise
	* trans.h: Likewise


gcc/java/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* builtins.c: Update GTY annotations to new syntax
	* decl.c: Likewise
	* java-tree.h: Likewise
	* jcf.h: Likewise
	* lang.c: Likewise


gcc/objc/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* objc-act.c: Update GTY annotations to new syntax
	* objc-act.h: Likewise


libcpp/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* include/cpp-id-data.h: Update GTY annotations to new syntax
	* include/cpplib.h: Likewise
	* include/line-map.h: Likewise
	* include/symtab.h: Likewise

From-SVN: r146607
2009-04-22 14:29:36 -04:00
Ulrich Weigand 4c33221ccd function.c (expand_function_end): Do not emit a jump to the "naked" return label for fall-through returns.
* function.c (expand_function_end): Do not emit a jump to the "naked"
	return label for fall-through returns.
	* except.c (sjlj_emit_function_exit): Always place the call to the
	unregister function at the location installed by expand_function_end.

From-SVN: r146570
2009-04-22 11:31:56 +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
Ian Lance Taylor 7072a650e3 df.h: Include "timevar.h".
* df.h: Include "timevar.h".
	(struct df_problem): Change tv_id field to timevar_id_t.
	* tree-pass.h: Include "timevar.h".
	(struct opt_pass): Change tv_id field to timevar_id_t.
	* timevar.h (timevar_id_t): Define TV_NONE.
	* passes.c (execute_one_ipa_transform_pass): Check for tv_id !=
	TV_NONE rather than tv_id != 0.
	(execute_one_pass): Likewise.
	* Makefile.in (DF_H): Add $(TIMEVAR_H).
	(TREE_PASS_H): Define.  Change all instances of tree-pass.h in
	dependencies to $(TREE_PASS_H).
	* bt-load.c (pass_branch_target_load_optimize1): Set tv_id field
	to TV_NONE.
	(pass_branch_target_load_optimize2): Likewise.
	* cfglayout.c (pass_into_cfg_layout_mode): Likewise.
	(pass_outof_cfg_layout_mode): Likewise.
	* cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise.
	(pass_rebuild_cgraph_edges): Likewise.
	(pass_remove_cgraph_callee_edges): Likewise.
	* df-core.c (pass_df_initialize_opt): Likewise.
	(pass_df_initialize_no_opt): Likewise.
	(pass_df_finish): Likewise.
	* emit-rtl.c (pass_unshare_all_rtl): Likewise.
	* except.c (pass_set_nothrow_function_flags): Likewise.
	(pass_convert_to_eh_region_ranges): Likewise.
	* final.c (pass_compute_alignments): Likewise.
	* function.c (pass_instantiate_virtual_regs): Likewise.
	(pass_init_function): Likewise.
	(pass_leaf_regs): Likewise.
	(pass_match_asm_constraints): Likewise.
	* gimple-low.c (pass_lower_cf): Likewise.
	(pass_mark_used_blocks): Likewise.
	* init-regs.c (pass_initialize_regs): Likewise.
	* integrate.c (pass_initial_value_sets): Likewise.
	* ira.c (pass_ira): Likewise.
	* jump.c (pass_cleanup_barriers): Likewise.
	* omp-low.c (pass_expand_omp): Likewise.
	(pass_lower_omp): Likewise.
	* matrix-reorg.c (pass_ipa_matrix_reorg): Likewise.
	* recog.c (pass_split_all_insns): Likewise.
	(pass_split_after_reload): Likewise.
	(pass_split_before_regstack): Likewise.
	(pass_split_before_sched2): Likewise.
	(pass_split_for_shorten_branches): Likewise.
	* reginfo.c (pass_reginfo_init): Likewise.
	(pass_subregs_of_mode_init): Likewise.
	(pass_subregs_of_mode_finish): Likewise.
	* passes.c (pass_postreload): Likewise.
	* stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
	* tree-cfg.c (pass_remove_useless_stmts): Likewise.
	(pass_warn_function_return): Likewise.
	(pass_warn_function_noreturn): Likewise.
	* tree-complex.c (pass_lower_complex): Likewise.
	(pass_lower_complex_O0): Likewise.
	* tree-if-conv.c (pass_if_conversion): Likewise.
	* tree-into-ssa.c (pass_build_ssa): Likewise.
	* tree-mudflap.c (pass_mudflap_1): Likewise.
	(pass_mudflap_2): Likewise.
	* tree-nomudflap.c (pass_mudflap_1): Likewise.
	(pass_mudflap_2): Likewise.
	* tree-nrv.c (pass_return_slot): Likewise.
	* tree-object-size.c (pass_object_sizes): Likewise.
	* tree-optimize.c (pass_all_optimizations): Likewise.
	(pass_early_local_passes): Likewise.
	(pass_all_early_optimizations): Likewise.
	(pass_cleanup_cfg): Likewise.
	(pass_cleanup_cfg_post_optimizing): Likewise.
	(pass_free_datastructures): Likewise.
	(pass_free_cfg_annotations): Likewise.
	(pass_fixup_cfg): Likewise.
	(pass_init_datastructures): Likewise.
	* tree-ssa.c (pass_early_warn_uninitialized): Likewise.
	(pass_late_warn_uninitialized): Likewise.
	(pass_update_address_taken): Likewise.
	* tree-ssa-ccp.c (pass_fold_builtins): Likewise.
	* tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise.
	(pass_cse_sincos): Likewise.
	(pass_convert_to_rsqrt): Likewise.
	* tree-ssa-structalias.c (pass_build_alias): Likewise.
	* tree-stdarg.c (pass_stdarg): Likewise.
	* tree-tailcall.c (pass_tail_recursion): Likewise.
	(pass_tail_calls): Likewise.
	* tree-vect-generic.c (pass_lower_vector): Likewise.
	(pass_lower_vector_ssa): Likewise.
	* tree-vectorizer.c (pass_ipa_increase_alignment): Likewise.

From-SVN: r146222
2009-04-17 05:40:46 +00:00
Kazu Hirata c7db7fa5ac function.c (current_function_assembler_name): Remove.
* function.c (current_function_assembler_name): Remove.
	* function.h: Remove the prototype for
	current_function_assembler_name.

From-SVN: r146209
2009-04-16 18:39:21 +00:00
Jakub Jelinek d130d647f6 re PR debug/39485 (-O0 -g still puts whole object to a register)
PR debug/39485
	* function.c (use_register_for_decl): When not optimizing, disregard
	register keyword for variables with types containing methods.

From-SVN: r144939
2009-03-18 18:06:15 +01:00
Jakub Jelinek 8f5929e11f dse.c (struct group_info): Reorder fields for 64-bit hosts.
* dse.c (struct group_info): Reorder fields for 64-bit hosts.
	* matrix-reorg.c (struct matrix_info): Likewise.
	* tree-ssa-loop-ivopts.c (struct ivopts_data): Likewise.
	* rtl.h (struct mem_attrs): Likewise.
	* df.h (struct df): Likewise.
	* tree-data-ref.h (struct data_dependence_relation): Likewise.
	* ira-int.h (struct ira_allocno): Likewise.
	* df-scan.c (struct df_collection_rec): Likewise.
	* ira.c (struct equivalence): Likewise.
	* function.c (struct temp_slot): Likewise.
	* cfgloop.h (struct loop): Likewise.

	* parser.c (struct cp_token): Reorder fields for 64-bit hosts.
	(eof_token): Adjust.

	* include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.

From-SVN: r144938
2009-03-18 18:04:26 +01:00
Ulrich Weigand 3a695389b3 re PR middle-end/38028 (eh failures on spu-elf)
PR middle-end/38028
	* function.c (assign_parm_setup_stack): Use STACK_SLOT_ALIGNMENT to
	determine alignment passed to assign_stack_local.
	(assign_parms_unsplit_complex): Likewise.
	* except.c (sjlj_build_landing_pads): Likewise.

From-SVN: r144696
2009-03-07 16:02:30 +00:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Jakub Jelinek 70f1628747 re PR target/35318 (ICE with inline asm in reload)
PR target/35318
	* function.c (match_asm_constraints_1): Skip over
	initial optional % in the constraint.

	* gcc.c-torture/compile/pr35318.c: New test.

From-SVN: r143901
2009-02-03 18:27:45 +01:00
Richard Earnshaw c433cb14ae function.c (aggregate_value_p): Correctly extract the function type from CALL_EXPR_FN lookup.
* function.c (aggregate_value_p): Correctly extract the function
	type from CALL_EXPR_FN lookup.

From-SVN: r143432
2009-01-16 13:20:32 +00:00
Steven Bosscher fb0703f704 re PR middle-end/38586 (quadratic behaviour in find_temp_slot_from_address.)
PR middle-end/38586
	* function.c (struct temp_slot): Move to the section of the file
	that deals with temp slots.  Remove field 'address'.
	(temp_slot_address_table): New hash table of address -> temp slot.
	(struct temp_slot_address_entry): New struct, items for the table.
	(temp_slot_address_compute_hash, temp_slot_address_hash,
	temp_slot_address_eq, insert_temp_slot_address): Support functions
	for the new table.
	(find_temp_slot_from_address): Rewrite to use the new hash table.
	(remove_unused_temp_slot_addresses): Remove addresses of temp
	slots that have been made available.
	(remove_unused_temp_slot_addresses_1): Call-back for htab_traverse,
	worker function for remove_unused_temp_slot_addresses.
	(assign_stack_temp_for_type): Don't clear the temp slot address list.
	Add the temp slot address to the address -> temp slot map.
	(update_temp_slot_address): Update via insert_temp_slot_address.
	(free_temp_slots): Call remove_unused_temp_slot_addresses.
	(pop_temp_slots): Likewise.
	(init_temp_slots): Allocate the address -> temp slot map, or empty
	the map if it is already allocated.
	(prepare_function_start): Initialize temp slot processing.

From-SVN: r143041
2009-01-04 00:15:58 +00:00
Kai Tietz 4576913435 function.c (aggregate_value_p): Get fntype from CALL_EXPR in any case.
2008-12-09  Kai Tietz  <kai.tietz@onevision.com>

	PR/38366
	* function.c (aggregate_value_p): Get fntype from CALL_EXPR in any
	case.
	* calls.c (nitialize_argument_information): Add fntype argument 
	and use it for calls.promote_function_args.
        (expand_call): Pass fntype to aggregate_value_p if no fndecl
	available and pass additional fntype to
	initialize_argument_information.
	* config/i386/i386.c (ix86_reg_parm_stack_space): Remove cfun part
	to get function abi type.
	(init_cumulative_args): Use for abi kind detection fntype, when no
	fndecl is available.

From-SVN: r142584
2008-12-09 10:14:28 +01:00
Richard Henderson 179d2f74d4 re PR middle-end/38240 (Vector type definitions not compatible with attribute target)
PR 38240
	* tree.h (TYPE_MODE): Invoke vector_type_mode when needed.
	(SET_TYPE_MODE): New.
	* c-decl.c (parser_xref_tag): Use it.
	(finish_enum): Likewise.
	* tree.c (build_pointer_type_for_mode): Likewise.
	(build_reference_type_for_mode, build_index_type): Likewise.
	(build_range_type, make_vector_type): Likewise.
	(build_common_tree_nodes_2): Likewise.
	* stor-layout.c (compute_record_mode): Likewise.
	(finalize_type_size, layout_type, make_fract_type): Likewise.
	(make_accum_type, initialize_sizetypes): Likewise.
	(vector_type_mode): New.
	* function.c (allocate_struct_function): Call
	invoke_set_current_function_hook before querying anything else.

	* config/i386/i386.c (ix86_valid_target_attribute_inner_p): Add avx.

cp/
	* class.c (finish_struct_bits): Use SET_TYPE_MODE.
	* decl.c (record_unknown_type): Likewise.
	(start_enum, finish_enum): Likewise.

From-SVN: r142556
2008-12-08 09:12:55 -08:00
Jakub Jelinek 997f78fb1d re PR debug/38367 (Wrong debug information for big endian function parameters)
PR debug/38367
	* function.c (assign_parm_find_stack_rtl): If promoted_mode
	is wider than DECL_MODE, adjust MEM_OFFSET (stack_parm) for
	big endian.

From-SVN: r142481
2008-12-05 17:53:39 +01:00
Jakub Jelinek bbd46fd5f2 re PR middle-end/37316 (Small structs are not passed correctly on hppa64-*-*)
PR middle-end/37316
	* function.c (assign_parm_remove_parallels): Pass
	data->passed_type as third argument to emit_group_store.

From-SVN: r142115
2008-11-22 09:27:04 +01:00
Jakub Jelinek 04487a2f0b re PR middle-end/36125 (FAIL: 26_numerics/complex/13450.cc: ICE in verify_gimple_expr, at tree-cfg.c:3962)
PR middle-end/36125
	* function.c (gimplify_parameters): For callee copies parameters,
	move TREE_ADDRESSABLE flag from the PARM_DECL to the local copy.

	* gcc.c-torture/compile/pr36125.c: New test.

From-SVN: r141848
2008-11-14 08:50:52 +01:00
Michael Meissner 099590dcb6 PR target/37841: Fix SPU abi
From-SVN: r141356
2008-10-24 23:45:02 +00:00
Jakub Jelinek 802e9f8e7c re PR debug/34037 (Bounds for VLAs not emitted into debuginfo)
PR debug/34037
	* gimplify.c (gimplify_type_sizes): When not optimizing, ensure
	TYPE_MIN_VALUE and TYPE_MAX_VALUE is not is not DECL_IGNORED_P
	VAR_DECL.
	* cfgexpand.c (expand_used_vars): Keep DECL_ARTIFICIAL
	!DECL_IGNORED_P vars in local_decls list for instantiate_decls,
	ggc_free other TREE_LIST nodes from that chain.
	* function.c (instantiate_decls): Instantiate also DECL_RTL
	of vars in cfun->local_decls, free that list afterwards.

From-SVN: r140459
2008-09-18 17:17:10 +02:00
Jan Hubicka 936fc9bad2 cgraph.c (cgraph_release_function_body): Plug memory leak on ipa_transforms_to_apply and CFG...
* cgraph.c (cgraph_release_function_body): Plug memory leak on
	ipa_transforms_to_apply and CFG; ggc_free gimple df and struct function
	so we are sure we do not dangle it forever.
	* function.c (outer_function_chain, find_function_data): Remove.
	(function_context_stack): New.
	(push_function_context, pop_function_context): Update.
	* function.h (struct function): Remove pointer outer.
	(outer_function_chain, find_function_data): Remove.
	* stmt.c (force_label_rtx): Remove dead call of find_function_data.

From-SVN: r140285
2008-09-11 12:41:36 +00:00
Jan Hubicka 825b2fe7a8 function.c (free_after_compilation): Call insn_locators_free.
* function.c (free_after_compilation): Call insn_locators_free.
	* cfglayout.c (insn_locators_free): New function.
	* rtl.h (insn_locators_free): Declare.

From-SVN: r140279
2008-09-11 12:31:40 +00:00
Jakub Jelinek fd0a8853d0 re PR rtl-optimization/37408 (Invalid insn scheduling)
PR rtl-optimization/37408
	* function.c (assign_parm_find_stack_rtl): Set correct MEM_SIZE
	if parm is promoted.

From-SVN: r140166
2008-09-09 21:17:30 +02:00
Joseph Myers 7314c7dd62 mips.h (enum reg_class): Add FRAME_REGS.
* config/mips/mips.h (enum reg_class): Add FRAME_REGS.
	(REG_CLASS_NAMES): Update.
	(REG_CLASS_CONTENTS): Update.
	* config/mips/mips.c (mips_regno_to_class): Use FRAME_REGS instead
	of ALL_REGS for regs 77 and 78.
	* function.c (instantiate_virtual_regs_in_insn): Assert that
	return value of simplify_gen_subreg is not NULL.

testsuite:
	* gcc.c-torture/compile/20080903-1.c: New test.

From-SVN: r140035
2008-09-05 16:39:40 +01:00
Eric Botcazou b38f3813f7 re PR middle-end/20548 (ACATS c52103x c52104x c52104y segfault)
PR ada/20548
	* common.opt (-fstack-check): Do not declare the variable here.
	(-fstack-check=): New option variant.
	* doc/invoke.texi (Code Gen Options): Document it.
	* expr.h (STACK_OLD_CHECK_PROTECT): New macro.
	(STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
	(STACK_CHECK_STATIC_BUILTIN): New macro.
	* doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
	* opts.c: Include expr.h.
	(common_handle_option) <OPT_fold_stack_check_>: New case.
	<OPT_fstack_check>: Likewise.
	* calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
	consistently in the test for variable-sized types.  Adjust for
	new behaviour of flag_stack_check.
	* explow.c: Include except.h.
	(allocate_dynamic_stack_space): Do not take into account
	STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
	* function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
	for variable-sized parameters.  Treat all parameters whose size is
	greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
	stack checking is enabled.
	* gimplify.c (gimplify_decl_expr): Treat non-static objects whose
	size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
	if generic stack checking is enabled.
	(expand_function_end): Adjust for new behaviour of flag_stack_check.
	* reload1.c (reload): Likewise.
	* stmt.c (expand_decl): Assert that all automatic variables have
	fixed size at this point and remove dead code.
	* flags.h (stack_check_type): New enumeration type.
	(flag_stack_check): Declare.
	* toplev.c (flag_stack_check): New global variable.
	* Makefile.in (opts.o): Add dependency on EXPR_H.
	(explow.o): Add dependency on except.h.
ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT in the
	setjmp test consistently.  Adjust for new behaviour of flag_stack_check.
	* gcc-interface/utils2.c (build_call_alloc_dealloc): Remove redundant
	test of flag_stack_check.  Adjust for new behaviour of flag_stack_check.

From-SVN: r139159
2008-08-16 18:40:57 +00:00
Jan Hubicka a8ba47cb41 recog.c (split_all_insns): Set RTL profile
* recog.c (split_all_insns): Set RTL profile
	(peephole2_optimize): Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	* combine.c (combine_instructions): Likewise.

From-SVN: r138863
2008-08-08 10:04:51 +00:00
Kaveh R. Ghazi 82d6e6fc38 builtins.c (expand_builtin_profile_func): Avoid C++ keywords.
* builtins.c (expand_builtin_profile_func): Avoid C++ keywords.
	* calls.c (avoid_likely_spilled_reg): Likewise.
	* cfgexpand.c (gimple_assign_rhs_to_tree): Likewise.
	* cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise.
	* config/i386/i386.c (ix86_expand_special_args_builtin,
	ix86_secondary_reload): Likewise.
	* except.c (struct eh_region, gen_eh_region_catch,
	remove_unreachable_regions, duplicate_eh_regions,
	assign_filter_values, build_post_landing_pads,
	sjlj_find_directly_reachable_regions, remove_eh_handler,
	reachable_next_level, foreach_reachable_handler,
	can_throw_internal_1, can_throw_external_1,
	collect_one_action_chain): Likewise.
	* expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise.
	* fold-const.c (twoval_comparison_p, eval_subst): Likewise.
	* function.c (update_temp_slot_address, instantiate_new_reg,
	instantiate_virtual_regs_in_rtx,
	instantiate_virtual_regs_in_insn): Likewise.
	* gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise.
	* gimplify.c (gimplify_call_expr, gimplify_init_constructor,
	gimplify_cleanup_point_expr): Likewise.
	* ipa-cp.c (ipcp_lattice_changed): Likewise.
	* passes.c (next_pass_1): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* profile.c (branch_prob): Likewise.
	* tree-dump.c (dump_register): Likewise.
	* tree-eh.c (replace_goto_queue_cond_clause, lower_catch):
	Likewise.
	* tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks,
	copy_statement_list, remap_gimple_op_r, copy_tree_body_r,
	copy_edges_for_bb, copy_cfg_body, copy_tree_r,
	copy_arguments_for_versioning, copy_static_chain): Likewise.
	* tree-into-ssa.c (names_replaced_by, add_to_repl_tbl,
	add_new_name_mapping, register_new_name_mapping): Likewise.
	* tree-mudflap.c (mf_xform_derefs): Likewise.
	* tree-predcom.c (struct chain, dump_chain, replace_ref_with,
	get_init_expr, combine_chains): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-structalias.c (create_variable_info_for): Likewise.
	* tree-vrp.c (simplify_cond_using_ranges): Likewise.
	* tree.c (substitute_in_expr, iterative_hash_expr): Likewise.
	* value-prof.c (gimple_duplicate_stmt_histograms): Likewise.

From-SVN: r138809
2008-08-06 15:57:09 +00:00
H.J. Lu e94a448f66 re PR middle-end/37009 (No need to align stack when incoming stack is aligned)
gcc/

2008-08-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/37009
	* cfgexpand.c (expand_stack_alignment): Check parm_stack_boundary
	for incoming stack boundary.

	* function.c (assign_parm_find_entry_rtl): Update
	parm_stack_boundary.

	* function.h (rtl_data): Add parm_stack_boundary.

	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Check
	parm_stack_boundary for incoming stack boundary.

gcc/testsuite/

2008-08-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/37009
	* gcc.dg/torture/stackalign/alloca-2.c: New.
	* gcc.dg/torture/stackalign/alloca-3.c: Likewise.
	* gcc.dg/torture/stackalign/alloca-4.c: Likewise.
	* gcc.dg/torture/stackalign/vararg-3.c: Likewise.
	* gcc.target/i386/incoming-1.c: Likewise.
	* gcc.target/i386/incoming-2.c: Likewise.
	* gcc.target/i386/incoming-3.c: Likewise.
	* gcc.target/i386/incoming-4.c: Likewise.
	* gcc.target/i386/incoming-5.c: Likewise.

From-SVN: r138806
2008-08-06 08:29:37 -07:00
H.J. Lu d015f7cc65 cfgexpand.c (expand_stack_alignment): Assert that stack_realign_drap and drap_rtx must match.
2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (expand_stack_alignment): Assert that
	stack_realign_drap and drap_rtx must match.

	* function.c (instantiate_new_reg): If DRAP is used to realign
	stack, replace virtual_incoming_args_rtx with internal arg
	pointer.

From-SVN: r138524
2008-08-01 09:05:50 -07:00
H.J. Lu 2e3f842fe6 [multiple changes]
2008-07-30  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_setjmp_receiver): Replace
	virtual_incoming_args_rtx with crtl->args.internal_arg_pointer.
	(expand_builtin_apply_args_1): Likewise.
	(expand_builtin_longjmp): Need DRAP for stack alignment.
	(expand_builtin_apply): Likewise.

	* caller-save.c (setup_save_areas): Call assign_stack_local_1
	instead of assign_stack_local to allow alignment reduction.

	* calls.c (emit_call_1): Need DRAP for stack alignment if
	return pops.
	(expand_call): Replace virtual_incoming_args_rtx with
	crtl->args.internal_arg_pointer.
	* stmt.c (expand_nl_goto_receiver): Likewise.

	* cfgexpand.c (get_decl_align_unit): Estimate stack variable
	alignment and store to stack_alignment_estimated and
	max_used_stack_slot_alignment.
	(expand_one_var): Likewise.
	(expand_stack_alignment): New function.
	(tree_expand_cfg): Initialize max_used_stack_slot_alignment
	and stack_alignment_estimated fields in rtl_data.  Call
	expand_stack_alignment at end.

	* defaults.h (INCOMING_STACK_BOUNDARY): New.
	(MAX_STACK_ALIGNMENT): Likewise.
	(MAX_SUPPORTED_STACK_ALIGNMENT): Likewise.
	(SUPPORTS_STACK_ALIGNMENT): Likewise.

	* emit-rtl.c (gen_reg_rtx): Estimate stack alignment for
	stack alignment when generating virtual registers.

	* function.c (assign_stack_local): Renamed to ...
	(assign_stack_local_1): This.  Add a parameter to indicate
	if it is OK to reduce alignment.
	(assign_stack_local): Use it.
	(instantiate_new_reg): Instantiate virtual incoming args rtx
	to vDRAP if stack realignment and DRAP is needed.
	(assign_parms): Collect parameter/return type alignment and
	contribute to stack_alignment_estimated.
	(locate_and_pad_parm): Likewise.
	(get_arg_pointer_save_area): Replace virtual_incoming_args_rtx
	with crtl->args.internal_arg_pointer.

	* function.h (rtl_data): Add new field drap_reg,
	max_used_stack_slot_alignment, stack_alignment_estimated,
	stack_realign_needed, need_drap, stack_realign_processed and
	stack_realign_finalized.
	(stack_realign_fp): New macro.
	(stack_realign_drap): Likewise.

	* global.c (compute_regsets): Frame pointer is needed when
	stack is realigned.  Can eliminate frame pointer when stack is
	realigned and dynamic realigned argument pointer isn't used.

	* reload1.c (update_eliminables):  Frame pointer is needed
	when stack is realigned.
	(init_elim_table): Can eliminate frame pointer when stack is
	realigned and dynamic realigned argument pointer isn't used.

	* rtl.h (assign_stack_local_1): Declare new funtion.

	* target-def.h (TARGET_UPDATE_STACK_BOUNDARY): New.
	(TARGET_GET_DRAP_RTX): Likewise.
	(TARGET_CALLS): Add TARGET_UPDATE_STACK_BOUNDARY and
	TARGET_GET_DRAP_RTX.

	* target.h (gcc_target): Add update_stack_boundary and
	get_drap_rtx.

	* tree-vectorizer.c (vect_can_force_dr_alignment_p): Replace
	STACK_BOUNDARY with MAX_STACK_ALIGNMENT.

2008-07-30  Xuepeng Guo  <xuepeng.guo@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (dw_fde_struct): Add stack_realignment, drap_reg,
	vdrap_reg, stack_realign and drap_reg_saved.
	(add_cfi): Don't allow redefining CFA when DRAP is used.
	(reg_save): Handle stack alignment.
	(dwarf2out_frame_debug_expr): Add rules 16-20 to handle stack
	alignment.  Don't generate DWARF information for (set fp sp)
	when DRAP is used.
	(dwarf2out_begin_prologue): Initialize drap_reg and vdrap_reg
	to INVALID_REGNUM.
	(int_loc_descriptor): Move prototype forward.  Also define if
	DWARF2_UNWIND_INFO is true.
	(output_cfa_loc): Handle DW_CFA_expression.
	(build_cfa_aligned_loc): New.
	(based_loc_descr): Update assert for stack realign.  For local
	variables, use sp+offset when stack is aligned without drap and
	fp+offset when stack is aligned with drap.  For arguments, use
	cfa+offset when drap is used to align stack.

2008-07-30  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_force_align_arg_pointer_string):
	Break long line.
	(ix86_gen_andsp): New.
	(ix86_user_incoming_stack_boundary): Likewise.
	(ix86_default_incoming_stack_boundary): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(ix86_can_eliminate): Likewise.
	(find_drap_reg): Likewise.
	(ix86_update_stack_boundary): Likewise.
	(ix86_get_drap_rtx): Likewise.
	(ix86_finalize_stack_realign_flags): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): Likewise.
	(TARGET_GET_DRAP_RTX): Likewise.
	(override_options): Overide option value for new options.
	(ix86_function_ok_for_sibcall): Remove check for
	force_align_arg_pointer.
	(ix86_handle_cconv_attribute): Likewise.
	(ix86_function_regparm): Likewise.
	(setup_incoming_varargs_64): Don't set stack_alignment_needed
	here.
	(ix86_va_start): Replace virtual_incoming_args_rtx with
	crtl->args.internal_arg_pointer.
	(ix86_select_alt_pic_regnum): Check DRAP register.
	(ix86_save_reg): Replace force_align_arg_pointer with drap_reg.
	(ix86_compute_frame_layout): Compute frame layout wrt stack
	realignment.
	(ix86_internal_arg_pointer): Just return
	virtual_incoming_args_rtx.
	(ix86_expand_prologue): Decide if stack realignment is needed
	and generate prologue code accordingly.
	(ix86_expand_epilogue): Generate epilogue code wrt stack
	realignment is really needed or not.
	
	* config/i386/i386.h (MAIN_STACK_BOUNDARY): New.
	(ABI_STACK_BOUNDARY): Likewise.
	(PREFERRED_STACK_BOUNDARY_DEFAULT): Likewise.
	(STACK_REALIGN_DEFAULT): Likewise.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(MAX_STACK_ALIGNMENT): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Removed.
	(REAL_PIC_OFFSET_TABLE_REGNUM): Updated to use BX_REG.
	(CAN_ELIMINATE): Defined with ix86_can_eliminate.
	(machine_function): Remove force_align_arg_pointer.

	* config/i386/i386.md (BX_REG): New.
	(R13_REG): Likewise.

	* config/i386/i386.opt (mforce_drap): New.
	(mincoming-stack-boundary): Likewise.
	(mstackrealign): Add Init(-1).

	* config/i386/i386-protos.h (ix86_can_eliminate): New

2008-07-30  H.J. Lu  <hongjiu.lu@intel.com>

	* doc/extend.texi: Update force_align_arg_pointer.

	* doc/invoke.texi: Document -mincoming-stack-boundary.  Update
	-mstackrealign.

	* doc/tm.texi (MAX_STACK_ALIGNMENT): Add macro.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): New target hook.
	(TARGET_GET_DRAP_RTX): Likewise.

From-SVN: r138335
2008-07-30 12:20:43 -07:00
Jan Hubicka bf08ebebc7 predict.c (always_optimize_for_size_p): New function.
* predict.c (always_optimize_for_size_p): New function.
	(optimize_bb_for_size_p, optimize_bb_for_speed_p,
	optimize_edge_for_size_p, optimize_edge_for_speed_p,
	optimize_insn_for_size_p, optimize_insn_for_speed_p): New global
	functions.
	(rtl_profile_for_bb, rtl_profile_for_edge, rtl_default_profile): New.
	* function.c (prepare_function_start): Set default profile.
	* function.h (rtl_data): Add maybe_hot_insn_p.
	* cfgexpand.c (expand_gimple_basic_block): Set RTL profile.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Likewise.
	* basic-block.h
	(optimize_bb_for_size_p, optimize_bb_for_speed_p,
	optimize_edge_for_size_p, optimize_edge_for_speed_p,
	optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
	(rtl_profile_for_bb, rtl_profile_for_edge, default_rtl_profile):
	Declare.

From-SVN: r138237
2008-07-29 10:52:16 +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 ab442df7fb Add ability to set target options (ix86 only) and optimization options on a function specific basis
From-SVN: r138075
2008-07-23 10:28:06 +00:00
Rafael Avila de Espindola aa14403d28 Makefile.in: Replace toplev.h with TOPLEV_H.
2007-07-21  Rafael Avila de Espindola  <espindola@google.com>

	* Makefile.in: Replace toplev.h with TOPLEV_H.
	* c-decl.c (merge_decls): Don't set DECL_IN_SYSTEM_HEADER.
	* c-lex.c (fe_file_change): Don't set in_system_header.
	* c-parser.c (c_token): Remove in_system_header.
	(c_lex_one_token): Don't set in_system_header.
	(c_parser_set_source_position_from_token): Don't set in_system_header.
	* diagnostic.c (diagnostic_report_diagnostic): Use location from
	diagnostic_info.
	(warning_at): New.
	* diagnostic.h (diagnostic_report_warnings_p): Add LOC argument.
	* flags.h (in_system_header): Remove.
	* function.c (saved_in_system_header): Remove.
	(push_cfun): Don't set in_system_header.
	(pop_cfun): Don't set in_system_header.
	(push_struct_function): Don't set in_system_header.
	* input.h (expanded_location): Add sysp.
	(in_system_header_at): New.
	(in_system_header): New.
	* toplev.c (in_system_header): Remove.
	* toplev.h: Include input.h
	(warning_at): New.
	* tree-cfg.c (execute_warn_function_return): Call warning_at.
	* tree-ssa.c (warn_uninit): Call warning_at.
	(warn_uninitialized_var): Update calls to warn_uninit.
	(warn_uninitialized_phi): Update calls to warn_uninit.
	* tree.c (make_node_stat): Don't set DECL_IN_SYSTEM_HEADER.
	(expand_location): Initialize xloc.sysp.
	* tree.h (DECL_IN_SYSTEM_HEADER): Use in_system_header_at.
	(tree_decl_with_vis): Remove in_system_header_flag.

2007-07-21  Rafael Avila de Espindola  <espindola@google.com>

	* parser.c (cp_token): Remove in_system_header.
	(eof_token): Remove in_system_header.
	(cp_lexer_get_preprocessor_token): Don't set in_system_header.
	(cp_lexer_set_source_position_from_token): Don't set in_system_header.
	(cp_parser_member_declaration):  Use in_system_header_at.
	* pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
	(pop_tinst_level): Don't set in_system_header.
	(instantiate_class_template): Don't set in_system_header.
	(instantiate_decl): Don't set in_system_header.
	(instantiate_pending_templates): Don't set in_system_header.

From-SVN: r138031
2008-07-21 14:29:27 +00:00
H.J. Lu 5ae53a2559 re PR middle-end/36858 (Incorrect alignment attribute on stack parameter)
gcc/

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

	PR middle-end/36858
	* function.c (locate_and_pad_parm): Cap boundary earlier.

testsuite/

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

	PR middle-end/36858
	* gcc.target/i386/vararg-1.c: New.

From-SVN: r137954
2008-07-18 08:42:59 -07:00
Daniel Jacobowitz 85776d6097 function.c (assign_parm_remove_parallels): Check mode of entry_parm.
* function.c (assign_parm_remove_parallels): Check mode of
	entry_parm.
	(assign_parm_setup_block_p): Also check mode of entry_parm.

From-SVN: r137575
2008-07-07 16:05:11 +00:00
Daniel Jacobowitz 4d2a9850cf function.c (assign_parm_remove_parallels): New.
* function.c (assign_parm_remove_parallels): New.
	(assign_parm_setup_block_p): Do not return true for non-BLKmode
	PARALLELs.
	(assign_parm_setup_block): Do not handle them.
	(assign_parm_setup_reg, assign_parm_setup_stack): Call
	assign_parm_remove_parallels.

From-SVN: r137326
2008-07-01 20:49:40 +00:00
Richard Sandiford 70cf5bc1f1 function.c (allocate_struct_function): Only allocate a unique funcdef_no if the decl is nonzero.
gcc/
	* function.c (allocate_struct_function): Only allocate a unique
	funcdef_no if the decl is nonzero.

From-SVN: r137195
2008-06-27 17:26:14 +00:00
Kaveh R. Ghazi 1b4572a81d dwarf2out.c (new_cfi, [...]): Fix -Wc++-compat and/or -Wcast-qual warnings.
* dwarf2out.c (new_cfi, queue_reg_save, dwarf2out_begin_prologue,
	dwarf2out_frame_init, new_loc_descr, new_die, lookup_decl_die,
	lookup_decl_loc, add_var_loc_to_decl, compute_section_prefix,
	assign_symbol_names, htab_cu_hash, htab_cu_eq, htab_cu_del,
	build_abbrev_table, new_loc_list, output_comp_unit, add_arange,
	add_ranges_num, add_ranges_by_labels, file_info_cmp,
	file_name_acquire, output_file_names, add_const_value_attribute,
	premark_used_types_helper, file_table_eq, file_table_hash,
	lookup_filename, dwarf2out_var_location, dwarf2out_source_line,
	dwarf2out_init, file_table_relative_p): Fix -Wc++-compat and/or
	-Wcast-qual warnings.
	* ebitmap.c (ebitmap_array_grow, ebitmap_array_init,
	ebitmap_alloc, ebitmap_ior, ebitmap_and_compl): Likewise.
	* emit-rtl.c (get_mem_attrs, get_reg_attrs, gen_rtvec,
	gen_reg_rtx, start_sequence, init_emit): Likewise.
	* et-forest.c (et_new_occ, et_new_tree): Likewise.
	* except.c (init_eh_for_function, gen_eh_region,
	remove_unreachable_regions, add_ehl_entry, duplicate_eh_regions_1,
	arh_to_landing_pad, arh_to_label, add_action_record,
	add_call_site, switch_to_exception_section): Likewise.
	* expmed.c (synth_mult): Likewise.
	* expr.c (gen_group_rtx, emit_group_load, emit_group_store,
	store_expr): Likewise.
	* final.c (shorten_branches, final_scan_insn, debug_queue_symbol):
	Likewise.
	* function.c (assign_stack_temp_for_type,
	allocate_struct_function, match_asm_constraints_1): Likewise.
	* gcov-io.c (gcov_allocate): Likewise.
	* gcse.c (GNEW, GCNEW, GNEWVEC, GCNEWVEC, GRESIZEVEC, GNEWVAR,
	GCNEWVAR, GRESIZEVAR, GOBNEW, GOBNEWVAR): New.
	(gcse_main, alloc_gcse_mem, alloc_gcse_mem, alloc_reg_set_mem,
	record_one_set, insert_expr_in_table, insert_set_in_table,
	dump_hash_table, compute_hash_table_work, alloc_hash_table,
	pre_ldst_expr_hash, pre_ldst_expr_eq, find_rtx_in_ldst,
	reg_set_info, reg_clear_last_set): Fix -Wc++-compat and/or
	-Wcast-qual warnings.

From-SVN: r137136
2008-06-26 00:25:08 +00:00
Ralf Wildenhues fa10beec52 cgraph.c: Fix typos in comments.
gcc/
	* cgraph.c: Fix typos in comments.
	(cgraph_availability_names): Fix string typo.
	* fold-const.c: Fix typos in comments.
	(fold_binary): Fix typo in warning.
	* genautomata.c: Fix typos in comments.
	(check_presence_pattern_sets): Fix typo in local variable.
	(output_description): Fix typo in output.
	* ggc-zone.c (ggc_pch_finish): Fix typo in error message.
	* hwint.h: Likewise.
	* matrix-reorg.c (check_allocation_function): Likewise.
	* omega.c (smooth_weird_equations): Likewise.
	* auto-inc-dec.c: Fix typos in comments.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* c-common.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* coverage.c: Likewise.
	* dbxout.c: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* gimplify.c: Likewise.
	* gthr-lynx.h: Likewise.
	* haifa-sched.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa.c: Likewise.
	* loop-doloop.c: Likewise.
	* mips-tfile.c: Likewise.
	* mkmap-flat.awk: Likewise.
	* mkmap-symver.awk: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts.c: Likewise.
	* passes.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* pretty-print.h: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* ra-conflict.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* regclass.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* rtl-error.c: Likewise.
	* rtlanal.c: Likewise.
	* scan.h: Likewise.
	* sched-rgn.c: Likewise.
	* see.c: Likewise.
	* stmt.c: Likewise.
	* target.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vn.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* unwind-dw2-fde.c: Likewise.
	* unwind.inc: Likewise.
	* value-prof.c: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r136425
2008-06-06 05:42:00 +00:00