diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-10-02 10:55:33 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-10-02 10:55:33 +0000 |
commit | be099f3724af96e861e07aae1fcf2b81b4897c53 (patch) | |
tree | 1d5d4d1e2df98959771b82cc259421ee6b547483 /gcc/dojump.c | |
parent | 5d11b4bf36d7fc16f634a9d508ab5cc2ec47ab8d (diff) | |
download | gcc-be099f3724af96e861e07aae1fcf2b81b4897c53.zip gcc-be099f3724af96e861e07aae1fcf2b81b4897c53.tar.gz gcc-be099f3724af96e861e07aae1fcf2b81b4897c53.tar.bz2 |
dojump.h (do_jump): Delete.
* dojump.h (do_jump): Delete.
(do_jump_1): Likewise.
(split_comparison): Move around.
* dojump.c (do_jump): Make static.
(do_jump_1): Likewise.
(jumpifnot): Move around.
(jumpifnot_1): Likewise.
(jumpif): Likewise.
(jumpif_1): Likewise.
* expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
From-SVN: r264781
Diffstat (limited to 'gcc/dojump.c')
-rw-r--r-- | gcc/dojump.c | 75 |
1 files changed, 41 insertions, 34 deletions
diff --git a/gcc/dojump.c b/gcc/dojump.c index 56c82c5f..9dccc72 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -38,6 +38,8 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" static bool prefer_and_bit_test (scalar_int_mode, int); +static void do_jump (tree, rtx_code_label *, rtx_code_label *, + profile_probability); static void do_jump_by_parts_greater (scalar_int_mode, tree, tree, int, rtx_code_label *, rtx_code_label *, profile_probability); @@ -118,38 +120,6 @@ restore_pending_stack_adjust (saved_pending_stack_adjust *save) } } -/* Expand conditional expressions. */ - -/* Generate code to evaluate EXP and jump to LABEL if the value is zero. */ - -void -jumpifnot (tree exp, rtx_code_label *label, profile_probability prob) -{ - do_jump (exp, label, NULL, prob.invert ()); -} - -void -jumpifnot_1 (enum tree_code code, tree op0, tree op1, rtx_code_label *label, - profile_probability prob) -{ - do_jump_1 (code, op0, op1, label, NULL, prob.invert ()); -} - -/* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ - -void -jumpif (tree exp, rtx_code_label *label, profile_probability prob) -{ - do_jump (exp, NULL, label, prob); -} - -void -jumpif_1 (enum tree_code code, tree op0, tree op1, - rtx_code_label *label, profile_probability prob) -{ - do_jump_1 (code, op0, op1, NULL, label, prob); -} - /* Used internally by prefer_and_bit_test. */ static GTY(()) rtx and_reg; @@ -197,7 +167,7 @@ prefer_and_bit_test (scalar_int_mode mode, int bitnum) OP0 CODE OP1 . IF_FALSE_LABEL and IF_TRUE_LABEL like in do_jump. PROB is probability of jump to if_true_label. */ -void +static void do_jump_1 (enum tree_code code, tree op0, tree op1, rtx_code_label *if_false_label, rtx_code_label *if_true_label, profile_probability prob) @@ -417,7 +387,7 @@ do_jump_1 (enum tree_code code, tree op0, tree op1, PROB is probability of jump to if_true_label. */ -void +static void do_jump (tree exp, rtx_code_label *if_false_label, rtx_code_label *if_true_label, profile_probability prob) { @@ -946,6 +916,43 @@ split_comparison (enum rtx_code code, machine_mode mode, } } +/* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. + PROB is probability of jump to LABEL. */ + +void +jumpif (tree exp, rtx_code_label *label, profile_probability prob) +{ + do_jump (exp, NULL, label, prob); +} + +/* Similar to jumpif but dealing with exploded comparisons of the type + OP0 CODE OP1 . LABEL and PROB are like in jumpif. */ + +void +jumpif_1 (enum tree_code code, tree op0, tree op1, rtx_code_label *label, + profile_probability prob) +{ + do_jump_1 (code, op0, op1, NULL, label, prob); +} + +/* Generate code to evaluate EXP and jump to LABEL if the value is zero. + PROB is probability of jump to LABEL. */ + +void +jumpifnot (tree exp, rtx_code_label *label, profile_probability prob) +{ + do_jump (exp, label, NULL, prob.invert ()); +} + +/* Similar to jumpifnot but dealing with exploded comparisons of the type + OP0 CODE OP1 . LABEL and PROB are like in jumpifnot. */ + +void +jumpifnot_1 (enum tree_code code, tree op0, tree op1, rtx_code_label *label, + profile_probability prob) +{ + do_jump_1 (code, op0, op1, label, NULL, prob.invert ()); +} /* Like do_compare_and_jump but expects the values to compare as two rtx's. The decision as to signed or unsigned comparison must be made by the caller. |