Commit Graph

115 Commits

Author SHA1 Message Date
Alexandre Oliva
715e2ab149 rtl.c (copy_most_rtx, [...]): Copy frame_related flag.
* rtl.c (copy_most_rtx, shallow_copy_rtx): Copy frame_related
flag.

From-SVN: r38500
2000-12-27 16:35:00 +00:00
Richard Henderson
4b01bd1658 rtl.h (REG_NON_LOCAL_GOTO): New.
* rtl.h (REG_NON_LOCAL_GOTO): New.
        * rtl.c (reg_note_name): Update.
        * stmt.c (expand_goto): Emit a REG_NON_LOCAL_GOTO note.
        * builtins.c (expand_builtin_longjmp): Likewise.
        * flow.c (make_edges): Check for REG_NON_LOCAL_GOTO and do
        not emit an edge.

From-SVN: r38408
2000-12-20 17:11:31 -08:00
J"orn Rennecke
c25c12b8aa rtl.h (traverse_md_constants): Declare.
* rtl.h (traverse_md_constants): Declare.
	(struct md_constant): Define.
	* Makefile.in (HOST_RTL): Add hashtab.o .
	(OBJS): Add hashtab.o .
	(hashtab.o): New rule.
	(rtl.o): Depends on HASHTAB_H.
	* rtl.c (hashtab.h): #include.
	(md_constants): New static variable.
	(def_hash, def_name_eq_p, read_constants): New static functions.
	(traverse_md_constants): New function.
	(read_name): Do constant expansion.
	(read_rtx): Recognize define_constants.
	* gencodes.c (print_md_constant): New function.
	(main): Emit #defines for all constant definitions encountered.
	* md.texi (Constant Definitions): New node.
	* gensupport.c (xcalloc): New function.

From-SVN: r37635
2000-11-22 01:22:02 +00:00
DJ Delorie
237aa7a2f3 oops, forgot a const
From-SVN: r37500
2000-11-16 10:21:50 -05:00
DJ Delorie
3ab9a08fcc rtl.c (read_rtx): Provide suitable names for unnamed define_insn and define_insn_and_split...
* rtl.c (read_rtx): Provide suitable names for unnamed
define_insn and define_insn_and_split patterns, based on file
and line numbers.

From-SVN: r37499
2000-11-16 10:19:01 -05:00
Joseph Myers
526aba2811 toplev.c, [...]: Change comments mentioning C9X to refer to C99 instead.
* toplev.c, flags.h, fold-const.c, real.c, rtl.c,
	fixinc/inclhack.def: Change comments mentioning C9X to refer to
	C99 instead.

From-SVN: r37127
2000-10-29 19:34:53 +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
a191f0ee83 machmode.def: Add BImode.
* machmode.def: Add BImode.  Add a column for bitsize.
        * machmode.h (DEF_MACHMODE): Adjust for extra column.
        (GET_MODE_BITSIZE): Use it.
        * rtl.c (DEF_MACHMODE): Adjust for extra column.
        (mode_bitsize): New.
        (mode_mask_array): Use bitsize.
        * combine.c (combine_simplify_rtx): Require inner and outer
        modes to match on nonzero_bits optimizations.

From-SVN: r36501
2000-09-18 10:55:38 -07:00
Bernd Schmidt
ff42776491 Fix a small oversight
From-SVN: r36232
2000-09-07 09:02:02 +00:00
Jim Wilson
ca3920adb2 Eliminate false DV warnings for predicated calls to noreturn functions.
* calls.c (emit_call_1): Add REG_NORETURN note to call if ECF_NORETURN.
	* combine.c (distribute_notes): Handle REG_NORETURN.
	* rtl.c (reg_note_name): Add REG_NORETURN.
	* rtl.h (enum reg_note): Likewise.
	* config/ia64/ia64-protos.h (emit_safe_across_calls): Renamed from
	ia64_file_start.
	* config/ia64/ia64.c (emit_safe_across_calls): Likewise.
	(rtx_needs_barrier): Handle unspec_volatile 8 and 9.
	(emit_predicate_relation_info): Handle conditional calls with
	REG_NORETURN.
	* config/ia64/ia64.h (ASM_FILE_START): Call emit_safe_across_calls
	instead of ia64_file_start.
	* config/ia64/sysv4.h (ASM_FILE_START): Likewise.
	* config/ia64/ia64.md (safe_across_calls_all,
	save_across_calls_normal): New patterns.

