Commit Graph

184 Commits

Author SHA1 Message Date
Richard Henderson d3259baad8 regclass.c (call_really_used_regs): Conditionally define.
* regclass.c (call_really_used_regs): Conditionally define.
        (init_reg_sets_1): Don't use it if not defined.
        (fix_register): Similarly, don't set it.

From-SVN: r44567
2001-08-02 01:43:29 -07:00
Andrew MacLeod fc1296b77a regclass.c (call_really_used_regs): New array for registers which are actually used by a call.
2001-08-01  Andrew MacLeod  <amacleod@redhat.com>

	* regclass.c (call_really_used_regs): New array for registers which
	are actually used by a call.
	(init_reg_sets_1): Initialize regs_invalidated_by_call with the
	new array.
	(fix_register): Set call_really_used too.
	* config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): Initialize.
	* doc/tm.texi (CALL_REALLY_USED_REGISTERS): Document.

From-SVN: r44558
2001-08-01 21:40:43 +00:00
Jan Hubicka a08b260482 flow.c (mark_set_1): Use REG_FREQ_FROM_BB.
* flow.c (mark_set_1): Use REG_FREQ_FROM_BB.
	(attempt_auto_inc): LIkewise.
	(mark_used_reg): Likewise.
	(try_pre_increment_1): Likewise.
	* regclass.c (regclass): Likewise.
	* global.c (allocno_compare): Update comment; change scaling factor.
	* local-alloc.c (QTY_CMP_PRI): Likewise.
	* regs.h (REG_FREQ_FROM_BB): New.
	(REG_FREQ_MAX): Likewise.

From-SVN: r44483
2001-07-30 20:03:37 +00:00
Daniel Berlin b2d5779326 [multiple changes]
2001-07-27  Daniel Berlin  <dan@cgsoftware.com>

	* regclass.c (reg_scan_mark_refs): Increment REG_N_REFS when we
	increment REG_N_SETS.

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

	* sbitmap.h: New prototype for sbitmap_a_xor_b.

	* sbitmap.c (sbitmap_a_xor_b): New function.
	#ifdef the basic block stuff on the define IN_GCC.

From-SVN: r44460
2001-07-29 18:21:08 +00:00
Richard Henderson d4845339d7 * regclass.c (N_REG_INTS): Use only 32 bits per element.
From-SVN: r44201
2001-07-20 09:55:03 -07:00
Richard Henderson b85946fc65 regclass.c (init_reg_sets): Use only 32 bits per initializer from int_reg_class_contents.
* regclass.c (init_reg_sets): Use only 32 bits per initializer
        from int_reg_class_contents.

From-SVN: r44054
2001-07-16 10:57:11 -07:00
Richard Henderson 4e2db58460 hard-reg-set.h (regs_invalidated_by_call): Declare.
* hard-reg-set.h (regs_invalidated_by_call): Declare.
        * regclass.c (regs_invalidated_by_call): Move from cse.c.
        (init_reg_sets_1): Move initialization from cse_main.
        * cse.c (regs_invalidated_by_call): Move to regclass.c.
        (cse_main): Move its initialization also.
        * df.c (df_insn_refs_record): Use regs_invalidated_by_call.
        * flow.c (propagate_one_insn): Likewise.
        * gcse.c (compute_hash_table): Likewise.
        (compute_kill_rd, compute_store_table): Likewise.
        * sched-deps.c (sched_analyze_1): Likewise.

From-SVN: r44053
2001-07-16 10:54:34 -07:00
Jan Hubicka 9401afe31a flow.c (mark_set_1, [...]): compute REG_FREQ using bb->frequency.
* flow.c (mark_set_1, attempt_auto_inc, mark_used_reg,
	try_pre_increment_1): compute REG_FREQ using bb->frequency.

	* regclass.c (loop_cost): Kill.
	(frequency): New global variable.
	(record_operand_costs): Replace loop_cost by frequency.
	(scan_one_insn): Likewise.
	(regclass): Likewise; set frequency according to bb->frequency.

	* flow.c (split_edge): Set frequency.

