aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
AgeCommit message (Collapse)AuthorFilesLines
2000-10-24combine.c (distribute_notes): Discard REG_LIBCALL and REG_RETVAL when ↵Alexandre Oliva1-0/+8
deleting libcall sequence collapsed to... * combine.c (distribute_notes): Discard REG_LIBCALL and REG_RETVAL when deleting libcall sequence collapsed to a single instruction. From-SVN: r37037
2000-10-20combine.c (struct undo): Change int to unsigned int.Richard Kenner1-10/+14
* combine.c (struct undo): Change int to unsigned int. (do_SUBST_INT): Args are unsigned int. (make_extraction, force_to_mode): Use proper type when forming mask. (make_field_assignment): Likewise. From-SVN: r36967
2000-10-13Remove obstacks.Mark Mitchell1-9/+0
* Makefile.in (ggc-callbacks.o): Remove target. (flow.o): Depend on GGC_H. * alias.c (init_alias_analysis): Remove ggc_p conditionals. (end_alias_analysis): Likewise. * basic-block.h (init_flow): New function. (allocate_reg_life_data): Declare. * bb-reorder.c (function_obstack): Replace with ... (flow_obstack): ... new variable. (fixup_reorder_chain): Use it. * c-decl.c (ggc_p): Remove. (caller-save.c): Don't call oballoc/obfree. * combine.c (struct undobuf): Remove storage. (try_combine): Don't call oballoc. (undo_all): Don't call obfree. * cse.c (insert): Use xmalloc, not oballoc. (cse_main): Adjust accordingly. * dwarf2out.c (save_rtx): Remove obstack code. (dwarf2out_init): Remove ggc_p conditionals. * emit-rtl.c (rtl_obstack): Remove. (gen_rtx_CONST_INT): Remove ggc_p conditionals. (make_insn_raw): Likewise. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (gen_sequence): Likewise. (copy_insn_1): Remove handling of `b' RTL components. (init_emit_once): Remove ggc_p conditionals. * except.c (create_rethrow_ref): Don't fool with obstacks. (add_partial_entry): Likewise. (call_get_eh_context): Likewise. (begin_protect_partials): Likewise. (protect_with_terminate): Likewise. * explow.c (plus_constant_wide): Likewise. * expr.c (init_expr_once): Likewise. (emit_block_move): Likewise. (clear_storage): Likewise. (expand_expr): Likewise. * flow.c (function_obstack): Remove. (flow_obstack): New variable. (flow_firstobj): Likewise. (create_base_block): Use the flow_obstack. (split_block): Likewise. (split_edge): Likewise. (calculate_global_regs_live): Likewise. (allocate_bb_life_data): Make it static. Likewiwse. (init_flow): New function. (size_int_type_wide): Remove ggc_p conditionals. * function.c (push_function_context_to): Don't call save_tree_status. (pop_function_context_from): Or restore_tree_status. (assign_stack_local_1): Don't call push_obstacks. (find_fixup_replacement): Use xmalloc. (fixup_var_refs_insns): Free the storage. (insns_for_mem_walk): Don't mess with obstacks. (instantiate_decls): Likewise. (trampoline_address): Likewise. (expand_function_end): Likewise. * function.h (sturct function): Remove obstack-related variables. (save_tree_status): Don't declare. (restore_tree_status): Likewise. * gcse.c (compute_can_copy): Don't call oballoc/obfree. * genattrtab.c (operate_exp): Remove ggc_p conditionals. (simplify_cond): Likewise. (simplify_test_exp): Don't mess with obstacks. (optimize_attrs): Likewise. * gengenrtl.c (gendef): Don't include ggc_p conditionals. * ggc-callbacks.c (ggc_p): Remove. * ggc-none.c (ggc_p): Remove. * ggc.h (ggc_p): Don't declare. * integrate.c (save_for_inline): Don't mess with obstacks. (integrate_decl_tree): Likewise. (output_inline_function): Likewise. * lists.c (init_EXPR_INSN_LIST_cache): Likewise. * loop.c (temp_obstack): Remove. (rtl_obstack): Likewise. (init_loop): Don't mess with obstacks. (reg_address_cost): Free BIVs and GIVs. (check_insns_for_bivs): Use xmalloc, not oballoc. (find_mem_givs): Likewise. (record_biv): Likewise. (general_induction_var): Likewise. (product_cheap_p): Likewse. * optabs.c (init_one_libfunc): Remove ggc_p conditional. * print-tree.c (debug_tree): Don't use oballoc/obfree. (print_node): Likewise. * profile.c (output_func_start_profiler): Remove call to temporary_allocation. * reload1.c (eliminate_regs_in_insn): Don't mess with obstacks. * resource.c (mark_target_live_regs): Use xmalloc. (free_resource_info): Free the memory. * rtl.c (rtl_obstack): Remove. (rtvec_alloc): Don't mess with obstacks. (rtx_alloc): Likewise. (rtx_free): Remove. (copy_rtx): Don't handle `b' cases. (read_rtx): Use a local rtl_obstack. * rtl.h (oballoc): Remove. (obfree): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (allocate_bb_life_data): Likewise. (allocate_reg_life_data): Likewise. (rtx_free): Likewise. * sdbout.c (sdbout_queue_anonymous_type): Use tree_cons, not saveable_tree_cons. * simplify-rtx.c (cselib_init): Don't mess with obstacks. * stmt.c (mark_block_nesting): Mark the label_chain. (epxand_label): Use ggc_alloc, not oballoc. (clear_last_expr): Don't mess with obstacks. (expand_decl_cleanup): Likewise. (expand_dcc_cleanup): Likewise. (expand_dhc_cleanup): Likewise. (expand_anon_union_decl): Likewise. (add_case_node): Use xmalloc, not oballoc. (free_case_nodes): New function. (expand_end_case): Call it. * stor-layout.c (layout_type): Don't mess with obstacks. (layout_type): Likewise. * toplev.c (wrapup_global_declarations): Likewise. (compile_file): Remove ggc_p conditionals. (rest_of_compilation): Call init_flow. Remove ggc_p conditionals. (decode_f_option): Remove ggc_p conditionals. * tree.c (function_maybepermanent_obstack): Remove. (maybepermanent_obstack): Likewise. (function_obstack): Likewise. (tmeporary_obstack): Likewise. (momentary_obstack): Likewise. (temp_decl_obstack): Likewise. (saveable_obstack): Likewise. (rtl_obstack): Likewise. (current_obstack): Likewise. (expression_obstack): Likewise. (struct obstack_stack): Likewise. (obstack_stack): Likewise. (obstack_stack_obstack): Likewise. (maybepermanent_firstobj): Likewise. (temporary_firstobj): Likewise. (momentary_firstobj): Likewise. (temp_decl_firstobj): Likewise. (momentary_function_firstobj): Likewise. (all_types_permanent): Likewise. (struct momentary_level): Likewise. (momentary_stack): Likewise. (init_obstacks): Remove initialization of removed obstacks. (save_tree_status): Remove. (restore_tree_status): Likewise. (temporary_allocation): Liekwise. (end_temporary_allocation): Liekwise. (resume_temporary_allocation): Likewise. (saveable_allocation): Likewise. (push_obstacks): Likewise. (push_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (allocation_temporary_p): Likewise. (permanent_allocation): Likewise. (preserve_data): Likewise. (preserve_initializer): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (oballoc): Likewise. (obfree): Likewise. (savealloc): Likewise. (expralloc): Likewise. (print_obstack_name): Likewise. (debug_obstack): Likewise. (object_permanent_p): Likewise. (push_momentary): Likewise. (perserve_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (pop_momentary_nofree): Likewise. (suspend_momentary): Likewise. (resume_momentary): Likewise. (make_node): Don't set TREE_PERMANENT. (copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK. Don't set TREE_PERMANENT. (get_identifier): Remove ggc_p conditionals. (build_string): Likewise. (make_tree_vec): Likewise. (build_decl_list): Remove. (build_expr_list): Likewise. (tree_cons): Remove ggc_p conditionals. (decl_tree_cons): Remove. (expr_tree_cons): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (build1): Remove ggc_p conditionals. (build_parse_node): Likewise. (build_type_attribute_variant): Don't mess with obstacks. (build_type_copy): Likewise. (type_hash_canon): Likewise. (build_pointer_type): Likewise. (build_reference_type): Likewise. (build_index_type): Likewise. (build_range_type): Likewise. (dump_tree_statistics): Don't print obstack information. * tree.h (struct tree_common): Remove permanent_flag. (TREE_PERMANENT): Remove. (TREE_SET_PERMANENT): Likewise. (TYPE_OBSTACK): Likewise. (struct tree_type): Remove obstack. (oballoc): Remove. (savealloc): Likewise. (build_decl_list): Likewise. (build_expr_list): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (decl_tree_cons): Likewise. (expr_tree_cons): Likewise. (suspend_momentary): Likewise. (allocation_temporary_p): Likewise. (resume_momentary): Likewise. (push_obstacks_nochange): Likewise. (permanent_allocation): Likewise. (push_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (end_temporary_allocation): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (pop_momentary_nofree): LIkewise. (preserve_momentary): Likewise. (saveable_allocation): Likewise. (temporary_allocation): Likewise. (resume_temporary_allocation): Likewise. (perserve_initializer): Likewise. (debug_obstack): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (obfree): Likewise. * varasm.c (current_obstack): Remove. (saveable_obstack): Remove. (rtl_obstack): Remove. (immed_double_const): Don't mess with obstacks. (immed_real_cons): Likewise. (output_constant_def): Likewise. (init_varasm_status): Use xcalloc. (mark_pool_constant): Mark the pool constant itself. (free_varasm_status): Free memory. (decode_rtx_const): Call bzero directly, rather than expanding it inline. (record_rtx_const): Don't mess with obstacks. (force_const_mem): Likewise. * config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p conditionals. (aof_pic_entry): Likewise. * config/ia64/ia64.c (ia64_encode_section_info): Likewise. * config/m32r/m32r.c (m32r_encode_section_info): Likewise. * config/pa/pa.c (saveable_obstack): Remove. (rtl_obstack): Likewise. (current_obstack): Likewise. (output_call): Don't mess with obstacks. (hppa_encode_label): Remove ggc_p conditionals. * config/romp/romp.c (get_symref): Don't mess with obstacks. * config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional. (rs6000_encode_section_info): Likewise. * config/sh/sh.c (get_fpscr_rtx): Likewise. From-SVN: r36856
2000-09-19combine.c (can_combine_p): Don't substitute an ASM_OPERANDS into anything.Geoff Keating1-0/+2
* combine.c (can_combine_p): Don't substitute an ASM_OPERANDS into anything. From-SVN: r36525
2000-09-18combine.c (simplify_comparison): Shift a NOT out of a single bit test.Richard Henderson1-0/+15
* combine.c (simplify_comparison): Shift a NOT out of a single bit test. From-SVN: r36508
2000-09-18combine.c (if_then_else_cond): Canonicalize BImode true to STORE_FLAG_VALUE.Richard Henderson1-0/+8
* combine.c (if_then_else_cond): Canonicalize BImode true to STORE_FLAG_VALUE. * explow.c (trunc_int_for_mode): Likewise. From-SVN: r36507
2000-09-18combine.c (combine_simplify_rtx): Use gen_unary to distribute the NOT for De ↵Richard Henderson1-12/+8
Morgan's rule. * combine.c (combine_simplify_rtx): Use gen_unary to distribute the NOT for De Morgan's rule. * simplify-rtx.c (simplify_unary_operation): Simplify a BImode NOT of a comparison to the reverse comparison. From-SVN: r36506
2000-09-18* combine.c (try_combine): Allow split to create a single insn.Richard Henderson1-5/+11
From-SVN: r36504
2000-09-18machmode.def: Add BImode.Richard Henderson1-1/+9
* machmode.def: Add BImode. Add a column for bitsize. * machmode.h (DEF_MACHMODE): Adjust for extra column. (GET_MODE_BITSIZE): Use it. * rtl.c (DEF_MACHMODE): Adjust for extra column. (mode_bitsize): New. (mode_mask_array): Use bitsize. * combine.c (combine_simplify_rtx): Require inner and outer modes to match on nonzero_bits optimizations. From-SVN: r36501
2000-09-11combine.c (simplify_if_then_else): Don't convert a == b ? b ...Jakub Jelinek1-0/+2
* combine.c (simplify_if_then_else): Don't convert a == b ? b : a to a if the comparison is floating mode and not -ffast-math. * simplify-rtx.c (simplify_ternary_operation): Likewise. From-SVN: r36326
2000-09-08Some vector operation simplifications.Bernd Schmidt1-0/+39
From-SVN: r36263
2000-09-04combine.c (make_extraction): Fix rtx_cost comparison to match the comment.Jan Hubicka1-2/+2
* combine.c (make_extraction): Fix rtx_cost comparison to match the comment. From-SVN: r36131
2000-09-01Eliminate false DV warnings for predicated calls to noreturn functions.Jim Wilson1-0/+1
* calls.c (emit_call_1): Add REG_NORETURN note to call if ECF_NORETURN. * combine.c (distribute_notes): Handle REG_NORETURN. * rtl.c (reg_note_name): Add REG_NORETURN. * rtl.h (enum reg_note): Likewise. * config/ia64/ia64-protos.h (emit_safe_across_calls): Renamed from ia64_file_start. * config/ia64/ia64.c (emit_safe_across_calls): Likewise. (rtx_needs_barrier): Handle unspec_volatile 8 and 9. (emit_predicate_relation_info): Handle conditional calls with REG_NORETURN. * config/ia64/ia64.h (ASM_FILE_START): Call emit_safe_across_calls instead of ia64_file_start. * config/ia64/sysv4.h (ASM_FILE_START): Likewise. * config/ia64/ia64.md (safe_across_calls_all, save_across_calls_normal): New patterns. From-SVN: r36107
2000-08-18combine.c (make_compound_operation): Break after creating the extraction.Richard Henderson1-0/+1
* combine.c (make_compound_operation): Break after creating the extraction. From-SVN: r35799
2000-08-16combine.c (simplify_shift_const): Revert previous two changes.Richard Henderson1-15/+12
* combine.c (simplify_shift_const): Revert previous two changes. If SHIFT_COUNT_TRUNCATED, crop the shift count before the main loop. From-SVN: r35742
2000-08-15combine.c (simplify_shift_const): Bound shift count when combining shifts.Richard Henderson1-0/+5
* combine.c (simplify_shift_const): Bound shift count when combining shifts. From-SVN: r35739
2000-08-11* combine.c (simplify_shift_const): Obey SHIFT_COUNT_TRUNCATED.Richard Henderson1-4/+10
From-SVN: r35622
2000-08-04alias.c (mark_constant_function): Use INSN_P.Rodney Brown1-15/+9
* 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-04combine.c (recog_for_combine): Remove the old notes prior to attempting to ↵John Wehle1-3/+12
recognize the new pattern. * combine.c (recog_for_combine): Remove the old notes prior to attempting to recognize the new pattern. (distribute_notes): Ignore REG_NONNEG notes. From-SVN: r35492
2000-07-31* combine.c: Fix formatting.Kazu Hirata1-324/+321
From-SVN: r35398
2000-07-30combine.c (simplify_set, [...]): Use full mask instead of GET_MODE_MASK ↵Jan Hubicka1-6/+6
(mode) as force_to_mode argument. * combine.c (simplify_set, make_extraction, make_compound_operation make_field_assignment): Use full mask instead of GET_MODE_MASK (mode) as force_to_mode argument. From-SVN: r35348
2000-07-30* combine.c (if_then_else_cond): Be sure that mode fits in HOST_WIDE_INTJan Hubicka1-5/+8
From-SVN: r35347
2000-07-30combine.c (record_promoted_value): Allow bitsize of mode to be equivalent to ↵Jan Hubicka1-1/+1
HOST_BITS_PER_WISE_INT. * combine.c (record_promoted_value): Allow bitsize of mode to be equivalent to HOST_BITS_PER_WISE_INT. From-SVN: r35346
2000-07-30simplify-rtx.c (simplify_relational_operation): Verify that mode == VOIDmode ↵Jan Hubicka1-2/+7
implies both operands to be VOIDmode. * simplify-rtx.c (simplify_relational_operation): Verify that mode == VOIDmode implies both operands to be VOIDmode. (simplify_ternary_operation): Compute properly the mode of comparison. * combine.c (combine_simplify_rtx): Likewise. From-SVN: r35343
2000-06-13combine.c (subst): Use CLASS_CANNOT_CHANGE_MODE and ↵Richard Henderson1-11/+13
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-05-30* combine.c (get_pos_from_mask): Test exact_log2 result as signed.Richard Henderson1-2/+4
From-SVN: r34280
2000-05-29combine.c (force_to_mode): Convert subtraction from a constant to NEG or NOT ↵Richard Henderson1-1/+22
when conditions allow. * combine.c (force_to_mode) [MINUS]: Convert subtraction from a constant to NEG or NOT when conditions allow. From-SVN: r34248
2000-05-29combine.c (combine_simplify_rtx): Don't create an if_then_else unless both ↵Richard Henderson1-31/+48
args are general_operand. * combine.c (combine_simplify_rtx): Don't create an if_then_else unless both args are general_operand. Don't canonicalize plus to ior unless it helps. From-SVN: r34247
2000-05-28combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when substituting the REG ↵Geoff Keating1-0/+12
in a (subreg:X (reg:Y... * combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when substituting the REG in a (subreg:X (reg:Y ...)). From-SVN: r34217
2000-05-25combine.c (try_combine): Use any_condjump_p...Jan Hubicka1-1/+1
* 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-23* combine.c (simplify_comparison): Use trunc_int_for_mode.Richard Henderson1-3/+1
From-SVN: r34103
2000-05-21combine.c (try_combine): Handle i3_subst_into_i2 case when I2 is not a PARALLEL.Richard Kenner1-1/+1
* combine.c (try_combine): Handle i3_subst_into_i2 case when I2 is not a PARALLEL. From-SVN: r34068
2000-05-10* combine.c (try_combine): Fix a typo.Kazu Hirata1-1/+1
From-SVN: r33837
2000-05-04rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and MEM_ALIAS_SET.Richard Kenner1-5/+2
* rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and MEM_ALIAS_SET. * alias.c (canon_rtx): Don't copy RTX_UNCHANGING_P or MEM_ALIAS_SET when calling MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword, change_address): Likewise. * explow.c (stabilize): Likewise. * expr.c (protect_from_queue, emit_move_insn_1): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * combine.c (combine_simplify_rtx): Don't copy RTX_UNCHANGING_P when calling MEM_COPY_ATTRIBUTES. (make_extraction, simplify_shift_const, gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Likewise. * function.c (fixup_var_refs_1, purge_addressof_1): Likewise. * optabs.c (gen_move_insn): Likewise. * recog.c (validate_replace_rtx_1): Likewise. * simplify-rtx.c (add_mem_for_addr): Likewise. * stmt.c (expand_anon_union_decl): Likewise. * config/arm/arm.md: Likewise. * config/h8300/h7300.c (fix_bit_operand): Likewise. * config/m88k/m88k.c (legitimize_address, block_move_loop): Likewise. (block_move_no_loop, block_move_sequence): Likewise. * config/rs6000/rs6000.c (expand_block_move_mem): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. Clear MEM_ALIAS_SET. * final.c (alter_subreg): Don't copy MEM_ALIAS_SET when calling MEM_COPY_ATTRIBUTES. From-SVN: r33665
2000-04-25combine.c (combine_instructions): Add missing argument to try_combine.Richard Henderson1-1/+2
* combine.c (combine_instructions): Add missing argument to try_combine. From-SVN: r33408
2000-04-25Do not try to combine a sequence of insns when the second insn has beenNick Clifton1-6/+15
replaced by a note. From-SVN: r33398
2000-04-24combine.c (try_combine): Update reg_nonzero_bits of newi2pat before newpat.Hiroyuki Machida1-3/+3
* combine.c (try_combine): Update reg_nonzero_bits of newi2pat before newpat. From-SVN: r33376
2000-04-14Fix ia64 gdb miscompilation reported by Kevin Buettner.Jim Wilson1-0/+7
* combine.c (force_to_mode, case LSHIFTRT): Check that shift shift plus mask size is smaller or equal to the mode size. From-SVN: r33157
2000-04-05md.texi (Standard Names): Clarify when movX is needed.Hans-Peter Nilsson1-7/+4
* md.texi (Standard Names): Clarify when movX is needed. * combine.c (simplify_comparison) [MINUS]: Do not replace all (op (minus A B) 0) with (op A B). From-SVN: r32940
2000-03-29Convert ACCUMULATE_OUTGOING_ARGS to an expression.Jan Hubicka1-2/+16
* calls.c (PUSH_ARGS_REVERSED) Change to expression. (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value. (struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS. (save_fixed_argument_area, restore_fixed_argument_area): conditionize by #ifdef REG_PARM_STACK_SPACE only. (emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS. (precompute_register_parameters): Avoid #ifdefs on ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED. (stire_one_args): Likewise. (expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS. (emit_library_call_value_1): Likewise. (compute_argument_block_size): Align to STACK_BOUNDARY only for ACCUMULATE_OUTGOING_ARGS. * combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value. (nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH. (use_crosses_set_p): Likewise. * all targets (ACCUMULATE_OUTGOING_ARGS define): Change to #define ACCUMULATE_OUTGOING_ARGS 1. * i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS frames. * i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New constants. (TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros. (TARGET_SWITCHES): Add push-args, no-push-args, accumulate-outgoing-args and no-accumulate-outgoing-args. (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro. * expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default. (push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS and PUSH_ROUNDING. (emit_push_insn): Likewise. * final.c (ACCUMULATE_OUTGOING_ARGS): Provide default. (final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS. * function.c (ACCUMULATE_OUTGOING_ARGS): Provide default. (STACK_DYNAMIC_OFFSET): Define correctly for both ACCUMULATE_OUTGOING_ARGS and normal mode. * invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document. * tm.texi (PUSH_ARGS): Document. (ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation. From-SVN: r32803
2000-03-25* Rework fields used to describe positions of bitfields andRichard Kenner1-141/+178
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-02-25Copyright fixesJeff Law1-1/+2
From-SVN: r32172
2000-02-25toplev.c (rest_of_compilation): Rebuild jump labels if combine_instructions ↵Anthony Green1-18/+43
has created a new direct jump. * toplev.c (rest_of_compilation): Rebuild jump labels if combine_instructions has created a new direct jump. * combine.c (try_combine): Add new_direct_jump_p argument. Set it when appropriate. (combine_instructions): Call try_combine with new argument. Return non-null value when new direct jump instruction is created. * rtl.h: combine_instructions returns an int. From-SVN: r32162
2000-02-13* combine.c (simplify_comparison): Fix typo.Jeffrey A Law1-1/+1
From-SVN: r31959
2000-02-10combine.c (make_extraction, [...]): Avoid warning on mixed-signedness ↵Richard Kenner1-6/+10
conditionals. * combine.c (make_extraction, force_to_mode): Avoid warning on mixed-signedness conditionals. (make_field_assignment, nonzero_bits): Likewise. * expmed.c (store_fixed_bit_field): ALIGN arg now unsigned. (store_split_bit_field, extract_split_bit_field): Likewise. (extract_fixed_bit_field, store_bit_field, * expr.c: Change alignment to be unsigned everywhere. (move_by_pieces, store_constructor_field, store_constructor): Alignment parm is unsigned. (emit_block_move, emit_group_load, emit_group_store): Likewise. (clear_storage, emit_push_insn, compare_from_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (move_by_pieces_ninsns, clear_by_pieces): Likewise. Compare align with GET_MODE_ALIGNMENT. (expand_expr_unaligned): Pointer to alignment is pointer to unsigned. (get_inner_reference): Likewise. (copy_blkmode_from_reg, emit_push_insn): Remove unneeded casts. (expand_assignment): Local vars for alignment now unsigned. (store_constructor, store_field, expand_expr, do_jump): Likewise. (do_compare_and_jump): Likewise. (store_field): Call new function expr_align. * expr.h (emit_block_move, emit_group_load, emit_group_store): Alignment arg now unsigned. (clear_storage, emit_push_insn, compare_from_rtx): Likewise. (do_compare_rtx_and_jump, store_bit_field): Likewise. (extract_bit_field): Likewise. * fold-const.c (add_double): Add cast to eliminate signedness warning. * machmode.h (GET_MODE_ALIGNMENT): Result is unsigned. (get_best_mode): Alignment arg is unsigned. * rtl.h (move_by_pieces): Likewise. * store-layout.c (maximum_field_alignment, set_alignment): Now unsigned. (layout_decl): Alignment arg is now unsigned. Remove unneeded casts. (layout_record, layout_union, layout_type): Remove unneeded casts. Local alignment variables now unsigned. (get_best_mode): Alignment arg now unsigned. * tree.c (expr_align): New function. * tree.h (expr_align): Likewise. (maximum_field_alignment, set_alignment): Now unsigned. (get_inner_reference): Alignment argument is now pointer to unsigned. * varasm.c (assemble_variable): Add cast to eliminate warning. From-SVN: r31904
2000-02-06Makefile.in (c-common.o): Depend on $(EXPR_H).Kaveh R. Ghazi1-0/+1
* Makefile.in (c-common.o): Depend on $(EXPR_H). * c-common.c: Include expr.h. * c-pragma.c (mark_align_stack): Add prototype. * caller-save.c (add_stored_regs): Likewise. * combine.c (record_promoted_value): Likewise. * i386.c (ix86_sched_reorder_pentium, ix86_sched_reorder_ppro): Likewise. * cppinit.c (new_pending_define): Likewise. * cpplib.c (skip_block_comment, skip_line_comment): Likewise. * dwarf2out.c (save_rtx, splice_child_die, reverse_die_lists, AT_class, AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, AT_loc, AT_addr, AT_lbl, get_AT_ref, free_AT, free_die, local_scope_p, class_scope_p): Likewise. * dwarf2out.h (dwarf2out_set_demangle_name_func, dwarf2out_add_library_unit_info): Likewise. * ggc.h (ggc_page_print_statistics): Likewise. * haifa-sched.c (propagate_deps): Likewise. * reg-stack.c (next_flags_user, record_label_references): Likewise. * rtl.h (set_stack_check_libfunc): Likewise. * toplev.h (set_fatal_function): Likewise. * toplev.c (set_fatal_function): Delete prototype. * diagnostic.c: Deconstify functions returning malloc'ed ptrs. From-SVN: r31810
2000-01-31combine.c (try_combine): Trying to check the missed case 3->2 combining ↵Chandra Chavva1-0/+12
(combining with splitting) in... * combine.c (try_combine) [HAVE_cc0]: Trying to check the missed case 3->2 combining (combining with splitting) in which 2 is CC0 setter/user and 3 is user. The rest of cases 2->1 and 3->2 are checked at the begining of the function with the aid of calling function 'can_combine_p'. From-SVN: r31727
2000-01-24rtl.def: Add unordered fp comparisions.Richard Henderson1-5/+12
* rtl.def: Add unordered fp comparisions. * tree.def: Likewise. * tree.h: Add ISO C 9x unordered fp comparision builtins. * builtins.c (expand_tree_builtin): New function. * c-typeck.c (build_function_call): Use it. (build_binary_op): Support unordered compares. * c-common.c (c_common_nodes_and_builtins): Add unordered compares. * combine.c (known_cond): Handle reverse_condition returning UNKNOWN. (reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed. * cse.c (fold_rtx): Check FLOAT_MODE_P before reversing. (record_jump_equiv): Handle reverse_condition returning UNKNOWN. * jump.c (reverse_condition): Don't abort for UNLE etc, but return UNKNOWN. (swap_condition): Handle unordered compares. (thread_jumps): Check can_reverse before reversing. * loop.c (get_condition): Likewise. Allow UNORERED/ORDERED to be reversed for FP. * optabs.c (can_compare_p): New argument CODE. Verify branch or setcc is present before acking for cmp_optab. Update all callers. (prepare_float_lib_cmp, init_optabs): Handle UNORDERED. * expmed.c (do_cmp_and_jump): Update for can_compare_p. * expr.c (expand_expr): Likewise. Support unordered compares. (do_jump, do_store_flag): Likewise. * expr.h (enum libfunc_index): Add unordered compares. * Makefile.in (FPBIT_FUNCS): Add _unord_sf. (DPBIT_FUNCS): Add _unord_df. * config/fp-bit.c (_unord_f2): New. * fp-test.c (main): Try unordered compare builtins. * alpha-protos.h (alpha_fp_comparison_operator): Declare. * alpha.c (alpha_comparison_operator): Check mode properly. (alpha_swapped_comparison_operator): Likewise. (signed_comparison_operator): Likewise. (alpha_fp_comparison_operator): New. (alpha_emit_conditional_branch): Handle unordered compares. * alpha.h (PREDICATE_CODES): Update. * alpha.md (fp compares): Use alpha_fp_comparison_operator. (bunordered, bordered): New. * cp/call.c (build_over_call): Use expand_tree_builtin. * cp/typeck.c (build_function_call_real): Likewise. (build_binary_op_nodefault): Handle unordered compares. * gcc.c-torture/execute/ieee/fp-cmp-4.c: New. From-SVN: r31591
2000-01-17combine.c (combine_simplify_rtx): Give FLOAT_STORE_FLAG_VALUE a mode.Richard Henderson1-3/+7
* combine.c (combine_simplify_rtx): Give FLOAT_STORE_FLAG_VALUE a mode. * cse.c (find_comparison_args, fold_rtx): Likewise. * integrate.c (subst_constants): Likewise. * loop.c (get_condition): Likewise. * tm.texi (FLOAT_STORE_FLAG_VALUE): Update docs. * alpha.h (FLOAT_STORE_FLAG_VALUE): Use REAL_VALUE_ATOF. From-SVN: r31479
2000-01-14cccp.c: PROTO -> PARAMS.Kaveh R. Ghazi1-68/+68
* cccp.c: PROTO -> PARAMS. * cexp.y: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.h: Likewise. * cse.c: Likewise. * dbxout.c: Likewise. * dbxout.h: Likewise. * diagnostic.c: Likewise. * doprint.c: Likewise. * dwarf2out.c: Likewise. * dwarf2out.h: Likewise. * dwarfout.c: Likewise. * dwarfout.h: Likewise. * dyn-string.h: Likewise. From-SVN: r31399