Commit Graph

198 Commits

Author SHA1 Message Date
Alexandre Oliva b8ebd779d5 unroll.c (loop_iterations): Don't sign-extend abs_diff; zero-extend it.
* unroll.c (loop_iterations): Don't sign-extend abs_diff;
zero-extend it.  Make abs_inc unsigned.

From-SVN: r41886
2001-05-06 19:51:19 +00:00
Mark Mitchell e8c8470b1c flow.c (proagate_one_insn): Remove useless assignment.
* flow.c (proagate_one_insn): Remove useless assignment.
	* jump.c (delete_insn): Tidy.
	* loop.c (try_copy_prop): When deleting an instruction with a
	REG_RETVAL note, delete the entire libcall sequence.
	(loop_delete_insns): New function.
	* unroll.c (initial_reg_note_copy): Copy INSN_LIST notes, even if
	we're not substituting into them yet.

From-SVN: r41486
2001-04-21 18:45:00 +00:00
Alexandre Oliva 691073076b expmed.c (store_bit_field): Truncate CONST_INTs.
* expmed.c (store_bit_field): Truncate CONST_INTs.
(expand_mult_highpart, expand_divmod): Likewise.
* expr.c (convert_modes, store_field): Likewise.
* integrate.c (expand_inline_function): Use promote_mode() to
determine whether to convert_modes() an argument as signed
or unsigned.
* optabs.c (expand_binop): Get CONST_INT operands
sign-extended for their appropriate modes.
* stmt.c (emit_case_nodes): Convert node values to the
appropriate mode.
(expand_end_case): Convert minval and range to the appropriate
mode.
* unroll.c (loop_iterations): Truncate abs_diff to the mode of
the iteration variable.
* varasm.c (immed_double_const): Don't require words to be
narrower than host wide ints to properly sign-extend
CONST_INTs.

From-SVN: r41285
2001-04-12 03:41:36 +00:00
Michael Hayes 86e212125f loop.c (loop_call_insn_emit_before, [...]): New.
* loop.c (loop_call_insn_emit_before, loop_call_insn_hoist): New.
	(loop_insn_emit_before): No longer static.
	(move_movables): Replace emit_insn_after with loop_insn_emit_after.
	(loop_givs_rescan, load_mems): Likewise.
	(check_dbra_loop): Replace emit_insn_before with loop_insn_emit_before.
	(maybe_eliminate_biv_1):
	(move_movables): Replace emit_call_insn_before with
	loop_call_insn_hoist.
	* loop.h (loop_insn_emit_before): Add.
	* unroll.c (copy_loop_body): Replace emit_insn_before with
	loop_insn_emit_before.

From-SVN: r39260
2001-01-25 09:28:55 +00:00
Richard Henderson c55fa4d6b1 unroll.c (precondition_loop_p): Fail if no iteration variable found.
* unroll.c (precondition_loop_p): Fail if no iteration
        variable found.

From-SVN: r39064
2001-01-16 03:15:49 -08:00
Jakub Jelinek 9e2adb2a1c unroll.c (loop_iterations): If we cannot prove iteration variable is set once in each iteration, punt.
* unroll.c (loop_iterations): If we cannot prove iteration variable
	is set once in each iteration, punt.

From-SVN: r38996
2001-01-13 22:54:10 +01:00
Michael Hayes 099f0f3f6e loop.h (total_biv_increment): Constify iv_class pointer.
* loop.h (total_biv_increment): Constify iv_class pointer.
	(struct induction): Replace `mem_mode' with `mem' rtx.
	* unroll.c (total_biv_increment): Constify iv_class pointer.
	* loop.c (loop_giv_reduce_benefit): Derive mem mode from mem rtx.
	(find_mem_givs, combine_givs_p): Likewise.
	(debug_ivs, debug_iv_class, loop_ivs_dump, loop_iv_class_dump): New.