From-SVN: r43523
2001-06-22 23:27:48 +00:00
Jan Hubicka b2aec5c0eb regs.h (struct reg_info_def): Add freq field.
* regs.h (struct reg_info_def): Add freq field.
	(REG_N_REFS): Update comment.
	(REG_FREQ): New.
	* regclass.c (scan_one_insn): Update REG_FREQ.
	* flow.c (mark_set_1): Update REG_FREQ, make REG_N_SETS unweighted.
	(attempt_auto_inc): Likewise.
	(mark_used_reg): Likewise.
	(try_pre_increment_1): Likewise.
	* local-alloc.c (struct qty): Add freq field.
	(alloc_qty): Set freq.
	(update_equiv_regs): Set REG_FREQ.
	(QTY_CMP_PRI): Use freq.
	(combine_regs): Update qty->freq.
	* global.c (struct allocno): Update comment for n_refs;
	add freq field.
	(local_reg_freq): New array.
	(global_alloc): Update freq field;
	allocate and initialize local_reg_freq.
	(allocno_compare): Use freq field.
	(find_reg): Likewise.
	* reload1.c (count_pseudo): Use freq isntead of n_refs.
	(count_spilled_pseudo): Likewise.

	* tm.texi (GCOV_TYPE_SIZE): Document.
	* basic-block.h (gcov_type): Define.
	(struct edge_def): Use gcov_type for count field.
	(struct basic_block_def): Likewise.
	* defaults.h (GCOV_TYPE_SIZE): Define.
	* final.c (end_final): Use GCOV_TYPE_SIZE.
	* flow.c (dump_edge_info, dump_flow_info, dump_bb): Print count fields
	using HOST_WIDEST_INT_PRINT_DEC.
	* gcov-io.h (__fetch_gcov_type, __store_gcov_type, __read_gcov_type,
	__write_gcov_type): New.
	(store_long): Remove.
	* gcov.c (gcov_type): Set default.
	(struct adj_list): Use gcov_type for arc_count.
	(bb_info): Use gcov_type for succ_count, pred_count and exec_count.
	(create_program_flow_graph): Read arc_count properly.
	(solve_program_flow_graph): 'total' is gcov_type.
	(output_data): Line_counts is gcov_type, print it properly.
	* libgcc2.c (struct bb): Counts is gcov_type.
	(__bb_exit_func): Use __read_gcov_type and __write_gcov_type.
	* profile.c (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set default.
	(GCOV_TYPE_SIZE): Define.
	(struct bb_info): succ_count and pred_count is gcov_type.
	(compute_branch_probabilities): Use __read_gcov_type,
	print read edges to the dump file.
	(total): Is gcov_type.
	(gen_edge_profiler): Use GCOV_TYPE_SIZE.

From-SVN: r43505
2001-06-22 17:18:23 +00:00
Alexandre Oliva d3c7d45ed9 regclass.c (scan_one_insn): Update REG_N_REFS when optimizing handling of two-address insns.
* regclass.c (scan_one_insn): Update REG_N_REFS when optimizing
handling of two-address insns.

From-SVN: r41925
2001-05-09 13:40:49 +00:00
Kaveh R. Ghazi 0829d244e7 Makefile.in (ssa.o, regclass.o): Depend on $(EXPR_H).
* Makefile.in (ssa.o, regclass.o): Depend on $(EXPR_H).

	* regclass.c, ssa.c: Include expr.h.

	* rtl.h (memory_address, force_reg, emit_queue, emit_move_insn,
	gen_move_insn): Delete redundant declarations.

From-SVN: r41337
2001-04-13 16:34:41 +00:00
John David Anglin dbbbbf3b8d print-rtl.c (print_rtx): Cast enums to int for comparison.
* print-rtl.c (print_rtx): Cast enums to int for comparison.
	* c-decl.c (grokdeclarator): Cast enums to int for comparison and
	shifts.
	* c-format.c (C_STD_VER): Cast to int for comparisons.
	(check_function_format): Cast various enums to int for &.
	(maybe_read_dollar_number): Likewise.
	(check_format_info): Likewise.
	(check_format_info_main): Likewise.
	* expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison.
	(safe_from_p): Likewise.
	* varasm.c (const_hash): Cast enum to int for %.
	* emit-rtl.c (init_emit_once): Use int loop variable to work around
	pcc enum problems with < and ++ operators.
	* regclass.c (init_reg_sets_1): Cast enums for comparison.
	(choose_hard_reg_mode): Use unsigned int to iterate over CCmodes.
	(regclass_init): Change enum class to int to iterate over reg_classes.
	* genrecog.c (merge_trees): Cast enums for comparison.
	* rtl.h (GET_CODE): Cast to enum rtx_code.
	(PUT_CODE): Cast to ENUM_BITFIELD(rtx_code).
	(GET_MODE): Cast to enum machine_mode.
	(PUT_MODE): Cast to ENUM_BITFIELD(machine_mode).
	(GET_NOTE_INSN_NAME): Cast enum to int.
	* tree.h (TREE_CODE): Cast to enum tree_code.
	(TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code).
        * timevar.c (timevar_print): Change loop variable id from enum to
	unsigned int.
	* fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int.
	* config/i386/i386.md: Use PUT_MODE for mode assignment.
	* toplev.c (compile_file): Cast enum DFI to int.
	(decode_d_option): Likewise.

From-SVN: r40193
2001-03-02 21:41:37 +00:00
Jan Hubicka 6df26b8f23 regclass.c (contains_reg_of_mode): Make global.
* regclass.c (contains_reg_of_mode): Make global.
	(init_reg_sets): Remove contains_reg_of_mode; take into account
	CLASS_MAX_NREGS when looking for the proper mode.
	(dump_regclass): Dump only classes considered for the pseudo.
	(regclass): Use contains_reg_of_mode.

From-SVN: r39891
2001-02-19 15:50:20 +00:00
Jan Hubicka 6836e0240e regclass.c (init_reg_sets_1): Reinstall the optimization of move_cost together with Matt Kraai's fix.
* regclass.c (init_reg_sets_1): Reinstall the optimization of
	move_cost together with Matt Kraai's fix.

From-SVN: r39688
2001-02-14 20:38:33 +00:00
Richard Henderson c7c0ae3d7f * regclass.c (init_reg_sets_1): Revert last two changes.
From-SVN: r39669
2001-02-14 02:12:20 -08:00
Jan Hubicka 1464632be3 * regclass.c (init_reg_sets_1): Silence warning.
From-SVN: r39646
2001-02-13 22:10:04 +00:00
Jan Hubicka 7004b11bf0 regclass.c (init_reg_sets_1): Optimize calculation of move_cost arrays.
* regclass.c (init_reg_sets_1): Optimize calculation of move_cost
	arrays.

From-SVN: r39606
2001-02-12 16:30:08 +00:00
Richard Kenner 79b9ec0ddb regclass.c (max_set_parallel): New variable.
* regclass.c (max_set_parallel): New variable.
	(reg_scan): Take it into account in computation of max_parallel.
	(reg_scan_mark_refs, case SET): Compute it.

From-SVN: r39140
2001-01-19 13:09:17 -05:00
Alexandre Oliva e56b459443 tm.texi (REGISTER_MOVE_COST): Add a mode argument.
* tm.texi (REGISTER_MOVE_COST): Add a mode argument.
* reload.c (REGISTER_MOVE_COST): Likewise.  Adjust all callers.
* reload1.c (REGISTER_MOVE_COST): Likewise.
* regclass.c (REGISTER_MOVE_COST): Likewise.
(move_cost, may_move_in_cost, may_move_out_cost): Add mode
dimension.  Adjust all users.
(init_reg_sets_1): Iterate on all modes.
* config/1750a/1750a.h (REGISTER_MOVE_COST): Adjust.
* config/a29k/a29k.h (REGISTER_MOVE_COST): Adjust.
* config/alpha/alpha.h (REGISTER_MOVE_COST): Adjust.
* config/arc/arc.h (REGISTER_MOVE_COST): Adjust.
* config/arm/arm.h (REGISTER_MOVE_COST): Adjust.
* config/avr/avr.h (REGISTER_MOVE_COST): Adjust.
* config/c4x/c4x.h (REGISTER_MOVE_COST): Adjust.
* config/d30v/d30v.h (REGISTER_MOVE_COST): Adjust.
* config/dsp16xx/dsp16xx.h (REGISTER_MOVE_COST): Adjust.
* config/h8300/h8300.h (REGISTER_MOVE_COST): Adjust.
* config/i386/i386.h (REGISTER_MOVE_COST): Adjust.
* config/ia64/ia64.h (REGISTER_MOVE_COST): Adjust.
* config/m32r/m32r.h (REGISTER_MOVE_COST): Adjust.
* config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Adjust.
* config/m68k/m68k.h (REGISTER_MOVE_COST): Adjust.
* config/mcore/mcore.h (REGISTER_MOVE_COST): Adjust.
* config/mips/mips.h (REGISTER_MOVE_COST): Adjust.
* config/mn10200/mn10200.h (REGISTER_MOVE_COST): Adjust.
* config/mn10300/mn10300.h (REGISTER_MOVE_COST): Adjust.
* config/ns32k/ns32k.h (REGISTER_MOVE_COST): Adjust.
* config/pa/pa.h (REGISTER_MOVE_COST): Adjust.
* config/pdp11/pdp11.h (REGISTER_MOVE_COST): Adjust.
* config/pj/pj.h (REGISTER_MOVE_COST): Adjust.
* config/romp/romp.h (REGISTER_MOVE_COST): Adjust.
* config/rs6000/rs6000.h (REGISTER_MOVE_COST): Adjust.
* config/sh/sh.h (REGISTER_MOVE_COST): Adjust.
* config/sparc/sparc.h (REGISTER_MOVE_COST): Adjust.

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

From-SVN: r37863
2000-11-29 23:31:19 -07:00
Kaveh R. Ghazi 4e135bdd14 alpha.c (check_float_value): Use memcpy, not bcopy.
* alpha.c (check_float_value): Use memcpy, not bcopy.
	* arm.c (output_move_double): Likewise.
	* arm.md: Likewise.
	* m88k.c (legitimize_operand): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* m88k.md: Likewise.
	* mips.c (override_options): Likewise.
	* mips.md: Likewise.
	* romp.c (output_fpops): Likewise.
	* rs6000.c (rs6000_override_options): Likewise.
	* sh.md: Likewise.
	* vax.c (check_float_value): Likewise.

	* emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise.
	* expmed.c (synth_mult): Likewise.
	* final.c (add_bb_string): Likewise.
	* genattr.c (main): Likewise.
	* genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging):
	Likewise.
	* jump.c (thread_jumps): Likewise.
	* prefix.c (save_string): Likewise.
	* real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise.
	* regclass.c (init_reg_sets, init_reg_sets_1): Likewise.
	* reload1.c (reload, eliminate_regs): Likewise.

