Commit Graph

73 Commits

Author SHA1 Message Date
Kazu Hirata 14b493d64d regmove.c: Fix comment typos.
* regmove.c: Fix comment typos.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* resource.c: Likewise.
	* rtl.def: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-rgn.c: Likewise.
	* sibcall.c: Likewise.
	* simplify-rtx.c: Likewise.
	* ssa-ccp.c: Likewise.
	* ssa.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* system.h: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* tree-inline.c: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* unroll.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r60473
2002-12-24 08:30:34 +00:00
Kazu Hirata 991b659243 builtins.def: Fix comment formatting.
* builtins.def: Fix comment formatting.
	* c-common.def: Likewise.
	* cfgcleanup.c: Likewise.
	* combine.c: Likewise.
	* gengtype.c: Likewise.
	* params.def: Likewise.
	* predict.def: Likewise.
	* rtl.def: Likewise.
	* stab.def: Likewise.
	* stor-layout.c: Likewise.
	* tree.def: Likewise.
	* config/darwin.c: Likewise.
	* config/darwin.h: Likewise.
	* config/dbxcoff.h: Likewise.
	* config/elfos.h: Likewise.
	* config/fp-bit.c: Likewise.
	* config/freebsd-spec.h: Likewise.
	* config/interix.h: Likewise.
	* config/libgloss.h: Likewise.
	* config/linux-aout.h: Likewise.
	* config/linux.h: Likewise.
	* config/lynx-ng.h: Likewise.
	* config/lynx.h: Likewise.
	* config/netbsd-aout.h: Likewise.
	* config/netbsd.h: Likewise.
	* config/netware.h: Likewise.
	* config/psos.h: Likewise.
	* config/ptx4.h: Likewise.

From-SVN: r57624
2002-09-29 13:16:44 +00:00
Kazu Hirata 0e9e1e0a42 LANGUAGES: Follow spelling conventions.
* LANGUAGES: Follow spelling conventions.
	* rtl.def: Likewise.
	* sbitmap.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* sibcall.c: Likewise.
	* simplify-rtx.c: Likewise.
	* ssa.c: Likewise.
	* stab.def: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* target.h: Likewise.
	* timevar.c: Likewise.
	* toplev.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-inline.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* unroll.c: Likewise.
	* varasm.c: Likewise.
	* vmsdbgout.c: Likewise.
	* treelang/treelang.texi: Likewise.
	* treelang/treetree.c: Likewise.

From-SVN: r57587
2002-09-27 12:48:07 +00:00
Richard Henderson d1f1cc6a0f ggc-page.c (RTL_SIZE): New.
* ggc-page.c (RTL_SIZE): New.
        (extra_order_size_table): Add specializations for 2 and 10 rtl slots.
        * rtl.def (BARRIER, NOTE): Pad to 9 slots.

From-SVN: r56337
2002-08-14 18:03:43 -07:00
Zack Weinberg 0dc36574af rtl.def (CODE_LABEL): Remove slot 8.
* rtl.def (CODE_LABEL): Remove slot 8.
	* rtl.h (struct rtx_def): Document new uses of jump and call fields.
	(LABEL_ALTERNATE_NAME): Delete.
	(LABEL_KIND, SET_LABEL_KIND, LABEL_ALT_ENTRY_P): New.
	* defaults.h: Remove default for ASM_OUTPUT_ALTERNATE_LABEL_NAME.

	* final.c (output_alternate_entry_point): New.
	(final_scan_insn): Use it instead of
	ASM_OUTPUT_ALTERNATE_LABEL_NAME.  Do not consider possibility
	of a case label being an alternate entry point.

	* cfgbuild.c (make_edges, find_bb_boundaries): Use LABEL_ALT_ENTRY_P.
	* emit-rtl.c (gen_label_rtx): Adjust call to gen_rtx_CODE_LABEL.
	Do not clear LABEL_NUSES (unnecessary) or LABEL_ALTERNATE_NAME
	(field deleted).
	* print-rtl.c, ra-debug.c: Update code to output CODE_LABELs.

	* doc/rtl.texi: Document LABEL_KIND, SET_LABEL_KIND, and
	LABEL_ALT_ENTRY_P; not LABEL_ALTERNATE_NAME.
	* doc/tm.texi: Delete documentation of
	ASM_OUTPUT_ALTERNATE_LABEL_NAME.

From-SVN: r55597
2002-07-19 23:11:19 +00:00
Vladimir Makarov e3c8eb86d1 rtl.def (DEFINE_AUTOMATON): Add description of new options `time' and `v'.
2002-06-18  Vladimir Makarov  <vmakarov@redhat.com>

	* rtl.def (DEFINE_AUTOMATON): Add description of new options
	`time' and `v'.  Fix incorrect description of option `w'.

	* doc/md.texi: Ditto.

	* genautomata.c (TIME_OPTION, V_OPTION): New macros.
	(gen_automata_option): Process the new options.
	(transform_2, transform_3): Initialize some variables.
	(initiate_automaton_gen): Use the new macros.