From-SVN: r38933
2001-01-12 04:09:43 +00:00
Michael Hayes 96a45535c3 hard-reg-set.h: Add multiple include guard.
* hard-reg-set.h: Add multiple include guard.
	* basic-block.h (struct loop): Add `sink' field.
	* loop.h: Include sbitmap.h, hard-reg-set.h, and basic-block.h.
	(emit_iv_add_mult): Delete.
	(loop_iv_add_mult_hoist, loop_iv_add_mult_sink): Define.
	(loop_iv_add_mult_emit_before, loop_insn_sink): Define.
	(unroll_loop): Remove end_insert_before argument.
	* loop.c (loop_givs_rescan): Remove end_insert_before argument.
	(maybe_eliminate_biv_1): Likewise.
	(emit_iv_add_mult): Delete.
	(gen_add_mult, loop_regs_update): New.
	(loop_insn_emit_after, loop_insn_emit_before): New.
	(loop_insn_sink, loop_insn_sink_or_swim): New.
	(emit_iv_add_mult): Delete.
	(scan_loop): Set loop->sink.
	(loop_givs_reduce): Use loop_insn_sink and its ilk.
	(loop_givs_rescan, strength_reduce, check_dbra_loop): Likewise.
	(maybe_eliminate_biv_1): Likewise.
	(maybe_eliminate_biv_1): Add basic block argument.
	* unroll.c (unroll_loop): Remove end_insert_before argument.
	(find_splittable_regs): Likewise.
	(find_splittable_regs): Use loop_insn_sink and its ilk.
	(find_splittable_givs, final_biv_value, final_giv_value): Likewise.

From-SVN: r38766
2001-01-07 10:38:29 +00:00
Alexandre Oliva f759eb8bf0 reload.c (subst_reloads): Take INSN argument.
* reload.c (subst_reloads): Take INSN argument.  When
replacing a LABEL_REF in a JUMP_INSN, add a REG_LABEL note.
* reload.h (subst_reloads): Adjust prototype.
* reload1.c (reload_as_needed): Pass INSN to subst_reloads.
* jump.c (mark_all_labels): Canonicalize any REG_LABEL notes
present in JUMP_INSNs and copy them to JUMP_LABEL.
* flow.c (find_label_refs, find_basic_blocks_1): Skip
JUMP_INSNs and insns with REG_LABELs that are followed by
JUMP_INSNs with the same REG_LABEL.
* sched-rgn.c (is_cfg_nonregular): Likewise.
* rtlanal.c (computed_jump_p): Make it false if a REG_LABEL
note is available.
* unroll.c (unroll_loop): Look for REG_LABEL notes in
JUMP_INSNs too.
* rtl.texi (REG_LABEL): Document usage in JUMP_INSNs.

From-SVN: r38755
2001-01-07 02:26:51 +00:00
Michael Hayes c804f3f88d loop.c (debug_biv, debug_giv): New.
* loop.c (debug_biv, debug_giv): New.
	(loop_biv_dump): Break out from ...
	(record_biv): ... here.
	(loop_giv_dump): Break out from ...
	(record_giv): ... here.
	(loop_bivs_check): Use print_simple_rtl.
	* unroll.c (loop_iterations): Use print_simple_rtl.

From-SVN: r38744
2001-01-06 03:24:58 +00:00
Michael Hayes 86fee241f7 loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds.
* loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds.
	(find_mem_givs, record_biv, maybe_eliminate_biv): Likewise.
	(record_initial): Likewise.
	* unroll.c (copy_loop_body, loop_iterations): Likewise.
	(remap_split_bivs): Likewise.

From-SVN: r38584
2001-01-01 01:04:01 +00:00
Michael Hayes 14be28e5f4 loop.h (struct iv): New.
* loop.h (struct iv): New.
	(REG_IV_TYPE, REG_IV_CLASS, REG_INFO): Modify to use 'struct iv'.
	(struct loop_ivs): Replace 'reg_iv_type', 'reg_iv_info',
	'reg_biv_class' fields with 'regs' and 'n_regs'.
	(struct ivs): Rename 'loop_iv_list' field to 'list'.
	* loop.c (loop_bivs_find, strength_reduce): Use ivs->regs array.
	* unroll.c (loop_iterations): Check array bounds with ivs->n_regs.

From-SVN: r38582
2001-01-01 00:49:30 +00:00
Michael Hayes 8b634749ab loop.h (REG_IV_CLASS): New accessor macro.
* loop.h (REG_IV_CLASS): New accessor macro.
	* loop.c (REG_IV_CLASS): Use it instead of reg_iv_class array.
	* unroll.c (REG_IV_CLASS): Likewise.

From-SVN: r38580
2001-01-01 00:37:09 +00:00
Michael Hayes 8529a489d6 loop.h (REGNO_FIRST_LUID, [...]): Define.
* loop.h (REGNO_FIRST_LUID, REGNO_LAST_LUID): Define.
	* loop.c (REGNO_FIRST_LUID, REGNO_LAST_LUID): Use in place of
	direct access to uid_luid array.
	* unroll.c (REGNO_FIRST_LUID, REGNO_LAST_LUID): Likewise.

From-SVN: r38575
2001-01-01 00:14:30 +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
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
Bernd Schmidt b4f75276d6 Kill recombine_givs.
From-SVN: r36536
2000-09-19 09:01:13 -07:00
Richard Henderson 8aa0e19417 unroll.c (copy_loop_body): Update LABEL_NUSES before calling invert_jump.
* unroll.c (copy_loop_body): Update LABEL_NUSES before
        calling invert_jump.

From-SVN: r36529
2000-09-19 00:35:55 -07:00
Jim Wilson 5c3c320ecd Fix IA-64 abort compiling ping.
* unroll.c (loop_iterations): Pass increment to extend_for_giv_value
	before passing it to fold_rtx_mult_add.

From-SVN: r36518
2000-09-18 16:19:53 -07:00
Jim Wilson ec919c984e Fix for IA-64 abort compiling xaaPCache.c from XFree86
Fix for IA-64 abort compiling xaaPCache.c from XFree86
	* unroll.c (final_giv_value): Pass increment through
	extend_value_for_giv before passing it to emit_iv_add_mult.

From-SVN: r36517
2000-09-18 15:48:52 -07:00
Kazu Hirata a86dc4a3fc * unroll.c: Fix formatting.
From-SVN: r36361
2000-09-12 08:43:25 -06:00
Michael Hayes ed5bb68db3 loop.h (LOOP_IVS): New macro.
* loop.h (LOOP_IVS): New macro.
	(REG_IV_TYPE, REG_IV_INFO): Add ivs argument.
	(struct loop_ivs): New.
	(struct loop_info): Add ivs field.
	(reg_iv_type, reg_iv_info): Delete prototype.
	(reg_biv_class, loop_iv_list): Likewise.
	* loop.c (record_biv, find_life_end): Pass loop argument.
	(reg_iv_type): Remove global array and use
	field in loop_regs structure within loop_ivs structure.
	(reg_iv_info, reg_biv_class, loop_iv_list): Likewise.
	(first_increment_giv, last_increment_giv): Use entry in
	loop_ivs structure.
	(record_initial): Pass ivs pointer.
	* unroll.c (copy_loop_body, remap_split_bivs): Add loop argument.

From-SVN: r36336
2000-09-11 21:48:46 +00:00
Michael Hayes 0a5b41f256 unroll.c (iteration_info): Subsume into loop_iterations.
* unroll.c (iteration_info): Subsume into loop_iterations.
	* loop.h (loop_info): New field iv.

From-SVN: r36334
2000-09-11 21:44:21 +00:00
Richard Henderson e8cb487384 loop.c (strength_reduce): Call check_ext_dependant_givs.
* loop.c (strength_reduce): Call check_ext_dependant_givs.
        Properly extend the biv initial value for the giv.
        (record_biv): Zero ext_dependant.
        (record_giv): New argument ext_val.  Update all callers.
        (general_induction_var): Likewise.
        (consec_sets_giv): Likewise.
        (simplify_giv_expr): Likewise.  Fill in ext_val if we find
        a sign-extend, zero-extend, or truncate.
        (combine_givs_p): Make sure modes are compatible.
        (check_ext_dependant_givs): New.
        (extend_value_for_giv): New.
        * loop.h (struct induction): Add ext_dependant.
        * unroll.c (iteration_info): Extend the biv initial value for the giv.
        (find_splittable_givs): Likewise.
        (final_giv_value): Likewise.

From-SVN: r36250
2000-09-07 15:26:37 -07:00
Catherine Moore 4598ffe97a unroll.c (unroll_loop): Check for unconditional jumps to loop continuation.
* unroll.c (unroll_loop): Check for unconditional jumps
        to loop continuation.  Delete if n_iterations is 1.
        (ujump_to_loop_cont): New routine.

From-SVN: r36235
2000-09-07 09:10:51 -04:00
Jakub Jelinek 6315f06806 unroll.c (loop_find_equiv_value): If ret is modified between insn and loop_start, ret might not be equivalent to reg.
* unroll.c (loop_find_equiv_value): If ret is modified between
	insn and loop_start, ret might not be equivalent to reg.

	* gcc.c-torture/execute/20000819-1.x: Remove.

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

From-SVN: r35494
2000-08-04 14:28:08 -06:00
Geoff Keating 5b1a6de4de unroll.c (copy_loop_body): Fix one instance of using host arithmetic on the target...
* unroll.c (copy_loop_body): Fix one instance of using host
arithmetic on the target; fixes loop-4 on a 32-bit -> 64-bit
cross-compile.

From-SVN: r35109
2000-07-18 00:16:59 +00:00
Jan Hubicka 7f1c097d36 combine.c (try_combine): Use any_condjump_p...
* combine.c (try_combine): Use any_condjump_p, any_uncondjump_p
        and pc_set at the place of simplejump_p and condjump_p.
        * cse.c (record_jump_equiv): Likewise.
        * emit-rtl.c (emit): Likewise.
        * explow.c (find_next_ref): Likewise.
        * flow.c (tidy_fallthru_edge): Likewise.
        (init_propagate_block_info): Likewise.
        * gcse.c (delete_null_pointer_checks): Likewise.
        * ifcvt.c (cond_exec_get_condition, noce_get_condition,
        dead_or_predicable): Likewise.
        * integrate.c (copy_insn_list): Likewise.
        * loop.c (scan_loop, verify_dominator, find_and_verify_loops,
        for_each_insn_in_loop, check_dbra_loop, get_condition,
        insert_bct, load_mems): Likewise.
        * resource.c (find_dead_or_set_registers): Likewise.
        * sibcalls.c (simplejump_p): Likewise.
        * unroll.c (copy_loop_body, reg_dead_after_loop): Likewise.

From-SVN: r34175
2000-05-25 14:38:49 -07:00
Jan Hubicka 742dff1596 Jan Hubicka <jh@suse.cz>
* jump.c (invert_exp_1): Remove first argument, use pc_set
        to get the expression.
        (redirect_exp): Make static; redirect only the pc_set expression,
        remove first argument.
        (invert_exp): Remove first argument, make static.
        (jump_optimize): Use any_condjump_p, any_uncondjump_p and
        any_onlyjump at most places where we originaly did condjump_p
        and simplejump_p.
        (jump_back_p, follow_jumps, thread_jumps): Likewise.
        (delete_barrier_succesors): Use pc_set.
        (invert_jump_1, invert_jump, redirect_jump_1, redirect_jump): Update
        calls of invert_exp and redirect_exp.
        * rtl.h (redirect_exp, invert_exp): Remove.
        * unroll.c (copy_loop_body): Use invert_jump and redirect_jump.

From-SVN: r34171
2000-05-25 09:41:30 -07: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
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
Jan Hubicka 28b6b9b2d3 * loop.c (load_mems) Don't use hard registers for the hoisting.
* unroll.c (unroll_loop): Avoid overflow in the n_iterations
	calculation; rename const_equiv array in the preconditioning code
	from loop_unroll to loop_unroll_precondition

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

From-SVN: r32060
2000-02-18 20:27:00 -05:00
Kaveh R. Ghazi d219c7f152 flow.c (mark_regs_live_at_end): Delete unused variables.
* flow.c (mark_regs_live_at_end): Delete unused variables.

        * ggc-page.c (ggc_page_print_statistics): bzero -> memset.

        * integrate.c (copy_rtx_and_substitute): Wrap variable `alignment'
        in macro FRAME_GROWS_DOWNWARD.

        * stmt.c (expand_end_bindings): Delete unused variable.

        * unroll.c (iteration_info): Mark parameter `loop' with
        ATTRIBUTE_UNUSED.

From-SVN: r31895
2000-02-10 16:45:23 +00:00
Zack Weinberg 78a0d70cdf frame.c (find_fde): Convert for loop to do-while so compiler sees it's always executed at least once.
* frame.c (find_fde): Convert for loop to do-while so compiler
	sees it's always executed at least once.
	* libgcc2.c (BBINBUFSIZE): Kill.
	(__bb_init_prg): Use fgets.
	(__bb_exit_trace_func): Don't paste strings.
	* unroll.c (unroll_loop): Initialize unroll_type, not
	unroll_number, and tweak logic to match.

	* i386.c (ix86_expand_int_movcc): Add explicit 'return 0' in
	all failure paths.
	(ix86_flags_dependant): Likewise.  Disentangle control flow.
	(ix86_sched_reorder): Break guts out to
	ix86_sched_reorder_pentium and ix86_sched_reorder_ppro.
	(ix86_sched_reorder_ppro): Initialize pair2 and insnp before
	any possible use.

	* i386.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Don't
	use string concatenation.  Don't save and restore esi.

	* fixinc/Makefile.in (fixincl.sh): Don't depend on inclhack.def.
	(machname.h): Remove script to separate file.  Use two-step
	sequence so target is not created if script fails.
	* fixinc/gen-machname.h: New file.  Handle case where no non-reserved
	identifiers are defined.
	* fixinc/fixlib.c (mn_get_regexps): Return a flag: if MN_NAME_PAT is
	an empty string, machine_name doesn't need to do anything at
	all.
	(is_cxx_header): Add more cases to regexp.
	* fixinc/fixlib.h: Update prototype.
	* fixinc/fixtests.c, fixinc/fixfixes.c: Update callers of
	mn_get_regexps.
	* fixinc/fixincl.c: Define NO_BOGOSITY.

	* fixinc/inclhack.def (no_double_slash, else_endif_label): Ifdef out.
	(hp_sysfile): Add missing comma.
	(math_exception): Put the wrapper ifdefs at the beginning and
	the end of the file.
	* fixinc/fixincl.x, fixinc/inclhack.sh: Regenerate.

From-SVN: r31744
2000-02-01 23:51:38 +00:00
Michael Hayes 0534b8047e loop.c (current_loop_info): Delete.
2000-01-26  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>

	* loop.c (current_loop_info): Delete.
	(consec_sets_invariant_p): Add loop argument, update callers.
	(get_condition_for_loop): Likewise.
	(count_nonfixed_reads, update_giv_derive): Likewise.
	(simplify_giv_expr, general_induction_var): Likewise.
	(consec_sets_giv, recombine_givs): Likewise.
	(move_movables): Delete loop_start and loop_end arguments,
	add loop argument, and update callers.
	(find_mem_givs, check_final_value): Likewise.
	(record_giv, maybe_eliminate_biv, maybe_eliminate_biv_1): Likewise.
	(loop_invariant_p): Rename from invariant_p, add loop argument, and
	update callers.
	(basic_induction_var): Add loop argument, delete loop_level argument,
	and update callers.
	* unroll.c (iteration_info): Delete loop_start and loop_end arguments,
	add loop argument, and update callers.
	(find_splittable_regs, find_splittable_givs): Likewise.
	(reg_dead_after_loop, loop_find_equiv_value): Likewise.
	(final_biv_value, final_giv_value, back_branch_in_range_p): Likewise.
	(biv_total_increment): Delete loop_start and loop_end arguments;
	update callers.
	(precondition_loop_p): Delete loop_start and loop_info arguments;
	update callers.
	* loop.h (get_condition_for_loop): Add loop argument.
	(biv_total_increment): Delete loop_start and loop_end arguments.
	(precondition_loop_p): Delete loop_start and loop_info arguments;
	add loop argument.
	(final_biv_value): Delete loop_start and loop_end arguments;
	add loop argument.
	(final_giv_value, back_branch_in_range_p): Likewise.

From-SVN: r31618
2000-01-25 22:49:56 +00:00
Michael Hayes 52b3806475 loop.h (LOOP_INFO): New accessor macro.
2000-01-25  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>

	* loop.h (LOOP_INFO): New accessor macro.
	* basic-block.h (struct loop): Rename field `info' to `aux'.
	* loop.c (scan_loop): Replace loop->info with LOOP_INFO (loop).
	(prescan_loop, strength_reduce, check_dbra_loop, insert_bct): Likewise.
	* unroll.c (loop_iterations, unroll_loop): Likewise.