From-SVN: r36107
2000-09-01 15:22:54 -07: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
Akiko Matsushita
17dfb726db * gengenrtl.c, rtl.c: Avoid #elif.
From-SVN: r35456
2000-08-03 10:06:13 -06:00
Geoff Keating
8cd8f856b3 rtl.h (enum reg_note): Add REG_MAYBE_DEAD.
* rtl.h (enum reg_note): Add REG_MAYBE_DEAD.
* rtl.c (reg_note_name): Add REG_MAYBE_DEAD.
* flow.c (propagate_one_insn): Allow deletion of prologue/epilogue
insns if they have a REG_MAYBE_DEAD note attached.
* config/rs6000/rs6000.c (rs6000_maybe_dead): New function.
(rs6000_emit_load_toc_table): TOC loads may go dead.

From-SVN: r35414
2000-08-02 00:53:59 +00:00
Zack Weinberg
fbfc11925b diagnostic.c (trim_filename, [...]): Moved here from rtl.c.
* diagnostic.c (trim_filename, fancy_abort): Moved here from
	rtl.c.
	(fatal_function, set_fatal_function): Removed.
	(fatal): Don't prepare for or call the fatal_function.
	(diagnostic_lock, error_recursion): New.
	(diagnostic_for_decl, report_diagnostic): Guard against
	re-entering the error reporting routines.
	(fancy_abort): Assume function is not NULL.

	* errors.c (fancy_abort): New.  Assume function is not NULL.
	* tradcpp.c (fancy_abort): Assume function is not NULL.

	* system.h: Provide default definition of __FUNCTION__.
	* rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout.
	Always use __FUNCTION__ in definition of abort.
	* tree.h: Likewise.
	* varray.h: Likewise.
	* toplev.h: Likewise.  Don't prototype set_fatal_function.

From-SVN: r35170
2000-07-21 07:10:36 +00:00
Philipp Thomas
0c386769d0 rtl.c: Revert NLS changes.
2000-06-29  Philipp Thomas  <pthomas@suse.de>

	* rtl.c : Revert NLS changes.
	* gcc.c : Fix bug in display_help introced by my last changes.

From-SVN: r34778
2000-06-29 10:24:19 +00:00
Philipp Thomas
5e4adfbabc c-decl.c: Mark strings for translation.
2000-06-28  Philipp Thomas  <pthomas@suse.de>

	* c-decl.c : Mark strings for translation.
	(parmlist_tags_warning): Use distinct messages instead
	of conditional expressions.
	* diagnostic.c (v_message_with_decl): Mark string for translation.
	* gcc.c: Mark messages for translation.
	(display_help): Combine messages into one string where necessary.
	* mips-tfile.c: Add intl.h. Mark messages for translation.
	* rtl.c (fatal_with_file_and_line): Modify function for NLS. Mark
	messages for translation.
	* timevar.c: Mark messages for translation.
	* tlink.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r34773