cp:
	* decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
	* lex.c (copy_lang_decl): Likewise.

java:
	* decl.c (copy_lang_decl): Use memcpy, not bcopy.
	* jcf-parse.c (jcf_figure_file_type): Likewise.

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

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

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

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

From-SVN: r37303
2000-11-07 22:50:06 +00:00
Richard Henderson b437f1a754 calls.c (precompute_register_parameters): Use COSTS_N_INSNS, not 2.
* calls.c (precompute_register_parameters): Use COSTS_N_INSNS, not 2.
        * cse.c (rtx_cost): Likewise.
        * optabls.c (expand_binop): Likewise.
        (expand_twoval_binop, prepare_cmp_insn): Likewise.
        * regclass.c (copy_cost): Likewise.
        * reload1.c (reload_cse_move2add): Likewise.

From-SVN: r36423
2000-09-14 19:56:02 -07:00
Richard Henderson c2cba7a96e local-alloc.c (requires_inout): Don't use reserved range for EXTRA_CONSTRAINTS...
* local-alloc.c (requires_inout): Don't use reserved range for
        EXTRA_CONSTRAINTS; use anything not matched by REG_CLASS_FROM_LETTER.
        * recog.c (asm_operand_ok): Likewise.
        (preprocess_constraints, constrain_operands): Likewise.
        * regclass.c (record_reg_classes): Likewise.
        * reload.c (find_reloads): Likewise.
        * reload1.c (maybe_fix_stack_asms): Likewise.
        (reload_cse_simplify_operands): Likewise.
        * stmt.c (expand_asm_operands): Likewise.

        * md.texi: Update constraints documentation.
        * tm.texi (EXTRA_CONSTRAINT): Update.