From-SVN: r54748
2002-06-18 16:18:23 +00:00
Jan Hubicka ba4f7968b5 loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.


	* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
	(set_block_for_insn): Turn into macro.
	* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
	* cfglayout.c (insn_scopes): Kill.
	(scope_to_insns_initialize): Do not use insn_scopes.
	(scope_to_insns_finalize): Likewise.
	(duplicate_insn_chain): Likewise.
	(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
	* cfgrtl.c (basic_block_for_insn): Kill.
	(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
	(create_basic_block_structure): Use reorder_insns.
	(compute_bb_for_insn): Do not use basic_block_for_insn.
	(merge_blocks_nomove): Likewise.
	(update_bb_for_insn): Likewise.
	(verify_flow_info): Likewise.
	(set_block_for_insn): Kill.
	* combine.c (try_combine): Update gen_rtx_INSN call.
	* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
	(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
	scopes and BBs.
	(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
	(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
	Clear BB.
	(emit_insns_after): Simplify.
	(emit_copy_of_insn_after): Copy scope.
	* final.c (final_start_function): Lower scopes.
	* flow.c (check_function_return_warnings): Do not rely on deleted insn.
	* integrate.c (copy_insn_list): Cope scopes.
	* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
	* loop.c (loop_optimize): Do not care block notes.
	* print-rtl.c (print_rtx): Print BB.
	* recog.c (apply_change_group): Simplify.
	* rtl.c (copy_rtx): Handle 'B'.
	* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
	* rtl.h (Field accessors): Update indexes.
	* sched-ebb.c (schedule_ebbs): Do not lower notes.
	* sched-rgn.c (schedule_insns): Likewise.
	* toplev.c (rest_of_compilation): Lower notes.
	* unroll.c (unroll_loop): Do not care scoping notes.
	(copy_loop_body): Copy scopes.

From-SVN: r54188
2002-06-02 21:09:54 +00:00
Vladimir Makarov fae15c9379 2002-04-29 Vladimir Makarov <vmakarov@redhat.com>
Merging code from dfa-branch:

From-SVN: r52915
2002-04-29 22:34:36 +00: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
Turly O'Connor 37bef19770 tm.texi (ASM_OUTPUT_OPERAND): Change documentation references to "recog_operand" to "recog_data.operand".
* tm.texi (ASM_OUTPUT_OPERAND): Change documentation references to
	"recog_operand" to "recog_data.operand".
	* rtl.def: Likewise.

From-SVN: r48202
2001-12-20 14:39:53 +00: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
Alan Matsuoka 04d8aa70d5 rtl.def (INCLUDE): Define.
2001-11-05  Alan Matsuoka  <alanm@redhat.com>

	* rtl.def (INCLUDE) : Define.
	* gensupport.c  (init_include_reader, process_include,
	save_string) :  New functions to implement an include facility
	in .md files.
	* gensupport.h : Add prototype for init_md_reader_args.  *
	genattr.c genattrtab.c gencodes.c genconfig.c genemit.c
	genextract.c genflags.c genopinit.c genoutput.c
	genpeep.c genrecog.c: Change call to init_md_reader to
	init_md_reader_args.
	* md.texi: Document (include "path") and -I directives for RTL
	generation tools.

From-SVN: r47020
2001-11-14 20:17:08 +00: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
Richard Kenner a0fd557a09 * rtl.def (MEM): Remove obsolete part of comment.
From-SVN: r45762
2001-09-23 18:37:05 -04:00
Vladimir Makarov b8ec576419 rtl.def: Undo my patch commited 2001-08-27.
2001-08-30  Vladimir Makarov  <vmakarov@redhat.com>

	* rtl.def: Undo my patch commited 2001-08-27.

	* genattrtab.c: Ditto.

	* rtl.h: Ditto.

	* sched-int.h: Ditto.

	* target-def.h: Ditto.

	* target.h: Ditto.

	* haifa-sched.c: Ditto.

	* sched-rgn.c: Ditto.

	* sched-vis.c: Ditto.

	* Makefile.in: Ditto.

	* doc/md.texi: Ditto.

	* doc/tm.texi: Ditto.

	* doc/contrib.texi: Ditto.

	* doc/gcc.texi: Ditto.

	* genattrtab.h: Remove it.

	* genautomata.c: Remove it.

	* genattr.c: Undo my patch and Richard Henderson's patch commited
	2001-08-27.

From-SVN: r45297
2001-08-30 20:44:51 +00:00
Vladimir Makarov acd7baf729 rtl.def (DEFINE_CPU_UNIT, [...]): New RTL constructions.
2001-08-27  Vladimir Makarov  <vmakarov@touchme.toronto.redhat.com>

        * rtl.def (DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT, EXCLUSION_SET,
	PRESENCE_SET, ABSENCE_SET, DEFINE_BYPASS, DEFINE_AUTOMATON,
	AUTOMATA_OPTION, DEFINE_RESERVATION, DEFINE_INSN_RESERVATION): New
	RTL constructions.

	* genattr.c (main): New variable num_insn_reservations.  Increase
	it if there is DEFINE_INSN_RESERVATION.  Output automaton based
	pipeline hazard recognizer interface.

	* genattrtab.h: New file.

	* genattrtab.c: Include genattrtab.h.
	(attr_printf, check_attr_test, make_internal_attr,
	make_numeric_value): Move protypes into genattrtab.h.  Define them
	as external.
	(num_dfa_decls): New global variable.
	(main): Process DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT,
	DEFINE_BYPASS, EXCLUSION_SET, PRESENCE_SET, ABSENCE_SET,
	DEFINE_AUTOMATON, AUTOMATA_OPTION, DEFINE_RESERVATION,
	DEFINE_INSN_RESERVATION.  Call expand_automata and write_automata.

	* genautomata.c: New file.

	* rtl.h (LINK_COST_ZERO, LINK_COST_FREE): Remove them.

        * sched-int.h: (curr_state): Add the external definition for
	automaton pipeline interface.
	(haifa_insn_data): Add comments for members blockage and units.

	* target-def.h (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE,
	TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD,
	TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): New
	macros.
	(TARGET_SCHED): Use the new macros.

	* target.h (use_dfa_pipeline_interface, init_dfa_pre_cycle_insn,
	dfa_pre_cycle_insn, init_dfa_post_cycle_insn, dfa_post_cycle_insn,
	first_cycle_multipass_dfa_lookahead, init_dfa_bubbles,
	dfa_bubble): New members in gcc_target.sched.

        * haifa-sched.c (insert_schedule_bubbles_p): New variable.
	(MAX_INSN_QUEUE_INDEX): New macro for automaton interface.
	(insn_queue): Redefine it as pointer to array.
	(NEXT_Q, NEXT_Q_AFTER): Use MAX_INSN_QUEUE_INDEX instead of
	INSN_QUEUE_SIZE.
	(max_insn_queue_index_macro_value): New variable.
	(curr_state, dfa_state_size, ready_try): New varaibles for
	automaton interface.
	(ready_element, ready_remove, max_issue): New function prototypes
	for automaton interface.
	(choose_ready): New function prototype.
	(insn_unit, blockage_range): Add comments.
	(unit_last_insn, unit_tick, unit_n_insns): Define them for case
	FUNCTION_UNITS_SIZE == 0.
	(insn_issue_delay, actual_hazard_this_instance, schedule_unit,
	actual_hazard, potential_hazard): Add comments.
	(insn_cost): Use cost -1 as undefined value.  Remove
	LINK_COST_ZERO and LINK_COST_FREE.  Add new code for automaton
	pipeline interface.
	(ready_element, ready_remove): New functions for automaton
	interface.
	(schedule_insn): Add new code for automaton pipeline interface.
	(queue_to_ready): Add new code for automaton pipeline interface.
	Use MAX_INSN_QUEUE_INDEX instead of INSN_QUEUE_SIZE.
	(debug_ready_list): Print newline when the queue is empty.
	(max_issue): New function for automaton pipeline interface.
	(choose_ready): New function.
	(schedule_block): Add new code for automaton pipeline interface.
	Print ready list before scheduling each insn.
	(sched_init): Add new code for automaton pipeline interface.
	Initiate insn cost by -1.
	(sched_finish): Free the current automaton state and finalize
	automaton pipeline interface.

	* sched-rgn.c: Include target.h.
	(init_ready_list, new_ready, debug_dependencies): Add new code for
	automaton pipeline interface.

	* sched-vis.c: Include target.h.
	(get_visual_tbl_length): Add code for automaton interface.
	(target_units, print_block_visualization):  Add comments.

        * Makefile.in (GETRUNTIME, HASHTAB, HOST_GETRUNTIME, HOST_HASHTAB,
	USE_HOST_GETRUNTIME, USE_HOST_HASHTAB, HOST_VARRAY): New variables.
	(sched-rgn.o, sched-vis.o): Add new dependency file target.h.
	(getruntime.o, genautomata.o): New entries.
	(genattrtab.o): Add new dependency file genattrtab.h.
	(genattrtab): Add new dependencies.  Link it with `libm.a'.
	(getruntime.o, hashtab.o): New entries for canadian cross.

	* doc/md.texi: Description of automaton based model.

	* doc/tm.texi (TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_ADJUST_COST):
	Add comments.
	(TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE,
	TARGET_SCHED_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD,
	TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): The new
	hook descriptions.
	(TRADITIONAL_PIPELINE_INTERFACE, DFA_PIPELINE_INTERFACE,
	MAX_DFA_ISSUE_RATE): New macro descriptions.

	* doc/contrib.texi: Add dfa based scheduler contribution.

	* doc/gcc.texi: Add more information about genattrtab.

From-SVN: r45202
2001-08-27 18:13:42 +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 1f3b37a3d5 rtl.def (DEFINE_INSN, [...]): Change output-template slot to format 'T'.
* rtl.def (DEFINE_INSN, DEFINE_INSN_AND_SPLIT, DEFINE_PEEPHOLE):
	Change output-template slot to format 'T'.
	* rtl.h (XTMPL): New.
	* read-rtl.c (read_escape): New function.
	(read_quoted_string, read_braced_string): Use it.
	(read_rtx): Set star_if_braced from the format string.
	Use XTMPL where appropriate.
	* genoutput.c (gen_insn, gen_peephole): Use XTMPL to get the
	template string.

	* rtl.c: Include errors.h for sake of rtl_check_failed* routines.
	Document 'T' in rtx format strings.
	* Makefile.in (rtl.o, $(HOST_PREFIX_1)rtl.o): Depend on errors.h.
	* errors.c (internal_error): Add missing ": " at end of string.

	* i860.md: Change triple backslashes to double backslashes at
	ends of lines in output templates.

From-SVN: r43665
2001-06-30 17:23:53 +00:00
Richard Henderson 52a11cbfcf IA-64 ABI Exception Handling.
From-SVN: r40924
2001-03-28 03:04:51 -08:00
Bernd Schmidt 08394eefae Introduce ORIGINAL_REGNO macro
From-SVN: r38546
2000-12-29 17:35:57 +00:00
Richard Henderson 4b983fdc50 cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY.
* cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY.
	(cse_insn): Likewise.
	(addr_affects_sp_p): Likewise.
	* expr.c (move_by_pieces): Likewise.
	(clear_by_pieces): Likewise.
	* gcse.c (oprs_unchanged_p): Likewise.
	* haifa-sched.c (sched_analyze_2): Likewise.
	* recog.c (offsettable_address_p): Likewise.
	* regclass.c (record_address_regs): Likewise.
	* reload.c (find_reusable_reload): Likewise.
	(push_reload): Likewise.
	(operands_match_p): Likewise.
	(decompose): Likewise.
	(find_reloads_address_1): Likewise.
	(find_inc_amount): Likewise.
	* reload1.c (elimination_effects): Likewise.
	* resource.c (mark_set_resources): Likewise.
	* flow.c (attempt_auto_inc): New function; mostly broken out
	of find_auto_inc.
	(find_auto_inc): Split into two functions and enhanced to
	generate POST_MODIFY.
	* rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment.
	* rtl.h (count_all_occurrences):  Declare.
	(HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not
	defined.
	* rtlanal.c (count_all_occurrences): New function.
	* tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP,
	HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document.

	* config/ia64/ia64-protos.h (destination_operand): Declare.
	* config/ia64/ia64.c (destination_operand): New function.
	(ia64_print_operand): Handle POST_MODIFY.
	(rtx_needs_barrier): Likewise.
	* config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1.
	(HAVE_POST_MODIFY_REG): Define to 1.
	(MAX_REGS_PER_ADDRESS): Change to 2.
	(GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too.
	(LEGITIMATE_ADDRESS_REG): New helper macro.
	(LEGITIMATE_ADDRESS_DISP): Likewise.
	(PREDICATE_CODES): Add entry for destination_operand.
	* config/ia64/ia64.md (all mov patterns): Use destination_operand
	predicate for operand 0.

From-SVN: r35321
2000-07-28 10:46:18 -07:00
Bernd Schmidt f9f27ee563 Vector support: rtx and mode definitions
From-SVN: r34677
2000-06-24 11:12:58 +00: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 f5540cd4aa flow.c (commit_one_edge_insertion): Be prepared for a return insn to be inserted on the edge with a normal jump.
* flow.c (commit_one_edge_insertion): Be prepared for a return
        insn to be inserted on the edge with a normal jump.
        * jump.c (jump_optimize_1): Don't look to create return isns.

        * flow.c (flow_delete_insn): Don't adjust reference count of notes.
        * jump.c (jump_optimize_1): Likewise.
        (returnjump_p): Verify the argument is a JUMP_INSN.
        * rtl.def (NOTE): Add 5th element for NOTE_INSN_DELETED_LABEL.

From-SVN: r33950
2000-05-16 18:44:03 -07:00
Richard Henderson be1bb65263 Makefile.in (final.o): Depend on BASIC_BLOCK_H.
* Makefile.in (final.o): Depend on BASIC_BLOCK_H.
	* final.c (final_end_function): Use app_disable.  Rearrange note
	handling into a switch.  Emit deleted labels.
	(output_asm_label): Generate label strings for deleted labels.
	* flow.c (tail_recursion_label_list): New.
	(find_basic_blocks_1): Set label_value_list directly.  Collect list
	of tail recursion labels from call_placeholders.  Don't add deleted
	labels to the label value list.
	(cleanup_cfg): Use free_EXPR_LIST_list.
	(flow_delete_insn_chain): Turn non-removable labels into notes.
	(flow_delete_block): Don't disable deleting the block because of
	a non-removable label.
	(tail_recursion_label_p): New.
	(merge_blocks_move_predecessor_nojumps): Don't disable the merge
	because of a label.
	(merge_blocks_move_successor_nojumps): Likewise.  Also move a
	jump table.
	(merge_blocks): Disable a merge because of tail recursion labels.
	* ifcvt.c (merge_if_block): Don't disable a merge because of a label.
	Use a more accurate measure of not merging the join block.
	(find_if_block): Don't disable conversion because of a label.
	(find_if_case_1, find_if_case_2): Likewise.
	* jump.c (duplicate_loop_exit_test): Preserve the kind of list
	element when copying.
	(squeeze_notes): Also leave EH notes.
	(mark_jump_label): Ignore deleted labels.  Use an INSN_LIST for
	REG_LABEL notes.
	(delete_insn): Preserve LABEL_NAME in NOTE_SOURCE_FILE when
	deleting a label.
	* print-rtl.c (print_rtx): Print NOTE_SOURCE_FILE for
	NOTE_INSN_DELETED_LABEL.  Print `[# deleted]' for a label_ref
	referring to a deleted label.  Convert tail handling to a switch.
	* rtl.def (CODE_LABEL): Rearrange elements to be compatible with NOTE
	for NOTE_INSN_DELETED_LABEL.
	(NOTE): Fix commentary.
	* rtl.h (REG_LABEL): Update commentary wrt INSN_LIST.
	(REG_CC_SETTER, REG_CC_USER, REG_LIBCALL): Likewise.
	(CODE_LABEL_NUMBER, LABEL_NAME): Update index.
	(LABEL_NUSES, LABEL_REFS): Likewise.
	* unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABEL.

From-SVN: r33876
2000-05-12 09:26:15 -07:00
John Wehle 6b29b0e2bf rtl.def (COND_EXEC): Clarify.
* rtl.def (COND_EXEC): Clarify.

	* i386.md (extendsidi2): Clobber (reg:CC 17) in the
	same fashion as zero_extendsidi2.

From-SVN: r33756
2000-05-07 05:09:46 +00:00
Richard Henderson 3262c1f552 rtl.def (DEFINE_COND_EXEC): New.
* rtl.def (DEFINE_COND_EXEC): New.
	* md.texi: Document it.

	* gensupport.c (input_file): Remove.
	(struct queue_elem): Add lineno.
	(rtx_ready_queue): Remove.
	(errors): New.
	(predicable_default): New.
	(predicable_true, predicable_false): New.
	(define_attr_queue, define_attr_tail): New.
	(define_insn_queue, define_insn_tail): New.
	(define_cond_exec_queue, define_cond_exec_tail): New.
	(other_queue, other_tail): New.
	(queue_pattern): New.
	(process_rtx): Add patterns to the appropriate queues.
	(is_predicable, identify_predicable_attribute): New.
	(n_alternatives, collect_insn_data): New.
	(alter_predicate_for_insn, alter_test_for_insn): New.
	(shift_output_template, alter_output_for_insn): New.
	(process_one_cond_exec, process_define_cond_exec): New.
	(init_md_reader): Read the entire file.  Process define_cond_exec.
	(read_md_rtx): Return elements from the queues.

From-SVN: r33751
2000-05-06 17:48:53 -07:00
Clinton Popetz c88c0d42a1 gensupport.c: New file.
* gensupport.c: New file.
	* gensupport.h: New file.
	* Makefile.in (HOST_RTL): Depend on gensupport.
	(gensupport.o) New rule.
	* genattr.c: Use gensupport for reading .md files.
	* genattrtab.c: Ditto.
	* gencodes.c: Ditto.
	* genconfig.c: Ditto.
	* genemit.c: Ditto.
	* genextract.c: Ditto.
	* genflags.c: Ditto.
	* genopinit.c: Ditto.
	* genoutput.c: Ditto.
	* genpeep.c: Ditto.
	* genrecog.c: Ditto.
	* rtl.def (define_insn_and_split): New DEF_RTL_EXPR.
	* md.texi (Insn Splitting): Document define_insn_and_split.

From-SVN: r33633
2000-05-03 13:45:26 -04: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
Nathan Sidwell 4b7ee6157a rtl.def (ASHIFT, [...]): Recomment.
* rtl.def (ASHIFT, ROTATE, ASHIFTRT, LSHIFTRT, ROTATERT):
	Recomment.
	* tree.def (LSHIFT_EXPR, RSHIFT_EXPR): Recomment.

From-SVN: r33060
2000-04-10 16:18:21 +00:00
Richard Henderson 0c99ec5c42 rtl.def (COND_EXEC): New.
* rtl.def (COND_EXEC): New.
        * rtl.h (COND_EXEC_TEST, COND_EXEC_CODE): New.
        * tm.texi (MAX_CONDITIONAL_EXECUTE): Document.

        * genconfig.c (have_cond_arith_flag): Remove.
        (have_cond_exec_flag): New.
        (walk_insn_part): Detect COND_EXEC, not arithmetic in IF_THEN_ELSE.
        (main): Print HAVE_conditional_execution.

        * haifa-sched.c (haifa_classify_insn): Recognize COND_EXEC.
        (sched_analyze_insn, print_pattern): Likewise.
        * reload.c (find_equiv_reg): Likewise.
        * rtlanal.c (reg_referenced_p): Likewise.
        (note_stores, dead_or_set_regno_p): Likewise.
        (reg_overlap_mentioned_p): Rewrite to use a switch.

From-SVN: r32997
2000-04-07 02:24:45 -07: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
Bernd Schmidt eab5c70a03 Add cselib; use it in loop and reload_cse_regs
From-SVN: r32538
2000-03-14 18:36:18 +00:00
Alex Samuel d9d4fb433e Changes in include:
* partition.h: New file.

Changes in libiberty:

	* Makefile.in (CFILES): Add partition.c.
	(REQUIRED_OFILES): Add partition.o.
	(partition.o): New rule.
	* partition.c: New file.

Changes in gcc:

	* Makefile.in (ssa.o): New rule.
	(OBJS): Add ssa.o.
	(STAGESTUFF): Add *.ssa and *.ussa.
	(mostlyclean): Delete *.ssa, *.ussa, */*.ssa, */*.ussa.
	* rtl.def (PHI): New RTL expression.
	* rtl.h (clear_log_links): New declaration.
	(convert_to_ssa): Likewise.
	(convert_from_ssa): Likewise.
	* flow.c (split_edge): If the entry node falls through to the
	split edge's source block, split the entry edge.
	(clear_log_links): New function.
	* toplev.c (ssa_dump): New variable.
	(flag_ssa): Likewise.
	(f_options): Add "ssa".
	(compile_file): Create SSA dump files.
	(rest_of_compilation): Go to and from SSA if enabled.
	(decide_d_option): Handle -de for SSA dump files.
	* ssa.c: New file.

From-SVN: r32465
2000-03-10 08:16:55 +00:00
Richard Henderson 7913f3d028 tree.def (UNNE_EXPR): Remove.
* tree.def (UNNE_EXPR): Remove.
        * c-typeck.c (build_binary_op): Don't handle it.
        * expr.c (expand_expr, do_jump, do_store_flag): Likewise.
        * cp/typeck.c (build_binary_op_nodefault): Likewise.

        * rtl.def (UNNE): Remove.
        (LTGT): Add.
        * jump.c (reverse_condition): Update accordingly.
        (swap_condition): Likewise.
        (comparison_dominates_p): Handle unordered comparisons.
        (reverse_condition_maybe_unordered): New.
        * rtl.h (reverse_condition_maybe_unordered): Declare.

        * sparc.c (select_cc_mode): Update for UNNE/LTGT.
        (output_cbranch): Use reverse_condition_maybe_unordered and LTGT.
        * sparc.h (REVERSIBLE_CC_MODE): Always true.  Update docs.
        * sparc.md (bltgt): New.

From-SVN: r31624
2000-01-25 18:06:21 -08:00
Richard Henderson 1eb8759b1b rtl.def: Add unordered fp comparisions.
* rtl.def: Add unordered fp comparisions.
        * tree.def: Likewise.
	* tree.h: Add ISO C 9x unordered fp comparision builtins.

	* builtins.c (expand_tree_builtin): New function.
	* c-typeck.c (build_function_call): Use it.
	(build_binary_op): Support unordered compares.
	* c-common.c (c_common_nodes_and_builtins): Add unordered compares.

	* combine.c (known_cond): Handle reverse_condition returning UNKNOWN.
	(reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed.
	* cse.c (fold_rtx): Check FLOAT_MODE_P before reversing.
	(record_jump_equiv): Handle reverse_condition returning UNKNOWN.
	* jump.c (reverse_condition): Don't abort for UNLE etc, but
	return UNKNOWN.
	(swap_condition): Handle unordered compares.
	(thread_jumps): Check can_reverse before reversing.
	* loop.c (get_condition): Likewise.  Allow UNORERED/ORDERED to be
	reversed for FP.

	* optabs.c (can_compare_p): New argument CODE.  Verify branch or
	setcc is present before acking for cmp_optab.  Update all callers.
	(prepare_float_lib_cmp, init_optabs): Handle UNORDERED.
	* expmed.c (do_cmp_and_jump): Update for can_compare_p.
	* expr.c (expand_expr): Likewise.  Support unordered compares.
	(do_jump, do_store_flag): Likewise.
	* expr.h (enum libfunc_index): Add unordered compares.

	* Makefile.in (FPBIT_FUNCS): Add _unord_sf.
	(DPBIT_FUNCS): Add _unord_df.
	* config/fp-bit.c (_unord_f2): New.
	* fp-test.c (main): Try unordered compare builtins.

	* alpha-protos.h (alpha_fp_comparison_operator): Declare.
	* alpha.c (alpha_comparison_operator): Check mode properly.
	(alpha_swapped_comparison_operator): Likewise.
	(signed_comparison_operator): Likewise.
	(alpha_fp_comparison_operator): New.
	(alpha_emit_conditional_branch): Handle unordered compares.
	* alpha.h (PREDICATE_CODES): Update.
	* alpha.md (fp compares): Use alpha_fp_comparison_operator.
	(bunordered, bordered): New.

	* cp/call.c (build_over_call): Use expand_tree_builtin.
	* cp/typeck.c (build_function_call_real): Likewise.
	(build_binary_op_nodefault): Handle unordered compares.

	* gcc.c-torture/execute/ieee/fp-cmp-4.c: New.

From-SVN: r31591
2000-01-24 12:10:04 -08:00
Catherine Moore 8cd0faaf32 defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Provide default.
* defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Provide default.
        * emit-rtl.c (gen_label_rtx): Support LABEL_ALTERNATE_NAME.
        * final.c (final_scan_insn): Emit LABEL_ALTERNATE_NAME.
        * ggc-common.c (ggc_mark_rtx_children): Mark LABEL_ALTERNATE_NAME.
        * jump.c (delete_unreferenced_labels): Don't delete if
        LABEL_ALTERNATE_NAME is set.
        * print-rtl.c (print_rtx): Dump alternate name.
        * rtl.def (CODE_LABEL): Change format to "iuuis00s".
        * rtl.h (LABEL_ALTERNATE_NAME): Define.
        * rtl.texi (LABEL_ALTERNATE_NAME): Document.
        * tm.texi (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Document.

From-SVN: r30382
1999-11-03 16:55:51 -05:00
Bernd Schmidt f0f616824e Fix docs for ADDRESS rtx
From-SVN: r29888
1999-10-10 11:52:53 +00:00
Richard Henderson a669dbf832 rtl.def (match_insn, [...]): Remove match_insn; rename match_insn2 to match_insn.
* rtl.def (match_insn, match_insn2): Remove match_insn; rename
        match_insn2 to match_insn.

From-SVN: r29422
1999-09-14 20:28:12 -07:00
Bernd Schmidt bcb3399464 Undo bogus changes from gcc2 merge
From-SVN: r29407
1999-09-14 14:37:12 +00:00
Jeff Law c5c7673583 Merge in gcc2-ss-010999
From-SVN: r29150
1999-09-06 23:49:18 -06:00
Richard Henderson ede7cd4499 backport: Makefile.in (STAGESTUFF): Add *.peephole2.
Merge peephole2 from new_ia32_branch:
        * Makefile.in (STAGESTUFF): Add *.peephole2.
        (mostlyclean): Likewise.
        (recog.o): Depend on resource.h.

        * final.c (peephole): Conditionalize decl on HAVE_peephole.
        (final_scan_insn): Likewise for the invocation of peephole.
        * genconfig.c (main): Look for peephole and peephole2 patterns.
        Emit HAVE_peephole* accordingly.
        * genpeep.c (main): Conditionalize entire output on HAVE_peephole.
        * flags.h (flag_peephole2): Declare.
        * toplev.c: New pass peephole2.  New flag -fpeephole2.

        * genattrtab.c (main): Count DEFINE_PEEPHOLE2.
        * gencodes.c (main): Likewise.
        * genextract.c (main): Likewise.
        * genoutput.c (main): Likewise.
        * genemit.c (max_operand_1): Look for the max scratch operand.
        (gen_rtx_scratch): New.
        (gen_exp): Use it, and pass on new arg subroutine_type.
        (gen_expand): Take max scratch into account.
        (gen_split): Emit peephole2 functions.
        (output_peephole2_scratch): New.
        (main): Include hard-reg-set.h and resource.h.  Handle peephole2.
        * genrecog.c (routine_type): Add PEEPHOLE2.
        (IS_SPLIT): New.
        (make_insn_sequence): Match outer parallel for peep2.  Discard
        top level scratches and dups.
        (add_to_sequence): New args insn_type and top.  Update all callers.
        Handle toplevel peep2 matching insns.
        (write_subroutine): Handle peep2.
        (write_tree_1): Likewise.
        (write_tree): Likewise.
        (main): Likewise.
        (change_state): New arg afterward.  Update all callers.
        Handle matching separate insns.
        * recog.c (recog_next_insn): New.
        (peephole2_optimize): New.
        * rtl.def (DEFINE_PEEPHOLE2): New.
        * resource.c (find_free_register): New argument last_insn.  Use it
        to find a register available through the entire span.
        * resource.h (find_free_register): Update prototype.

From-SVN: r29015
1999-08-31 13:37:09 -07: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 8f985ec4c7 rtl.def (NOTE): Change format to "iuu0n".
1999-08-19 14:44 -0700  Zack Weinberg  <zack@bitmover.com>

	* rtl.def (NOTE): Change format to "iuu0n".
	(ADDR_DIFF_VEC): Change format to "eEee0".
	(ADDRESSOF): Change format to "eit".

	* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
	(RTVEC_ELT): Change to match.
	(XVECEXP): Use XVEC and RTVEC_ELT.
	(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
	ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
	(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
	CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
	TRAP_CONDITION, TRAP_CODE): Use XEXP.
	(INTVAL): Use XWINT.
	(ADDRESSOF_DECL): Use XTREE.
	(SET_ADDRESSOF_DECL): Delete.
	(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
	NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill.  These have been
	ifdefed out since 2.6 at least.
	(gen_rtvec_vv): Delete prototype.

	* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
	not rtunion.
	(copy_most_rtx): Handle 't' format letter.
	* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
	(gen_rtvec_vv): Delete function.  All callers changed to use
	gen_rtvec_v instead.
	* print-rtl.c (print_rtx): Move special casing of NOTEs to
	the '0' format letter.

	* function.c (gen_mem_addressof): Don't use
	SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
	instead.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	Copy 't' slots with XTREE.
	(subst_constants): Treat 't' slots like '[swi]' slots.
	* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like	'0' slots.
	* jump.c (rtx_equal_for_thread_p): Likewise.
	* rtlanal.c (rtx_equal_p): Likewise.
	* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
	only four arguments.
	* gengenrtl.c (type_from_format): Provide correct types for
	'b' and 't' slots.


	* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
	If a recent gcc is in use (always in stage2 and beyond), use
	statement expressions, so we don't make a function call unless
	the check fails.  Evaluate arguments exactly once.
	(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
	TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
	Delete.
	(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
	they evaluate their arguments exactly once, irrespective of
	the compiler in use.

	* tree.c [ENABLE_CHECKING]: Define whichever set of functions
	is used by the currently-enabled check macros.  This is:
	(tree_check_failed, tree_class_check_failed): For gcc.
	(tree_check, tree_class_check, cst_or_constructor_check,
	expr_check): For other compilers.

	* gencheck.c: Do not define any *_CHECK1 macros.

From-SVN: r28769
1999-08-19 22:33:38 +00:00
Bernd Schmidt 49ad7cfa7a Include function.h in most files.
Include function.h in most files.  Remove most of the global variables
duplicated in function.h.  Add accessor macros for them which access
current_function.  Delete INLINE_HEADER rtx and related code, replace
with code using struct function to store inlining related data.

From-SVN: r28626
1999-08-09 14:00:21 +00:00
Jeffrey A Law 09554da93e rtl.def (CALL_PLACEHOLDER): New rtx code.
�
        * rtl.def (CALL_PLACEHOLDER): New rtx code.

From-SVN: r24843
1999-01-24 00:13:55 -07:00
Richard Henderson ee5332b81a cse.c (fold_rtx): Revert 29 Dec change.
* cse.c (fold_rtx): Revert 29 Dec change.
        (cse_insn): Revert 12 Jan change.
        * expr.c (expand_builtin): Don't emit CONST around CONSTANT_P_RTX.
        * regclass.c (reg_scan_mark_refs): Revert 29 Dec change.
        * rtl.def: Likewise.
        * rtl.h (CONSTANT_P): Likewise.
        * expr.c (emit_move_insn): Never try to flush CONSTANT_P_RTX
        to memory.
        * recog.c (immediate_operand): Accept CONSTANT_P_RTX.
        * alpha.c (input_operand): Likewise.
        * c4x.c (const_operand): Likewise.
        * explow.c (allocate_dynamic_stack_space): Use register_operand
        instead of arith_operand, which does not exist.
        * 1750a.h: Fix comment closure.
        * a29k.c (a29k_set_memflags): Fix typo in 19 Jan change.
        * arc.md (one_cmplsi2_set_cc_insn): Fix set mode mismatch.
        * arm.h (TARGET_SWITCHES): Fix typo.
        * i370.md (anon mult and div patterns): Fix set mode mismatch.
        * i860.c (output_delayed_branch): Fix operands to constrain_operands.
        (output_delay_insn): Likewise.
        * m88k.md (anon rotate insns): Fix set mode mismatch.
        (anon BLKmode moves): Commonize and fix set mode mismatches.
        * ns32k.md (udivmoddi[shq]i4_internal): Fix mode mismatch.
        * romp.md (movdf): Fix typo.

From-SVN: r24796
1999-01-20 18:21:28 -08:00
Richard Henderson 185ebd6c71 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>:
* rtl.def (CONSTANT_P_RTX): Clarify commentary.
        * expr.c (expand_builtin, case BUILT_IN_CONSTANT_P): Rework to
        consider constant CONSTRUCTOR constant and to defer some cases
        to cse.
        * cse.c (fold_rtx, case CONST): Add handling for CONSTANT_P_RTX.
        * regclass.c (reg_scan_mark_refs, case CONST): Likewise.
Richard Henderson  <rth@cygnus.com>
        * expr.c (init_expr_once): Kill can_handle_constant_p recognition.
        * cse.c (fold_rtx, case 'x'): Remove standalone CONSTANT_P_RTX code.

From-SVN: r24439
1998-12-29 03:36:22 -08:00
Michael Hayes b18cfc2861 rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for addressing modes with side effects.
* rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for
  	addressing modes with side effects.  These are currently
  	placeholders for the C4x target.

From-SVN: r23228
1998-10-22 16:11:16 +00:00
David S. Miller 64c7a80a98 Forgot to push this in with last change.
Good eyes Brendan...

From-SVN: r21730
1998-08-14 04:50:46 -07:00