Commit Graph

789 Commits

Author SHA1 Message Date
Geoffrey Keating
e2500fedef Merge from pch-branch up to tag pch-commit-20020603.
From-SVN: r54232
2002-06-04 07:11:05 +00:00
Zdenek Dvorak
f6366fc7ad bb-reorder.c (make_reorder_chain_1): Modified.
* bb-reorder.c (make_reorder_chain_1): Modified.
	* cfganal.c (can_fallthru, flow_call_edges_add,
	flow_preorder_transversal_compute): Modified.
	* cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks,
	find_sub_basic_blocks): Modified.
	* cfgcleanup.c (try_simplify_condjump, try_optimize_cfg): Modified.
	* cfglayout.c (skip_insns_after_block, fixup_reorder_chain,
	fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge): Modified.
	* cfgrtl.c (tidy_fallthru_edges, verify_flow_info): Modified.
	* combine.c (this_basic_block): Type changed to basic_block.
	(combine_instructions, set_nonzero_bits_and_sign_copies, try_combine,
	nonzero_bits, num_sign_bit_copies, get_last_value_validate,
	get_last_value, distribute_notes, distribute_links): Modified.
	* final.c (compute_alignments): Modified.
	* flow.c (regno_uninitialized, regno_clobbered_at_setjmp): Modified.
	* function.c (thread_prologue_and_epilogue_insns): Modified.
	* gcse.c (compute_code_hoist_vbeinout): Modified.
	* global.c (build_insn_chain): Modified.
	* ifcvt.c (find_if_block, find_cond_trap): Modified.
	* predict.c (last_basic_block_p, note_prediction_to_br_prob): Modified.
	* regmove.c (regmove_optimize): Modified.
	* resource.c (find_basic_block): Modified.
	* sched-ebb.c (schedule_ebbs): Modified.
	* ssa-dce.c (find_control_dependence, find_pdom): Modified.

From-SVN: r53695
2002-05-21 20:37:43 +00:00
Kazu Hirata
dd3f010165 final.c: Fix formatting.
* final.c: Fix formatting.
	* fix-header.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.

From-SVN: r53563
2002-05-17 18:07:01 +00:00
Richard Henderson
0b17ab2f5b Revert "Basic block renumbering removal", and two followup patches.
From-SVN: r53537
2002-05-16 19:31:56 -07:00
Zdenek Dvorak
355e4ec445 Basic block renumbering removal.
From-SVN: r53522
2002-05-16 10:34:53 -07:00
Jan Hubicka
194734e9e5 invoke.texi (-malign-double): Re-add lost warning.
* invoke.texi (-malign-double): Re-add lost warning.

	* i386-protos.h (x86_output_mi_thunk): Declare.
	* unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ...
	* i386.c (x86_output_mi_thunk): ... here; handle 64bits.

	* dwarf2out.c (output_call_frame_info): Do not skip unwind info
	when flag_asynchronous_unwind_tables is set.

	* flags.h (flag_reorder_functions): Declare.
	* function.c (prepare_function_start): Initialize frequnecy.
	* params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters.
	* Makefile.in (predict.o): Add dependency on target.h and params.h
	* defaults.h (HOT_TEXT_SECTION_NAME,
	UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros.
	* predict.c (choose_function_section): New function.
	(estimate_bb_frequencies): Use it.
	* toplev.c (flag_reorder_functions): New global variable.
	(lang_independent_options): New.
	(parse_options_and_default_flags): Set.
	* varasm.c (assemble_start_function): Bypass functdion alignment
	for never executed functions.
	* invoke.texi (-freorder-blocks, -freorder-functions): Document.
	(param hot-bb-count-fraction, hot-bb-frequency-fraction): New.
	* tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME):
	Document.

	Thu Jan  3 21:52:09 CET 2002  Jan Hubicka  <jh@suse.cz>

	* predict.c: Inlude profile.h
	(MIN_COUNT): Rename to MIN_COUNT_FRACTION
	(maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p):
	Use the information about maximal counter in the program.

	Thu Dec 20 22:14:00 CET 2001  Jan Hubicka  <jh@suse.cz>

	* basic-block.h (maybe_hot_bb_p, probably_cold_bb_p,
	probably_never_executed_bb_p): New functions.
	* cfgcleanup.c (outgoing_edges_match): Use them.
	* predict.c (MIN_COUNT, MIN_FREQUENCY): New macros.
	(maybe_hot_bb_p, probably_cold_bb_p,
	probably_never_executed_bb_p): New functions.

	* function.h (function): Add new field function_frequency.
	* predict.c (compute_function_frequency): New function.
	(estimate_probability): Call it.

From-SVN: r53478
2002-05-15 09:00:30 +00:00
Jan Hubicka
b7c9bf289f final.c (end_final): Use C trees to output data structures for profiling.
* final.c (end_final): Use C trees to output data structures for profiling.

	* Makefile.in (LIBGCC_DEPS): Added missing dependency on gcov-io.h
        (profile.o): New dependency profile.h
        (final.o): New dependency profile.h
        * profile.h: New file. New global structure profile_info.
        * final.h (count_edges_instrumented_now): Declare.
        (current_function_cfg_checksum): Declare.
        (function_list): New structure.
        (functions_head, functions_tail): New static variables.
        (end_final): Emits more data, removed some -ax stuff.
        (final): Stores function names and chcksums.
        * gcov-io.h (__write_gcov_string): New function.
        (__read_gcov_string): New function.
        * gcov.c (read_profile): New function.
        (create_program_flow_graph): Uses read_profile instead of reading
	da_file.
        (read_files): Removed da_file checking, it's done by read_profile now.
        * libgcc2.c (bb_function_info): New structure.
        (bb): New field in structure, removed some -ax stuff.
        (__bb_exit_func): Changed structure of da_file.
        * profile.c (count_edges_instrumented_now): New global variable.
        (current_function_cfg_checksum): New global variable.
        (max_counter_in_program): New global variable.
        (get_exec_counts): New function.
        (compute_checksum): New function.
        (instrument_edges): Sets count_edges_instrumented_now.
        (compute_branch_probabilities): Uses get_exec_counts instead of
	reading da_file.
        (branch_prob): Calls compute_checksum and writes extra data to bbg_file.
        (init_branch_prob): Removed da_file checking, done in get_exec_counts
	now.
        (end_branch_prob): Removed da_file checking, done in get_exec_counts
	now.
        * gcov.texi: Updated information about gcov file format.

Co-Authored-By: Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz>

From-SVN: r53326
2002-05-09 12:54:19 +00:00
Kazu Hirata
797a6ac12c * function.c: Fix formatting.
From-SVN: r53075
2002-05-03 00:23:55 +00:00
Kazu Hirata
1eeeb6a437 cpplex.c: Fix comment formatting.
* cpplex.c: Fix comment formatting.
	* function.c: Likewise.
	* integrate.c: Likewise.
	* regrename.c: Likewise.
	* sibcall.c: Likewise.
	* simplify-rtx.c: Likewise.
	* tree-inline.c: Likewise.

From-SVN: r52972
2002-04-30 20:48:55 +00:00
Alan Modra
f6f315fe11 re PR target/6413 (PROFILE_HOOK label_no)
PR target/6413
	* function.h: (struct function): Add profile_label_no field.
	(current_function_profile_label_no): Define.
	* function.c: (profile_label_no): New static var.
	(expand_function_start): Increment it, and copy to
	current_function_profile_label_no.
	* output.h (profile_label_no): Delete.
	* final.c (profile_label_no): Delete.
	(profile_function): Use current_function_profile_label_no.
	(final_end_function): Don't increment profile_label_no here.
	* config/i386/i386.c (ix86_osf_output_function_prologue): Replace
	profile_label_no with current_function_profile_label_no.
	* config/pa/pa.c (current_function_number): Delete.
	(pa_output_function_prologue): Don't output profile label here.
	(hppa_profile_hook): Use label_no param rather than
	current_function_number.
	(FUNC_BEGIN_PROLOG_LABEL): Move to ..
	* config/pa/pa.h: .. here.
	(FUNCTION_PROFILER): Output profile label here.

From-SVN: r52656
2002-04-23 16:50:55 +09:30
Mark Mitchell
8ed8f73189 re PR fortran/6138 (Incorrect access of integer*1 variables on PA)
PR f/6138.
	* function.c (fixup_memory_subreg): Add promoted_mode parameter.
	(walk_fixup_memory_subreg): Likewise.
	(fixup_var_refs_insn): Adjust accordingly.
	(fixup_var_refs_1): Likewise.

From-SVN: r52631
2002-04-22 19:26:19 +00:00
Neil Booth
b03e38e17e Makefile.in: Update.
* Makefile.in: Update.
	* decl.c (push_c_function_context, pop_c_function_context,
	mark_c_function_context): Rename for consistency.
	* c-objc-common.c (c_objc_common_init): Langhooks set elsewhere.
	* c-tree.h (push_c_function_context, pop_c_function_context,
	mark_c_function_context): Rename for consistency.
	* c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED,
	LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine.
	* function.c (init_lang_status, save_lang_status,
	restore_lang_status, mark_lang_status, free_lang_status):
	Move to langhooks.h.
	(push_function_context_to, pop_function_context_from,
	free_after_parsing, prepare_function_start, ggc_mark_struct_function):
	Update.
	* function.h (init_lang_status, save_lang_status,
	restore_lang_status, mark_lang_status, free_lang_status):
	Move to langhooks.h.
	* langhooks-def.h (LANG_HOOKS_FUNCTION_INIT,
	LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED,
	LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK,
	LANG_HOOKS_FUNCTION_INITIALIZER): New.
	(LANG_HOOKS_INITIALIZER): Update.
	(lhd_do_nothing_f): New.
	* langhooks.h (struct lang_hooks_for_functions): New.
	(struct lang_hooks): New hooks.
	* langhooks.c (lhd_do_nothing_f): New.
cp:
	* cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
	LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
	* cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
	cxx_mark_function_context): New.
	* decl.c (push_cp_function_context, pop_cp_function_context,
	mark_cp_function_context): Rename for consistency.
	(cxx_init_decl_processing): Don't set old hooks.
objc:
	* objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED,
	LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine.

From-SVN: r52551
2002-04-20 09:14:37 +00:00
Jakub Jelinek
ce5e43d03e re PR c/6358 (GCC 3.1 ICE on statement expressions)
PR c/6358
	* function.c: Reapply patch for c/6358.
	(expand_function_end): Copy decl_rtl's mode, not
	current_function_return_rtx mode.

From-SVN: r52538
2002-04-19 23:02:52 +02:00
Richard Henderson
58533fa280 * function.c: Revert patch for c/6358.
From-SVN: r52511
2002-04-18 21:41:34 -07:00
Jakub Jelinek
a3acf46d44 re PR c/6358 (GCC 3.1 ICE on statement expressions)
PR c/6358
	* function.c (assign_parms): Assign hard current_function_return_rtx
	register here...
	(expand_function_end): ...not here.

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

From-SVN: r52485
2002-04-18 21:10:11 +02:00
Hans-Peter Nilsson
1ab3e58a2f function.c (fixup_var_refs_1): For paradoxical (subreg VAR), replace VAR, don't try the subreg.
* function.c (fixup_var_refs_1) <SET, handling VAR in SET_SRC>:
	For paradoxical (subreg VAR), replace VAR, don't try the subreg.

From-SVN: r52217
2002-04-12 11:31:25 +00:00
Eric Botcazou
9432c136e5 function.c (assign_temp): Accept either type or decl argument.
* function.c (assign_temp): Accept either type or decl argument.
        Detect variables whose size is too large to fit into an integer.
        * stmt.c (expand_decl): Pass the decl, not the type.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r51788
2002-04-02 19:41:40 -08:00
Neil Booth
b0c4822985 Makefile.in (convert.o, [...]): Update.
* Makefile.in (convert.o, calls.o, expmed.o): Update.
	* attribs.c (handle_mode_attribute, handle_vector_size_attribute):
	Use new hooks.
	* builtin-types.def (BT_PTRMODE): Update.
	* c-common.c (type_for_size): Rename c_common_type_for_size.
	(type_for_mode): Similarly.
	(shorten_compare, pointer_int_sum, c_common_nodes_and_builtins):
	Use new hook.
	* c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New.
	* c-decl.c (finish_enum, build_enumerator): Use new hooks.
	* c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* c-typeck.c (common_type, comptypes, default_conversion):
	Use new hooks.
	* calls.c: Include langhooks.h.
	(emit_library_call_value_1): Use new hooks.  Avoid redundant
	calls.
	* convert.c: Include langhooks.h
	(convert_to_pointer, convert_to_integer): Use new hooks.
	* except.c (init_eh): Similarly.
	* expmed.c: Include langhooks.h.
	(expand_mult_add): Use new hooks.
	* expr.c (store_expr, store_constructor, expand_expr, do_jump,
	try_casesi): Similarly.
	* fold-const.c (optimize_bit_field_compare, make_range,
	decode_field_reference, fold_truthop, fold): Similarly.
	* function.c (assign_stack_local_1, assign_stack_temp_for_type,
	put_var_into_stack): Similarly.
	* langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE,
	LANG_HOOKS_TYPE_FOR_SIZE): New.
	(LANG_HOOKS_TYPES_INITIALIZER): Update.
	* langhooks.h (lang_hooks_for_types): New hooks.
	* stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks.
	* tree.c (get_unwidened, get_narrower): Similarly.
	* tree.h (type_for_mode, type_for_size): Remove.
	* varasm.c (force_const_mem): Use new hooks.
ada:
	* gigi.h (type_for_size, type_for_mode): Rename.
	* misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* trans.c (tree_transform): Update.
	* utils.c (gnat_init_decl_processing, init_gigi_decls,
	builtin_function, float_type_for_size, signed_or_unsigned_type,
	build_vms_descriptor, unchecked_convert): Update.
	(type_for_mode, type_for_size): Rename.
	* utils2.c (nonbinary_modular_operation): Update.
cp:
	* cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
	* decl.c (finish_enum): Similarly.
	* error.c (dump_type): Similarly.
	* lex.c (cxx_init): Similarly.
	* mangle.c (write_builtin_type): Similarly.
	* typeck.c (comptypes): Similarly.
f:
	* com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	(type_for_mode, type_for_size): Rename.
	(signed_or_unsigned_type, signed_type, truthvalue_conversion,
	unsigned_type):	Use new hooks.
java:
	* Make-lang.in (builtins.o): Update.
	* boehm.c (get_boehm_type_descriptor): Update.
	* builtins.c: Include langhooks.h.
	* decl.c (java_init_decl_processing): Update.
	* java-tree.h (java_type_for_mode, java_type_for_size): New.
	* lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
	Redefine.
	* typeck.c (type_for_mode, type_for_size): Update.
objc:
	* objc-act.c (handle_impent): Update.
	* objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
	Redefine.

From-SVN: r51571
2002-03-29 21:46:27 +00:00
Neil Booth
7afff7cfb0 Makefile.in: Update.
* Makefile.in: Update.
	* c-common.c: Include langhooks.h.
	(inline_forbidden_p): Use new hook.
	* diagnostic.c: Include langhooks.h.
	(format_with_decl, announce_function,
	default_print_error_function): Use new hook.
	* dwarf2out.c (dwarf2_name): Use new hook.
	* function.c: Include langhooks.h.
	(init_function_start): Use new hook.
	* langhooks-def.h (lhd_decl_printable_name): New.
	(LANGHOOKS_DECL_PRINTABLE_NAME): New.
	(LANGHOOKS_INITIALIZER): Update.
	* langhooks.c (lhd_decl_printable_name): New.
	* langhooks.h (struct lang_hooks): New hook.
	* toplev.c (decl_name, decl_printable_name): Remove.
	(open_dump_file): Use new hook.
	(process_options): Remove old hook.
	* tree.h (decl_printable_name): Remove.
ada:
	* misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	(gnat_init): Remove old hook.
cp:
	* cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	* cp-tree.h (lang_printable_name): Rename.
	* error.c (lang_decl_name): Use new hook.
	* lex.c (cxx_init): Remove old hook.
	* pt.c (tsubst_expr): Use new hook.
	* tree.c (lang_printable_name): Rename.
f:
	* com.c (lang_printable_name): Rename.
	(LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	(ffe_init): Don't use old hook.
java:
	* decl.c (start_java_method): Use new hook.
	* lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	(java_init): Remove old hook.
objc:
	* objc-act.c (objc_init): Remove old hook.
	(objc_printable_name): Export.
	* objc-act.h (objc_printable_name): New.
	* objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.

From-SVN: r51066
2002-03-20 07:58:41 +00:00
Richard Henderson
9f53e9654b re PR target/5901 ([IA64] misplaced .body)
PR optimization/5901
        * function.c (reposition_prologue_and_epilogue_notes): Position
        the markers after/before the last/first insn not deleted.

From-SVN: r50715
2002-03-12 22:10:23 -08:00
Richard Kenner
93fe8e9229 emit-rtl.c (copy_most_rtx): Accept EXPR_LIST for may_share.
* emit-rtl.c (copy_most_rtx): Accept EXPR_LIST for may_share.
	* function.c (fixup_var_refs): Add MAY_SHARE parameter.
	(fixup_var_refs_insns, fixup_var_refs_insns_with_has): Likewise.
	(fixup_var_refs_insn, fixup_var_refs_1): Likewise.
	(pop_function_context): Compute MAY_SHARE parameter for
	fixup_var_refs.
	(fixup_var_refs_1, case MEM): Pass MAY_SHARE to copy_most_rtx, not VAR.
	(gen_mem_addressof): Call fixup_var_refs with new parm.

From-SVN: r50493
2002-03-09 07:53:21 -05:00
Steve Ellcey
7879b81e6c rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition to take ptr_extend into account as third type of extension.
* doc/rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition
        to take ptr_extend into account as third type of extension.
        (SUBREG_PROMOTED_UNSIGNED_SET): Definition of new macro to set bit
        fields used by SUBREG_PROMOTED_UNSIGNED_P.
        * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): New macro.
        (SUBREG_PROMOTED_UNSIGNED_P): Change to return -1 as well as 0 or 1.
        * calls.c (precompute_arguments): Use new macro.
        (expand_call): Ditto.
        * combine.c (nonzero_bits): Ditto.
        (record_promoted_value): Ditto.
        * expr.c (store_expr): Ditto.
        (expand_expr): Ditto.
        * function.c (assign_parms): Ditto.

From-SVN: r50174
2002-02-28 17:19:52 -08:00
Aldy Hernandez
69ef87e2bc i386.md ("mmx_uavgv8qi3"): Use const_vector.
2002-02-19  Aldy Hernandez  <aldyh@redhat.com>

	* config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector.
	("mmx_uavgv4hi3"): Same.
	("pmulhrwv4hi3"): Same.

	* tree-inline.c (walk_tree): Handle vectors.

	* c-common.c (constant_expression_warning): Handle vectors.
	(overflow_warning): Same.

	* sched-deps.c (sched_analyze_2): Handle vectors.

	* rtlanal.c (rtx_unstable_p): Handle vectors.
	(rtx_varies_p): Same.
	(count_occurrences): Same.
	(regs_set_between_p): Same.
	(modified_between_p): Same.
	(modified_in_p): Same.
	(volatile_insn_p): Same.
	(volatile_refs_p): Same.
	(side_effects_p): Same.
	(may_trap_p): Same.
	(inequality_comparisons_p): Same.
	(replace_regs): Same.
	(computed_jump_p_1): Same.

	* rtl.c (DEF_MACHMODE): Change all definitions to accept 8th
	argument.
	(inner_mode_array): New.
	(copy_rtx): Handle vectors.
	(copy_most_rtx): Same.
	(rtx_equal_p): Same.
	(get_mode_alignment): Adjust for vectors.

	* resource.c (mark_referenced_resources): Handle vectors.
	(mark_set_resources): Same.

	* reload1.c (eliminate_regs): Handle vectors.
	(elimination_effects): Same.
	(scan_paradoxical_subregs): Same.

	* reload.c (subst_reg_equivs): Handle vectors.

	* regrename.c (scan_rtx): Handle vectors.

	* regclass.c (reg_scan_mark_refs): Handle vectors.

	* recog.c (find_single_use_1): Handle vectors.

	* local-alloc.c (equiv_init_varies_p): Handle vectors.
	(contains_replace_regs): Same.
	(memref_referenced_p): Same.

	* integrate.c (copy_rtx_and_substitute): Handle vectors.
	(subst_constants): Same.

	* genattrtab.c (attr_copy_rtx): Handle vectors.
	(encode_units_mask): Same.
	(clear_struct_flag): Same.
	(count_sub_rtxs): Same.

	* gcse.c (want_to_gcse_p): Handle vectors.
	(oprs_unchanged_p): Same.
	(hash_expr_1): Same.
	(oprs_not_set_p): Same.
	(expr_killed_p): Same.
	(compute_transp): Same.
	(store_ops_ok): Same.

	* function.c (purge_addressof_1): Do not allow paradoxical subregs
	of vectors.
	(fixup_var_refs_1): Same.
	(instantiate_virtual_regs_1): Same.

	* fold-const.c (operand_equal_p): Handle vectors.
	(fold): Same.
	(rtl_expr_nonnegative_p): Same.

	* flow.c (mark_used_regs): Handle vectors.

	* df.c (df_uses_record): Handle vectors.

	* cselib.c (cselib_subst_to_values): Handle vectors.
	(cselib_mem_conflict_p): Same.
	(hash_rtx): Same.

	* cse.c (canon_reg): Handle vectors.
	(fold_rt): Same.
	(cse_process_notes): Same.
	(count_reg_usage): Same.
	(canon_hash): Same.

	* alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR.

	* combine.c (mark_used_regs_combine): Add case for CONST_VECTOR.

	* emit-rtl.c (init_emit_once): Generate const0_rtx for vectors.
	(gen_rtx): Handle CONST_VECTOR.
	(gen_const_vector_0): New.
	(copy_rtx_if_shared): CONST_VECTORs can be shared.
	(reset_used_flags): Same.
	(copy_insn_1): Same.
	(initializer_constant_valid_p): Handle VECTOR_CST.

	* doc/c-tree.texi (Expression trees): Document VECTOR_CST.

	* doc/rtl.texi (Constants): Document const_vector.
	(CONST0_RTX): Update for vectors.
	(RTL sharing): Same.

	* print-tree.c (print_node): Add case for VECTOR_CST.

	* tree.h (TREE_VECTOR_CST_ELTS): New.
	(struct tree_vector): New.
	(union tree_node): Add vector node.
	(build_vector): Add prototype.

	* tree.def (VECTOR_CST): New.

	* tree.c (build_vector): New.

	* expmed.c (make_tree): Handle CONST_VECTOR.

	* rtl.h (CONSTANT_P): CONST_VECTORs are constants too.
	(CONST_VECTOR_ELT): New.
	(CONST_VECTOR_NUNITS): New.

	* machmode.h (GET_MODE_INNER): New.
	(DEF_MACHMODE): Accept 8th arg.

	* machmode.def: Add 8th argument for vector inner mode.
	Add inner vector modes for vectors.

	* rtl.def (VEC_CONST): Remove.
	(CONST_VECTOR): New.

	* expr.c (clear_storage): Allow vectors.
	(is_zeros_p): Handle VECTOR_CST.

	* varasm.c (output_constant_pool): Handle vectors.
	(rtx_const): Add veclo and vechi fields.
	(kind): Add RTX_VECTOR.
	(decode_rtx_const): Add case for vector.

	* config/rs6000/rs6000-protos.h: Add zero_constant.

	* config/rs6000/rs6000.c (rs6000_emit_move): Handle vector
	constants.  Force easy vector constants into memory.
	(easy_vector_constant): New.
	(emit_easy_vector_constant): New.
	(rs6000_legitimize_reload_address): Do not generate bad reloads on
	darwin.

	* config/rs6000/rs6000.md ("altivec_lvx"): Reflect what
	instruction does.
	("altivec_lvxl"): Same.
	(altivec_lvebx): Same.
	(altivec_lvehx): Same.
	(altivec_lvewx): Same.
	("*movv4si_const0"): New.
	("*movv4sf_const0"): New.
	("*movv8hi_const0"): New.
	("*movv16qi_const0"): New.

From-SVN: r49853
2002-02-19 02:53:41 +00:00
Alexandre Oliva
4606272bc4 function.c (assign_parms): Demote promoted argument passed by transparent reference.
* function.c (assign_parms): Demote promoted argument passed by
transparent reference.

From-SVN: r49774
2002-02-14 19:27:21 +00:00
Jason Merrill
b21155754f function.c (assign_parms): Don't put args of inline functions into registers when not optimizing.
* function.c (assign_parms): Don't put args of inline functions
        into registers when not optimizing.
        * cp/decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.

From-SVN: r49131
2002-01-23 07:39:30 -05:00
Aldy Hernandez
58dbcf0581 tm.texi: Remove STARTING_FRAME_PHASE.
* doc/tm.texi: Remove STARTING_FRAME_PHASE.

        * config/rs6000/rs6000.h: Same.

        * function.c (instantiate_virtual_regs): Remove
        STARTING_FRAME_PHASE.
        (assign_stack_local_1): Same.
        Calculate frame phase.

From-SVN: r49063
2002-01-22 02:36:54 +00:00
Aldy Hernandez
1d690052f8 20020118-1.c: New.
2002-01-18  Aldy Hernandez  <aldyh@redhat.com>

        * gcc.dg/20020118-1.c: New.

        * tm.texi (STARTING_FRAME_PHASE): Document.

        * function.c (assign_stack_local_1): Adjust x_frame_offset with
        STARTING_FRAME_PHASE.
        (STARTING_FRAME_PHASE): New.
        (instantiate_virtual_regs): Check saneness of
        STARTING_FRAME_PHASE.

        * rs6000.h (STARTING_FRAME_PHASE): New.

From-SVN: r49006
2002-01-19 03:06:55 +00:00
Kazu Hirata
3ef42a0c4f bitmap.h: Fix comment formatting.
* bitmap.h: Fix comment formatting.
	* combine.c: Likewise.
	* cppfiles.c: Likewise.
	* c-pragma.h: Likewise.
	* c-typeck.c: Likewise.
	* df.c: Likewise.
	* dwarf2out.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* genattrtab.c: Likewise.
	* gthr-win32.h: Likewise.
	* haifa-sched.c: Likewise.
	* predict.c: Likewise.
	* rtlanal.c: Likewise.
	* rtl.h: Likewise.
	* unwind-dw2-fde.h: Likewise.
	* unwind-pe.h: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r48987
2002-01-18 13:40:36 +00:00
Kazu Hirata
c4f2c49991 cse.c: Fix formatting.
* cse.c: Fix formatting.
	* dwarf2asm.c: Likewise.
	* dwarf2out.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* function.c: Likewise.
	* gcov.c: Likewise.
	* gencheck.c: Likewise.
	* genrecog.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* global.c: Likewise.

From-SVN: r48570
2002-01-05 22:11:21 +00:00
William Cohen
70f4f91ca9 function.h (struct function): Add profile.
* function.h (struct function): Add profile.
	(current_function_profile): New.
	doc/extend.texi: Update documentation.
	* final.c (final_start_function): Use current_function_profile
	instead of profile_flag.
	(profile_after_prologue): Likewise.
	* function.c (expand_function_start): Likewise.
	(expand_function_start): Likewise.
	* config/alpha/alpha.c (direct_call_operand):
	(alpha_does_function_need_gp): Likewise.
	(alpha_expand_prologue): Likewise.
	* config/arm/arm.c (arm_expand_prologue): Likewise.
	thumb_expand_prologue: Likewise.
	* config/d30v/d30v.c (d30v_stack_info): Likewise.
	* config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Likewise.
	(fr30_expand_prologue): Likewise.
	* config/i386/cygwin.h (SUBTARGET_PROLOGUE): Likewise.
	* config/i386/i386.c (ix86_osf_output_function_prologue): Likewise.
	* config/i386/i386.h (FINALIZE_PIC): Likewise.
	* config/i386/win32.h (SUBTARGET_PROLOGUE): Likewise.
	* config/i960/i960.c (i960_output_function_prologue): Likewise.
	* config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
	* config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Likewise.
	(m32r_expand_prologue): Likewise.
	* config/m88k/m88k.c (m88k_layout_frame): Likewise.
	(m88k_expand_prologue): Likewise.
	* config/m88k/m88k.h (ADJUST_INSN_LENGTH): Likewise.
	* config/mips/mips.c (compute_frame_size): Likewise.
	(mips_expand_prologue): Likewise.
	(mips_can_use_return_insn): Likewise.
	* config/pa/elf.h (ASM_FILE_START): Likewise.
	* config/pa/pa-linux.h (ASM_FILE_START): Likewise.
	* config/pa/pa64-hpux.h (ASM_FILE_START): Likewise.
	* config/pa/som.h (ASM_FILE_START): Likewise.
	* config/romp/romp.c (romp_using_r14): Likewise.
	* config/rs6000/rs6000.c (first_reg_to_save): Likewise.
	(rs6000_stack_info): Likewise.
	* config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
	* config/rs6000/xcoff.h (toc_section): Likewise.
	* config/v850/v850.c (compute_register_save_size): Likewise.

From-SVN: r48515
2002-01-03 17:40:07 +00:00
Richard Henderson
df8992f8f3 haifa-sched.c (reemit_other_notes): New.
* haifa-sched.c (reemit_other_notes): New.
        (schedule_block): Use it.
        * sched-ebb.c (schedule_ebbs): Call remove_unnecessary_notes.
        * sched-rgn.c (schedule_insns): Likewise.
        * cfglayout.c (remove_scope_notes): Handle removing note at
        the end of the insn chain.
        * function.c (debug_find_var_in_block_tree): New.

        * gcc.dg/debug-1.c, gcc.dg/debug-2.c: New.

From-SVN: r48333
2001-12-27 14:19:59 -08:00
DJ Delorie
8a723db2df function.c (expand_main_function): Make sure stack adjustments happen before sjlj exception setup.
* function.c (expand_main_function): Make sure stack adjustments
happen before sjlj exception setup.

From-SVN: r48316
2001-12-26 14:54:44 -05:00
Richard Kenner
6c7d86ec5e expr.c (expand_expr, [...]): Handling taking address of SAVE_EXPR.
* expr.c (expand_expr, case ADDR_EXPR): Handling taking address of
	SAVE_EXPR.
	* function.c (gen_mem_addressof): Add missing tests for SAVE_EXPR.
	(put_addressof_into_stack): Clarify code in setting of used_p.

From-SVN: r48268
2001-12-22 10:06:55 -05:00
Joseph Myers
d6a7951f20 ChangeLog.2, [...]: Fix spelling errors.
* ChangeLog.2, ChangeLog.3, ChangeLog.5, ChangeLog, alias.c,
	cfgbuild.c, expmed.c, expr.c, final.c, flow.c, fold-const.c,
	function.c, config/alpha/alpha.md, config/alpha/vms-ld.c,
	config/arm/arm.c, config/arm/arm.h, config/c4x/libgcc.S,
	config/i370/i370.c, config/i386/i386.c,
	config/i386/i386-interix.h, config/i386/i386.md,
	config/i386/i386.h, config/i386/netbsd-elf.h, config/ia64/ia64.c,
	config/m32r/m32r-protos.h, config/mcore/mcore.h,
	config/rs6000/rs6000.h, config/sparc/linux64.h,
	config/sparc/sparc.c, config/v850/v850-protos.h,
	config/cris/cris.h, config/s390/s390.md, config/elfos.h: Fix
	spelling errors.

From-SVN: r47815
2001-12-09 20:13:19 +00:00
Richard Kenner
f189c7caea function.c (handle_epilogue_set): Check for FP setting case when SP is set from FP in same insn.
* function.c (handle_epilogue_set): Check for FP setting case when
	SP is set from FP in same insn.

From-SVN: r47719
2001-12-06 09:30:57 -05:00
Richard Kenner
a57263bc3c function.c (assing_parms): Fix typo in last change.
* function.c (assing_parms): Fix typo in last change.
	* config/clipper.c (clipper_builtin_saveregs): Remove Checker code.
	* config/m88k/m88k.c (m88k_builtin_saveregs): Likewise.
	* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
	* config/sparc/sparc.c (sparc_builtin_saveregs): Likewise.

From-SVN: r47715
2001-12-06 07:05:44 -05:00
Richard Kenner
b5ed05aac9 function.c (keep_stack_depressed): Check global_live_at_start of EXIT_BLOCK for temp register and verify it isn't...
* function.c (keep_stack_depressed): Check global_live_at_start
	of EXIT_BLOCK for temp register and verify it isn't in equiv_reg_src.

From-SVN: r47706
2001-12-05 21:44:57 -05:00
Richard Kenner
37a08a298f attribs.c (handle_no_check_memory_usage_atribute): Deleted.
* attribs.c (handle_no_check_memory_usage_atribute): Deleted.
	(c_com): Delete its reference.
	* builtins.c: Delete memory checking code.
	* calls.c, expr.c, function.c, stmt.c: Likewise.
	* builtins.c (expand_builtin_arg_info): Remove reference to
	EXPAND_MEMORY_USE_* modifiers.
	* explow.c (expr_size): Likewise.
	* expr.c (expand_expr, expand_increment): Likewise.
	* expr.h (ARGS_SIZE_RTX): Likewise.
	* function.c (assign_parms, expand_pending_sizeso): Likewise.
	* c-decl.c (duplicate_decls): Don't handle DECL_NO_CHECK_MEMORY_USAGE.
	* expr.c (in_check_memory_usage): Delete.
	(get_push_address, get_memory_usage_from_modifier): Delete.
	(expand_assigment): Use EXPAND_WRITE on destination.
	(expand_expr): Delete ro_modifier.
	* expr.h (expand_modifier): Delete EXPAND_MEMORY_* entries and
	add EXPAND_WRITE.
	(memory_use_mode): Delete.
	* flags.h (flag_check_memory_usage): Deleted.
	(flag_prefix_function_name): Likewise.
	* function.c (expand_function_start): Don't set
	current_function_check_memory_usage.
	* function.h (check_memory_usage): Delete.
	* libfuncs.h, optabs.c: Delete chkr_* stuff.
	* stmt.c (expand_asm_opernd): Change EXPAND_MEMORY_USE_WO to
	EXPAND_WRITE.
	* toplev.c (flag_check_memory_usage): Deleted.
	(flag_prefix_function_name): Likewise.
	(f_options, process_options): Delete references to above.
	* tree.h (DECL_NO_CHECK_MEMORY_USAGE): Deleted.
	* varasm.c (CHKR_PREFIX): Deleted.
	(make_decl_rtl): Remove flag_prefix_function_name handling.
	(assemble_name): Likewise.
	* doc/extend.texi: Remove no_check_memory_usage attribute.
	* doc/invoke.texi: Remove -fcheck-memory-usage
	and -fprefix-function-name.
	* cp/decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.

From-SVN: r47697
2001-12-05 17:37:41 -05:00
Richard Kenner
53b6fb26fc function.c (keep_stack_depressed): Refine check for register clobbered over call.
* function.c (keep_stack_depressed): Refine check for register
	clobbered over call.

From-SVN: r47664
2001-12-05 06:49:24 -05:00
Jakub Jelinek
108b7d3d31 function.c (assign_parms): Set last_named only for last named argument.
* function.c (assign_parms): Set last_named only for last named
	argument.

	* g++.dg/other/stdarg1.C: New test.

From-SVN: r47601
2001-12-04 10:29:54 +01:00
Janis Johnson
21b8482ae8 rtl.def (PREFETCH): New rtx code.
* rtl.def (PREFETCH): New rtx code.
	* doc/rtl.texi (PREFETCH): Add documentation.
	* function.c (instantiate_virtual_regs_1): Handle PREFETCH rtx.
	* rtlanal.c (reg_referenced_p): Ditto.
	* sched-vis.c (print_exp):  Ditto.
	* ssa-dce.c (find_inherently_necessary):  Ditto.

From-SVN: r47580
2001-12-04 00:47:14 +00:00
Richard Kenner
08e42d8b55 function.c (assign_stack_temp_for_type): Clear alias set before setting new one.
* function.c (assign_stack_temp_for_type): Clear alias set before
	setting new one.

From-SVN: r47303
2001-11-24 16:18:15 -05:00
Joseph Myers
a1f300c0f1 ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog,
	FSFChangeLog.10, c-decl.c, cppfiles.c, cppinit.c, cpplex.c,
	cpplib.c, cppmain.c, cse.c, df.c, diagnostic.c, dominance.c,
	dwarf2out.c, dwarfout.c, emit-rtl.c, errors.c, except.c, except.h,
	explow.c, function.c, gcse.c, genrecog.c, predict.c, regmove.c,
	sched-rgn.c, ssa-ccp.c, stmt.c, toplev.c: Fix spelling errors.

From-SVN: r47279
2001-11-23 02:05:19 +00:00
Richard Kenner
3258e9961c function.c (keep_stack_depressed): Major rework.
* function.c (keep_stack_depressed): Major rework.
	(handle_epilogue_set, emit_equiv_load): New functions.
	(thread_prologue_and_epilogue_insns): keep_stack_depressed now
	has return value.
	* jump.c (returnjump_p_1): Also return 1 if SET with SET_IS_RETURN_P.
	* rtl.h (SET_IS_RETURN_P): New macro.

From-SVN: r47250
2001-11-21 18:41:40 -05:00
Jakub Jelinek
1258ee8070 explow.c (probe_stack_range): Use LCT_NORMAL as second argument to emit_library_call.
* explow.c (probe_stack_range): Use LCT_NORMAL as second argument
	to emit_library_call.
	* function.c (expand_main_function, expand_function_start,
	expand_function_end): Likewise.
	* profile.c (output_func_start_profiler): Likewise.
	* stmt.c (expand_nl_goto_receivers): Use LCT_NORETURN as
	second argument to emit_library_call.
	* optabs.c (prepare_cmp_insn): Use LCT_CONST_MAKE_BLOCK
	as second argument to emit_library_call.
	* calls.c (emit_library_call): Update fn_type description.