From-SVN: r36023
2000-08-28 17:44:21 -07:00
Richard Henderson 0548a9df61 * regclass.c (choose_hard_reg_mode): Iterate over all CC modes.
From-SVN: r35566
2000-08-08 02:18:47 -07: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
Richard Henderson 02188693ed combine.c (subst): Use CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P instead of...
* combine.c (subst): Use CLASS_CANNOT_CHANGE_MODE and
        CLASS_CANNOT_CHANGE_MODE_P instead of CLASS_CANNOT_CHANGE_SIZE
        and hard-coded tests.
        (simplify_set): Likewise.
        (gen_lowpart_for_combine): Likewise.
        * emit-rtl.c (gen_lowpart_common): Likewise.
        * global.c (find_reg): Likewise.
        * local-alloc.c (find_free_reg): Likewise.
        * recog.c (register_operand): Likewise.
        * regclass.c (init_reg_sets_1): Likewise.
        (record_operand_costs, regclass): Likewise.
        * reload.c (push_reload): Likewise.
        * reload1.c (choose_reload_regs): Likewise.
        * flow.c (mark_used_regs): Conditionally set REG_CHANGES_MODE.
        * local-alloc.c (struct qty): Rename changes_size to changes_mode.
        Update all references.
        * regs.h (struct reg_info_def): Likewise.
        (REG_CHANGES_MODE): Rename from REG_CHANGES_SIZE.
        * tm.texi (CLASS_CANNOT_CHANGE_MODE): Document.
        (CLASS_CANNOT_CHANGE_MODE_P): Likewise.

        * config/alpha/alpha.h (CLASS_CANNOT_CHANGE_MODE): Rename.
        (CLASS_CANNOT_CHANGE_MODE_P): New.
        * config/mips/mips.h: Likewise.
        * config/pa/pa32-regs.h: Likewise.
        * config/pa/pa64-regs.h: Likewise.
        * config/rs6000/rs6000.h: Likewise.
        * config/sh/sh.h: Likewise.
        * config/ia64/ia64.h (CLASS_CANNOT_CHANGE_MODE): New.
        (CLASS_CANNOT_CHANGE_MODE_P): New.
        * config/avr/avr.h (CLASS_CANNOT_CHANGE_SIZE): Remove dead code.
        * config/d30v/d30v.h: Likewise.