From-SVN: r31596
2000-01-25 00:38:09 +00:00
Michael Hayes e4b68cedfd loop.c
From-SVN: r31500
2000-01-19 11:17:13 +00:00
Kaveh R. Ghazi 58782098af toplev.c: PROTO -> PARAMS.
* toplev.c: PROTO -> PARAMS.
        * toplev.h: Likewise.
        * tree.c: Likewise.
        * tree.h: Likewise.
        * unroll.c: Likewise.
        * varasm.c: Likewise.
        * varray.c: Likewise.
        * varray.h: Likewise.

From-SVN: r31462
2000-01-17 15:55:18 +00:00
Michael Hayes a2be868fba loop.c (this_loop_info): Delete.
* loop.c (this_loop_info): Delete.
	(uid_loop): Add in place of uid_loop_num.  All uses updated.
 	(loop_number_exit_count): Delete and replace with entry in loop
	structure.  All uses updated.
	(loop_number_loop_starts, loop_number_loop_ends): Likewise.
	(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
	(loop_outer_loop): Likewise.
	(loop_invalid, loop_number_exit_labels): Likewise.
	(loop_used_count_register): Delete and replace with entry in
	loop_info structure.
	(find_and_verify_loops): Add loops argument.
	(verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start,
	loop_end, etc. arguments with loop structure pointer.  All callers
	changed.
	(loop_reg_used_before_p, scan_loop, strength_reduce): Likewise.
	(check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise.
	(load_mems_and_recount_loop_regs_set, load_mems): Likewise.
	(insert_bct): Likewise.
	(basic_induction_var): New argument level.
	* loop.h (struct loop_info): Delete fields num, loops_enclosed,
	vtop, and cont.  Add used_count_register.
	(uid_loop): Delete declaration.
 	(loop_number_exit_count): Likewise.
	(loop_number_loop_starts, loop_number_loop_ends): Likewise.
	(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
	(loop_outer_loop, loop_used_count_register): Likewise.
	(loop_invalid, loop_number_exit_labels): Likewise.
	(unroll_loop): Replace loop_start and loop_end arguments
 	with loop structure pointer.
	(loop_precondition_p, loop_iterations): Likewise.
	Include basic-block.h.
	* unroll.c: (unroll_loop): Replace loop_start and loop_end arguments
 	with loop structure pointer.
	(loop_precondition_p, loop_iterations): Likewise.
	* basic-block.h (struct loop): New entries vtop, cont,
 	cont_dominator, start, end, top, scan_start, exit_labels,
	exit_count.
	* Makefile.in (LOOP_H): Add basic-block.h to dependencies.

From-SVN: r31434
2000-01-15 03:01:49 +00:00
Mike Stump 3951ad49fc * unroll.c (unroll_loop): Add EH support.
From-SVN: r31334
2000-01-11 19:51:20 +00:00
Kaveh R. Ghazi a544cfd201 builtins.c (expand_builtin_strlen): Initialize variable `icode'.
* builtins.c (expand_builtin_strlen): Initialize variable `icode'.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

From-SVN: r31207
2000-01-04 16:29:41 +00:00
Christophe Jaillet d4757e6a5d alias.c (nonlocal_reference_p): Add else for disjoint ifs.
* alias.c (nonlocal_reference_p): Add else for disjoint ifs.
        * flow.c (find_use_as_address): Likewise.
        * function.c (fixup_var_refs_1): Likewise.
        (walk_fixup_memory_subreg, fixup_stack_1): Likewise.
        * jump.c (invert_exp, redirect_exp): Likewise.
        * loop.c (replace_call_address): Likewise.
        (count_nonfixed_reads): Likewise.
        * rtlanal.c (modified_between_p): Likewise.
        (modified_in_p, volatile_insn_p, volatile_refs_p): Likewise.
        (side_effects_p, replace_regs, jmp_uses_reg_or_mem): Likewise.
        * unroll.c (remap_split_bivs): Likewise.

From-SVN: r31103
1999-12-27 15:01:12 -08:00
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
Bernd Schmidt 01d939e8fb current_function -> cfun
From-SVN: r31033
1999-12-20 13:18:17 +00:00
J"orn Rennecke 3f0aabf20a * unroll.c (copy_loop_body): Don't treat a REG like a PLUS.
From-SVN: r31016
1999-12-18 19:59:24 +00:00
Bernd Schmidt 311fe27c71 Fix abort in loop_iterations
From-SVN: r30698
1999-11-29 10:51:09 +00:00