From-SVN: r47241
2001-11-21 12:13:14 +01:00
Richard Kenner
a06ef755a3 alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
	* emit-rtl.c (change_address): Fix typo in default alignment.
	(adjust_address_1): Use mode of NEW, not MODE, when setting size.
	* expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
	* rtl.h (REGNO_PTR_FRAME_P): New macro.

	* expr.c (store_field): Pass tree instead of max size; callers changed.
	Change handling of alignment.
	Only copy to_rtx if is TARGET.
	(expand_expr_unaligned): Delete; callers now use expand_expr.
	(emit_cmp_insn): No longer take ALIGN parm; all callers changed.
	(expand_assignment): Change handling of alignment.
	Only copy to_rtx if was original.
	(get_inner_reference): No longer return alginment; callers changed.
	(expand_expr, case COMPONENT_REF): Change handling of alignment.
	(expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
	(compare_from_rtx): Delete ALIGN parm; all callers changed.
	(do_compare_rtx_and_jump): Likewise.
	* expr.h: Reflect above changes.
	* tree.h: Likewise.
	* dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
	to get_inner_reference.
	* except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
	* explow.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	(prepare_cmp_insn): Now static; remove ALIGN parm.  Callers changed.
	(emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
	* fold-const.c: Remove PALIGN in calls to get_inner_reference.
	* function.c (assign_stack_temp_for_type): No longer static.
	* optabs.h (emit_cmp_insn): Remove ALIGN parm.
	(prepare_cmp_insn): Delete declaration.
	* rtl.h (assign_stack_temp_for_type): Add declaration.
	* config/d30v/d30v.c: Reflect above changes.
	* config/i860/i860.c, config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
	* ada/trans.c, ada/utils2.c: Remove PALIGN parameter to
	get_inner_reference.

From-SVN: r47075
2001-11-15 18:44:58 -05:00
Richard Kenner
b5c02bff5c * function.c (struct temp_slot): ALIGN now unsigned.
From-SVN: r47016
2001-11-14 12:30:04 -05:00
Richard Kenner
04050c690d expmed.c (extract_bit_field): No longer pass in alignment.
* expmed.c (extract_bit_field): No longer pass in alignment.
	(extract_fixed_bit_field, extract_split_bit_field): Likewise.
	(store_bit_field, store_fixed_bit_field, store_split_bit_field):
	Likewise.
	* expr.c (store_constructor, store_constructor_field): Likewise.
	(store_field, emit_group_load, emit_group_store): Likewise.
	* expr.h (emit_group_load, emit_group_store): Delete ALIGN parm.
	(store_bit_field, extract_bit_field): Likewise.
	* calls.c, expr.c, function.c: Change calls to above functions.
	* ifcvt.c, stmt.c: Likewise.

From-SVN: r46926
2001-11-11 06:02:26 -05:00
Richard Kenner
a79e3a4591 cselib.c (cselib_subst_to_values, [...]): Remove reference to CONST_DOUBLE_MEM in comment.
* cselib.c (cselib_subst_to_values, case CONST_DOUBLE): Remove
 	reference to CONST_DOUBLE_MEM in comment.
	* emit-rtl.c (gen_rtx_CONST_DOUBLE): Remove one operand.
	(gen_rtx, case CONST_DOUBLE): Call it with one less operand.
	(init_emit_once): Don't clear CONST_DOUBLE_MEM.
	* function.c (pop_function_context_from): Don't call
	restore_varasm_status.
	* function.h (restore_varasm_status): Delete declaration.
	* gengenrtl.c (CONST_DOUBLE_FORMAT): Delete CONST_DOUBLE_MEM slot.
	* rtl.c: Likewise.
	* rtl.def (CONST_DOUBLE): Update comment.
	* rtl.h (CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW): Update operand number.
	(CONST_DOUBLE_CHAIN): Likewise.
	(CONST_DOUBLE_MEM): Delete.
	(gen_rtx_CONST_DOUBLE): Update parameters.
	* varasm.c (struct varasm_status): x_pool_offset now HOST_WIDE_INT.
	Remove reference to CONST_DOUBLE_MEM.
	(const_alias_set): New variable.
	(immed_double_const): Change call to gen_rtx_CONST_DOUBLE.
	(immed_real_const_1): Adjust tests for 0, 1, and 2.
	Don't set CONST_DOUBLE_MEM.
	(clear_const_double_mem): Don't do anything with const_tiny_rtx.
	(output_constant_def): Don't look at TREE_CST_RTL if INTEGER_CST.
	Put constant in const_alias_set.
	(struct pool_constant): ALIGN now unsigned.
	OFFSET now HOST_WIDE_INT.
	Delete LABEL.
	(restore_varasm_status): Deleted.
	(mark_pool_constant): Mark desc->rtl.
	(force_const_mem): Rework to store rtl in hash table,
	not CONST_DOUBLE_MEM.
	Put constant in const_alias_set.
	(find_pool_constant): Check desc->rtl.
	(mark_constants, mark_constant): Don't special-case CONST_DOUBLE.
	(init_varasm_once): Initialize const_alias_set.

From-SVN: r46736
2001-11-03 11:28:33 -05:00
Joseph Myers
ff7cc30768 ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4,
	ChangeLog.5, ChangeLog, FSFChangeLog.10, FSFChangeLog.11,
	c-common.c, c-common.h, c-parse.in, c-typeck.c, cfg.c, config.gcc,
	configure, configure.in, except.c, except.h, flow.c, function.c,
	gcc.c, gcse.c, genrecog.c, libgcc2.c, loop.c, loop.h, params.def,
	predict.def, predict.h, reg-stack.c, regmove.c, sched-deps.c,
	sched-int.h, sibcall.c, ssa.c, stringpool.c, toplev.c, tree.c,
	unroll.c: Fix spelling errors.

From-SVN: r46595
2001-10-28 20:09:17 +00:00
Richard Kenner
4b6c167260 builtins.c (expand_builtin_setjmp): Only call convert_memory_address if needed.
* builtins.c (expand_builtin_setjmp): Only call convert_memory_address
	if needed.
	(expand_builtin_longjmp, expand_builtin_alloca): Likewise.
	* except.c (expand_builtin_frob_return_addr): Likewise.
	(expand_builtin_eh_return): Likewise.
	* stmt.c (expand_computed_goto): Likewise.
	* explow.c (memory_address): Likewise.
	(allocate_dynamic_stack_space): Clean up predicate testing.
	(probe_stack_range): Convert SIZE to Pmode.
	* calls.c (rtx_for_function_call): Only call convert_memory_address
	if needed.
	Pass function call operand as ptr_mode, not Pmode.
	* expr.c (expand_assignment): Clean up calls to convert_memory
	address by only doing so when needed and making offsets Pmode.
	(store_constructor, expand_expr, expand_expr_unaligned): Likewise.
	* function.c (assign_parms): Ensure address in MEM for RESULT_DECL
	is in Pmode, not ptr_mode.

From-SVN: r46448
2001-10-23 18:59:15 -04:00
Richard Kenner
e686d142b3 alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0.
* alias.c (can_address_p): Compnonents are not addressable if
	the containing type has alias set 0.
	(get_alias_set): Rework to use STRIP_NOPS.
	Only call front-end routine on object, type, or object with
	NOPs stripped, not inner values.
	Use language hook to call front-end routine.
	* builtins.c (get_memory_rtx): Always call set_mem_attributes.
	(expand_builtin_apply): Call set_mem_align on MEMs we make.
	Don't pass alignment to emit_block_move.
	(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
	(expand_builtin_memset): Likewise, but for clear_storage.
	* c-common.c (lang_get_alias_set): Renamed to c_common_alias_set
	and remove C++ specific parts.
	* c-common.h (c_common_get_alias_set): Add declaration.
	* c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro.
	* calls.c (emit_call_1): Fix typo in sibcall_pop case.
	(save_fixed_argument_area): Call set_mem_align.
	Remove alignment in call to emit_block_move.
	(emit_library_call_value_1, store_one_arg): Likewise.
	(target_for_arg): Remove; disabled long ago.
	* emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs
	once and similar cleanups.
	(offset_address): Use proper introductory comment.
	* expr.c (emit_block_move): Use alignment from that of MEM args, not
	from explicit operand; all callers changed.
	(clear_storage): Likewise.
	(expand_assignment): Don't call set_mem_alias_set on to_rtx.
	(store_field): Remove kludge on alias set used for to_rtx.
	(highest_pow2_factor, case *_DIV_EXPR): Never return 0.
	(expand_expr_unaligned): Call set_mem_attributes instead of
	set_mem_alias_set.
	* expr.h (emit_block_move, clear_storage): Remove ALIGN argument.
	* function.c (assign_stack_temp_for_type): Set MEM alignment.
	(expand_function_end): Track MEM attributes of trampolines.
	* ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM.
	* integrate.c (copy_rtx_and_substitute, case CALL): Copy memory
	attributes from original.
	* langhooks.c (lang_hook_default_get_alias_set): New function.
	(hook_get_alias_set_0): New function.
	* langhooks.h (hook_get_alias_set_0): New declaration.
	(lang_hook_default_get_alias_set): Likewise.
	(LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer.
	* reload1.c (alter_reg): Use adjust_address_nv.
	* rtl.c (get_mode_alignment): Moved to here.
	* rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and
	change default if unknown from 1 to BITS_PER_UNIT.
	* stor-layout.c (get_mode_alignment): Remove from here.
	* toplev.h (struct lang_hoks): Add get_alias_set field.
	* tree.h (lang_get_alias_set): Delete declaration.
	* config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment.
	* config/i386/i386.c (ix86_setup_incoming_varargs): Likewise.
	(ix86_va_arg): Likewise.
	* config/i960/i960.c (i960_setup_incoming_varargs): Likewise.
	* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
	* config/sparc/sparc.c (sparc_va_arg): Likewise.
	* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
	(expand_block_move_mem): Remove dead code.
	* cp/cp-lang.c (cxx_get_alias_set): New function.
	Point LANG_HOOKS_GET_ALIAS_SET to it.
	* f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro.
	(lang_get_alias_set): Delete.
	* java/lang.c (lang_get_alias_set): Deleted.

From-SVN: r46443
2001-10-23 16:46:41 -04:00
Richard Kenner
74e2819c70 alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0.
* alias.c (can_address_p): Compnonents are not addressable if
	the containing type has alias set 0.
	(get_alias_set): Rework to use STRIP_NOPS.
	Only call front-end routine on object, type, or object with
	NOPs stripped, not inner values.
	Use language hook to call front-end routine.
	* builtins.c (get_memory_rtx): Always call set_mem_attributes.
	(expand_builtin_apply): Call set_mem_align on MEMs we make.
	Don't pass alignment to emit_block_move.
	(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
	(expand_builtin_memset): Likewise, but for clear_storage.
	* c-common.c (lang_get_alias_set): Renamed to c_common_alias_set
	and remove C++ specific parts.
	* c-common.h (c_common_get_alias_set): Add declaration.
	* c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro.
	* calls.c (emit_call_1): Fix typo in sibcall_pop case.
	(save_fixed_argument_area): Call set_mem_align.
	Remove alignment in call to emit_block_move.
	(emit_library_call_value_1, store_one_arg): Likewise.
	(target_for_arg): Remove; disabled long ago.
	* emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs
	once and similar cleanups.
	(offset_address): Use proper introductory comment.
	* expr.c (emit_block_move): Use alignment from that of MEM args, not
	from explicit operand; all callers changed.
	(clear_storage): Likewise.
	(expand_assignment): Don't call set_mem_alias_set on to_rtx.
	(store_field): Remove kludge on alias set used for to_rtx.
	(highest_pow2_factor, case *_DIV_EXPR): Never return 0.
	(expand_expr_unaligned): Call set_mem_attributes instead of
	set_mem_alias_set.
	* expr.h (emit_block_move, clear_storage): Remove ALIGN argument.
	* function.c (assign_stack_temp_for_type): Set MEM alignment.
	(expand_function_end): Track MEM attributes of trampolines.
	* ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM.
	* integrate.c (copy_rtx_and_substitute, case CALL): Copy memory
	attributes from original.
	* langhooks.c (lang_hook_default_get_alias_set): New function.
	(hook_get_alias_set_0): New function.
	* langhooks.h (hook_get_alias_set_0): New declaration.
	(lang_hook_default_get_alias_set): Likewise.
	(LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer.
	* reload1.c (alter_reg): Use adjust_address_nv.
	* rtl.c (get_mode_alignment): Moved to here.
	* rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and
	change default if unknown from 1 to BITS_PER_UNIT.
	* stor-layout.c (get_mode_alignment): Remove from here.
	* toplev.h (struct lang_hoks): Add get_alias_set field.
	* tree.h (lang_get_alias_set): Delete declaration.
	* config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment.
	* config/i386/i386.c (ix86_setup_incoming_varargs): Likewise.
	(ix86_va_arg): Likewise.
	* config/i960/i960.c (i960_setup_incoming_varargs): Likewise.
	* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
	* config/sparc/sparc.c (sparc_va_arg): Likewise.
	* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
	(expand_block_move_mem): Remove dead code.
	* cp/cp-lang.c (cxx_get_alias_set): New function.
	Point LANG_HOOKS_GET_ALIAS_SET to it.
	* f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro.
	(lang_get_alias_set): Delete.
	* java/lang.c (lang_get_alias_set): Deleted.

From-SVN: r46442
2001-10-23 16:41:59 -04:00
Kaveh R. Ghazi
91ea4f8ddf Makefile.in (rtlanal.o): Depend on $(TM_P_H).
* Makefile.in (rtlanal.o): Depend on $(TM_P_H).
	* arm-protos.h (rdata_section, zero_init_section, common_section):
	Prototype.
	* arm.h (ASM_OUTPUT_DEF_FROM_DECLS): Const-ify.
	* avr.h (ASM_OUTPUT_SKIP): Rename macro parameter to avoid
	traditional mode stringification.
	* function.c (thread_prologue_and_epilogue_insns): Wrap variable
	in macros controling its use.
	* rtlanal.c: Include tm_p.h.
	* varasm.c (asm_output_aligned_bss): Mark parameter with
	ATTRIBUTE_UNUSED.
	(assemble_constant_align, assemble_start_function, assemble_align,
	assemble_variable, assemble_trampoline_template,
	output_constant_def_contents): Wrap potentially empty if-stmt body
	in brackets.

From-SVN: r46360
2001-10-19 19:42:46 +00:00
Richard Kenner
0d4903b81e emit-rtl.c (gen_reg_rtx): Also reallocate reg_decl array.
* emit-rtl.c (gen_reg_rtx): Also reallocate reg_decl array.
	(offset_address): New function.
	(free_emit_status): Free regno_decl.
	(init_emit): Pass proper number of elements to xcalloc.
	Allocate regno_decl.
	(mark_emit_status): Mark regno_decl values.
	* expr.c (highest_pow2_factor): New function.
	(expand_assigment): Use it and offset_address.
	Properly handle ptr_mode vs. Pmode in offset calculation.
	(store_constructor, expand_expr_unaligned): Likewise.
	(expand_expr, case COMPONENT_EXPR): Likewise.
	* expr.h (offset_address): New decl.
	* function.h (struct emit_status): Add regno_decl.
	(REGNO_DECL): New macro.
	* final.c (output_asm_name): Move in file and don't conditionalize
	on flag_print_asm_name.
	(output_asm_insn): Only call output_asm_name if flag_print_asm_name.
	Output names of operands, if known.
	* function.c (assign_parms): Set REGNO_DECL.
	* integrate.c (integrate_decl_tree): Likewise.
	* stmt.c (expand_decl): Likewise.
	* regclass.c (reg_scan_mark_refs): Propagate REGNO_DECL for copies.

From-SVN: r46337
2001-10-18 17:34:14 -04:00
Stan Shebs
b36948478c alias.c: Remove uses of "register" specifier in declarations of arguments and local...
2001-10-10  Stan Shebs  <shebs@apple.com>

        * alias.c: Remove uses of "register" specifier in declarations
        of arguments and local variables.
        * c-common.c: Ditto.
        * c-convert.c: Ditto.
        * c-decl.c: Ditto.
        * c-format.c: Ditto.
        * c-semantics.c: Ditto.
        * c-typeck.c: Ditto.
        * caller-save.c: Ditto.
        * calls.c: Ditto.
        * cfg.c: Ditto.
        * cfgbuild.c: Ditto.
        * cfgrtl.c: Ditto.
        * collect2.c: Ditto.
        * combine.c: Ditto.
        * convert.c: Ditto.
        * cppexp.c: Ditto.
        * cppfiles.c: Ditto.
        * cse.c: Ditto.
        * dbxout.c: Ditto.
        * defaults.h: Ditto.
        * df.c: Ditto.
        * dwarf2out.c: Ditto.
        * dwarfout.c: Ditto.
        * emit-rtl.c: Ditto.
        * explow.c: Ditto.
        * expmed.c: Ditto.
        * expr.c: Ditto.
        * final.c: Ditto.
        * fix-header.c: Ditto.
        * floatlib.c: Ditto.
        * flow.c: Ditto.
        * fold-const.c: Ditto.
        * function.c: Ditto.
        * gcc.c: Ditto.
        * gcse.c: Ditto.
        * gen-protos.c: Ditto.
        * genattrtab.c: Ditto.
        * gencheck.c: Ditto.
        * genconfig.c: Ditto.
        * genemit.c: Ditto.
        * genextract.c: Ditto.
        * genflags.c: Ditto.
        * gengenrtl.c: Ditto.
        * genoutput.c: Ditto.
        * genpeep.c: Ditto.
        * genrecog.c: Ditto.
        * gensupport.c: Ditto.
        * global.c: Ditto.
        * gmon.c: Ditto.
        * graph.c: Ditto.
        * haifa-sched.c: Ditto.
        * hard-reg-set.h: Ditto.
        * hash.c: Ditto.
        * integrate.c: Ditto.
        * jump.c: Ditto.
        * lists.c: Ditto.
        * local-alloc.c: Ditto.
        * loop.c: Ditto.
        * mips-tdump.c: Ditto.
        * mips-tfile.c: Ditto.
        * optabs.c: Ditto.
        * prefix.c: Ditto.
        * print-rtl.c: Ditto.
        * read-rtl.c: Ditto.
        * real.c: Ditto.
        * recog.c: Ditto.
        * reg-stack.c: Ditto.
        * regclass.c: Ditto.
        * regmove.c: Ditto.
        * reload.c: Ditto.
        * reload1.c: Ditto.
        * reorg.c: Ditto.
        * resource.c: Ditto.
        * rtl.c: Ditto.
        * rtlanal.c: Ditto.
        * scan.c: Ditto.
        * sched-deps.c: Ditto.
        * sched-rgn.c: Ditto.
        * sdbout.c: Ditto.
        * simplify-rtx.c: Ditto.
        * stmt.c: Ditto.
        * stor-layout.c: Ditto.
        * toplev.c: Ditto.
        * tradcif.y: Ditto.
        * tradcpp.c: Ditto.
        * tree.c: Ditto.
        * unroll.c: Ditto.
        * varasm.c: Ditto.
        * xcoffout.c: Ditto.

From-SVN: r46173
2001-10-11 03:16:15 +00:00
Kazu Hirata
6d2f888735 calls.c: Fix formatting.
* calls.c: Fix formatting.
	* c-decl.c: Likewise.
	* cfgcleanup.c: Likewise.
	* combine.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.c: Likewise.
	* cppmacro.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* dwarf2out.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* integrate.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reload1.c: Likewise.
	* reload.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* sched-rgn.c: Likewise.
	* sdbout.c: Likewise.
	* stmt.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r46145
2001-10-10 11:33:39 +00:00
Richard Henderson
6ba3b2142a varasm.c (restore_varasm_status): New.
* varasm.c (restore_varasm_status): New.
        * function.h: Declare it.
        * function.c (pop_function_context_from): Call it.

From-SVN: r46080
2001-10-08 09:46:24 -07:00
Richard Kenner
173b24b982 function.c (keep_stack_depressed): Don't use delete_insn.
* function.c (keep_stack_depressed): Don't use delete_insn.

	* expr.h (set_mem_alias_set): Move decl to here.
	* rtl.h (mem_attrs): New typedef and struct.
	(union rtunion_def): Add field for mem_attrs.
	(X0MEMATTR, MEM_ATTRS): New macros.
	(MEM_ALIAS_SET): Use MEM_ATTRS.
	(MEM_DECL, MEM_OFFSET, MEM_SIZE, MEM_ALIGN): New macros.
	(MEM_COPY_ATTRIBUTES): Copy MEM_ATTRS.
	(set_mem_alias_set): Delete decl from here.

	* alias.c (set_mem_alias_set): Delete from here.
	* emit-rtl.c (mem_attrs_htab): New variable.
	(rtx_htab_mark, rtx_htab_mark_1): Deleted.
	(mem_attrs_htab_hash, mem_attrs_htab_eq): New functions.
	(mem_attrs_mark, get_mem_attrs): Likewise.
	(gen_rtx_MEM): Clear MEM_ATTRS.
	(set_mem_attributes): Move to here.
	(set_mem_alias_set): Likewise, and call get_mem_attrs.
	(init_emit_once): const_int_htab now deletable htab.
	Initialize mem_attrs_htab.
	* explow.c (set_mem_attributes): Delete from here.
	* function.c (put_var_into_stack): Clear MEM_ATTRS.
	(gen_mem_addressof): Likewise; rework to use set_mem_attributes.
	* ggc-common.c (ggc_mark_rtx_children, case MEM): New case.
	* reload1.c (reload): Rework changing REG to MEM.

From-SVN: r45922
2001-10-01 07:00:47 -04:00
Jan Hubicka
ca6c03cabd Makefile.in (cfgrtl.o): Add.
* Makefile.in (cfgrtl.o): Add.
	* basic-block.h (alloc_block, alloc_aux_for_block, alloc_aux_for_blocks,
	free_aux_for_block, alloc_aux_for_edge, alloc_aux_for_edges,
	free_aux_for_edge): Declare.
	* cfg.c
	(HAVE_return): Undefine.
	* basic-block.h (alloc_block, alloc_aux_for_block, alloc_aux_for_blocks,
	free_aux_for_block, alloc_aux_for_edge, alloc_aux_for_edges,
	free_aux_for_edge): New global functions.
	(first_delete_block): New static variable.
	(init_flow): Clear first_delete_block.
	(basic_block_for_insn, label_value_list, tail_recursion_label_list,
	 can_delete_note_p, can_delete_label_p, commit_one_edge_insertion,
	 try_redirect_by_replacing_jump, last_loop_beg_note,
	 back_edge_of_syntactic_loop_p, force_nonfallthru_and_redirect,
	 delete_insn, delete_insn_chain, create_basic_block_structure,
	 create_basic_block, flow_delete_block, compute_bb_for_insn,
	 free_bb_for_insn, update_bb_for_insn, set_block_for_insn,
	 set_block_for_new_insns, split_block, merge_blocks_nomove,
	 block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
	 redirect_edge_and_branch, force_nonfallthru_and_redirect,
	 force_nonfallthru, redirect_edge_and_branch_force, tidy_fallthru_edge,
	 tidy_fallthru_edges, split_edge, insert_insn_on_edge,
	 commit_one_edge_insertion, commit_edge_insertions, dump_bb, debug_bb,
	 debug_bb_n, print_rtl_with_bb, verify_flow_info, purge_dead_edges,
	 purge_all_dead_edges): Move to ....
	* cfgrtl.c: New file; .... Here.

	* bb-reorder.c (fixup_reorder_chain): Use alloc_aux_for_block.
	(reroder_basic_block): Use alloc_aux_for_blocks.
	* predict.c (estimate_bb_frequencies): Likewise; use
	alloc_aux_for_edges.
	* profile.c (compute_branch_probabilities): Likewise.
	(branch_prob): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.

	* emit-rtl.c (emit_insns_after): Never return NULL.

	* basic-block.h (set_block_for_new_insns): Delete.
	* cfgrtl.c (set_block_for_new_insns): Delete.

	* cfgcleanup.c (try_optimize_cfg): Add fake exit edges for noreturn
	calls when crossjumping.

	* cfgcleanup.c (try_simplify_condjump): Cleanup invert_jump call.
	* unroll.c (copy_loop_body): Use delete_insn.

	* final.c (final, final_scan_insn): Use delete_insn/delete_note.
	* function.c (fixup_var_refs_insn, fixup_var_refs_1,
	keep_stack_depressed): Likewise.
	* gcse.c (cprop_cc0_jump): Likewise.
	* local-alloc.c (update_equiv_regs): Likewise.
	* loop.c (scan_loop, loop_delete_insns): Likewise.
	* regmove.c (try_auto_increment, fixup_match_1): Likewise.
	* reload1.c (reload, calculate_needs_all_insns, reload_as_needed,
	delete_output_reload, delete_address_reloads_1,
	reload_cse_delete_noop_set, reload_combine, reload_cse_move2add):
	Likewise.
	* sibcall.c (replace_call_placeholder): Likewise.
	* cse.c (cse_insn): Likewise.

From-SVN: r45807
2001-09-25 15:26:55 +00:00
Richard Kenner
7a80cf9a2f function.c (pop_function_context_from): var_refs_queue and temp slots now in GC memory.
* function.c (pop_function_context_from): var_refs_queue
	and temp slots now in GC memory.
	(mark_function_status, free_after_compilation): Likewise;
	also struct function now in GC memory.
	(assign_stack_temp_for_type): struct temp_slot now in GC memory.
	(combine_temp_slots): Likewise.
	(schedule_fixup_var_refs): var_refs_queue now in GC memory.
	(prepare_function_start): Use GC memory for struct function.
	(mark_temp_slot): Deleted.
	(gcc_mark_struct_function): struct function now in GC memory.

From-SVN: r45764
2001-09-23 19:35:38 -04:00
Richard Kenner
6a1d250ead function.c (fix_lexical_address): Use set_mem_alias_set.
* function.c (fix_lexical_address): Use set_mem_alias_set.
	(expand_function_start): Likewise.
	* config/alpha/alpha.h (SETUP_INCOMING_VARARGS): Likewise.

From-SVN: r45751
2001-09-22 09:27:33 -04:00
Jan Hubicka
53c170316f basic-block.h (flow_delete_insn, [...]): Kill.
* basic-block.h (flow_delete_insn, flow_delete_insn_chain): Kill.
	* cfg.c (delete_insn): Rename from ....; use remove_insn; do not
	remove some labels.
	(flow_delete_insn): This one.
	(delete_insn_chain): Rename from ...; do not care labels.
	(flow_delete_insn_chain): ... this one.
	(flow_delete_block): Remove the insns one BB has been expunged.
	(merge_blocks_nomove): Likewise.
	(try_redirect_by_replacing_jump): Use delete_insn[_chain]; do not care
	updating BB boundaries.
	(tidy_fallthru_edge): Likewise.
	(commit_one_edge_insertion): Likewise.
	* cfgbuild.c (find_basic_block): Likewise.
	(find_basic_blocks_1): Likewise.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Likewise.
	(try_crossjump_to_edge): Likewise.
	(try_optimize_cfg): Likewise.
	* cse.c (delete_trivially_dead_insns): Likewise.
	* df.c (df_insn_delete): Likewise.
	* doloop.c (doloop_modify): Use delete_related_insns.
	* emit-rtl.c (try_split): Likewise.
	(remove_insn): Update BB boundaries.
	* expect.c (connect_post_landing_pads): Use delete_related_insns.
	* flow.c (delete_dead_jumptables): Use delete_insn[_chain]; do not care
	updating BB boundaries.
	(propagate_block_delete_insn): Likewise.
	(propagate_block_delete_libcall): Likewise.
	* function.c (delete_handlers): Use delete_related_insns.
	(thread_prologue_and_epilogue_insns): Likewise.
	* gcse.c (delete_null_pointer_checks): Use delete_related_insns.
	* genpeep.c (gen_peephole): Use delete_related_insns.
	* ifcvt.c (noce_process_if_block): Use delete_insn; do not care updating
	BB boundaries.
	(find_cond_trap): Likewise.
	* integrate.c (save_for_inline): Use delete_related_insns.
	(copy_insn_list): Likewise.
	* jump.c (pruge_linie_number_notes): Likewise.
	(duplicate_loop_exit_test): Likewise.
	(delete_computation): Likewise.
	(delete_related_insn): Rename from ...; use delete_insn
	(delete_insn): ... this one.
	(redirect_jump): Use delete_related_insns.
	* loop.c (scan_loop): Likewise.
	(move_movables): Likewise.
	(find_and_verify_loops): Likewise.
	(check_dbra_loop): Likewise.
	* recog.c (peephole2_optimize): Likewise.
	* reg-stack.c (delete_insn_for_stacker): Remove.
	(move_for_stack_reg): Use delete_insn.
	* regmove.c (combine_stack_adjustments_for_block): Likewise.
	* reload1.c (delete_address_reloads): Use delete_related_insns.
	(fixup_abnormal_edges): Use delete_insn.
	* recog.c (emit_delay_sequence): Use delete_related_insns.
	(delete_from-delay_slot): Likewise.
	(delete_scheduled_jump): likewise.
	(optimize_skip): Likewise.
	(try_merge_delay_insns): Likewise.
	(full_simple_delay_slots): Likewise.
	(fill_slots_from_thread): Likewise.
	(relax_delay_slots): Likewise.
	(make_return_insns): Likewise.
	(dbr_schedule): Likewise.
	* rtl.h (delete_insn): Rename to delete_related_insns.
	(delete_insn, delete_insn_chain): New prototypes.
	* ssa-ccp (sse_fast_dce):  Remove deleting of DEF, as it is done
	by df_insn_delete already.
	* ssa-dce.c (delete_insn_bb): Use delete_insn.
	* ssa.c (convert_from_ssa): Use delete_related_insns.
	* unroll.c (unroll_loop): Likewise.
	(calculate_giv_inc): Likewise.
	(copy_loop_body): Likewise.

	* i386-protos.h (ix86_libcall_value, ix86_function_value,
	ix86_function_arg_regno_p, ix86_function_arg_boundary,
	ix86_return_in_memory, ix86_function_value): Declare.
	* i386.c (x86_64_int_parameter_registers, x86_64_int_return_registers):
	new static valurables.
	(x86_64_reg_class): New enum
	(x86_64_reg_class_name): New array.
	(classify_argument, examine_argument, construct_container,
	 merge_classes): New static functions.
	(optimization_options): Enable flag_omit_frame_pointer and disable
	flag_pcc_struct_return on 64bit.
	(ix86_libcall_value, ix86_function_value,
	ix86_function_arg_regno_p, ix86_function_arg_boundary,
	ix86_return_in_memory, ix86_function_value): New global functions.
	(init_cumulative_args): Refuse regparm on x86_64, set maybe_vaarg.
	(function_arg_advance): Handle x86_64 passing conventions.
	(function_arg): Likewise.
	* i386.h (FUNCTION_ARG_BOUNDARY): New macro.
	(RETURN_IN_MEMORY): Move offline.
	(FUNCTION_VALUE, LIBCALL_VALUE): Likewise.
	(FUNCTION_VALUE_REGNO_P): New macro.
	(FUNCTION_ARG_REGNO_P): Move offline.
	(struct ix86_args): Add maybe_vaarg.
	* next.h (FUNCTION_VALUE_REGNO_P): Delete.
	* unix.h (FUNCTION_VALUE_REGNO_P): Delete.

From-SVN: r45726
2001-09-21 12:55:18 +00:00
Jan Hubicka
3c030e88e7 basic-block.h (free_bb_for_insn): Declare.
* basic-block.h (free_bb_for_insn): Declare.
	* bb-reorder.c (label_for_bb): Use block_label.
	(emit_jump_to_block_after): Remove.
	(insert_intra_1): Do not update block_for_insn.
	(insert_inter_bb_scope_notes): Likewise; update bb->end
	* cfg.c (free_bb_for_insn): New.
	(try_rediret_by_replacing_jump): Avoid set_block_for_new_insns call.
	(force_nonfallthru_and_redirect): Likewise; do not update BB boundaries.
	(commit_one_edge_insertion): Likewise.
	(commit_one_edge_insertion): Do not update BB boundary.
	(commit_edge_insertions): Do not call compute_bb_for_insn.
	* cfgbuild.c (find_basic_blocks): Do not free basic_block_for_insn.
	* cfgcleanup.c (merge_blocks_move_predecessor): Use reorder_insns_nobb.
	(merge_blocks_move_successor_nojumps): Likewise.
	(try_crossjump_to_edge): Do not update block_for_insn.
	* combine.c (combine_instructions): Remove compute_bb_for_insn call.
	* df.c (df_pattern_emit_later): Do not update BB boundary.
	(df_jump_pattern_emit_after): Likewise.
	(df_insn_move_before): Use emit_insn_before.
	* emit-rtl.c (try_split): Emit after trial to get bb boundary updated
	 properly.
	(add_insn_after, add_insn_before, emit_insns_after): Update BB
	boundaries and basic_block_for_insn.
	(reorder_insns_nobb): Rename from reorder_insns.
	(reorder_insns): New.
	(emit_block_insn_before, emit_block_insn_after): Kill.
	* flow.c (check_function_return_warnings): Do not call
	compute_bb_for_insn; Do not free basic_block_for_insn.
	(attempt_auto_inc): Do not update basic_block_for_insn.
	* function.c (emit_return_into_block): Likewise;
	do not update BB boundaries.
	* gcse.c (handle_avail_expr): Do not update basic_block_for_insn.
	(insert_insn_end_bb): Use emit_insn_before; Likewise.
	(pre_insert_copy_insn): Likewise.
	(update_ld_motion_notes): Likewise.
	(insert_insn_start_bb): Likewise.
	(replace_store_insn): Likewise.
	* ifcvt.c (noce_process_if_block): Likewise.
	(if_convert): Do not call compute_bb_for_insn.
	* lcm.c (optimize_mode_switching): Do not update BB boundaries.
	Use emit_insn_before and emit_insn_after.
	* recog.c (split_all_insns): Do not update BB boundaries;
	Do not call compute_bb_for_insn.
	(peephole2_optimize): Do not update BB boundaries.
	* reg-stack.c (emit_pop_insn): Use emit_insn_after and
	emit_insn_before.
	(emit_swap_insn): Likewise.
	(convert_regs_1): Likewise.
	* reload1.c (reload): Call compute_bb_for_insn.
	* rtl.h (reorder_insns_nobb): Declare.
	* ssa.c (rename_equivalent_regs): Use emit_insn_before.
	* toplev.c (rest_of_compilation): Call free_bb_for_insn
	at places CFG is invalidated; do not call compute_bb_for_insn.

	* cfg.c (expunge_block): Invalidate BB structure.

	* (merge_blocks_nomove): Update properly BLOCK_FOR_INSN
	array.

	* cfg.c (verify_flow_info): Verify the basic_block_for_insn array.

From-SVN: r45647
2001-09-16 20:21:30 +00:00
Zack Weinberg
ae6f2a1c8f function.c (ggc_mark_struct_function): Mark f->outer.
* function.c (ggc_mark_struct_function): Mark f->outer.
	* toplev.c (rest_of_compilation): Clear DECL_SAVED_INSNS here...
	* integrate.c (output_inline_function): ... not here.

From-SVN: r45419
2001-09-05 17:48:26 +00:00
Richard Henderson
964be02f44 function.h (struct function): Add arg_pointer_save_area_init.
* function.h (struct function): Add arg_pointer_save_area_init.
        * function.c (expand_function_end): Init arg_pointer_save_area.
        (get_arg_pointer_save_area): Do not init arg_pointer_save_area
        when called from a nested function.

From-SVN: r45362
2001-09-03 13:50:33 -07:00
Zack Weinberg
eb3ae3e105 function.c: Remove all_functions.
* function.c: Remove all_functions.  Make outer_function_chain
	static.
	(init_function_start): Don't add new function structure to
	all_functions.
	(find_function_data, push_function_context_to,
	pop_function_context_from, put_var_into_stack,
	trampoline_address): Update for changed structure element names.
	(push_function_context_to): Disentangle.
	(free_after_compilation): Also free F.
	(expand_dummy_function_end): Don't free cfun here.
	(put_var_into_stack): Comment why we can't use find_function_data here.
	(fix_lexical_addr, trampoline_address, ): Use find_function_data.
	(mark_function_chain): Split into maybe_mark_struct_function and
	ggc_mark_struct_function.  Export the latter.
	(init_function_once): Mark from cfun and outer_function_chain;
	not all_functions.

	* function.h (struct function): Kill next_global.  Rename next
	to outer.  All users updated to match.
	(all_functions, outer_function_chain): Don't declare.

	* ggc-common.c (ggc_mark_trees): Mark DECL_SAVED_INSNS.
	* integrate.c (output_inline_function): Clear DECL_SAVED_INSNS,
	don't touch f->inlinable, after calling rest_of_compilation.

	* tree.h: Forward-declare struct function.  Prototype
	ggc_mark_struct_function.

From-SVN: r45336
2001-08-31 22:22:02 +00:00
Richard Henderson
278ed2183f function.c (expand_function_end): Don't init arg_pointer_save_area.
* function.c (expand_function_end): Don't init arg_pointer_save_area.
        (get_arg_pointer_save_area): New.  Create an init it here.
        (fix_lexical_addr): Use it.
        * function.h: Declare it.
        * builtins.c (expand_builtin_setjmp_receiver): Use it.
        * stmt.c (expand_nl_goto_receiver): Use it.

From-SVN: r45200
2001-08-27 10:36:20 -07:00
Jan Hubicka
ab75d1f125 function.c (thread_prologue_and_epilogue_insns): Avoid fallthru flag on edge to exit.
* function.c (thread_prologue_and_epilogue_insns): Avoid
	fallthru flag on edge to exit.

	* i386.md (trunc?fsi splitter): Conditionionize for non-sse.

	* flow.c (delete_noop_moves, propagate_block_delete_insn): Purge
	dead edges.

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

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Zack Weinberg
da92057001 expmed.c (mode_for_extraction): New function.
* expmed.c (mode_for_extraction): New function.
	(store_bit_field, extract_bit_field): Use it.
	* expr.h: Prototype it and provide an enum for its first argument.

	* combine.c, function.c, recog.c: Don't include insn-codes.h.
	Use mode_for_extraction rather than testing HAVE_insv/extv/extzv
	and digging through the insn_data tables.
	* Makefile.in: Update dependencies.

From-SVN: r45086
2001-08-22 00:33:33 +00:00
Richard Henderson
c49f511c7e * function.c (gen_mem_addressof): Don't call get_alias_set if no decl.
From-SVN: r45030
2001-08-19 02:04:31 -07:00
Zack Weinberg
ef89d648b8 optabs.h (OTI_flodiv, [...]): Kill.
* optabs.h (OTI_flodiv, flodiv_optab): Kill.
	* genopinit.c: Put floating point divide insns in sdiv_optab.
	* expr.c (expand_expr): Use sdiv_optab, not flodiv_optab.
	* config/gofast.h, config/c4x/c4x.h,
	config/ia64/hpux_longdouble.h, config/mips/mips.h,
	config/pa/long_double.h, config/rs6000/sysv4.h,
	config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab.
	* optabs.c (init_optab): Break into new_optab, init_optab, init_optabv.
	(init_optabs): Use init_optabv for overflow-trapping optabs.
	Don't init flodiv_optab.  Give mov_optab, movstrict_optab, and
	cmp_optab RTX codes so have_insn_for can find them.

	* optabs.c (expand_simple_binop, expand_simple_unop,
	have_insn_for, gen_sub3_insn): New interfaces.
	* expr.h: Prototype new functions.
	(enum optab_methods): Move here from optabs.h.

	* builtins.c, combine.c, doloop.c, function.c, ifcvt.c,
	loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c:
	Use new	functions instead of working directly with optabs.
	* doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c,
	unroll.c: Don't include optabs.h.
	* caller-save.c, combine.c, function.c, stmt.c: Just include
	insn-codes.h, not optabs.h.
	* Makefile.in: Update dependencies.

	* combine.c (make_compound_operation, simplify_comparison):
	Fix typos testing for this or that instruction.

From-SVN: r45008
2001-08-18 19:59:46 +00:00
Jan Hubicka
abde42f7c7 Install the proper patch.
* function.c (put_var_into_stack): Temporarily clear DECL_RTL.
	(assign_params): Avoid setting DECL_RTL to unfinished RTX.
	(expand_function_start): Likewise.
	* stmt.c (expand_decl): Likewise.
	* varasm.c (make_decl_rtx): Likewise.

From-SVN: r44961
2001-08-17 13:50:15 +00:00
Zack Weinberg
e78d8e5137 expr.h: Split out optab- and libfunc-related code to...
* expr.h: Split out optab- and libfunc-related code to...
	* optabs.h, libfuncs.h: ... these new headers.

	* Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h.
	(OPTABS_H): New.
	(various .o rules): Add $(OPTABS_H) and/or libfuncs.h to
	dependencies.
	* mkconfig.sh: Don't include insn-codes.h from config.h.

	* reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether
	enum insn_code is available.  Move reload_in_optab and
	reload_out_optab array declarations to optabs.h.
	* regmove.c (gen_add3_insn): Move to optabs.c, export from
	there, prototype in expr.h.
	* gencodes.c: Cleanup: zap global variables, don't use
	printf where puts will do, don't bother defining MAX_INSN_CODE
	which nothing uses, let CODE_FOR_nothing get its value implicitly.

	* genemit.c, genopinit.c: Include optabs.h in generated file.
	* genoutput.c: Include insn-codes.h in generated file.
	* builtins.c, caller-save.c, combine.c, doloop.c, explow.c,
	expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c,
	reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c,
	config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c,
	config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c,
	config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c:
	Include optabs.h.
	* builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c,
	optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c,
	config/m88k/m88k.c, config/sparc/sparc.c:
	Include libfuncs.h.
	* reload.c: Include expr.h and optabs.h before reload.h.
	* config/alpha/alpha.c: Include tree.h before reload.h.
	* config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h,
	and reload.h in that order.
	* config/sparc/sparc.c: Include debug.h.
	* recog.c: Include insn-codes.h.

cp:
	* Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
	* except.c: Include libfuncs.h.
java:
	* Make-lang.in (java/decl.o): Update dependencies.
	* decl.c: Include libfuncs.h, don't include toplev.h.

From-SVN: r44858
2001-08-13 15:56:51 +00:00
Zack Weinberg
31cdd4996b defaults.h: Define PREFERRED_STACK_BOUNDARY to STACK_BOUNDARY if not already defined.
* defaults.h: Define PREFERRED_STACK_BOUNDARY to
	STACK_BOUNDARY if not already defined.

	* calls.c, function.c, reload1.c, explow.c: Don't default
	PREFERRED_STACK_BOUNDARY.  Remove all #if/#ifdef on
	PREFERRRED_STACK_BOUNDARY and/or STACK_BOUNDARY.

	* explow.c (allocate_dynamic_stack_space): Change unsafe #if
	to run-time test.

	* doc/tm.texi: Document that STACK_BOUNDARY is required;
	clarify difference between it and PREFERRED_STACK_BOUNDARY.

From-SVN: r44814
2001-08-12 01:46:15 +00:00
Zack Weinberg
19652adf82 calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY if not already defined.
* calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY
	if not already defined.  Remove all #ifdefs on STACK_BOUNDARY;
	this macro is now required.

	* cselib.c (cselib_process_insn), flow.c (propagate_block),
	loop.c (find_and_verify_loops), reload.c (reload): Check
	for rtx code of CALL_INSN, not CALL, when deciding if we
	need to check for REG_SETJMP note.

	* gcse.c (compute_hash_table, compute_store_table): Update
	the #ifdef NON_SAVING_SETJMP code to the new REG_SETJMP
	logic.

	* config/avr/avr.c: Fix typo.
	* config/convex/convex.c (expand_movstr): Use adjust_address.
	* config/dsp16xx/dsp16xx.c: Define dsp16xx_compare_gen
	variable.
	* config/dsp16xx/dsp16xx.md: Correct calls to replace_equiv_address.
	* config/elxsi/elxsi.c: Include tree.h, expr.h, regs.h, and flags.h.
	Fix typo.
	* config/elxsi/elxsi.h: Don't define Rmode (typo for Pmode?)
	Do define STACK_BOUNDARY.
	* config/i370/i370.c: Include expr.h.
	* config/i860/sysv3.h, config/i860/sysv4.h, config/m32r/m32r.h,
	config/pa/som.h, config/v850/v850.h: Take in_ctors and
	in_dtors out of EXTRA_SECTIONS; take CTORS_SECTION_FUNCTION
	and DTORS_SECTION_FUNCTION out of EXTRA_SECTION_FUNCTIONS.
	* config/m88k/m88k.c: Include c-tree.h after expr.h.
	* config/pdp11/pdp11.c: Include expr.h and toplev.h.
	* config/romp/romp.c: Include expr.h after tree.h.
	Include toplev.h.
	(output_fpop): Use xmalloc, not oballoc.
	* config/we32k/we32k.c: Include expr.h.

From-SVN: r44768
2001-08-10 16:19:22 +00:00
John David Anglin
396ad5177c stmt.c (expand_null_return_1): Remove code to generate simple returns and "use_goto" argument.
* stmt.c (expand_null_return_1): Remove code to generate simple returns
	and "use_goto" argument.
	(expand_null_return, expand_value_return): Update all callers.
	* function.c (expand_function_end): Remove code to generate simple
	return.
	* config/vax/vax.md (epilogue): New expander for function return.
	* doc/md.texi (epilogue): Remove "if defined".

From-SVN: r44750
2001-08-10 02:14:26 +00:00
Kazu Hirata
30f7a3786c dbxout.c: Fix comment formatting.
* dbxout.c: Fix comment formatting.
	* dependence.c: Likewise.
	* df.c: Likewise.
	* diagnostic.c: Likewise.
	* dominance.c: Likewise.
	* doprint.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.

From-SVN: r44729
2001-08-08 22:06:48 +00:00
Jason Merrill
5755cd3808 alias.c (get_alias_set): Return a previously calculated alias set for a VAR_DECL.
* alias.c (get_alias_set): Return a previously calculated
        alias set for a VAR_DECL.
        * function.c (gen_mem_addressof): Calculate the alias set before
        touching the RTL.

From-SVN: r44720
2001-08-08 12:56:51 -04:00
Richard Henderson
1d48205639 i386.h (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): New.
* config/i386/i386.h (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): New.
	* function.c (expand_main_function): Implement it.
	* doc/tm.texi: Document it.

From-SVN: r44664
2001-08-06 09:38:18 -07:00
Jan Hubicka
75540af074 rs6000.md (define_splits): Kill unused constraints.
* rs6000.md (define_splits): Kill unused constraints.

	* function.c (thread_prologue_and_epilogue_insns): Kill code
	dealing with non-existent CFG.

From-SVN: r44548
2001-08-01 18:03:28 +00:00
Graham Stott
dc56ceb766 * function.c (pad_below): Revert 2001-07-26 patch.
From-SVN: r44514
2001-07-31 15:13:41 +00:00
Jan Hubicka
0ecf09f9cc i386.c (ix86_output_main_function_alignment_hack): New function.
* i386.c (ix86_output_main_function_alignment_hack): New function.
	(TARGET_ASM_FUNCTION_PROLOGUE): Default to it.

	* flow.c (mark_dfs_back_edges): Move from loop_p ; mark back
	edges by EDGE_DFS_BACK flag.
	(dump_edge_info): Add dfs_back flag.
	* basic-block.h (EDGE_DFS_BACK): New constant.
	(mark_dfs_back_edges): Declare.
	* alias.c (loop_p): Remove.
	(mark_constant_function): Use mark_dfs_back_edges.

	* reg-stack.c (block_info_def): Add predecesors counter and stack_out.
	(reg_to_stack): Call mark_dfs_back_edges; count the predecesors.
	(compensate_edge): Break out from ...
	(convert_regs_1): ... here; do smart choosing of stack_out to copy.
	(convert_regs_2): Set block_done once block is really done;
	Do updating of the predecesors counts.

	* toplev.c (rest_of_compilation): Recompute block_for_insn
	before post-reload cfg_cleanup.
	* function.c (thread_prologue_epilogue_insns):
	Call set_block_for_new_insns when emitting prologue directly.

From-SVN: r44486
2001-07-30 20:30:23 +00:00
Richard Henderson
a20612aa8b dwarf2out.c (dw_val_class_offset): New.
* dwarf2out.c (dw_val_class_offset): New.
	(struct dw_ranges_struct, dw_ranges_ref): New.
	(ranges_table, ranges_table_allocated): New.
	(ranges_table_in_use, RANGES_TABLE_INCREMENT): New.
	(add_AT_offset, add_ranges, output_ranges): New.
	(print_die, output_die): Handle dw_val_class_offset.
	(attr_checksum, size_of_die, value_format): Likewise.
	(gen_lexical_block_die): Handle non-contiguous blocks.
	(gen_block_die): Likewise.
	(dwarf2out_finish): Add a DW_AT_entry_pc to the compilation unit
	if needed.  Dump the ranges table.
	* final.c (final_start_function): Remove unnecessary notes and
	rebuild the block tree before numbering the blocks.
	* function.c (reorder_blocks_0): Walk the existing block tree
	to unmark all blocks.
	(reorder_blocks_1): Create block fragments when duplicate block
	notes are seen.
	(reorder_fix_fragments): New.
	(reorder_blocks): Call it.
	* tree.h (BLOCK_FRAGMENT_ORIGIN, BLOCK_FRAGMENT_CHAIN): New.

From-SVN: r44444
2001-07-28 19:10:42 -07:00
Graham Stott
2e824adbe4 function.c (locate_and_pad_parm): Also pad initial offset so that the total argument size also includes the padding.
* function.c (locate_and_pad_parm): Also pad initial offset
        so that the total argument size also includes the padding.

From-SVN: r44379
2001-07-26 05:45:25 +00:00
Richard Kenner
ba4828e005 alias.c (set_mem_alias_set): New function.
* alias.c (set_mem_alias_set): New function.
	* rtl.h (set_mem_alias_set): Declare it.
	* builtins.c (expand_builtin_return_addr): Call it instead of
	using MEM_ALIAS_SET accessor.
	(expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise.
	(get_memory_rtx, expand_builtin_va_arg): Likewise.
	(expand_builtin_va_copy):Likewise.
	* caller-save.c (setup_save_areas): Likewise.
	* calls.c (compute_argument_addresses): Likewise.
	* explow.c (set_mem_attributes): Likewise.
	* expr.c (emit_single_push_insn, emit_push_insn): Likewise.
	(expand_assignment, store_constructor_field, store_field): Likewise.
	(expand_expr_unaligned): Likewise.
	* function.c (assign_stack_temp_for_type): Likewise.
	(put_reg_into_stack, gen_mem_addressof): Likewise.
	* ifcvt.c (noce_try_cmove_arith): Likewise.
	* reload1.c (reload, alter_reg): Likewise.
	* config/alpha/alpha.c (get_aligned_mem): Likewise.
	(alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise.
	(alpha_expand_unaligned_store): Likewise
	(alpha_expand_unaligned_load_words): Likewise.
	(alpha_expand_unaligned_store_words): Likewise.
	(alpha_expand_block_clear, alpha_expand_prologue): Likewise.
	(alpha_expand_epilogue): Likewise.
	* config/arc/arc.c (arc_setup_incoming_varargs): Likewise.
	* config/clipper/clipper.c (clipper_builtin_saveregs): Likewise.
	* config/i386/i386.c (legitimize_pic_address): Likewise.
	* config/i960/i960.c (setup_incoming_varargs): Likewise.
	* config/ia64/ia64.c (spill_restore_mem): Likewise.
	* config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise.
	* config/m8k/m88k.c (m88k_builtin_saveregs): Likewise.
	* config/mips/mips.c (mips_va_arg): Likewise.
	* config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
	* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
	(setup_incoming_varargs, rs6000_va_arg): Likewise.
	(rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise.
	(rs6000_emit_epilogue): Likewise.
	* config/sh/sh.c (sh_builtin_saveregs): Likewise.
	* config/sparc/sparc.c (sparc_va_arg): Likewise.
	* config/v850/v850.c (v850_va_arg): Likewise.

From-SVN: r43951
2001-07-11 16:35:55 -04:00
Jan van Male
ae0ed63adc regmove.c (replace_in_call_usage): Fix warnings.
2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
	* regmove.c (replace_in_call_usage): Fix warnings.
	* sched-deps.c (add_dependence): Fix warnings.
	* simplify-rtx.c (simplify_subreg): Likewise.
	Return NULL_RTX instead of NULL.

	* reg-stack.c (emit_swap_insn): Eliminate warnings.
	(subst_asm_stack_regs): Likewise.

	* combine.c (num_sign_bit_copies): Cast bitwidth to int to avoid
	warnings.

	* dwarf2out.c (output_call_frame_info): Declare i as int.
	(build_abbrev_table): Declare n_alloc as int.
	(dwarf2out_finish): Initialize die.
	* except.c: Declare sjlj_funcdef_number as unsigned.
	(connect_post_landing_pads): Declare j as unsigned.
	(convert_to_eh_region_ranges): Initialize call_site.
	(output_function_exception_table): Initialize tt_format_size.
	* expr.c (move_by_pieces_1): Initialize to1.
	(store_constructor): Initialize minelt and maxelt.
	* flow.c (mark_regs_live_at_end): Declare i as unsigned.
	* function.c (instantiate_decls): Avoid signed/unsigned warning.

	* c-decl.c (combine_parm_decls): Unused, remove.
	* c-tree.h: Remove prototype for combine_parm_decls.

	* reload.c (push_reload): Fix warning.
	(regno_clobbered_p): Likewise.
	* reload1.c (replace_pseudos_in_call_usage): Likewise.
	(reload_combine): Likewise.

	* bitmap.c: Rename bitmap_zero to bitmap_zero_bits to fix warnings.
	* bitmap.h: Rename bitmap_zero to bitmap_zero_bits to fix
	warnings.
	* bitmap.c (bitmap_operation): Change user.
	* bitmap.h (EXECUTE_IF_AND_COMPL_IN_BITMAP): Likewise.
For cp/:
2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>

	* call.c (build_op_delete_call): Initialize fn.
	(convert_like_real): Delete conditional.
	(joust): Initialize *w and *l.
	* class.c: Add prototype for binfo_ctor_vtable.
	(get_primary_binfo): Initialize result.
	* init.c (build_java_class_ref): Initialize name.

	* typeck.c (unary_complex_lvalue): Do not duplicate the
	argument to modify, pre-, or post-increment when used as an
	lvalue and when the argument has side-effects.

For ch/:
2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>

	* ch-tree.h: Remove prototype for combine_parm_decls, unused
	function.

From-SVN: r43893
2001-07-10 12:38:10 +02:00
Richard Kenner
f1ec5147f5 [multiple changes]
Mon Jul  9 06:41:07 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* emit-rtl.c (adjust_address_nv, replace_equiv_address_nv): New fcns.
	(operand_subword): Use them.
	(change_address_1): Renamed from change_address; new arg VALIDATE.
	* expr.h: Reflect above changes; change_address now macro.
	* alias.c (canon_rtx): Use replace_equiv_address_nv instead of
	making MEM.
	* cselib.c (add_mem_for_addr): Likewise.
	* expr.c (protect_from_queue, emit_move_insn_1): Likewise.
	* regmove.c (try_apply_stack_adjustment): Likewise.
	* reload.c (push_reload, make_memloc): Likewise.
	* reload1.c (eliminate_regs): Likewise.
	* simplify-rtx.c (simplify_replace_rtx): Likewise.
	* caller-save.c (setup_save_areas): Use adjust_address_nv instead of
	adjust_addess.
	* combine.c (make_extraction, simplify_shift_const): Likewise.
	(gen_lowpart_for_combine): Likewise.
	* cse.c (gen_lowpart_if_possible): Likewise.
	* function.c (fixup_var_refs_1, purge_addressof_1): Likewise.
	* expr.c (expand_expr, case COMPONENT_REF): Likewise.
	* optabs.c (gen_move_insn): Likewise.
	* reload1.c (alter_reg): Likewise.
	* simplify-rtx.c (simplify_subreg): Likewise.
	* stmt.c (expand_anon_union_decl): Likewise.
	* recog.c (validate_replace_rtx_1): Likewise.
	(expr.h): Include.
	* Makefile.in (recog.o): Add $(EXPR_H).
	* explow.c (stabilize): Call replace_equiv_address.
	* expr.c (move_by_pieces_1, store_by_pieces_2): Likewise.
	* final.c (alter_subreg): OFFSET is HOST_WIDE_INT.

2001-07-09  Bo Thorsen  <bo@suse.co.uk>

	* config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support.

2001-07-09  Neil Booth  <neil@daikokuya.demon.co.uk>

	* final.c (output_addr_const): Use target opening and
	closing parentheses.
	* target-def.h: Define TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN
	defaults, add to TARGET_ASM_OUT.
	* target.h (struct gcc_target): Add open_paren and close_paren.
	* doc/md.texi: Update.
	* doc/tm.texi: Document TARGET_ASM_FUNCTION_END_PROLOGUE,
	TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, TARGET_ASM_OPEN_PAREN and
	TARGET_ASM_CLOSE_PAREN.
	* config/i386/i386.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN):
	Override.
	* config/pdp11/pdp11.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN):
	Override.
	* config/1750a/1750a.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove.
	* config/a29k/a29k.h: Similarly.
	* config/alpha/alpha.h: Similarly.
	* config/arc/arc.h: Similarly.
	* config/arm/aof.h: Similarly.
	* config/arm/aout.h: Similarly.
	* config/avr/avr.h: Similarly.
	* config/c4x/c4x.h: Similarly.
	* config/clipper/clipper.h: Similarly.
	* config/convex/convex.h: Similarly.
	* config/d30v/d30v.h: Similarly.
	* config/dsp16xx/dsp16xx.h: Similarly.
	* config/elxsi/elxsi.h: Similarly.
	* config/fr30/fr30.h: Similarly.
	* config/h8300/h8300.h: Similarly.
	* config/i370/i370.h: Similarly.
	* config/i386/i386.h: Similarly.
	* config/i860/i860.h: Similarly.
	* config/i960/i960.h: Similarly.
	* config/ia64/ia64.h: Similarly.
	* config/m32r/m32r.h: Similarly.
	* config/m68hc11/m68hc11.h: Similarly.
	* config/m68k/m68k.h: Similarly.
	* config/m88k/m88k.h: Similarly.
	* config/mcore/mcore.h: Similarly.
	* config/mips/mips.h: Similarly.
	* config/mn10200/mn10200.h: Similarly.
	* config/mn10300/mn10300.h: Similarly.
	* config/ns32k/ns32k.h: Similarly.
	* config/pa/pa.h: Similarly.
	* config/pdp11/pdp11.h: Similarly.
	* config/pj/pj.h: Similarly.
	* config/romp/romp.h: Similarly.
	* config/rs6000/rs6000.h: Similarly.
	* config/sh/sh.h: Similarly.
	* config/sparc/sparc.h: Similarly.
	* config/v850/v850.h: Similarly.
	* config/vax/vax.h: Similarly.
	* config/we32k/we32k.h: Similarly.

2001-07-09  Joseph S. Myers  <jsm28@cam.ac.uk>

	* doc/c-tree.texi: Document representation of attributes.

2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>

	* doc/tm.texi: Update some places for the rename of target to
	targetm.  Fix typo.

2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>

	* target.h (struct gcc_target): Add insert_attributes.
	* target-def.h (TARGET_INSERT_ATTRIBUTES): Define.
	(TARGET_INITIALIZER): Update.
	* tree.c, tree.h (default_insert_attributes): New function.
	Update comments on other default functions to refer to targetm,
	not target.
	* doc/tm.texi (INSERT_ATTRIBUTES): Update to document
	TARGET_INSERT_ATTRIBUTES.
	(SET_DEFAULT_DECL_ATTRIBUTES): Remove.
	* c-common.c (decl_attributes): Use targetm.insert_attributes.
	Don't use PRAGMA_INSERT_ATTRIBUTES.
	* Makefile.in (c-common.o): Depend on $(TARGET_H).
	* c-decl.c (start_decl, start_function): Don't call
	SET_DEFAULT_DECL_ATTRIBUTES.
	* config/c4x/c4x.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define.
	* config/c4x/c4x-protos.h (c4x_set_default_attributes): Don't
	declare.
	* config/c4x/c4x.c (TARGET_INSERT_ATTRIBUTES): Define.
	(c4x_check_attribute): Avoid modifying attribute list itself.
	(c4x_set_default_attributes): Rename to c4x_insert_attributes.
	Make static.
	* config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Don't define.
	* config/sh/sh-protos.h (sh_pragma_insert_attributes): Don't
	declare.
	* config/sh/sh.c (TARGET_INSERT_ATTRIBUTES): Define.
	(sh_pragma_insert_attributes): Rename to sh_insert_attributes.
	Make static.
	* config/v850/v850.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define.
	* config/v850/v850-protos.h (v850_set_default_decl_attr): Don't
	declare.
	* config/v850/v850.c (TARGET_INSERT_ATTRIBUTES): Define.
	(v850_set_default_decl_attr): Rename to v850_insert_attributes.
	Adjust parameters.  Make static.

2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>

	* c-common.c (decl_attributes): Only take a single attributes
	parameter.
	* c-common.h (decl_attributes): Update prototype.
	* c-decl.c (start_decl, start_function): Only take a single
	attributes parameter.  Update calls to decl_attributes.
	(finish_struct, finish_enum): Update calls to decl_attributes.
	(push_parm_decl): Expect unified list of attributes.  Update call
	to decl_attributes.
	* c-parse.in (fndef, initdcl, notype_initdcl, nested_function,
	notype_nested_function, component_declarator,
	component_notype_declarator, label): Update calls to
	decl_attributes.
	(absdcl_maybe_attribute, parm, firstparm, myparm): Unify attribute
	lists that are passed to push_parm_decl.
	* c-tree.h (start_function, start_decl): Update prototypes.
	* config/sh/sh-protos.h, config/sh/sh.c
	(sh_pragma_insert_attributes): Only take a single attributes
	parameter.
	* config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Likewise.
	* doc/tm.texi (INSERT_ATTRIBUTES): Update.
	* objc/objc-act.c (define_decl, generate_objc_symtab_decl,
	build_module_descriptor, generate_static_references,
	generate_strings, build_selector_translation_table,
	generate_descriptor_table, generate_protocols,
	generate_ivars_list, generate_dispatch_table,
	generate_protocol_list, generate_category,
	generate_shared_structures, really_start_method, add_objc_decls,
	generate_classref_translation_entry): Update calls to start_decl
	and start_function.
	(build_tmp_function_decl, start_method_def): Unify attribute lists
	that are passed to push_parm_decl.

2001-07-08  Neil Booth  <neil@daikokuya.demon.co.uk>

	* final.c (no_asm_to_stream): New.
	(final_scan_insn): Use target structures for prologue ends
	and epilogue starts.
	* output.h (no_asm_to_stream): New.
	* target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE,
	TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New.
	(TARGET_ASM_OUT): Update.
	* target.h (struct gcc_target): New members function_end_prologue
	and function_begin_epilogue.
	* config/1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused.
	* config/alpha/alpha-protos.h (output_end_prologue): Delete.
	* config/alpha/alpha.c (output_end_prologue): Rename to
	alpha_output_function_end_prologue.  Use in target struct
	and make static.
	* config/alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete.
	* config/ia64/ia64-protos.h (ia64_output_end_prologue): Delete.
	* config/ia64/ia64.c (ia64_output_end_prologue): Rename to
	ia64_output_function_end_prologue.  Use in target struct
	and make static.
	(ia64_function_prologue, ia64_funciton_epilogue): Rename
	mistyped prototypes.
	* config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete.
	* config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue):
	Delete.
	* config/m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename
	an use in target struct, make static.
	* config/ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE):
	Delete.

2001-07-08  Richard Henderson  <rth@redhat.com>

	* stmt.c (emit_case_nodes): Convert modes properly in low+high test.

2001-07-08  Richard Henderson  <rth@redhat.com>

	* config/i386/i386.md: Remove constraints strings from define_split
	and define_peephole2 patterns.
	(eh_return_si, eh_return_di): Split eh_return_1 for modes.
	(eh_return): Use them.

2001-07-08  Richard Henderson  <rth@redhat.com>

	* doc/tm.texi (Exception Handling): New subnode of Stack and Calling.
	Document MD_FALLBACK_FRAME_STATE_FOR.

2001-07-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset):
	Take into account m68hc11_sp_correction for FRAME_POINTER_REGNUM
	elimination.
	* config/m68hc11/m68hc11.h (STARTING_FRAME_OFFSET): Use 0.

2001-07-07  Nick Clifton  <nickc@cambridge.redhat.com>

	* config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end
	of the label inside NAME as opposed to just the end of NAME.

2001-07-07  Neil Booth  <neil@daikokuya.demon.co.uk>

	* config/alpha/alpha-protos.h (vms_valid_decl_attribute_p): Delete.
	* config/alpha/alpha.c (alpha_init_machine_status,
	alpha_mark_machine_status, alpha_free_machine_status): Delete.
	(TARGET_VALID_DECL_ATTRIBUTE): Define for VMS.
	(vms_valid_decl_attribute_p): Make static, conditionally compile.
	* config/alpha/alpha.h (VALID_MACHINE_DECL_ATTRIBUTE): Delete.

2001-07-06  Stan Shebs  <shebs@apple.com>

	* target.h (targetm): Rename global from "target", so as not to
	conflict with local variables.
	* c-decl.c: Ditto.
	* c-typeck.c: Ditto.
	* final.c: Ditto.
	* tree.c: Ditto.
	* cp/decl.c: Ditto.
	* cp/decl2.c: Ditto.
	* cp/typeck.c: Ditto.
	* 1750a/1750a.c: Ditto.
	* a29k/a29k.c: Ditto.
	* arc/arc.c: Ditto.
	* arm/arm.c: Ditto.
	* avr/avr.c: Ditto.
	* clipper/clipper.c: Ditto.
	* convex/convex.c: Ditto.
	* d30v/d30v.c: Ditto.
	* dsp16xx/dsp16xx.c: Ditto.
	* elxsi/elxsi.c: Ditto.
	* fr30/fr30.c: Ditto.
	* h8300/h8300.c: Ditto.
	* i370/i370.c: Ditto.
	* i386/i386.c: Ditto.
	* i860/i860.c: Ditto.
	* i960/i960.c: Ditto.
	* ia64/ia64.c: Ditto.
	* m32r/m32r.c: Ditto.
	* m68hc11/m68hc11.c: Ditto.
	* m68k/m68k.c: Ditto.
	* m88k/m88k.c: Ditto.
	* mips/mips.c: Ditto.
	* ns32k/ns32k.c: Ditto.
	* pa/pa.c: Ditto.
	* pdp11/pdp11.c: Ditto.
	* romp/romp.c: Ditto.
	* rs6000/rs6000.c: Ditto.
	* sh/sh.c: Ditto.
	* sparc/sparc.c: Ditto.
	* vax/vax.c: Ditto.
	* we32k/we32k.c: Ditto.
	* doc/tm.texi: Update the manual to match.

2001-07-06  Richard Henderson  <rth@redhat.com>

	* except.h (MUST_USE_SJLJ_EXCEPTIONS): Examine the value of
	DWARF2_UNWIND_INFO not just whether it is defined.

2001-07-06  Diego Novillo  <dnovillo@redhat.com>

	* combine.c (combine_simplify_rtx): Also recompute 'mode' if the
	call to simplify_binary_operation returns a new pattern.

2001-07-06  Roman Lechtchinsky  <rl@cs.tu-berlin.de>

	* glimits.h (__SHRT_MAX__): New.
	(SHRT_MIN, USHRT_MAX): Define in terms of SHRT_MAX.
	(SHRT_MAX): Define in terms of __SHRT_MAX__.

2001-07-06  Jan van Male  <jan.vanmale@fenk.wau.nl>

	* alias.c (base_alias_check): Cast GET_MODE_UNIT_SIZE to int to
	avoid warnings.

2001-07-06  Richard Henderson  <rth@redhat.com>

	* bitmap.c (bitmap_release_memory): Move adjacent to the
	allocation functions.
	(bitmap_first_set_bit, bitmap_last_set_bit): Streamline knowing
	the implementation.  Binary search for the set bit.
	(bitmap_union_of_diff): Allocate the temporary on the stack
	instead of using xmalloc.

2001-07-06  Richard Henderson  <rth@redhat.com>

	* genrecog.c (validate_pattern): Warn for constraints in
	define_{expand,split,peephole2}.  Remove strict_low_part
	before looking up match_dup.

2001-07-06  DJ Delorie  <dj@redhat.com>

	* doc/gcc.texi (Makefile): Rename to be a more general purpose
	chapter about various build hints and history.  Add section
	talking about the various types of native and cross builds.

2001-07-06  Neil Booth  <neil@daikokuya.demon.co.uk>

	* Makefile.in (final.o): Depend on target.h.
	* final.c: Include target.h.
	(default_function_pro_epilogue): New.
	(final_start_function): Use target structure for function prologues.
	(final_end_function): Use target structure for function epilogues.
	* fold-const.c (real_hex_to_f): Constify s and p.
	* output.h (default_function_pro_epilogue): New.
	* real.h (real_hex_to_f): Update prototype.
	* target-def.h (TARGET_ASM_FUNCTION_PROLOGUE,
	TARGET_ASM_FUNCTION_EPILOGUE, TARGET_ASM_OUT): New.
	(TARGET_INITIALIZER): Update.
	* target.h (gcc_target): Add struct asm_out.
	* doc/tm.texi: Update.

config:
	Update each arch to use TARGET_ASM_FUNCTION_PROLOGUE and
	TARGET_ASM_FUNCTION_EPILOGUE.  Move macro code to functions
	in cpu/cpu.c, or rename old functions consistently.  Take
	a HOST_WIDE INT not an int as the SIZE parameter.  Remove now
	redundant macros and prototypes.  Make new functions static.

	* 1750a/1750a.c: Similarly.
	* 1750a/1750a.h: Similarly.
	* a29k/a29k-protos.h: Similarly.
	* a29k/a29k.c: Similarly.
	* a29k/a29k.h: Similarly.
	* arc/arc-protos.h: Similarly.
	* arc/arc.c: Similarly.
	* arc/arc.h: Similarly.
	* arm/arm-protos.h: Similarly.
	* arm/arm.c: Similarly.
	* arm/arm.h: Similarly.
	* avr/avr-protos.h: Similarly.
	* avr/avr.c: Similarly.
	* avr/avr.h: Similarly.
	* clipper/clipper-protos.h: Similarly.
	* clipper/clipper.c: Similarly.
	* clipper/clipper.h: Similarly.
	* convex/convex.c: Similarly.
	* convex/convex.h: Similarly.
	* d30v/d30v-protos.h: Similarly.
	* d30v/d30v.c: Similarly.
	* d30v/d30v.h: Similarly.
	* d30v/d30v.md: Similarly.
	* dsp16xx/dsp16xx-protos.h: Similarly.
	* dsp16xx/dsp16xx.c: Similarly.
	* dsp16xx/dsp16xx.h: Similarly.
	* elxsi/elxsi.c: Similarly.
	* elxsi/elxsi.h: Similarly.
	* fr30/fr30.c: Similarly.
	* fr30/fr30.md: Similarly.
	* h8300/h8300-protos.h: Similarly.
	* h8300/h8300.c: Similarly.
	* h8300/h8300.h: Similarly.
	* i370/i370-protos.h: Similarly.
	* i370/i370.c: Similarly.
	* i370/i370.h: Similarly.
	* i386/i386.c: Similarly.
	* i386/osf1elf.h: Similarly.
	* i386/osfrose.h: Similarly.
	* i860/i860-protos.h: Similarly.
	* i860/i860.c: Similarly.
	* i860/i860.h: Similarly.
	* i960/i960-protos.h: Similarly.
	* i960/i960.c: Similarly.
	* i960/i960.h: Similarly.
	* ia64/ia64-protos.h: Similarly.
	* ia64/ia64.c: Similarly.
	* ia64/ia64.h: Similarly.
	* m32r/m32r-protos.h: Similarly.
	* m32r/m32r.c: Similarly.
	* m32r/m32r.h: Similarly.
	* m68hc11/m68hc11-protos.h: Similarly.
	* m68hc11/m68hc11.c: Similarly.
	* m68hc11/m68hc11.h: Similarly.
	* m68k/crds.h: Similarly.
	* m68k/dpx2.h: Similarly.
	* m68k/m68k-protos.h: Similarly.
	* m68k/m68k.c: Similarly.
	* m68k/m68k.h: Similarly.
	* m68k/news.h: Similarly.
	* m88k/m88k-protos.h: Similarly.
	* m88k/m88k.c: Similarly.
	* m88k/m88k.h: Similarly.
	* mips/mips-protos.h: Similarly.
	* mips/mips.c: Similarly.
	* mips/mips.h: Similarly.
	* ns32k/merlin.h: Similarly.
	* ns32k/ns32k.c: Similarly.
	* ns32k/ns32k.h: Similarly.
	* ns32k/tek6000.h: Similarly.
	* pa/pa-protos.h: Similarly.
	* pa/pa.c: Similarly.
	* pa/pa.h: Similarly.
	* pdp11/2bsd.h: Similarly.
	* pdp11/pdp11-protos.h: Similarly.
	* pdp11/pdp11.c: Similarly.
	* pdp11/pdp11.h: Similarly.
	* romp/romp-protos.h: Similarly.
	* romp/romp.c: Similarly.
	* romp/romp.h: Similarly.
	* rs6000/rs6000-protos.h: Similarly.
	* rs6000/rs6000.c: Similarly.
	* rs6000/rs6000.h: Similarly.
	* rs6000/sysv4.h: Similarly.
	* sh/sh-protos.h: Similarly.
	* sh/sh.c: Similarly.
	* sh/sh.h: Similarly.
	* sparc/sparc-protos.h: Similarly.
	* sparc/sparc.c: Similarly.
	* sparc/sparc.h: Similarly.
	* vax/vax.c: Similarly.
	* vax/vax.h: Similarly.
	* vax/vms.h: Similarly.
	* we32k/we32k.c: Similarly.
	* we32k/we32k.h: Similarly.

Fri Jul  6 11:47:59 2001  Jeffrey A Law  (law@cygnus.com)

	* basic-block.h (first_insn_after_basic_block_note): Declare.
	* flow.c (first_insn_after_basic_block_note): Define.  Moved
	from...
	* ssa.c (first_insn_after_basic_block_note): Remove.
	* ssa-dce.c (find_inherently_necessary): Consider BARRIERs
	necessary.
	(ssa_eliminate_dead_code): Properly update the CFG and PHI
	nodes when we find a dead conditional branch.  Insert BARRIERs
	after any blocks with no successors, but which do not have
	any BARRIERs.

2001-07-06  Zack Weinberg  <zackw@stanford.edu>

	* varray.c (varray_check_failed): Use internal_error.

2001-07-05  Andrew Haley  <aph@redhat.com>

	* Makefile.in (LIB2_DIVMOD_FUNCS): New.
	(LIB2FUNCS): Move divmod functions to LIB2_DIVMOD_FUNCS.
	* mklibgcc.in: Compile LIB2_DIVMOD_FUNCS.

2001-07-02  Jason Merrill  <jason_merrill@redhat.com>

	* dwarf2out.c (mem_loc_descriptor): Only look through a constant pool
	reference if the target constant is also a SYMBOL_REF.

2001-07-05  Eric Christopher  <echristo@redhat.com>

	* config/mips/mips.h (MASK_MIPS3900): Remove.
	(MASK_MIPS16,MASK_NO_CHECK_ZERO_DIV,MASK_CHECK_RANGE_DIV,
	MASK_UNINIT_CONST_IN_RODATA): Change for 3900 mask removal.
	(TARGET_MIPS3900): Change to use mips_arch.
	(TARGET_MIPS4000): New.
	(TARGET_MIPS4100): New.
	(TARGET_MIPS4300): New.
	(TARGET_SWITCHES): Change 3900 and 4650 options to NULL.
	(SUBTARGET_TARGET_OPTIONS): Add -march. Change help text
	for -mipsX.
	(GENERATE_BRANCHLIKELY): Move TARGET_MIPS3900.
	(ISA_HAS_BRANCHLIKELY): To here.
	(CC1_CPU_SPEC):	 New.
	(CC1_SPEC): Use here.  Remove 4650 and 3900 options.
	(mips_arch_string): Declare.
	(mips_arch): Declare.
	(TARGET_OPTIONS): Add -march and -mtune.

	* config/mips/mips.c (mips_arch_string): New.
	(mips_arch): New.
	(override_options): Handle -march for codegen and -mtune
	for scheduling. Use mips_arch. Move tx39 target default here.
	(mips_parse_cpu): Move error message to override_options.

	* config/mips/r3900.h (TARGET_DEFAULT): Remove.

	* config/mips/mips.md: Use TARGET_MIPS4000 and TARGET_MIPS4300.

	* doc/invoke.texi (Option Summary): Add -march and -mtune entries.
	(MIPS Options): Ditto.	Change mcpu entry to historical text.

2001-07-05  H.J. Lu  (hjl@gnu.org)

        * config/mips/mips.c (mips_parse_cpu): New function to parse
        -march=*/-mcpu=*.

2001-07-05  Jim Wilson  <wilson@redhat.com>

	* config/ia64/lib1funcs.asm: Revert 2001-07-02 change.
	* config/ia64/t-ia64: Likewise.
	(LIB1ASMFUNCS): Update comment.

2001-07-05  David Edelsohn  <edelsohn@gnu.org>

	* doc/install.texi (Install GCC: Binaries): Fix typo.

2001-07-04  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory
	reference using the stack pointer, adjust it since we push Y
	temporarily.
	("*ashrsi3"): Likewise.
	("*lshrsi3"): Likewise.

2001-07-05  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Fix return address
	when -fomit-frame-pointer is used.

2001-07-05  Jeffrey Oldham  <oldham@codesourcery.com>

	* flow.c: Reverse Jan Hubicka's patch of 02July2001.
	(try_redirect_by_replacing_jump): Reverse updating properly the
	count and frequency information.  Reverse removing cc0 setter.
	(forwarder_block_p): Reverse fixing for fallthru blocks.

2001-07-05  DJ Delorie  <dj@redhat.com>

	* gcc.c (TARGET_OPTION_TRANSLATE_TABLE): New.
	(translate_options): If the above is defined, use it to map
	given options to new options.
	* doc/tm.texi: Document it.

2001-07-05  Brad Lucier <lucier@math.purdue.edu>
	    Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>

	* doc/invoke.texi (Optimize Options): Document that -fgcse may
	cause programs using computed gotos to run more slowly.

2001-07-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* doc/install.texi (Specific): Markup, spelling and typo fixes.
	Fixed sorting.
	Consistently require binutils 2.11.2, not prereleases.
	(Specific, decstation-*): Canonicalize as mips-dec-*.
	(Specific, i?86-*-sco3.2v5*): Remove make bootstrap requirement,
	always necessary.
	(Specific, m68k-altos): Removed reference to README.altos, deleted.
	(Specific, mips-*): Reword MIPS C compiler requirements.
	(Specific, powerpc*-*-*): New, mention --with-cpu once.
	(Specific, sunv5): Removed, obsolete.

2001-07-05  Nathan Sidwell  <nathan@codesourcery.com>

	* dwarf2out.c (output_loc_list): Use an all ones mask for
	.text asm output and don't rely on long long
	literals. Reformat some long lines.

2001-07-05  Andreas Jaeger  <aj@suse.de>

	* doc/gcc.texi (GNU/Linux): Remove accidental re-add of GPL
	section.

2001-07-04  Daniel Berlin  <dan@cgsoftware.com>

	* dwarf2out.c (dwarf2out_define): Update comment.
	(dwarf2out_undef): Ditto.
	(dwarf2out_start_source_file): Ditto.
	(dwarf2out_end_source_file): Ditto.
	(dwarf2out_finish): Output DW_MACINFO_end_file for primary file,
	since we never call the start/end debug hook for the primary file.

2001-07-04  Kazu Hirata  <kazu@hxi.com>

	* config/h8300/h8300.c (get_shift_alg): Remove an extra operand
	from shll.

2001-07-04  Nathan Sidwell  <nathan@codesourcery.com>

	* cppinit.c (remove_dup_dirs): Inform if a system include
        directory is being reordered.
	* doc/invoke.texi (Directory Options): GCC warns if you hide a
	system include.
	* doc/cpp.texi (Search Paths): Likewise.
	* doc/gcc.texi (Interoperation): Remove information about
	-I/usr/include.

2001-07-04  Nathan Sidwell  <nathan@codesourcery.com>

	* varray.h (VARRAY_TOP_GENERIC_PTR): Remove spurious parameter.
	(VARRAY_TOP_CHAR_PTR): Likewise.

2001-07-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* gcc.c (process_command): Don't assign elements of a const char*.

Wed Jul  4 13:40:02 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* emit-rtl.c (change_address): Don't abort if invalid address while
	reload is in progress.

2001-07-04  Daniel Berlin  <dan@cgsoftware.com>

	* c-lex.c (cb_file_change): Pass line number to
	debug_start_source_file.
	(cb_undefine): Pass correct line number to debug_undef.

	* toplev.c (debug_start_source_file): Add line number to
	parameters. Pass it along to dwarf2out_start_source_file.
	(decode_g_option): Stop resetting debug level back to normal when
	we change debug formats, unless the current level is
	none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than
	3).

	* toplev.h (debug_start_source_file): Add line number to
	parameters.

	* dwarf2out.h (dwarf2out_start_source_file): Add line number to
	parameters.

	* dwarf2out.c (dwarf2out_start_source_file): Add line number to
	parameters.
	Output debug_macinfo data for starting file if requested.
	(dwarf2out_end_source_file): Output debug_macinfo data for ending
	file if requested.
	(dwarf2out_define): Output debug_macinfo data for defining a macro
	if requested.
	(dwarf2out_undef): Output debug_macinfo data for undefining a
	macro if requested.
	(DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name.
	(DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label.
	(macinfo_section_label): New. DWARF2 macro info section label.
	(dwarf2out_init): If we want macro info, output the start label
	for the section.
	(dwarf2out_finish): If we want macro info, add a DW_AT_macro_info
	attribute to the compilation unit die pointing to the macro info.

2001-07-04  Daniel Berlin  <dan@cgsoftware.com>

	* dwarf2out.c (new_loc_list): Move to inside #ifdef
	DWARF2_DEBUGGING_INFO.
	(add_loc_descr_to_loc_list): Ditto.
	(output_loc_list): Ditto.
	Also, fix thinko in curr not being initialized.
	(gen_internal_sym): Ditto.

Wed Jul  4 13:40:02 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* emit-rtl.c (replace_equiv_address): New function.
	* expr.h (replace_equiv_address): New declaration.
	* explow.c (validize_mem): Call it instead of change_address and
	also call if -fforce-addr and address is constant.
	* expr.c: Replace more calls to change_address with adjust_address
	and/or replace_equiv_address or to validize_mem.
	* function.c, regmove.c, config/alpha/alpha.c: Likewise.
	* config/arm/arm.md, config/clipper/clipper.md: Likewise.
	* config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise.
	* config/i370/i370.md, config/i860/i860.md: Likewise.
	* config/i960/i960.md, config/mips/mips.c: Likewise.
	* config/mips/mips.md, config/pa/pa.md: Likewise.
	* config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise.
	* config/rs6000/rs6000.md, config/sh/sh.md: Likewise.

2001-07-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* bitmap.c (bitmap_union_of_diff): Don't use BITMAP_ALLOCA.

	* bitmap.h (BITMAP_ALLOCA): Don't pass alloca as an argument to a
	function.

2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>

	* doc/include: New directory.
	* doc/fdl.texi: Move to doc/include/fdl.texi.
	* doc/texinfo.tex: Move to doc/include/texinfo.tex.
	* doc/include/funding.texi, doc/include/gpl.texi: New files.
	* doc/gcc.texi: Use funding.texi and gpl.texi.
	* Makefile.in ($(docdir)/cpp.info, $(docdir)/gcc.info,
	$(docdir)/cppinternals.info, cpp.dvi. gcc.dvi. cppinternals.dvi):
	Update dependencies and use -I $(docdir)/include.

2001-07-04  Anthony Green  <green@redhat.com>

	* config/v850/t-v850 (v850-c.o): Add missing dependencies.

2001-07-04  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>

	* doc/install.texi (sparc64-*-*): Remove garbage.

Wed Jul  4 09:07:44 2001  Jan van Male  <jan.vanmale@fenk.wau.nl>

	* i386.c (ix86_expand_builtin, case IX86_BUILTIN_SETPS):
	Fix typo in last change to use adjust_address.

2001-07-04  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>

	* doc/install.texi (Specific): Update information for *-*-solaris*.

Tue Jul  3 22:33:15 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* explow.c (plus_constant_wide): Reinitialize Y for restart.

2001-07-03  Stan Shebs  <shebs@apple.com>

	* config/darwin.h (SECTION_FUNCTION): Remove WAS_TEXT argument, remove
	case for flag_no_mach_text_sections.
	(EXTRA_SECTION_FUNCTIONS): Remove arg from uses of SECTION_FUNCTION.
	* config/darwin.c (flag_no_mach_text_sections): Remove.
	* config/darwin-protos.h (darwin_init_pragma): Remove decl.

Tue Jul  3 15:35:52 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* explow.c (plus_constant_wide, case PLUS): Call find_constant_term
	and avoid checking for constant as first operand.
	* recog.c (find_constant_term_loc): No longer static.
	(adj_offettable_operand): Delete.
	* rtl.h (adj_offsettable_operand): Delete declaration.
	(find_constant_term): Add declaration.
	* caller-save.c: Replace calls to adj_offsettable_operand with calls
	to adjust_address.
	* config/arm/arm.c, config/c4x/c4x.c: Likewise.
	* config/clipper/clipper.md, config/h8300/h8300.c: Likewise.
	* config/i386/i386.c, config/i386/i386.md: Likewise.
	* config/i860/i860.c, config/i960/i960.c: Likewise.
	* config/i960/i960.md, config/m68hc11/m68hc11.c: Likewise.
	* config/m68k/m68k.c, config/m68k/m68k.md: Likewise.
	* config/m88k/m88k.md, config/mcore/mcore.c: Likewise.
	* config/mips/mips.c, config/mips/mips.md: Likewise.
	* config/mn10200/mn10200.c, config/mn10300/mn10300.c: Likewise.
	* config/ns32k/ns32k.c, config/ns32k/ns32k.md: Likewise.
	* config/pa/pa.c, config/pdp11/pdp11.c: Likewise.
	* config/pdp11/pdp11.md, config/sh/sh.c, config/v850/v850.c: Likewise.
	* config/vax/vax.md, config/ns32k/ns32k.c: Likewise.
	* config/ns32k/ns32k.md: Likewise.

2001-07-03  Zack Weinberg  <zackw@stanford.edu>

	* rtl.c (copy_rtx): Handle 'T' format letter.
	* gensupport.c (collect_insn_data): Likewise.
	* print-rtl.c (print_rtx): Print 'T' slots like 's'.

2001-07-03  Nick Clifton  <nickc@cambridge.redhat.com>

	* doc/invoke.texi (Directory Options): Specifiy range for <N> in
	-B option.  Use 'dir' not 'foo' as example directory name.

2001-07-03  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
	Fixes PRs bootstrap/3067, bootstrap/3249, bootstrap/3275.

2001-07-03  Joseph S. Myers  <jsm28@cam.ac.uk>

	* doc/cppinternals.texi: Improve formatting and logical markup.

2001-07-03  Andreas Jaeger  <aj@suse.de>

	* Makefile.in (insn-recog.o): Add dependency on reload.h.

	* genrecog.c (write_header): Include reload.h for prototypes in
	insn-recog.c.

2001-07-03  Neil Booth  <neil@daikokuya.demon.co.uk>

config:
	* i386/cygwin.h (VALID_MACHINE_DECL_ATTRIBUTE,
	VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* i386/i386-protos.h (i386_pe_valid_decl_attribute_p,
	i386_pe_valid_type_attribute_p): Add.
	* i386/i386.c (TARGET_INITIALIZER): Override for cygwin targets.
	* i386/winnt.c (i386_valid_decl_attribute_p): Return directly.

Mon Jul  2 21:52:19 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* explow.c (plus_constant_wide, case LO_SUM): New case.
	(plus_constant_for_output_wide): Delete.
	* rtl.h (plus_constant_for_output): Delete.
	* alias.c (canon_rtx, init_alias_analysis): Call plus_constant
	instead of plus_constant_for_output.
	* recog.c (offsettable_address_p, adj_offsettable_operand): Likewise.
	* config/darwin.c, config/arm/arm.c, config/m68k/m68k.c: Likewise.
	* config/m88k/m88k.c, config/mips/mips.c, config/pa/pa.c: Likewise.
	* config/rs6000/rs6000.c, config/sparc/sparc.c: Likewise.
	* config/sparc/sparc.md: Likewise.
	Convert some change_address calls to adjust_address.

2001-07-03  Joseph S. Myers  <jsm28@cam.ac.uk>

	* doc/extend.texi, doc/gcc.texi, doc/invoke.texi, doc/md.texi,
	doc/rtl.texi, doc/tm.texi: Improve formatting.  Improve
	documentation of -std and -Wwrite-strings.

2001-07-02  Geoffrey Keating  <geoffk@redhat.com>

	* cse.c (canon_hash): Don't register registers in very small
	register classes, as extending their lifetime might cause
	reload to fail.

Mon Jul  2 23:14:00 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* flow.c (try_redirect_by_replacing_jump): Remove cc0 setter.

	* flow.c (forwarder_block_p): Fix for fallthru blocks.
	(try_redirect_by_replacing_jump): Update properly the count
	and frequency information.

Mon Jul  2 14:20:13 2001  Jeffrey A Law  (law@cygnus.com)

	* toplev.c (dump_file_index): Move SSA dumps just after first
	jump dump.
	(dump_file): Corresponding changes.
	(rest_of_compilation): Move SSA path to just after the first
	jump pass.
	* doc/gcc.texi (Passes): Update due to movement of SSA path.
	* doc/invoke.texi: Update dump file #s as they were completely
	out of date with reality.

2001-07-02  Geoffrey Keating  <geoffk@redhat.com>

	* doc/tm.texi (Frame Layout): Document STACK_PUSH_CODE.

	* expr.c (emit_move_insn_1): Deal with non-default
	STACK_PUSH_CODE.

	* expr.c (emit_single_push_insn): Fix warning.

2001-07-02  Toshiyasu Morita  <toshiyasu.morita@hsa.hitachi.com>

	* expr.c (emit_move_insn_1): Avoid modifying
	cfun->expr->x_stack_pointer when PUSH_ROUNDING is defined.

Mon Jul  2 15:33:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* emit-rtl.c (adjust_address): New function.
	* expr.h (adjust_address): Add declaration.
	* builtins.c: Replace some calls to change_address with calls to it
	or to validize_mem.
	* caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise.
	* function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise.
	* config/arm/arm.c, config/convex/convex.c: Likewise.
	* config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise.
	* config/i386/i386.c, config/i386/i386.md: Likewise.
	* config/ia64/ia64.c, config/ia64/ia64.md: Likewise.
	* config/m32r/m32r.c, config/m68k/m68k.md: Likewise.
	* config/m88k/m88k.c, config/mips/mips.md: Likewise.
	* config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise.
	* config/sh/sh.c, config/sparc/sparc.md: Likewise.

2001-07-02  Jim Wilson  <wilson@redhat.com>

	* config/ia64/ia64.h: Delete obsolete lib1funcs.asm comment.

2001-07-02  Steve Ellcey  <sje@cup.hp.com>

        * config/ia64/t-ia64: Change LIB1ASMFUNCS to use single underscore.
        * config/ia64/lib1funcs.asm: Change macro names to match t-ia64.

2001-07-02  Zack Weinberg  <zackw@stanford.edu>

	* cppinit.c (lang_defaults): New table.
	(set_lang): Just read from lang_defaults into the live options
	structure.

2001-07-02  Zack Weinberg  <zackw@stanford.edu>

	* Makefile.in (doc): Depend on $(GENERATED_MANPAGES).
	* doc/.cvsignore: Add gcc.1, cpp.1, gcov.1.
	* doc/gcc.1, doc/cpp.1, doc/gcov.1: Removed.

2001-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* doc/install.texi: Various spelling and markup fixes.
	(Installing GCC): Component specific installation instructions are
	gone.
	Fix reference.
	Warn about removing old install dir in the presence of shared libs.
	(Configuration): Invoke with options target to match configure
	--help.
	Consistently refer to gas, gld pathnames.
	Invert --enable-multilib documentation.
	Remove references to old compiler versions.

Mon Jul  2 12:50:51 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* flow.c (try_simplify_condjump): Fix typo in updating fallthru flags.

2001-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* doc/install.texi (Specific, mips*-sgi-irix4): Split from IRIX 5
	section.
	(Specific, mips*-sgi-irix5): Note IDO download.
	Reworded MIPS C hints.
	Use GNU as instead of GAS.
	Markup fixes.
	Removed SGI Freeware reference, IRIX 6 only.
	(Specific, mips*-sgi-irix6): Removed ranlib caveats, obsolete.
	Note N64 library requirement/workaround.
	Update O32 hints.
	Complete list of structure passing bug victims.

2001-07-02  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>

	* doc/install.texi: Remove CVS Id.

2001-07-02  Andreas Jaeger  <aj@suse.de>

	* ssa-dce.c (note_inherently_necessary_set): Add unused attribute.
	(find_inherently_necessary): Remove unused variable.

2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>

	* c-common.h (TDI_inlined): New ast dump phase.
	(dump_flag_name): New function.
	* c-dump.c (dump_files): Add inlined phase.
	(dump_flag_name): Define.
	* doc/invoke.texi (-fdump-ast-inlined): Document.

Mon Jul  2 06:29:36 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* stor-layout.c (layout_decl): Revert change to handling of alignment
	in packed types.

Sun Jul  1 11:53:52 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* c-common.c (decl_attributes, case A_MODE): Don't call layout_decl
	for FIELD_DECL.

2001-07-01  Geoffrey Keating  <geoffk@redhat.com>

	* doc/tm.texi (FUNCTION_ARG): Document that the last call
	is special.

2001-07-01  Nathan Sidwell  <nathan@codesourcery.com>

	* tlink.c (recompile_files): Remove COMPILER_PATH and
	LIBRARY_PATH from the environment.

2001-07-01  Zack Weinberg  <zackw@stanford.edu>

	* c-common.h (enum rid): Add RID_FIRST_AT, RID_LAST_AT,
	RID_LAST_PQ.  Move RID_FIRST_PQ down with the other FIRST/LAST
	enumerators.
	(OBJC_IS_AT_KEYWORD, OBJC_IS_PQ_KEYWORD): New macros.

	* c-parse.in (OBJC_STRING): Kill.
	(objc_string): Decompose to [objc_string] '@' STRING.
	(reswords): Take the leading '@' off all the Objective C keywords.
	(objc_rid_sans_at): Kill.
	(init_reswords): Don't initialize it.
	(yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD.
	(_yylex): Kill reconsider label.  Look ahead one token after
	an '@'; if we get an identifier, check whether it's an
	Objective C @-keyword.  If so, return the keyword.  Otherwise,
	put back the token and return the '@' as a terminal.

	* cpplib.c (lex_macro_node): Remove unnecessary check for
	leading '@' on identifier.  Clarify control flow and commentary.

Sun Jul  1 11:53:52 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* cse.c (new_label_ref): Variable deleted.
	(insert): Remove set of new_label_ref.
	(check_for_label_ref): New function.
	(cse_basic_block): Don't check new_label_ref; call check_for_label_ref.

See ChangeLog.5 for earlier changes.

From-SVN: r43861
2001-07-09 07:20:51 -04:00
Richard Kenner
792760b9e9 emit-rtl.c (replace_equiv_address): New function.
* emit-rtl.c (replace_equiv_address): New function.
	* expr.h (replace_equiv_address): New declaration.
	* explow.c (validize_mem): Call it instead of change_address and
	also call if -fforce-addr and address is constant.
	* expr.c: Replace more calls to change_address with adjust_address
	and/or replace_equiv_address or to validize_mem.
	* function.c, regmove.c, config/alpha/alpha.c: Likewise.
	* config/arm/arm.md, config/clipper/clipper.md: Likewise.
	* config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise.
	* config/i370/i370.md, config/i860/i860.md: Likewise.
	* config/i960/i960.md, config/mips/mips.c: Likewise.
	* config/mips/mips.md, config/pa/pa.md: Likewise.
	* config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise.
	* config/rs6000/rs6000.md, config/sh/sh.md: Likewise.

From-SVN: r43762
2001-07-04 13:43:18 -04:00
Richard Kenner
f4ef873c31 emit-rtl.c (adjust_address): New function.
* emit-rtl.c (adjust_address): New function.
	* expr.h (adjust_address): Add declaration.
	* builtins.c: Replace some calls to change_address with calls to it
	or to validize_mem.
	* caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise.
	* function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise.
	* config/arm/arm.c, config/convex/convex.c: Likewise.
	* config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise.
	* config/i386/i386.c, config/i386/i386.md: Likewise.
	* config/ia64/ia64.c, config/ia64/ia64.md: Likewise.
	* config/m32r/m32r.c, config/m68k/m68k.md: Likewise.
	* config/m88k/m88k.c, config/mips/mips.md: Likewise.
	* config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise.
	* config/sh/sh.c, config/sparc/sparc.md: Likewise.

From-SVN: r43702
2001-07-02 15:47:44 -04:00
Richard Kenner
b987f23731 Trivial whitespace changes
From-SVN: r43671
2001-07-01 09:34:02 -04:00
DJ Delorie
c0e7830f8c integrate.c (ggc.h): Include.
* integrate.c (ggc.h): Include.
(initial_value_pair, initial_value_struct,
setup_initial_hard_reg_value_integration): Add prototypes.
(expand_inline_function): Call
setup_initial_hard_reg_value_integration.
(has_func_hard_reg_initial_val, get_func_hard_reg_initial_val,
get_hard_reg_initial_val, has_hard_reg_initial_val): New functions
to keep track of values present at the start of a function.
(mark_hard_reg_initial_vals): New, for gc.
(setup_initial_hard_reg_value_integration): New.  Sets up pseudo
mappings for initial values.
(emit_initial_value_sets): New.  Emits code to set initial value
pseudos.
* integrate.h: Add prototypes for new functions.
* function.h (struct function): Add hard_reg_initial_vals field.
* function.c (integrate.h): Include.
(mark_function_status): Call
mark_hard_reg_initial_vals.
* toplev.c (integrate.h): Include.
(rest_of_compilation): Call emit_initial_value_sets.

From-SVN: r43486
2001-06-21 12:50:56 -04:00
Richard Kenner
b927dc2237 * function.c (gen_mem_addressof): Handle case where DECL is SAVE_EXPR.
From-SVN: r43408
2001-06-15 18:08:42 -04:00
Jan Hubicka
932f084749 function.c (diddle_return_value): Kill code to determine return value before expand_function_end.
* function.c (diddle_return_value): Kill code to determine
	return value before expand_function_end.
	(expand_function_end): Delay call to clobber_return_register
	after fucntion return value is computed.

	Re-install temporary reverted patch:
	* toplev.c (rest_of_compilation): Call split_all_insns
	before reg-stack and shorten-branches. Do shorten-branches
	after reg-stack.
	* final.c (shorten_branches): Remove insn splitting code.

From-SVN: r43044
2001-06-08 19:52:06 +00:00
Jan Hubicka
9c65bbf460 function.c (clobber_return_register): Clobber the pseudo return register too.
* function.c (clobber_return_register): Clobber the pseudo return
	register too.

From-SVN: r43011
2001-06-08 12:26:51 +00:00
Mark Mitchell
1f7317498d c-tree.h (lang_decl): Add pending_sizes fields.
* c-tree.h (lang_decl): Add pending_sizes fields.
	* c-decl.c (store_parm_decls): Save pending_sizes away for nested
	functions.
	(c_expand_body): Expand them.
	(lang_mark_tree): Mark lang_decl:pending_sizes.
	* function.c (expand_pending_sizes): New function, broken out
	from ...
	(expand_function_start): ... here.
	* tree.h (expand_pending_sizes): Declare it.

From-SVN: r42892
2001-06-05 06:51:02 +00:00
Richard Henderson
80a480ca16 function.c (expand_function_start): Don't abort on PARALLEL returns from hard_function_value.
* function.c (expand_function_start): Don't abort on PARALLEL
        returns from hard_function_value.

From-SVN: r42577
2001-05-25 12:05:24 -07:00
Richard Henderson
d5bf114347 function.c (expand_function_start): Always use a pseudo for the function result value.
* function.c (expand_function_start): Always use a pseudo
        for the function result value.

From-SVN: r42486
2001-05-23 00:01:43 -07:00
Mark Mitchell
db3c03158c function.c (expand_function_start): Avoid creating BLKmode pseudos.
* function.c (expand_function_start): Avoid creating BLKmode
	pseudos.

	* dwarf2out.c (output_comp_unit): Always output a compilation-unit
	DIE, even if it has no children.
	(dwarf2out_finish): Always output the line-number table, even if
	it has no content.

From-SVN: r42254
2001-05-18 07:25:50 +00:00
Richard Kenner
6349ad241c function.c (fixup_var_regs_1, [...]): Use promoted mode for replacement.
* function.c (fixup_var_regs_1, case SUBREG): Use promoted mode
	for replacement.

From-SVN: r41765
2001-05-02 13:31:19 -04:00
Kaveh R. Ghazi
6496a589df bitmap.c: Change NULL_PTR to NULL or "(rtx*)0".
* bitmap.c: Change NULL_PTR to NULL or "(rtx*)0".
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* combine.c: Likewise.
	* rs6000.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* gcse.c: Likewise.
	* integrate.c: Likewise.
	* loop.c: Likewise.
	* objc/objc-act.c: Likewise.
	* recog.c: Likewise.
	* reg-stack.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stmt.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r41722
2001-05-01 12:11:35 +00:00
Zack Weinberg
cc2e8b2d91 function.c (purge_addressof_1): Remove the duplicate if (code == SET) block.
* function.c (purge_addressof_1): Remove the duplicate
	if (code == SET) block.  Fold the two if (code == ADDRESSOF)
	blocks together.

From-SVN: r41649
2001-04-27 23:55:03 +00:00
Geoffrey Keating
fbffc70af6 function.c (expand_function_end): Always clobber the return registers, even if there is no return label.
* function.c (expand_function_end): Always clobber the
	return registers, even if there is no return label.

From-SVN: r41612
2001-04-26 20:54:51 +00:00
Jakub Jelinek
43e720723f gcse.c (gcse_main): Fix comment typo.
* gcse.c (gcse_main): Fix comment typo.
	(delete_null_pointer_check): Likewise.
	(hash_scan_set): Don't consider sets with REG_EQUIV MEM notes.
	* cse.c (cse_insn): Likewise.
	* function.c (fixup_var_refs_insns_with_hash): The sequence is
	toplevel.

	* gcc.c-torture/execute/20010403-1.c: New test.

From-SVN: r41444
2001-04-20 09:56:50 +02:00
Jim Wilson
aa570f545a Fix ia64 libffi build failure.
* function.c (expand_function_end): Handle PARALLEL real_decl_rtl.

From-SVN: r41361
2001-04-15 01:37:34 -07:00
Andrew MacLeod
55107ee39c function.c (purge_single_hard_subreg_set): Only check REGNO if the subreg was a hard register.
2001-04-10  Andrew MacLeod  <amacleod@redhat.com>

	* function.c (purge_single_hard_subreg_set): Only check REGNO if
	the subreg was a hard register. Pseudos are left as subregs.

From-SVN: r41217
2001-04-10 02:47:32 +00:00
DJ Delorie
c39ada0455 function.h (virtuals_instantiated): Declare.
* function.h (virtuals_instantiated): Declare.
* function.c: (virtuals_instantiated): Make global.
* calls.c (emit_library_call_value_1): Use
virtual_outgoing_args_rtx only if it hasn't been instantiated.
Otherwise, use the stack pointer directly.

From-SVN: r41127
2001-04-05 16:13:53 -04:00
Jakub Jelinek
ddef6bc7a3 Use byte offsets in SUBREGs instead of words.
2001-04-03  Jakub Jelinek  <jakub@redhat.com>
	    David S. Miller  <davem@pierdol.cobaltmicro.com>
            Andrew MacLeod  <amacleod@redhat.com>

	Use byte offsets in SUBREGs instead of words.

	* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
	* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
	to pass new argument.
	(add_stored_regs): Use subreg_regno_offset function.
	* calls.c (expand_call): For non-paradoxical SUBREG take endianess
	into account.
	(precompute_arguments): Use gen_lowpart_SUBREG.
	* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
	(combine_simplify_rtx): Rework to use SUBREG_BYTE.
	(simplify_set): Rework to use SUBREG_BYTE.
	(expand_field_assignment): Use SUBREG_BYTE.
	(make_extraction): Use SUBREG_BYTE.
	(if_then_else_cond): Use SUBREG_BYTE.
	(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
	(gen_lowpart_for_combine): Compute full byte offset.
	* cse.c (mention_regs): Use SUBREG_BYTE.
	(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
	(canon_hash): Use SUBREG_BYTE.
	(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
	(gen_lowpart_if_possible): Formatting.
	* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
	correctly.
	* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
	(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
	(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
	* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
	certain invariants about SUBREGs the compiler creates.
	(gen_lowpart_SUBREG): New function.
	(subreg_hard_regno): New function to get the final register number.
	(gen_lowpart_common): Use SUBREG_BYTE.
	(gen_imagpart): Spacing nits.
	(subreg_realpart_p): Use SUBREG_BYTE.
	(gen_highpart): Use SUBREG_BYTE.
	(subreg_lowpart_p): Always compute endian corrected goal offset,
	even at the byte level, then compare against that.
	(constant_subword): New function, pulled out all constant cases
	from operand_subword and changed second argument name to offset.
	(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
	and call constant_subword to do the work.  Return const0_rtx if
	looking for a word outside of OP.
	(operand_subword_force): Change second arg name to offset.
	* expmed.c (store_bit_field): Use SUBREG_BYTE.
	(store_split_bit_field): Use SUBREG_BYTE.
	(extract_bit_field): Use SUBREG_BYTE.
	(extract_split_bit_field): Use SUBREG_BYTE.
	(expand_shift): Use SUBREG_BYTE.
	* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
	* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
	* flow.c (set_noop_p): Use SUBREG_BYTE.
	(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
	* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
	(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
	correction code.
	(optimize_bit_field): Use SUBREG_BYTE.
	(purge_addressof_1): Use SUBREG_BYTE.
	(purge_single_hard_subreg_set): Use subreg_regno_offset function.
	(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
	actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
	* gengenrtl.c (special_rtx): Add SUBREG.
	* global.c (mark_reg_store): Use SUBREG_BYTE.
	(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
	* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
	* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
	final byte offset is congruent to subreg's mode size.
	(subst_constants): Use SUBREG_BYTE.
	(mark_stores): Use subreg_regno_offset function.
	* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
	function and SUBREG_BYTE.
	* local-alloc.c (combine_regs): Use subreg_regno_offset function.
	(reg_is_born): Use subreg_hard_regno.
	* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
	endian correction code.  Don't combine subregs unless resulting
	offset aligns with type.  Fix subreg constant extraction for DImode.
	Simplify SUBREG of VOIDmode CONST_DOUBLE.
	(general_operand): Remove dead mode_altering_drug code.
	(indirect_operand): Use SUBREG_BYTE.
	(constrain_operands): Use subreg_regno_offset function.
	* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
	* regmove.c (regmove_optimize): Use SUBREG_BYTE.
	(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
	* regs.h (REG_SIZE): Allow target to override.
	(REGMODE_NATURAL_SIZE): New macro which target can override.
	* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
	on the entire subreg rtx.
	(push_reload): Use SUBREG_BYTE in comments and code.
	(find_dummy_reload): Use subreg_regno_offset.  Only adjust offsets
	for hard registers inside subregs.
	(operands_match_p): Use subreg_regno_offset.
	(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
	containing hard regs.
	(find_reload_toplev): Use SUBREG_BYTE.  Remove byte endian
	corrections when fixing up MEM subregs.
	(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
	subreg_regno_offset where appropriate.
	(find_reloads_subreg_address): Use SUBREG_BYTE.  Remove
	byte endian corrections when fixing up MEM subregs.
	(subst_reloads): When combining two subregs, make sure final
	offset is congruent to subreg's mode size.
	(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
	(refers_to_regno_for_reload_p): Use subreg_regno.
	(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
	* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
	correction code for memory subreg fixups.
	(forget_old_reload_1): Use subreg_regno_offset.
	(choose_reload_regs): Use subreg_regno.
	(emit_input_reload_insns): Use SUBREG_BYTE.
	(reload_combine_note_store): Use subreg_regno_offset.
	(move2add_note_store): Use subreg_regno_offset.
	* resource.c (update_live_status, mark_referenced_resources): Use
	subreg_regno function.
	(mark_set_resources): Use subreg_regno function.
	* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
	(subreg_regno_offset, subreg_regno): Define prototypes.
	(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
	(gen_lowpart_SUBREG): Add prototype.
	* rtl.texi (subreg): Update to reflect new byte offset representation.
	Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
	* rtlanal.c (refers_to_regno_p): Use subreg_regno.
	(reg_overlap_mentioned_p): Use subreg_regno.
	(replace_regs); Make sure final offset of combined subreg is
	congruent to size of subreg's mode.
	(subreg_regno_offset): New function.
	(subreg_regno): New function.
	* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
	* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
	* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
	* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
	(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
	* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
	(a29k_get_reloaded_address): Use SUBREG_BYTE.
	(print_operand): Use SUBREG_BYTE.
	* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
	* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
	(arm_reload_out_hi): Use SUBREG_BYTE.
	* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
	instead of SUBREG_WORD.
	(d30v_print_operand_memory_reference): Use subreg_regno_offset.
	* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
	SUBREG creation to use byte offset.
	* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
	inverted load insns): Fix explicit rtl subregs to use byte
	offsets.
	* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
	udivsi3, umodsi3): Generate SUBREGs with byte offsets.
	* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
	* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
	to use byte offsets.
	(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
	* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
	offsets, also make sure it is congruent to SUBREG's mode size.
	(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
	unnamed ldob insn): Generate SUBREGs with byte offset.
	(zero_extendqihi2): SUBREG's are byte offsets.
	* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
	(m68hc11_gen_highpart): Use SUBREG_BYTE.
	* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
	zero-extendqisi2): Generate SUBREGs with byte offset.
	(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
	subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
	subregs in rtl to use byte offsets.
	* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
	* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
	(mips_move_2words): Use subreg_regno_offset.
	(mips_secondary_reload_class): Use subreg_regno_offset.
	* config/mips/mips.md (DImode plus, minus, move, and logical op
	splits): Fixup explicit subregs in rtl to use byte offsets.
	* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
	* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
	* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
	rtl to use byte offsets.
	* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
	* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
	subregs to use byte offsets.
	* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
	Fixup explicit subregs in rtl to use byte offsets.
	* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
	and remove byte endian correction code.
	* config/sh/sh.c (output_movedouble): Use subreg_regno.
	(gen_ashift_hi): Use SUBREG_BYTE.
	(regs_used): Use subreg_regno_offset.
	(machine_dependent_reorg): Use subreg_regno_offset.
	* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
	* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
	(movdf_i4): Subregs are byte offsets now.
	* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
	* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
	(REGMODE_NATURAL_SIZE): Override.
	(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
	* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
	with byte offsets.
	(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
	extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
	extendqidi2): Generate SUBREGs with byte offsets, also make sure
	it is congruent to SUBREG's mode size.
	(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
	offsets.
	(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
	cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
	lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
	SUBREG_BYTE offset for non-paradoxical subregs in patterns.
	* config/v850/v850.c (print_operand, output_move_double): Use
	subreg_regno function.

Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>

From-SVN: r41058
2001-04-03 15:06:12 +00:00
Richard Henderson
52a11cbfcf IA-64 ABI Exception Handling.
From-SVN: r40924
2001-03-28 03:04:51 -08:00
Richard Henderson
3d74dad834 function.c (expand_function_start): Set DECL_REGISTER on a pseudo used for DECL_RESULT.
* function.c (expand_function_start): Set DECL_REGISTER on
        a pseudo used for DECL_RESULT.

From-SVN: r40896
2001-03-27 19:28:28 -08:00
Richard Henderson
5e7f4a4ab9 mkconfig.sh: Include insn-flags.h.
* mkconfig.sh: Include insn-flags.h.
	* Makefile.in (CONFIG_H): Include insn-flags.h.
	(lots of objects): Remove insn-codes.h and insn-flags.h.

	* alias.c, bb-reorder.c, calls.c, do-loop.c, flow.c, haifa-sched.c,
	integrate.c, jump.c, loop.c, predict.c, profile.c, reg-stack.c,
	regmove.c, reorg.c, a29k/a29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
	avr/avr.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c,
	dsp16xx/dsp16xx.c, fr30/fr30.c, h8300/h8300.c, i370/i370.c,
	i386/i386.c, i860/i860.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c,
	m68k/m68k.c, m88k/m88k.c, mcore/mcore.c, mn10200/mn10200.c,
	mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c,
	pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c,
	v850/v850.c, vax/vax.c:
	Don't include insn-flags.h.

	* diagnostic.c, expr.h, reload.c, toplev.c:
	Don't include insn-codes.h.

	* builtins.c, combine.c, except.c, explow.c, expmed.c, expr.c,
	final.c, function.c, optabs.c, recog.c, reload1.c, stmt.c,
	c4x/c4x.c, i960/i960.c, mips/mips.c:
	Don't include insn-codes.h or insn-flags.h.

	* genemit.c, genopinit.c, genoutput.c: Don't include insn-codes.h
	or insn-flags.h in the generated code.
	* genflags.c (gen_proto): Use "struct rtx_def *" instead of "rtx".
	(main): Forward declare struct rtx_def.

From-SVN: r40754
2001-03-22 10:48:52 -08:00
Richard Henderson
bf501a6512 defaults.h (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Move from ...
* defaults.h (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Move from ...
        * calls.c: ... here.
        * combine.c, expr.c, final.c, function.c toplev.c: Don't provide
        defaults for them here.

From-SVN: r40603
2001-03-18 13:38:33 -08:00
Mark Mitchell
19e7881c81 varasm.c (assemble_alias): Use DECL_ASSEMBLER_NAME...
* varasm.c (assemble_alias): Use DECL_ASSEMBLER_NAME, not the
	contents of the RTL, to determine the name of the object.

	* tree.h (DECL_RTL): Allocate RTL lazily.
	(SET_DECL_RTL): New macro.
	(DECL_RTL_SET_P): Likewise.
	(COPY_DECL_RTL): Likewise.
	(DECL_RTL_IF_SET): Likewise.
	* varasm.c (make_decl_rtl): Add assertions about the kind of
	declaration we are processing.
	* c-decl.c (duplicate_decls): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
	(start_decl): Likewise.
	(finish_decl): Likewise.
	* c-semantics.c (emit_local_var): Likewise.
	* calls.c (expand_call): Likewise.
	* dbxout.c (dbxout_symbol): Likewise.
	* emit-rtl.c (unshare_all_rtl): Likewise.
	(unshare_all_decls): Likewise.
	(reset_used_decls): Likewise.
	* expr.c (store_constructor): Likewise.
	(safe_from_p): Likewise.
	(expand_expr): Likewise.
	* function.c (put_var_into_stack): Likewise.
	(instantiate_decls_1): Likewise.
	(assign_parms): Likewise.
	(expand_function_start): Likewise.
	(expand_function_end): Likewise.
	* ggc-common.c (gcc_mark_trees): Likewise.
	* integrate.c (function_cannot_inline_p): Likewise.
	(copy_decl_for_inlining): Likewise.
	(expand_inline_function): Likewise.
	(integrate_parm_decls): Likewise.
	(integrate_decl_tree): Likewise.
	* print-tree.c (print_node): Likewise.
	* reg-stack.c (stack_result): Likewise.
	* stmt.c (label_rtx): Likewise.
	(expand_return): Likewise.
	(expand_decl): Likewise.
	(expand_decl_cleanup): Likewise.
	(expand_anon_union_decl): Likewise.
	* toplev.c (check_global_declarations): Likewise.
	(rest_of_decl_compilation): Likewise.
	* tree.c (simple_cst_equal): Likewise.
	* objc/objc-act.c (generate_static_references): Likewise.

	* class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
	* cp-tree.h (DECL_IN_MEMORY_P): Likewise.
	* decl.c (duplicate_decls): Likewise.
	(builtin_function): Likewise.
	(build_library_fn): Likewise.
	(build_cp_library_fn): Likewise.
	(check_initializer): Likewise.
	(cp_finish_decl): Likewise.
	* decl2.c (grokfield): Likewise.
	(grok_function_init): Remove #if 0'd code.
	(finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
	* friend.c (do_friend): Likewise.
	* init.c (get_temp_regvar): Likewise.
	* method.c (make_thunk): Likewise.
	* pt.c (tsubst_friend_function): Likewise.
	(tsubst_decl): Likewise.
	(regenerate_decl_from_template): Likewise.
	* semantics.c (genrtl_named_return_value): Likewise.
	(expand_body): Likewise.
	(genrtl_finish_function): Likewise.
	* tree.c (cp_tree_equal): Likewise.

	* com.c (ffecom_member_phase_2): Use COPY_DECL_RTL,
	DECL_RTL_SET_P, etc.
	(duplicate_decls): Likewise.
	(start_decl): Likewise.

	* class.c (build_static_field_ref): Likewise.
	(make_method_value): Likewise.
	(get_dispatch_table): Likewise.

	* decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.

From-SVN: r40482
2001-03-15 02:51:03 +00:00
Jeffrey Oldham
a84efb51f7 emit-rtl.c (remove_unnecessary_notes): Reverse Richard Kenner's 2001-02-24 which broke building the Java library.
2001-03-12  Jeffrey Oldham  <oldham@codesourcery.com>

	* emit-rtl.c (remove_unnecessary_notes): Reverse Richard Kenner's
	2001-02-24 which broke building the Java library.
	* function.c (identify_blocks): Likewise.
	(all_blocks): Likewise.
	* integrate.c (integrate_decl_tree): Likewise.
	* print-tree.c (print_node): Likewise.
	* tree.h (BLOCK_NUMBER): Likewise.
	(struct tree_block): Likewise.

From-SVN: r40431
2001-03-12 22:22:54 +00:00
Zack Weinberg
d6edb99e92 xm-lynx.h, [...]: Do not define TRUE or FALSE.
* config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h,
	config/a29k/xm-unix.h, config/alpha/xm-alpha.h,
	config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h,
	config/clipper/xm-clix.h, config/convex/xm-convex.h,
	config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
	config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h,
	config/h8300/xm-h8300.h, config/i370/xm-i370.h,
	config/i370/xm-linux.h, config/i370/xm-mvs.h,
	config/i370/xm-oe.h, config/i386/xm-aix.h,
	config/i386/xm-i386.h, config/i386/xm-osf.h,
	config/i860/xm-i860.h, config/i960/xm-i960.h,
	config/ia64/xm-ia64.h, config/m32r/xm-m32r.h,
	config/m68k/xm-m68k.h, config/m88k/xm-m88k.h,
	config/mcore/xm-mcore.h, config/mips/xm-mips.h,
	config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h,
	config/ns32k/xm-ns32k.h, config/pa/xm-linux.h,
	config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
	config/pa/xm-pahpux.h, config/pa/xm-papro.h,
	config/pj/xm-pj.h, config/romp/xm-romp.h,
	config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h,
	config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
	config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h,
	config/v850/xm-v850.h, config/vax/xm-vax.h,
	config/vax/xm-vms.h, config/we32k/xm-we32k.h:
	Do not define TRUE or FALSE.

	* config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made
	empty by above change.
	* config.gcc: Remove references to these files.

	* configure.in: Detect stdbool.h.
	* configure, config.in: Regenerate.
	* system.h: Include stddef.h here if available.  Set
	HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__.  Then
	set up a sensible boolean type at the very end.

	* combine.c, cse.c, expr.c, fold-const.c, gensupport.c,
	f/com.c, config/mcore/mcore.c:
	Rename variables named 'true' and/or 'false'.

	* hash.h: Delete 'boolean' typedef and related #undefs.
	* f/proj.h: Delete 'bool' type.  Don't include stddef.h here.

	* function.c, ggc-common.c, hash.h, hash.c, tlink.c, cp/decl.c,
	java/class.c, java/decl.c, java/java-tree.h:
	Replace all uses of 'boolean' with 'bool'.

From-SVN: r40176
2001-03-02 01:51:02 +00:00
Richard Kenner
bd015d3783 tree.h (BLOCK_DEAD): New macro.
* tree.h (BLOCK_DEAD): New macro.
	(struct tree_block): New flag, dead_flag.
	* print-tree.c (print_node, case 'b'): Print missing fields.
	* emit-rtl.c (remove_unnecessary_notes): Set BLOCK_DEAD.
	* function.c (identify_blocks): Enable test for misplaced notes.
	(all_blocks): Skip BLOCK_DEAD blocks.
	* integrate.c (integrate_decl_tree): Likewise.

From-SVN: r40039
2001-02-24 08:15:55 -05:00
Jan Hubicka
016030fea6 function.c (epilogue_done): Be ready for first basic block not containing PROLOGUE_END note.
* function.c (epilogue_done): Be ready for first basic block not
	containing PROLOGUE_END note.
	(reposition_prologue_and_epilogue_notes): Avoid placing
	PROLOGUE_END note between BASIC_BLOCK.

From-SVN: r40020
2001-02-24 02:22:07 +00:00
Richard Kenner
d64236b44d function.c (assign_parms): Set RTX_UNCHANGING_P in pseudo when we do in memory.
* function.c (assign_parms): Set RTX_UNCHANGING_P in pseudo when we
	do in memory.

From-SVN: r39737
2001-02-15 21:30:37 -05:00
Richard Kenner
d14057222f combine.c (nonzero_bits, case PLUS): If pointers extend unsigned and this is the sum of a pointer and a constant...
* combine.c (nonzero_bits, case PLUS): If pointers extend unsigned
	and this is the sum of a pointer and a constant, we know the result
	did not overflow.
	(num_sign_bit_copies, case PLUS): Likewise.
	* explow.c (convert_memory_address): Remove opposite SUBREG.
	* function.c (instantiate_new_reg): New function (from common code).
	(instantiate_virtual_regs_1): Call it.
	For PLUS, handle if (plus (subreg (virt-reg) (const_int))
	if pointers sign- or zero-extend.
	* simplify-rtx.c (simplify_unary_operation, case ZERO_EXTEND):
	If pointers extend unsigned, use inside of SUBREG.
	(simplify_unary_operation, case SIGN_EXTEND): Likewise, if sign extend.

From-SVN: r39489
2001-02-06 07:39:15 -05:00
Chandrakala Chavva
411707f4e4 final.c: Move the declaration profile_label_no to ...
* final.c: Move the declaration profile_label_no to ...
        * output.h: ... here.
        * function.c (expand_function_start): Call PROFILE_HOOK.
        * config/rs6000/aix.h: Define PROFILE_HOOK.
        * config/rs6000/rs6000-protos.h: output_profile_hook new.
        * config/rs6000/rs6000.c (output_profile_hook): Define.
        (output_prolog): Do nothing for ABI_AIX as it is taken care by
        output_profile_hook.
        tm.texi : Explain new macro PROFILE_HOOK.

From-SVN: r39473
2001-02-05 20:23:13 -05:00
Richard Kenner
b845f89747 Reinstall 1.245 -> 1.246 change
From-SVN: r39154
2001-01-20 08:40:23 -05:00
Zack Weinberg
a42a5f59d0 [multiple changes]
2001-01-20  Jakub Jelinek  <jakub@redhat.com>

	* function.c (fixup_var_refs): Move CALL_PLACEHOLDER handling...
	(fixup_var_refs_insns): ...here.

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

2001-01-20  Zack Weinberg  <zack@wolery.stanford.edu>

	* function.c (fixup_var_refs_insns): Break up into
	fixup_var_refs_insn [body of loop], fixup_var_refs_insns
	[loop over entire insn list], and fixup_var_refs_insns_with_hash
	[loop over hash table entries].
	(fixup_var_refs): Adjust calls to fixup_var_refs_insns and/or
	fixup_var_refs_insns_with_hash, to match above changes.

From-SVN: r39151
2001-01-20 09:12:08 +00:00
Richard Kenner
831ecbd460 alias.c (rtx_equal_for_memref_p, [...]): Don't assume args are REG.
* alias.c (rtx_equal_for_memref_p, case ADDRESSOF): Don't assume
	args are REG.
	* expr.c (store_constructor): Don't look at MEM_ALIAS_SET unless MEM.
	* function.c (assign_parms): Use INTVAL for a CONST_INT.

From-SVN: r39139
2001-01-19 13:04:23 -05:00
Richard Kenner
8207e7c604 Minor whitespace changes
From-SVN: r39066
2001-01-16 09:29:08 -05:00
Nick Clifton
414c4dc49c Remove {save|restore}_machine_status.
Document {init|mark|free}_machine_status.

From-SVN: r38882
2001-01-10 21:40:14 +00:00
Jeffrey A Law
87c61e2d0d function.c (instantiate_virtual_regs): Instantiate virtual registers found in CALL_INSN_FUNCTION_USAGE.
* function.c (instantiate_virtual_regs): Instantiate virtual
        registers found in CALL_INSN_FUNCTION_USAGE.

From-SVN: r38873
2001-01-10 11:35:50 -07:00
Zack Weinberg
b05467dc15 function.c (fixup_var_refs): Use push_to_full_sequence where possible.
* function.c (fixup_var_refs): Use push_to_full_sequence where
	possible.

From-SVN: r38729
2001-01-05 23:23:26 +00:00
DJ Delorie
cc1fe44fe8 function.c (reorder_blocks): Make sure the flags are all reset before using them to mark blocks...
* function.c (reorder_blocks): Make sure the flags are all reset
before using them to mark blocks, else a second invocation will
corrupt the block chain.
(reorder_blocks_0): New, resets the flags.

From-SVN: r38724
2001-01-05 16:13:42 -05:00
J"orn Rennecke
e2a5f96bbf integrate.c (expand_inline_function): Don't put a virtual register into the reg map.
* integrate.c (expand_inline_function): Don't put a virtual
	register into the reg map.

	* function.c (fixup_var_refs_1): If force_operand didn't put
	the address into the target, move it there.

From-SVN: r38694
2001-01-04 23:28:00 +00:00
Richard Kenner
d1608933b9 function.c (expand_function_end): Properly handle DECL_RESULT and copy when ptr_mode != Pmode.
* function.c (expand_function_end): Properly handle DECL_RESULT
	and copy when ptr_mode != Pmode.
	* expmed.c (make_tree): Convert X from Pmode to ptr_mode, if needed.

From-SVN: r38607
2001-01-01 21:31:22 -05:00
Richard Kenner
1da68f560d alias.c (alias_sets_conflict_p): New function.
* alias.c (alias_sets_conflict_p): New function.
	(mems_in_disjoint_alias_sets_p): Use it.
	(readonly_fields_p): Moved from expr.c; check for record type.
	(objects_must_conflict_p): New function.
	* calls.c (expand_call): Use assign_temp as much as possible, use
	readonly variant if assigned once, and don't set memory attributes.
	(emit_library_call_value_1, store_one_arg): Likewise.
	* integrate.c (expand_inline_function): Likewise.
	* stmt.c (expand_asm_operands, expand_return): Likewise.
	* expr.c (copy_blkmode_from_reg, store_constructor): Likewise.
	(store_field, save_noncopied_parts, expand_expr): Likewise.
	(expand_expr_unaligned): Likewise.
	(readonly_fields_p): Moved to alias.c.
	(safe_from_p): Rework handling of SAVE_EXPR.
	MEMs ony conflict if alias sets conflict; likewise for INDIRECT_REF.
	* function.c (struct temp_slot): Delete field ALIAS_SET; add TYPE.
	(assign_stack_for_temp): Use objects_must_confict_p.
	Set all memory attributes from type, if specified.
	(mark_temp_slot): Mark TYPE field.
	* tree.h (alias_sets_conflict_p, readonly_fields_p): New decls.
	(objects_must_conflict_p): Likewise.

	* stmt.c (expand_decl): Don't use assign_stack_temp in error case.
	(add_case_node): No need to copy nodes anymore.

From-SVN: r38559
2000-12-30 08:10:51 -05:00
Alexandre Oliva
f523247a94 function.c (assign_parms): Convert arguments passed by reference to the right mode.
* function.c (assign_parms): Convert arguments passed by
reference to the right mode.

From-SVN: r38528
2000-12-29 08:38:19 +00:00
Alexandre Oliva
fd81f5f608 function.c (assign_parms): Update parm's DECL_INCOMING_RTL when optimizing PARALLEL to REG.
* function.c (assign_parms): Update parm's DECL_INCOMING_RTL
when optimizing PARALLEL to REG.

From-SVN: r38444
2000-12-22 08:10:53 +00:00
Alexandre Oliva
b33493e3f3 function.c (adjust_trampoline_addr): New function.
* function.c (adjust_trampoline_addr): New function.
(trampoline_address): Call it instead of round_trampoline_addr().
* tm.texi (TRAMPOLINE_ADJUST_ADDRESS): Document it.

From-SVN: r38279
2000-12-15 09:09:41 +00:00
Alexandre Oliva
e68a6ce10e function.c (assign_parms): Optimize incoming PARALLELs into REGs if possible.
* function.c (assign_parms): Optimize incoming PARALLELs into
REGs if possible.

From-SVN: r38233
2000-12-13 21:24:03 +00:00
John David Anglin
3502dc9cd3 function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to...
* function.h (emit_status): Delete member regno_pointer_flag and
	rename regno_pointer_flag_length to regno_pointer_align_length.
	Delete define for REGNO_POINTER_FLAG.
	* integrate.h (inline_remap): Delete member regno_pointer_flag.
	Add member x_regno_reg_rtx.
	* rtl.h (rtx_def): Use frame_related bit to indicate register is
	a pointer in REG expressions.  Define REG_POINTER macro.
	* alias.c (find_base_value, find_base_term): Use REG_POINTER
	instead of REGNO_POINTER_FLAG.
	* combine.c (nonzero_bits, num_sign_bit_copies): Likewise.
	* emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead
	of regno_pointer_flag_length.  Remove code which refers to
	regno_pointer_flag.
	(mark_reg_pointer): Use REG_POINTER.
	(free_emit_status): Remove code which refers to regno_pointer_flag.
	(init_emit, mark_emit_status): Likewise.
	* flow.c (dump_flow_info): Likewise.
	* function.c (preserve_temp_slots): Likewise.
	* integrate.c (expand_inline_function, copy_rtx_and_substitute):
	Use x_regno_reg_rtx instead of regno_pointer_flag for function
	pointer determination in map.
	* loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER.
	* predict.c (estimate_probability): Likewise.
	* regclass.c (record_address_regs, reg_scan_mark_refs): Likewise.
	* unroll.c (unroll_loop): Use x_regno_reg_rtx instead of
	regno_pointer_flag for function pointer determination in map.
	* convex.h (RTX_COSTS): Don't test regno_pointer_flag and use
	REG_POINTER.
	* pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand):
	Use REG_POINTER.
	(restore_unscaled_index_insn_codes): Revise comment.

From-SVN: r37863
2000-11-29 23:31:19 -07:00
Mark Mitchell
cf77f15f54 * function.c (free_after_compilation): Clear x_clobber_return_insn.
From-SVN: r37806
2000-11-27 20:14:21 +00:00
Mark Mitchell
db5fbfb420 function.c (assign_parms): When calling put_var_into_stack...
* function.c (assign_parms): When calling put_var_into_stack, make
	sure that there are no hidden pending sequences.

From-SVN: r37417
2000-11-13 07:00:55 +00:00
Jason Merrill
d96a6d1a1c function.c (assign_parms): If TREE_ADDRESSABLE is set...
* function.c (assign_parms): If TREE_ADDRESSABLE is set, try to
        give the parm a register and then call put_var_into_stack.
        * stmt.c (expand_decl): Likewise.

cp/
        * typeck.c (mark_addressable): Don't call put_var_into_stack.

From-SVN: r37396
2000-11-11 19:11:47 -05:00
Jakub Jelinek
768f06694f function.c (expand_function_start): Cast GET_MODE_SIZE to HOST_WIDE_INT before negating it.
* function.c (expand_function_start): Cast GET_MODE_SIZE to
	HOST_WIDE_INT before negating it.

From-SVN: r37317
2000-11-08 14:13:10 +01:00
Joseph Myers
961192e1dd alias.c [...] (init_alias_analysis, [...]): Use memset () instead of bzero ().
* alias.c (init_alias_analysis), calls.c (expand_call,
	emit_library_call_value_1), combine.c (init_reg_last_arrays),
	cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c
	(init_output_buffer, set_diagnostic_context), dwarf2out.c
	(equate_decl_number_to_die, build_abbrev_table), emit-rtl.c
	(init_emit_once), fold-const.c (mul_double, div_and_round_double),
	function.c (assign_parms), gcse.c (compute_can_copy,
	alloc_gcse_mem, alloc_reg_set_mem, record_one_set,
	compute_hash_table, compute_set_hash_table,
	compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c
	(global_alloc, global_conflicts), haifa-sched.c (compute_trg_info,
	clear_units, schedule_block), integrate.c (initialize_for_inline,
	expand_inline_function), jump.c (thread_jumps), local-alloc.c
	(local_alloc), loop.c (combine_movables, count_loop_regs_set,
	load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree),
	regclass.c (init_reg_sets, init_reg_sets_1, regclass,
	record_reg_classes, allocate_reg_info), reload.c
	(get_secondary_mem, remove_address_replacements, find_reloads),
	reload1.c (reload, set_initial_label_offsets, finish_spills,
	reload_as_needed, choose_reload_regs_init,
	reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c
	(sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c
	(rename_registers), stmt.c (expand_end_case), unroll.c
	(unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset
	() instead of bzero ().

ch:
	* actions.c (check_missing_cases), typeck.c (build_chill_slice,
	build_chill_cast): Use memset () instead of bzero ().

cp:
	* class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
	(push_binding_level), error.c (cp_tree_printer), pt.c
	(process_partial_specialization, tsubst_template_arg_vector),
	search.c (lookup_member): Use memset () instead of bzero ().

java:
	* expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
	(init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
	instead of bzero ().

From-SVN: r37303
2000-11-07 22:50:06 +00:00
Richard Kenner
1468899dc2 * function.c (locate_and_pad_parm): Use host_integerp and tree_low_cst.
From-SVN: r36973
2000-10-20 14:49:24 -04:00
Richard Henderson
23ccfa6dbb * function.c (locate_and_pad_parm): Zero alignment_pad.
From-SVN: r36969
2000-10-20 10:40:52 -07:00
Franz Sirl
832ea3b309 function.c (locate_and_pad_parm): Don't align stack unconditionally.
2000-10-17  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	* function.c (locate_and_pad_parm): Don't align stack unconditionally.
	Fixes execute/20001017-1.c on pwerpc-linux-gnu.
	* expr.c (store_constructor): Apply MEM_ALIAS_SET to MEMs only.
	* rs6000/rs6000.c (rs6000_hash_constant): use X0INT to access a
	LABEL_REF.
	* rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
	ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from
	here...
	* rs6000/aix.h: ...to here.
	* rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style.

From-SVN: r36914
2000-10-17 22:17:34 +00:00
Mark Mitchell
1f8f4a0b31 Remove obstacks.
* Makefile.in (ggc-callbacks.o): Remove target.
	(flow.o): Depend on GGC_H.
	* alias.c (init_alias_analysis):
	Remove ggc_p conditionals.
	(end_alias_analysis): Likewise.
	* basic-block.h (init_flow): New function.
	(allocate_reg_life_data): Declare.
	* bb-reorder.c	(function_obstack): Replace with ...
	(flow_obstack): ... new variable.
	(fixup_reorder_chain): Use it.
	* c-decl.c (ggc_p): Remove.
	(caller-save.c): Don't call oballoc/obfree.
	* combine.c (struct
	undobuf): Remove storage.
	(try_combine): Don't call oballoc.
	(undo_all): Don't call obfree.
	* cse.c (insert): Use xmalloc, not
	oballoc.
	(cse_main): Adjust accordingly.
	* dwarf2out.c (save_rtx): Remove
	obstack code.
	(dwarf2out_init): Remove ggc_p conditionals.
	* emit-rtl.c (rtl_obstack): Remove.
	(gen_rtx_CONST_INT): Remove ggc_p conditionals.
	(make_insn_raw): Likewise.
	(emit_insn_before): Likewise.
	(emit_insn_after): Likewise.
	(emit_insn): Likewise.
	(gen_sequence): Likewise.
	(copy_insn_1): Remove handling of `b' RTL components.
	(init_emit_once): Remove ggc_p conditionals.
	* except.c (create_rethrow_ref): Don't fool with obstacks.
	(add_partial_entry): Likewise.
	(call_get_eh_context): Likewise.
	(begin_protect_partials): Likewise.
	(protect_with_terminate): Likewise.
	* explow.c
	(plus_constant_wide): Likewise.
	* expr.c (init_expr_once):
	Likewise.
	(emit_block_move): Likewise.
	(clear_storage): Likewise.
	(expand_expr): Likewise.
	* flow.c (function_obstack): Remove.
	(flow_obstack): New variable.
	(flow_firstobj): Likewise.
	(create_base_block): Use the flow_obstack.
	(split_block): Likewise.
	(split_edge): Likewise.
	(calculate_global_regs_live): Likewise.
	(allocate_bb_life_data): Make it static.  Likewiwse.
	(init_flow): New function.
	(size_int_type_wide): Remove ggc_p conditionals.
	* function.c
	(push_function_context_to): Don't call save_tree_status.
	(pop_function_context_from): Or restore_tree_status.
	(assign_stack_local_1): Don't call push_obstacks.
	(find_fixup_replacement): Use xmalloc.
	(fixup_var_refs_insns): Free the storage.
	(insns_for_mem_walk): Don't mess with obstacks.
	(instantiate_decls): Likewise.
	(trampoline_address): Likewise.
	(expand_function_end): Likewise.
	* function.h (sturct function):
	Remove obstack-related variables.
	(save_tree_status): Don't declare.
	(restore_tree_status): Likewise.
	* gcse.c (compute_can_copy):
	Don't call oballoc/obfree.
	* genattrtab.c (operate_exp): Remove
	ggc_p conditionals.
	(simplify_cond): Likewise.
	(simplify_test_exp): Don't mess with obstacks.
	(optimize_attrs): Likewise.
	* gengenrtl.c (gendef): Don't include
	ggc_p conditionals.
	* ggc-callbacks.c (ggc_p): Remove.
	* ggc-none.c (ggc_p): Remove.
	* ggc.h (ggc_p): Don't declare.
	* integrate.c (save_for_inline): Don't mess with obstacks.
	(integrate_decl_tree): Likewise.
	(output_inline_function): Likewise.
	* lists.c
	(init_EXPR_INSN_LIST_cache): Likewise.
	* loop.c (temp_obstack):
	Remove.
	(rtl_obstack): Likewise.
	(init_loop): Don't mess with obstacks.
	(reg_address_cost): Free BIVs and GIVs.
	(check_insns_for_bivs): Use xmalloc, not oballoc.
	(find_mem_givs): Likewise.
	(record_biv): Likewise.
	(general_induction_var): Likewise.
	(product_cheap_p): Likewse.
	* optabs.c (init_one_libfunc): Remove
	ggc_p conditional.
	* print-tree.c (debug_tree): Don't use
	oballoc/obfree.
	(print_node): Likewise.
	* profile.c (output_func_start_profiler):
	Remove call to temporary_allocation.
	* reload1.c
	(eliminate_regs_in_insn): Don't mess with obstacks.
	* resource.c
	(mark_target_live_regs): Use xmalloc.
	(free_resource_info): Free the memory.
	* rtl.c (rtl_obstack):
	Remove.
	(rtvec_alloc): Don't mess with obstacks.
	(rtx_alloc): Likewise.
	(rtx_free): Remove.
	(copy_rtx): Don't handle `b' cases.
	(read_rtx): Use a local rtl_obstack.
	* rtl.h (oballoc): Remove.
	(obfree): Likewise.
	(pop_obstacks): Likewise.
	(push_obstacks): Likewise.
	(allocate_bb_life_data): Likewise.
	(allocate_reg_life_data): Likewise.
	(rtx_free): Likewise.
	* sdbout.c (sdbout_queue_anonymous_type):
	Use tree_cons, not saveable_tree_cons.
	* simplify-rtx.c
	(cselib_init): Don't mess with obstacks.
	* stmt.c
	(mark_block_nesting): Mark the label_chain.
	(epxand_label): Use ggc_alloc, not oballoc.
	(clear_last_expr): Don't mess with obstacks.
	(expand_decl_cleanup): Likewise.
	(expand_dcc_cleanup): Likewise.
	(expand_dhc_cleanup): Likewise.
	(expand_anon_union_decl): Likewise.
	(add_case_node): Use xmalloc, not oballoc.
	(free_case_nodes): New function.
	(expand_end_case): Call it.
	* stor-layout.c (layout_type): Don't
	mess with obstacks.
	(layout_type): Likewise.
	* toplev.c (wrapup_global_declarations):
	Likewise.
	(compile_file): Remove ggc_p conditionals.
	(rest_of_compilation): Call init_flow.  Remove ggc_p conditionals.
	(decode_f_option): Remove ggc_p conditionals.
	* tree.c
	(function_maybepermanent_obstack): Remove.
	(maybepermanent_obstack): Likewise.
	(function_obstack): Likewise.
	(tmeporary_obstack): Likewise.
	(momentary_obstack): Likewise.
	(temp_decl_obstack): Likewise.
	(saveable_obstack): Likewise.
	(rtl_obstack): Likewise.
	(current_obstack): Likewise.
	(expression_obstack): Likewise.
	(struct obstack_stack): Likewise.
	(obstack_stack): Likewise.
	(obstack_stack_obstack): Likewise.
	(maybepermanent_firstobj): Likewise.
	(temporary_firstobj): Likewise.
	(momentary_firstobj): Likewise.
	(temp_decl_firstobj): Likewise.
	(momentary_function_firstobj): Likewise.
	(all_types_permanent): Likewise.
	(struct momentary_level): Likewise.
	(momentary_stack): Likewise.
	(init_obstacks): Remove initialization of removed obstacks.
	(save_tree_status): Remove.
	(restore_tree_status): Likewise.
	(temporary_allocation): Liekwise.
	(end_temporary_allocation): Liekwise.
	(resume_temporary_allocation): Likewise.
	(saveable_allocation): Likewise.
	(push_obstacks): Likewise.
	(push_obstacks_nochange): Likewise.
	(pop_obstacks): Likewise.
	(allocation_temporary_p): Likewise.
	(permanent_allocation): Likewise.
	(preserve_data): Likewise.
	(preserve_initializer): Likewise.
	(rtl_in_current_obstack): Likewise.
	(rtl_in_saveable_obstack): Likewise.
	(oballoc): Likewise.
	(obfree): Likewise.
	(savealloc): Likewise.
	(expralloc): Likewise.
	(print_obstack_name): Likewise.
	(debug_obstack): Likewise.
	(object_permanent_p): Likewise.
	(push_momentary): Likewise.
	(perserve_momentary): Likewise.
	(clear_momentary): Likewise.
	(pop_momentary): Likewise.
	(pop_momentary_nofree): Likewise.
	(suspend_momentary): Likewise.
	(resume_momentary): Likewise.
	(make_node): Don't set TREE_PERMANENT.
	(copy_node): Remove ggc_p conditionals.  Don't set TYPE_OBSTACK.
	Don't set TREE_PERMANENT.
	(get_identifier): Remove ggc_p conditionals.
	(build_string): Likewise.
	(make_tree_vec): Likewise.
	(build_decl_list): Remove.
	(build_expr_list): Likewise.
	(tree_cons): Remove ggc_p conditionals.
	(decl_tree_cons): Remove.
	(expr_tree_cons): Likewise.
	(perm_tree_cons): Likewise.
	(temp_tree_cons): Likewise.
	(saveable_tree_cons): Likewise.
	(build1): Remove ggc_p conditionals.
	(build_parse_node): Likewise.
	(build_type_attribute_variant): Don't mess with obstacks.
	(build_type_copy): Likewise.
	(type_hash_canon): Likewise.
	(build_pointer_type): Likewise.
	(build_reference_type): Likewise.
	(build_index_type): Likewise.
	(build_range_type): Likewise.
	(dump_tree_statistics): Don't print obstack information.
	* tree.h
	(struct tree_common): Remove permanent_flag.
	(TREE_PERMANENT): Remove.
	(TREE_SET_PERMANENT): Likewise.
	(TYPE_OBSTACK): Likewise.
	(struct tree_type): Remove obstack.
	(oballoc): Remove.
	(savealloc): Likewise.
	(build_decl_list): Likewise.
	(build_expr_list): Likewise.
	(perm_tree_cons): Likewise.
	(temp_tree_cons): Likewise.
	(saveable_tree_cons): Likewise.
	(decl_tree_cons): Likewise.
	(expr_tree_cons): Likewise.
	(suspend_momentary): Likewise.
	(allocation_temporary_p): Likewise.
	(resume_momentary): Likewise.
	(push_obstacks_nochange): Likewise.
	(permanent_allocation): Likewise.
	(push_momentary): Likewise.
	(clear_momentary): Likewise.
	(pop_momentary): Likewise.
	(end_temporary_allocation): Likewise.
	(pop_obstacks): Likewise.
	(push_obstacks): Likewise.
	(pop_momentary_nofree): LIkewise.
	(preserve_momentary): Likewise.
	(saveable_allocation): Likewise.
	(temporary_allocation): Likewise.
	(resume_temporary_allocation): Likewise.
	(perserve_initializer): Likewise.
	(debug_obstack): Likewise.
	(rtl_in_current_obstack): Likewise.
	(rtl_in_saveable_obstack): Likewise.
	(obfree): Likewise.
	* varasm.c (current_obstack): Remove.
	(saveable_obstack): Remove.
	(rtl_obstack): Remove.
	(immed_double_const): Don't mess with obstacks.
	(immed_real_cons): Likewise.
	(output_constant_def): Likewise.
	(init_varasm_status): Use xcalloc.
	(mark_pool_constant): Mark the pool constant itself.
	(free_varasm_status): Free memory.
	(decode_rtx_const): Call bzero directly, rather than expanding it
	inline.
	(record_rtx_const): Don't mess with obstacks.
	(force_const_mem): Likewise.
	* config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p
	conditionals.
	(aof_pic_entry): Likewise.
	* config/ia64/ia64.c (ia64_encode_section_info): Likewise.
	* config/m32r/m32r.c (m32r_encode_section_info): Likewise.
	* config/pa/pa.c (saveable_obstack): Remove.
	(rtl_obstack): Likewise.
	(current_obstack): Likewise.
	(output_call): Don't mess with obstacks.
	(hppa_encode_label): Remove ggc_p conditionals.
	* config/romp/romp.c (get_symref): Don't mess with obstacks.
	* config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional.
	(rs6000_encode_section_info): Likewise.
	* config/sh/sh.c (get_fpscr_rtx): Likewise.

From-SVN: r36856
2000-10-13 06:26:46 +00:00
Richard Henderson
3e4eac3fe9 function.c (diddle_return_value): Examine current_function_return_rtx instead of the DECL_RESULT.
* function.c (diddle_return_value): Examine
        current_function_return_rtx instead of the DECL_RESULT.
        (expand_function_end): Handle reloading DECL_RESULT from memory
        into a hard register.  Query promote_mode for sign of mismatched
        modes.

From-SVN: r36769
2000-10-06 18:45:21 -07:00
Richard Henderson
b313a0fe15 c-decl.c (warn_missing_noreturn): Remove.
* c-decl.c (warn_missing_noreturn): Remove.
        (c_expand_body): Don't set or check can_reach_end.
        * c-tree.h (warn_missing_noreturn): Move ...
        * flags.h: ... here.
        (can_reach_end): Remove.
        * flow.c (check_function_return_warnings): New.
        (make_edges): No edge to exit for noreturn sibcalls.
        * function.c (expand_function_end): Save the return value
        clobber instruction.
        (mark_function_status): Mark it.
        * function.h (struct function): Add x_clobber_return_insn.
        * jump.c (can_reach_end): Remove.
        (calculate_can_reach_end): Remove.
        (jump_optimize_1): Don't call it.
        * output.h (check_function_return_warnings): Declare.
        * toplev.c (warn_missing_noreturn): Move from c-decl.c
        (rest_of_compilation): Call check_function_return_warnings.

From-SVN: r36750
2000-10-05 23:01:27 -07:00
Jim Wilson
cc0cbae17e Fix IA-64 REG_LIBCALL dangling reference.
* function.c (fixup_var_refs_1, case SET): When gen_move_insn returns a
	SEQUENCE, call emit_insn_before, copy PATTERN and REG_NOTES of last
	sequence insn to INSN, and delete last sequence insn.

From-SVN: r36735
2000-10-05 16:24:18 -07:00
Jim Wilson
226ed43f1e Fix ia64-linux kernel fn_hash() miscompilation.
* function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a
	paradoxical subreg, then directly substitute the replacement and
	return.

From-SVN: r36515
2000-09-18 14:37:37 -07:00
Andrew Haley
659e47fb24 toplev.c (rest_of_compilation): Call purge_hard_subreg_sets to remove all SETs of SUBREGs of hard registers.
2000-09-15  Andrew Haley  <aph@redhat.com>

        * toplev.c (rest_of_compilation): Call purge_hard_subreg_sets to
        remove all SETs of SUBREGs of hard registers.
        * function.c (purge_hard_subreg_sets): New function.
        (purge_single_hard_subreg_set): New function.
        * rtl.h: (purge_hard_subreg_sets): New function.

From-SVN: r36511
2000-09-18 19:27:37 +00:00
Bernd Schmidt
ebb1b59ac0 Bring back equal forms for libcalls
From-SVN: r36469
2000-09-17 12:45:51 +00:00
Geoff Keating
1b3d8f8a35 stmt.c (expand_asm_operands): Twiddle generating_concat_p so that CONCATs are not generated for ASMs.
* stmt.c (expand_asm_operands): Twiddle generating_concat_p
so that CONCATs are not generated for ASMs.
* emit-rtl.c (gen_reg_rtx): Don't generate CONCATs when
not generating_concat_p.
* function.c (pop_function_context_from): Reset
generating_concat_p.
(prepare_function_start): Likewise.
* rtl.c (generating_concat_p): Define.
* rtl.h (generating_concat_p): Declare.
* toplev.c (rest_of_compilation): No CONCATs after RTL generation.

From-SVN: r36088
2000-09-01 01:03:29 +00:00
Jim Wilson
caa511fdfa Fix x86-x-ia64 abort while compiling glibc ldbl2mpn.c.
* function.c (gen_mem_addressof): Clear MEM_ALIAS_SET if no decl.

From-SVN: r35991
2000-08-25 14:32:05 -07:00
Richard Kenner
3f546a5319 function.c (fixup_var_refs_1, case MEM): Update CODE after updating X.
* function.c (fixup_var_refs_1, case MEM): Update CODE after
	updating X.

From-SVN: r35790
2000-08-18 14:11:02 -04:00
Richard Kenner
43db0363f1 calls.c (calls_function_1, [...]): Only test TYPE_RETURNS_STACK_DEPRESSED for FUNCTION_TYPE.
* calls.c (calls_function_1, expand_call): Only test
	TYPE_RETURNS_STACK_DEPRESSED for FUNCTION_TYPE.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.

From-SVN: r35743
2000-08-16 07:59:03 -04:00
Richard Kenner
7393c6422b calls.c (ECF_SP_DEPRESSED): New macro.
* calls.c (ECF_SP_DEPRESSED): New macro.
	(calls_function_1): Treat calling sp-depressed function as alloca.
	(emit_call_1): Don't adjust SP if calling sp-depressed function.
	(expand_call): Set ECF_SP_DEPRESSED if TYPE_RETURNS_STACK_DEPRESSED.
	If sp-depressed, ensure block saves and restores SP.
	* fold-const.c (extract_muldiv): Only check TYPE_IS_SIZETYPE
	for INTEGER_TYPE.
	* function.c (keep_stack_depressed): New function.
	(thread_prologue_and_epilogue_insns): Call it.
	* print-tree.c (print_node): Use HOST_WIDE_INT_PRINT_UNSIGNED
	to print DECL_OFFSET_ALIGN.
	Print no-force-blk and transparent-union flags properly.
	* stmt.c (expand_goto_internal): Don't restore stack if last block
	and function returns with sp depressed.
	(fixup_gotos): Likewise.
	(save_stack_pointer): New function, from code in expand_decl.
	(expand_decl): Call new function.
	* tree.h (TYPE_IS_SIZETYPE): Call INTEGER_TYPE_CHECK.
	(TYPE_RETURNS_STACK_DEPRESSED): New macro.
	(save_stack_pointer): New declaration.

From-SVN: r35734
2000-08-15 21:15:37 -04:00
Kazu Hirata
718fe40625 * cse.c: Fix formatting.
From-SVN: r35676
2000-08-14 08:34:52 -06:00
Geoff Keating
0858c623d0 flow.c (attempt_auto_inc): Remove unused variable `bb'.
* flow.c (attempt_auto_inc): Remove unused variable `bb'.
(attempt_auto_inc): Suppress parentheses warning.
* function.c (put_reg_into_stack): Remove unused variable `unsigned_p'.
* loop.c (load_mems): Remove `u' suffix in two places.
* config/rs6000/rs6000.c: Remove unnecessary `u' suffixes from
hex constants.
* config/rs6000/rs6000.h: Likewise.
* config/rs6000/sol-c0.c: Prototype some functions.  Remove the
__eabi dummy routine.
* config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Remove unused
variable `buf_ptr'.

From-SVN: r35670
2000-08-14 05:59:50 +00:00
Richard Henderson
8b4944fbce function.c (put_reg_into_stack): Allow type to be NULL.
* function.c (put_reg_into_stack): Allow type to be NULL.
        (schedule_fixup_var_refs): Likewise.
        (gen_mem_addressof): Allow decl to be NULL.
        (put_addressof_into_stack): Likewise.

From-SVN: r35625
2000-08-11 00:49:07 -07:00
J"orn Rennecke
018577e426 function.c (schedule_fixup_var_refs): New function, broken out of put_reg_into_stack.
* function.c (schedule_fixup_var_refs): New function, broken out
	of put_reg_into_stack.
	(put_reg_into_stack): Use it.
	(put_var_into_stack): In CONCAT case, fixup up references for
	components only after fixing up references to the whole concat.
testsuite:
	* gcc.c-torture/execute/20000804-1.c: New test.

From-SVN: r35495
2000-08-04 23:06:49 +01:00
Rodney Brown
2c3c49dec3 alias.c (mark_constant_function): Use INSN_P.
* alias.c (mark_constant_function): Use INSN_P.
	(init_alias_analysis): Likewise.
	* combine.c (combine_instructions): Use INSN_P.
	(can_combine_p): Likewise.
	(try_combine): Likewise.
	(distribute_notes): Likewise.
	(distribute_links): Likewise.
	* cse.c (cse_around_loop): Use INSN_P.
	(invalidate_skipped_block): Likewise.
	(cse_set_around_loop): Likewise.
	(cse_end_of_basic_block): Likewise.
	(delete_trivially_dead_insns): Likewise.
	* emit-rtl.c (unshare_all_rtl_again): Use INSN_P.
	(unshare_all_rtl_1): Likewise.
	(next_cc0_user): Likewise.
	(try_split make_insn_raw): Likewise.
	(remove_unnecessary_notes): Likewise.
	* final.c (shorten_branches): Use INSN_P.
	(leaf_renumber_regs): Likewise.
	(leaf_renumber_regs_insn): Likewise.
	* flow.c (find_label_refs): Use INSN_P.
	(verify_wide_reg): Likewise.
	(notice_stack_pointer_modification): Likewise.
	(count_or_remove_death_notes): Likewise.
	(verify_flow_info): Likewise.
	(clear_log_links): Likewise.
	* function.c (fixup_var_refs_insns): Use INSN_P.
	(compute_insns_for_mem): Likewise.
	* gcse.c (alloc_gcse_mem): Use INSN_P.
	(compute_sets): Likewise.
	(compute_hash_table): Likewise.
	(classic_gcse): Likewise.
	(cprop): Likewise.
	(insert_insn_end_bb): Likewise.
	(delete_null_pointer_checks_1): Likewise.
	* global.c (expand_preferences): Use INSN_P.
	(build_insn_chain): Likewise.
	* graph.c (node_data): Use INSN_P.
	* haifa-sched.c (priority): Use INSN_P.
	(rm_line_notes): Likewise.
	(rm_other_notes): Likewise.
	(find_insn_reg_weight): Likewise.
	(init_target_units): Likewise.
	(schedule_block): Likewise.
	(compute_block_forward_dependences): Likewise.
	(debug_dependencies): Likewise.
	(set_priorities): Likewise.
	* integrate.c (function_cannot_inline_p): Use INSN_P.
	(save_parm_insns): Likewise.
	(copy_insn_list): Likewise.
	* jump.c (mark_all_labels): Use INSN_P.
	(never_reached_warning): Likewise.
	* lcm.c (optimize_mode_switching): Use INSN_P.
	* local-alloc.c (validate_equiv_mem): Use INSN_P.
	(memref_used_between_p): Likewise.
	(update_equiv_regs): Likewise.
	(block_alloc): Likewise.
	(no_conflict_p): Likewise.
	* loop.c (scan_loop): Use INSN_P.
	(find_and_verify_loops): Likewise.
	(count_loop_regs_set): Likewise.
	(loop_reg_used_before_p): Likewise.
	(strength_reduce): Likewise.
	(recombine_givs): Likewise.
	(check_dbra_loop): Likewise.
	(load_mems): Likewise.
	(try_copy_prop): Likewise.
	* print-rtl.c (print_rtx): Use INSN_P.
	* recog.c (find_single_use): Use INSN_P.
	* reg-stack.c (stack_regs_mentioned): Use INSN_P.
	(next_flags_user): Likewise.
	(swap_rtx_condition): Likewise.
	* regmove.c (mark_flags_life_zones): Use INSN_P.
	(optimize_reg_copy_1): Likewise.
	(optimize_reg_copy_2): Likewise.
	(optimize_reg_copy_3): Likewise.
	(reg_is_remote_constant_p): Likewise.
	(fixup_match_2): Likewise.
	(regmove_optimize): Likewise.
	(fixup_match_1): Likewise.
	* regrename.c (build_def_use): Use INSN_P.
	(replace_reg_in_block): Likewise.
	(consider_use): Likewise.
	* reload.c (find_equiv_reg): Use INSN_P.
	* reload1.c (reload): Use INSN_P.
	(maybe_fix_stack_asms): Likewise.
	(calculate_needs_all_insns): Likewise.
	(reload_as_needed): Likewise.
	(emit_output_reload_insns): Likewise.
	(delete_address_reloads_1): Likewise.
	(reload_cse_regs_1): Likewise.
	(reload_combine): Likewise.
	(reload_cse_move2add): Likewise.
	* reorg.c (redundant_insn): Use INSN_P.
	(dbr_schedule): Likewise.
	* resource.c (find_dead_or_set_registers): Use INSN_P.
	(mark_target_live_regs): Likewise.
	* rtlanal.c (reg_used_between_p): Use INSN_P.
	(reg_referenced_between_p): Likewise.
	(reg_set_between_p): Likewise.
	(reg_set_p): Likewise.
	(single_set): Likewise.
	(multiple_sets): Likewise.
	(find_last_value): Likewise.
	(reg_set_last): Likewise.
	(find_reg_note): Likewise.
	(find_regno_note): Likewise.
	* sibcall.c (sequence_uses_addressof): Use INSN_P.
	* simplify-rtx.c (cselib_process_insn): Use INSN_P.
	* ssa.c (find_evaluations): Use INSN_P.
	(rename_block): Likewise.
	(rename_equivalent_regs): Likewise.
	* unroll.c (loop_find_equiv_value): Use INSN_P.
	(set_dominates_use): Likewise.
	* varasm.c (mark_constant_pool): Use INSN_P.
	(mark_constants): Likewise.
	* config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P.
	(alphaev4_next_group): Likewise.
	(alphaev5_next_group): Likewise.
	* config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P.
	(c4x_rptb_rpts_p): Likewise.
	* config/mips/mips.c (mips16_optimize_gp): Use INSN_P.
	* config/rs6000/rs6000.c (uses_TOC): Use INSN_P.
	(rs6000_adjust_priority): Likewise.
	* config/sh/sh.c (sh_loop_align): Use INSN_P.
	(machine_dependent_reorg): Likewise.
	(split_branches): Likewise.
	* config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P.

From-SVN: r35494
2000-08-04 14:28:08 -06:00
Jan Hubicka
dbab7b72b5 function.c (assign_stack_local_1, [...]): Do not call gen_mode_alignment when mode is BLKmode.
* function.c (assign_stack_local_1, assign_stack_temp_for_type):
	Do not call gen_mode_alignment when mode is BLKmode.

From-SVN: r35345
2000-07-30 18:26:46 +00:00
J. David Anglin
539a6f058c * function.c (round_down): Delete obsolete prototype.
From-SVN: r34631
2000-06-21 10:19:22 -06:00
Richard Kenner
c357082f8e function.c (put_var_into_stack): Don't reference DECL_ fields if input is a SAVE_EXPR.
* function.c (put_var_into_stack): Don't reference DECL_ fields
	if input is a SAVE_EXPR.
	Use set_mem_attributes in COMPLEX case.

From-SVN: r34591
2000-06-18 21:33:32 -04:00
J. David Anglin
a696c1d662 function.c (assign_parms): Add missing argument to set_mem_attributes call.
* function.c (assign_parms): Add missing argument to set_mem_attributes
	call.

From-SVN: r34404
2000-06-05 12:58:25 -04:00
Richard Kenner
2bf105ab5b alias.c (struct alias_set_entry): New field has_zero_child.
* alias.c (struct alias_set_entry): New field has_zero_child.
	(mem_in_disjoint_alias_sets_p): Return 0 if set in either ase.
	(get_alias_set): If language-dependent routine set TYPE_ALIAS_SET,
	do nothing.
	Call record_component_aliases for aggregate types.
	(record_alias_subset): Set has_zero_child.
	(record_component_aliases, case ARRAY_TYPE): Do nothing if
	TYPE_NONALIASES_COMPONENT.
	(record_component_aliases, case RECORD_TYPE): Test
	DECL_NONADDRESSABLE_P.
	* c-decl.c (grokdeclarator): Set DECL_NONADDRESSABLE_P instead
	of TREE_ADDRESSABLE.
	* calls.c (initialize_argument_information): Only test
	TYPE_TRANSPARENT_UNION for UNION_TYPE.
	* function.c (assign_parms): Likewise.
	* integrate.c (function_cannot_inline_p): Likewise.
	* stor-layout.c (finish_record_layout): Don't call
	record_component_aliases.
	* tree.h (struct tree_int_cst): Use struct tree_common.
	(struct tree_real_cst, struct tree_string): Likewise.
	(struct tree_complex, struct tree_identifier): Likewise.
	(struct tree_list, struct tree_vec, struct tree_exp): Likewise.
	(struct tree_block, struct tree_type, struct tree_decl): Likewise.
	(TYPE_TRANSPARENT_UNION): Use UNION_TYPE_CHECK.
	(TYPE_NONALIASES_COMPONENT): New macro.
	(TYPE_AMBIENT_BOUNDEDNESS): Use FUNCTION_TYPE_CHECK.
	(DECL_NONADDRESSABLE_P): New macro.
	(struct tree_decl): Reorder bits for clarity of how many left;
	add non_adressable.
	* cp/cp-tree.h: Use struct tree_common instead of a char array.
	* cp/decl.c (grokdeclarator): Set DECL_NONADDRESSABLE_P instead
	of TREE_ADDRESSABLE.

From-SVN: r34373
2000-06-02 21:57:46 -04:00
Richard Kenner
3bdf5ad138 Makefile.in (c-decl.o): Depend on rtl.h and expr.h.
* Makefile.in (c-decl.o): Depend on rtl.h and expr.h.
	* alias.c (struct alias_entry): alias_set is HOST_WIDE_INT.
	(REG_BASE_VALUE): Remove unneeded cast to unsigned.
	(get_alias_set_entry): ALIAS_SET arg is HOST_WIDE_INT.
	(find_base_decl): New function, from c_find_base_decl in c-common.c.
	(new_alias_set): Moved from tree.c; return is HOST_WIDE_INT.
	(get_alias_set): Likewise.
	Major rework to do more things and allow language-specific code
	to just handle special-cases.
	(record_alias_subset): Args are HOST_WIDE_INT.
	(record_component_alias): Local vars are HOST_WIDE_INT.
	Don't handle COMPLEX_EXPR.
	(get_varargs_alias_set): Moved from builtins.c.
	(get_frame_alias_set): New function.
	* builtins.c (expand_builtin_return_address): Use frame alias set.
	(expand_builtin_setjmp, expand_builtin_longjmp): Use alias set
	for setjmp buffer.
	(get_memory_rtx): Rework to use set_mem_attributes.
	(get_varargs_alias_set): Deleted from here.
	* c-common.c (c_apply_type_quals_to_decl): Alias sets now HOST_WIDE_INT.
	(c_find_base_decl): Deleted from here.
	(c_get_alias_set): Remove many cases and rework to just handle
	C-specific cases.
	* c-common.h (c_get_alias_set): Returns HOST_WIDE_INT.
	* c-decl.c (rtl.h, expr.h): Now included.
	(init_decl_processing): Call record_component_aliases on array types.
	(grokdeclarator): Likewise.
	Set TREE_ADDRESSABLE for all fields that are not bitfields.
	* c-typeck.c (common_type): Call record_component_aliases for array.
	* caller-save.c (setup_save_areas): Rework register loop for unsigned.
	Set all save areas to the frame alias set.
	* calls.c (initialie_argument_information): Call set_mem_attributes.
	(compute_argument_addresses, expand_call): Likewise.
	* explow.c (set_mem_attributes): New function.
	(stabilize): Use MEM_COPY_ATTRIBUTES and force_reg.
	* expr.c (struct move_by_pieces): Remove {to,from}_{struct,readonly}.
	LEN and OFFSET now HOST_WIDE_INT.
	(clear_by_pieces): Similar changes.
	(move_by_pieces): LEN now HOST_WIDE_INT; don't set deleted fields.
	(move_by_pieces_ninsns): Now returns unsigned HOST_WIDE_INT.
	(move_by_pieces_1): Don't use deleted fields, use MEM_COPY_ATTRIBUTES.
	(clear_by_pieces_1): Likewise.
	(emit_push_insn): Call set_mem_attributes.
	(expand_expr, case INDIRECT_REF): Likewise.
	(expand_expr, case VAR_DECL): Call change_address.
	* expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE): Use host_integerp and
	tree_low_cst.
	(get_varargs_alias_set, get_frame_alias_set): New decls.
	(record_base_value, record_alias_subset, lang_get_alias_set): Likewise.
	(new_alias_set, set_mem_attributes): Likewse.
	* function.c (struct temp_slot): ALIAS_SET is HOST_WIDE_INT.
	(assign_stack_temp_for_type): Likewise.
	Can split slot even if alias set since can copy.
	Set MEM_ALIAS_SET and MEM_SET_IN_STRUCT_P.
	(assign_temp): Use host_integerp and tree_low_cst.
	(put_var_into_stack): Properly handle SAVE_EXPR.
	(put_addressof_into_stack): Likewise.
	(assign_parms): Call set_mem_attributes.
	Delete #if 0 code.
	(fix_lexical_address): Put reference to chain into frame alias set.
	(expand_function_start): Call set_mem_attributes.
	* integrate.c (expand_inline_function): Likewise.
	* recog.c (adj_offsettable_operand): Use MEM_COPY_ATTRIBUTES.
	* regmove.c (try_apply_stack_adjustment): Likewise.
	* reload.c (push_reload, make_memloc): Likewise.
	* reload1.c (alter_reg): Make alias sets for spilled pseudos.
	* rtl.def (MEM): Update comment.
	* rtl.h (MEM_ALIAS_SET): Now uses XCWINT.
	(move_by_pieces): Change length to HOST_WIDE_INT.
	(record_base_value, record_alias_subset): Delete from here.
	* stmt.c (expand_decl): Call set_mem_attributes.
	* stor-layout.c (finish_record_layout): Call record_component_aliases.i
	* toplev.c (compile_file): Call init_alias_once earlier.
	* tree.c (lang_get_alias_set, get_alias_set, new_alias_set): Deleted
	from here: now in alias.c.
	* tree.h (struct tree_type): alias_set is HOST_WIDE_INT.
	(struct tree_decl): Likewise.
	(get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here.
	* varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes.
	(output_constant_def, force_const_mem): Likewise.
	* cp/Makefile.in (decl.o): Include ../expr.h.
	* cp/decl.c (expr.h): Include.
	(init_decl_processing): Call record_component_aliases for arrays.
	(grokdeclarator): Likewise.
	Set TREE_ADDRESSABLE for fields that aren't bitfields.
	* cp/tree.c (build_cplus_array_type_1): Call record_component_aliases.

From-SVN: r34305
2000-05-31 14:37:31 -04:00
Richard Henderson
86c8265412 function.c (emit_return_into_block): New line_note arg; emit it.
* function.c (emit_return_into_block): New line_note arg; emit it.
        (thread_prologue_and_epilogue_insns): Attempt to locate a line note
        for the close brace to accompany HAVE_return.  Move all line notes
        following the epilogue to before the NOTE_INSN_EPILOGUE_BEG.

From-SVN: r34251
2000-05-29 01:18:30 -07:00
Richard Henderson
5828d72574 function.c (diddle_return_value): A pcc-style struct return returns a pointer.
* function.c (diddle_return_value): A pcc-style struct return
        returns a pointer.

From-SVN: r34230
2000-05-28 05:31:40 -07:00
Richard Henderson
30196c1ff4 function.c (thread_prologue_epilogue_insns): Don't move the line note at the head of the chain.
* function.c (thread_prologue_epilogue_insns): Don't move the
        line note at the head of the chain.  Only force a lineno note
        before the end of block 0.

From-SVN: r34207
2000-05-27 13:10:38 -07:00
Richard Henderson
ca1117ccf7 function.c (thread_prologue_and_epilogue_insns): Make sure existing line number notes appear after the prologue.
* function.c (thread_prologue_and_epilogue_insns): Make sure
        existing line number notes appear after the prologue.

From-SVN: r34098
2000-05-22 20:40:53 -07:00
Andrew Cagney
078721e1a2 Add options -Wunused-variable, -Wunused-function, -Wunused-label,
-Wunused-parameter.  Retain existing -Wunused behavour.  Document.

From-SVN: r33953
2000-05-17 08:15:29 +00:00
Zack Weinberg
3b304f5b7d top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
	(tree.o): Depend on output.h.

	* c-decl.c (pending_invalid_xref_file,
	current_function_prototype_file): Constify.
	(pushdecl): Constify a local char *.
	(define_label): Constify filename parameter.
	* c-lex.c (init_parse): Constify parameter and return value.
	* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
	* c-tree.h: Update prototypes.
	* c-parse.in: Constify filename member of %union, and if_stmt_file.
	* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
	objc/objc-parse.c: Regenerate.

	* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
	* dwarfout.h: Update prototypes.
	* expr.c (expand_expr): Constify a local char *.
	* flags.h: Constify main_input_filename.
	* function.c (expand_function_end): Constify filename parameter.
	* genrecog.c (make_insn_sequence): Use a character array for
	c_test_pos.
	(main): Remove unused variables.
	* input.h: Constify input_filename, main_input_filename, and
	file_stack.name.  Update prototypes.
	* output.h: Declare first_global_object_name and
	weak_global_object_name here, as const char *.
	* stmt.c (expand_asm_operands): Constify filename parameter.
	* toplev.c (compile_file, push_srcloc, debug_start_source_file):
	Constify filename parameter.
	(input_filename, main_input_filename): Constify.
	* toplev.h: Update prototypes.
	* tree.c: Include output.h.  Don't declare
	first_global_object_name or weak_global_object_name.  Clean up string
	bashing in get_file_function_name_long.
	* tree.h (struct tree_decl): Constify filename member.
	(input_filename): Constify.
	Update prototypes.
	* varasm.c (first_global_object_name, weak_global_object_name):
	Constify.
	(assemble_start_function, assemble_variable): Clean up string bashing.

	* gcc.c: Constify all spec-related strings initialized,
	transitively, from string constants.  Constify all strings
	and string variables related to multilibs.
	(set_spec, read_specs): Cast argument to free to PTR.
	(used_arg): Do not modify multilib_matches.  Use strncmp plus
	length comparison to compare multilib switches.
	* genmultilib: Constify everything declared in multilib.h.

ch:
	* ch-tree.h: Update prototypes.  Remove prototypes for
	functions declared elsewhere.
	* decl.c (define_label): Constify filename parameter.
	* grant.c (globalize_decl, set_default_grant_file): Constify
	local char * variables.  Don't declare
	first_global_object_name or asm_out_file.
	* lang.c (chill_real_input_filename): Constify.
	* lex.c (init_parse): Constify parameter and return value.
	* parse.c: Don't declare input_filename.
	(ch_expand_asm_operands): Constify filename parameter.
	(parse_multi_dimension_case_action): Constify local char *.
	* satisfy.c (safe_satisfy_decl): Constify local char *.

cp:
	* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
	and pending_inline.filename.  Update prototypes.
	* decl.c (define_label): Constify filename parameter.
	* decl2.c (warn_if_unknown_interface): Constify local char *.
	* input.c Constify input_source.filename. Don't declare
	input_filename or lineno.  Constify filename parameter to feed_input.
	* lex.c (init_parse): Constify parameter and return value.
	(cp_pragma_interface, cp_pragma_implementation): Constify
	filename argument.
	(reinit_parse_for_method, reinit_parse_for_block,
	reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
	Constify local char *.
	* pt.c: Don't declare lineno or input_filename.
	(print_template_context, tsubst_friend_function, tsubst_decl,
	tsubst, instantiate_decl): Constify local char *.
	* semantics.c (expand_body): Constify local char *.
	* tree.c (build_srcloc): Constify filename parameter.
	* typeck.c (c_expand_asm_operands): Constify filename
	parameter.

f:
	* com.c (ffecom_subscript_check_): Constify array_name
	parameter. Clean up string bashing.
	(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
	parameter.
	(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
	ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
	local char *.
	(init_parse): Constify parameter and return value.
	* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
	functions here.
	(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
	(ffelex_hash_, ffelex_include_): Constify local char *.
	* std.c (ffestd_exec_end): Constify local char *.
	* where.c (ffewhere_file_new): Constify filename parameter.
	* where.h: Update prototypes.

java:
	* check_init.c (check_init): Constify local char *.
	* class.c (push_class): Constify local char *.
	* java_tree.h: Update prototypes.
	* jcf-io.c (open_class): Constify filename parameter and
	return value.
	(find_class): Remove redundant string copy.  Cast return from
	open_class.
	* jcf-parse.c (read_class, parse_class_file, yyparse):
	Constify local char *.
	* jcf-write.c (generate_bytecode_insns, generate_classfile):
	Constify local char *.
	* jcf.h (JCF): Constify filename and classname.
	(JCF_FINISH): Cast args to FREE to char * when appropriate.
	* lang.c (init_parse): Constify parameter and return value.
	* lex.c (java_get_line_col): Constify filename parameter.
	* parse.h: Constify parser_ctxt.filename.  Update prototypes.
	* parse.y (java_parser_context_suspend,
	issue_warning_error_from_context, safe_layout_class): Constify
	local char *.
	* parse.c: Regenerate.

From-SVN: r33804
2000-05-09 19:56:01 +00:00
Kaveh R. Ghazi
362440248c bb-reorder.c (get_next_bb_note, [...]): Prototype.
* bb-reorder.c (get_next_bb_note, get_prev_bb_note): Prototype.

	* diagnostic (vbuild_message_string, build_message_string,
	build_location_prefix, output_get_prefix, init_output_buffer,
	output_notice, vline_wrapper_message_with_location,
	v_message_with_decl, default_print_error_function): De-constify.
	(set_real_maximum_length): Prototype.

	* diagnostic.h (struct output_buffer, init_output_buffer,
	output_get_prefix, output_set_prefix): De-constify.

	* function.c (init_function_start): Constify.

	* gensupport.c (remove_constraints, process_rtx): Prototype.

	* gthr-posix.h: Indent uses of #pragma.

	* objc/objc-act.c (ggc_mark_imp_list, ggc_mark_hash_table):
	Prototype.

	* predict.c (find_expected_value): Delete prototype.
	(expected_value_to_br_prob): Initialize variable `ev_reg'.

	* sbitmap.h (debug_sbitmap): Prototype.

	* ssa.c (compute_coalesced_reg_partition): Prototype.

	* stor-layout.c (debug_rli): Prototype.

	* tree.h (round_down): Prototype.
	(init_function_start): Constify.

ch:
	* ch-tree.h (init_function_start): Constify.

From-SVN: r33675
2000-05-04 17:58:40 +00:00
Richard Kenner
bf49b1396b rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and MEM_ALIAS_SET.
* rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and
	MEM_ALIAS_SET.
	* alias.c (canon_rtx): Don't copy RTX_UNCHANGING_P or MEM_ALIAS_SET
	when calling MEM_COPY_ATTRIBUTES.
	* emit-rtl.c (operand_subword, change_address): Likewise.
	* explow.c (stabilize): Likewise.
	* expr.c (protect_from_queue, emit_move_insn_1): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	* combine.c (combine_simplify_rtx): Don't copy RTX_UNCHANGING_P
	when calling MEM_COPY_ATTRIBUTES.
	(make_extraction, simplify_shift_const, gen_lowpart_for_combine):
	Likewise.
	* cse.c (gen_lowpart_if_possible): Likewise.
	* function.c (fixup_var_refs_1, purge_addressof_1): Likewise.
	* optabs.c (gen_move_insn): Likewise.
	* recog.c (validate_replace_rtx_1): Likewise.
	* simplify-rtx.c (add_mem_for_addr): Likewise.
	* stmt.c (expand_anon_union_decl): Likewise.
	* config/arm/arm.md: Likewise.
	* config/h8300/h7300.c (fix_bit_operand): Likewise.
	* config/m88k/m88k.c (legitimize_address, block_move_loop): Likewise.
	(block_move_no_loop, block_move_sequence): Likewise.
	* config/rs6000/rs6000.c (expand_block_move_mem): Likewise.
	* config/alpha/alpha.c (get_aligned_mem): Likewise.
	Clear MEM_ALIAS_SET.
	* final.c (alter_subreg): Don't copy MEM_ALIAS_SET when calling
	MEM_COPY_ATTRIBUTES.

From-SVN: r33665
2000-05-04 09:49:50 -04:00
Jan Hubicka
1b513b7711 * function.c (epilogue_done): Pass whole insn to record_insns.
From-SVN: r33488
2000-04-27 15:34:16 +00:00
Richard Kenner
b3b42a4db6 rtl.c: Use NOTE_INSN_REPEATED_LINE_NUMBER and NOTE_INSN_RANGE_BEG.
* rtl.c: Use NOTE_INSN_REPEATED_LINE_NUMBER and NOTE_INSN_RANGE_BEG.
	* rtl.h: Likewise.
	* rtl.def: Update comment.
	* function.c (expand_function): Use NOTE_INSN_REPEATED_LINE_NUMBER.
	* integrate.c (expand_inline_function): Likewise.
	* profile.c (branch_prob): Likewise.
	* ggc-common.c (ggc_mark_rtx_children): Use NOTE_INSN_RANGE_BEG.
	* print-rtl.c (print_rtx): Likewise.
	* haifa-sched.c (sched_analyze, unlink_other_notes): Likewise.
	(reemit_notes): Likewise; also use enum insn_note.

From-SVN: r33314
2000-04-21 15:32:10 -04:00
Mark Mitchell
ab36bd3ed4 function.c (expand_function_start): Use hard_function_value to compute the RTL to use for DECL_RESULT.
* function.c (expand_function_start): Use hard_function_value to
	compute the RTL to use for DECL_RESULT.

From-SVN: r33219
2000-04-18 00:23:33 +00:00
Jeffrey A Law
4fa48eaefa Jeffrey A Law (law@cygnus.com)
* function.c (purge_addressof): Unshare any shared rtl created by
        purge_addressof and its children.

From-SVN: r33133
2000-04-12 16:47:06 -07:00
Mark Mitchell
d7bf8ada06 function.c (aggregate_value_p): VOID_TYPE nodes are never aggregates.
* function.c (aggregate_value_p): VOID_TYPE nodes are never
	aggregates.

From-SVN: r33129
2000-04-12 22:07:38 +00:00
Mark Mitchell
bedda2da7f final.c (final): Use xcalloc to allocate line_note_exists.
* final.c (final): Use xcalloc to allocate line_note_exists.
	* function.c (free_after_compilation): Free the temp_slots.
	(assign_stack_temp_for_type): Use xmalloc to allocate temp_slots.
	(combine_temp_slot): Free temp_slots when they get combined.
	(purge_addressof): Fix typo in comment.
	* stmt.c (mark_goto_fixup): Mark the fixup itself.
	(expand_fixup): Allocate the fixup with ggc_alloc_obj.

	* ggc.h: Include varray.h.
	(ggc_pending_trees): Declare.
	(ggc_mark_tree_children): Remove declaration.
	(ggc_mark_tree): Just push unmarked trees on ggc_pending_trees.
	* ggc-common.c (ggc_pending_trees): New variable.
	(ggc_mark_roots): Call ggc_mark_trees.
	(ggc_mark_tree_children): Rename to ggc_mark_trees.  Process all
	the ggc_pending_trees.
	* Makefile.in (GGC_H): New variable.  Use it throughout in place
	of ggc.h.

	* Makefile.in (GGC_H): New variable.  Use it throughout in place
	of ggc.h.

	* call.c: Don't include obstack.h.  Include ggc.h.
	(obstack_chunk_alloc): Don't define.
	(obstack_chunk_free): Likewise.
	(add_candidate): Allocate the z_candidate with ggc_alloc_obj.
	* decl.c (push_switch): Use xmalloc to allocate the cp_switch.
	(pop_switch): Free it.

	* decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.

	* dump.c (dequeue_and_dump): Don't try to print the bit_position
	if we don't have a DECL_FIELD_OFFSET.

	* Makefile.in (GGC_H): Add varray.h.

From-SVN: r32956
2000-04-06 00:51:25 +00:00
Jeffrey A Law
744bfbfa78 function.c (expand_function_end): Pass alignment argument to emit_block_move in bits, not bytes.
* function.c (expand_function_end): Pass alignment argument to
        emit_block_move in bits, not bytes.

From-SVN: r32835
2000-03-30 13:32:31 -07:00
Richard Kenner
bdb429a5a1 calls.c (expand_call): Pass bit alignment to mark_reg_pointer.
* calls.c (expand_call): Pass bit alignment to mark_reg_pointer.
	* explow.c (memory_address, allocate_dynamic_stack_space): Likewise.
	* function.c (assign_parms): Likewise.
	* integrate.c (expand_inline_function): Likewise.
	* stmt.c (expand_decl): Likewise.
	(copy_rtx_and_substitute): Likewise.
	* expr.c (expand_expr, expand_expr_unaligned): Likewise.
 	(clear_by_pieces): Fix error in last change.
	* emit-rtl.c (init_emit): Set known registers alignment in bits.
	* function.h (regno_pointer_align): Now unsigned.
	* config/arm/arm.c (alignable_memory_operand): REGNO_POINTER_ALIGN
	is in bits.
	* config/i386/i386.c (aligned_operand): Likewise.
	* config/sparc/sparc.c (mem_min_alignment): Likewise.
	* config/alpha/alpha.c (aligned_memory_operand): Likewise.
	(unaligned_memory_operand): Likewise.
	(alpha_expand_block_move, alpha_expand_block_clear): Likewise.
	Also make alignments and sizes unsigned and some whitespace cleanup.
	(alpha_va_start): Do nothing if VALIST's type is error_mark_node.

From-SVN: r32829
2000-03-30 08:46:05 -05:00
Richard Kenner
19caa751a8 builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
* builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
	(expand_builtin_apply): Pass alignment to emit_block_move in bits.
	(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
	(expand_builtin_memset): Likewise, but to clear_storage.
	* calls.c (save_fixed_argument_area): Likewise, to move_by_pieces.
	(restore_fixed_argument_area): Likewise.
	(store_unaligned_arguments_into_pseudos): Likewise, to store_bit_field.
	(load_register_parameters): Likewise, to emit_group_load.
	(expand_call): Likewise, to emit_group_store and emit_block_move.
	(emit_library_call_value_1): Likewise, to emit_block_move.
	(store_one_arg): Likewise, and to emit_push_insn.
	* expmed.c (extract_bit_field): Alignment is in bits, not bytes.
	(extract_fixed_bit_field, extract_split_bit_field): Likewise.
	* expr.c (move_by_pieces, move_by_pieces_ninsns): Likewise.
	(emit_block_move, emit_group_load, emit_group_store): Likewise.
	(clear_by_pieces, clear_storage, emit_push_insn): Likewise.
	(expand_assigment, store_expr, store_constructor_field): Likewise.
	(expand_expr_unaligned, do_jump, do_compare_and_jump): Likewise.
	(store_constructor, store_field, get_inner_reference): Likewise.
	Use host_integerp and tree_low_cst; sizes and positions HOST_WIDE_INT.
	(expand_expr, case COMPONENT_REF): Likewise.
	(copy_blkmode_from_regs): Use UNSIGNED_HOST_WIDE_INT for sizes
	and positions; reindent code.
	* expr.h (emit_cmp_insn, emit_cmp_and_jump_insns): Alignment unsigned.
	* function.c (purge_addressof_1): Pass bit align to store_bit_field.
	(assign_parms): Likewise to emit_group_store.
	* optbas.c (prepare_cmp_insn): Alignment is in bits.
	(emit_cmp_and_jump_insns, emit_cmp_insn): Likewise, and also unsigned.
	* stmt.c (expand_value_return): Pass align in bits to emit_group_load.
	(expand_return): Likewise to {extract,store}_bit_field.
	* stor-layout.c (get_mode_alignment): Minor cleanup.
	* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Align is in bits.
	* config/sh/sh.h (MOVE_BY_PIECES_P): Likewise.
	* ch/expr.c (chill_expand_expr): Pass bit alignment to emit_block_move.

From-SVN: r32827
2000-03-30 06:47:08 -05:00
Jan Hubicka
f73ad30e01 Convert ACCUMULATE_OUTGOING_ARGS to an expression.
* calls.c (PUSH_ARGS_REVERSED) Change to expression.
	(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value.
	(struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS.
	(save_fixed_argument_area, restore_fixed_argument_area):
	conditionize by #ifdef REG_PARM_STACK_SPACE only.
	(emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS
	to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS.
	(precompute_register_parameters): Avoid #ifdefs on
	ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED.
	(stire_one_args): Likewise.
	(expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS.
	(emit_library_call_value_1): Likewise.
	(compute_argument_block_size): Align to STACK_BOUNDARY only for
	ACCUMULATE_OUTGOING_ARGS.
	* combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default
	value.
	(nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH.
	(use_crosses_set_p): Likewise.
	* all targets (ACCUMULATE_OUTGOING_ARGS define): Change to
	#define ACCUMULATE_OUTGOING_ARGS 1.
	* i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS
	frames.
	* i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New
	constants.
	(TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros.
	(TARGET_SWITCHES): Add push-args, no-push-args,
	accumulate-outgoing-args and no-accumulate-outgoing-args.
	(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro.
	* expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default.
	(push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS
	and PUSH_ROUNDING.
	(emit_push_insn): Likewise.
	* final.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
	(final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS.
	* function.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
	(STACK_DYNAMIC_OFFSET): Define correctly for both
	ACCUMULATE_OUTGOING_ARGS and normal mode.
	* invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document.
	* tm.texi (PUSH_ARGS): Document.
	(ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation.

From-SVN: r32803
2000-03-29 13:10:44 +00:00
Richard Kenner
13eb1f7f0d expr.c (store_constructor): SIZE now signed.
* expr.c (store_constructor): SIZE now signed.
	For EXPR_SIZE, don't evaluate size; just needed if constant.
	* fold-const.c (fold): Fix a number of cases when folded tree is
	wrong type.
	* function.c (flush_addressof): Reenable.
	* tree.h (flush_addressof): Likewise.
	* toplev.c (independent_decode_option): Look at strings_processed.
	* config/alpha/alpha.h (MINIMUM_ATOMIC_ALIGNMENT): Cast to unsigned.

From-SVN: r32783
2000-03-28 12:01:49 -05:00
Richard Kenner
770ae6cc71 * Rework fields used to describe positions of bitfields and
modify sizes to be unsigned and use HOST_WIDE_INT.
	* alias.c (reg_known_value_size): Now unsigned.
	* c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position.
	(really_start_incremental_init): Use bitsize_zero_node.
	(push_init_level, pop_init_level, output_init_element): Likewise.
	Use bitsize_unit_node and bitsize_one_node.
	(output_pending_init_elements, process_init_element): Likewise.
	* combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned.
	(make_extraction): Position and length HOST_WIDE_INT and unsigned
	HOST_WIDE_INT, respectively.
	(get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT.
	(num_sign_bit_copies): Returns unsigned.
	BITWIDTH now unsigned; rework arithmetic.
	Remove recursive call from arg to MAX.
	(combine_instructions, init_reg_last_arrays): NREGS now unsigned.
	(setup_incoming_promotions, can_combine_p, try_combine, simplify_set):
	REGNO now unsigned.
	(set_nonzero_bit_and_sign_copies): NUM now unsigned.
	(find_split_point, expand_compound_operation, make_extraction): LEN
	now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT.
	(make_field_assignment): Likewise.
	(combine_simplify_rtx): Add cast.
	(expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic.
	(force_to_mode): WIDTH now unsigned; add cast.
	(if_then_else_cond): SIZE now unsigned.
	(nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned.
	(extended_count): Now returns unsigned.
	(simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT.
	Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned.
	(simplify_comparison): MODE_WIDTH now unsigned.
	(update_table_tick): REGNO and ENDREGNO now unsigned; new var R.
	(mark_used_regs_combine): Likewise; rework arithmetic.
	(record_value_for_reg): REGNO, ENDREGNO, and I now unsigned.
	(record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise.
	(record_promoted_value): REGNO now unsigned.
	(get_last_value_validate): REGNO, ENDREGNO, and J now unsigned.
	(get_last_value): REGNO now unsigned.
	(use_crosses_set_p): REGNO and ENDREGNO now unsigned.
	(reg_dead_regno, reg_dead_endregno): Now unsigned.
	(remove_death): Arg REGNO now unsigned.
	(move_deaths):  REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned.
	(reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO
	now unsigned.
	* convert.c (convert_to_integer): INPREC and OUTPREC now unsigned.
	* cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned.
	(struct cse_reg_info): REGNO now unsigned.
	(cached_regno): Now unsigned.
	(REGNO_QTY_VALID_P): Add cast.
	(make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned.
	(remove_invalid_regs): Likewise.
	(remove_invalid_subreg_refs): Likewise; arg WORD also unsigned
	as are variables END and I.
	(get_cse_reg_info, insert): Likewise.
	(mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned.
	(canon_hash): Likewise.
	(insert_regs, lookup_for_remove): REGNO now unsigned.
	(invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned.
	New variable RN.
	* dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0.
	* dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast.
	* emit-rtl.c (subreg_realpart_p): Add cast.
	(operand_subword): Arg I is now unsigned as is var PARTWORDS.
	(operand_subword_force): Arg I is now unsigned.
	* except.c (eh_regs): Variable I is now unsigned.
	* explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT.
	* expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT;
	length is unsigned HOST_WIDE_INT; likewise for internal variables.
	(store_split_bit_field, extract_fixed_bit_field): Likewise.
	(extract_split_bit_field, store_bit_field, extract_bit_field):
	Likewise.
	* expr.c (store_constructor_fields, store_constructor, store_field):
	Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT.
	(expand_assignment, expand_expr, expand_expr_unaligned): Likewise.
	(do_jump): Likewise.
	(move_by_pieces, move_by_pieces_ninsns, clear_by_pieces):
	MAX_SIZE is now unsigned.
	(emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned.
	(emit_group_store): Likewise.
	(emit_move_insn): I now unsigned.
	(store_constructor): Use host_integerp, tree_low_cst, and
	bitsize_unit_node.
	(get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT.
	Rework all calculations to use trees and new fields.
	* expr.h (promoted_input_arg): Regno now unsigned.
	(store_bit_field, extract_bit_field): Adjust types of pos and size.
	(mark_seen_cases): Arg is HOST_WIDE_INT.
	* flow.c (verify_wide_reg_1): REGNO now unsigned.
	* fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT;
	precisions and alignments are unsigned.
	(optimize_bit_field_compare, fold_truthop): Likewise.
	(int_const_binop): Adjust threshold for size_int_type_wide call.
	(fold_convert): Likewise.
	(size_int_type_wide): Make table larger and fix thinko that only
	had half of table used.
	(all_ones_mask_p, fold): Precisions are unsigned.
	* function.c (put_reg_info_stack): REGNO is unsigned.
	(instantiate_decl): Size is HOST_WIDE_INT.
	(instantiate_virtual_regs): I is unsigned.
	(assign_parms): REGNO, REGNOI, and REGNOR are unsigned.
	(promoted_input_arg): REGNO is unsigned.
	* function.h (struct function): x_max_parm_reg is now unsigned.
	* gcse.c (max_gcse_regno): Now unsigned.
	(struct null_pointer_info): min_reg and max_reg now unsigned.
	(lookup_set, next_set): REGNO arg now unsigned.
	(compute_hash_table): REGNO and I now unsigned.
	(handle_avail_expr): regnum_for_replacing now unsigned.
	(cprop_insn): REGNO now unsigned.
	(delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned.
	* ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case.
	* global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned.
	* hard-reg-set.h (reg_class_size): Now unsigned.
	* integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO.
	* jump.c (mark_modified_reg): I now unsigned; add cast.
	(rtx_equal_for_thread_p): Add cast.
	* loop.c (max_reg_before_loop): Now unsigned.
	(struct_movable): REGNO now unsigned.
	(try_copy_prop): REGNO arg unsigned.
	(regs_match_p): XN and YN now unsigned.
	(consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned.
	(strength_reduce): Likewise; NREGS also unsigned.
	(first_increment_giv, last_increment_giv unsigned): Now unsigned.
	* loop.h (struct iv_class): REGNO now unsigned.
	(max_reg_before_loop, first_increment_giv, last_increment_giv):
	Now unsigned.
	* machmode.h (mode_size, mode_unit_size): Now unsigned.
	(mode_for_size, smallest_mode_for_size): Pass size as unsigned.
	* optabs.c (expand_binop): I and NWORDS now unsigned.
	(expand_unop): I now unsigned.
	* print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do
	print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET.
	* real.c (significand_size): Now returns unsigned.
	* real.h (significand_size): Likewise.
	* regclass.c (reg_class_size): Now unsigned.
	(choose_hard_reg_mode): Both operands now unsigned.
	(record_reg_classes): REGNO and NR now unsigned.
	(reg_scan): NREGS now unsigned.
	(reg_scan_update): old_max_regno now unsigned.
	(reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned.
	* reload.c (find_valid_class): BEST_SIZE now unsigned.
	(find_dummy_reload): REGNO, NWORDS, and	I now unsigned.
	(hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned.
	Likewise for variable R.
	(refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned,
	as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R.
	(find_equiv_reg): Add casts.
	(regno_clobbered_p): Arg REGNO now unsigned.
	* reload.h (struct reload): NREGS now unsigned.
	(refers_to_regno_for_reload_p): Regno args are unsigned.
	(regno_clobbered_p): Likewise.
	* reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned.
	(compute_use_by_pseudos): REGNO now unsigned.
	(find_reg): I and J now unsigned, new variable K, and change loop
	variables accordingly; THIS_NREGS now unsigned.
	(alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned.
	(spill_hard_reg): REGNO arg now unsigned; add casts.
	(forget_old_reloads_1): REGNO, NR, and I now unsigned.
	(mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned.
	(clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO,
	END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned.
	(reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned.
	(choose_reload_regs): MAX_GROUP_SIZE now unsigned.
	(emit_reload_insns): REGNO now unsigned.
	(reload_cse_move2add): Add cast.
	(move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO
	and rework loop.
	* resource.c (mark_referenced_resources, mark_set_resources): New
	variable R; REGNO and LAST_REGNO now unsigned.
	(mark_target_live_regs): J and REGNO now unsigned.
	* rtl.c (mode_size, mode_unit_size): Now unsigned.
	* rtl.h (union rtunion_def): New field rtuint.
	(XCUINT): New macro.
	(ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT.
	(operand_subword, operand_subword_force): Word number is unsigned.
	(choose_hard_reg_mode): Operands are unsigned.
	(refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned.
	(find_regno_note, find_regno_fusage, replace_regs): Likewise.
	(regno_use_in, combine_instructions, remove_death): Likewise.
	(reg_scan, reg_scan_update): Likewise.
	(extended_count): Return is unsigned.
	* rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I,
	INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO.
	(reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned.
	(reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned.
	(reg_reg_last_1): FIRS and LAST now unsigned.
	(dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned.
	(dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO
	now unsigned.
	(find_regno_note, regno_use_in): Arg REGNO now unsigned.
	(find_regno_fusage): Likewise; also var REGNOTE now unsigned.
	(find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned.
	(replace_regs): Arg NREGS now unsigned.
	* sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0.
	* simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned.
	(simplify_binary_operation): Likewise.
	(cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and
	THIS_LAST now unsigned.
	(cselib_record_set): Add cast.
	* ssa.c (ssa_max_reg_num): Now unsigned.
	(rename_block): REGNO now unsigned.
	* stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT;
	sizes now unsigned.
	(all_cases_count): Just return -1 not -2.
	COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT.
	Rework tests to use trees whenever possible.
	Use host_integerp and tree_low_cst.
	(mark_seen_cases): COUNT arg now HOST_WIDE_INT;
	Likewise variable NEXT_NODE_OFFSET; XLO now unsigned.
	(check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT.
	* stor-layout.c (mode_for_size): SIZE arg now unsigned.
	(smallest_mode_for_size): Likewise.
	(layout_decl): Simplify handing of a specified DECL_SIZE_UNIT.
	KNOWN_ALIGN is now an alignment, so simplify code.
	Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type.
	(start_record_layout): Renamed from new_record_layout_info.
	Update to new fields.
	(debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far):
	New functions.
	(place_union_field): Renamed from layout_union_field.
	Update to use new fields in rli.
	(place_field): Renamed from layout_field.
	Major rewrite to use new fields in rli; pass alignment to layout_decl.
	(finalize_record_size): Rework to use new fields in rli and handle
	union.
	(compute_record_mode): Rework to simplify and to use new DECL fields.
	(finalize_type_size): Make rounding more consistent.
	(finish_union_layout): Deleted.
	(layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either.
	(layout_type, case RECORD_TYPE): Call new function names.
	(initialize_sizetypes): Set TYPE_IS_SIZETYPE.
	(set_sizetype): Set TYPE_IS_SIZETYPE earlier.
	(get_best_mode): UNIT is now unsigned; remove casts.
	* tree.c (bit_position): Compute from new fields.
	(byte_position, int_byte_position): New functions.
	(print_type_hash_statistics): Cast to remove warning.
	(build_range_type): Use host_integerp and tree_low_cst to try to hash.
	(build_index_type): Likewise; make subtype of sizetype.
	(build_index_2_type): Pass sizetype to build_range_type.
	(build_common_tree_nodes): Use size_int and bitsize_int to
	initialize nodes; add bitsize_{zero,one,unit}_node.
	* tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK.
	(DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise.
	(DECL_PACKED, DECL_BIT_FIELD): Likewise.
	(DECL_FIELD_BITPOS): Deleted.
	(DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields.
	(DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK.
	(DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise.
	(DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise.
	(DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise.
	(DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise.
	(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise.
	(DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK.
	(DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK.
	(DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise.
	(DECL_ALIGN): Adjust to new field in union.
	(DECL_OFFSET_ALIGN): New field.
	(DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK.
	(DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK.
	(union tree_decl): Add struct for both aligns.
	(enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}.
	(bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added.
	(struct record_layout_info): Rework fields to have offset
	alignment and byte and bit position.
	(start_record_layout, place_field): Renamed from old names.
	(rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls.
	(byte_position, int_byte_position): Likewise.
	(get_inner_reference): Change types of position and length.
	* unroll.c (unroll_loop): New variable R; use for some loops.
	MAX_LOCAL_REGNUM and MAXREGNUM now unsigned.
	(calculate_giv_inc): Arg REGNO now unsigned.
	(copy_loop_body): REGNO and SRC_REGNO now unsigned.
	* varasm.c (assemble_variable): Clean up handling of size using
	host_integerp and tree_low_cst.
	(decode_addr_const): Use byte, not bit, position.
	(output_constructor): bitpos and offsets are HOST_WIDE_INT;
	use tree_low_cst and int_bit_position.
	* objc/objc-act.c (build_ivar_list_initializer): Use byte_position.
	* ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT.
	* ch/typeck.c (expand_constant_to_buffer): Use int_byte_position.
	(extract_constant_from_buffer): Likewise.
	* cp/class.c (build_vbase_pointer_fields): layout_field now
	place_field.
	(get_vfield_offset): Use byte_position.
	(set_rtti_entry): Set OFFSET to ssizetype zero.
	(get_binfo_offset_as_int): Deleted.
	(dfs_record_base_offsets): Use tree_low_cst.
	(dfs_search_base_offsets): Likewise.
	(layout_nonempty_base_or_field): Reflect changes in RLI format
	and call byte_position.
	(layout_empty_base): Convert offset to ssizetype.
	(build_base_field): use rli_size_unit_so_far.
	(dfs_propagate_binfo_offsets): Do computation in proper type.
	(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
	(layout_class_type): Reflect changes in RLI names and fields.
	(finish_struct_1): Set DECL_FIELD_OFFSET.
	* cp/dump.c (dequeue_and_dump): Call bit_position.
	* cp/expr.c (cplus_expand_constant): Use byte_position.
	* cp/rtti.c (expand_class_desc): Use bitsize_one_node.
	* cp/typeck.c (build_component_addr): Use byte_position and don't
	special case for zero offset.
	* f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node.
	(ffecom_tree_canonize_ref_): Likewise.
	* java/class.c (make_field_value): Use byte_position.
	* java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
	(java_array_data_offset): Likewise.
	* java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
	bzero call.

From-SVN: r32742
2000-03-25 13:34:13 -05:00
Theodore Papadopoulo
2f939d9406 builtin.c (get_pointer_alignment): Use DECL_P and TYPE_P macros.
* builtin.c (get_pointer_alignment): Use DECL_P and TYPE_P macros.
	* c-common.c (decl_attributes,check_format_info,truthvalue_conversion,
	  c_get_alias_set): Likewise.
	* c-decl.c (duplicate_decls): Likewise.
	* c-typeck.c (default_conversion,build_unary_op): Likewise.
	* calls.c (initialize_argument_information): Likewise.
	* dwarf2out.c (decl_class_context,add_abstract_origin_attribute):
	Likewise.
	* dwarfout.c (decl_class_context,output_type): Likewise.
	* expr.c (get_inner_reference): Likewise.
	* fold-const.c (simple_operand_p,fold): Likewise.
	* function.c (aggregate_value_p): Likewise.
	* stmt.c (expand_asm_operands): Likewise.
	* varasm.c (named_section): Likewise.

	* call.c (check_dtor_name,build_new_method_call): Likewise.
	* decl.c (push_class_binding,poplevel,pushtag,lookup_namespace_name,
	make_typename_type,check_initializer,cp_finish_decl,xref_tag): Likewise.
	* decl2.c (grokfield,build_expr_from_tree,build_expr_from_tree,
	decl_namespace,arg_assoc_template_arg,arg_assoc,
	validate_nonmember_using_decl,do_class_using_decl): Likewise.
	* error.c (dump_template_argument,dump_expr,cp_file_of,cp_line_of,
	args_to_string): Likewise.
	* friend.c (is_friend): Likewise.
	* lex.c (note_got_semicolon,note_list_got_semicolon,is_global): Likewise.
	* method.c (build_overload_nested_name,build_overload_value,
	build_qualified_name,build_qualified_name,hack_identifier): Likewise.
	* parse.y (typename_sub,typename_sub1): Likewise.
	* pt.c (push_inline_template_parms_recursive,check_template_shadow,
	process_partial_specialization,convert_template_argument,
	template_args_equal,add_pending_template,lookup_template_class,
	for_each_template_parm_r,maybe_fold_nontype_arg,
	tsubst,instantiate_template,type_unification_real,unify,
	instantiate_pending_templates,set_mangled_name_for_template_decl):
	Likewise.
	* repo.c (repo_get_id,repo_template_used): Likewise.
	* search.c (lookup_field_1): Likewise.
	* tree.c (walk_tree,get_type_decl,cp_tree_equal,member_p): Likewise.
	* xref.c (classname): Likewise.

From-SVN: r32698
2000-03-23 00:41:05 +00:00
Jason Merrill
2c84914526 Implement dwarf2 exception handling for the ARM.
* config/arm/arm.h (INCOMING_RETURN_ADDR_RTX): Define.
        (DWARF_FRAME_RETURN_COLUMN): Define.
        * config/arm/arm.c (emit_multi_reg_push): Return rtx.  Attach
        REG_FRAME_RELATED_EXPR note.
        (emit_sfm): Likewise.
        (arm_expand_prologue): Set RTX_FRAME_RELATED_P on everything.
        * dwarf2out.c (reg_save): Handle saving a register to itself.
        (dwarf2out_frame_debug_expr): Handle an intermediate cfa reg.
        * except.c (eh_regs): Don't use the static chain reg if it's
        callee-saved.
        * frame.h (frame_state): Add cfa_saved field.
        * frame.c (execute_cfa_insn): Set it.
        * libgcc2.c (throw_helper): Don't adjust sp if it's restored in
        the epilogue.
        * function.c (ARG_POINTER_CFA_OFFSET): Default to FIRST_PARM_OFFSET.
        Now takes a parm.
        (instantiate_virtual_regs): Adjust.
        * tm.texi: Adjust.
        * config/m68k/m68k.h (ARG_POINTER_CFA_OFFSET): Don't define.
        * config/ns32k/ns32k.h (ARG_POINTER_CFA_OFFSET): Don't define.
        * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): Take a parm.

        * dwarf2out.c (reg_number): Refer to FIRST_PSEUDO_REGISTER.
        (initial_return_save): Use DWARF_FRAME_REGNUM, not reg_number.

From-SVN: r32696
2000-03-22 19:29:55 -05:00
Nathan Sidwell
d0f062fbb3 tree.h (COMPLETE_TYPE_P): New macro.
gcc
	* tree.h (COMPLETE_TYPE_P): New macro.
	(COMPLETE_OR_VOID_TYPE_P): New macro.
	(COMPLETE_OR_UNBOUND_ARRAY_TYPE_P): New macro.
	* stor-layout.c (layout_type, case VOID_TYPE): Don't set TYPE_SIZE.
	* c-aux-info.c (gen_type): Use them.
	* c-common.c (c_expand_expr_stmt): Likewise.
	* c-decl.c (poplevel, pushdecl, start_decl, finish_decl,
	grokdeclarator, grokparms, finish_struct, start_function,
	store_parm_decls, combine_parm_decls): Likewise.
	* c-parse.y (cast_expr): Likewise.
	* c-typeck.c (require_complete_type, c_sizeof, c_sizeof_nowarn,
	c_size_in_bytes, c_alignof, build_component_ref,
	build_indirect_ref, build_array_ref, convert_arguments,
	build_binary_op, pointer_diff, build_unary_op, digest_init: Likewise.
	* calls.c (initialize_argument_information): Likewise.
	* convert.c (convert_to_integer): Likewise.
	* dbxout.c (dbxout_typedefs, dbxout_type, dbxout_symbol): Likewise.
	* dwarfout.c (location_or_const_value_attribute,
	output_enumeration_type_die, output_structure_type_die,
	output_union_type_die, output_type): Likewise.
	* expr.c (safe_from_p, expand_expr): Likewise.
	* function.c (assign_parms): Likewise.
	* sdbout.c (sdbout_symbol, sdbout_one_type): Likewise.
	* tree.c (build_array_type, build_function_type,
	build_method_type, build_offset_type, build_complex_type): Likewise.
	* c-parse.c, c-parse.h: Regenerated.
gcc/cp
	* typeck.c (require_complete_type, complete_type,
	complete_type_or_else, c_sizeof, c_sizeof_nowarn,
	build_array_ref, convert_arguments, pointer_diff,
	build_x_unary_op, build_unary_op, build_c_cast,
	build_modify_expr): Use COMPLETE_TYPE_P etc.
	* call.c (is_complete, convert_like_real,
	build_new_method_call): Likewise.
	* class.c (build_vbase_pointer_fields, check_bases,
	build_base_field, finish_struct_1, pushclass): Likewise.
	* cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
	* decl.c (maybe_process_template_type_declaration, pushtag,
	pushdecl, redeclaration_error_message, start_decl, start_decl_1,
	layout_var_decl, check_initializer, cp_finish_decl,
	grokdeclarator, require_complete_types_for_parms,
	grok_op_properties, xref_tag, xref_basetypes,
	check_function_type): Likewise.
	* decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
	* friend.c (do_friend): Likewise.
	* init.c (build_offset_ref): Likewise.
	* parse.y (structsp): Likewise.
	* pt.c (maybe_process_partial_specialization,
	tsubst_friend_function, instantiate_class_template, tsubst,
	do_type_instantiation, instantiate_pending_templates): Likewise.
	* repo.c (repo_get_id): Likewise.
	* rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
	synthesize_tinfo_var, emit_support_tinfos): Likewise.
	* search.c (lookup_fnfields_1, lookup_conversions): Likewise.
	* semantics.c (begin_class_definition): Likewise.
	* tree.c (build_cplus_method_type): Likewise.
	* typeck2.c (digest_init, build_functional_cast,
	add_exception_specifier): Likewise.
	* parse.h, parse.c: Regenerated.

From-SVN: r32671
2000-03-21 18:10:48 +00:00
Martin v. Löwis
c14f7160a1 emit-rtl.c (push_to_full_sequence, [...]): New functions.
* emit-rtl.c (push_to_full_sequence, end_full_sequence): New functions.
	* except.c (emit_cleanup_handler): Use them.
	(expand_end_all_catch): Likewise.
	* function.c (fixup_var_refs): Likewise.
	(expand_function_end): Clear catch_clauses_last.
	* rtl.h (push_to_full_sequence, end_full_sequence): Declare.
	* except.h (struct eh_status): New field x_catch_clauses_last.
	(catch_clauses_last): New define.

	* cp/except.c (expand_exception_blocks): Clear catch_clauses_last.

	* java/except.c (emit_handlers): Clear catch_clauses_last.

From-SVN: r32643
2000-03-19 18:25:27 +00:00
Mark Mitchell
116eebd674 emit-rtl.c (remove_unncessary_notes): Check that all NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes have an...
* emit-rtl.c (remove_unncessary_notes): Check that all
	NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes have an
	associated NOTE_BLOCK.
	* function.h (identify_blocks): Update comments.
	(reorder_blocks): Declare.
	* function.c (identify_blocks): Don't take paramters.
	(reorder_blocks): Don't take parameters.
	* loop.h (find_loop_tree_blocks): Remove.
	(unroll_block_trees): Likewise.
	* loop.c (loop_optimize): Don't call find_loop_tree_blocks.  Use
	reorder_blocks instead of unroll_block_trees.h
	* sibcall.c (optimize_sibling_and_tail_recursive_calls): Likewise.
	* stmt.c (find_loop_tree_blocks): Remove.
	(unroll_block_trees): Likewise.
	* toplev.c (rest_of_compilation): Don't call find_loop_tree_blocks
	in whole-function mode.
	* tree.h (reorder_blocks): Remove declaration.

From-SVN: r32632
2000-03-19 05:26:48 +00:00
Jeffrey A Law
0a1c58a25a Sibling call optimizations.
Co-Authored-By: Richard Henderson <rth@cygnus.com>

From-SVN: r32612
2000-03-17 14:40:45 -08:00
Richard Earnshaw
c487e48467 function.c (prepare_function_start): Correctly initialize cfun->stack_alignment_needed.
* function.c (prepare_function_start): Correctly initialize
cfun->stack_alignment_needed.

From-SVN: r32534
2000-03-14 17:48:48 +00:00
Jason Merrill
c3b247b445 function.c (put_var_into_stack): Use type_for_mode to calculate part_type.
* function.c (put_var_into_stack): Use type_for_mode to calculate
        part_type.  Use MEM_SET_IN_STRUCT_P.
        * expr.c (store_field): Handle CONCAT.
        (store_constructor): Use fields_length.
        * tree.c (fields_length): New fn.
        * tree.h: Declare it.

From-SVN: r32514
2000-03-13 17:54:03 -05:00
Jason Merrill
fb13d4d024 except.c (can_throw): See through a SEQUENCE.
* except.c (can_throw): See through a SEQUENCE.
        (nothrow_function_p): New fn.
        * except.h: Declare it.
        * function.c (current_function_nothrow): New var.
        (prepare_function_start): Initialize it.
        * output.h: Declare it.
        * toplev.c (rest_of_compilation): Set it.
        * dwarf2out.c (dwarf2out_begin_prologue): Use it.

From-SVN: r32449
2000-03-09 14:01:47 -05:00
Mark Mitchell
64dc53f34d function.c (free_temps_for_rtl_expr): Don't free slots that have been pushed into a higher level.
* function.c (free_temps_for_rtl_expr): Don't free slots
	that have been pushed into a higher level.

	* expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
	RTL_EXPR_HAS_NO_SCOPE after all.

From-SVN: r32355
2000-03-06 09:50:17 +00:00
Mark Mitchell
9f93702662 tree.def (RTL_EXPR): Update documentation.
* tree.def (RTL_EXPR): Update documentation.
	* tree.h (RTL_EXPR_HAS_NO_SCOPE): New macro.
	* expr.c (expand_expr): Handle RTL_EXPR_HAS_NO_SCOPE.
	* function.c (preserve_rtl_expr_temp): New function.
	(preserve_rtl_expr_temps): Likewise.
	(preserve_rtl_expr_result): Use it.

From-SVN: r32344
2000-03-05 20:43:44 +00:00
Mark Mitchell
591ccf92b3 Revert this patch:
2000-03-04  Mark Mitchell  <mark@codesourcery.com>

From-SVN: r32343
2000-03-05 19:34:29 +00:00
Mark Mitchell
7470e8d74c function.h (struct sequence_stack): Remove rtl_expr.
* function.h (struct sequence_stack): Remove rtl_expr.
	(struct emit_staus): Likewise.
	(seq_rtl_expr): Remove.
	* tree.h (free_temps_for_rtl_expr): Don't declare.
	(start_sequence_for_rtl_expr): Likewise.
	* rtl.h (preserve_rtl_expr_result): Likewise.
	* emit-rtl.c (start_sequence): Don't set sequence_rtl_expr.
	(start_sequence_for_rtl_expr): Remove.
	(push_topmost_sequence): Don't save sequence_rtl_expr.
	(pop_topmost_sequence): Remove comment about not restoring it.
	(end_sequence): Don't set seq_rtl_expr.
	(init_emit): Don't initialize it.
	(mark_sequence_stack): Don't mark it.
	(mark_emit_status): Likewise.
	* except.c (protect_with_terminate): Use
	start_sequence_for_rtl_expr, not start_sequence.
	* expr.c (expand_expr, case RTL_EXPR): Don't call
	preserve_rtl_expr_result or free_temps_for_rtl_expr.
	* function.c (assign_stack_temp_for_type): Don't set rtl_expr.
	(preserve_rtl_expr_result): Remove.
	(free_temps_for_rtl_expr): Likewise.
	(pop_temp_slots): Likewise.
	(mark_temp_slot): Don't mark the rtl_expr.
	* stmt.c (expand_start_stmt_expr): Use start_sequence, not
	start_sequence_for_rtl_expr.

From-SVN: r32335
2000-03-05 03:43:58 +00:00
Richard Kenner
b0e3a65853 function.c (number_blocks): Reset next_block_index based on what debugging format is used, not what is defined.
* function.c (number_blocks): Reset next_block_index based on
	what debugging format is used, not what is defined.

From-SVN: r32235
2000-02-28 07:41:36 -05:00
Mark Mitchell
18c038b9ca emit-rtl.c (remove_unncessary_notes): Remove notes for empty blocks.
* emit-rtl.c (remove_unncessary_notes): Remove notes for empty
	blocks.
	* final.c (next_block_index): Remove.
	(max_block_depth): Likewise.
	(pending_blocks): Likewise.
	(init_final): Don't initialize them.
	(final_start_function): Don't set next_block_index.  Set up
	BLOCK_NUMBER.
	(final_scan_insn): Use BLOCK_NUMBER, not next_block_index.
	* function.h (number_blocks): New function.
	* function.c (get_block_vector): New function.
	(identify_blocks): Use it.
	(reorder_blocks): Set NOTE_BLOCK.
	(number_blocks): New function.
	* tree.def (BLOCK): Add documentation for TREE_ASM_WRITTEN flag.
	* tree.h (BLOCK_NUMBER): New macro.
	(tree_block): Add block_num field.
	* dbxout.c (next_block_number): Remove.
	(dbxout_init): Don't set it.
	(dbxout_block): Only output blocks that have TREE_ASM_WRITTEN
	set.  Use BLOCK_NUMBER, rather than next_block_num, to determine
	block numbers.
	* toplev.c (rest_of_compilation): Always call
	find_loop_tree_blocks.  Fix indentation.
	* dwarf2out.c (next_block_number): Remove.
	(gen_lexical_block_die): Use BLOCK_NUMBER, not next_block_number,
	to determine block numbers.
	(gen_inlined_subroutine_die): Likewise.
	(gen_block_die): Only output blocks that have TREE_ASM_WRITTEN set.
	(decls_for_scope): Don't increment next_block_number.
	* dwarfout.c (next_block_number): Remove.
	(output_lexical_block_die): Use BLOCK_NUMBER, not next_block_number,
	to determine block numbers.
	(output_inlined_subroutine_die): Likewise.
	(output_block): Only output blocks that have TREE_ASM_WRITTEN set.
	(output_decls_for_scope): Don't increment next_block_number.
	* sdbout.c (next_block_number): Remove.
	(sdbout_block): Use BLOCK_NUMBER.
	(sdbout_begin_block): Simplify.
	* xcoffout.c (next_block_number): Remove.
	(xcoffout_block): Use BLOCK_NUMBER, not next_block_number.
	(xcoffout_begin_block): Don't set next_block_number.
	(xcoffout_begin_function): Likewise. Use BLOCK_NUMBER, not
	next_block_number.

From-SVN: r32228
2000-02-28 09:51:42 +00:00
Richard Kenner
fed3cef0db builtins.c (c_strlen): Use size_diffop and return ssizetype value.
* builtins.c (c_strlen): Use size_diffop and return ssizetype value.
	(expand_builtin_strcpy): Pass correct type to size_binop.
	(expand_builtin_strcmp): Likewise.
	Clean up conditional structure.
	* c-decl.c (init_decl_processing): Don't call set_sizetype twice.
	(complete_array_type): Don't use size_binop for MAXINDEX.
	* c-typeck.c (c_sizeof): Use size_one_node and TYPE_SIZE_UNIT.
	(c_sizeof_nowarn, c_size_in_bytes): Likewise.
	(c_alignof): Use size_one_node.
	(build_unary_op): Pass arg of proper type to size_binop.
	(really_start_incremental_init, push_init_level): Use sizetype for
	constructor{,_bit,_unfilled}_index.
	(pop_init_label, output_init_element): Likewise.
	(output_pending_init_elements, process_init_element): Likewise.
	* calls.c (compute_argument_block_size): Field VAR is ssizetype.
	* expr.c (store_expr): Use size_int.
	(store_constructor): Use proper types for size_binop args.
	(get_inner_reference, expand_expr, case ARRAY_REF): Likewise.
	(expand_expr_unaligned): Likewise.
	(string_contant): Return object of sizetype.
	* expr.h (SUB_PARM_SIZE): Call size_diffop and pass proper types.
	(ARGS_SIZE_RTX): Call ARGS_SIZE_TREE.
	(ARGS_SIZE_TREE): Pass proper types to size_binop.
	* fold-const.c (int_const_binop): Refine when size_int is called.
	(fold_convert): Likewise.
	(size_int_wide): Rework to take KIND as arg, only take low order
	bits, handle new sizetype_tab datatype, and chain entries in
	size_table.
	(size_int_type_wide): New function.
	(size_binop): Validate types of arguments.
	(ssize_binop): Deleted.
	(size_diffop): New function.
	(extract_muldiv): Only fold division into multiplication for sizetypes.
	* function.c (assign_parms): Use size_diffop and make sure
	VAR field is of ssizetype; also pass proper type to size_binop.
	(locate_and_pad_parm, pad_to_arg_alignment): Likewise.
	(round_down): Deleted from here.
	* store-layout.c (sizetype_tab): Now an array.
	(sizetype_set, early_root_list): New variables.
	(variable_size): Use size_one_node.
	(round_up): Pass proper type to size_binop.
	(round_down): Moved to here and corrected as above.
	(layout_record): Pass proper arg types to size_binop.
	(layout_type): Likewise.
	If sizetype_set is zero, record the type just laid out.
	(make_unsigned_type): Don't call set_sizetype;
	(make_signed_type): Likewise; also, call fixup_signed_type.
	(initialize_sizetypes): New function.
	(set_sizetype): Make copy of types, set TYPE_IS_SIZETYPE, and
	set name of bitsizetype to "bit_size_type".
	Fix up type of sizes of all types made before call.
	* tm.texi (ROUND_TYPE_SIZE_UNIT): New macro.
	* tree.c (fix_sizetype): Deleted.
	(build_common_tree_nodes): Call initialize_sizetypes.
	(build_common_tree_nodes_2): Don't call fix_sizetype.
	* tree.h (TYPE_IS_SIZETYPE): New macro.
	(initialize_sizetype): New declaration.
	(enum size_type_kind): New type.
	(struct sizetype_tab): Deleted.
	(sizetype_tab): Now array; adjust sizetype macros.
	(size_diffop, size_int_type_wide): New functions.
	(size_int_wide): Change number of args and type; access macros changed.
	(ssize_int, sbitsize_int): New macros.
	* config/i960/i960.h (ROUND_TYPE_SIZE): Use size_int.
	(ROUND_TYPE_SIZE_UNIT): New macro.
	* ch/actions.c (chill_convert_for_assignment): Don't use size_binop
	for things that aren't sizes.
	(expand_varying_length_assignment): Likewise.
	* ch/convert.c (digest_array_tuple, convert): Likewise.
	* ch/typeck.c (build_chill_slice, smash_dummy_type): Likewise.
	(build_chill_slice_with_range): Likewise.
	(build_chill_slice_with_length): Likewise.
	(build_array_from_set): Adjust types for size_binop.
	* ch/expr.c (build_concat_expr, build_chill_repetition_op): Likewise.
	(build_chill_sizeof): Use TYPE_SIZE_UNIT.
	* ch/tree.c (build_string_type): Pass proper type to size_binop.
	* cp/class.c (dfs_build_vtable_offset_vtbl_entries): Don't use
	size_binop on things that are not sizes; ssize_binop deleted.
	Call size_diffop when appropriate.
	(dfs_build_vcall_offset_vtbl_entries): Likewise.
	(build_primary_vtable, build_secondary_vtable): Likewise.
	(dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
	Variable I is HOST_WIDE_INT.
	(get_vfield_offset): Pass proper types to size_binop.
	(size_extra_vtbl_entries, layout_virtual_bases): Likewise.
	(finish_struct_1): Likewise.
	(skip_rtti_stuff): Arg N is now pointer to signed.
	(layout_class_type): Use size_zero_node.
	* cp/cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
	* cp/cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
	* cp/decl.c (complete_arry_type): Pass proper types to size_binop.
	(xref_basetypes): BINFO_OFFSET is sizetype.
	* cp/error.c (dump_expr): Don't use size_binop non-sizes.
	* cp/expr.c (cplus_expand_constant): Pass proper types to size_binop.
	* cp/init.c (construct_virtual_bases): Fix type error.
	(build_vec_delete_1): Pass proper type to size_binop and don't
	fold result.
	* cp/lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
	* cp/rtti.c (get_base_offset): Pass proper type to size_binop.
	* cp/search.c (dfs_find_vbases): Fix type error.
	(expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
	(dfs_get_vbase_types): BINFO_OFFSET is sizetype.
	* cp/tree.c (debug_binfo): Variable N is signed.
	Use HOST_WIDE_INT_PRINT_DEC.
	* cp/typeck.c (comptypes): sizetype is same as equivalent integer type.
	(c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
	size_one_node and size_zero_node.
	(c_alignof): Use size_one_node.
	(build_component_addr): Pass proper types to size_binop.
	(expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
	* f/com.c (ffecom_arrayref_): Convert args to size_binop to proper
	type.
	(ffecom_tree_canonize_ptr_): Don't use size_binop for non-sizes.
	(ffecom_tree_canonize_ref_): Likewise.
	(type_for_mode): Handle TImode.
	* f/ste.c (ffeste_io_dofio_, ffeste_io_douio_): Use TYPE_SIZE_UNIT.
	(ffeste_io_ciclist_): Likewise.
	* java/expr.c (build_java_ret): Pass proper type to size_binop.

From-SVN: r32225
2000-02-27 16:39:40 -05:00
Jeff Law
af841dbdcc Fix copyrights.
From-SVN: r32179
2000-02-26 07:26:24 -07:00
Richard Kenner
c8d8ed65a5 bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.
* bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.
	* cppinit.c (new_pending_define): Add cast to avoid warning.
	* expmed.c (extract_bit_field): Likewise.
	* flow.c (enum reorder_skip_type): New type.
	(skip_insns_between_blcok): New it.
	Rework to avoid warning about possibly undefined variable.
	* function.c (assign_parms): Make thisparm_boundary unsigned.
	* genrecog.c (write_switch): Cast XWINT result to int.
	* lcm.c: Many static fcns and vars now #ifdef OPTIMIZE_MODE_SWITCHING.
	* mips-tfile.c (init_file): Make two versions of FDR intializer:
	one for MIPS and one for Alpha.
	(get_tag, copy_object): Add casts to avoid warnings.
	* optabs.c (init_one_libfunc): Cast NAME to (char *).
	* reload.c (find_reloads): Make TYPE enum reload_type.
	* sbitmap.c (dump_sbitmap): J is unsigned; don't use "1L".
	* unroll.c (unroll_loop): Initialize UNROLL_NUMBER.
	* varasm.c (compare_constant_1): Add cast to avoid warning.
	* config/alpha/alpha.c (alpha_emit_xfloating_libcall): Cast FUNC
	to (char *).
	(alpha_expand_unaligned_load, alpha_expand_unaligned_store):
 	Cast switch operand of size to int.
	(alpha_expand_epilogue): Always initialize fp_offset and sa_reg.
	* config/alpha/alpha.h (INITIAL_ELIMINATION_OFFSET): Add abort
	in unhandled case.

From-SVN: r32060
2000-02-18 20:27:00 -05:00
Mark Mitchell
9185a8d526 function.c (thread_prologue_and_epilogue_insns): Put a line note after the prologue.
* function.c (thread_prologue_and_epilogue_insns): Put a line note
	after the prologue.

From-SVN: r32037
2000-02-17 20:15:50 +00:00
Geoff Keating
2dd8bc0166 function.c (thread_prologue_and_epilogue_insns): Don't insert a RETURN insn into a block which already ends with a jump.
* function.c (thread_prologue_and_epilogue_insns): Don't insert
	a RETURN insn into a block which already ends with a jump.

From-SVN: r31928
2000-02-11 19:31:55 +00:00
Jan Hubicka
44affdae26 function.c (assign_temp): Change zero-sized arrays to size 1.
* function.c (assign_temp): Change zero-sized arrays to size 1.
	* integrate.c (expand_inline_function): Do not update
	stack_alignment_needed
	* i386.c (compute_frame_size): Remove #ifdef PREFERRED_FRAME_BOUNDARY,
	add some sanity checking, remove optimization for function with
	zero frame size.

From-SVN: r31898
2000-02-10 17:43:55 +00:00
Clinton Popetz
98b7bb3848 function.c (thread_prologue_and_epilogue_insns): Uncomment last change.
* function.c (thread_prologue_and_epilogue_insns): Uncomment
	last change.

From-SVN: r31890
2000-02-10 09:16:33 -05:00
Clinton Popetz
3a75e42e81 function.c (thread_prologue_and_epilogue_insns): Don't delete the edge from a block that both jumps and falls through to the...
* function.c (thread_prologue_and_epilogue_insns): Don't delete
	the edge from a block that both jumps and falls through to the
	fallthru block.

From-SVN: r31878
2000-02-09 19:20:41 -05:00
Clinton Popetz
a617c13f06 function.c (thread_prologue_and_epilogue_insns): Don't replace jumps with returns unless they are jumps to the fallthru block.
* function.c (thread_prologue_and_epilogue_insns): Don't replace
        jumps with returns unless they are jumps to the fallthru block.

From-SVN: r31852
2000-02-08 11:32:20 -05:00
Hans-Peter Nilsson
73ef99fbd6 * function.c (emit_return_into_block): Wrap in #ifdef HAVE_return.
From-SVN: r31847
2000-02-08 06:09:17 +00:00
Jan Hubicka
c2f8b49149 calls.c (compute_argument_block_size): New argument preferred_stack_boundary.
* calls.c (compute_argument_block_size): New argument
	preferred_stack_boundary.
	(expand_call): update cfun->preferred_stack_boundary, update call of
	compute_argument_block_size
	(emit_library_call): Increate cfun->preferred_stack_boundary
	to PREFERRED_STACK_BOUNDARY
	(emit_library_call_value): Likewise.
	* explow.c (allocate_dynamic_stack_spave): Likewise.
	* function.c (prepare_function_start): Set
	cfun->preferred_stack_boundary
	* function.h (struct function): Add preferred_stack_boundary field.
	* integrate.c (expand_inline_function): Update
	cfun->preferred_stack_boundary and cfun->stack_alignment_needed.
	(copy_rtx_and_substitute): Align frame to stack_alignment_needed only.
	* i386.c (compute_frame_size): Use cfun->preferred_stack_boundary.

From-SVN: r31831
2000-02-07 17:39:40 +00:00
Richard Henderson
69732dcb9c flow.c (flow_delete_insn, [...]): Export.
* flow.c (flow_delete_insn, make_edge, remove_edge): Export.
        * basic-block.h: Declare them.
        * emit-rtl.h (active_insn_p): New.
        (next_active_insn, prev_active_insn): Use it.
        * rtl.h: Declare it.
        * function.c (emit_return_into_block): New.
        (thread_prologue_and_epilogue_insns): Insert return insns instead
        of epilogues when possible.
        * jump.c (jump_optimize_1): Remove code to insert a return insn
        on the fallthru to the exit block.

From-SVN: r31826
2000-02-06 05:01:03 -08:00
Richard Henderson
c13fde0599 function.c (diddle_return_value): Rework to use a callback function.
* function.c (diddle_return_value): Rework to use a callback function.
        Use current_function_return_rtx if it's been set up.
        (do_clobber_return_reg, clobber_return_register): New.
        (do_use_return_reg, use_return_register): New.
        (expand_function_end): Use them.
        * stmt.c (expand_null_return): Likewise.
        * function.h: Declare them.
        * flow.c (mark_regs_live_at_end): Use diddle_return_value.
        (mark_reg): Change arguments as appropriate for callback.
        * integrate.c (expand_inline_function): Revert 19 Jan change.

From-SVN: r31791
2000-02-04 13:30:22 -08:00
Richard Henderson
19d3c25c9a flow.c (find_basic_blocks): Remove do_cleanup argument.
* flow.c (find_basic_blocks): Remove do_cleanup argument.
        Break out that code ...
        (cleanup_cfg): ... here.
        (commit_one_edge_insertion): Detect a return instruction being
        emitted to an edge.  Emit a barrier following; clear fallthru.
        (commit_edge_insertions): Verify CFG consistency.
        * function.c (expand_function_start): Kill unused variable.
        (expand_function_end): Likewise.
        (thread_prologue_and_epilogue_insns): Use insert_insn_on_edge
        to insert the epilogue.

        * gcse.c (gcse_main): Adjust for find_basic_blocks change.
        (delete_null_pointer_checks): Likewise.
        * output.h: Likewise.
        * reg-stack.c (reg_to_stack): Likewise.
        * toplev.c (rest_of_compilation): Likewise.  Run
        thread_prologue_and_epilogue_insns after rebuilding the CFG.

From-SVN: r31676
2000-01-28 14:22:50 -08:00
Geoff Keating
d1b8177961 emit-rtl.c (unshare_all_rtl): Unshare virtual parameters too.
* emit-rtl.c (unshare_all_rtl): Unshare virtual parameters too.
Use unshare_all_rtl_1.
(unshare_all_rtl_again): New function.
(unshare_all_rtl_1): New function split out of unshare_all_rtl.

* function.c (purge_addressof_1): Use unshare_all_rtl_again
rather than resetting the 'used' flags ourself.

* toplev.c (rest_of_compilation): Add current_function_decl
to the unshare_all_rtl call.
* tree.h: Prototype unshare_all_rtl.
* rtl.h: Prototype unshare_all_rtl_again here.

From-SVN: r31651
2000-01-27 20:46:26 +00:00
Richard Henderson
d29c259b71 stupid.c: Die die die.
* stupid.c: Die die die.
	* Makefile.in (OBJS): Remove stupid.o.
	(stupid.o): Likewise.

	* except.c (emit_eh_context): Don't emit USEs for stupid.
	* explow.c (probe_stack_range): Likewise.
	* flags.h (obey_regdecls): Remove.
	* flow.c (find_basic_blocks): Don't run try_merge_blocks
	when not optimizing.
	(life_analysis): Limit data collection when not optimizing.
	(mark_regs_live_at_end): Always mark the return value registers.
	(mark_used_regs): Remove dummy RETURN case.
	(print_rtl_with_bb): Don't consult obey_regdecls.
	* function.c (use_variable, use_variable_after): Remove.
	(assign_parms): Consult optimize not obey_regdecls.
	(expand_function_start): Don't emit USEs for stupid.
	(expand_function_end): Likewise.
	* global.c (build_insn_chain): Export.
	* integrate.c (expand_inline_function): Kill return-value USE
	handling code.
	* jump.c (jump_optimize_1): Do simple jump optimizations and
	dead code elimination.
	(calculate_can_reach_end): Remove check_deleted argument.
	(delete_insn): Patch out insns even when not optimizing.
	* local-alloc.c (block_alloc): Don't do tying when not optimizing.
	* rtl.h (use_variable, use_variable_after): Remove declarations.
	(build_insn_chain): Declare.
	* stmt.c (expand_value_return): Don't emit USEs for stupid.
	(expand_end_bindings): Likewise.
	(expand_decl): Likewise.  Consult optimize not obey_regdecls.
	* toplev.c (obey_regdecls): Remove.
	(rest_of_compilation): Don't set it.  Kill stupid in favour of
	flow1, local-alloc, and reload.
	(main): Don't set obey_regdecls.

	* config/nextstep.c (handle_pragma): Likewise.

	* alpha/alpha.md (allocate_stack): Don't emit USEs for stupid.

	* arm/arm.h (CONDITIONAL_REGISTER_USAGE): Don't fix reg 0 for stupid.

From-SVN: r31499
2000-01-19 01:42:11 -08:00
Kaveh R. Ghazi
711d877c9e eh-common.h: PROTO -> PARAMS.
* eh-common.h: PROTO -> PARAMS.
	* emit-rtl.c: Likewise.
	* errors.c: Likewise.
	* errors.h: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* fix-header.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.

From-SVN: r31419
2000-01-14 17:14:43 +00:00
Kaveh R. Ghazi
57bed15271 calls.c (emit_call_1): Wrap varaible `struct_value_size_rtx' in macro conditionals guarding use.
* calls.c (emit_call_1): Wrap varaible `struct_value_size_rtx' in
        macro conditionals guarding use.

        * dwarf2out.c: Include "tm_p.h".

        * function.c (locate_and_pad_parm): Mark parameter with
        ATTRIBUTE_UNUSED.
        (expand_function_end): Likewise for variable `context'.

        * reorg.c (make_return_insns): Wrap prototype in macro HAVE_return.

cp:
        * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.

From-SVN: r31398
2000-01-13 23:43:55 +00:00
Kaveh R. Ghazi
0ce8a59c2b elfos.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around assignment used as truth value.
* elfos.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.

	* function.c (assign_temp): Mark parameter `dont_promote' with
	ATTRIBUTE_UNUSED.  Wrap variable `unsignedp' with macro
	PROMOTE_FOR_CALL_ONLY.

	* genrecog.c (write_subroutine): Mark variable `operands' with
	ATTRIBUTE_UNUSED.

	* optabs.c (prepare_cmp_insn): Mark parameter `align' with
	ATTRIBUTE_UNUSED.

	* sdbout.c (sdbout_init): Likewise for parameter `asm_file'.
	(sdbout_begin_block, sdbout_end_block): Likewise for `file'.

	* toplev.c (note_deferral_of_defined_inline_function): Likewise
	for `decl'.

From-SVN: r31293
2000-01-09 14:23:35 +00:00
Kaveh R. Ghazi
a544cfd201 builtins.c (expand_builtin_strlen): Initialize variable `icode'.
* builtins.c (expand_builtin_strlen): Initialize variable `icode'.

	* calls.c (expand_call): Likewise for
	`old_stack_arg_under_construction'.

	* cpphash.c (macroexpand): Likewise for `args' and `rest_zero'.

	* function.c (pad_to_arg_alignment): Likewise for `save_var' and
	`save_constant'.

	* gcc.c (execute): Likewise for `ut' and `st'.

	* genattrtab.c (attr_rtx): Likewise for `rt_val'.

	* genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'.

	* jump.c (jump_optimize_1): Likewise for `temp2'.

	* local-alloc.c (block_alloc): Likewise for `r1'.

	* loop.c (recombine_givs): Likewise for `life_start' and `life_end'.

	* reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'.
	(subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'.

	* regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node'
	and `set2'.

	* reload.c (find_reloads): Likewise for `goal_alternative_number'
	and `goal_earlyclobber'.

	* scan-decls.c (scan_decls): Likewise for `prev_id_end'.

	* sdbout.c (sdbout_one_type): Likewise for `member_scl'.

	* stupid.c (stupid_life_analysis): Likewise for `chain'.

	* unroll.c (copy_loop_body): Likewise for `copy'.

	* varasm.c (output_constructor): Likewise for `byte'.

ch:
	* actions.c (update_else_range_for_int_const): Initialize
	variables `lowval' and `highval'.
	(update_else_range_for_range): Likewise for `low_range_val' and
	`high_range_val'.

cp:
	* class.c (warn_hidden): Initialize variable `fndecl'.

From-SVN: r31207
2000-01-04 16:29:41 +00:00
Richard Kenner
700f19f09f function.c (update_temp_slot_address): Handle case where sum of temporary address plus offset in register is a valid...
* function.c (update_temp_slot_address): Handle case where sum of
	temporary address plus offset in register is a valid address.

From-SVN: r31153
1999-12-31 19:07:54 -05:00
Christophe Jaillet
d4757e6a5d alias.c (nonlocal_reference_p): Add else for disjoint ifs.
* alias.c (nonlocal_reference_p): Add else for disjoint ifs.
        * flow.c (find_use_as_address): Likewise.
        * function.c (fixup_var_refs_1): Likewise.
        (walk_fixup_memory_subreg, fixup_stack_1): Likewise.
        * jump.c (invert_exp, redirect_exp): Likewise.
        * loop.c (replace_call_address): Likewise.
        (count_nonfixed_reads): Likewise.
        * rtlanal.c (modified_between_p): Likewise.
        (modified_in_p, volatile_insn_p, volatile_refs_p): Likewise.
        (side_effects_p, replace_regs, jmp_uses_reg_or_mem): Likewise.
        * unroll.c (remap_split_bivs): Likewise.

From-SVN: r31103
1999-12-27 15:01:12 -08:00
Bernd Schmidt
01d939e8fb current_function -> cfun
From-SVN: r31033
1999-12-20 13:18:17 +00:00
Mark Mitchell
a97901e608 Makefile.in (INTREGRATE_H): Rename to INTEGRATE_H.
* Makefile.in (INTREGRATE_H): Rename to INTEGRATE_H.
	* function.c (insert_block_after_note): Remove.
	(retrofit_block): Likewise.
	(identify_blocks): Fix indentation.
	(reorder_blocks): Don't NULL out NOTE_SOURCE_FILE for a
	NOTE_INSN_BLOCK_BEG or NOTE_INSN_BLOCK_END.
	* function.h (insert_block_after_note): Remove prototype.
	(retrofit_block): Likewise.
	* integrate.c (expand_inline_function): Don't call
	find_loop_tree_blocks.  Use expand_start_bindings_and_block, not
	just expand_start_bindings.  Use the block_map to remap old
	NOTE_BLOCKs to new ones.
	(integrate_decl_tree): Keep track of remapped blocks.
	* integrate.h (struct inline_remap): Add block_map.
	* stmt.c (expand_fixup): Don't try to retrofit_blocks.  Just set
	NOTE_BLOCK on the notes.
	(expand_start_bindings): Rename to ...
	(expand_start_bindings_and_block): Add parameter.  Set NOTE_BLOCK.
	(expand_end_bindings): Set NOTE_BLOCK.
	* toplev.c (rest_of_compilation): In function-at-a-time-mode,
	reconstruct the BLOCK tree.
	* tree.h (expand_start_bindings): Macroize.  Call ...
	(expand_start_bindings_and_block): New function.

	* optimize.c (struct inline_data): Remove scope_stmt.
	(remap_block): Don't use insert_block_after_note.  Don't update
	scope_stmt.
	(expand_call_inline): Don't update scope_stmt.
	(optimize_function): Don't initialize scope_stmt.
	* semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
	NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.

From-SVN: r30982
1999-12-16 17:50:29 +00:00
Jason Merrill
5afb79e7f8 function.c (retrofit_block): Abort if we don't find a suitable insn.
* function.c (retrofit_block): Abort if we don't find a suitable insn.
        (insert_block_after_note): Abort if we don't have a previous block.
        Remove FN parameter.
        * function.h: Adjust.

        * tree.c (walk_tree): Walk operand subtrees in forward order.
        * optimize.c (expand_call_inline): Likewise.
        (optimize_function): Initialize id->scope_stmt to something useful.
        (remap_block): Assume id->scope_stmt has a useful value.

From-SVN: r30965
1999-12-15 19:09:35 -05:00
Jan Hubicka
a087165623 function.c (PREFERRED_STACK_BOUDNARY): Provide default value.
* function.c (PREFERRED_STACK_BOUDNARY): Provide default value.
	(assign_stack_local_1): Limit alignment to PREFERRED_STACK_BOUNDARY,
	update stack_alignment_needed.
	(prepare_function_start): Initialize stack_alignment_needed
	* function.h (struct function): Add field stack_alignment_needed.

From-SVN: r30958
1999-12-15 15:34:03 +00:00
Mark Mitchell
4ce8936485 function.h (insert_block_after_note): Declare.
* function.h (insert_block_after_note): Declare.
	* function.c (insert_block_after_note): Split out from ...
	(retrofit_block): ... here.

From-SVN: r30776
1999-12-05 00:13:53 +00:00
Geoff Keating
a157febd0c c-common.c (enum attrs): Add A_NO_LIMIT_STACK.
* c-common.c (enum attrs): Add A_NO_LIMIT_STACK.
(init_attributes): Add A_NO_LIMIT_STACK.
(decl_attributes): Handle A_NO_LIMIT_STACK.
* c-decl.c (duplicate_decls): Handle DECL_NO_LIMIT_STACK.
* explow.c (allocate_dynamic_stack_space) [!HAVE_allocate_stack]:
Handle stack bounds checking.
* flags.h (flag_stack_check): Use the word 'probe' rather than
'check', because the flag doesn't actually cause any checking to
be done.
* function.c (expand_function_start): Set
current_function_limit_stack.
* function.h (struct function): Add limit_stack.
(current_function_limit_stack): Define.
* invoke.texi (Code Gen Options): Document new options.
* rtl.h: Declare stack_limit_rtx.
* toplev.c (stack_limit_rtx): New variable.
(decode_f_option): Handle new options -fstack-limit-register=REG,
-fstack-limit-symbol=IDENT, -fno-stack-limit.
(main): Add stack_limit_rtx as GC root.
* tree.h (DECL_NO_LIMIT_STACK): New macro.
(struct tree_decl): New member no_limit_stack.

* config/rs6000/rs6000.c (rs6000_allocate_stack_space): Handle
stack_limit_rtx.
* config/rs6000/rs6000.md (allocate_stack): Handle stack_limit_rtx.
(conditional_trap+1): Get new mnemonic correct.
(conditional_trap+2): New pattern for DImode traps.

* config/m68k/m68k.c (output_function_prologue): Handle
stack_limit_rtx.
* config/m68k/m68k.md (trap): New insn.
(conditional_trap): New insn.
* md.texi (Standard Names): Document `trap' and
`conditional_trap'.
* optabs.c (gen_cond_trap): Use start_sequence()/end_sequence()
so a cc0 setter doesn't get emitted at some random place in the
function.

* config/i960/i960.md (trap): New insn.
(conditional_trap): New expander.
(conditional_trap+1, conditional_trap+2): New insns for signed
and unsigned cases.
* config/i960/i960.c (i960_function_prologue): Use
STARTING_FRAME_OFFSET.  Handle stack_limit_rtx.

Co-Authored-By: Greg McGary <gkm@gnu.org>

From-SVN: r30771
1999-12-04 03:00:04 +00:00
Mark Mitchell
1e4ceb6f9e except.h (struct eh_entry): Add goto_entry_p.
* except.h (struct eh_entry): Add goto_entry_p.
	(eh_region_from_symbol): Remove prototype.
	* except.c (find_func_region_from_symbol): New function.
	(emit_cleanup_handler): Likewise.
	(eh_region_from_symbol): Make it static.
	(add_new_handler): Verify the argument.
	(find_func_region): Update comment.
	(expand_eh_region_end): Expand handlers here, rater than waiting
	until expand_leftover_cleanups or start_all_catch.
	(expand_leftover_cleanups): Don't expand here.
	(expand_start_all_catch): Or here.
	(expand_rethrow): Check the return value from find_func_region.
	* function.c (expand_function_end): Emit the catch_clauses.

From-SVN: r30576
1999-11-18 17:50:56 +00:00
Jakub Jelinek
4dc07bd7c1 explow.c (hard_function_value): Add outgoing argument.
* explow.c (hard_function_value): Add outgoing argument.
        * expr.h (hard_function_value): Declare it.
        * calls.c (expand_call, emit_library_call_value): Update callers.
        * function.c (aggregate_value_p): Ditto.
        (diddle_return_value): Must look at the outgoing registers
        on archs with register windows.

From-SVN: r30550
1999-11-16 09:43:40 -08:00
Jeffrey A Law
2cfcc23e7f function.c (diddle_return_value): Set REG_FUNCTION_VALUE_P as needed.
* function.c (diddle_return_value): Set REG_FUNCTION_VALUE_P as
        needed.

From-SVN: r30519
1999-11-12 20:54:56 -07:00
Jeffrey A Law
cfb0346d03 function.c (diddle_return_value): Only clal hard_function_value when the return value is supposed to be in a register.
* function.c (diddle_return_value): Only clal hard_function_value
        when the return value is supposed to be in a register.

From-SVN: r30497
1999-11-12 00:38:32 -07:00
Jeffrey A Law
d3f2edaeb9 function.c (diddle_return_value): Use hard_function_value to get an rtx suitable for use in the USE/CLOBBER insn.
* function.c (diddle_return_value): Use hard_function_value to
        get an rtx suitable for use in the USE/CLOBBER insn.

From-SVN: r30494
1999-11-11 20:46:21 -07:00
Mark Mitchell
4da896b292 cse.c (delete_trivially_dead_insns): Replace alloca with xmalloc/xcalloc.
* cse.c (delete_trivially_dead_insns): Replace alloca with
	xmalloc/xcalloc.
	* except.c (update_rethrow_references): Likewise.
	(init_eh_nesting_info): Likewise.
	* function.c (identify_blocks): Likewise.
	* gcse.c (dump_hash_table): Likewise.
	* graph.c (print_rtl_graph_with_bb): Likewise.
	* loop.c (combine_movables): Likewise.
	(move_movables): Likewise.
	(count_loop_regs_set): Likewise.
	(strength_reduce): Likewise.
	* profile.c (compute_branch_probabilities): New function, split
	out from ...
	(branch_prob): Here.  Replace alloca with xmalloc/xcalloc.
	* regclass.c (regclass): Likewise.
	* regmove.c (regmove_optimize): Likewise.
	* toplev.c (compile_file): Likewise.
	(main): Don't mess with the stack rlimit.

From-SVN: r30445
1999-11-08 04:56:18 +00:00
Nick Clifton
aa608fe69c oops - add missing return values
From-SVN: r30416
1999-11-05 12:08:09 +00:00
Nick Clifton
8c36698e52 If purge_addressof_1 fails to remove addressofs in notes, remove the notes
instead.

From-SVN: r30414
1999-11-05 10:11:40 +00:00
Jeffrey A Law
9399d5c63f function.c (pad_to_arg_alignment): Only update argument_pad if the argument's alignment is greater than STACK_BOUNDARY.
* function.c (pad_to_arg_alignment): Only update argument_pad
        if the argument's alignment is greater than STACK_BOUNDARY.

From-SVN: r30405
1999-11-04 23:49:38 -07:00
Richard Henderson
bd695e1e9d function.c (diddle_return_value): New.
* function.c (diddle_return_value): New.
        (expand_function_end): Use it.
        * stmt.c (expand_null_return): Likewise.
        (expand_value_return): Likewise.

        * reg-stack.c (subst_stack_regs_pat): Handle clobbers at top-level.

        * reload1.c (reload): Don't remove return value clobbers.

From-SVN: r30401
1999-11-04 16:35:10 -08:00
Richard Kenner
14a774a9d2 [multiple changes]
Fri Oct 29 15:25:07 1999  Arnaud Charlet  <charlet@ACT-Europe.FR>

	* gcov.c (DIR_SEPARATOR): Provide default.
	(output_data): Add test for MS-DOS format absolute filename.
	(fancy_abort): Correct program name.
	(open_files): Open all files in binary mode.
	* libgcc2.c (__bb_exit_func): Likewise.

	* profile.c (init_branch_prob): Specify binary when opening files.

	* flags.h (flag_unwind_tables): New decl.
	* toplev.c (flag_unwind_table): New definition.
	(f_options): Add -funwind-tables.
	(decode_g_option): Clarify warning when unknown -g option is given.
	(rest_of_compilation): If inside an inlined external function,
	pretend we are just being declared.

	* dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables.
	(dwarf2out_frame_finish): Likewise.

Fri Oct 29 06:32:44 1999  Geoffrey Keating  <geoffk@cygnus.com>

	* flow.c (propagate_block): When the last reference to a label
 	before an ADDR_VEC is deleted because the reference is a dead
 	store, delete the ADDR_VEC.

Fri Oct 29 07:44:26 1999  Vasco Pedro  <vp@di.fct.unl.pt>

	* fold-const.c (merge_ranges): In not in0, but in1, handle
	upper bounds equal like subset case.

Thu Oct 28 19:22:24 1999  Douglas Rupp <rupp@gnat.com>

	* dbxout.c (dbxout_parms): Generate a second stabs line for parameters
	passed in a register but moved to the stack.

Thu Oct 28 19:12:57 1999  Sam Tardieu  <tardieu@act-europe.fr>

	* gcc.c (pass_exit_codes, greatest_status): New variables.
	(struct option_map): Add entry for "--pass-exit-codes".
	(execute): Update greatest_status if error.
	(display_help): Add documentation for -pass-exit-codes.
	(process_command): Handle -pass-exit-codes.
	(main): Look at pass_exit_codes and greatest_status on call to exit.

Thu Oct 28 18:06:50 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* reload.c (find_reloads): Refine test for no input reload
	case to not includes reloads emitted after insn.

	* function.c (find_temp_slots_from_address): Handle sum involving
	a register that points to a temp slot.
	(update_temp_slot_address): Make recursive call if both old and
	new are PLUS with a common operand.
	* calls.c (expand_call): Mark temp slot for result as having
	address taken.

	* rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case.

	* gcc.c (process_command): Add standard_exec_prefix with "GCC"
	component as well as "BINUTILS".

	* integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	(expand_inline_function, integrate_parm_decls, integrate_decl_tree):
	All callers changed.
	* unroll.c (inital_reg_note_copy, copy_loop_body): Likewise.

	* dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use
	gdb extensions, write size of type; also be more consistent
	in using references when this is a subtype.

	* pa.md (extv, extzv, insv): Use define_expand to reject constant
	that is out of range.

	* loop.c (unknown_constant_address_altered): New variable.
	(prescan_loop): Initialize it.
	(note_addr_stored): Set it for RTX_UNCHANGING_P MEM.
	(invariant_p, case MEM): Remove handling for volatile and readony;
	check new variable if readonly.
	(check_dbra_loop): Chdeck unknown_constant_address_altered.

	* cse.c (canon_hash, case MEM): Do not record if BLKmode.
	(addr_affects_sp_p): Removed from note_mem_written and only
	define #ifdef AUTO_INC_DEC.

	* alpha.c (input_operand, case ADDRESSOF): Treat as REG.

	* regclass.c (record_reg_classes): Properly handle register move
	directions.

	* varasm.c (initializer_constant_valid_p, case MINUS_EXPR):
	Don't think valid if both operands are invalid.
	(struct constant_descriptor): New field RTL.
	(mark_const_hash_entry): Mark it.
	(record_constant{,_rtx}): Initialize it.
	(output_constant_def): Allocate RTL in permanent obstack and
	save in table.
	({record,compare}_constant_1): Modes must match for
	CONSTRUCTOR of ARRAY_TYPE.

	* c-common.h (initializer_constant_valid_p): Delete decl from here.
	* output.h (initializer_constant_valid_p): Move decl to here.
	* c-common.c (initializer_constant_valid_p): Delete function from here.
	* varasm.c (initializer_constant_valid_p): Move function to here.

	* tree.h (STRIP_SIGN_NOPS): New macro.
	* fold-const.c (optimize_minmax_comparison): New function.
	(invert_truthvalue, case WITH_RECORD_EXPR): New case.
	(fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS.
	(fold, case EQ_EXPR): Call optimize_minmax_comparison and add
	cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and
	widening conversions.
	(fold, case LE_EXPR): Rework changing unsigned to signed comparisons
	to look at size of mode, not precision of type; also add missing cases.
	(optimize_bit_field_compare, decode_field_reference): Don't try to
	optimize COMPONENT_REF of a PLACEHOLDER_EXPR.

	* dwarf2out.c (ctype.h): Include.
	(dwarf2out_set_demangle_name_func): New function.
	(size_of_line_info): Deleted.
	(output_line_info): Compute size of line info table from difference
	of labels.
	(base_type_die, add_name_attribute): Call demangle function, if any.
	(field_byte_offset): Use bits per word for variable length fields.
	(gen_array_type_die): Add array name.
	(gen_subprogram_die): Ignore DECL_INLINE if -fno-inline.
	(dwarf2out_add_library_unit_info): New function.

	* explow.c (set_stack_check_libfunc): New function.
	(stack_check_libfunc): New static variable.
	(probe_stack_range): Allow front-end to set up a libfunc to call.

	* combine.c (simplify_comparison): When making comparison in wider
	mode, check for having commuted an AND and a SUBREG.
	(contains_muldiv): New function.
	(try_combine): Call it when dividing a PARALLEL.
	(simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart.
	(simplify_comparison, case ASHIFTRT): Recognize sign-extension of
	a PLUS.
	(record_value_for_reg): If TEM is a binary operation with two CLOBBERs,
	use one of the CLOBBERs instead.
	(if_then_else_cond): If comparing against zero, just return thing
	being compared.

	* optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x).
	Don't generate shifts and subtract if have conditional arithmetic.

	* rtl.h (delete_barrier): New declaration.
	* jump.c (jump_optimize): Set up to handle conditional call.
	In conditional arithmetic case, handle CALL_INSN followed by a BARRIER.
	(delete_barrier): New function.

	* rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode.

	* recog.c (nonmemory_operand): Accept ADDRESSOF.

	* tree.c (build_type_attribute_variant): Push to obstack of
	ttype around type_hash_canon call.

	* expr.c (placeholder_list): Move decl to file scope.
	(expand_expr): Don't force access to volatile just because its
	address is taken.
	If ignoring reference operations, just expand the operands.
	(expand_expr, case COMPONENT_REF): Propagate
	EXPAND_CONST_ADDRESS to recursive call when expanding inner.
	Refine test for using bitfield operations vs pointer punning.
	(expand_expr, case CONVERT_EXPR): If converting to
	BLKmode UNION_TYPE from BLKmode, just return inner object.
	Use proper mode in store_field call.
	Properly set sizes of object to store and total size in store_field
	call for convert to union.
	(expand_expr, case ARRAY_REF): If OP0 is in a register, put it in
	memory (like for ADDR_EXPR).  Also, don't put constant in register if
	we'll want it in memory.
	(readonly_fields_p): New function.
	(expand_expr, case INDIRECT_REF): Call it if LHS.
	(expand_assignment): Handle a RESULT_DECL where
	DECL_RTL is a PARALLEL.
	(do_jump, case WITH_RECORD_EXPR): New case.
	(get_inner_reference): Always go inside a CONVERT_EXPR
	and NOP_EXPR if both modes are the same.
	(store_field): Use bitfield operations if size of bitsize is not same
	as size of RHS's type.
	Check for bitpos not a multiple of alignment in BLKmode case.
	Do block move in largest possible alignment.
	(store_constructor): Set BITSIZE to -1 for variable size and properly
 	in case of array of BLKmode.
	(expand_expr_unaligned): New function.
	(do_compare_and_jump): Call it.

	* mips/iris5.h (SWITCHES_NEED_SPACES): New macro.
	* collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES
	does not include 'o'.

	* function.c (instantiate_virtual_regs_1, case SET): Handle case where
	both SET_DEST and SET_SRC reference a virtual register.
	(gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG.

	* integrate.c (expand_inline_function): Handle case of setting
	virtual stack vars register (from built in setjmp); when parameter
	lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early.
	(subst_constant): Add new parm, MEMONLY.
	(expand_inline_function, integrate_parm_decls): Pass new parm.
	(integrate_decl_tree): Likewise.
	(copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P.
	(try_constants): Call subst_constants twice, with MEMONLY 0 and 1.
	(copy_rtx_and_substitute, case SET): Add explicit calls to
	copy_rtx_and_substitute for both sides.

	* stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for
	constraints.
	(pushcase{,_range}): Convert to NOMINAL_TYPE after checking for
	within INDEX_TYPE, instead of before.
	(fixup_gotos): Use f->target_rtl, not the next insn,
	since latter may be from a later fixup.
	(expand_value_return): Correctly convert VAL when promoting function
	return; support RETURN_REG being a PARALLEL.
	(expand_return): When checking for result in regs and having
	cleanup, consider PARALLEL in DECL_RTL as being in regs.

From-SVN: r30299
1999-10-31 20:11:22 -05:00
Marc Lehmann
8fbe10354e toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber warning from -Wuninitialized and put it under -W.
Sun Oct 31 13:32:15 CET 1999  Marc Lehmann <pcg@goof.com>

	* toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber
        warning from -Wuninitialized and put it under -W.
        * function.c (uninitialized_vars_warning): Warn only when the
        corresponding flag is set.

From-SVN: r30294
1999-10-31 21:52:00 +00:00
Catherine Moore
fbb57b2a94 Fix up last patch.
From-SVN: r30265
1999-10-29 14:49:29 -04:00
Catherine Moore
7ed6230077 Remove stray comment.
From-SVN: r30260
1999-10-29 13:11:16 -04:00
Catherine Moore
4fc026cde9 expr.c (emit_push_insn): New argument alignment_pad.
* expr.c (emit_push_insn): New argument alignment_pad.
        Update all callers.  Adjust stack pointer based on alignment pad.
        * function.c (pad_to_arg_alignment):  New argument alignment_pad.
        Update all callers.  Track alignment_pad if boundary > PARM_BOUNDARY.
        (locate_and_pad_parm): New argument alignment_pad.  Update all
        callers.
        * expr.h (emit_push_insn): Update prototype.
        (locate_and_pad_parm): Update prototype.
        * calls.c (arg_data):  Add new field alignment_pad.
        (initialize_argument_information): Initialize alignment_pad.

From-SVN: r30257
1999-10-29 11:23:41 -04:00
Mark Mitchell
5faf03ae77 except.c (free_eh_nesting_info): Free the info itself.
* except.c (free_eh_nesting_info): Free the info itself.
	* function.c (free_after_compilation): Don't free NULL.
	* gcse.c (alloc_pre_mem): Free the temp_bitmap, too.
	(pre_edge_insert): Free inserted.
	* stmt.c (free_stmt_status): Don't free NULL.

From-SVN: r30255
1999-10-29 09:49:23 +00:00
Jan Hubicka
a05924f91b Reorg reg-stack to use the standard CFG.
Co-Authored-By: Richard Henderson <rth@cygnus.com>

From-SVN: r30201
1999-10-26 18:25:13 -07:00
Kaveh R. Ghazi
b1474bb79e calls.c: Include tm_p.h later, so everything we need is defined.
* calls.c: Include tm_p.h later, so everything we need is defined.
        * expr.c: Likewise.
        * function.c: Likewise.

        * except.c: Include tm_p.h.

        * sparc.c: Likewise.
        (dwarf2out_cfi_label): Don't prototype.
        (check_return_regs, epilogue_renumber,
        ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists,
        ultra_find_type, ultra_build_types_avail, ultra_flush_pipeline,
        ultra_rescan_pipeline_state, set_extends, ultra_code_from_mask,
        ultra_schedule_insn): Add static prototype.
        (data_segment_operand, text_segment_operand): Call itself with the
        proper number of arguments.
        (sparc_flat_save_restore, sparc_v8plus_shift): Constify a char*.

        * sparc.h: Move all declarations to sparc-protos.h.
        (SELECT_RTX_SECTION):  Pass a missing MODE argument to
        symbolic_operand.

        * sparc/sysv4.h (SELECT_RTX_SECTION): Likewise.

        * config/svr4.h (text_section, ctors_section, dtors_section): Add
        Prototypes.
        (ASM_OUTPUT_SECTION_NAME, UNIQUE_SECTION,
        ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING,
        ASM_OUTPUT_ASCII): Constify a char*.

        * sparc-protos.h: New file for sparc prototypes.

cp:
        * expr.c: Include tm_p.h.

From-SVN: r30122
1999-10-21 16:58:33 +00:00
Kaveh R. Ghazi
ec97b83a1c function.c (record_insns, contains): Always declare and define.
* function.c (record_insns, contains): Always declare and define.
       (record_insns): Mark with ATTRIBUTE_UNUSED.

From-SVN: r30121
1999-10-21 16:26:42 +00:00