GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | optab_libcall_d |
struct | convert_optab_libcall_d |
struct | target_optabs |
struct | extraction_insn |
struct | expand_operand |
Typedefs | |
typedef enum optab_tag | optab |
typedef enum optab_tag | convert_optab |
typedef enum optab_tag | direct_optab |
Enumerations | |
enum | optab_subtype { optab_default, optab_scalar, optab_vector } |
enum | can_compare_purpose { ccp_jump, ccp_cmov, ccp_store_flag } |
enum | extraction_pattern { EP_insv, EP_extv, EP_extzv } |
enum | expand_operand_type { EXPAND_FIXED, EXPAND_OUTPUT, EXPAND_INPUT, EXPAND_CONVERT_TO, EXPAND_CONVERT_FROM, EXPAND_ADDRESS, EXPAND_INTEGER } |
Functions | |
static optab | code_to_optab () |
static enum rtx_code | optab_to_code () |
enum insn_code | raw_optab_handler (unsigned) |
bool | swap_optab_enable (optab, enum machine_mode, bool) |
rtx | expand_widen_pattern_expr (sepops ops, rtx op0, rtx op1, rtx wide_op, rtx target, int unsignedp) |
rtx | expand_ternary_op (enum machine_mode mode, optab ternary_optab, rtx op0, rtx op1, rtx op2, rtx target, int unsignedp) |
rtx | expand_binop (enum machine_mode, optab, rtx, rtx, rtx, int, enum optab_methods) |
rtx | simplify_expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, rtx target, int unsignedp, enum optab_methods methods) |
bool | force_expand_binop (enum machine_mode, optab, rtx, rtx, rtx, int, enum optab_methods) |
rtx | sign_expand_binop (enum machine_mode, optab, optab, rtx, rtx, rtx, int, enum optab_methods) |
int | expand_twoval_unop (optab, rtx, rtx, rtx, int) |
int | expand_twoval_binop (optab, rtx, rtx, rtx, rtx, int) |
bool | expand_twoval_binop_libfunc (optab, rtx, rtx, rtx, rtx, enum rtx_code) |
rtx | expand_unop (enum machine_mode, optab, rtx, rtx, int) |
rtx | expand_abs_nojump (enum machine_mode, rtx, rtx, int) |
rtx | expand_abs (enum machine_mode, rtx, rtx, int, int) |
rtx | expand_one_cmpl_abs_nojump (enum machine_mode, rtx, rtx) |
rtx | expand_copysign (rtx, rtx, rtx) |
void | emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code) |
bool | maybe_emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code) |
enum insn_code | find_widening_optab_handler_and_mode (optab, enum machine_mode, enum machine_mode, int, enum machine_mode *) |
optab | optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype) |
int | can_compare_p (enum rtx_code, enum machine_mode, enum can_compare_purpose) |
enum insn_code | can_extend_p (enum machine_mode, enum machine_mode, int) |
rtx | gen_extend_insn (rtx, rtx, enum machine_mode, enum machine_mode, int) |
void | set_optab_libfunc (optab, enum machine_mode, const char *) |
void | set_conv_libfunc (convert_optab, enum machine_mode, enum machine_mode, const char *) |
void | init_sync_libfuncs (int max) |
void | expand_fixed_convert (rtx, rtx, int, int) |
void | expand_float (rtx, rtx, int) |
enum insn_code | can_float_p (enum machine_mode, enum machine_mode, int) |
bool | can_compare_and_swap_p (enum machine_mode, bool) |
bool | can_atomic_exchange_p (enum machine_mode, bool) |
bool | expand_atomic_compare_and_swap (rtx *, rtx *, rtx, rtx, rtx, bool, enum memmodel, enum memmodel) |
void | expand_mem_thread_fence (enum memmodel) |
void | expand_mem_signal_fence (enum memmodel) |
bool | supportable_convert_operation (enum tree_code, tree, tree, tree *, enum tree_code *) |
void | expand_fix (rtx, rtx, int) |
bool | expand_sfix_optab (rtx, rtx, convert_optab) |
rtx | expand_widening_mult (enum machine_mode, rtx, rtx, rtx, int, optab) |
bool | expand_vec_cond_expr_p (tree, tree) |
rtx | expand_vec_cond_expr (tree, tree, tree, tree, rtx) |
rtx | expand_vec_shift_expr (sepops, rtx) |
bool | can_vec_perm_p (enum machine_mode, bool, const unsigned char *) |
rtx | expand_vec_perm (enum machine_mode, rtx, rtx, rtx, rtx) |
int | can_mult_highpart_p (enum machine_mode, bool) |
rtx | expand_mult_highpart (enum machine_mode, rtx, rtx, rtx, bool) |
static enum insn_code | optab_handler () |
static enum insn_code | convert_optab_handler (convert_optab op, enum machine_mode to_mode, enum machine_mode from_mode) |
static enum insn_code | widening_optab_handler (optab op, enum machine_mode to_mode, enum machine_mode from_mode) |
static enum insn_code | direct_optab_handler () |
static bool | trapv_unoptab_p () |
static bool | trapv_binoptab_p () |
rtx | optab_libfunc (optab optab, enum machine_mode mode) |
rtx | convert_optab_libfunc (convert_optab optab, enum machine_mode mode1, enum machine_mode mode2) |
bool | get_best_reg_extraction_insn (extraction_insn *, enum extraction_pattern, unsigned HOST_WIDE_INT, enum machine_mode) |
bool | get_best_mem_extraction_insn (extraction_insn *, enum extraction_pattern, HOST_WIDE_INT, HOST_WIDE_INT, enum machine_mode) |
bool | insn_operand_matches (enum insn_code icode, unsigned int opno, rtx operand) |
static void | create_expand_operand (struct expand_operand *op, enum expand_operand_type type, rtx value, enum machine_mode mode, bool unsigned_p) |
static void | create_fixed_operand () |
static void | create_output_operand (struct expand_operand *op, rtx x, enum machine_mode mode) |
static void | create_input_operand (struct expand_operand *op, rtx value, enum machine_mode mode) |
static void | create_convert_operand_to (struct expand_operand *op, rtx value, enum machine_mode mode, bool unsigned_p) |
static void | create_convert_operand_from (struct expand_operand *op, rtx value, enum machine_mode mode, bool unsigned_p) |
void | create_convert_operand_from_type (struct expand_operand *op, rtx value, tree type) |
static void | create_address_operand () |
static void | create_integer_operand () |
bool | valid_multiword_target_p (rtx) |
bool | maybe_legitimize_operands (enum insn_code icode, unsigned int opno, unsigned int nops, struct expand_operand *ops) |
rtx | maybe_gen_insn (enum insn_code icode, unsigned int nops, struct expand_operand *ops) |
bool | maybe_expand_insn (enum insn_code icode, unsigned int nops, struct expand_operand *ops) |
bool | maybe_expand_jump_insn (enum insn_code icode, unsigned int nops, struct expand_operand *ops) |
void | expand_insn (enum insn_code icode, unsigned int nops, struct expand_operand *ops) |
void | expand_jump_insn (enum insn_code icode, unsigned int nops, struct expand_operand *ops) |
rtx | prepare_operand (enum insn_code, rtx, int, enum machine_mode, enum machine_mode, int) |
void | gen_int_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_fp_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_signed_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_unsigned_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_int_fp_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_intv_fp_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_int_fp_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_int_fp_signed_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_int_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_int_signed_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_int_unsigned_fixed_libfunc (optab, const char *, char, enum machine_mode) |
void | gen_interclass_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_int_to_fp_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_ufloat_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_int_to_fp_nondecimal_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_fp_to_int_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_intraclass_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_trunc_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_extend_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_fract_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_fractuns_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_satfract_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
void | gen_satfractuns_conv_libfunc (convert_optab, const char *, enum machine_mode, enum machine_mode) |
Variables | |
const optab | code_to_optab_ [NUM_RTX_CODE] |
enum rtx_code | optab_to_code_ [NUM_OPTABS] |
struct convert_optab_libcall_d | convlib_def [NUM_CONVLIB_OPTABS] |
struct optab_libcall_d | normlib_def [NUM_NORMLIB_OPTABS] |
struct target_optabs | default_target_optabs |
struct target_optabs * | this_fn_optabs |
struct target_optabs * | this_target_optabs |
typedef enum optab_tag convert_optab |
typedef enum optab_tag direct_optab |
enum can_compare_purpose |
enum expand_operand_type |
enum extraction_pattern |
enum optab_subtype |
bool can_atomic_exchange_p | ( | enum | machine_mode, |
bool | |||
) |
Return true if there is an inline atomic exchange pattern.
bool can_compare_and_swap_p | ( | enum | machine_mode, |
bool | |||
) |
Return true if there is an inline compare and swap pattern.
int can_compare_p | ( | enum rtx_code | code, |
enum machine_mode | mode, | ||
enum can_compare_purpose | purpose | ||
) |
Nonzero if a compare of mode MODE can be done straightforwardly (without splitting it into pieces).
Nonzero if we can perform a comparison of mode MODE straightforwardly. PURPOSE describes how this comparison will be used. CODE is the rtx comparison code we will be using. ??? Actually, CODE is slightly weaker than that. A target is still required to implement all of the normal bcc operations, but not required to implement all (or any) of the unordered bcc operations.
References ccp_cmov, ccp_jump, ccp_store_flag, insn_operand_matches(), and optab_handler().
Referenced by do_compare_rtx_and_jump(), do_jump_1(), emit_cmp_and_jump_insns(), emit_store_flag(), emit_store_flag_force(), and prepare_cmp_insn().
enum insn_code can_extend_p | ( | enum machine_mode | to_mode, |
enum machine_mode | from_mode, | ||
int | unsignedp | ||
) |
Return the INSN_CODE to use for an extend operation.
Return the insn code used to extend FROM_MODE to TO_MODE. UNSIGNEDP specifies zero-extension instead of sign-extension. If no such operation exists, CODE_FOR_nothing will be returned.
References convert_optab_handler().
Referenced by assign_parm_setup_reg(), compress_float_constant(), convert_move(), gen_extend_insn(), and init_expr_target().
enum insn_code can_float_p | ( | enum | machine_mode, |
enum | machine_mode, | ||
int | |||
) |
Return the insn_code for a FLOAT_EXPR.
References convert_optab_handler().
Referenced by expand_float(), simplify_float_conversion_using_ranges(), and supportable_convert_operation().
int can_mult_highpart_p | ( | enum | machine_mode, |
bool | |||
) |
Return non-zero if target supports a given highpart multiplication.
bool can_vec_perm_p | ( | enum machine_mode | mode, |
bool | variable, | ||
const unsigned char * | sel | ||
) |
Return tree if target supports vector operations for VEC_PERM_EXPR.
Return true if VEC_PERM_EXPR can be expanded using SIMD extensions of the CPU. SEL may be NULL, which stands for an unknown constant.
References direct_optab_handler(), mode_for_vector(), optab_handler(), and targetm.
Referenced by can_mult_highpart_p(), lower_vec_perm(), simplify_vector_constructor(), vect_gen_perm_mask(), vect_grouped_load_supported(), vect_grouped_store_supported(), and vect_transform_slp_perm_load().
|
inlinestatic |
References code_to_optab_.
Referenced by do_compare_rtx_and_jump(), expand_simple_binop(), expand_simple_unop(), have_insn_for(), noce_emit_move_insn(), and prepare_float_lib_cmp().
|
inlinestatic |
Return the insn used to perform conversion OP from mode FROM_MODE to mode TO_MODE; return CODE_FOR_nothing if the target does not have such an insn.
References raw_optab_handler(), and unknown_optab.
Referenced by can_extend_p(), can_fix_p(), can_float_p(), convert_move(), expand_fixed_convert(), expand_sfix_optab(), get_multi_vector_move(), get_vcond_icode(), and vect_lanes_optab_supported_p().
rtx convert_optab_libfunc | ( | convert_optab | optab, |
enum machine_mode | mode1, | ||
enum machine_mode | mode2 | ||
) |
Return libfunc corresponding operation defined by OPTAB converting from MODE2 to MODE1. Trigger lazy initialization if needed, return NULL if no libfunc is available.
References convlib_def, convert_optab_libcall_d::libcall_basename, convert_optab_libcall_d::libcall_gen, libfunc_entry::libfunc, libfunc_entry::mode1, libfunc_entry::mode2, and libfunc_entry::op.
Referenced by convert_move(), debug_optab_libfuncs(), expand_fix(), expand_fixed_convert(), and expand_float().
|
inlinestatic |
Make OP describe an input Pmode address operand. VALUE is the value of the address, but it may need to be converted to Pmode first.
References create_expand_operand(), and EXPAND_ADDRESS.
Referenced by emit_indirect_jump(), expand_builtin___clear_cache(), and expand_builtin_prefetch().
|
inlinestatic |
Make OP describe an input operand that should have the same value as VALUE, after any mode conversion that the backend might request. If VALUE is a CONST_INT, it should be treated as having mode MODE. UNSIGNED_P says whether VALUE is unsigned.
References create_expand_operand(), and EXPAND_CONVERT_FROM.
Referenced by create_convert_operand_from_type(), expand_ternary_op(), expand_twoval_binop(), expand_twoval_unop(), expand_unop_direct(), expand_widen_pattern_expr(), and set_storage_via_setmem().
void create_convert_operand_from_type | ( | struct expand_operand * | op, |
rtx | value, | ||
tree | type | ||
) |
Make OP describe an input operand that should have the same value as VALUE, after any mode conversion that the target might request. TYPE is the type of VALUE.
References create_convert_operand_from().
Referenced by expand_vec_shift_expr(), and try_casesi().
|
inlinestatic |
Like create_input_operand, except that VALUE must first be converted to mode MODE. UNSIGNED_P says whether VALUE is unsigned.
References create_expand_operand(), and EXPAND_CONVERT_TO.
Referenced by allocate_dynamic_stack_space(), emit_block_move_via_movmem(), expand_atomic_compare_and_swap(), maybe_emit_atomic_exchange(), maybe_emit_op(), maybe_emit_sync_lock_test_and_set(), set_storage_via_setmem(), and store_bit_field_1().
|
inlinestatic |
Initialize OP with the given fields. Initialise the other fields to their default values.
References type(), expand_operand::unsigned_p, and expand_operand::value.
Referenced by create_address_operand(), create_convert_operand_from(), create_convert_operand_to(), create_fixed_operand(), create_input_operand(), create_integer_operand(), and create_output_operand().
|
inlinestatic |
Make OP describe an operand that must use rtx X, even if X is volatile.
References create_expand_operand(), and EXPAND_FIXED.
Referenced by allocate_dynamic_stack_space(), emit_block_move_via_movmem(), emit_conditional_add(), emit_conditional_move(), emit_cstore(), emit_storent_insn(), expand_assignment(), expand_atomic_compare_and_swap(), expand_atomic_load(), expand_atomic_store(), expand_builtin_strlen(), expand_expr_real_1(), expand_LOAD_LANES(), expand_movstr(), expand_STORE_LANES(), expand_twoval_binop(), expand_twoval_unop(), expand_vec_cond_expr(), expand_vec_perm_1(), extract_bit_field_using_extv(), maybe_emit_atomic_exchange(), maybe_emit_atomic_test_and_set(), maybe_emit_op(), maybe_emit_sync_lock_test_and_set(), set_storage_via_setmem(), store_bit_field_1(), store_bit_field_using_insv(), and try_casesi().
|
inlinestatic |
Make OP describe an input operand that must have mode MODE and value VALUE; MODE cannot be VOIDmode. The backend may request that VALUE be copied into a different kind of rtx before being passed as an operand.
References create_expand_operand(), and EXPAND_INPUT.
Referenced by emit_conditional_add(), emit_conditional_move(), emit_single_push_insn_1(), emit_storent_insn(), expand_assignment(), expand_atomic_store(), expand_binop_directly(), expand_builtin_set_thread_pointer(), expand_mult_highpart(), expand_STORE_LANES(), expand_vec_cond_expr(), expand_vec_perm_1(), expand_vec_shift_expr(), extract_bit_field_1(), maybe_emit_unop_insn(), probe_stack_range(), store_bit_field_1(), store_bit_field_using_insv(), try_casesi(), and vector_compare_rtx().
|
inlinestatic |
Make OP describe an input operand that has value INTVAL and that has no inherent mode. This function should only be used for operands that are always expand-time constants. The backend may request that INTVAL be copied into a different kind of rtx, but it must specify the mode of that rtx if so.
References create_expand_operand(), and EXPAND_INTEGER.
Referenced by emit_block_move_via_movmem(), expand_atomic_compare_and_swap(), expand_atomic_load(), expand_atomic_store(), expand_builtin_prefetch(), expand_builtin_strlen(), extract_bit_field_1(), extract_bit_field_using_extv(), maybe_emit_atomic_exchange(), maybe_emit_atomic_test_and_set(), maybe_emit_op(), set_storage_via_setmem(), store_bit_field_1(), and store_bit_field_using_insv().
|
inlinestatic |
Make OP describe an output operand that must have mode MODE. X, if nonnull, is a suggestion for where the output should be stored. It is OK for VALUE to be inconsistent with MODE, although it will just be ignored in that case.
References create_expand_operand(), and EXPAND_OUTPUT.
Referenced by emit_conditional_add(), emit_conditional_move(), emit_cstore(), expand_atomic_compare_and_swap(), expand_atomic_load(), expand_binop_directly(), expand_builtin_interclass_mathfn(), expand_builtin_strlen(), expand_builtin_thread_pointer(), expand_expr_real_1(), expand_LOAD_LANES(), expand_movstr(), expand_mult_highpart(), expand_ternary_op(), expand_unop_direct(), expand_vec_cond_expr(), expand_vec_perm_1(), expand_vec_shift_expr(), expand_widen_pattern_expr(), extract_bit_field_1(), extract_bit_field_using_extv(), maybe_emit_atomic_exchange(), maybe_emit_atomic_test_and_set(), maybe_emit_op(), maybe_emit_sync_lock_test_and_set(), and maybe_emit_unop_insn().
|
inlinestatic |
Return the insn used to implement mode MODE of OP, or CODE_FOR_nothing if the target does not have such an insn.
References optab_handler().
Referenced by can_atomic_exchange_p(), can_compare_and_swap_p(), can_conditionally_move_p(), can_vec_perm_p(), default_secondary_reload(), emit_block_move_via_movmem(), emit_conditional_move(), expand_atomic_compare_and_swap(), expand_atomic_load(), expand_atomic_store(), expand_builtin_set_thread_pointer(), expand_builtin_strcmp(), expand_builtin_thread_pointer(), expand_vec_perm(), get_optab_extraction_insn(), maybe_emit_atomic_exchange(), maybe_emit_op(), prepare_cmp_insn(), and set_storage_via_setmem().
Generate an instruction with a given INSN_CODE with an output and an input.
References do_compare_rtx_and_jump(), emit_label(), emit_move_insn(), expand_abs_nojump(), expand_unop(), gen_label_rtx(), and gen_reg_rtx().
Referenced by expand_builtin_fabs(), expand_divmod(), and expand_expr_real_2().
Expand the absolute value operation.
Emit code to compute the absolute value of OP0, with result to TARGET if convenient. (TARGET may be 0.) The return value says where the result actually is to be found. MODE is the mode of the operand; the mode of the result is different but can be deduced from MODE.
References delete_insns_since(), expand_absneg_bit(), expand_binop(), expand_shift(), expand_unop(), get_last_insn(), last, optab_handler(), OPTAB_LIB_WIDEN, OPTAB_WIDEN, and optimize_insn_for_speed_p().
Referenced by expand_abs(), and noce_try_abs().
bool expand_atomic_compare_and_swap | ( | rtx * | ptarget_bool, |
rtx * | ptarget_oval, | ||
rtx | mem, | ||
rtx | expected, | ||
rtx | desired, | ||
bool | is_weak, | ||
enum memmodel | succ_model, | ||
enum memmodel | fail_model | ||
) |
Generate code for a compare and swap.
This function expands the atomic compare exchange operation: *PTARGET_BOOL is an optional place to store the boolean success/failure. *PTARGET_OVAL is an optional place to store the old value from memory. Both target parameters may be NULL to indicate that we do not care about that return value. Both target parameters are updated on success to the actual location of the corresponding result. MEMMODEL is the memory model variant to use. The return value of the function is true for success.
References copy_to_reg(), create_convert_operand_to(), create_fixed_operand(), create_integer_operand(), create_output_operand(), direct_optab_handler(), emit_library_call_value(), emit_store_flag_force(), expand_insn(), find_cc_set(), gen_reg_rtx(), get_last_insn(), have_insn_for(), insn_data, LCT_NORMAL, maybe_expand_insn(), note_stores(), insn_data_d::operand, optab_handler(), optab_libfunc(), ptr_mode, reg_overlap_mentioned_p(), and expand_operand::value.
Referenced by expand_atomic_load(), expand_builtin_atomic_compare_exchange(), expand_builtin_compare_and_swap(), and expand_compare_and_swap_loop().
rtx expand_binop | ( | enum machine_mode | mode, |
optab | binoptab, | ||
rtx | op0, | ||
rtx | op1, | ||
rtx | target, | ||
int | unsignedp, | ||
enum optab_methods | methods | ||
) |
Expand a binary operation given optab and rtx operands.
Generate code to perform an operation specified by BINOPTAB on operands OP0 and OP1, with result having machine-mode MODE. UNSIGNEDP is for the case where we have to widen the operands to perform the operation. It says to use zero-extension. If TARGET is nonzero, the value is generated there, if it is convenient to do so. In all cases an rtx is returned for the locus of the value; this may or may not be TARGET.
References avoid_expensive_constant(), commutative_optab_p(), convert_move(), convert_to_mode(), copy_rtx(), delete_insns_since(), emit_clobber(), emit_insn(), emit_libcall_block_1(), emit_library_call_value(), emit_move_insn(), emit_store_flag_force(), end_sequence(), expand_binop(), expand_binop_directly(), expand_doubleword_mult(), expand_doubleword_shift(), expand_vector_broadcast(), force_reg(), gen_reg_rtx(), get_insns(), get_last_insn(), HOST_WIDE_INT, last, LCT_CONST, negate_rtx(), operand_subword(), operand_subword_force(), OPTAB_DIRECT, optab_handler(), OPTAB_LIB, OPTAB_LIB_WIDEN, optab_libfunc(), OPTAB_MUST_WIDEN, optab_to_code(), OPTAB_WIDEN, optimize_insn_for_speed_p(), rtx_equal_p(), set_dst_reg_note(), shift_optab_p(), start_sequence(), swap_commutative_operands_with_target(), targetm, trapv_binoptab_p(), unknown_optab, valid_multiword_target_p(), expand_operand::value, widen_operand(), widened_mode(), widening_optab_handler(), and word_mode.
Referenced by adjust_stack_1(), allocate_dynamic_stack_space(), asan_emit_stack_protection(), do_jump_by_parts_zero_rtx(), emit_push_insn(), emit_single_push_insn_1(), emit_store_flag(), emit_store_flag_1(), expand_abs_nojump(), expand_absneg_bit(), expand_and(), expand_binop(), expand_binop_directly(), expand_builtin_mathfn_2(), expand_builtin_next_arg(), expand_builtin_signbit(), expand_copysign(), expand_copysign_absneg(), expand_copysign_bit(), expand_ctz(), expand_dec(), expand_divmod(), expand_doubleword_clz(), expand_doubleword_mult(), expand_expr_real_2(), expand_ffs(), expand_fix(), expand_float(), expand_inc(), expand_mult(), expand_mult_highpart(), expand_one_cmpl_abs_nojump(), expand_parity(), expand_sdiv_pow2(), expand_shift_1(), expand_simple_binop(), expand_smod_pow2(), expand_subword_shift(), expand_unop(), expand_widening_mult(), expmed_mult_highpart_optab(), extract_fixed_bit_field(), extract_split_bit_field(), find_shift_sequence(), noce_emit_move_insn(), noce_try_sign_mask(), optimize_bitfield_assignment_op(), probe_stack_range(), push_block(), round_push(), sign_expand_binop(), simplify_expand_binop(), store_expr(), store_fixed_bit_field(), and widen_leading().
void expand_insn | ( | enum insn_code | icode, |
unsigned int | nops, | ||
struct expand_operand * | ops | ||
) |
Emit instruction ICODE, using operands [OPS, OPS + NOPS) as its operands.
References maybe_expand_insn().
Referenced by allocate_dynamic_stack_space(), expand_assignment(), expand_atomic_compare_and_swap(), expand_builtin_set_thread_pointer(), expand_builtin_thread_pointer(), expand_expr_real_1(), expand_LOAD_LANES(), expand_movstr(), expand_mult_highpart(), expand_STORE_LANES(), expand_ternary_op(), expand_vec_cond_expr(), expand_vec_shift_expr(), and expand_widen_pattern_expr().
void expand_jump_insn | ( | enum insn_code | icode, |
unsigned int | nops, | ||
struct expand_operand * | ops | ||
) |
Like expand_insn, but for jumps.
References maybe_expand_jump_insn().
Referenced by emit_indirect_jump(), and try_casesi().
void expand_mem_signal_fence | ( | enum | memmodel | ) |
void expand_mem_thread_fence | ( | enum | memmodel | ) |
Generate memory barriers.
Generate code for MULT_HIGHPART_EXPR.
Expand a highpart multiply.
References can_mult_highpart_p(), create_input_operand(), create_output_operand(), expand_binop(), expand_insn(), expand_vec_perm(), gen_reg_rtx(), gen_rtx_CONST_VECTOR(), insn_data, insn_data_d::operand, optab_handler(), OPTAB_LIB_WIDEN, rtvec_alloc(), and expand_operand::value.
Referenced by expand_expr_real_2().
Expand the one's complement absolute value operation.
bool expand_sfix_optab | ( | rtx | , |
rtx | , | ||
convert_optab | |||
) |
Generate code for float to integral conversion.
rtx expand_ternary_op | ( | enum machine_mode | mode, |
optab | ternary_optab, | ||
rtx | op0, | ||
rtx | op1, | ||
rtx | op2, | ||
rtx | target, | ||
int | unsignedp | ||
) |
Generate code to perform an operation specified by TERNARY_OPTAB on operands OP0, OP1 and OP2, with result having machine-mode MODE. UNSIGNEDP is for the case where we have to widen the operands to perform the operation. It says to use zero-extension. If TARGET is nonzero, the value is generated there, if it is convenient to do so. In all cases an rtx is returned for the locus of the value; this may or may not be TARGET.
References create_convert_operand_from(), create_output_operand(), expand_insn(), optab_handler(), and expand_operand::value.
Referenced by expand_builtin_mathfn_ternary(), and expand_expr_real_2().
Generate code to perform an operation on two operands with two results.
Generate code to perform an operation specified by BINOPTAB on operands OP0 and OP1, with two results to TARG1 and TARG2. We assume that the order of the operands for the instruction is TARG0, OP0, OP1, TARG1, which would fit a pattern like [(set TARG0 (operate OP0 OP1)) (set TARG1 (operate ...))]. Either TARG0 or TARG1 may be zero, but what that means is that the result is not actually wanted. We will generate it into a dummy pseudo-reg and discard it. They may not both be zero. Returns 1 if this operation can be performed; 0 if not.
References avoid_expensive_constant(), convert_modes(), convert_move(), create_convert_operand_from(), create_fixed_operand(), delete_insns_since(), expand_twoval_binop(), gen_reg_rtx(), get_last_insn(), insn_data, last, maybe_expand_insn(), insn_data_d::operand, and optab_handler().
Referenced by expand_divmod(), and expand_twoval_binop().
bool expand_twoval_binop_libfunc | ( | optab | binoptab, |
rtx | op0, | ||
rtx | op1, | ||
rtx | targ0, | ||
rtx | targ1, | ||
enum rtx_code | code | ||
) |
Generate code to perform an operation on two operands with two results, using a library function.
Expand the two-valued library call indicated by BINOPTAB, but preserve only one of the values. If TARG0 is non-NULL, the first value is placed into TARG0; otherwise the second value is placed into TARG1. Exactly one of TARG0 and TARG1 must be non-NULL. The value stored into TARG0 or TARG1 is equivalent to (CODE OP0 OP1). This routine assumes that the value returned by the library call is as if the return value was of an integral mode twice as wide as the mode of OP0. Returns 1 if the call was successful.
References emit_libcall_block(), emit_library_call_value(), end_sequence(), get_insns(), LCT_CONST, optab_libfunc(), simplify_gen_subreg(), smallest_mode_for_size(), and start_sequence().
Referenced by expand_divmod().
Generate code to perform an operation on one operand with two results.
Generate code to perform an operation specified by UNOPPTAB on operand OP0, with two results to TARG0 and TARG1. We assume that the order of the operands for the instruction is TARG0, TARG1, OP0. Either TARG0 or TARG1 may be zero, but what that means is that the result is not actually wanted. We will generate it into a dummy pseudo-reg and discard it. They may not both be zero. Returns 1 if this operation can be performed; 0 if not.
References convert_modes(), convert_move(), create_convert_operand_from(), create_fixed_operand(), delete_insns_since(), expand_twoval_unop(), gen_reg_rtx(), get_last_insn(), last, maybe_expand_insn(), and optab_handler().
Referenced by expand_builtin_cexpi(), expand_builtin_mathfn_3(), expand_builtin_sincos(), and expand_twoval_unop().
Expand a unary arithmetic operation given optab rtx operand.
Generate code to perform an operation specified by UNOPTAB on operand OP0, with result having machine-mode MODE. UNSIGNEDP is for the case where we have to widen the operands to perform the operation. It says to use zero-extension. If TARGET is nonzero, the value is generated there, if it is convenient to do so. In all cases an rtx is returned for the locus of the value; this may or may not be TARGET.
References convert_move(), delete_insns_since(), emit_insn(), emit_libcall_block_1(), emit_library_call_value(), emit_move_insn(), end_sequence(), expand_absneg_bit(), expand_binop(), expand_ctz(), expand_doubleword_bswap(), expand_doubleword_clz(), expand_ffs(), expand_parity(), expand_shift(), expand_unop(), expand_unop_direct(), gen_reg_rtx(), get_insns(), get_last_insn(), hard_libcall_value(), last, LCT_CONST, operand_subword(), operand_subword_force(), OPTAB_DIRECT, optab_handler(), OPTAB_LIB_WIDEN, optab_libfunc(), optab_to_code(), OPTAB_WIDEN, simplify_gen_unary(), start_sequence(), trapv_unoptab_p(), valid_multiword_target_p(), expand_operand::value, widen_bswap(), widen_leading(), widen_operand(), and word_mode.
Referenced by emit_cstore(), emit_store_flag(), emit_store_flag_1(), expand_abs(), expand_abs_nojump(), expand_builtin_bswap(), expand_builtin_mathfn(), expand_builtin_mathfn_3(), expand_builtin_unop(), expand_copysign_absneg(), expand_divmod(), expand_doubleword_bswap(), expand_expr_real_2(), expand_fix(), expand_mult(), expand_mult_const(), expand_one_cmpl_abs_nojump(), expand_parity(), expand_simple_unop(), expand_unop(), expand_unop_direct(), negate_rtx(), noce_emit_move_insn(), widen_bswap(), and widen_leading().
Generate code for VEC_COND_EXPR.
Generate insns for a VEC_COND_EXPR, given its TYPE and its three operands.
References build_zero_cst(), create_fixed_operand(), create_input_operand(), create_output_operand(), expand_insn(), expand_normal(), get_vcond_icode(), expand_operand::value, and vector_compare_rtx().
Referenced by do_store_flag(), and expand_expr_real_2().
Return tree if target supports vector operations for COND_EXPR.
rtx expand_widen_pattern_expr | ( | sepops | ops, |
rtx | op0, | ||
rtx | op1, | ||
rtx | wide_op, | ||
rtx | target, | ||
int | unsignedp | ||
) |
Define functions given in optabs.c.
Expand vector widening operations. There are two different classes of operations handled here: 1) Operations whose result is wider than all the arguments to the operation. Examples: VEC_UNPACK_HI/LO_EXPR, VEC_WIDEN_MULT_HI/LO_EXPR In this case OP0 and optionally OP1 would be initialized, but WIDE_OP wouldn't (not relevant for this case). 2) Operations whose result is of the same size as the last argument to the operation, but wider than all the other arguments to the operation. Examples: WIDEN_SUM_EXPR, VEC_DOT_PROD_EXPR. In the case WIDE_OP, OP0 and optionally OP1 would be initialized. E.g, when called to expand the following operations, this is how the arguments will be initialized: nops OP0 OP1 WIDE_OP widening-sum 2 oprnd0 - oprnd1 widening-dot-product 3 oprnd0 oprnd1 oprnd2 widening-mult 2 oprnd0 oprnd1 - type-promotion (vec-unpack) 1 oprnd0 - -
References separate_ops::code, create_convert_operand_from(), create_output_operand(), expand_insn(), separate_ops::op0, separate_ops::op1, separate_ops::op2, optab_default, optab_for_tree_code(), optab_handler(), separate_ops::type, and expand_operand::value.
Referenced by expand_expr_real_2().
rtx expand_widening_mult | ( | enum machine_mode | mode, |
rtx | op0, | ||
rtx | op1, | ||
rtx | target, | ||
int | unsignedp, | ||
optab | this_optab | ||
) |
Generate code for a widening multiply.
Perform a widening multiplication and return an rtx for the result. MODE is mode of value; OP0 and OP1 are what to multiply (rtx's); TARGET is a suggestion for where to store the result (an rtx). THIS_OPTAB is the optab we should use, it must be either umul_widen_optab or smul_widen_optab. We check specially for a constant integer as OP1, comparing the cost of a widening multiply against the cost of a sequence of shifts and adds.
References choose_mult_variant(), convert_modes(), convert_to_mode(), expand_binop(), expand_mult_const(), expand_shift(), floor_log2(), HOST_WIDE_INT, mul_widen_cost(), OPTAB_LIB_WIDEN, and optimize_insn_for_speed_p().
Referenced by expand_expr_real_2().
enum insn_code find_widening_optab_handler_and_mode | ( | optab | op, |
enum machine_mode | to_mode, | ||
enum machine_mode | from_mode, | ||
int | permit_non_widening, | ||
enum machine_mode * | found_mode | ||
) |
Find a widening optab even if it doesn't widen as much as we want. E.g. if from_mode is HImode, and to_mode is DImode, and there is no direct HI->SI insn, then return SI->DI, if that exists. If PERMIT_NON_WIDENING is non-zero then this can be used with non-widening optabs also.
References handler(), and widening_optab_handler().
Referenced by convert_mult_to_widen(), and convert_plusminus_to_widen().
bool force_expand_binop | ( | enum machine_mode | mode, |
optab | binoptab, | ||
rtx | op0, | ||
rtx | op1, | ||
rtx | target, | ||
int | unsignedp, | ||
enum optab_methods | methods | ||
) |
Like simplify_expand_binop, but always put the result in TARGET. Return true if the expansion succeeded.
References emit_move_insn(), and simplify_expand_binop().
Referenced by expand_doubleword_shift(), expand_sjlj_dispatch_table(), expand_subword_shift(), expand_superword_shift(), and shift_return_value().
void gen_extend_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Pick proper libcall for extend_optab. We need to chose if we do truncation or extension and interclass or intraclass.
References gen_interclass_conv_libfunc(), and gen_intraclass_conv_libfunc().
Generate the body of an insn to extend Y (with mode MFROM) into X (with mode MTO). Do zero-extension if UNSIGNEDP is nonzero.
References can_extend_p().
Referenced by assign_parm_setup_reg().
void gen_fixed_libfunc | ( | optab | optable, |
const char * | opname, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that fixed-point operation is involved.
References gen_libfunc().
Referenced by gen_int_fixed_libfunc(), and gen_int_fp_fixed_libfunc().
void gen_fp_libfunc | ( | optab | optable, |
const char * | opname, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that FP and set decimal prefix if needed.
References gen_libfunc(), memcpy(), and strlen().
Referenced by gen_int_fp_fixed_libfunc(), gen_int_fp_libfunc(), gen_int_fp_signed_fixed_libfunc(), and gen_intv_fp_libfunc().
void gen_fp_to_int_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Same as gen_interclass_conv_libfunc but verify that we are producing fp->int conversion with no decimal floating point involved.
References gen_interclass_conv_libfunc().
void gen_fract_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Pick proper libcall for fract_optab. We need to chose if we do interclass or intraclass.
References gen_interclass_conv_libfunc(), and gen_intraclass_conv_libfunc().
void gen_fractuns_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Pick proper libcall for fractuns_optab.
References gen_interclass_conv_libfunc().
void gen_int_fixed_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that INT or FIXED operation is involved.
References gen_fixed_libfunc(), and gen_int_libfunc().
void gen_int_fp_fixed_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that FP or INT or FIXED operation is involved.
References gen_fixed_libfunc(), gen_fp_libfunc(), and gen_int_libfunc().
void gen_int_fp_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that FP or INT operation is involved.
References gen_fp_libfunc(), and gen_int_libfunc().
void gen_int_fp_signed_fixed_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that FP or INT or signed FIXED operation is involved.
References gen_fp_libfunc(), gen_int_libfunc(), and gen_signed_fixed_libfunc().
void gen_int_libfunc | ( | optab | optable, |
const char * | opname, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that integer operation is involved.
References gen_libfunc(), and word_mode.
Referenced by gen_int_fixed_libfunc(), gen_int_fp_fixed_libfunc(), gen_int_fp_libfunc(), gen_int_fp_signed_fixed_libfunc(), gen_int_signed_fixed_libfunc(), gen_int_unsigned_fixed_libfunc(), and gen_intv_fp_libfunc().
void gen_int_signed_fixed_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that INT or signed FIXED operation is involved.
References gen_int_libfunc(), and gen_signed_fixed_libfunc().
void gen_int_to_fp_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Same as gen_interclass_conv_libfunc but verify that we are producing int->fp conversion.
References gen_interclass_conv_libfunc().
Referenced by gen_ufloat_conv_libfunc().
void gen_int_to_fp_nondecimal_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Same as gen_interclass_conv_libfunc but verify that we are producing fp->int conversion.
References gen_interclass_conv_libfunc().
void gen_int_unsigned_fixed_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that INT or unsigned FIXED operation is involved.
References gen_int_libfunc(), and gen_unsigned_fixed_libfunc().
void gen_interclass_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Initialize the libfunc fields of an entire group of entries of an inter-mode-class conversion optab. The string formation rules are similar to the ones for init_libfuncs, above, but instead of having a mode name and an operand count these functions have two mode names and no operand count.
References memcpy(), set_conv_libfunc(), strlen(), and targetm.
Referenced by gen_extend_conv_libfunc(), gen_fp_to_int_conv_libfunc(), gen_fract_conv_libfunc(), gen_fractuns_conv_libfunc(), gen_int_to_fp_conv_libfunc(), gen_int_to_fp_nondecimal_conv_libfunc(), gen_satfract_conv_libfunc(), gen_satfractuns_conv_libfunc(), and gen_trunc_conv_libfunc().
void gen_intraclass_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Initialize the libfunc fields of an of an intra-mode-class conversion optab. The string formation rules are similar to the ones for init_libfunc, above.
References memcpy(), set_conv_libfunc(), strlen(), and targetm.
Referenced by gen_extend_conv_libfunc(), gen_fract_conv_libfunc(), gen_satfract_conv_libfunc(), and gen_trunc_conv_libfunc().
void gen_intv_fp_libfunc | ( | optab | optable, |
const char * | name, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that FP or INT operation is involved and add 'v' suffix for integer operation.
References gen_fp_libfunc(), gen_int_libfunc(), len, and strlen().
void gen_satfract_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Pick proper libcall for satfract_optab. We need to chose if we do interclass or intraclass.
References gen_interclass_conv_libfunc(), and gen_intraclass_conv_libfunc().
void gen_satfractuns_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Pick proper libcall for satfractuns_optab.
References gen_interclass_conv_libfunc().
void gen_signed_fixed_libfunc | ( | optab | optable, |
const char * | opname, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that signed fixed-point operation is involved.
References gen_libfunc().
Referenced by gen_int_fp_signed_fixed_libfunc(), and gen_int_signed_fixed_libfunc().
void gen_trunc_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
Pick proper libcall for trunc_optab. We need to chose if we do truncation or extension and interclass or intraclass.
References gen_interclass_conv_libfunc(), and gen_intraclass_conv_libfunc().
void gen_ufloat_conv_libfunc | ( | convert_optab | tab, |
const char * | opname, | ||
enum machine_mode | tmode, | ||
enum machine_mode | fmode | ||
) |
ufloat_optab is special by using floatun for FP and floatuns decimal fp naming scheme.
References gen_int_to_fp_conv_libfunc().
void gen_unsigned_fixed_libfunc | ( | optab | optable, |
const char * | opname, | ||
char | suffix, | ||
enum machine_mode | mode | ||
) |
Like gen_libfunc, but verify that unsigned fixed-point operation is involved.
References gen_libfunc().
Referenced by gen_int_unsigned_fixed_libfunc().
bool get_best_mem_extraction_insn | ( | extraction_insn * | insn, |
enum extraction_pattern | pattern, | ||
HOST_WIDE_INT | bitsize, | ||
HOST_WIDE_INT | bitnum, | ||
enum machine_mode | field_mode | ||
) |
Return true if an instruction exists to access a field of BITSIZE bits starting BITNUM bits into a memory structure. Describe the "best" such instruction in *INSN if so. PATTERN describes the type of insertion or extraction we want to perform and FIELDMODE is the natural mode of the extracted field. The instructions considered here only access bytes that overlap the bitfield; they do not touch any surrounding bytes.
References ET_unaligned_mem, get_best_extraction_insn(), and HOST_WIDE_INT.
Referenced by extract_bit_field_1(), and store_bit_field_1().
bool get_best_reg_extraction_insn | ( | extraction_insn * | insn, |
enum extraction_pattern | pattern, | ||
unsigned HOST_WIDE_INT | struct_bits, | ||
enum machine_mode | field_mode | ||
) |
Return true if an instruction exists to access a field of mode FIELDMODE in a register structure that has STRUCT_BITS significant bits. Describe the "best" such instruction in *INSN if so. PATTERN describes the type of insertion or extraction we want to perform. For an insertion, the number of significant structure bits includes all bits of the target. For an extraction, it need only include the most significant bit of the field. Larger widths are acceptable in both cases.
References ET_reg, and get_best_extraction_insn().
Referenced by adjust_bit_field_mem_for_reg(), extract_bit_field_1(), make_extraction(), and store_bit_field_1().
void init_sync_libfuncs | ( | int | max | ) |
Call this to install all of the __sync libcalls up to size MAX.
bool insn_operand_matches | ( | enum insn_code | icode, |
unsigned int | opno, | ||
rtx | operand | ||
) |
Generate an instruction whose insn-code is INSN_CODE, with two operands: an output TARGET and an input OP0. TARGET *must* be nonzero, and the output is always stored there. CODE is an rtx code such that (CODE OP0) is an rtx that describes the value that is stored into TARGET. Return false if expansion failed.
References add_equal_note(), create_input_operand(), create_output_operand(), emit_insn(), emit_move_insn(), maybe_gen_insn(), and expand_operand::value.
Referenced by emit_unop_insn(), expand_builtin_interclass_mathfn(), expand_builtin_signbit(), expand_fix(), and expand_sfix_optab().
bool maybe_expand_insn | ( | enum insn_code | icode, |
unsigned int | nops, | ||
struct expand_operand * | ops | ||
) |
Try to emit instruction ICODE, using operands [OPS, OPS + NOPS) as its operands. Return true on success and emit no code on failure.
References emit_insn(), and maybe_gen_insn().
Referenced by emit_block_move_via_movmem(), emit_conditional_add(), emit_conditional_move(), emit_cstore(), emit_single_push_insn_1(), emit_storent_insn(), expand_atomic_compare_and_swap(), expand_atomic_load(), expand_atomic_store(), expand_builtin___clear_cache(), expand_builtin_prefetch(), expand_builtin_strlen(), expand_insn(), expand_twoval_binop(), expand_twoval_unop(), expand_vec_perm_1(), extract_bit_field_1(), extract_bit_field_using_extv(), maybe_emit_atomic_exchange(), maybe_emit_atomic_test_and_set(), maybe_emit_op(), maybe_emit_sync_lock_test_and_set(), probe_stack_range(), set_storage_via_setmem(), store_bit_field_1(), and store_bit_field_using_insv().
bool maybe_expand_jump_insn | ( | enum insn_code | icode, |
unsigned int | nops, | ||
struct expand_operand * | ops | ||
) |
Like maybe_expand_insn, but for jumps.
References emit_jump_insn(), and maybe_gen_insn().
Referenced by expand_jump_insn().
rtx maybe_gen_insn | ( | enum insn_code | icode, |
unsigned int | nops, | ||
struct expand_operand * | ops | ||
) |
Try to generate instruction ICODE, using operands [OPS, OPS + NOPS) as its operands. Return the instruction pattern on success, and emit any necessary set-up code. Return null and emit no code on failure.
References insn_data, maybe_legitimize_operands(), and expand_operand::value.
Referenced by expand_binop_directly(), expand_unop_direct(), maybe_emit_unop_insn(), maybe_expand_insn(), and maybe_expand_jump_insn().
bool maybe_legitimize_operands | ( | enum insn_code | icode, |
unsigned int | opno, | ||
unsigned int | nops, | ||
struct expand_operand * | ops | ||
) |
Try to make operands [OPS, OPS + NOPS) match operands [OPNO, OPNO + NOPS) of instruction ICODE. Return true on success, leaving the new operand values in the OPS themselves. Emit no code on failure.
References delete_insns_since(), get_last_insn(), last, and maybe_legitimize_operand().
Referenced by expand_builtin_interclass_mathfn(), maybe_gen_insn(), and vector_compare_rtx().
optab optab_for_tree_code | ( | enum tree_code | code, |
const_tree | type, | ||
enum optab_subtype | subtype | ||
) |
Return the optab used for computing the given operation on the type given by the second argument. The third argument distinguishes between the types of vector shifts and rotates
Return the optab used for computing the operation given by the tree code, CODE and the tree EXP. This function is not always usable (for example, it cannot give complete results for multiplication or division) but probably ought to be relied on more widely throughout the expander.
References optab_scalar, optab_vector, and unknown_optab.
Referenced by add_rshift(), convert_plusminus_to_widen(), expand_expr_real_2(), expand_vector_divmod(), expand_vector_operations_1(), expand_widen_pattern_expr(), supportable_narrowing_operation(), supportable_widening_operation(), vect_build_slp_tree_1(), vect_create_epilog_for_reduction(), vect_model_reduction_cost(), vect_pattern_recog_1(), vect_recog_divmod_pattern(), vect_recog_rotate_pattern(), vect_supportable_shift(), vectorizable_operation(), vectorizable_reduction(), and vectorizable_shift().
|
inlinestatic |
Return the insn used to implement mode MODE of OP, or CODE_FOR_nothing if the target does not have such an insn.
References raw_optab_handler().
Referenced by add_rshift(), can_compare_and_swap_p(), can_compare_p(), can_fix_p(), can_mult_highpart_p(), can_store_by_pieces(), can_vec_perm_p(), convert_mult_to_fma(), default_builtin_support_vector_misalignment(), direct_optab_handler(), emit_cmp_and_jump_insn_1(), emit_conditional_add(), emit_move_ccmode(), emit_move_complex(), emit_move_insn_1(), emit_move_via_integer(), emit_single_push_insn_1(), emit_store_flag(), emit_store_flag_1(), emit_storent_insn(), execute_optimize_bswap(), expand_abs_nojump(), expand_assignment(), expand_atomic_compare_and_swap(), expand_binop(), expand_builtin_cexpi(), expand_builtin_mathfn(), expand_builtin_mathfn_2(), expand_builtin_mathfn_3(), expand_builtin_mathfn_ternary(), expand_builtin_signbit(), expand_builtin_sincos(), expand_builtin_strlen(), expand_copysign(), expand_copysign_absneg(), expand_ctz(), expand_divmod(), expand_expr_real_1(), expand_expr_real_2(), expand_ffs(), expand_fix(), expand_mult_highpart(), expand_one_cmpl_abs_nojump(), expand_parity(), expand_smod_pow2(), expand_ternary_op(), expand_twoval_binop(), expand_twoval_unop(), expand_unop(), expand_unop_direct(), expand_vec_shift_expr(), expand_vector_broadcast(), expand_vector_divmod(), expand_vector_operations_1(), expand_widen_pattern_expr(), expmed_mult_highpart_optab(), extract_bit_field_1(), extract_range_basic(), find_if_header(), find_reloads_address_1(), fold_builtin_fma(), gen_add2_insn(), gen_add3_insn(), gen_cond_trap(), gen_reload(), gen_sub2_insn(), gen_sub3_insn(), gimple_expand_builtin_cabs(), gimple_expand_builtin_pow(), have_add2_insn(), have_insn_for(), have_sub2_insn(), hoist_adjacent_loads(), interclass_mathfn_icode(), lshift_cheap_p(), maybe_emit_op(), maybe_emit_sync_lock_test_and_set(), move_by_pieces(), move_by_pieces_ninsns(), nontemporal_store_p(), prepare_cmp_insn(), store_bit_field_1(), store_by_pieces_1(), store_constructor(), supportable_narrowing_operation(), supportable_widening_operation(), type_for_widest_vector_mode(), vect_build_slp_tree_1(), vect_create_epilog_for_reduction(), vect_model_reduction_cost(), vect_pattern_recog_1(), vect_recog_divmod_pattern(), vect_recog_rotate_pattern(), vect_supportable_dr_alignment(), vect_supportable_shift(), vectorizable_load(), vectorizable_operation(), vectorizable_reduction(), vectorizable_shift(), vectorizable_store(), widen_bswap(), and widen_leading().
|
inlinestatic |
rtx prepare_operand | ( | enum insn_code | icode, |
rtx | x, | ||
int | opnum, | ||
enum machine_mode | mode, | ||
enum machine_mode | wider_mode, | ||
int | unsignedp | ||
) |
Before emitting an insn with code ICODE, make sure that X, which is going to be used for operand OPNUM of the insn, is converted from mode MODE to WIDER_MODE (UNSIGNEDP determines whether it is an unsigned conversion), and that it is accepted by the operand predicate. Return the new value.
References convert_modes(), copy_to_mode_reg(), insn_data, insn_operand_matches(), and reload_completed.
Referenced by emit_cstore(), and prepare_cmp_insn().
enum insn_code raw_optab_handler | ( | unsigned | ) |
Returns the active icode for the given (encoded) optab.
Referenced by convert_optab_handler(), optab_handler(), and widening_optab_handler().
void set_conv_libfunc | ( | convert_optab | optab, |
enum machine_mode | tmode, | ||
enum machine_mode | fmode, | ||
const char * | name | ||
) |
Call this to reset the function entry for one conversion optab (OPTABLE) from mode FMODE to mode TMODE to NAME, which should be either 0 or a string constant.
References init_one_libfunc(), libfunc_entry::mode1, libfunc_entry::mode2, and libfunc_entry::op.
Referenced by gen_interclass_conv_libfunc(), and gen_intraclass_conv_libfunc().
void set_optab_libfunc | ( | optab | , |
enum | machine_mode, | ||
const char * | |||
) |
Call this to reset the function entry for one optab.
rtx sign_expand_binop | ( | enum machine_mode | mode, |
optab | uoptab, | ||
optab | soptab, | ||
rtx | op0, | ||
rtx | op1, | ||
rtx | target, | ||
int | unsignedp, | ||
enum optab_methods | methods | ||
) |
Expand a binary operation with both signed and unsigned forms.
Expand a binary operator which has both signed and unsigned forms. UOPTAB is the optab for unsigned operations, and SOPTAB is for signed operations. If we widen unsigned operands, we may use a signed wider operation instead of an unsigned wider operation, since the result would be the same.
References expand_binop(), OPTAB_DIRECT, OPTAB_LIB, OPTAB_WIDEN, and swap_optab_enable().
Referenced by expand_divmod().
rtx simplify_expand_binop | ( | enum machine_mode | mode, |
optab | binoptab, | ||
rtx | op0, | ||
rtx | op1, | ||
rtx | target, | ||
int | unsignedp, | ||
enum optab_methods | methods | ||
) |
Like expand_binop, but return a constant rtx if the result can be calculated at compile time. The arguments and return value are otherwise the same as for expand_binop.
References expand_binop(), optab_to_code(), and simplify_binary_operation().
Referenced by expand_doubleword_shift(), expand_subword_shift(), force_expand_binop(), and store_bit_field_1().
bool supportable_convert_operation | ( | enum tree_code | code, |
tree | vectype_out, | ||
tree | vectype_in, | ||
tree * | decl, | ||
enum tree_code * | code1 | ||
) |
Check whether an operation represented by the code CODE is a convert operation that is supported by the target platform in vector form
Function supportable_convert_operation Check whether an operation represented by the code CODE is a convert operation that is supported by the target platform in vector form (i.e., when operating on arguments of type VECTYPE_IN producing a result of type VECTYPE_OUT). Convert operations we currently support directly are FIX_TRUNC and FLOAT. This function checks if these operations are supported by the target platform either directly (via vector tree-codes), or via target builtins. Output: - CODE1 is code of vector operation to be used when vectorizing the operation, if available. - DECL is decl of target builtin functions to be used when vectorizing the operation, if available. In this case, CODE1 is CALL_EXPR.
References can_fix_p(), can_float_p(), and targetm.
Referenced by vectorizable_conversion().
bool swap_optab_enable | ( | optab | , |
enum | machine_mode, | ||
bool | |||
) |
Referenced by sign_expand_binop().
|
inlinestatic |
Return true if BINOPTAB is for a trapping-on-overflow operation.
Referenced by expand_binop().
|
inlinestatic |
Return true if UNOPTAB is for a trapping-on-overflow operation.
Referenced by expand_unop().
bool valid_multiword_target_p | ( | rtx | ) |
|
inlinestatic |
Like optab_handler, but for widening_operations that have a TO_MODE and a FROM_MODE.
References raw_optab_handler().
Referenced by expand_binop(), expmed_mult_highpart_optab(), and find_widening_optab_handler_and_mode().
const optab code_to_optab_[NUM_RTX_CODE] |
Contains the optab used for each rtx code, and vice-versa.
Referenced by code_to_optab().
struct convert_optab_libcall_d convlib_def[NUM_CONVLIB_OPTABS] |
Referenced by convert_optab_libfunc().
struct target_optabs default_target_optabs |
@verbatim Expand the basic unary and binary arithmetic operations, for GNU compiler.
Copyright (C) 1987-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 insn-config.h before expr.h so that HAVE_conditional_move is properly defined.
struct optab_libcall_d normlib_def[NUM_NORMLIB_OPTABS] |
Referenced by optab_libfunc().
enum rtx_code optab_to_code_[NUM_OPTABS] |
Referenced by optab_to_code().
struct target_optabs* this_fn_optabs |
Referenced by invoke_set_current_function_hook(), and save_target_globals().
struct target_optabs* this_target_optabs |