2000-06-28 23:46:27 +00:00
Zack Weinberg
f8a83ee3a9 ggc-none.c, [...] (ggc_alloc_obj): Rename it ggc_alloc, drop second argument, never clear returned memory.
toplevel:
	* ggc-none.c, ggc-simple.c, ggc-page.c (ggc_alloc_obj): Rename
	it ggc_alloc, drop second argument, never clear returned memory.
	* ggc-common.c (ggc_alloc_string): Use ggc_alloc.
	(ggc_alloc_cleared): New.
	* ggc.h: Prototype ggc_alloc and ggc_alloc_cleared, not
	ggc_alloc_obj.  Remove ggc_alloc macro.
	(ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Use ggc_alloc.

	* rtl.c (rtvec_alloc): Clear the vector always.
	(rtx_alloc): Clear the first word always.  Remove dirty
	obstack tricks (this routine is no longer a bottleneck).
	* tree.c (make_node): Clear the new node always.
	(make_tree_vec): Likewise.
	(tree_cons): Clear the common structure always.
	(build1): Likewise; also, clear TREE_COMPLEXITY.
	* gengenrtl.c: Use puts wherever possible.  Remove extra
	newlines.
	(gendef): Clear the first word of an RTX in the generator
	function, irrespective of ggc_p.  Initialize '0' slots to
	NULL.
	(genlegend): Don't generate obstack_alloc_rtx routine, just a
	thin wrapper macro around obstack_alloc.

	* stmt.c (expand_fixup): Use ggc_alloc.
	* c-typeck.c (add_pending_init): Use ggc_alloc.
	* emit-rtl.c (init_emit_once): Clear CONST_DOUBLE_CHAIN(tem).
	* varasm.c (immed_double_const): Set CONST_DOUBLE_MEM(r) to
	const0_rtx when it is created.
	(immed_real_const_1): Set CONST_DOUBLE_CHAIN(r) to NULL_RTX if
	we are not in a function.

	* tree.c (tree_class_check_failed): Make second arg an int.
	* tree.h: Update prototype.

cp:
	* call.c (add_candidate): Use ggc_alloc_cleared.
	* decl.c (lookup_label): Likewise.
	* lex.c (retrofit_lang_decl): Likewise.

From-SVN: r34478
2000-06-09 21:47:40 +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
Richard Henderson
994a57cd28 builtins.c (expand_builtin_expect): New.
* builtins.c (expand_builtin_expect): New.
        (expand_builtin): Call it.
        * builtins.def (BUILT_IN_EXPECT): New.
        * c-common.c (c_common_nodes_and_builtins): Declare __builtin_expect.
        * extend.texi: Document it.

        * predict.c (expected_value_to_br_prob): New.
        (find_expected_value): New.
        * basic-block.h (expected_value_to_br_prob): Declare.
        * toplev.c (rest_of_compilation): Invoke it.

        * rtl.h (NOTE_EXPECTED_VALUE): New.
        (NOTE_INSN_EXPECTED_VALUE): New.
        * rtl.c (note_insn_name): Update.
        * print-rtl.c (print_rtx): Reorg NOTE_LINE_NUMBER special
        cases; handle NOTE_INSN_EXPECTED_VALUE.

From-SVN: r33211
2000-04-17 09:49:00 -07:00
Richard Henderson
d636c18c54 rtl.h (enum insn_note): New enumeration.
* rtl.h (enum insn_note): New enumeration.  Subsume
        NOTE_INSN_DELETED and friends.
        (GET_NOTE_INSN_NAME): Adjust index by NOTE_INSN_BIAS.
        * rtl.c (note_insn_name): Tweek string order.

From-SVN: r33187
2000-04-16 13:23:02 -07:00
Mark Mitchell
c13e821047 Makefile.in (emit-rtl.o): Depend on HASHTAB_H.
* Makefile.in (emit-rtl.o): Depend on HASHTAB_H.
	* alias.c (reg_known_value): Add comments.
	(init_alias_analysis): Likewise.
	* cse.c (exp_equiv_p): CONST_INTs are equal iff they have the same
	address.
	(cse_basic_block): Fix typo in comment.
	* emit-rtl.c: Include hashtab.h.
	(const_int_htab): New variable.
	(const_int_htab_hash): New function.
	(const_int_htab_eq): Likewise.
	(rtx_htab_mark_1): Likewise.
	(rtx_htab_mark): Likewise.
	(gen_rtx_CONST_INT): Cache all CONST_INTs.
	(unshare_all_rtx): Fix formatting.
	(init_emit_once): Initialize const_int_htab.
	* rtl.c (rtx_equal_p): CONST_INTs are equal iff they have the same
	address.
	* rtl.texi: Document the fact that all CONST_INTs with the same
	value are shared.

From-SVN: r32844
2000-03-31 08:57:54 +00:00
Richard Henderson
f590cca174 rtl.h: Redistribute enum reg_note documentation.
* rtl.h: Redistribute enum reg_note documentation.
        Kill trailing whitespace.
        * rtl.c (reg_note_name): Adjust to match enum reg_note tweeks.
        Kill trailing whitespace.

From-SVN: r32795
2000-03-28 17:56:04 -08: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
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
Jakub Jelinek
4710d3eb4b real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Define to LONG_DOUBLE_TYPE_SIZE if not defined.
* real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Define to
	LONG_DOUBLE_TYPE_SIZE if not defined.
	Use MAX_LONG_DOUBLE_TYPE_SIZE instead of
	LONG_DOUBLE_TYPE_SIZE in preprocessor if clauses.
	* real.c: Likewise.
	* gengenrtl.c: Likewise.
	* print-rtl.c: Likewise.
	* rtl.c: Likewise.
	* config/sparc/sol2-sld-64.h (TARGET_DEFAULT): Set
	MASK_LONG_DOUBLE_128.
	* config/sparc/sol2.h (TARGET_DEFAULT): Likewise.
	* config/sparc/sp64-elf.h (TARGET_DEFAULT): Likewise.
	* config/sparc/linux64 (TARGET_DEFAULT): Likewise.
	(SUBTARGET_SWITCHES): Define.
	(CPP_ARCH32_SPEC): Define __LONG_DOUBLE_128__ if compiling
	with -mlong-double-128.
	(LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags.
	(MAX_LONG_DOUBLE_TYPE_SIZE): Define.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros.
	(CC1_SPEC): Include -mlong-double-{64,128} as needed.
	* config/sparc/linux.h (SUBTARGET_SWITCHES): Define.
	(CPP_SUBTARGET_SPEC): Define __LONG_DOUBLE_128__ if compiling
	with -mlong-double-128.
	(LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags.
	(MAX_LONG_DOUBLE_TYPE_SIZE): Define.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros.
	* config/sparc/sparc.h (MASK_LONG_DOUBLE_128,
	TARGET_LONG_DOUBLE_128): Define.
	* config/sparc/linux-aout.h (LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/sparc/sparc.c (sparc_override_options): Disallow 64bit
	long double on TARGET_ARCH64.

From-SVN: r32367
2000-03-06 19:51:52 +01:00
Kaveh R. Ghazi
47ee9bcb61 defaults.h (ASM_OUTPUT_ASCII): Constify a char*.
* defaults.h (ASM_OUTPUT_ASCII): Constify a char*.

	* flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain,
	fixup_reorder_chain, skip_insns_between_block): Add static prototypes.
	(life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS.

	* haifa-sched.c (rank_for_schedule): Don't cast away const-ness.

	* integrate.c (compare_blocks, find_block): Likewise.

	* rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2.

	* rtl.h (set_file_and_line_for_stmt): Constify a char*.

	* stmt.c (stmt_status, set_file_and_line_for_stmt,
	expand_asm_operands): Likewise.

From-SVN: r32094
2000-02-21 23:27:01 +00:00
Martin v. Löwis
8b97e23b76 gcc.texi (Bug Reporting): Refer to bugs.html.
* gcc.texi (Bug Reporting): Refer to bugs.html.
	(Bug Lists): Likewise.
	* system.h (GCCBUGURL): New preprocessor define.
	* rtl.c (fancy_abort): Use it.
	* gcc.c (main): Likewise.
	* typeck2.c (my_friendly_abort): Use GCCBUGURL.
	* g77spec.c (lang_specific_driver): Use GCCBUGURL.
	* gjavah.c (help): Use GCCBUGURL.
	* jv-scan.c (help): Likewise.
	* jcf-dump.c (help): Likewise.

From-SVN: r32049
2000-02-18 12:26:50 +00:00
Kaveh Ghazi
9311a396bc Update copyrights
From-SVN: r31465
2000-01-17 17:16:21 +00:00
Kaveh R. Ghazi
cdadb1dda0 reload.c: PROTO -> PARAMS.
* reload.c: PROTO -> PARAMS.
        * reload.h: Likewise.
        * reload1.c: Likewise.
        * reorg.c: Likewise.
        * resource.h: Likewise.
        * rtl.c: Likewise.
        * rtl.h: Likewise.
        * rtlanal.c: Likewise.
        * sbitmap.h: Likewise.
        * sdbout.c: Likewise.
        * stack.h: Likewise.
        * stmt.c: Likewise.
        * system.h: Likewise.

From-SVN: r31461
2000-01-17 15:47:29 +00:00
Mumit Khan
d5b6516da5 cccp.c: Delete PATH_SEPARATOR, DIR_SEPARATOR and IS_DIR_SEPARATOR macros.
2000-01-06  Mumit Khan  <khan@xraylith.wisc.edu>

	* cccp.c: Delete PATH_SEPARATOR, DIR_SEPARATOR and
	IS_DIR_SEPARATOR macros.
	* collect2.c: Likewise.
	* cppinit.c: Likewise.
	* dwarf2out.c: Likewise.
	* gcc.c: Likewise.
	* gcov.c: Likewise.
	* prefix.c: Likewise.
	* rtl.c: Likewise.
	* toplev.c: Likewise.
	* system.h: And move to here.

From-SVN: r31264
2000-01-07 00:16:51 +00:00
Zack Weinberg
f4524c9e9c acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING, GC_CHECKING, GC_ALWAYS_COLLECT.
1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>

	* acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING,
	GC_CHECKING, GC_ALWAYS_COLLECT.
	* configure.in: Allow --enable-checking with an argument
	listing check modes to enable.
	* config.in, configure: Rebuilt.
	* ggc-page.c, ggc-simple.c: Define GGC_POISON (and
	GGC_ALWAYS_VERIFY for ggc-simple.c) only if
	ENABLE_GC_CHECKING.  Define GGC_ALWAYS_COLLECT only if
	ENABLE_GC_ALWAYS_COLLECT.
	* rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING
	throughout.
	* tree.h, tree.c: Change ENABLE_CHECKING to
	ENABLE_TREE_CHECKING throughout.

	* cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
	throughout.

From-SVN: r31093
1999-12-26 23:06:54 +00:00
Philippe De Muyter
6c9821b783 ansidecl.h: Define and test GCC_VERSION', not HAVE_GCC_VERSION'.
include:
        * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'.

gcc:
        * cppinit.c: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.

        * gansidecl.h: Likewise.

        * rtl.c: Likewise.

        * rtl.h: Likewise.

        * toplev.h: Likewise.

        * tree.c: Likewise.

        * tree.h: Likewise.

        * varray.c: Likewise.

        * varray.h: Likewise.

gcc/cp:
        * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.

gcc/f:
        * proj.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.

Co-Authored-By: Kaveh R. Ghazi <ghazi@caip.rutgers.edu>

From-SVN: r30477
1999-11-10 17:57:21 +00:00
Richard Henderson
49886fe1ce * rtl.c (read_rtx): Use fatal_with_file_and_line not fatal.
From-SVN: r30400
1999-11-04 13:35:22 -08:00
David Billinghurst
17074a35df rtl.c: Include toplev.h.
* rtl.c: Include toplev.h.
(fatal): Remove declaration.

From-SVN: r30398
1999-11-04 19:51:48 +00:00
Catherine Moore
b5ee778900 Makefile.in (genattrtab): Don't use (HOST_RTLANAL).
* Makefile.in (genattrtab): Don't use (HOST_RTLANAL).
        * rtl.h (rtx_equal_p): Move prototype.
        * rtl.c (rtx_equal_function_value_matters): Move from
        rtlanal.c
        (rtx_equal_p): Likewise.
        * rtlanal.c (rtx_equal_function_value_matters): Delete.
        (rtx_equal_p): Likewise.

From-SVN: r30350
1999-11-02 10:48:26 -05: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
Richard Henderson
aece2740ac genrecog.c (message_with_line): Prototype.
* genrecog.c (message_with_line): Prototype.
        (validate_pattern): Pass along the set for the dest, not a flag.
        Fix non-lvalue message.  Don't warn for VOIDmode SET_DEST of CALL.
        Check for PC/CC0 as sources.
        (nodes_identical): Check for children position match before
        allowing the combination.

        * rtl.c (read_rtx): Track line number across \\\n.

From-SVN: r30010
1999-10-14 23:56:28 -07:00
Richard Henderson
bcdaba58ff rtl.c (dump_and_abort): Remove.
* rtl.c (dump_and_abort): Remove.
        (fatal_with_file_and_line): New.
        (fatal_expected_char): New.
        (read_rtx_lineno, read_rtx_filename): New.
        (read_skip_spaces): Track line number.
        (read_name): Use fatal_with_file_and_line.
        (read_rtx): Use fatal_expected_char.  Track line number.
        * rtl.h (read_rtx_filename, read_rtx_lineno): Declare.

        * print-rtl.c (print_rtx): Don't special case LABEL_REF argument
        if it isn't a CODE_LABEL.

        * genattr.c (main): Set read_rtx_filename.
        * genattrtab.c (main): Likewise.
        * gencodes.c (main): Likewise.
        * genconfig.c (main): Likewise.
        * genemit.c (main): Likewise.
        * genextract.c (main): Likewise.
        * genflags.c (main): Likewise.
        * genopinit.c (main): Likewise.
        * genoutput.c (main): Likewise.
        * genpeep.c (main): Likewise.

        * genrecog.c (decision_test.u.insn): Add `lineno'.
        (pattern_lineno, error_count): New variables.
        (message_with_line): New.
        (add_to_sequence): Break out checking code to ...
        (validate_pattern): ... here.  Detect SET_DEST matching CONST_INT.
        (merge_insn): Use message_with_line.
        (make_insn_sequence): Use validate_pattern.  Record insn lineno.
        (main): Set read_rtx_filename, pattern_lineno.  Exit early on error.

From-SVN: r29957
1999-10-13 20:43:49 -07:00
Bernd Schmidt
e63db8f67d Bring copy_insn_1 and copy_rtx in sync and simplify them
From-SVN: r29902
1999-10-11 18:42:36 +00:00
Richard Henderson
c46a37c417 haifa-sched.c (sched_reg_n_calls_crossed): Delete.
* haifa-sched.c (sched_reg_n_calls_crossed): Delete.
        (sched_reg_live_length, sched_reg_basic_block): Delete.
        (current_block_num, bb_live_regs, old_live_regs): Delete.
        (dead_notes, struct sometimes): Delete.
        (sched_note_set, birthing_insn_p): Delete.
        (adjust_priority): Gut useless reg lifetime code.
        (create_reg_dead_note, attach_deaths): Delete.
        (attach_deaths_insn, new_sometimes_live): Delete.
        (finish_sometimes_live): Delete.
        (find_pre_sched_live, find_post_sched_live): Delete.
        (update_reg_usage): Delete.
        (find_insn_reg_weight): New, from corpse of find_pre_sched_live.
        (schedule_insns): Delete reg lifetime code.
        (sched_analyze): Use REG_SAVE_NOTE to stuff NOTE_INSN notes away.
        (unlink_other_notes): Adjust REG_NOTE commentary.
        (reemit_notes): Use REG_SAVE_NOTE.
        (schedule_block): Likewise.
        (schedule_region): Allocate bitmap of blocks in region.  Use
        count_or_remove_death_notes.  Use update_life_info.

        * rtl.h (REG_SAVE_NOTE): New.
        * rtl.c (reg_note_name): Update.

From-SVN: r29894
1999-10-10 16:45:27 -07:00
Kaveh R. Ghazi
b30bce6b52 ansidecl.h (HAVE_GCC_VERSION): New macro.
include:
	* ansidecl.h (HAVE_GCC_VERSION): New macro.  Use instead of
	explicitly testing __GNUC__ and __GNUC_MINOR__.

	(ATTRIBUTE_PRINTF): Use `__format__', not `format'.

gcc:
	* cppinit.c: Use HAVE_GCC_VERSION instead of explicitly testing
	__GNUC__ and __GNUC_MINOR__.

	* gansidecl.h: Likewise.

	* rtl.c: Likewise.

	* rtl.h: Likewise.

	* toplev.h: Likewise.

	* tree.c: Likewise.

	* tree.h: Likewise.

	* varray.c: Likewise.

	* varray.h: Likewise.

cp:
	* cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
	__GNUC__ and __GNUC_MINOR__.

f:
	* proj.h: Use HAVE_GCC_VERSION instead of explicitly testing
	__GNUC__ and __GNUC_MINOR__.  Don't define BUILT_WITH_270.
	Define macro UNUSED in terms of ATTRIBUTE_UNUSED.

From-SVN: r29890
1999-10-10 13:02:41 +00:00
Kaveh R. Ghazi
95d75019ff print-tree.c (print_node, indent_to): Remove redundant prototypes.
* print-tree.c (print_node, indent_to): Remove redundant prototypes.

	* profile.c (instrument_arcs, output_gcov_string,
	tablejump_entry_p): Add static prototypes.
	(output_gcov_string): Constify a char*.

	* regmove.c (replacement_quality, fixup_match_2): Add static
	prototypes.

	* resource.h (reg_dead_p): Add extern prototype.

	* rtl.c (trim_filename): Add static prototype.

	* scan-decls.c (skip_to_closing_brace): Likewise.

	* stmt.c (expand_decl_cleanup_no_eh): Hide definition.
	(expand_end_case): Initialize variable `range'.
	(emit_case_nodes): Remove unused prototype `rtx_fn'.

	* varasm.c (asm_emit_uninitialised): Add static prototype.
	(asm_emit_uninitialised, assemble_variable): Mark parameter with
	ATTRIBUTE_UNUSED.

From-SVN: r29784
1999-10-03 16:47:52 +00:00
Alexandre Oliva
c452dcde0a * rtl.c (obstack_alloc_rtx): Removed.
From-SVN: r29388
1999-09-14 02:31:19 +00:00
Richard Henderson
b6b4c6c6f9 gengenrtl.c (CONST_DOUBLE_FORMAT): Take the size REAL_ARITHMETIC will use into account.
* gengenrtl.c (CONST_DOUBLE_FORMAT): Take the size REAL_ARITHMETIC
        will use into account.  Expand the max width to 5.
        * rtl.c: Likewise.

From-SVN: r29216
1999-09-08 16:09:38 -07:00
Jeff Law
c5c7673583 Merge in gcc2-ss-010999
From-SVN: r29150
1999-09-06 23:49:18 -06:00
Richard Henderson
a3770a8130 Makefile.in (ggc-simple.o): Depend on varray.h.
* Makefile.in (ggc-simple.o): Depend on varray.h.
	(rtl.o): Depend on ggc.h.
	(genattrtab.o): Depend on ggc.h.
	(print-tree.o): Likewise.
	(fold-const.o): Likewise.
	* emit-rtl.c (sequence_element_free_list): Remove, and all references.
	(make_insn_raw): Don't cache insns when GC'ing.
	(emit_insn_before): Likewise.
	(emit_insn_after): Likewise.
	(emit_insn): Likewise.
	(start_sequence): Use xmalloc to allocate the sequence_stack.
	(end_sequence): Add free to free it.
	(gen_sequence): Don't cache insns when GC'ing.
	(clear_emit_caches): Don't use sequence_element_free_list.
	(init_emit): Use xcalloc, not xmalloc+bzero.
	* fold-const.c (size_int_wide): Kill the cache, when GC'ing.
	* function.c (pop_function_context_from): Use free to free the
	fixup_var_refs_queue.
	(put_reg_into_stack): Allocate it with xmalloc.
	* genattrtab.c: Include ggc.h.
	(operate_exp): Don't use obstack_free when GC'ing.
	(simplify_cond): Likewise.
	(simplify_text_exp): Likewise.
	(optimize_attrs): Likewise.
	* gengentrtl.c (gendef): Use ggc_alloc_rtx to allocate RTL, when
	GC'ing.
	(gencode): Generate a #include for ggc.h.
	* ggc-callbacks.c (ggc_p): Define it to zero.
	* ggc-none.c (ggc_p): Likewise.
	* ggc-simple.c: Include varray.h.
	(ggc_mark_tree_varray): New function.
	(ggc_add_tree_varray_root): Likewise.
	(ggc_mark_tree_varray_ptr): Likewise.
	* ggc.h (ggc_p): Declare.
	(varray_head_tag): Likewise.
	(ggc_add_tree_varray_root): Declare.
	* print-tree.c (print_node): Don't check for TREE_PERMANENT
	inconsistencies when GC'ing.
	* rtl.c: Include ggc.h.
	(rtvec_alloc): Use ggc_alloc_rtvec when GC'ing.
	(rtx_alloc): Use ggc_alloc_rtx when GC'ing.
	(rtx_free): Don't call obstack_free when GC'ing.
	* toplev.c (rest_of_compilation): Call ggc_collect after every
	pass, if GC'ing.
	* tree.c (push_obstacks): Do nothing, if GC'ing.
	(pop_obstacks_nochange): Likewise.
	(pop_obstacks): Likewise.
	(make_node): Use ggc_alloc_tree when GC'ing.
	(copy_node): Likewise.
	(get_identifier): Use ggc_alloc_string when GC'ing.
	(build_string): Likewise.
	(make_tree_vec): Use ggc_alloc_tree when GC'ing.
	(tree_cons): Likewise.
	(build1): Likewise.
	(type_hash_canon): Don't call obstack_free when GC'ing.

Co-Authored-By: Bernd Schmidt <bernds@cygnus.co.uk>
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r29125
1999-09-05 16:08:20 +00:00
Richard Henderson
83ab38394c flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
        (recompute_reg_usage): Likewise.
        * rtlanal.c (find_regno_fusage): Likewise.

        * rtl.c (rtl_check_failed_code1): New function.
        (rtl_check_failed_code2): New.
        * rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
        (RTL_CHECKC1, RTL_CHECKC2): New.
        (XC*): New accessor macros.
        (NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
        (ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
        (CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
        (ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
        (TRAP_*, RANGE_INFO_*): Likewise.

From-SVN: r29089
1999-09-03 15:23:11 -07:00
Zack Weinberg
ef178af3a4 rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>

	* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
	bounds- check RTL accesses if --enable-checking.
	(RTVEC_ELT): Bounds check if --enable-checking.
	(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
	XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
	(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
	GET_NUM_ELEM.
	(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
	X0BBDEF, X0ADVFLAGS):  New macros for accessing '0' slots of RTXes.

	(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
	(NOTE_SOURCE_FILE): Use X0STR.
	(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
	MEM_ALIAS_SET): Use X0INT.
	(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
	JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
	Use X0EXP.
	* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
	* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
	(rtl_check_failed_bounds, rtl_check_failed_type1,
	rtl_check_failed_type2, rtvec_check_failed_bounds): New
	functions.
	(fancy_abort): Fix comment.

	* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
	(cse_insn): Decrement LABEL_NUSES for jump target before
	deleting jump insn.
	* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
	* final.c (alter_subreg): Compute regno before changing x to
	REG; set REGNO(x) after changing it.
	* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
	notes containing CONST_INTs.
	(delete_eh_regions): Use NOTE_EH_HANDLER.
	* function.c (put_reg_into_stack): Make reg a MEM before
	initializing it.
	(fixup_var_refs_insns):  Save REG_NOTES (insn) in case we
	delete insn.
	(gen_mem_addressof): Make reg a MEM before initializing it.
	* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
	X0WINT.
	* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
	deleting an insn, not after.
	(block_alloc): Only look at PATTERN(insn) if we have to, and
	only if it's format class 'i'.
	* loop.c (check_dbra_loop): Check bl->biv->add_val is a
	CONST_INT before using its INTVAL.
	* print-rtl.c (print_rtx): Use X0STR.
	* regmove.c (fixup_match_1): Don't look at PATTERN of
	non-class-'i' insn chain elements.
	* reload.c (loc_mentioned_in_p): Take address of
	in->fld[1].rtx directly.
	* reload1.c (reload): Change reg to a MEM before initializing
	it.
	* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
	have no names.
	* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.

From-SVN: r29008
1999-08-31 19:39:10 +00:00
Zack Weinberg
aa0b446591 rtl.c: Define CONST_DOUBLE_FORMAT to the appropriate format for a CONST_DOUBLE...
1999-08-27 13:27 -0700  Zack Weinberg  <zack@bitmover.com>

	* rtl.c: Define CONST_DOUBLE_FORMAT to the appropriate format
	for a CONST_DOUBLE, at compile time.  Initialize rtx_length
	and class_narrowest_mode at compile time.  Kill init_rtl.
	Mark rtx_length, mode_class, mode_size, mode_unit_size,
	mode_wider_mode, mode_mask_array, class_narrowest_mode, and
	rtx_format as const.  Kill all references to EXTRA_CC_MODES or
	EXTRA_CC_NAMES.
	* rtl.def (CONST_DOUBLE): Use CONST_DOUBLE_FORMAT macro for
	format.
	* rtl.h: Declare rtx_length and rtx_format as const.
	* machmode.def: Define CC().  Use CC() to define CCmode.  If
	EXTRA_CC_MODES is defined, expand it here.
	* machmode.h: Declare mode_class, mode_size, mode_unit_size,
	mode_wider_mode, mode_mask_array, and class_narrowest_mode as
	const.  Kill all references to EXTRA_CC_MODES.

	* toplev.c: Don't prototype or call init_rtl.
	* optabs.c: Don't call init_mov_optab.
	* genemit.c: Don't generate init_mov_optab.  Don't call
	init_rtl.
	* gengenrtl.c: Duplicate calculation of CONST_DOUBLE_FORMAT
	here.
	* genattr.c, genattrtab.c, gencodes.c, genconfig.c,
	genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c,
	genrecog.c: Don't call init_rtl.

	* arc.h, arm.h, c4x.h, i386.h, i960.h, m88k.h, pa.h, pdp11.h,
	rs6000.h, sparc.h: Don't define EXTRA_CC_NAMES.  Use CC() in
	definition of EXTRA_CC_MODES.

	* md.texi: Kill ref to EXTRA_CC_NAMES.
	* tm.texi: Document new way to define EXTRA_CC_MODES.

	* genrecog.c: Do not look up the name of a define_split.
	(Unrelated bugfix.)

From-SVN: r28937
1999-08-27 20:37:06 +00:00
Zack Weinberg
987009bf0d system.h: Don't redefine abort or trim_filename.
1999-08-25 22:10 -0700  Zack Weinberg  <zack@bitmover.com>

	* system.h: Don't redefine abort or trim_filename.
	* rtl.h: Define abort to fancy_abort (__FILE__, __LINE__, 0)
	or fancy_abort (__FILE__, __LINE__, __FUNCTION__) depending on
	whether or not __FUNCTION__ is available.
	* tree.h: Duplicate rtl.h's definition of abort, for files
	that don't include rtl.h.  Delete all code to perform type
	checking with a compiler other than GCC.
	* varray.h: Delete all code to perform type checking with a
	compiler other than GCC.  Make VARRAY_CHECK() always evaluate
	its arguments exactly once, using a statement expression.
	Adjust the VARRAY_<type> accessor macros to match.
	* toplev.h (fatal_insn, fatal_insn_not_found): Kill.
	(_fatal_insn, _fatal_insn_not_found): New fns, take info on
	caller's location.  Define fatal_insn and fatal_insn_not_found
	as macros that use _fatal_insn and _fatal_insn_not_found.
	(fancy_abort, trim_filename): Kill prototypes.

	* rtl.c (trim_filename): Move here from toplev.c.
	(fancy_abort): New function.
	(DIR_SEPARATOR): Provide default definition.
	* tree.c (tree_check_failed, tree_class_check_failed): Go
	through fancy_abort.
	(tree_check, tree_class_check, cst_or_constructor_check,
	expr_check): Delete.
	* varray.c (varray_check_failed): New function.
	* toplev.c (fatal_insn, fatal_insn_not_found): Replace with
	_fatal_insn and _fatal_insn_not_found.  Go through
	fancy_abort.
	(trim_filename, fancy_abort): Delete.

	* builtins.c (expand_builtin_args_info): Report ICE with abort.
	* except.c (start_catch_handler): Report ICE with error/abort
	combo.
	* final.c (output_operand_lossage): Likewise.
	* flow.c (verify_flow_info): Likewise.

	* gcc.c: Prototype fatal.
	* gengenrtl.c: Undef abort after including rtl.h not system.h.
	* genattr.c, genattrtab.c, genemit.c, genextract.c,
	genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c:
	Don't define fancy_abort.

From-SVN: r28889
1999-08-26 05:18:44 +00:00