From-SVN: r34526
2000-06-13 14:47:44 -07:00
Richard Kenner d067e2aae0 Add blank line
From-SVN: r34294
2000-05-31 07:50:44 -04:00
Richard Henderson 9ef07cf1d4 regclass.c (record_operand_costs): Protect reg_changes_size with CLASS_CANNOT_CHANGE_SIZE.
* regclass.c (record_operand_costs): Protect reg_changes_size
        with CLASS_CANNOT_CHANGE_SIZE.

From-SVN: r34238
2000-05-28 13:39:51 -07:00
Geoff Keating e79f71f73d rs6000.md (movsi): Constify 'name'.
* config/rs6000/rs6000.md (movsi): Constify 'name'.

* regclass.c [CLASS_CANNOT_CHANGE_SIZE]
(class_can_change_size): New variable.
(reg_changes_size): New variable.
(init_reg_sets_1): Initialise class_can_change_size.
(record_operand_costs): Remove subreg_changes_size.
Don't pass it around.  Instead update reg_changes_size.
(regclass): Initialise and free reg_changes_size.  If a register
changes size, don't preference it to a class that contains
registers that can't change size.
(record_reg_classes): Don't look at subreg_changes_size.

From-SVN: r34227
2000-05-28 05:51:16 +00:00
Richard Henderson e087aeb2b9 print-rtl.c (reg_names): Remove const.
* print-rtl.c (reg_names): Remove const.
        * regclass.c (reg_names): Likewise.
        * regs.h (reg_names): Likewise.
        * hard-reg-set.h (reg_names): Likewise.

