Skip to content

Commit

Permalink
combine: Change return type of predicate functions from int to bool
Browse files Browse the repository at this point in the history
Also change some internal variables and function arguments from int to bool.

gcc/ChangeLog:

    * combine.cc (struct reg_stat_type): Change last_set_invalid to bool.
    (cant_combine_insn_p): Change return type from int to bool and adjust
    function body accordingly.
    (can_combine_p): Ditto.
    (combinable_i3pat): Ditto.  Change "i1_not_in_src" and "i0_not_in_src"
    function arguments from int to bool.
    (contains_muldiv): Change return type from int to bool and adjust
    function body accordingly.
    (try_combine): Ditto. Change "new_direct_jump" pointer function
    argument from int to bool.  Change "substed_i2", "substed_i1",
    "substed_i0", "added_sets_0", "added_sets_1", "added_sets_2",
    "i2dest_in_i2src", "i1dest_in_i1src", "i2dest_in_i1src",
    "i0dest_in_i0src", "i1dest_in_i0src", "i2dest_in_i0src",
    "i2dest_killed", "i1dest_killed", "i0dest_killed", "i1_feeds_i2_n",
    "i0_feeds_i2_n", "i0_feeds_i1_n", "i3_subst_into_i2", "have_mult",
    "swap_i2i3", "split_i2i3" and "changed_i3_dest" variables
    from int to bool.
    (subst): Change "in_dest", "in_cond" and "unique_copy" function
    arguments from int to bool.
    (combine_simplify_rtx): Change "in_dest" and "in_cond" function
    arguments from int to bool.
    (make_extraction): Change "unsignedp", "in_dest" and "in_compare"
    function argument from int to bool.
    (force_int_to_mode): Change "just_select" function argument
    from int to bool.  Change "next_select" variable to bool.
    (rtx_equal_for_field_assignment_p): Change return type from
    int to bool and adjust function body accordingly.
    (merge_outer_ops): Ditto.  Change "pcomp_p" pointer function
    argument from int to bool.
    (get_last_value_validate): Change return type from int to bool
    and adjust function body accordingly.
    (reg_dead_at_p): Ditto.
    (reg_bitfield_target_p): Ditto.
    (combine_instructions): Ditto.  Change "new_direct_jump"
    variable to bool.
    (can_combine_p): Change return type from int to bool
    and adjust function body accordingly.
    (likely_spilled_retval_p): Ditto.
    (can_change_dest_mode): Change "added_sets" function argument
    from int to bool.
    (find_split_point): Change "unsignedp" variable to bool.
    (simplify_if_then_else): Change "comparison_p" and "swapped"
    variables to bool.
    (simplify_set): Change "other_changed" variable to bool.
    (expand_compound_operation): Change "unsignedp" variable to bool.
    (force_to_mode): Change "just_select" function argument
    from int to bool.  Change "next_select" variable to bool.
    (extended_count): Change "unsignedp" function argument to bool.
    (simplify_shift_const_1): Change "complement_p" variable to bool.
    (simplify_comparison): Change "changed" variable to bool.
    (rest_of_handle_combine): Change return type to void.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Uros.
  • Loading branch information
ubizjak authored and ouuleilei-bot committed Jul 17, 2023
1 parent c2d62cd commit e5f754d
Showing 1 changed file with 259 additions and 251 deletions.
Loading

0 comments on commit e5f754d

Please sign in to comment.