GCC Middle and Back End API Reference
|
Functions | |
static bool | prefer_and_bit_test (enum machine_mode, int) |
static void | do_jump_by_parts_greater (tree, tree, int, rtx, rtx, int) |
static void | do_jump_by_parts_equality (tree, tree, rtx, rtx, int) |
static void | do_compare_and_jump (tree, tree, enum rtx_code, enum rtx_code, rtx, rtx, int) |
static int | inv () |
void | init_pending_stack_adjust () |
void | discard_pending_stack_adjust () |
void | clear_pending_stack_adjust () |
void | do_pending_stack_adjust () |
void | jumpifnot () |
void | jumpifnot_1 () |
void | jumpif () |
void | jumpif_1 () |
static bool | prefer_and_bit_test () |
void | do_jump_1 (enum tree_code code, tree op0, tree op1, rtx if_false_label, rtx if_true_label, int prob) |
void | do_jump () |
static void | do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0, rtx op1, rtx if_false_label, rtx if_true_label, int prob) |
static void | do_jump_by_parts_zero_rtx (enum machine_mode mode, rtx op0, rtx if_false_label, rtx if_true_label, int prob) |
static void | do_jump_by_parts_equality_rtx (enum machine_mode mode, rtx op0, rtx op1, rtx if_false_label, rtx if_true_label, int prob) |
bool | split_comparison (enum rtx_code code, enum machine_mode mode, enum rtx_code *code1, enum rtx_code *code2) |
void | do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp, enum machine_mode mode, rtx size, rtx if_false_label, rtx if_true_label, int prob) |
Variables | |
static rtx | and_reg |
static rtx | and_test |
static rtx | shift_test |
void clear_pending_stack_adjust | ( | void | ) |
When exiting from function, if safe, clear out any pending stack adjust so the adjustment won't get done. Note, if the current function calls alloca, then it must have a frame pointer regardless of the value of flag_omit_frame_pointer.
References function::calls_alloca, cfun, and discard_pending_stack_adjust().
Referenced by expand_function_end(), expand_naked_return(), and expand_null_return_1().
void discard_pending_stack_adjust | ( | void | ) |
Discard any pending stack adjustment. This avoid relying on the RTL optimizers to remove useless adjustments when we know the stack pointer value is dead.
Referenced by clear_pending_stack_adjust(), and emit_stack_restore().
|
static |
Generate code for a comparison expression EXP (including code to compute the values to be compared) and a conditional jump to IF_FALSE_LABEL and/or IF_TRUE_LABEL. One of the labels can be NULL_RTX, in which case the generated code will drop through. SIGNED_CODE should be the rtx operation for this comparison for signed data; UNSIGNED_CODE, likewise for use if data is unsigned. We force a stack adjustment unless there are currently things pushed on the stack that aren't yet used.
References do_compare_rtx_and_jump(), emit_insn(), expand_normal(), expr_size(), gen_reg_rtx(), and type().
Referenced by do_jump_1().
void do_compare_rtx_and_jump | ( | rtx | op0, |
rtx | op1, | ||
enum rtx_code | code, | ||
int | unsignedp, | ||
enum machine_mode | mode, | ||
rtx | size, | ||
rtx | if_false_label, | ||
rtx | if_true_label, | ||
int | prob | ||
) |
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. If MODE is BLKmode, SIZE is an RTX giving the size of the objects being compared.
References can_compare_p(), ccp_jump, code_to_optab(), do_compare_rtx_and_jump(), do_jump_by_parts_equality_rtx(), do_jump_by_parts_greater_rtx(), do_pending_stack_adjust(), emit_cmp_and_jump_insns(), emit_jump(), emit_label(), gen_label_rtx(), have_insn_for(), inv(), reverse_condition(), reverse_condition_maybe_unordered(), simplify_relational_operation(), split_comparison(), swap_commutative_operands_p(), swap_condition(), unknown_optab, and unsigned_condition().
Referenced by add_test(), compare_and_jump_seq(), do_cmp_and_jump(), do_compare_and_jump(), do_compare_rtx_and_jump(), do_jump(), do_jump_by_parts_equality_rtx(), do_jump_by_parts_greater_rtx(), do_jump_by_parts_zero_rtx(), do_jump_if_equal(), emit_store_flag_force(), expand_abs(), expand_doubleword_shift(), expand_errno_check(), expand_expr_real_2(), and rtl_lv_add_condition_to_bb().
void do_jump | ( | ) |
Generate code to evaluate EXP and jump to IF_FALSE_LABEL if the result is zero, or IF_TRUE_LABEL if the result is one. Either of IF_FALSE_LABEL and IF_TRUE_LABEL may be zero, meaning fall through in that case. do_jump always does any pending stack adjust except when it does not actually perform a jump. An example where there is no jump is when EXP is `(foo (), 0)' and IF_FALSE_LABEL is null. PROB is probability of jump to if_true_label, or -1 if unknown.
References build_int_cstu(), compare_tree_int(), copy_to_reg(), do_compare_rtx_and_jump(), do_jump_1(), do_pending_stack_adjust(), emit_jump(), emit_label(), expand_normal(), gen_label_rtx(), have_insn_for(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, integer_onep(), integer_zerop(), inv(), mode_for_size(), optimize_insn_for_speed_p(), prefer_and_bit_test(), prob, shift, tree_floor_log2(), type(), lang_hooks_for_types::type_for_mode, and lang_hooks::types.
Referenced by do_jump_1(), expand_expr_real_1(), jumpif(), and jumpifnot().
void do_jump_1 | ( | enum tree_code | code, |
tree | op0, | ||
tree | op1, | ||
rtx | if_false_label, | ||
rtx | if_true_label, | ||
int | prob | ||
) |
Subroutine of do_jump, dealing with exploded comparisons of the type OP0 CODE OP1 . IF_FALSE_LABEL and IF_TRUE_LABEL like in do_jump. PROB is probability of jump to if_true_label, or -1 if unknown.
References can_compare_p(), ccp_jump, do_compare_and_jump(), do_jump(), do_jump_by_parts_equality(), do_jump_by_parts_greater(), do_pending_stack_adjust(), emit_label(), gen_label_rtx(), integer_zerop(), and inv().
Referenced by do_jump(), jumpif_1(), and jumpifnot_1().
|
static |
Given an EQ_EXPR expression EXP for values too wide to be compared with one insn, test the comparison and jump to the appropriate label.
References do_jump_by_parts_equality_rtx(), and expand_normal().
Referenced by do_jump_1().
|
static |
Test for the equality of two RTX expressions OP0 and OP1 in mode MODE, where MODE is an integer mode too wide to be compared with one insn. Either (but not both) of IF_TRUE_LABEL and IF_FALSE_LABEL may be NULL_RTX to indicate drop through.
References do_compare_rtx_and_jump(), do_jump_by_parts_zero_rtx(), emit_jump(), emit_label(), gen_label_rtx(), operand_subword_force(), and word_mode.
Referenced by do_compare_rtx_and_jump(), and do_jump_by_parts_equality().
|
static |
Given a comparison expression EXP for values too wide to be compared with one insn, test the comparison and jump to the appropriate label. The code of EXP is ignored; we always test GT if SWAP is 0, and LT if SWAP is 1.
References do_jump_by_parts_greater_rtx(), and expand_normal().
Referenced by do_jump_1().
|
static |
Compare OP0 with OP1, word at a time, in mode MODE. UNSIGNEDP says to do unsigned comparison. Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise.
References do_compare_rtx_and_jump(), emit_jump(), emit_label(), gen_label_rtx(), inv(), operand_subword_force(), and word_mode.
Referenced by do_compare_rtx_and_jump(), and do_jump_by_parts_greater().
|
static |
Jump according to whether OP0 is 0. We assume that OP0 has an integer mode, MODE, that is too wide for the available compare insns. Either Either (but not both) of IF_TRUE_LABEL and IF_FALSE_LABEL may be NULL_RTX to indicate drop through.
References do_compare_rtx_and_jump(), emit_jump(), emit_label(), emit_move_insn(), expand_binop(), gen_label_rtx(), gen_reg_rtx(), operand_subword_force(), OPTAB_WIDEN, and word_mode.
Referenced by do_jump_by_parts_equality_rtx().
void do_pending_stack_adjust | ( | void | ) |
Pop any previously-pushed arguments that have not been popped yet.
References adjust_stack().
Referenced by allocate_dynamic_stack_space(), asan_emit_stack_protection(), do_compare_rtx_and_jump(), do_jump(), do_jump_1(), emit_block_move_via_loop(), emit_case_decision_tree(), emit_conditional_add(), emit_conditional_move(), emit_jump(), emit_stack_save(), emit_store_flag_1(), expand_asm_operands(), expand_builtin_apply(), expand_call(), expand_case(), expand_computed_goto(), expand_expr_real_1(), expand_expr_real_2(), expand_fix(), expand_float(), expand_function_end(), expand_gimple_basic_block(), expand_gimple_tailcall(), expand_label(), expand_naked_return(), expand_null_return_1(), expand_sdiv_pow2(), expand_sjlj_dispatch_table(), expand_stack_save(), gen_cond_trap(), store_constructor(), store_expr(), store_one_arg(), try_casesi(), and try_tablejump().
void init_pending_stack_adjust | ( | void | ) |
At the start of a function, record that we have no previously-pushed arguments waiting to be popped.
|
inlinestatic |
Invert probability if there is any. -1 stands for unknown.
References prob.
Referenced by best_gain_for_invariant(), check_dependency(), compute_inverse(), create_new_invariant(), do_compare_rtx_and_jump(), do_jump(), do_jump_1(), do_jump_by_parts_greater_rtx(), find_invariant_insn(), find_invariants_to_move(), find_or_insert_inv(), free_inv_motion_data(), hash_invariant_expr_1(), iv_number_of_iterations(), jumpifnot(), jumpifnot_1(), merge_identical_invariants(), move_invariant_reg(), move_invariants(), record_uses(), and set_move_mark().
void jumpif | ( | ) |
Generate code to evaluate EXP and jump to LABEL if the value is nonzero.
References do_jump().
Referenced by store_constructor().
void jumpif_1 | ( | ) |
References do_jump_1().
Referenced by expand_gimple_cond().
void jumpifnot | ( | ) |
Expand conditional expressions.
Generate code to evaluate EXP and jump to LABEL if the value is zero. LABEL is an rtx of code CODE_LABEL, in this function and all the functions here.
References do_jump(), and inv().
Referenced by expand_expr_real_2(), and store_expr().
void jumpifnot_1 | ( | ) |
References do_jump_1(), and inv().
Referenced by expand_expr_real_2(), and expand_gimple_cond().
|
static |
@verbatim Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Include expr.h after insn-config.h so we get HAVE_conditional_move.
Referenced by do_jump().
|
static |
Compare the relative costs of "(X & (1 << BITNUM))" and "(X >> BITNUM) & 1", where X is an arbitrary register of mode MODE. Return true if the former is preferred.
References gen_rtx_REG(), immed_double_int_const(), optimize_insn_for_speed_p(), and rtx_cost().
bool split_comparison | ( | enum rtx_code | code, |
enum machine_mode | mode, | ||
enum rtx_code * | code1, | ||
enum rtx_code * | code2 | ||
) |
Split a comparison into two others, the second of which has the other "orderedness". The first is always ORDERED or UNORDERED if MODE does not honor NaNs (which means that it can be skipped in that case; see do_compare_rtx_and_jump). The two conditions are written in *CODE1 and *CODE2. Return true if the conditions must be ANDed, false if they must be ORed.
Referenced by do_compare_rtx_and_jump(), and emit_store_flag().
|
static |
Used internally by prefer_and_bit_test.
|
static |
|
static |