From-SVN: r34225
2000-05-27 20:24:57 -07:00
Zack Weinberg fbd4035990 top level:
* diagnostic.c: Eliminate implicit int.
	* except.c, gcc.c: Add static prototypes.
	* final.c (final_end_function): Mark file arg ATTRIBUTE_UNUSED.
	* gensupport.c (process_rtx): Use XVEC to initialize vector
	slot of 'split'.

	* print-rtl.c: If DEBUG_REGISTER_NAMES, define static
	debug_reg_names instead of static reg_names.  If not, define
	global reg_names.
	* regclass.c: Don't define global reg_names unless
	DEBUG_REGISTER_NAMES is defined.

	* reload1.c (order_regs_for_reload): Remove unused variable.
	* varasm.c: Include output.h after defaults.h.  Define
	eh_frame_section as function of no args, not of unspecified args.

	* gcc.c: Constify argbuf; arguments to store_arg,
	process_command, main; elements of struct command and struct
	switchstr; local variables in execute, process_command, main.

cp:
	* except.c: Add static prototypes.

From-SVN: r34054
2000-05-20 19:45:36 +00:00
Richard Kenner efc9bd412d cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.
* cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.
	* reload.c (find_equiv_reg): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	Only call prologue_epilogue_contains on insns.
	* basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function.
	* bb-reorder.c (hard-reg-set.h): Include earlier.
	* haifa-sched.c (hard-reg-set.h): Likewise.
	* ifcvt.c (hard-reg-set.h): Likewise.
	* local-alloc.c (hard-reg-set.h): Likewise.
	* loop.c (hard-reg-set.h): Likewise.
	* predict.c (hard-reg-set.h): Likewise.
	* regrename.c (hard-reg-set.h): Likewise.
	* flow.c (hard-reg-set.h): Likewise.
	(reg_set_to_hard_reg_set): New function.
	* bitmap.c (regs.h, basic-block.h): No longer include.
	(bitmap.h): Now include.
	* conflict.c (hard-reg-set.h): Include.
	* profile.c (hard-reg-set.h): Likewise.
	* print-rtl.c (hard-reg-set.h): Likewise.
	* sbitmap.c (hard-reg-set.h): Likewise.
	* toplev.c (hard-reg-set.h): Likewise.
	* unroll.c (hard-reg-set.h, basic-block.h): Likewise.
	* hard-reg-set.h (reg_names): Now constant.
	* regs.h (reg_names): Likewise.
	* regclass.c (reg_names): Likewise.
	* loop.h (basic-block.h): No longer include.
	(bitmap.h): Now include.
	* reload1.c (order_regs_for_reload): Avoid loop over reg sets.
	* Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes.
	(toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise.

From-SVN: r34039
2000-05-19 18:27:28 -04:00
Mark Mitchell da668e9c92 regs.h (reg_n_max): Don't declare.
* regs.h (reg_n_max): Don't declare.
	* flow.c (reg_n_max): Don't define.
	* regclass.c (renumber): Don't initialize to zero.
	(regno_allocated): Likewise.
	(reg_n_max): Define.
	(allocate_reg_info): Don't initialize unnecessarily.

From-SVN: r33374
2000-04-24 07:48:12 +00: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
Jeff Law 517cbe13c4 Copyright fixes.
From-SVN: r32171
2000-02-25 22:45:17 -07:00
Kaveh R. Ghazi 1353681247 machmode.h: PROTO -> PARAMS.
* machmode.h: PROTO -> PARAMS.
        * mbchar.h: Likewise.
        * mips-tdump.c: Likewise.
        * mips-tfile.c: Likewise.
        * optabs.c: Likewise.
        * output.h: Likewise.
        * prefix.c: Likewise.
        * profile.c: Likewise.
        * protoize.c: Likewise.
        * real.h: Likewise.
        * recog.c: Likewise.
        * recog.h: Likewise.
        * regclass.c: Likewise.
        * regmove.c: Likewise.
        * regs.h: Likewise.

From-SVN: r31459
2000-01-17 15:37:04 +00:00
Kaveh R. Ghazi 80cca0e191 svr3.h (ASM_FILE_START): Wrap if-clause in squigly brackets.
* svr3.h (ASM_FILE_START): Wrap if-clause in squigly brackets.

	* recog.c (memory_address_p): Mark parameter with ATTRIBUTE_UNUSED.

	* regclass.c (choose_hard_reg_mode): Likewise.

	* reload.c (find_valid_class, strict_memory_address_p): Likewise.

	* reorg.c (optimize_skip): Wrap prototype in macro conditionals.

From-SVN: r31364
2000-01-13 00:17:33 +00:00
Kaveh R. Ghazi d0af450df2 Makefile.in (toplev.o): Depend on regs.h.
* Makefile.in (toplev.o): Depend on regs.h.

        * output.h (tdesc_section): Prototype.

        * regclass.c (copy_cost): Mark parameters with ATTRIBUTE_UNUSED.

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

        * toplev.c: Include "regs.h".

From-SVN: r31337
2000-01-11 22:57:39 +00:00
Richard Henderson 9b15c17f0d flow.c (mark_set_1): Use loop_depth+1 as reference weight.
* flow.c (mark_set_1): Use loop_depth+1 as reference weight.
        (find_auto_inc, mark_used_regs, try_pre_increment_1): Likewise.
        (count_reg_sets_1, count_reg_references): Likewise.
        (flow_loops_level_compute): Start counting actual loop depth at 1.
        (flow_loops_find): Likewise.
        * local-alloc.c (update_equiv_regs): Likewise.
        * regclass.c (regclass): Re-instate Jan 4 0-based loop_depth change.

From-SVN: r31259
2000-01-06 12:25:41 -08:00
Jeffrey A Law 399b9016a7 * regclass.c: Revert my Jan 4 change to loop cost computation.
From-SVN: r31210
2000-01-04 11:46:46 -07:00
Jan Hubicka 6461530210 regclass.c (regclass): Do not obey REG_N_REFS in non-optimizing compilation.
* regclass.c (regclass): Do not obey REG_N_REFS in non-optimizing
	compilation.

From-SVN: r31209
2000-01-04 18:26:39 +00:00
Jeffrey A Law 8c0ede34a2 regclass.c (regclass): Properly compute loop_cost.
* regclass.c (regclass): Properly compute loop_cost.  Adjust
        comments.

From-SVN: r31192
2000-01-04 00:26:08 -07:00
Jeffrey A Law 4963c995cc * regclass.c: Fix minor whitespace problems.
From-SVN: r31191
2000-01-04 00:20:31 -07:00
Jan Hubicka f741a71c75 regclass.c (op_costs): Remove global variable.
* regclass.c (op_costs): Remove global variable.
	(record_reg_classes): New parameter "op_costs" and "reg_pref".
	(record_operand_costs): Break out from ...
	(scan_one_insn): ... here.
	(dump_regclass): Make dumps nicer.
	(regclass): Dump preferrences choosed and changes done during passes.

From-SVN: r31179
2000-01-03 15:23:56 +00:00
Kaveh R. Ghazi 272df862c2 Makefile.in (toplev.o): Depend on loop.h.
* Makefile.in (toplev.o): Depend on loop.h.

	* dwarfout.c: Include tm_p.h.

	* emit-rtl.c (restore_emit_status): Mark parameter with
	ATTRIBUTE_UNUSED.

	* final.c (final_scan_insn): Likewise.

	* flow.c (flow_nodes_print, flow_exits_print, flow_loops_cfg_dump,
	flow_loop_nested_p, flow_loop_exits_find, flow_loop_nodes_find,
	flow_depth_first_order_compute, flow_loop_pre_header_find,
	flow_loop_tree_node_add, flow_loops_tree_build,
	flow_loop_level_compute, flow_loops_level_compute,
	flow_loop_outside_edge_p): Add prototypes.
	(recompute_reg_usage): Mark parameters with ATTRIBUTE_UNUSED.

	* ggc-callbacks.c (lang_mark_tree, lang_mark_false_label_stack):
	Mark with ATTRIBUTE_NORETURN.

	* hash.c (hash_newfunc): Mark parameter with ATTRIBUTE_UNUSED.

	* local-alloc.c (no_conflict_p): Likewise.

	* loop.c (insert_bct): Hide definitions of variables with hidden
	usage.
	(note_reg_stored): Mark parameter with ATTRIBUTE_UNUSED.

	* regclass.c (memory_move_secondary_cost): Mark variable `mem'
	with ATTRIBUTE_UNUSED.
	(record_reg_classes): Mark parameter with ATTRIBUTE_UNUSED.
	(reg_scan): Likewise.

	* reload.c (find_reloads): Remove unused variables `changed'.

	* reload1.c (reload_reg_class_lower): Don't unnecessarily cast
	away const-ness.
	(allocate_reload_reg): Mark parameter with ATTRIBUTE_UNUSED.
	Remove unused variable `insn'.

	* toplev.c: Include loop.h.
	(report_file_and_line): Remove unnecessary prototype.

	* tree.c (build_block): Mark parameter with ATTRIBUTE_UNUSED.

	* unroll.c (biv_total_increment): Likewise.

From-SVN: r31085
1999-12-24 14:04:54 +00:00
Jan Hubicka 1f01879e43 * regclass.c (regclass): Do not use flowgraph when not optimizing.
From-SVN: r30993
1999-12-17 13:19:41 +00:00
Jan Hubicka 954d8e993c regclass.c (loop_depth): Remove
* regclass.c (loop_depth): Remove
	(scan_one_insn): Do not handle LOOP_NOTE insns.
	(regclass): Go through basic blocks and set loop_cost

From-SVN: r30976
1999-12-16 10:35:14 +00:00
Jeffrey A Law accef10312 regclass.c (record_reg_classes): Update comment for merging register class preferences in reg->reg copies.
* regclass.c (record_reg_classes): Update comment for merging
        register class preferences in reg->reg copies.  Tighten conditions
        for merging register class preferences in reg->reg copies.

From-SVN: r30943
1999-12-15 01:29:37 -07:00
Jan Hubicka 2f12c89d4c regclass.c (scan_one_insn): Set loop_cost to 1 when optimizing for size.
* regclass.c (scan_one_insn): Set loop_cost to 1 when
	optimizing for size.

From-SVN: r30918
1999-12-14 12:56:06 +00:00