GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "predict.h"
#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "optabs.h"
#include "expmed.h"
#include "regs.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cgraph.h"
#include "diagnostic.h"
#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "attribs.h"
#include "varasm.h"
#include "except.h"
#include "insn-attr.h"
#include "dojump.h"
#include "explow.h"
#include "calls.h"
#include "stmt.h"
#include "expr.h"
#include "optabs-tree.h"
#include "libfuncs.h"
#include "reload.h"
#include "langhooks.h"
#include "common/common-target.h"
#include "tree-dfa.h"
#include "tree-ssa-live.h"
#include "tree-outof-ssa.h"
#include "tree-ssa-address.h"
#include "builtins.h"
#include "ccmp.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "rtx-vector-builder.h"
#include "tree-pretty-print.h"
#include "flags.h"
Data Structures | |
class | pieces_addr |
class | op_by_pieces_d |
class | move_by_pieces_d |
class | store_by_pieces_d |
class | compare_by_pieces_d |
Macros | |
#define | PUSHG_P(to) |
#define | REDUCE_BIT_FIELD(expr) |
#define | EXTEND_BITINT(expr) |
Functions | |
static bool | block_move_libcall_safe_for_call_parm (void) |
static bool | emit_block_move_via_pattern (rtx, rtx, rtx, unsigned, unsigned, HOST_WIDE_INT, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, bool) |
static void | emit_block_move_via_loop (rtx, rtx, rtx, unsigned, int) |
static void | emit_block_move_via_sized_loop (rtx, rtx, rtx, unsigned, unsigned) |
static void | emit_block_move_via_oriented_loop (rtx, rtx, rtx, unsigned, unsigned) |
static rtx | emit_block_cmp_via_loop (rtx, rtx, rtx, tree, rtx, bool, unsigned, unsigned) |
static rtx_insn * | compress_float_constant (rtx, rtx) |
static rtx | get_subtarget (rtx) |
static rtx | store_field (rtx, poly_int64, poly_int64, poly_uint64, poly_uint64, machine_mode, tree, alias_set_type, bool, bool) |
static unsigned HOST_WIDE_INT | highest_pow2_factor_for_target (const_tree, const_tree) |
static bool | is_aligning_offset (const_tree, const_tree) |
static rtx | reduce_to_bit_field_precision (rtx, rtx, tree) |
static rtx | do_store_flag (const_sepops, rtx, machine_mode) |
static void | do_tablejump (rtx, machine_mode, rtx, rtx, rtx, profile_probability) |
static rtx | const_vector_from_tree (tree) |
static tree | tree_expr_size (const_tree) |
static void | convert_mode_scalar (rtx, rtx, int) |
void | init_expr_target (void) |
void | init_expr (void) |
void | convert_move (rtx to, rtx from, int unsignedp) |
rtx | convert_to_mode (machine_mode mode, rtx x, int unsignedp) |
rtx | convert_modes (machine_mode mode, machine_mode oldmode, rtx x, int unsignedp) |
rtx | convert_float_to_wider_int (machine_mode mode, machine_mode fmode, rtx x) |
rtx | convert_wider_int_to_float (machine_mode mode, machine_mode imode, rtx x) |
static unsigned int | alignment_for_piecewise_move (unsigned int max_pieces, unsigned int align) |
static bool | can_use_qi_vectors (by_pieces_operation op) |
static bool | by_pieces_mode_supported_p (fixed_size_mode mode, by_pieces_operation op) |
static fixed_size_mode | widest_fixed_size_mode_for_size (unsigned int size, by_pieces_operation op) |
static bool | can_do_by_pieces (unsigned HOST_WIDE_INT len, unsigned int align, enum by_pieces_operation op) |
bool | can_move_by_pieces (unsigned HOST_WIDE_INT len, unsigned int align) |
unsigned HOST_WIDE_INT | by_pieces_ninsns (unsigned HOST_WIDE_INT l, unsigned int align, unsigned int max_size, by_pieces_operation op) |
rtx | move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len, unsigned int align, memop_ret retmode) |
bool | can_store_by_pieces (unsigned HOST_WIDE_INT len, by_pieces_constfn constfun, void *constfundata, unsigned int align, bool memsetp) |
rtx | store_by_pieces (rtx to, unsigned HOST_WIDE_INT len, by_pieces_constfn constfun, void *constfundata, unsigned int align, bool memsetp, memop_ret retmode) |
void | clear_by_pieces (rtx to, unsigned HOST_WIDE_INT len, unsigned int align) |
static rtx | compare_by_pieces (rtx arg0, rtx arg1, unsigned HOST_WIDE_INT len, rtx target, unsigned int align, by_pieces_constfn a1_cfn, void *a1_cfn_data) |
rtx | emit_block_move_hints (rtx x, rtx y, rtx size, enum block_op_methods method, unsigned int expected_align, HOST_WIDE_INT expected_size, unsigned HOST_WIDE_INT min_size, unsigned HOST_WIDE_INT max_size, unsigned HOST_WIDE_INT probable_max_size, bool bail_out_libcall, bool *is_move_done, bool might_overlap, unsigned ctz_size) |
rtx | emit_block_move (rtx x, rtx y, rtx size, enum block_op_methods method, unsigned int ctz_size) |
static bool | emit_block_move_via_pattern (rtx x, rtx y, rtx size, unsigned int align, unsigned int expected_align, HOST_WIDE_INT expected_size, unsigned HOST_WIDE_INT min_size, unsigned HOST_WIDE_INT max_size, unsigned HOST_WIDE_INT probable_max_size, bool might_overlap) |
static void | emit_block_move_via_sized_loop (rtx x, rtx y, rtx size, unsigned int align, unsigned int ctz_size) |
static void | emit_block_move_via_oriented_loop (rtx x, rtx y, rtx size, unsigned int align, unsigned int ctz_size) |
static void | emit_block_move_via_loop (rtx x, rtx y, rtx size, unsigned int align, int incr) |
rtx | emit_block_op_via_libcall (enum built_in_function fncode, rtx dst, rtx src, rtx size, bool tailcall) |
rtx | expand_cmpstrn_or_cmpmem (insn_code icode, rtx target, rtx arg1_rtx, rtx arg2_rtx, tree arg3_type, rtx arg3_rtx, HOST_WIDE_INT align) |
static rtx | emit_block_cmp_via_cmpmem (rtx x, rtx y, rtx len, tree len_type, rtx target, unsigned align) |
rtx | emit_block_cmp_hints (rtx x, rtx y, rtx len, tree len_type, rtx target, bool equality_only, by_pieces_constfn y_cfn, void *y_cfndata, unsigned ctz_len) |
void | move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode) |
void | move_block_from_reg (int regno, rtx x, int nregs) |
rtx | gen_group_rtx (rtx orig) |
static void | emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, poly_int64 ssize) |
void | emit_group_load (rtx dst, rtx src, tree type, poly_int64 ssize) |
rtx | emit_group_load_into_temps (rtx parallel, rtx src, tree type, poly_int64 ssize) |
void | emit_group_move (rtx dst, rtx src) |
rtx | emit_group_move_into_temps (rtx src) |
void | emit_group_store (rtx orig_dst, rtx src, tree type, poly_int64 ssize) |
rtx | maybe_emit_group_store (rtx x, tree type) |
static void | copy_blkmode_from_reg (rtx target, rtx srcreg, tree type) |
rtx | copy_blkmode_to_reg (machine_mode mode_in, tree src) |
void | use_reg_mode (rtx *call_fusage, rtx reg, machine_mode mode) |
void | clobber_reg_mode (rtx *call_fusage, rtx reg, machine_mode mode) |
void | use_regs (rtx *call_fusage, int regno, int nregs) |
void | use_group_regs (rtx *call_fusage, rtx regs) |
static gimple * | get_def_for_expr (tree name, enum tree_code code) |
static gimple * | get_def_for_expr_class (tree name, enum tree_code_class tclass) |
rtx | clear_storage_hints (rtx object, rtx size, enum block_op_methods method, unsigned int expected_align, HOST_WIDE_INT expected_size, unsigned HOST_WIDE_INT min_size, unsigned HOST_WIDE_INT max_size, unsigned HOST_WIDE_INT probable_max_size, unsigned ctz_size) |
rtx | clear_storage (rtx object, rtx size, enum block_op_methods method) |
rtx | set_storage_via_libcall (rtx object, rtx size, rtx val, bool tailcall) |
bool | set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align, unsigned int expected_align, HOST_WIDE_INT expected_size, unsigned HOST_WIDE_INT min_size, unsigned HOST_WIDE_INT max_size, unsigned HOST_WIDE_INT probable_max_size) |
void | write_complex_part (rtx cplx, rtx val, bool imag_p, bool undefined_p) |
rtx | read_complex_part (rtx cplx, bool imag_p) |
static rtx | emit_move_change_mode (machine_mode new_mode, machine_mode old_mode, rtx x, bool force) |
static rtx_insn * | emit_move_via_integer (machine_mode mode, rtx x, rtx y, bool force) |
rtx | emit_move_resolve_push (machine_mode mode, rtx x) |
rtx_insn * | emit_move_complex_push (machine_mode mode, rtx x, rtx y) |
rtx_insn * | emit_move_complex_parts (rtx x, rtx y) |
static rtx_insn * | emit_move_complex (machine_mode mode, rtx x, rtx y) |
static rtx_insn * | emit_move_ccmode (machine_mode mode, rtx x, rtx y) |
static bool | undefined_operand_subword_p (const_rtx op, int i) |
static rtx_insn * | emit_move_multi_word (machine_mode mode, rtx x, rtx y) |
rtx_insn * | emit_move_insn_1 (rtx x, rtx y) |
rtx_insn * | emit_move_insn (rtx x, rtx y) |
rtx_insn * | gen_move_insn (rtx x, rtx y) |
rtx | push_block (rtx size, poly_int64 extra, int below) |
static rtx | mem_autoinc_base (rtx mem) |
poly_int64 | find_args_size_adjust (rtx_insn *insn) |
poly_int64 | fixup_args_size_notes (rtx_insn *prev, rtx_insn *last, poly_int64 end_args_size) |
static int | memory_load_overlap (rtx x, rtx y, HOST_WIDE_INT size) |
bool | emit_push_insn (rtx x, machine_mode mode, tree type, rtx size, unsigned int align, int partial, rtx reg, poly_int64 extra, rtx args_addr, rtx args_so_far, int reg_parm_stack_space, rtx alignment_pad, bool sibcall_p) |
static bool | optimize_bitfield_assignment_op (poly_uint64 pbitsize, poly_uint64 pbitpos, poly_uint64 pbitregion_start, poly_uint64 pbitregion_end, machine_mode mode1, rtx str_rtx, tree to, tree src, bool reverse) |
void | get_bit_range (poly_uint64 *bitstart, poly_uint64 *bitend, tree exp, poly_int64 *bitpos, tree *offset) |
bool | non_mem_decl_p (tree base) |
bool | mem_ref_refers_to_non_mem_p (tree ref) |
void | expand_assignment (tree to, tree from, bool nontemporal) |
bool | emit_storent_insn (rtx to, rtx from) |
static rtx | string_cst_read_str (void *data, void *, HOST_WIDE_INT offset, fixed_size_mode mode) |
rtx | store_expr (tree exp, rtx target, int call_param_p, bool nontemporal, bool reverse) |
static bool | flexible_array_member_p (const_tree f, const_tree type) |
static HOST_WIDE_INT | count_type_elements (const_tree type, bool for_ctor_p) |
static bool | categorize_ctor_elements_1 (const_tree ctor, HOST_WIDE_INT *p_nz_elts, HOST_WIDE_INT *p_unique_nz_elts, HOST_WIDE_INT *p_init_elts, int *p_complete) |
bool | categorize_ctor_elements (const_tree ctor, HOST_WIDE_INT *p_nz_elts, HOST_WIDE_INT *p_unique_nz_elts, HOST_WIDE_INT *p_init_elts, int *p_complete) |
bool | immediate_const_ctor_p (const_tree ctor, unsigned int words) |
bool | complete_ctor_at_level_p (const_tree type, HOST_WIDE_INT num_elts, const_tree last_type) |
static bool | mostly_zeros_p (const_tree exp) |
static bool | all_zeros_p (const_tree exp) |
static void | store_constructor_field (rtx target, poly_uint64 bitsize, poly_int64 bitpos, poly_uint64 bitregion_start, poly_uint64 bitregion_end, machine_mode mode, tree exp, int cleared, alias_set_type alias_set, bool reverse) |
static int | fields_length (const_tree type) |
void | store_constructor (tree exp, rtx target, int cleared, poly_int64 size, bool reverse) |
tree | get_inner_reference (tree exp, poly_int64 *pbitsize, poly_int64 *pbitpos, tree *poffset, machine_mode *pmode, int *punsignedp, int *preversep, int *pvolatilep) |
static unsigned HOST_WIDE_INT | target_align (const_tree target) |
rtx | force_operand (rtx value, rtx target) |
bool | safe_from_p (const_rtx x, tree exp, int top_p) |
unsigned HOST_WIDE_INT | highest_pow2_factor (const_tree exp) |
static enum rtx_code | convert_tree_comp_to_rtx (enum tree_code tcode, int unsignedp) |
void | expand_operands (tree exp0, tree exp1, rtx target, rtx *op0, rtx *op1, enum expand_modifier modifier) |
static rtx | expand_expr_constant (tree exp, int defer, enum expand_modifier modifier) |
static rtx | expand_expr_addr_expr_1 (tree exp, rtx target, scalar_int_mode tmode, enum expand_modifier modifier, addr_space_t as) |
static rtx | expand_expr_addr_expr (tree exp, rtx target, machine_mode tmode, enum expand_modifier modifier) |
static rtx | expand_constructor (tree exp, rtx target, enum expand_modifier modifier, bool avoid_temp_mem) |
rtx | expand_expr_real (tree exp, rtx target, machine_mode tmode, enum expand_modifier modifier, rtx *alt_rtl, bool inner_reference_p) |
static rtx | expand_cond_expr_using_cmove (tree treeop0, tree treeop1, tree treeop2) |
static rtx | expand_misaligned_mem_ref (rtx temp, machine_mode mode, int unsignedp, unsigned int align, rtx target, rtx *alt_rtl) |
static rtx | expand_expr_divmod (tree_code code, machine_mode mode, tree treeop0, tree treeop1, rtx op0, rtx op1, rtx target, int unsignedp) |
rtx | expand_expr_real_2 (const_sepops ops, rtx target, machine_mode tmode, enum expand_modifier modifier) |
static bool | stmt_is_replaceable_p (gimple *stmt) |
rtx | expand_expr_real_gassign (gassign *g, rtx target, machine_mode tmode, enum expand_modifier modifier, rtx *alt_rtl, bool inner_reference_p) |
rtx | expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, enum expand_modifier modifier, rtx *alt_rtl, bool inner_reference_p) |
static tree | constant_byte_string (tree arg, tree *ptr_offset, tree *mem_size, tree *decl, bool valrep=false) |
tree | string_constant (tree arg, tree *ptr_offset, tree *mem_size, tree *decl) |
tree | byte_representation (tree arg, tree *ptr_offset, tree *mem_size, tree *decl) |
enum tree_code | maybe_optimize_pow2p_mod_cmp (enum tree_code code, tree *arg0, tree *arg1) |
enum tree_code | maybe_optimize_mod_cmp (enum tree_code code, tree *arg0, tree *arg1) |
void | maybe_optimize_sub_cmp_0 (enum tree_code code, tree *arg0, tree *arg1) |
static rtx | expand_single_bit_test (location_t loc, enum tree_code code, tree inner, int bitnum, tree result_type, rtx target, machine_mode mode) |
bool | try_casesi (tree index_type, tree index_expr, tree minval, tree range, rtx table_label, rtx default_label, rtx fallback_label, profile_probability default_probability) |
bool | try_tablejump (tree index_type, tree index_expr, tree minval, tree range, rtx table_label, rtx default_label, profile_probability default_probability) |
static rtx | const_vector_mask_from_tree (tree exp) |
tree | build_personality_function (const char *lang) |
rtx | get_personality_function (tree decl) |
rtx | expr_size (tree exp) |
HOST_WIDE_INT | int_expr_size (const_tree exp) |
unsigned HOST_WIDE_INT | gf2n_poly_long_div_quotient (unsigned HOST_WIDE_INT polynomial, unsigned short n) |
static unsigned HOST_WIDE_INT | calculate_crc (unsigned HOST_WIDE_INT crc, unsigned HOST_WIDE_INT polynomial, unsigned short crc_bits) |
rtx | assemble_crc_table (tree id, unsigned HOST_WIDE_INT polynom, unsigned short crc_bits) |
rtx | generate_crc_table (unsigned HOST_WIDE_INT polynom, unsigned short crc_bits) |
void | calculate_table_based_CRC (rtx *crc, const rtx &input_data, const rtx &polynomial, machine_mode crc_mode, machine_mode data_mode) |
void | expand_crc_table_based (rtx op0, rtx op1, rtx op2, rtx op3, machine_mode data_mode) |
void | gen_common_operation_to_reflect (rtx *op, unsigned HOST_WIDE_INT and1_value, unsigned HOST_WIDE_INT and2_value, unsigned shift_val) |
void | reflect_64_bit_value (rtx *op) |
void | reflect_32_bit_value (rtx *op) |
void | reflect_16_bit_value (rtx *op) |
void | reflect_8_bit_value (rtx *op) |
void | generate_reflecting_code_standard (rtx *op) |
void | expand_reversed_crc_table_based (rtx op0, rtx op1, rtx op2, rtx op3, machine_mode data_mode, void(*gen_reflecting_code)(rtx *op)) |
Variables | |
int | cse_not_expected |
#define EXTEND_BITINT | ( | expr | ) |
Referenced by expand_expr_real_1().
#define PUSHG_P | ( | to | ) |
Derived class from op_by_pieces_d, providing support for block move operations.
#define REDUCE_BIT_FIELD | ( | expr | ) |
Referenced by expand_expr_real_2().
|
static |
Return the largest alignment we can use for doing a move (or store) of MAX_PIECES. ALIGN is the largest alignment we could use.
References FOR_EACH_MODE_IN_CLASS, GET_MODE_ALIGNMENT, GET_MODE_SIZE(), int_mode_for_size(), MAX, NARROWEST_INT_MODE, opt_mode< T >::require(), and targetm.
Referenced by by_pieces_ninsns(), can_store_by_pieces(), and op_by_pieces_d::op_by_pieces_d().
|
static |
Return true if EXP contains all zeros.
References categorize_ctor_elements(), exp(), initializer_zerop(), and TREE_CODE.
Referenced by expand_constructor().
Assemble CRC table with 256 elements for the given POLYNOM and CRC_BITS with given ID. ID is the identifier of the table, the name of the table is unique, contains CRC size and the polynomial. POLYNOM is the polynomial used to calculate the CRC table's elements. CRC_BITS is the size of CRC, may be 8, 16, ... .
References build_array_type(), build_constructor_from_vec(), build_decl(), build_index_type(), build_int_cstu(), calculate_crc(), DECL_ARTIFICIAL, DECL_ASSEMBLER_NAME, DECL_INITIAL, varpool_node::finalize_decl(), i, IDENTIFIER_POINTER, make_decl_one_only(), make_unsigned_type(), mark_decl_referenced(), SET_DECL_ASSEMBLER_NAME, size_int, TREE_ASM_WRITTEN, TREE_PUBLIC, TREE_READONLY, TREE_STATIC, UNKNOWN_LOCATION, vec_alloc(), and vec_safe_push().
Referenced by generate_crc_table().
|
static |
A subroutine of emit_block_move. Returns true if calling the block move libcall will not clobber any parameters which may have already been placed on the stack.
References builtin_decl_implicit(), NULL_RTX, NULL_TREE, OUTGOING_REG_PARM_STACK_SPACE, REG_P, targetm, TREE_CHAIN, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, TYPE_MODE, and void_list_node.
Referenced by emit_block_move_hints().
tree build_personality_function | ( | const char * | lang | ) |
Build a decl for a personality function given a language prefix.
References build_decl(), build_function_type_list(), DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_RTL, gcc_unreachable, get_identifier(), global_options, integer_type_node, long_long_unsigned_type_node, NULL, NULL_TREE, ptr_type_node, SET_SYMBOL_REF_DECL, TREE_PUBLIC, type(), UI_DWARF2, UI_NONE, UI_SEH, UI_SJLJ, UI_TARGET, UNKNOWN_LOCATION, unsigned_type_node, and XEXP.
Referenced by lhd_gcc_personality().
|
static |
Return true if optabs exists for the mode and certain by pieces operations.
References can_compare_p(), ccp_jump, CLEAR_BY_PIECES, COMPARE_BY_PIECES, optab_handler(), SET_BY_PIECES, and VECTOR_MODE_P.
Referenced by op_by_pieces_d::smallest_fixed_size_mode_for_size(), and widest_fixed_size_mode_for_size().
unsigned HOST_WIDE_INT by_pieces_ninsns | ( | unsigned HOST_WIDE_INT | l, |
unsigned int | align, | ||
unsigned int | max_size, | ||
by_pieces_operation | op ) |
Return number of insns required to perform operation OP by pieces for L bytes. ALIGN (in bits) is maximum alignment we can assume.
References alignment_for_piecewise_move(), COMPARE_BY_PIECES, gcc_assert, GET_MODE_ALIGNMENT, GET_MODE_SIZE(), MOVE_MAX_PIECES, optab_handler(), ROUND_UP, targetm, and widest_fixed_size_mode_for_size().
Referenced by default_use_by_pieces_infrastructure_p(), and op_by_pieces_d::op_by_pieces_d().
Similar to string_constant, return a STRING_CST corresponding to the value representation of the first argument if it's a constant.
References constant_byte_string().
Referenced by getbyterep(), and gimple_fold_builtin_memchr().
|
static |
Calculate CRC for the initial CRC and given POLYNOMIAL. CRC_BITS is CRC size.
References CHAR_BIT, HOST_WIDE_INT_1U, and i.
Referenced by assemble_crc_table().
void calculate_table_based_CRC | ( | rtx * | crc, |
const rtx & | input_data, | ||
const rtx & | polynomial, | ||
machine_mode | crc_mode, | ||
machine_mode | data_mode ) |
Generate table-based CRC code for the given CRC, INPUT_DATA and the POLYNOMIAL (without leading 1). First, using POLYNOMIAL's value generates CRC table of 256 elements, then generates the assembly for the following code, where crc_bit_size and data_bit_size may be 8, 16, 32, 64, depending on CRC: for (int i = 0; i < data_bit_size / 8; i++) crc = (crc << 8) ^ crc_table[(crc >> (crc_bit_size - 8)) ^ (data >> (data_bit_size - (i + 1) * 8) & 0xFF))]; So to take values from the table, we need 8-bit data. If input data size is not 8, then first we extract upper 8 bits, then the other 8 bits, and so on.
References convert_move(), exact_log2(), expand_and(), expand_binop(), expand_shift(), force_reg(), gen_int_mode(), gen_reg_rtx(), gen_rtx_MEM(), generate_crc_table(), GET_MODE, GET_MODE_BITSIZE(), GET_MODE_SIZE(), i, expand_operand::mode, NULL_RTX, OPTAB_DIRECT, OPTAB_WIDEN, poly_int< N, C >::to_constant(), UINTVAL, and validize_mem().
Referenced by expand_crc_table_based(), and expand_reversed_crc_table_based().
|
static |
Determine whether an operation OP on LEN bytes with alignment ALIGN can and should be performed piecewise.
References optimize_insn_for_speed_p(), and targetm.
Referenced by can_move_by_pieces(), emit_block_cmp_hints(), and emit_block_cmp_via_loop().
bool can_move_by_pieces | ( | unsigned HOST_WIDE_INT | len, |
unsigned int | align ) |
Determine whether the LEN bytes can be moved by using several move instructions. Return nonzero if a call to move_by_pieces should succeed.
References can_do_by_pieces(), and MOVE_BY_PIECES.
Referenced by emit_block_move_hints(), emit_block_move_via_loop(), emit_block_move_via_sized_loop(), emit_push_insn(), expand_constructor(), gimple_stringops_transform(), and gimplify_init_constructor().
bool can_store_by_pieces | ( | unsigned HOST_WIDE_INT | len, |
by_pieces_constfn | constfun, | ||
void * | constfundata, | ||
unsigned int | align, | ||
bool | memsetp ) |
Determine whether the LEN bytes generated by CONSTFUN can be stored to memory using several move instructions. CONSTFUNDATA is a pointer which will be passed as argument in every CONSTFUN call. ALIGN is maximum alignment we can assume. MEMSETP is true if this is a memset operation and false if it's a copy of a constant string. Return true if a call to store_by_pieces should succeed.
References alignment_for_piecewise_move(), gcc_assert, GET_MODE_ALIGNMENT, GET_MODE_SIZE(), HAVE_POST_DECREMENT, HAVE_PRE_DECREMENT, offset, optab_handler(), optimize_insn_for_speed_p(), SET_BY_PIECES, STORE_BY_PIECES, STORE_MAX_PIECES, targetm, VECTOR_MODE_P, and widest_fixed_size_mode_for_size().
Referenced by asan_emit_stack_protection(), can_store_by_multiple_pieces(), expand_builtin_memory_copy_args(), expand_builtin_memset_args(), expand_builtin_strncpy(), gimple_stringops_transform(), simplify_builtin_call(), store_expr(), and try_store_by_multiple_pieces().
|
static |
Return true if we know how to implement OP using vectors of bytes.
References CLEAR_BY_PIECES, COMPARE_BY_PIECES, and SET_BY_PIECES.
Referenced by op_by_pieces_d::smallest_fixed_size_mode_for_size(), and widest_fixed_size_mode_for_size().
bool categorize_ctor_elements | ( | const_tree | ctor, |
HOST_WIDE_INT * | p_nz_elts, | ||
HOST_WIDE_INT * | p_unique_nz_elts, | ||
HOST_WIDE_INT * | p_init_elts, | ||
int * | p_complete ) |
Examine CTOR to discover: * how many scalar fields are set to nonzero values, and place it in *P_NZ_ELTS; * the same, but counting RANGE_EXPRs as multiplier of 1 instead of high - low + 1 (this can be useful for callers to determine ctors that could be cheaply initialized with - perhaps nested - loops compared to copied from huge read-only data), and place it in *P_UNIQUE_NZ_ELTS; * how many scalar fields in total are in CTOR, and place it in *P_ELT_COUNT. * whether the constructor is complete -- in the sense that every meaningful byte is explicitly given a value -- and place it in *P_COMPLETE: - 0 if any field is missing - 1 if all fields are initialized, and there's no padding - -1 if all fields are initialized, but there's padding Return whether or not CTOR is a valid static constant initializer, the same as "initializer_constant_valid_p (CTOR, TREE_TYPE (CTOR)) != 0".
References categorize_ctor_elements_1().
Referenced by all_zeros_p(), gimplify_init_constructor(), and mostly_zeros_p().
|
static |
Helper for categorize_ctor_elements. Identical interface.
References categorize_ctor_elements_1(), complete_ctor_at_level_p(), CONSTRUCTOR_ELTS, constructor_static_from_elts_p(), CONSTRUCTOR_ZERO_PADDING_BITS, count_type_elements(), FOR_EACH_CONSTRUCTOR_ELT, i, initializer_constant_valid_p(), initializer_zerop(), NULL_TREE, RAW_DATA_LENGTH, simple_cst_equal(), TREE_CODE, tree_fits_uhwi_p(), TREE_IMAGPART, TREE_OPERAND, TREE_REALPART, TREE_STATIC, TREE_STRING_LENGTH, tree_to_uhwi(), TREE_TYPE, true, type_has_padding_at_level_p(), TYPE_REVERSE_STORAGE_ORDER, TYPE_SIZE, expand_operand::value, VECTOR_CST_ELT, VECTOR_CST_NELTS, and ZERO_INIT_PADDING_BITS_ALL.
Referenced by categorize_ctor_elements(), and categorize_ctor_elements_1().
void clear_by_pieces | ( | rtx | to, |
unsigned | HOST_WIDE_INT, | ||
unsigned int | align ) |
Generate several move instructions to clear LEN bytes of block TO. (A MEM rtx with BLKmode). ALIGN is maximum alignment we can assume.
References builtin_memset_read_str(), and CLEAR_BY_PIECES.
Referenced by clear_storage_hints().
Write zeros through the storage of OBJECT. If OBJECT has BLKmode, SIZE is its length in bytes.
References clear_storage_hints(), GET_CODE, GET_MODE, GET_MODE_MASK, and UINTVAL.
Referenced by asan_clear_shadow(), expand_constructor(), store_constructor(), and store_expr().
rtx clear_storage_hints | ( | rtx | object, |
rtx | size, | ||
enum block_op_methods | method, | ||
unsigned int | expected_align, | ||
HOST_WIDE_INT | expected_size, | ||
unsigned HOST_WIDE_INT | min_size, | ||
unsigned HOST_WIDE_INT | max_size, | ||
unsigned HOST_WIDE_INT | probable_max_size, | ||
unsigned | ctz_size ) |
Write zeros through the storage of OBJECT. If OBJECT has BLKmode, SIZE is its length in bytes.
References ADDR_SPACE_GENERIC_P, BLOCK_OP_NORMAL, BLOCK_OP_TAILCALL, CLEAR_BY_PIECES, clear_by_pieces(), COMPLEX_MODE_P, CONST0_RTX, const0_rtx, CONST_INT_P, emit_move_insn(), gcc_assert, gcc_unreachable, GET_MODE, GET_MODE_INNER, GET_MODE_SIZE(), INTVAL, known_eq, MEM_ADDR_SPACE, MEM_ALIGN, expand_operand::mode, NULL, NULL_RTX, optimize_insn_for_speed_p(), poly_int_rtx_p(), set_storage_via_libcall(), set_storage_via_setmem(), targetm, try_store_by_multiple_pieces(), and write_complex_part().
Referenced by clear_storage(), and expand_builtin_memset_args().
Add a CLOBBER expression for REG to the (possibly empty) list pointed to by CALL_FUSAGE. REG must denote a hard register.
References gcc_assert, gen_rtx_EXPR_LIST(), expand_operand::mode, REG_P, and REGNO.
Referenced by clobber_reg().
|
static |
Generate several move instructions to compare LEN bytes from blocks ARG0 and ARG1. (These are MEM rtx's with BLKmode). If PUSH_ROUNDING is defined and TO is NULL, emit_single_push_insn is used to push FROM to the stack. ALIGN is maximum stack alignment we can assume. Optionally, the caller can pass a constfn and associated data in A1_CFN and A1_CFN_DATA. describing that the second operand being compared is a known constant and how to obtain its data.
References const0_rtx, const1_rtx, emit_barrier(), emit_jump(), emit_label(), emit_move_insn(), fail_label, gen_label_rtx(), gen_reg_rtx(), integer_type_node, NULL_RTX, REG_P, REGNO, and TYPE_MODE.
Referenced by emit_block_cmp_hints(), and emit_block_cmp_via_loop().
bool complete_ctor_at_level_p | ( | const_tree | type, |
HOST_WIDE_INT | num_elts, | ||
const_tree | last_type ) |
TYPE is initialized by a constructor with NUM_ELTS elements, the last of which had type LAST_TYPE. Each element was itself a complete initializer, in the sense that every meaningful byte was explicitly given a value. Return true if the same is true for the constructor as a whole.
References count_type_elements(), DECL_CHAIN, gcc_assert, simple_cst_equal(), TREE_CODE, TYPE_FIELDS, TYPE_SIZE, and ZERO_INIT_PADDING_BITS_UNIONS.
Referenced by categorize_ctor_elements_1().
If Y is representable exactly in a narrower mode, and the target can perform the extension directly from constant or memory, then emit the move as an extension.
References can_extend_p(), const_double_from_real_value(), CONST_DOUBLE_REAL_VALUE, emit_move_insn(), emit_unop_insn(), exact_real_truncate(), float_extend_from_mem, FOR_EACH_MODE_UNTIL, force_const_mem(), force_reg(), gen_reg_rtx(), get_last_insn(), GET_MODE, HARD_REGISTER_P, insn_operand_matches(), NULL, optimize_insn_for_speed_p(), r, REAL_VALUE_TYPE, REG_P, set_src_cost(), set_unique_reg_note(), expand_operand::target, targetm, validize_mem(), and y.
Referenced by emit_move_insn().
Return a CONST_VECTOR rtx for a VECTOR_CST tree.
References rtx_vector_builder::build(), CONST0_RTX, const_double_from_real_value(), CONST_FIXED_FROM_FIXED_VALUE, const_vector_mask_from_tree(), count, vector_builder< T, Shape, Derived >::encoded_nelts(), exp(), GET_MODE_INNER, i, immed_wide_int_const(), initializer_zerop(), expand_operand::mode, wi::to_poly_wide(), TREE_CODE, TREE_FIXED_CST, TREE_REAL_CST, TREE_TYPE, TYPE_MODE, VECTOR_BOOLEAN_TYPE_P, VECTOR_CST_ELT, VECTOR_CST_NELTS_PER_PATTERN, and VECTOR_CST_NPATTERNS.
Referenced by expand_expr_real_1().
Return a CONST_VECTOR rtx representing vector mask for a VECTOR_CST of booleans.
References rtx_vector_builder::build(), CONST0_RTX, CONSTM1_RTX, count, vector_builder< T, Shape, Derived >::encoded_nelts(), exp(), gcc_assert, gcc_unreachable, GET_MODE_INNER, i, integer_minus_onep(), integer_onep(), integer_zerop(), expand_operand::mode, TREE_CODE, TREE_TYPE, TYPE_MODE, VECTOR_CST_ELT, VECTOR_CST_NELTS_PER_PATTERN, and VECTOR_CST_NPATTERNS.
Referenced by const_vector_from_tree().
|
static |
Return a STRING_CST corresponding to ARG's constant initializer either if it's a string constant, or, when VALREP is set, any other constant, or null otherwise. On success, set *PTR_OFFSET to the (possibly non-constant) byte offset within the byte string that ARG is references. If nonnull set *MEM_SIZE to the size of the byte string. If nonnull, set *DECL to the constant declaration ARG refers to.
References array_ref_element_size(), array_ref_low_bound(), build_int_cst(), build_string_literal(), CHAR_BIT, char_type_node, ctor_for_folding(), DECL_P, DECL_SIZE_UNIT, error_mark_node, wi::fits_uhwi_p(), fold_build2, fold_convert, fold_ctor_reference(), gcc_assert, gcc_checking_assert, get_addr_base_and_unit_offset(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), initializer_zerop(), INT_MAX, int_size_in_bytes(), integer_onep(), integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, poly_int< N, C >::is_constant(), is_gimple_assign(), native_encode_expr(), native_encode_initializer(), NULL, NULL_TREE, offset, POINTER_TYPE_P, r, size_int, sizetype, SSA_NAME_DEF_STMT, ssizetype, string_constant(), STRIP_NOPS, poly_int< N, C >::to_uhwi(), TREE_CODE, tree_fits_shwi_p(), tree_fits_uhwi_p(), tree_int_cst_equal(), TREE_OPERAND, TREE_STRING_LENGTH, tree_to_shwi(), tree_to_uhwi(), TREE_TYPE, TYPE_MAIN_VARIANT, TYPE_PRECISION, TYPE_SIZE_UNIT, VAR_P, and wide_int_to_tree().
Referenced by byte_representation(), and string_constant().
Variant of convert_modes for ABI parameter passing/return. Return an rtx for a value that would result from converting X from a floating point mode FMODE to wider integer mode MODE.
References convert_modes(), force_reg(), gcc_assert, gen_lowpart, int_mode_for_mode(), opt_mode< T >::require(), SCALAR_FLOAT_MODE_P, and SCALAR_INT_MODE_P.
Referenced by expand_value_return(), and precompute_register_parameters().
Like convert_move, but deals only with scalar modes.
References ALL_SCALAR_FIXED_POINT_MODE_P, arm_bfloat_half_format, as_a(), BITS_PER_WORD, can_extend_p(), CEIL, const0_rtx, const1_rtx, convert_mode_scalar(), convert_move(), convert_optab_handler(), convert_optab_libfunc(), convert_to_mode(), copy_to_reg(), DECIMAL_FLOAT_MODE_P, direct_load, emit_clobber(), emit_insn(), emit_libcall_block(), emit_library_call_value(), emit_move_insn(), emit_store_flag_force(), emit_unop_insn(), end_sequence(), expand_binop(), expand_fixed_convert(), expand_shift(), FOR_EACH_MODE_FROM, force_lowpart_subreg(), force_reg(), gcc_assert, gcc_unreachable, gen_int_mode(), gen_lowpart, gen_reg_rtx(), GET_CODE, get_insns(), GET_MODE, GET_MODE_BITSIZE(), GET_MODE_CLASS, GET_MODE_PRECISION(), GET_MODE_SIZE(), HONOR_NANS(), HOST_WIDE_INT_1U, i, ibm_extended_format, ieee_half_format, ieee_quad_format, ieee_single_format, insns, int_mode_for_size(), LCT_CONST, maybe_expand_shift(), MEM_ADDR_SPACE, MEM_P, MEM_VOLATILE_P, mode_dependent_address_p(), NULL_RTX, operand_subword(), OPTAB_DIRECT, optimize_insn_for_speed_p(), REAL_MODE_FORMAT, reg_overlap_mentioned_p(), REG_P, REGNO, opt_mode< T >::require(), SCALAR_FLOAT_MODE_P, simplify_unary_operation(), smallest_int_mode_for_size(), start_sequence(), targetm, TRULY_NOOP_TRUNCATION_MODES_P, word_mode, and XEXP.
Referenced by convert_mode_scalar(), and convert_move().
Return an rtx for a value that would result from converting X from mode OLDMODE to mode MODE. Both modes may be floating, or both integer. UNSIGNEDP is nonzero if X is an unsigned value. This can be done by referring to a part of X in place or by copying to a new temporary with conversion. You can give VOIDmode for OLDMODE, if you are sure X has a nonvoid mode.
References CONST_POLY_INT_P, CONST_SCALAR_INT_P, convert_move(), direct_load, force_subreg(), wide_int_storage::from(), gcc_assert, gen_lowpart, gen_reg_rtx(), GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_PRECISION(), HARD_REGISTER_P, immed_wide_int_const(), is_a(), is_int_mode(), known_eq, MEM_P, MEM_VOLATILE_P, REG_P, REGNO, SIGNED, SUBREG_CHECK_PROMOTED_SIGN, subreg_promoted_mode(), SUBREG_PROMOTED_SET, SUBREG_PROMOTED_VAR_P, SUBREG_REG, targetm, TRULY_NOOP_TRUNCATION_MODES_P, UNSIGNED, and VECTOR_MODE_P.
Referenced by avoid_expensive_constant(), can_widen_mult_without_libcall(), convert_float_to_wider_int(), convert_memory_address_addr_space_1(), convert_to_mode(), emit_block_cmp_via_loop(), emit_block_move_via_loop(), emit_block_move_via_oriented_loop(), emit_library_call_value_1(), emit_store_flag_1(), emit_store_flag_int(), expand_arith_overflow_result_store(), expand_asan_emit_allocas_unpoison(), expand_binop_directly(), expand_builtin_extend_pointer(), expand_builtin_issignaling(), expand_cond_expr_using_cmove(), expand_divmod(), expand_doubleword_mod(), expand_expr_addr_expr_1(), expand_expr_force_mode(), expand_expr_real_1(), expand_expr_real_2(), expand_gimple_stmt_1(), expand_ifn_atomic_compare_exchange(), expand_ifn_atomic_compare_exchange_into_call(), expand_mul_overflow(), expand_speculation_safe_value(), expand_twoval_binop(), expand_twoval_unop(), expand_value_return(), expand_widening_mult(), expmed_mult_highpart_optab(), extract_high_half(), extract_low_bits(), inline_string_cmp(), insert_value_copy_on_edge(), maybe_legitimize_operand(), optimize_bitfield_assignment_op(), precompute_arguments(), precompute_register_parameters(), prepare_operand(), push_block(), store_expr(), store_field(), store_one_arg(), try_tablejump(), and widen_operand().
Copy data from FROM to TO, where the machine modes are not the same. Both modes may be integer, or both may be floating, or both may be fixed-point. UNSIGNEDP should be nonzero if FROM is an unsigned type. This causes zero-extension instead of sign-extension.
References CONSTANT_P, convert_mode_scalar(), convert_move(), convert_optab_handler(), emit_move_insn(), emit_unop_insn(), force_subreg(), gcc_assert, gen_lowpart, GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_PRECISION(), GET_MODE_UNIT_PRECISION, is_a(), known_eq, simplify_gen_subreg(), SUBREG_CHECK_PROMOTED_SIGN, subreg_promoted_mode(), SUBREG_PROMOTED_SET, SUBREG_PROMOTED_VAR_P, SUBREG_REG, VECTOR_MODE_P, and XEXP.
Referenced by assign_call_lhs(), calculate_table_based_CRC(), convert_mode_scalar(), convert_modes(), convert_move(), do_tablejump(), doloop_modify(), emit_block_cmp_via_loop(), emit_conditional_add(), emit_conditional_move_1(), emit_conditional_neg_or_complement(), emit_cstore(), emit_store_flag_1(), emit_store_flag_int(), expand_assignment(), expand_binop(), expand_builtin_memcmp(), expand_builtin_strcmp(), expand_builtin_strlen(), expand_builtin_strncmp(), expand_crc_table_based(), expand_doubleword_clz_ctz_ffs(), expand_expr_real_1(), expand_expr_real_2(), expand_ffs(), expand_fix(), expand_float(), expand_function_end(), expand_function_start(), expand_gimple_stmt_1(), expand_reversed_crc_table_based(), expand_sfix_optab(), expand_single_bit_test(), expand_twoval_binop(), expand_twoval_unop(), expand_ubsan_result_store(), expand_unop(), force_operand(), std_expand_builtin_va_start(), store_bit_field_using_insv(), store_constructor(), and store_expr().
Return an rtx for a value that would result from converting X to mode MODE. Both X and MODE may be floating, or both integer. UNSIGNEDP is nonzero if X is an unsigned value. This can be done by referring to a part of X in place or by copying to a new temporary with conversion.
References convert_modes().
Referenced by anti_adjust_stack_and_probe(), anti_adjust_stack_and_probe_stack_clash(), assign_call_lhs(), assign_parm_setup_block(), assign_parm_setup_reg(), assign_parm_setup_stack(), builtin_memset_gen_str(), convert_extracted_bit_field(), convert_mode_scalar(), copy_blkmode_from_reg(), do_tablejump(), emit_block_op_via_libcall(), emit_partition_copy(), expand_assignment(), expand_binop(), expand_builtin_bswap(), expand_builtin_extract_return_addr(), expand_builtin_int_roundingfn_2(), expand_builtin_interclass_mathfn(), expand_builtin_memcmp(), expand_builtin_memset_args(), expand_builtin_powi(), expand_builtin_stack_address(), expand_builtin_strcmp(), expand_builtin_strlen(), expand_builtin_strncmp(), expand_builtin_unop(), expand_expr_real_1(), expand_expr_real_2(), expand_fix(), expand_float(), expand_parity(), expand_POPCOUNT(), expand_sfix_optab(), expand_widening_mult(), expmed_mult_highpart(), extract_fixed_bit_field_1(), get_dynamic_stack_size(), maybe_legitimize_operand(), prepare_cmp_insn(), prepare_float_lib_cmp(), prepare_libcall_arg(), probe_stack_range(), set_storage_via_libcall(), sjlj_emit_dispatch_table(), store_expr(), store_fixed_bit_field_1(), try_casesi(), and try_store_by_multiple_pieces().
Convert the tree comparison code TCODE to the rtl one where the signedness is UNSIGNEDP.
References gcc_unreachable.
Referenced by expand_cond_expr_using_cmove().
Variant of convert_modes for ABI parameter passing/return. Return an rtx for a value that would result from converting X from an integer mode IMODE to a narrower floating point mode MODE.
References force_reg(), gcc_assert, gen_lowpart, gen_lowpart_SUBREG(), int_mode_for_mode(), opt_mode< T >::require(), SCALAR_FLOAT_MODE_P, and SCALAR_INT_MODE_P.
Referenced by assign_parm_setup_stack(), expand_call(), and expand_expr_real_1().
Copy a BLKmode object of TYPE out of a register SRCREG into TARGET. This is used on targets that return BLKmode values in registers.
References adjust_address, as_a(), BITS_PER_WORD, convert_to_mode(), emit_move_insn(), opt_mode< T >::exists(), extract_bit_field(), gcc_assert, GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_BITSIZE(), GET_MODE_SIZE(), int_mode_for_size(), int_size_in_bytes(), MEM_ALIGN, MEM_P, MIN, expand_operand::mode, NULL, NULL_RTX, operand_subword(), operand_subword_force(), REG_P, opt_mode< T >::require(), store_bit_field(), expand_operand::target, targetm, TYPE_ALIGN, TYPE_UNSIGNED, and word_mode.
Referenced by expand_assignment(), store_expr(), and store_field().
Copy BLKmode value SRC into a register of mode MODE_IN. Return the register if it contains any data, otherwise return null. This is used on targets that return BLKmode values in registers.
References arg_int_size_in_bytes(), as_a(), BITS_PER_WORD, CONST0_RTX, emit_move_insn(), expand_normal(), extract_bit_field(), FOR_EACH_MODE_FROM, FOR_EACH_MODE_IN_CLASS, gcc_assert, gen_lowpart, gen_reg_rtx(), GET_MODE_BITSIZE(), GET_MODE_SIZE(), i, MIN, expand_operand::mode, NULL, NULL_RTX, operand_subword(), operand_subword_force(), opt_mode< T >::require(), smallest_int_mode_for_size(), store_bit_field(), targetm, TREE_TYPE, TYPE_ALIGN, TYPE_MODE, and word_mode.
Referenced by expand_assignment(), and expand_return().
|
static |
If FOR_CTOR_P, return the number of top-level elements that a constructor must have in order for it to completely initialize a value of type TYPE. Return -1 if the number isn't known. If !FOR_CTOR_P, return an estimate of the number of scalars in TYPE.
References array_type_nelts_minus_one(), count_type_elements(), DECL_CHAIN, flexible_array_member_p(), gcc_assert, gcc_unreachable, simple_cst_equal(), TREE_CODE, tree_fits_uhwi_p(), tree_to_uhwi(), TREE_TYPE, TYPE_FIELDS, TYPE_SIZE, and TYPE_VECTOR_SUBPARTS().
Referenced by categorize_ctor_elements_1(), complete_ctor_at_level_p(), and count_type_elements().
|
static |
Generate code to calculate OPS, and exploded expression using a store-flag instruction and return an rtx for the result. OPS reflects a comparison. If TARGET is nonzero, store the result there if convenient. Return zero if there is no suitable set-flag instruction available on this machine. Once expand_expr has been called on the arguments of the comparison, we are committed to doing the store flag, since it is not safe to re-evaluate the expression. We emit the store-flag insn by calling emit_store_flag, but only expand the arguments if we have a reason to believe that emit_store_flag will be successful. If we think that it will, but it isn't, we have to simulate the store-flag with a set/jump/set sequence.
References build2(), separate_ops::code, const0_rtx, do_store_flag(), emit_store_flag_force(), error_mark_node, wi::exact_log2(), expand_binop(), EXPAND_NORMAL, expand_operands(), expand_single_bit_test(), expand_vec_cmp_expr(), expand_vec_cmp_expr_p(), FUNC_OR_METHOD_TYPE_P, gcc_assert, gcc_unreachable, GEN_INT, gen_reg_rtx(), get_def_for_expr(), GET_MODE, GET_MODE_PRECISION(), get_subtarget(), gimple_assign_rhs1(), gimple_assign_rhs2(), HOST_WIDE_INT_1U, integer_all_onesp(), integer_onep(), integer_pow2p(), integer_zero_node, integer_zerop(), separate_ops::location, maybe_optimize_mod_cmp(), maybe_optimize_sub_cmp_0(), NULL_RTX, separate_ops::op0, separate_ops::op1, OPTAB_WIDEN, POINTER_TYPE_P, wi::popcount(), SCALAR_INT_MODE_P, STRIP_NOPS, swap_condition(), targetm, wi::to_wide(), TREE_CODE, tree_nonzero_bits(), TREE_TYPE, separate_ops::type, type(), lang_hooks_for_types::type_for_mode, TYPE_MODE, TYPE_PRECISION, TYPE_UNSIGNED, TYPE_VECTOR_SUBPARTS(), lang_hooks::types, VECTOR_BOOLEAN_TYPE_P, and VECTOR_TYPE_P.
Referenced by do_store_flag(), and expand_expr_real_2().
|
static |
Attempt to generate a tablejump instruction; same concept.
Subroutine of the next function. INDEX is the value being switched on, with the lowest value in the table already subtracted. MODE is its expected mode (needed if INDEX is constant). RANGE is the length of the jump table. TABLE_LABEL is a CODE_LABEL rtx for the table itself. DEFAULT_LABEL is a CODE_LABEL rtx to jump to if the index value is out of range. DEFAULT_PROBABILITY is the probability of jumping to the default label.
References as_a(), CASE_VECTOR_PC_RELATIVE, cfun, convert_move(), convert_to_mode(), copy_to_mode_reg(), emit_barrier(), emit_cmp_and_jump_insns(), emit_jump_insn(), gen_const_mem(), gen_int_mode(), gen_reg_rtx(), GET_CODE, GET_MODE_PRECISION(), GET_MODE_SIZE(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, INTVAL, memory_address, expand_operand::mode, NULL_RTX, REG_P, simplify_gen_binary(), SUBREG_PROMOTED_SIGNED_P, SUBREG_PROMOTED_VAR_P, targetm, and UINTVAL.
Referenced by try_tablejump().
rtx emit_block_cmp_hints | ( | rtx | x, |
rtx | y, | ||
rtx | len, | ||
tree | len_type, | ||
rtx | target, | ||
bool | equality_only, | ||
by_pieces_constfn | y_cfn, | ||
void * | y_cfndata, | ||
unsigned | ctz_len ) |
Emit code to compare a block Y to a block X. This may be done with string-compare instructions, with multiple scalar instructions, or with a library call. Both X and Y must be MEM rtx's. LEN is an rtx that says how long they are. LEN_TYPE is the type of the expression that was used to calculate it, and CTZ_LEN is the known trailing-zeros count of LEN, so LEN must be a multiple of 1<<CTZ_LEN even if it's not constant. If EQUALITY_ONLY is true, it means we don't have to return the tri-state value of a normal memcmp call, instead we can just compare for equality. If FORCE_LIBCALL is true, we should emit a call to memcmp rather than returning NULL_RTX. Optionally, the caller can pass a constfn and associated data in Y_CFN and Y_CFN_DATA. describing that the second operand being compared is a known constant and how to obtain its data. Return the result of the comparison, or NULL_RTX if we failed to perform the operation.
References adjust_address, can_do_by_pieces(), COMPARE_BY_PIECES, compare_by_pieces(), const0_rtx, CONST_INT_P, emit_block_cmp_via_cmpmem(), emit_block_cmp_via_loop(), gcc_assert, ILSOP_MEMCMP, INTVAL, MEM_ALIGN, MEM_P, MIN, expand_operand::target, and y.
Referenced by expand_builtin_memcmp().
|
static |
Expand a block compare between X and Y with length LEN using the cmpmem optab, placing the result in TARGET. LEN_TYPE is the type of the expression that was used to calculate the length. ALIGN gives the known minimum common alignment.
References direct_optab_handler(), expand_cmpstrn_or_cmpmem(), NULL_RTX, expand_operand::target, and y.
Referenced by emit_block_cmp_hints().
|
static |
Like emit_block_cmp_hints, but with known alignment and no support for constats. Always expand to a loop with iterations that compare blocks of the largest compare-by-pieces size that divides both len and align, and then, if !EQUALITY_ONLY, identify the word and then the unit that first differs to return the result.
References apply_scale(), BITS_PER_WORD, can_compare_p(), can_do_by_pieces(), ccp_jump, change_address(), COMPARE_BY_PIECES, compare_by_pieces(), const0_rtx, const1_rtx, CONST_INT_P, CONSTANT_P, constm1_rtx, convert_modes(), convert_move(), wi::ctz(), do_pending_stack_adjust(), emit_block_cmp_via_loop(), emit_cmp_and_jump_insns(), emit_jump(), emit_label(), emit_move_insn(), opt_mode< T >::exists(), expand_binop(), expand_simple_binop(), force_operand(), gcc_checking_assert, GEN_INT, gen_label_rtx(), gen_reg_rtx(), get_address_mode(), GET_MODE, GET_MODE_BITSIZE(), profile_probability::guessed_always(), HOST_WIDE_INT_1U, int_mode_for_size(), integer_type_node, known_gt, MAX, NULL, NULL_RTX, OPTAB_LIB_WIDEN, REG_P, REGNO, opt_mode< T >::require(), rtx_equal_p(), simplify_gen_binary(), expand_operand::target, TYPE_MODE, UINTVAL, word_mode, XEXP, and y.
Referenced by emit_block_cmp_hints(), and emit_block_cmp_via_loop().
rtx emit_block_move | ( | rtx | x, |
rtx | y, | ||
rtx | size, | ||
enum block_op_methods | method, | ||
unsigned int | ctz_size ) |
References emit_block_move_hints(), GET_CODE, GET_MODE, GET_MODE_MASK, NULL, UINTVAL, and y.
Referenced by assign_parm_setup_block(), assign_parm_setup_stack(), emit_library_call_value_1(), emit_move_complex(), emit_partition_copy(), emit_push_insn(), expand_assignment(), expand_builtin_apply(), expand_builtin_va_copy(), expand_call(), expand_expr_real_1(), expand_gimple_stmt_1(), store_expr(), store_field(), and store_one_arg().
rtx emit_block_move_hints | ( | rtx | x, |
rtx | y, | ||
rtx | size, | ||
enum block_op_methods | method, | ||
unsigned int | expected_align, | ||
HOST_WIDE_INT | expected_size, | ||
unsigned HOST_WIDE_INT | min_size, | ||
unsigned HOST_WIDE_INT | max_size, | ||
unsigned HOST_WIDE_INT | probable_max_size, | ||
bool | bail_out_libcall, | ||
bool * | is_move_done, | ||
bool | might_overlap, | ||
unsigned | ctz_size ) |
Emit code to move a block Y to a block X. This may be done with string-move instructions, with multiple scalar move instructions, or with a library call. Both X and Y must be MEM rtx's (perhaps inside VOLATILE) with mode BLKmode. SIZE is an rtx that says how long they are. ALIGN is the maximum alignment we can assume they have. METHOD describes what kind of copy this is, and what mechanisms may be used. MIN_SIZE is the minimal size of block to move MAX_SIZE is the maximal size of block to move, if it cannot be represented in unsigned HOST_WIDE_INT, than it is mask of all ones. CTZ_SIZE is the trailing-zeros count of SIZE; even a nonconstant SIZE is known to be a multiple of 1<<CTZ_SIZE. Return the address of the new block, if memcpy is called and returns it, 0 otherwise.
References ADDR_SPACE_GENERIC_P, adjust_address, block_move_libcall_safe_for_call_parm(), BLOCK_OP_CALL_PARM, BLOCK_OP_NO_LIBCALL, BLOCK_OP_NO_LIBCALL_RET, BLOCK_OP_NORMAL, BLOCK_OP_TAILCALL, can_move_by_pieces(), CONST_INT_P, emit_block_copy_via_libcall(), emit_block_move_via_oriented_loop(), emit_block_move_via_pattern(), emit_block_move_via_sized_loop(), gcc_assert, gcc_unreachable, ILSOP_MEMCPY, ILSOP_MEMMOVE, INTVAL, MEM_ADDR_SPACE, MEM_ALIGN, MEM_P, MEM_VOLATILE_P, MIN, move_by_pieces(), NO_DEFER_POP, OK_DEFER_POP, pc_rtx, poly_int_rtx_p(), RETURN_BEGIN, rtx_equal_p(), set_mem_size(), shallow_copy_rtx(), and y.
Referenced by emit_block_move(), emit_block_move_via_loop(), and expand_builtin_memory_copy_args().
|
static |
A subroutine of emit_block_move. Copy the data via an explicit loop. This is used only when libcalls are forbidden, or when inlining is required. INCR is the block size to be copied in each loop iteration. If it is negative, the absolute value is used, and the block is copied backwards. INCR must be a power of two, an exact divisor for SIZE and ALIGN, and imply a mode that can be safely copied per iteration assuming no overlap.
References apply_scale(), BLOCK_OP_NO_LIBCALL, can_move_by_pieces(), change_address(), const0_rtx, convert_modes(), do_pending_stack_adjust(), emit_block_move_hints(), emit_cmp_and_jump_insns(), emit_jump(), emit_label(), emit_move_insn(), opt_mode< T >::exists(), expand_simple_binop(), force_operand(), gcc_checking_assert, GEN_INT, gen_label_rtx(), gen_reg_rtx(), get_address_mode(), GET_MODE, GET_MODE_BITSIZE(), profile_probability::guessed_always(), int_mode_for_size(), NULL_RTX, OPTAB_LIB_WIDEN, opt_mode< T >::require(), simplify_gen_binary(), word_mode, XEXP, and y.
Referenced by emit_block_move_via_oriented_loop(), and emit_block_move_via_sized_loop().
|
static |
Like emit_block_move_via_sized_loop, but besides choosing INCR so as to ensure safe moves even in case of overlap, output dynamic tests to choose between two loops, one moving downwards, another moving upwards.
References apply_scale(), CONST_INT_P, convert_modes(), wi::ctz(), do_pending_stack_adjust(), emit_block_move_via_loop(), emit_cmp_and_jump_insns(), emit_jump(), emit_label(), force_operand(), gcc_checking_assert, gen_label_rtx(), GET_MODE, GET_MODE_BITSIZE(), profile_probability::guessed_always(), HOST_WIDE_INT_1U, int_mode_for_size(), MAX, expand_operand::mode, NULL_RTX, opt_mode< T >::require(), simplify_gen_binary(), smallest_int_mode_for_size(), UINTVAL, XEXP, and y.
Referenced by emit_block_move_hints().
|
static |
A subroutine of emit_block_move. Expand a cpymem or movmem pattern; return true if successful. X is the destination of the copy or move. Y is the source of the copy or move. SIZE is the size of the block to be moved. MIGHT_OVERLAP indicates this originated with expansion of a builtin_memmove() and the source and destination blocks may overlap.
References CONST_INT_P, create_convert_operand_to(), create_fixed_operand(), create_integer_operand(), direct_optab_handler(), FOR_EACH_MODE_IN_CLASS, gcc_assert, GET_MODE_BITSIZE(), GET_MODE_MASK, insn_data, INTVAL, maybe_expand_insn(), expand_operand::mode, NULL, opt_mode< T >::require(), and y.
|
static |
Referenced by emit_block_move_hints().
|
static |
Like emit_block_move_via_loop, but choose a suitable INCR based on ALIGN and CTZ_SIZE.
References can_move_by_pieces(), CONST_INT_P, wi::ctz(), emit_block_move_via_loop(), gcc_checking_assert, HOST_WIDE_INT_1U, MAX, UINTVAL, and y.
Referenced by emit_block_move_hints().
rtx emit_block_op_via_libcall | ( | enum built_in_function | fncode, |
rtx | dst, | ||
rtx | src, | ||
rtx | size, | ||
bool | tailcall ) |
Expand a call to memcpy or memmove or memcmp, and return the result. TAILCALL is true if this is a tail call.
References build_call_expr(), builtin_decl_implicit(), CALL_EXPR_TAILCALL, convert_memory_address, convert_to_mode(), copy_addr_to_reg(), copy_to_mode_reg(), expand_call(), make_tree(), mark_addressable(), MEM_EXPR, NULL_RTX, ptr_mode, ptr_type_node, sizetype, TYPE_MODE, and XEXP.
Referenced by emit_block_comp_via_libcall(), emit_block_copy_via_libcall(), and emit_block_move_via_libcall().
void emit_group_load | ( | rtx | dst, |
rtx | src, | ||
tree | type, | ||
poly_int64 | ssize ) |
Emit code to move a block SRC of type TYPE to a block DST, where DST is non-consecutive registers represented by a PARALLEL. SSIZE represents the total size of block ORIG_SRC in bytes, or -1 if not known.
References emit_group_load_1(), emit_move_insn(), i, NULL, XEXP, XVECEXP, and XVECLEN.
Referenced by emit_group_store(), emit_library_call_value_1(), emit_push_insn(), expand_assignment(), expand_function_end(), expand_value_return(), and store_expr().
|
static |
A subroutine of emit_group_load. Arguments as for emit_group_load, except that values are placed in TMPS[i], and must later be moved into corresponding XEXP (XVECEXP (DST, 0, i), 0) element.
References adjust_address, assign_stack_temp(), COMPLEX_MODE_P, CONSTANT_P, emit_group_load_1(), emit_move_insn(), expand_shift(), extract_bit_field(), force_reg(), force_subreg(), gcc_assert, gcc_checking_assert, gen_lowpart, gen_reg_rtx(), GET_CODE, GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_SIZE(), HARD_REGISTER_P, i, int_mode_for_mode(), known_eq, known_le, maybe_gt, MEM_ALIGN, MEM_P, expand_operand::mode, NULL, NULL_RTX, PAD_DOWNWARD, PAD_UPWARD, REG_P, rtx_to_poly_int64(), SCALAR_INT_MODE_P, split_double(), targetm, XEXP, XVECEXP, and XVECLEN.
Referenced by emit_group_load(), emit_group_load_1(), and emit_group_load_into_temps().
rtx emit_group_load_into_temps | ( | rtx | parallel, |
rtx | src, | ||
tree | type, | ||
poly_int64 | ssize ) |
Similar, but load SRC into new pseudos in a format that looks like PARALLEL. This can later be fed to emit_group_move to get things in the right place.
References alloc_EXPR_LIST(), emit_group_load_1(), force_reg(), GET_MODE, i, REG_NOTE_KIND, rtvec_alloc(), RTVEC_ELT, XEXP, XVECEXP, and XVECLEN.
Referenced by precompute_register_parameters(), and store_one_arg().
Emit code to move a block SRC to block DST, where SRC and DST are non-consecutive groups of registers, each represented by a PARALLEL.
References emit_move_insn(), gcc_assert, GET_CODE, i, XEXP, XVECEXP, and XVECLEN.
Referenced by expand_assignment(), expand_call(), expand_function_end(), load_register_parameters(), and store_expr().
Move a group of registers represented by a PARALLEL into pseudos.
References alloc_EXPR_LIST(), copy_to_reg(), GET_MODE, i, REG_NOTE_KIND, rtvec_alloc(), RTVEC_ELT, XEXP, XVECEXP, and XVECLEN.
Referenced by assign_parm_setup_block(), and expand_call().
void emit_group_store | ( | rtx | orig_dst, |
rtx | src, | ||
tree | type, | ||
poly_int64 | ssize ) |
Emit code to move a block SRC to a block ORIG_DST of type TYPE, where SRC is non-consecutive registers represented by a PARALLEL. SSIZE represents the total size of block ORIG_DST, or -1 if not known.
References adjust_address, as_a(), assign_stack_temp(), COMPLEX_MODE_P, CONST0_RTX, emit_group_load(), emit_group_store(), emit_move_insn(), expand_shift(), force_subreg(), gcc_assert, gcc_checking_assert, gen_lowpart, gen_reg_rtx(), GET_CODE, GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_BITSIZE(), GET_MODE_SIZE(), i, int_mode_for_mode(), known_eq, known_ge, known_le, maybe_gt, MEM_ALIGN, MEM_P, expand_operand::mode, NULL_RTX, PAD_DOWNWARD, PAD_UPWARD, REG_P, REGNO, rtx_equal_p(), rtx_to_poly_int64(), SCALAR_INT_MODE_P, store_bit_field(), subreg_lowpart_offset(), targetm, XEXP, XVECEXP, and XVECLEN.
Referenced by assign_parm_adjust_entry_rtl(), assign_parm_remove_parallels(), assign_parm_setup_block(), emit_group_store(), emit_library_call_value_1(), expand_assignment(), expand_call(), maybe_emit_group_store(), store_expr(), and store_field().
A subroutine of emit_move_insn_1. Generate a move from Y into X. MODE is known to be MODE_CC. Returns the last instruction emitted.
References emit_insn(), emit_move_change_mode(), emit_move_via_integer(), gcc_assert, expand_operand::mode, NULL, optab_handler(), and y.
Referenced by emit_move_insn_1().
|
static |
A subroutine of emit_move_insn_1. Yet another lowpart generator. NEW_MODE and OLD_MODE are the same size. Return NULL if X cannot be represented in NEW_MODE. If FORCE is true, this will never happen, as we'll force-create a SUBREG if needed.
References adjust_address, adjust_address_nv, copy_replacements(), gen_rtx_MEM(), GET_MODE, MEM_COPY_ATTRIBUTES, MEM_P, new_mode(), push_operand(), reload_in_progress, simplify_gen_subreg(), simplify_subreg(), and XEXP.
Referenced by emit_move_ccmode(), and emit_move_via_integer().
A subroutine of emit_move_insn_1. Generate a move from Y into X. MODE is known to be complex. Returns the last instruction emitted.
References BLOCK_OP_NO_LIBCALL, BLOCK_OP_NORMAL, CONSTANT_P, emit_block_move(), emit_move_complex_parts(), emit_move_complex_push(), emit_move_via_integer(), gen_int_mode(), GET_CODE, get_last_insn(), get_mode_alignment(), GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_SIZE(), HARD_REGISTER_P, MEM_P, expand_operand::mode, optab_handler(), optimize_insn_for_speed_p(), push_operand(), REG_NREGS, REG_P, register_operand(), and y.
Referenced by emit_move_insn_1().
A subroutine of emit_move_complex. Perform the move from Y to X via two moves of the parts. Returns the last instruction emitted.
References emit_clobber(), get_last_insn(), read_complex_part(), reg_overlap_mentioned_p(), REG_P, reload_completed, reload_in_progress, write_complex_part(), and y.
Referenced by emit_move_complex().
A subroutine of emit_move_complex. Generate a move from Y into X. X is known to satisfy push_operand, and MODE is known to be complex. Returns the last instruction emitted.
References emit_move_insn(), emit_move_resolve_push(), gcc_unreachable, gen_rtx_MEM(), GET_CODE, GET_MODE_INNER, GET_MODE_SIZE(), expand_operand::mode, read_complex_part(), XEXP, and y.
Referenced by emit_move_complex().
Generate code to copy Y into X. Both Y and X must have the same mode, except that Y can be a constant with VOIDmode. This mode cannot be BLKmode; use emit_block_move for that. Return the last instruction emitted.
References adjust_address, compress_float_constant(), CONSTANT_P, copy_rtx(), emit_move_insn_1(), force_const_mem(), gcc_assert, GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_SIZE(), known_eq, MEM_ADDR_SPACE, MEM_ALIGN, MEM_P, memory_address_addr_space_p(), expand_operand::mode, NULL_RTX, optab_handler(), push_operand(), REG_P, rtx_equal_p(), SCALAR_FLOAT_MODE_P, SET_DEST, SET_SRC, set_unique_reg_note(), simplify_subreg(), single_set(), SUBREG_P, SUBREG_REG, targetm, use_anchored_address(), validize_mem(), XEXP, and y.
Referenced by adjust_stack_1(), allocate_dynamic_stack_space(), asan_clear_shadow(), asan_emit_stack_protection(), assign_call_lhs(), assign_parm_setup_block(), assign_parm_setup_reg(), assign_parm_setup_stack(), assign_parms_unsplit_complex(), attempt_change(), avoid_likely_spilled_reg(), builtin_memset_gen_str(), builtin_memset_read_str(), clear_storage_hints(), combine_reaching_defs(), combine_var_copies_in_loop_exit(), compare_by_pieces(), compress_float_constant(), convert_mode_scalar(), convert_move(), copy_blkmode_from_reg(), copy_blkmode_to_reg(), copy_to_mode_reg(), copy_to_reg(), copy_to_suggested_reg(), curr_insn_transform(), default_speculation_safe_value(), default_zero_call_used_regs(), do_jump_by_parts_zero_rtx(), emit_block_cmp_via_loop(), emit_block_move_via_loop(), emit_conditional_move(), emit_conditional_move_1(), emit_group_load(), emit_group_load_1(), emit_group_move(), emit_group_store(), emit_initial_value_sets(), emit_libcall_block_1(), emit_library_call_value_1(), emit_move_complex_push(), emit_move_list(), emit_move_multi_word(), emit_move_resolve_push(), emit_partition_copy(), emit_push_insn(), emit_stack_probe(), emit_store_flag_force(), emit_store_flag_int(), expand_abs(), expand_absneg_bit(), expand_and(), expand_asm_stmt(), expand_assignment(), expand_atomic_compare_and_swap(), expand_atomic_fetch_op(), expand_atomic_load(), expand_atomic_store(), expand_binop(), expand_BITINTTOFLOAT(), expand_builtin_apply(), expand_builtin_apply_args_1(), expand_builtin_atomic_clear(), expand_builtin_atomic_compare_exchange(), expand_builtin_eh_copy_values(), expand_builtin_eh_return(), expand_BUILTIN_EXPECT(), expand_builtin_goacc_parlevel_id_size(), expand_builtin_init_descriptor(), expand_builtin_issignaling(), expand_builtin_longjmp(), expand_builtin_nonlocal_goto(), expand_builtin_return(), expand_builtin_setjmp_receiver(), expand_builtin_setjmp_setup(), expand_builtin_sincos(), expand_builtin_stpcpy_1(), expand_builtin_strlen(), expand_builtin_strub_enter(), expand_builtin_strub_leave(), expand_builtin_strub_update(), expand_call(), expand_compare_and_swap_loop(), expand_copysign_absneg(), expand_copysign_bit(), expand_dec(), expand_DIVMOD(), expand_divmod(), expand_doubleword_bswap(), expand_doubleword_mult(), expand_dw2_landing_pad_for_region(), expand_eh_return(), expand_expr_real_1(), expand_expr_real_2(), expand_fix(), expand_fixed_convert(), expand_float(), expand_function_end(), expand_function_start(), expand_gimple_stmt_1(), expand_GOACC_DIM_POS(), expand_GOACC_DIM_SIZE(), expand_HWASAN_CHOOSE_TAG(), expand_HWASAN_SET_TAG(), expand_ifn_atomic_bit_test_and(), expand_ifn_atomic_compare_exchange_into_call(), expand_ifn_atomic_op_fetch_cmp_0(), expand_inc(), expand_movstr(), expand_mul_overflow(), expand_mult_const(), expand_one_ssa_partition(), expand_POPCOUNT(), expand_rotate_as_vec_perm(), expand_SET_EDOM(), expand_smod_pow2(), expand_strided_load_optab_fn(), expand_subword_shift(), expand_superword_shift(), expand_ubsan_result_store(), expand_unop(), expand_value_return(), expand_vec_set_optab_fn(), expand_vector_ubsan_overflow(), extract_bit_field_1(), extract_integral_bit_field(), find_shift_sequence(), fix_crossing_unconditional_branches(), asan_redzone_buffer::flush_redzone_payload(), force_expand_binop(), force_not_mem(), force_operand(), force_reg(), get_arg_pointer_save_area(), get_dynamic_stack_base(), inherit_in_ebb(), init_one_dwarf_reg_size(), init_return_column_size(), init_set_costs(), initialize_uninitialized_regs(), inline_string_cmp(), insert_base_initialization(), insert_value_copy_on_edge(), insert_var_expansion_initialization(), instantiate_virtual_regs_in_insn(), load_register_parameters(), lra_emit_add(), lra_emit_move(), make_safe_from(), match_asm_constraints_1(), maybe_emit_unop_insn(), move_block_from_reg(), move_block_to_reg(), noce_emit_cmove(), noce_emit_move_insn(), optimize_bitfield_assignment_op(), prepare_call_address(), prepare_copy_insn(), probe_stack_range(), resolve_shift_zext(), resolve_simple_move(), sjlj_emit_dispatch_table(), sjlj_emit_function_enter(), sjlj_mark_call_sites(), split_iv(), stack_protect_prologue(), store_bit_field(), store_bit_field_1(), store_bit_field_using_insv(), store_constructor(), store_expr(), store_fixed_bit_field_1(), store_integral_bit_field(), store_one_arg(), store_unaligned_arguments_into_pseudos(), try_store_by_multiple_pieces(), unroll_loop_runtime_iterations(), widen_bswap(), widen_operand(), and write_complex_part().
Low level part of emit_move_insn. Called just like emit_move_insn, but assumes X and Y are basically valid.
References ALL_FIXED_POINT_MODE_P, COMPLEX_MODE_P, CONSTANT_P, emit_insn(), emit_move_ccmode(), emit_move_complex(), emit_move_multi_word(), emit_move_via_integer(), gcc_assert, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_CLASS, HOST_BITS_PER_WIDE_INT, known_le, lra_in_progress, expand_operand::mode, optab_handler(), PATTERN(), recog(), and y.
Referenced by emit_move_insn(), and gen_move_insn().
A subroutine of emit_move_insn_1. Generate a move from Y into X. MODE is any multi-word or full-word mode that lacks a move_insn pattern. Note that you will get better code if you define such patterns, even if they must turn into multiple assembler instructions.
References CEIL, CONSTANT_P, emit_clobber(), emit_insn(), emit_move_insn(), emit_move_resolve_push(), end_sequence(), find_replacement(), force_const_mem(), gcc_assert, GET_CODE, get_insns(), GET_MODE_SIZE(), i, MEM_P, expand_operand::mode, mode_size, operand_subword(), operand_subword_force(), push_operand(), reload_completed, reload_in_progress, replace_equiv_address_nv(), start_sequence(), poly_int< N, C >::to_constant(), undefined_operand_subword_p(), use_anchored_address(), XEXP, and y.
Referenced by emit_move_insn_1().
A subroutine of emit_move_insn_1. X is a push_operand in MODE. Return an equivalent MEM that does not use an auto-increment.
References emit_move_insn(), expand_simple_binop(), gcc_assert, gcc_unreachable, gen_int_mode(), GET_CODE, GET_MODE_SIZE(), known_eq, expand_operand::mode, OPTAB_LIB_WIDEN, plus_constant(), replace_equiv_address(), rtx_to_poly_int64(), stack_pointer_rtx, and XEXP.
Referenced by emit_move_complex_push(), and emit_move_multi_word().
A subroutine of emit_move_insn_1. Generate a move from Y into X using an integer mode of the same size as MODE. Returns the instruction emitted, or NULL if such a move could not be generated.
References emit_insn(), emit_move_change_mode(), int_mode_for_mode(), expand_operand::mode, NULL, NULL_RTX, optab_handler(), and y.
Referenced by emit_move_ccmode(), emit_move_complex(), and emit_move_insn_1().
bool emit_push_insn | ( | rtx | x, |
machine_mode | mode, | ||
tree | type, | ||
rtx | size, | ||
unsigned int | align, | ||
int | partial, | ||
rtx | reg, | ||
poly_int64 | extra, | ||
rtx | args_addr, | ||
rtx | args_so_far, | ||
int | reg_parm_stack_space, | ||
rtx | alignment_pad, | ||
bool | sibcall_p ) |
Generate code to push X onto the stack, assuming it has mode MODE and type TYPE. MODE is redundant except when X is a CONST_INT (since they don't carry mode info). SIZE is an rtx for the size of data to be copied (in bytes), needed only if X is BLKmode. Return true if successful. May return false if asked to push a partial argument during a sibcall optimization (as specified by SIBCALL_P) and the incoming and outgoing pointers cannot be shown to not overlap. ALIGN (in bits) is maximum alignment we can assume. If PARTIAL and REG are both nonzero, then copy that many of the first bytes of X into registers starting with REG, and push the rest of X. The amount of space pushed is decreased by PARTIAL bytes. REG must be a hard register in this case. If REG is zero but PARTIAL is not, take any all others actions for an argument partially in registers, but do not actually load any registers. EXTRA is the amount in bytes of extra space to leave next to this arg. This is ignored if an argument block has already been allocated. On a machine that lacks real push insns, ARGS_ADDR is the address of the bottom of the argument block for this call. We use indexing off there to store the arg. On machines with push insns, ARGS_ADDR is 0 when a argument block has not been preallocated. ARGS_SO_FAR is the size of args previously pushed for this call. REG_PARM_STACK_SPACE is nonzero if functions require stack space for arguments passed in registers. If nonzero, it will be the number of bytes required.
References ACCUMULATE_OUTGOING_ARGS, adjust_address, anti_adjust_stack(), assign_temp(), BLOCK_OP_CALL_PARM, can_move_by_pieces(), CONST_INT_P, CONSTANT_P, copy_to_reg(), DECL_INITIAL, emit_block_move(), emit_group_load(), emit_move_insn(), emit_push_insn(), expand_binop(), force_const_mem(), gcc_assert, GEN_INT, gen_int_mode(), gen_reg_rtx(), gen_rtx_MEM(), gen_rtx_REG(), GET_CODE, GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_CLASS, GET_MODE_SIZE(), i, immediate_const_ctor_p(), int_expr_size(), INTVAL, known_eq, MEM_ALIGN, MEM_P, memory_address, memory_load_overlap(), expand_operand::mode, move_block_to_reg(), move_by_pieces(), NULL, NULL_RTX, NULL_TREE, offset, operand_subword_force(), OPTAB_LIB_WIDEN, PAD_DOWNWARD, PAD_NONE, PAD_UPWARD, plus_constant(), poly_int_rtx_p(), push_block(), reg_mentioned_p(), REG_P, REGNO, RETURN_BEGIN, set_mem_align(), simplify_gen_binary(), STACK_GROWS_DOWNWARD, STACK_PUSH_CODE, store_constructor(), SYMBOL_REF_DECL, SYMBOL_REF_P, expand_operand::target, targetm, poly_int< N, C >::to_constant(), TREE_READONLY, TREE_SIDE_EFFECTS, lang_hooks_for_types::type_for_mode, lang_hooks::types, validize_mem(), VAR_P, virtual_outgoing_args_rtx, virtual_stack_dynamic_rtx, word_mode, and XEXP.
Referenced by emit_library_call_value_1(), emit_push_insn(), and store_one_arg().
Emits nontemporal store insn that moves FROM to TO. Returns true if this succeeded, false otherwise.
References create_fixed_operand(), create_input_operand(), GET_MODE, maybe_expand_insn(), expand_operand::mode, and optab_handler().
Referenced by store_expr().
Expand an assignment that stores the value of FROM into TO. If NONTEMPORAL is true, try generating a nontemporal store.
References ADDR_SPACE_GENERIC_P, adjust_address, aggregate_value_p(), as_a(), assign_stack_temp(), bits_to_bytes_round_down, BLOCK_OP_NORMAL, cfun, change_address(), COMPLETE_TYPE_P, COMPLEX_MODE_P, const0_rtx, convert_memory_address_addr_space(), convert_move(), convert_to_mode(), copy_blkmode_from_reg(), copy_blkmode_to_reg(), create_fixed_operand(), create_input_operand(), DECL_BIT_FIELD_TYPE, DECL_HARD_REGISTER, DECL_P, DECL_RTL, emit_block_move(), emit_block_move_via_libcall(), emit_group_load(), emit_group_move(), emit_group_store(), emit_move_insn(), expand_builtin_trap(), expand_expr(), expand_insn(), EXPAND_NORMAL, expand_normal(), EXPAND_SUM, EXPAND_WRITE, expr_size(), flip_storage_order(), force_not_mem(), force_operand(), force_subreg(), gcc_assert, gcc_checking_assert, gen_rtx_MEM(), get_address_mode(), get_alias_set(), get_bit_range(), GET_CODE, get_inner_reference(), GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_BITSIZE(), GET_MODE_INNER, GET_MODE_PRECISION(), GET_MODE_SIZE(), GET_MODE_UNIT_BITSIZE, get_object_alignment(), handled_component_p(), highest_pow2_factor_for_target(), int_size_in_bytes(), known_eq, known_ge, known_le, lowpart_subreg(), maybe_emit_group_store(), maybe_gt, MEM_ALIGN, MEM_P, mem_ref_refers_to_non_mem_p(), MEM_VOLATILE_P, expand_operand::mode, NULL, NULL_RTX, NULL_TREE, num_trailing_bits, offset, offset_address(), operand_equal_p(), optab_handler(), optimize_bitfield_assignment_op(), POINTER_TYPE_P, pop_temp_slots(), preserve_temp_slots(), push_temp_slots(), read_complex_part(), REF_REVERSE_STORAGE_ORDER, refs_may_alias_p(), REG_P, set_mem_attributes_minus_bitpos(), shallow_copy_rtx(), simplify_gen_unary(), size_int, store_bit_field(), store_expr(), store_field(), SUBREG_P, subreg_promoted_mode(), SUBREG_PROMOTED_SIGN, SUBREG_PROMOTED_VAR_P, SUBREG_REG, subreg_unpromoted_mode(), targetm, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_ADDR_SPACE, TYPE_MODE, TYPE_SIZE, expand_operand::value, VAR_P, write_complex_part(), and XEXP.
Referenced by assign_parm_setup_reg(), expand_ACCESS_WITH_SIZE(), expand_asm_stmt(), expand_bitquery(), expand_call_stmt(), expand_DEFERRED_INIT(), expand_expr_real_1(), expand_gimple_stmt_1(), expand_LAUNDER(), store_constructor(), and ubsan_encode_value().
rtx expand_cmpstrn_or_cmpmem | ( | insn_code | icode, |
rtx | target, | ||
rtx | arg1_rtx, | ||
rtx | arg2_rtx, | ||
tree | arg3_type, | ||
rtx | arg3_rtx, | ||
HOST_WIDE_INT | align ) |
Try to expand cmpstrn or cmpmem operation ICODE with the given operands. ARG3_TYPE is the type of ARG3_RTX. Return the result rtx on success, otherwise return null.
References create_convert_operand_from(), create_fixed_operand(), create_integer_operand(), create_output_operand(), HARD_REGISTER_P, insn_data, maybe_expand_insn(), insn_operand_data::mode, NULL_RTX, insn_data_d::operand, REG_P, expand_operand::target, TYPE_MODE, TYPE_UNSIGNED, and expand_operand::value.
Referenced by emit_block_cmp_via_cmpmem(), expand_builtin_strcmp(), and expand_builtin_strncmp().
Try to expand the conditional expression which is represented by TREEOP0 ? TREEOP1 : TREEOP2 using conditonal moves. If it succeeds return the rtl reg which represents the result. Otherwise return NULL_RTX.
References assign_temp(), can_conditionally_move_p(), COMPARISON_CLASS_P, const0_rtx, convert_modes(), convert_tree_comp_to_rtx(), emit_conditional_move(), emit_insn(), end_sequence(), EXPAND_NORMAL, expand_normal(), expand_operands(), gen_lowpart, get_def_for_expr_class(), get_insns(), GET_MODE, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), expand_operand::mode, NULL_RTX, promote_mode(), start_sequence(), tcc_comparison, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MODE, TYPE_UNSIGNED, and VECTOR_TYPE_P.
Referenced by expand_expr_real_2().
|
static |
Generate code for computing CONSTRUCTOR EXP. An rtx for the computed value is returned. If AVOID_TEMP_MEM is TRUE, instead of creating a temporary variable in memory NULL is returned and the caller needs to handle it differently.
References all_zeros_p(), assign_temp(), BLOCK_OP_NORMAL, can_move_by_pieces(), clear_storage(), exp(), EXPAND_CONST_ADDRESS, expand_expr_constant(), EXPAND_INITIALIZER, EXPAND_STACK_PARM, EXPAND_SUM, expr_size(), GET_CODE, int_expr_size(), MEM_VOLATILE_P, expand_operand::mode, mostly_zeros_p(), NULL_RTX, safe_from_p(), store_constructor(), expand_operand::target, TREE_ADDRESSABLE, TREE_CONSTANT, tree_fits_uhwi_p(), TREE_STATIC, tree_to_uhwi(), TREE_TYPE, TYPE_ALIGN, TYPE_MODE, TYPE_SIZE_UNIT, and validize_mem().
Referenced by expand_expr_real_1().
Generate table-based CRC code for the given CRC, INPUT_DATA and the POLYNOMIAL (without leading 1). CRC is OP1, data is OP2 and the polynomial is OP3. This must generate a CRC table and an assembly for the following code, where crc_bit_size and data_bit_size may be 8, 16, 32, 64: uint_crc_bit_size_t crc_crc_bit_size (uint_crc_bit_size_t crc_init, uint_data_bit_size_t data, size_t size) { uint_crc_bit_size_t crc = crc_init; for (int i = 0; i < data_bit_size / 8; i++) crc = (crc << 8) ^ crc_table[(crc >> (crc_bit_size - 8)) ^ (data >> (data_bit_size - (i + 1) * 8) & 0xFF))]; return crc; }
References calculate_table_based_CRC(), CONST_INT_P, convert_move(), gcc_assert, gen_reg_rtx(), and GET_MODE.
Referenced by expand_builtin_crc_table_based(), and expand_crc_optab_fn().
|
static |
A subroutine of expand_expr. Evaluate EXP, which is an ADDR_EXPR. The TARGET, TMODE and MODIFIER arguments are as for expand_expr.
References ADDR_SPACE_GENERIC, convert_memory_address_addr_space(), exp(), expand_expr_addr_expr_1(), GET_MODE, POINTER_TYPE_P, ptr_mode, expand_operand::target, targetm, TREE_OPERAND, TREE_TYPE, TYPE_ADDR_SPACE, and TYPE_MODE.
Referenced by expand_expr_real_1().
|
static |
A subroutine of expand_expr_addr_expr. Evaluate the address of EXP. The TARGET, TMODE and MODIFIER arguments are as for expand_expr.
References addr_for_mem_ref(), COMPOUND_LITERAL_EXPR_DECL, CONSTANT_CLASS_P, convert_memory_address_addr_space(), convert_modes(), copy_node(), DECL_INITIAL, DECL_P, exp(), EXPAND_CONST_ADDRESS, expand_expr(), expand_expr_addr_expr_1(), expand_expr_constant(), EXPAND_INITIALIZER, EXPAND_NORMAL, expand_simple_binop(), EXPAND_SUM, fold_build_pointer_plus, force_operand(), gcc_assert, get_inner_reference(), GET_MODE, GET_MODE_BITSIZE(), integer_zerop(), is_global_var(), MEM_P, NULL, NULL_RTX, offset, OPTAB_LIB_WIDEN, plus_constant(), SCALAR_TYPE_MODE, SET_TYPE_ALIGN, simplify_gen_binary(), expand_operand::target, TREE_CODE, TREE_OPERAND, TREE_TYPE, TREE_USED, TYPE_ALIGN, TYPE_UNSIGNED, TYPE_USER_ALIGN, and XEXP.
Referenced by expand_expr_addr_expr(), expand_expr_addr_expr_1(), and expand_expr_real_1().
|
static |
Return a MEM that contains constant EXP. DEFER is as for output_constant_def and MODIFIER is as for expand_expr.
References exp(), EXPAND_INITIALIZER, output_constant_def(), and use_anchored_address().
Referenced by expand_constructor(), expand_expr_addr_expr_1(), and expand_expr_real_1().
|
static |
Helper function of expand_expr_2, expand a division or modulo. op0 and op1 should be already expanded treeop0 and treeop1, using expand_operands.
References do_pending_stack_adjust(), dump_file, dump_flags, emit_insn(), end_sequence(), expand_divmod(), get_insns(), get_range_pos_neg(), expand_operand::mode, optimize_insn_for_speed_p(), SCALAR_INT_MODE_P, seq_cost(), start_sequence(), expand_operand::target, and TDF_DETAILS.
Referenced by expand_expr_real_2().
rtx expand_expr_real | ( | tree | exp, |
rtx | target, | ||
machine_mode | tmode, | ||
enum expand_modifier | modifier, | ||
rtx * | alt_rtl, | ||
bool | inner_reference_p ) |
expand_expr: generate code for computing expression EXP. An rtx for the computed value is returned. The value is never null. In the case of a void EXP, const0_rtx is returned. The value may be stored in TARGET if TARGET is nonzero. TARGET is just a suggestion; callers must assume that the rtx returned may not be the same as TARGET. If TARGET is CONST0_RTX, it means that the value will be ignored. If TMODE is not VOIDmode, it suggests generating the result in mode TMODE. But this is done only when convenient. Otherwise, TMODE is ignored and the value generated in its natural mode. TMODE is just a suggestion; callers must assume that the rtx returned may not have mode TMODE. Note that TARGET may have neither TMODE nor MODE. In that case, it probably will not be used. If MODIFIER is EXPAND_SUM then when EXP is an addition we can return an rtx of the form (MULT (REG ...) (CONST_INT ...)) or a nest of (PLUS ...) and (MINUS ...) where the terms are products as above, or REG or MEM, or constant. Ordinarily in such cases we would output mul or add instructions and then return a pseudo reg containing the sum. EXPAND_INITIALIZER is much like EXPAND_SUM except that it also marks a label as absolutely required (it can't be dead). It also makes a ZERO_EXTEND or SIGN_EXTEND instead of emitting extend insns. This is used for outputting expressions used in initializers. EXPAND_CONST_ADDRESS says that it is okay to return a MEM with a constant address even if that address is not normally legitimate. EXPAND_INITIALIZER and EXPAND_SUM also have this effect. EXPAND_STACK_PARM is used when expanding to a TARGET on the stack for a call parameter. Such targets require special care as we haven't yet marked TARGET so that it's safe from being trashed by libcalls. We don't want to use TARGET for anything but the final result; Intermediate values must go elsewhere. Additionally, calls to emit_block_move will be flagged with BLOCK_OP_CALL_PARM. If EXP is a VAR_DECL whose DECL_RTL was a MEM with an invalid address, and ALT_RTL is non-NULL, then *ALT_RTL is set to the DECL_RTL of the VAR_DECL. *ALT_RTL is also set if EXP is a COMPOUND_EXPR whose second argument is such a VAR_DECL, and so on recursively. If the result can be stored at TARGET, and ALT_RTL is non-NULL, then *ALT_RTL is set to TARGET (before legitimziation). If INNER_REFERENCE_P is true, we are expanding an inner reference. In this case, we don't adjust a returned MEM rtx that wouldn't be sufficiently aligned for its mode; instead, it's up to the caller to deal with it afterwards. This is used to make sure that unaligned base objects for which out-of-bounds accesses are supported, for example record types with trailing arrays, aren't realigned behind the back of the caller. The normal operating mode is to pass FALSE for this parameter.
References CONST0_RTX, const0_rtx, exp(), expand_expr_real_1(), expand_operand::target, TREE_CODE, and TREE_TYPE.
Referenced by expand_expr(), expand_expr_real_1(), expand_expr_real_gassign(), expand_normal(), and store_expr().
rtx expand_expr_real_1 | ( | tree | exp, |
rtx | target, | ||
machine_mode | tmode, | ||
enum expand_modifier | modifier, | ||
rtx * | alt_rtl, | ||
bool | inner_reference_p ) |
References add_to_hard_reg_set(), addr_for_mem_ref(), adjust_address, adjust_address_nv, AGGREGATE_TYPE_P, array_ref_low_bound(), as_a(), assign_stack_temp(), assign_stack_temp_for_type(), assign_temp(), bits_to_bytes_round_down, bits_to_bytes_round_up, bitsize_int, BLOCK_OP_CALL_PARM, BLOCK_OP_NORMAL, build1(), build2(), build3(), build_constructor(), build_decl(), build_int_cst(), build_zero_cst(), BUILT_IN_FRONTEND, CALL_EXPR_VA_ARG_PACK, CALL_FROM_THUNK_P, change_address(), separate_ops::code, compare_tree_int(), COMPLETE_OR_UNBOUND_ARRAY_TYPE_P, COMPLETE_TYPE_P, COMPLEX_MODE_P, const0_rtx, const_double_from_real_value(), CONST_FIXED_FROM_FIXED_VALUE, const_vector_from_tree(), CONSTANT_P, CONSTRUCTOR_APPEND_ELT, CONSTRUCTOR_ELTS, CONVERT_EXPR_CODE_P, convert_modes(), convert_move(), convert_to_mode(), convert_wider_int_to_float(), copy_rtx(), copy_to_reg(), crtl, ctor_for_folding(), curr_insn_location(), current_function_decl, currently_expanding_to_rtl, DECL_ALIGN, DECL_ARTIFICIAL, DECL_ATTRIBUTES, DECL_BIT_FIELD_TYPE, DECL_BUILT_IN_CLASS, DECL_EXTERNAL, decl_function_context(), DECL_IGNORED_P, DECL_INITIAL, DECL_MODE, lang_hooks::decl_printable_name, DECL_RTL, DECL_RTL_SET_P, DECL_SIZE, direct_load, do_pending_stack_adjust(), opt_mode< T >::else_blk(), emit_block_move(), emit_insn(), emit_label(), emit_move_insn(), error(), error_mark_node, opt_mode< T >::exists(), exp(), expand_assignment(), expand_builtin(), expand_call(), EXPAND_CONST_ADDRESS, expand_constructor(), expand_expr(), expand_expr_addr_expr(), expand_expr_addr_expr_1(), expand_expr_constant(), expand_expr_real(), expand_expr_real_1(), expand_expr_real_2(), expand_expr_real_gassign(), EXPAND_INITIALIZER, EXPAND_MEMORY, expand_misaligned_mem_ref(), EXPAND_NORMAL, expand_normal(), expand_shift(), EXPAND_STACK_PARM, EXPAND_SUM, EXPAND_WRITE, EXPR_LOCATION, EXTEND_BITINT, extract_bit_field(), flip_storage_order(), fndecl_built_in_p(), fold(), fold_convert_loc(), fold_read_from_constant_string(), fold_unary_loc(), FOR_EACH_CONSTRUCTOR_ELT, FOR_EACH_CONSTRUCTOR_VALUE, force_const_mem(), force_operand(), force_reg(), poly_int< N, C >::force_shwi(), g, gcc_assert, gcc_checking_assert, gcc_unreachable, gen_int_mode(), gen_label_rtx(), gen_lowpart, gen_lowpart_common(), gen_lowpart_SUBREG(), gen_raw_REG(), gen_reg_rtx(), gen_rtx_MEM(), get_address_mode(), get_callee_fndecl(), GET_CODE, get_def_for_expr(), get_gimple_for_ssa_name(), get_inner_reference(), GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_BITSIZE(), GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_PRECISION(), GET_MODE_SIZE(), get_object_alignment(), get_rtx_for_ssa_name(), get_subtarget(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_call_fntype(), gimple_call_internal_p(), handled_component_p(), HARD_REGISTER_P, highest_pow2_factor(), i, identifier_to_locale(), immed_wide_int_const(), immediate_const_ctor_p(), int_expr_size(), int_mode_for_size(), int_size_in_bytes(), integer_onep(), integer_zerop(), INTEGRAL_TYPE_P, is_aligning_offset(), is_int_mode(), jumpif(), jumpifnot(), known_eq, known_ge, known_le, known_lt, LABEL_REF_NONLOCAL_P, label_rtx(), LAST_VIRTUAL_REGISTER, layout_decl(), bitint_info::limb_mode, limb_prec, separate_ops::location, lookup_attribute(), mark_reg_pointer(), MAX_FIXED_MODE_SIZE, maybe_gt, MEM_ADDR_SPACE, MEM_ALIGN, MEM_P, mem_ref_offset(), mem_ref_refers_to_non_mem_p(), MEM_VOLATILE_P, memory_address_addr_space(), memory_address_addr_space_p(), expand_operand::mode, mode_size, NULL, NULL_RTX, NULL_TREE, num_trailing_bits, OBJ_TYPE_REF_EXPR, offset, offset_address(), separate_ops::op0, separate_ops::op1, separate_ops::op2, optab_handler(), poly_int_cst_value(), poly_int_tree_p(), promote_decl_mode(), promote_function_mode(), promote_ssa_mode(), PUT_MODE(), read_complex_part(), REF_REVERSE_STORAGE_ORDER, REG_P, REGNO, replace_equiv_address(), SAVE_EXPR_RESOLVED_P, SCALAR_FLOAT_MODE_P, SCALAR_INT_MODE_P, SCALAR_INT_TYPE_MODE, SCOPE_FILE_SCOPE_P, SET_DECL_RTL, set_mem_addr_space(), set_mem_align(), set_mem_attributes(), set_mem_expr(), set_mem_size(), simplify_gen_binary(), size_diffop_loc(), size_int, sizetype, ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, stmt_is_replaceable_p(), store_constructor(), store_expr(), SUBREG_PROMOTED_SET, SUBREG_PROMOTED_VAR_P, targetm, tcc_binary, tcc_comparison, tcc_unary, wi::to_poly_offset(), wi::to_wide(), TREE_ADDRESSABLE, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, tree_fits_uhwi_p(), TREE_FIXED_CST, TREE_IMAGPART, tree_int_cst_equal(), TREE_INT_CST_LOW, TREE_OPERAND, tree_output_constant_def(), TREE_READONLY, TREE_REAL_CST, TREE_REALPART, TREE_SIDE_EFFECTS, TREE_STATIC, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_THIS_VOLATILE, TREE_TYPE, TREE_USED, TREE_VALUE, separate_ops::type, type(), TYPE_ADDR_SPACE, TYPE_ALIGN, lang_hooks_for_types::type_for_mode, type_has_mode_precision_p(), TYPE_MODE, TYPE_PRECISION, TYPE_REVERSE_STORAGE_ORDER, TYPE_SIZE, TYPE_UNSIGNED, lang_hooks::types, profile_probability::uninitialized(), use_anchored_address(), validize_mem(), VAR_P, vec_alloc(), VECTOR_CST_ELT, VECTOR_CST_NELTS, VECTOR_MODE_P, VECTOR_TYPE_P, VL_EXP_CLASS_P, warning_at(), and XEXP.
Referenced by expand_expr_real(), and expand_expr_real_1().
rtx expand_expr_real_2 | ( | const_sepops | ops, |
rtx | target, | ||
machine_mode | tmode, | ||
enum expand_modifier | modifier ) |
References add_cost(), adjust_address, adjust_address_nv, ALL_FIXED_POINT_MODE_P, arg_pointer_rtx, assign_temp(), BITS_PER_WORD, build_int_cst(), can_conditionally_move_p(), CASE_CONVERT, choose_mult_variant(), separate_ops::code, const0_rtx, const1_rtx, CONST_INT_P, CONSTANT_P, constm1_rtx, CONVERT_EXPR_CODE_P, convert_modes(), convert_move(), convert_to_mode(), copy_rtx(), copy_to_mode_reg(), algorithm::cost, create_convert_operand_from(), create_input_operand(), create_output_operand(), DECL_RTL, do_compare_rtx_and_jump(), do_pending_stack_adjust(), do_store_flag(), emit_barrier(), emit_conditional_move(), emit_insn(), emit_jump_insn(), emit_label(), emit_move_insn(), end_sequence(), error_mark_node, expand_abs(), expand_and(), expand_binop(), expand_cond_expr_using_cmove(), expand_expr(), expand_expr_divmod(), expand_fix(), expand_fixed_convert(), expand_float(), EXPAND_INITIALIZER, expand_insn(), expand_mult(), expand_mult_highpart(), expand_mult_highpart_adjust(), EXPAND_NORMAL, expand_normal(), expand_operands(), EXPAND_STACK_PARM, EXPAND_SUM, expand_ternary_op(), expand_unop(), expand_variable_shift(), expand_vec_perm_const(), expand_vec_perm_var(), expand_vec_series_expr(), expand_vector_broadcast(), expand_widen_pattern_expr(), expand_widening_mult(), find_widening_optab_handler, fold_build1, fold_convert_loc(), force_lowpart_subreg(), force_operand(), force_reg(), frame_pointer_rtx, gcc_assert, gcc_unreachable, gen_highpart(), GEN_INT, gen_int_mode(), gen_label_rtx(), gen_reg_rtx(), GET_CODE, get_def_for_expr(), get_gimple_rhs_class(), get_insns(), GET_MODE, GET_MODE_2XWIDER_MODE(), GET_MODE_BITSIZE(), GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_PRECISION(), GET_MODE_SIZE(), get_subtarget(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), GIMPLE_BINARY_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, have_insn_for(), HWI_COMPUTABLE_MODE_P(), immed_wide_int_const(), int_fits_type_p(), INTEGRAL_TYPE_P, INTVAL, is_gimple_assign(), jumpifnot(), jumpifnot_1(), separate_ops::location, lowpart_subreg(), wi::mask(), MEM_P, MEM_VOLATILE_P, expand_operand::mode, mul_cost(), neg_cost(), negate_rtx(), NO_DEFER_POP, NULL, NULL_RTX, OK_DEFER_POP, separate_ops::op0, separate_ops::op1, separate_ops::op2, operand_equal_p(), algorithm::ops, optab_default, optab_for_tree_code(), optab_handler(), OPTAB_LIB_WIDEN, OPTAB_WIDEN, optimize_insn_for_speed_p(), plus_constant(), POINTER_TYPE_P, ptr_mode, really_constant_p(), REDUCE_BIT_FIELD, reg_overlap_mentioned_p(), REG_P, REGNO, safe_from_p(), SCALAR_INT_MODE_P, SCALAR_INT_TYPE_MODE, seq_cost(), set_mem_attributes(), wi::shwi(), simplify_gen_binary(), simplify_gen_subreg(), sizetype, SSA_NAME_DEF_STMT, ssizetype, stack_pointer_rtx, start_sequence(), store_bit_field(), store_expr(), store_field(), subreg_highpart_offset(), expand_operand::target, targetm, TREE_ADDRESSABLE, TREE_CODE, TREE_CONSTANT, tree_fits_shwi_p(), TREE_INT_CST_LOW, TREE_OPERAND, tree_to_poly_uint64(), tree_to_shwi(), tree_to_uhwi(), tree_to_vec_perm_builder(), TREE_TYPE, separate_ops::type, type(), TYPE_ADDR_SPACE, type_has_mode_precision_p(), TYPE_MODE, TYPE_PRECISION, TYPE_REVERSE_STORAGE_ORDER, TYPE_SATURATING, TYPE_SIZE, TYPE_UNSIGNED, TYPE_VECTOR_SUBPARTS(), profile_probability::uninitialized(), expand_operand::value, VAR_P, VECTOR_BOOLEAN_TYPE_P, VECTOR_MODE_P, VECTOR_TYPE_P, void_type_node, VOID_TYPE_P, word_mode, write_complex_part(), and XEXP.
Referenced by expand_arith_overflow(), expand_DIVMOD(), expand_expr_real_1(), expand_expr_real_gassign(), expand_mul_overflow(), expand_vector_ubsan_overflow(), maybe_optimize_mod_cmp(), and maybe_optimize_pow2p_mod_cmp().
rtx expand_expr_real_gassign | ( | gassign * | g, |
rtx | target, | ||
machine_mode | tmode, | ||
enum expand_modifier | modifier, | ||
rtx * | alt_rtl, | ||
bool | inner_reference_p ) |
A subroutine of expand_expr_real_1. Expand gimple assignment G, which is known to set an SSA_NAME result. The other arguments are as for expand_expr_real_1.
References separate_ops::code, curr_insn_location(), expand_ccmp_expr(), expand_expr_real(), expand_expr_real_2(), g, gcc_checking_assert, gcc_unreachable, get_gimple_rhs_class(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_rhs_code(), GIMPLE_BINARY_RHS, gimple_location(), GIMPLE_SINGLE_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, separate_ops::location, NULL, separate_ops::op0, separate_ops::op1, separate_ops::op2, r, REG_EXPR, REG_P, set_curr_insn_location(), set_reg_attrs_for_decl_rtl(), expand_operand::target, targetm, TREE_TYPE, separate_ops::type, TYPE_MODE, and UNKNOWN_LOCATION.
Referenced by expand_expr_real_1(), and expand_gimple_stmt_1().
|
static |
A helper function for expand_expr_real_2 to be used with a misaligned mem_ref TEMP. Assume an unsigned type if UNSIGNEDP is nonzero, with alignment ALIGN in bits. Store the value at TARGET if possible (if TARGET is nonzero). Regardless of TARGET, we return the rtx for where the value is placed. If the result can be stored at TARGET, and ALT_RTL is non-NULL, then *ALT_RTL is set to TARGET (before legitimziation).
References create_fixed_operand(), create_output_operand(), expand_insn(), extract_bit_field(), GET_MODE_BITSIZE(), expand_operand::mode, NULL_RTX, optab_handler(), expand_operand::target, targetm, and expand_operand::value.
Referenced by expand_expr_real_1().
void expand_operands | ( | tree | exp0, |
tree | exp1, | ||
rtx | target, | ||
rtx * | op0, | ||
rtx * | op1, | ||
enum expand_modifier | modifier ) |
Subroutine of expand_expr. Expand the two operands of a binary expression EXP0 and EXP1 placing the results in OP0 and OP1. The value may be stored in TARGET if TARGET is nonzero. The MODIFIER argument is as documented by expand_expr.
References copy_rtx(), expand_expr(), NULL_RTX, operand_equal_p(), safe_from_p(), and expand_operand::target.
Referenced by do_store_flag(), expand_cond_expr_using_cmove(), and expand_expr_real_2().
void expand_reversed_crc_table_based | ( | rtx | op0, |
rtx | op1, | ||
rtx | op2, | ||
rtx | op3, | ||
machine_mode | data_mode, | ||
void(* | gen_reflecting_code )(rtx *op) ) |
Generate table-based reversed CRC code for the given CRC, INPUT_DATA and the POLYNOMIAL (without leading 1). CRC is OP1, data is OP2 and the polynomial is OP3. This must generate CRC table and assembly for the following code, where crc_bit_size and data_bit_size may be 8, 16, 32, 64: uint_crc_bit_size_t crc_crc_bit_size (uint_crc_bit_size_t crc_init, uint_data_bit_size_t data, size_t size) { reflect (crc_init) uint_crc_bit_size_t crc = crc_init; reflect (data); for (int i = 0; i < data_bit_size / 8; i++) crc = (crc << 8) ^ crc_table[(crc >> (crc_bit_size - 8)) ^ (data >> (data_bit_size - (i + 1) * 8) & 0xFF))]; reflect (crc); return crc; }
References calculate_table_based_CRC(), CONST_INT_P, convert_move(), gcc_assert, gen_reg_rtx(), and GET_MODE.
Referenced by expand_builtin_crc_table_based(), and expand_crc_optab_fn().
|
static |
Expand CODE with arguments INNER & (1<<BITNUM) and 0 that represents a single bit equality/inequality test, returns where the result is located.
References build_int_cst(), separate_ops::code, const0_rtx, const1_rtx, CONST_SCALAR_INT_P, convert_move(), expand_binop(), expand_expr(), EXPAND_NORMAL, extract_bit_field(), fold_build2_loc(), fold_convert_loc(), gcc_assert, gen_reg_rtx(), get_def_for_expr(), GET_MODE, GET_MODE_BITSIZE(), gimple_assign_rhs1(), gimple_assign_rhs2(), load_extend_op(), wi::lrshift(), wi::ltu_p(), NULL, NULL_RTX, OPTAB_LIB_WIDEN, SCALAR_INT_TYPE_MODE, signed_type_for(), wi::to_wide(), TREE_CODE, tree_to_uhwi(), TREE_TYPE, lang_hooks_for_types::type_for_mode, type_has_mode_precision_p(), TYPE_PRECISION, and lang_hooks::types.
Referenced by do_store_flag().
Return an rtx for the size in bytes of the value of EXP.
References exp(), expand_expr(), EXPAND_NORMAL, gcc_assert, NULL_RTX, sizetype, SUBSTITUTE_PLACEHOLDER_IN_EXPR, TREE_CODE, tree_expr_size(), TREE_OPERAND, and TYPE_MODE.
Referenced by do_compare_and_jump(), emit_partition_copy(), expand_assignment(), expand_constructor(), expand_gimple_stmt_1(), initialize_argument_information(), store_constructor(), and store_expr().
|
static |
Returns the number of FIELD_DECLs in TYPE.
References count, DECL_CHAIN, TREE_CODE, and TYPE_FIELDS.
Referenced by store_constructor().
poly_int64 find_args_size_adjust | ( | rtx_insn * | insn | ) |
A utility routine used here, in reload, and in try_split. The insns after PREV up to and including LAST are known to adjust the stack, with a final value of END_ARGS_SIZE. Iterate backward from LAST placing notes as appropriate. PREV may be NULL, indicating the entire insn sequence prior to LAST should be scanned. The set of allowed stack pointer modifications is small: (1) One or more auto-inc style memory references (aka pushes), (2) One or more addition/subtraction with the SP as destination, (3) A single move insn with the SP as destination, (4) A call_pop insn, (5) Noreturn call insns if !ACCUMULATE_OUTGOING_ARGS. Insns in the sequence that do not modify the SP are ignored, except for noreturn calls. The return value is the amount of adjustment that can be trivially verified, via immediate operand or auto-inc. If the adjustment cannot be trivially extracted, the return value is HOST_WIDE_INT_MIN.
References CALL_P, gcc_assert, gcc_checking_assert, gcc_unreachable, GET_CODE, GET_MODE, GET_MODE_SIZE(), HOST_WIDE_INT_MIN, i, mem_autoinc_base(), NULL, offset, PATTERN(), REG_P, REGNO, rtx_equal_p(), rtx_to_poly_int64(), SCALAR_INT_MODE_P, SET, SET_DEST, SET_SRC, single_set(), stack_pointer_rtx, strip_offset(), XEXP, XVECEXP, and XVECLEN.
Referenced by fixup_args_size_notes(), and old_insns_match_p().
poly_int64 fixup_args_size_notes | ( | rtx_insn * | prev, |
rtx_insn * | last, | ||
poly_int64 | end_args_size ) |
References ACCUMULATE_OUTGOING_ARGS, add_args_size_note(), CALL_P, find_args_size_adjust(), find_reg_note(), gcc_assert, get_args_size(), HOST_WIDE_INT_MIN, known_eq, last, NONDEBUG_INSN_P, NULL_RTX, PREV_INSN(), and STACK_GROWS_DOWNWARD.
Referenced by distribute_notes(), expand_builtin_apply(), expand_call(), expand_stack_restore(), peep2_attempt(), reload_as_needed(), and try_split().
|
static |
Return true if field F of structure TYPE is a flexible array.
References DECL_CHAIN, int_size_in_bytes(), integer_zerop(), NULL, TREE_CODE, TREE_TYPE, TYPE_DOMAIN, TYPE_MAX_VALUE, and TYPE_MIN_VALUE.
Referenced by count_type_elements().
Given an rtx VALUE that may contain additions and multiplications, return an equivalent value that just refers to a register, memory, or constant. This is done by generating instructions to perform the arithmetic and returning a pseudo-register containing the value. The returned value may be a REG, SUBREG, MEM or constant.
References ARITHMETIC_P, CONST_INT_P, CONSTANT_P, convert_move(), emit_move_insn(), expand_divmod(), expand_fix(), expand_float(), expand_mult(), expand_simple_binop(), expand_simple_unop(), FLOAT_MODE_P, force_operand(), force_reg(), gen_reg_rtx(), GET_CODE, GET_MODE, get_subtarget(), INTEGRAL_MODE_P, MEM_P, negate_rtx(), NULL_RTX, OPTAB_LIB_WIDEN, paradoxical_subreg_p(), pic_offset_table_rtx, REG_P, simplify_gen_subreg(), SUBREG_BYTE, SUBREG_REG, expand_operand::target, UNARY_P, expand_operand::value, VIRTUAL_REGISTER_P, and XEXP.
Referenced by add_test(), allocate_dynamic_stack_space(), anti_adjust_stack_and_probe(), combine_var_copies_in_loop_exit(), compare_and_jump_seq(), compute_stack_clash_protection_loop_data(), copy_to_mode_reg(), copy_to_reg(), doloop_modify(), emit_block_cmp_via_loop(), emit_block_move_via_loop(), emit_block_move_via_oriented_loop(), emit_library_call_value_1(), expand_assignment(), expand_builtin_adjust_descriptor(), expand_builtin_apply_args_1(), expand_builtin_memory_copy_args(), expand_builtin_memset_args(), expand_builtin_setjmp_setup(), expand_builtin_stpcpy_1(), expand_builtin_strncpy(), expand_builtin_strub_leave(), expand_call(), expand_divmod(), expand_expr_addr_expr_1(), expand_expr_real_1(), expand_expr_real_2(), expand_gimple_stmt_1(), expand_movstr(), expand_mult_const(), expand_mult_highpart_adjust(), expmed_mult_highpart(), force_operand(), force_reg(), get_dynamic_stack_size(), insert_base_initialization(), instantiate_virtual_regs_in_insn(), memory_address_addr_space(), probe_stack_range(), round_push(), rtl_lv_add_condition_to_bb(), split_iv(), store_expr(), try_store_by_multiple_pieces(), and unroll_loop_runtime_iterations().
void gen_common_operation_to_reflect | ( | rtx * | op, |
unsigned HOST_WIDE_INT | and1_value, | ||
unsigned HOST_WIDE_INT | and2_value, | ||
unsigned | shift_val ) |
Generate the common operation for reflecting values: *OP = (*OP & AND1_VALUE) << SHIFT_VAL | (*OP & AND2_VALUE) >> SHIFT_VAL;
References expand_and(), expand_binop(), expand_shift(), gen_int_mode(), GET_MODE, NULL_RTX, and OPTAB_LIB_WIDEN.
Referenced by reflect_16_bit_value(), reflect_32_bit_value(), reflect_64_bit_value(), and reflect_8_bit_value().
Generate a PARALLEL rtx for a new non-consecutive group of registers from ORIG, where ORIG is a non-consecutive group of registers represented by a PARALLEL. The clone is identical to the original except in that the original set of registers is replaced by a new set of pseudo registers. The new set has the same modes as the original set.
References gcc_assert, gen_reg_rtx(), gen_rtvec_v(), gen_rtx_EXPR_LIST(), GET_CODE, GET_MODE, i, expand_operand::mode, offset, XEXP, XVECEXP, and XVECLEN.
Referenced by expand_function_start().
Generate the body of an instruction to copy Y into X. It may be a list of insns, if one insn isn't enough.
References emit_move_insn_1(), end_sequence(), get_insns(), start_sequence(), and y.
Referenced by canonicalize_comparison(), eliminate_partially_redundant_load(), address_reload_context::emit_autoinc(), emit_inc_dec_insn_before(), emit_spill_move(), emit_stack_restore(), emit_stack_save(), expand_gimple_basic_block(), find_moveable_pseudos(), gcse_emit_move_after(), gen_reload(), inc_for_reload(), insert_store(), make_more_copies(), move_invariant_reg(), pre_insert_copy_insn(), split_live_ranges_for_shrink_wrap(), and update_ld_motion_stores().
rtx generate_crc_table | ( | unsigned HOST_WIDE_INT | polynom, |
unsigned short | crc_bits ) |
Generate CRC lookup table by calculating CRC for all possible 8-bit data values. The table is stored with a specific name in the read-only static data section. POLYNOM is the polynomial used to calculate the CRC table's elements. CRC_BITS is the size of CRC, may be 8, 16, ... .
References assemble_crc_table(), gcc_assert, get_identifier(), HOST_WIDE_INT_PRINT_HEX, IDENTIFIER_POINTER, and maybe_get_identifier().
Referenced by calculate_table_based_CRC().
void generate_reflecting_code_standard | ( | rtx * | op | ) |
Generate instruction sequence which reflects the value of the OP using shift, and, or operations. OP's mode may be less than word_mode.
References gcc_assert, GET_MODE, GET_MODE_BITSIZE(), reflect_16_bit_value(), reflect_32_bit_value(), reflect_64_bit_value(), and reflect_8_bit_value().
Referenced by expand_builtin_crc_table_based(), and expand_crc_optab_fn().
void get_bit_range | ( | poly_uint64 * | bitstart, |
poly_uint64 * | bitend, | ||
tree | exp, | ||
poly_int64 * | bitpos, | ||
tree * | offset ) |
In the C++ memory model, consecutive bit fields in a structure are considered one memory location. Given a COMPONENT_REF EXP at position (BITPOS, OFFSET), this function returns the bit range of consecutive bits in which this COMPONENT_REF belongs. The values are returned in *BITSTART and *BITEND. *BITPOS and *OFFSET may be adjusted in the process. If the access does not need to be restricted, 0 is returned in both *BITSTART and *BITEND.
References DECL_BIT_FIELD_REPRESENTATIVE, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_SIZE, exp(), gcc_assert, get_inner_reference(), handled_component_p(), maybe_gt, NULL_TREE, offset, poly_int_tree_p(), size_binop, size_int, TREE_CODE, TREE_OPERAND, tree_to_poly_uint64(), and tree_to_uhwi().
Referenced by expand_assignment(), and optimize_bit_field_compare().
Return the defining gimple statement for SSA_NAME NAME if it is an assigment and the code of the expresion on the RHS is CODE. Return NULL otherwise.
References get_gimple_for_ssa_name(), gimple_assign_rhs_code(), NULL, and TREE_CODE.
Referenced by do_store_flag(), expand_expr_real_1(), expand_expr_real_2(), expand_single_bit_test(), maybe_optimize_mod_cmp(), maybe_optimize_pow2p_mod_cmp(), maybe_optimize_sub_cmp_0(), and store_field().
|
static |
Return the defining gimple statement for SSA_NAME NAME if it is an assigment and the class of the expresion on the RHS is CLASS. Return NULL otherwise.
References get_gimple_for_ssa_name(), gimple_assign_rhs_code(), NULL, TREE_CODE, and TREE_CODE_CLASS.
Referenced by expand_cond_expr_using_cmove().
tree get_inner_reference | ( | tree | exp, |
poly_int64 * | pbitsize, | ||
poly_int64 * | pbitpos, | ||
tree * | poffset, | ||
machine_mode * | pmode, | ||
int * | punsignedp, | ||
int * | preversep, | ||
int * | pvolatilep ) |
Given an expression EXP that may be a COMPONENT_REF, a BIT_FIELD_REF, an ARRAY_REF, or an ARRAY_RANGE_REF, look for nested operations of these codes and find the ultimate containing object, which we return. We set *PBITSIZE to the size in bits that we want, *PBITPOS to the bit position, *PUNSIGNEDP to the signedness and *PREVERSEP to the storage order of the field. If the position of the field is variable, we store a tree giving the variable offset (in units) in *POFFSET. This offset is in addition to the bit position. If the position is not variable, we store 0 in *POFFSET. If any of the extraction expressions is volatile, we store 1 in *PVOLATILEP. Otherwise we don't change that. If the field is a non-BLKmode bit-field, *PMODE is set to VOIDmode. Otherwise, it is a mode that can be used to access the field. If the field describes a variable-sized object, *PMODE is set to BLKmode and *PBITSIZE is set to -1. An access cannot be made in this case, but the address of the object can be found.
References array_ref_element_size(), array_ref_low_bound(), bits_to_bytes_round_down, build_int_cst(), component_ref_field_offset(), DECL_BIT_FIELD, DECL_BIT_FIELD_TYPE, DECL_FIELD_BIT_OFFSET, DECL_MODE, DECL_SIZE, DECL_UNSIGNED, exp(), fold_build2, fold_convert, poly_int< N, C >::force_shwi(), GET_MODE_BITSIZE(), integer_zerop(), INTEGRAL_TYPE_P, mem_ref_offset(), expand_operand::mode, NULL_TREE, num_trailing_bits, offset, poly_int_tree_p(), reverse_storage_order_for_component_p(), wi::sext(), size_binop, size_zero_node, sizetype, wi::to_poly_offset(), poly_int< N, C >::to_shwi(), TREE_CODE, tree_fits_uhwi_p(), tree_int_cst_equal(), TREE_OPERAND, TREE_THIS_VOLATILE, tree_to_uhwi(), TREE_TYPE, TYPE_MODE, TYPE_MODE_RAW, TYPE_PRECISION, TYPE_SIZE, TYPE_UNSIGNED, VECTOR_MODE_P, and VECTOR_TYPE_P.
Referenced by decode_field_reference(), delegitimize_mem_from_attrs(), dr_analyze_innermost(), expand_assignment(), expand_debug_expr(), expand_expr_addr_expr_1(), expand_expr_real_1(), extract_base_bit_offset(), fold_comparison(), fold_unary_loc(), fortran_common(), get_base_for_alignment_1(), get_bit_range(), get_inner_reference_aff(), get_object_alignment_2(), instrument_bool_enum_load(), instrument_derefs(), instrument_expr(), instrument_object_size(), interpret_rhs_expr(), loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree_1(), make_bit_field_ref(), maybe_instrument_pointer_overflow(), maybe_optimize_ubsan_ptr_ifn(), optimize_bit_field_compare(), fold_using_range::range_of_address(), scan_operand_equal_p(), slsr_process_ref(), split_address_to_core_and_offset(), split_constant_offset_1(), tree_to_aff_combination(), and vect_check_gather_scatter().
Extracts the personality function of DECL and returns the corresponding libfunc.
References DECL_FUNCTION_PERSONALITY, DECL_RTL, DECL_STRUCT_FUNCTION, lang_hooks::eh_personality, eh_personality_any, eh_personality_lang, eh_personality_none, function_needs_eh_personality(), gcc_assert, NULL, NULL_TREE, and XEXP.
Referenced by dwarf2out_begin_prologue(), dwarf2out_do_cfi_startproc(), output_function_exception_table(), and sjlj_emit_function_enter().
Return X if X can be used as a subtarget in a sequence of arithmetic operations.
Referenced by do_store_flag(), expand_expr_real_1(), expand_expr_real_2(), and force_operand().
unsigned HOST_WIDE_INT gf2n_poly_long_div_quotient | ( | unsigned HOST_WIDE_INT | polynomial, |
unsigned short | n ) |
Return the quotient of polynomial long division of x^2N by POLYNOMIAL in GF (2^N). Author: Richard Sandiford <richard.sandiford@arm.com>
References gcc_assert, HOST_WIDE_INT_1U, and i.
unsigned HOST_WIDE_INT highest_pow2_factor | ( | const_tree | exp | ) |
Return the highest power of two that EXP is known to be a multiple of. This is used in updating alignment of MEMs in array references.
References exp(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, and tree_ctz().
Referenced by dr_analyze_innermost(), expand_expr_real_1(), get_base_for_alignment_1(), highest_pow2_factor_for_target(), store_constructor(), store_expr(), and vect_find_stmt_data_reference().
|
static |
Similar, except that the alignment requirements of TARGET are taken into account. Assume it is at least as aligned as its type, unless it is a COMPONENT_REF in which case the layout of the structure gives the alignment.
References exp(), highest_pow2_factor(), MAX, expand_operand::target, and target_align().
Referenced by expand_assignment().
bool immediate_const_ctor_p | ( | const_tree | ctor, |
unsigned int | words ) |
Return true if constructor CTOR is simple enough to be materialized in an integer mode register. Limit the size to WORDS words, which is 1 by default.
References CONSTRUCTOR_NELTS, initializer_constant_valid_for_bitfield_p(), int_expr_size(), TREE_ADDRESSABLE, TREE_CODE, TREE_CONSTANT, and TREE_TYPE.
Referenced by emit_push_insn(), expand_expr_real_1(), and load_register_parameters().
void init_expr | ( | void | ) |
This is run at the start of compiling a function.
References crtl.
Referenced by gimplify_target_expr(), prepare_function_start(), vect_create_nonlinear_iv_init(), vect_is_nonlinear_iv_evolution(), vect_is_simple_iv_evolution(), vect_peel_nonlinear_iv_init(), vect_update_ivs_after_vectorizer(), vectorizable_induction(), and vectorizable_nonlinear_induction().
void init_expr_target | ( | void | ) |
This is run to set up which modes can be used directly in memory and to initialize the block move optab. It is run at the beginning of compilation and when the target is reinitialized.
References as_a(), can_extend_p(), direct_load, direct_store, float_extend_from_mem, FOR_EACH_MODE_IN_CLASS, FOR_EACH_MODE_UNTIL, frame_pointer_rtx, gen_raw_REG(), gen_rtx_MEM(), gen_rtx_REG(), insn_operand_matches(), LAST_VIRTUAL_REGISTER, NULL_RTX, PATTERN(), PUT_MODE(), recog(), opt_mode< T >::require(), rtx_alloc(), SET_DEST, set_mode_and_regno(), SET_SRC, stack_pointer_rtx, targetm, and word_mode.
Referenced by backend_init_target().
HOST_WIDE_INT int_expr_size | ( | const_tree | exp | ) |
Return a wide integer for the size in bytes of the value of EXP, or -1 if the size can vary or is larger than an integer.
References exp(), gcc_assert, TREE_CODE, tree_expr_size(), tree_fits_shwi_p(), TREE_OPERAND, and tree_to_shwi().
Referenced by emit_push_insn(), expand_constructor(), expand_expr_real_1(), immediate_const_ctor_p(), load_register_parameters(), and store_expr().
|
static |
Subroutine of above: returns true if OFFSET corresponds to an offset that when applied to the address of EXP produces an address known to be aligned more than BIGGEST_ALIGNMENT.
References compare_tree_int(), CONVERT_EXPR_P, exp(), offset, pow2p_hwi(), TREE_CODE, tree_fits_uhwi_p(), TREE_OPERAND, and tree_to_uhwi().
Referenced by expand_expr_real_1().
Return a form of X that does not use a PARALLEL. TYPE is the type of the value stored in X.
References emit_group_store(), gcc_checking_assert, gen_reg_rtx(), GET_CODE, GET_MODE, int_size_in_bytes(), expand_operand::mode, and TYPE_MODE.
Referenced by expand_assignment(), expand_builtin_int_roundingfn(), and expand_builtin_int_roundingfn_2().
Attempt to optimize unsigned (X % C1) == C2 (or (X % C1) != C2). If C1 is odd to: (X - C2) * C3 <= C4 (or >), where C3 is modular multiplicative inverse of C1 and 1<<prec and C4 is ((1<<prec) - 1) / C1 or ((1<<prec) - 1) / C1 - 1 (the latter if C2 > ((1<<prec) - 1) % C1). If C1 is even, S = ctz (C1) and C2 is 0, use ((X * C3) r>> S) <= C4, where C3 is modular multiplicative inverse of C1>>S and 1<<prec and C4 is (((1<<prec) - 1) / (C1>>S)) >> S. For signed (X % C1) == 0 if C1 is odd to (all operations in it unsigned): (X * C3) + C4 <= 2 * C4, where C3 is modular multiplicative inverse of (unsigned) C1 and 1<<prec and C4 is ((1<<(prec - 1) - 1) / C1). If C1 is even, S = ctz(C1), use ((X * C3) + C4) r>> S <= (C4 >> (S - 1)) where C3 is modular multiplicative inverse of (unsigned)(C1>>S) and 1<<prec and C4 is ((1<<(prec - 1) - 1) / (C1>>S)) & (-1<<S). See the Hacker's Delight book, section 10-17.
References a, b, wi::bit_and(), build_int_cst(), separate_ops::code, compare_tree_int(), wi::ctz(), wi::divmod_trunc(), do_pending_stack_adjust(), emit_insn(), end_sequence(), expand_expr_real_2(), EXPAND_NORMAL, expand_normal(), fold_build2_loc(), fold_convert, fold_convert_loc(), FOR_EACH_IMM_USE_FAST, wide_int_storage::from(), gcc_checking_assert, get_def_for_expr(), get_insns(), GET_MODE_BITSIZE(), get_range_pos_neg(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_bb(), gimple_location(), wi::gtu_p(), integer_pow2p(), integer_zerop(), is_a(), is_gimple_assign(), separate_ops::location, wi::lrshift(), wi::lshift(), make_tree(), wi::mask(), maybe_optimize_pow2p_mod_cmp(), wi::mod_inv(), NULL, NULL_RTX, NULL_TREE, separate_ops::op0, separate_ops::op1, separate_ops::op2, operand_equal_p(), optimize_insn_for_speed_p(), rtx_cost(), seq_cost(), wi::shifted_mask(), SIGNED, start_sequence(), wi::to_wide(), TREE_CODE, tree_int_cst_le(), tree_int_cst_sgn(), TREE_TYPE, separate_ops::type, TYPE_MODE, TYPE_PRECISION, TYPE_UNSIGNED, wi::udiv_trunc(), wi::umod_trunc(), UNSIGNED, unsigned_type_for(), USE_STMT, and wide_int_to_tree().
Referenced by do_store_flag(), and expand_gimple_cond().
Optimize x % C1 == C2 for signed modulo if C1 is a power of two and C2 is non-zero and C3 ((1<<(prec-1)) | (C1 - 1)): for C2 > 0 to x & C3 == C2 for C2 < 0 to x & C3 == (C2 & C3).
References separate_ops::code, do_pending_stack_adjust(), emit_insn(), end_sequence(), expand_expr_real_2(), EXPAND_NORMAL, expand_normal(), get_def_for_expr(), get_insns(), GET_MODE_BITSIZE(), get_range_pos_neg(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_location(), integer_zerop(), is_a(), separate_ops::location, make_tree(), NULL_RTX, NULL_TREE, separate_ops::op0, separate_ops::op1, separate_ops::op2, optimize_insn_for_speed_p(), rtx_cost(), seq_cost(), wi::shifted_mask(), start_sequence(), wi::to_wide(), wi::to_widest(), tree_int_cst_sgn(), TREE_TYPE, separate_ops::type, TYPE_MODE, TYPE_PRECISION, TYPE_UNSIGNED, and wide_int_to_tree().
Referenced by maybe_optimize_mod_cmp().
Optimize x - y < 0 into x < 0 if x - y has undefined overflow.
References separate_ops::code, gcc_checking_assert, get_def_for_expr(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_location(), integer_zerop(), issue_strict_overflow_warning, NULL, op_symbol_code(), TREE_TYPE, TYPE_OVERFLOW_UNDEFINED, WARN_STRICT_OVERFLOW_COMPARISON, and warning_at().
Referenced by do_store_flag(), and expand_gimple_cond().
A utility routine that returns the base of an auto-inc memory, or NULL.
References GET_CODE, GET_RTX_CLASS, MEM_P, NULL, RTX_AUTOINC, and XEXP.
Referenced by find_args_size_adjust().
Returns true if REF refers to an object that does not reside in memory and has non-BLKmode.
References non_mem_decl_p(), TREE_CODE, and TREE_OPERAND.
Referenced by expand_assignment(), expand_DEFERRED_INIT(), and expand_expr_real_1().
If reading SIZE bytes from X will end up reading from Y return the number of bytes that overlap. Return -1 if there is no overlap or -2 if we can't determine (for example when X and Y have different base registers).
References CONST_INT_P, IN_RANGE, INTVAL, plus_constant(), simplify_gen_binary(), and y.
Referenced by emit_push_insn().
|
static |
Return true if EXP contains mostly (3/4) zeros.
References categorize_ctor_elements(), exp(), initializer_zerop(), and TREE_CODE.
Referenced by expand_constructor(), and store_constructor().
void move_block_from_reg | ( | int | regno, |
rtx | x, | ||
int | nregs ) |
Copy all or part of a BLKmode value X out of registers starting at REGNO. The number of registers to be filled is NREGS.
References delete_insns_since(), emit_insn(), emit_move_insn(), gcc_assert, GEN_INT, gen_rtx_REG(), get_last_insn(), i, last, operand_subword(), targetm, and word_mode.
Referenced by assign_parm_adjust_entry_rtl(), and assign_parm_setup_block().
void move_block_to_reg | ( | int | regno, |
rtx | x, | ||
int | nregs, | ||
machine_mode | mode ) |
Copy all or part of a value X into registers starting at REGNO. The number of registers to be filled is NREGS.
References CONSTANT_P, delete_insns_since(), emit_insn(), emit_move_insn(), force_const_mem(), GEN_INT, gen_rtx_REG(), get_last_insn(), i, last, expand_operand::mode, operand_subword_force(), targetm, validize_mem(), and word_mode.
Referenced by emit_push_insn(), and load_register_parameters().
rtx move_by_pieces | ( | rtx | to, |
rtx | from, | ||
unsigned HOST_WIDE_INT | len, | ||
unsigned int | align, | ||
memop_ret | retmode ) |
Generate several move instructions to copy LEN bytes from block FROM to block TO. (These are MEM rtx's with BLKmode). If PUSH_ROUNDING is defined and TO is NULL, emit_single_push_insn is used to push FROM to the stack. ALIGN is maximum stack alignment we can assume. Return value is based on RETMODE argument.
References gcc_unreachable, NULL, and RETURN_BEGIN.
Referenced by emit_block_move_hints(), and emit_push_insn().
Returns true if BASE is a DECL that does not reside in memory and has non-BLKmode. DECL_RTL must not be a MEM; if DECL_RTL was not set yet, return false.
References DECL_MODE, DECL_P, DECL_RTL, DECL_RTL_SET_P, MEM_P, and TREE_ADDRESSABLE.
Referenced by expand_DEFERRED_INIT(), and mem_ref_refers_to_non_mem_p().
|
static |
A subroutine of expand_assignment. Optimize FIELD op= VAL, where FIELD is a bitfield. Returns true if the optimization was successful, and there's nothing else to do.
References adjust_address, BITS_PER_WORD, const1_rtx, convert_modes(), emit_move_insn(), expand_and(), expand_binop(), expand_expr(), EXPAND_NORMAL, expand_shift(), flip_storage_order(), gen_int_mode(), get_best_mode(), GET_CODE, get_gimple_for_ssa_name(), GET_MODE, GET_MODE_BITSIZE(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), HOST_WIDE_INT_1U, poly_int< N, C >::is_constant(), is_gimple_assign(), MEM_ALIGN, MEM_P, NULL, NULL_RTX, operand_equal_p(), OPTAB_WIDEN, REG_P, set_mem_alias_set(), set_mem_expr(), shallow_copy_rtx(), STRIP_NOPS, tcc_binary, TREE_CODE, TREE_CODE_CLASS, TREE_SIDE_EFFECTS, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_MODE, TYPE_UNSIGNED, and expand_operand::value.
Referenced by expand_assignment().
rtx push_block | ( | rtx | size, |
poly_int64 | extra, | ||
int | below ) |
Pushing data onto the stack.
Push a block of length SIZE (perhaps variable) and return an rtx to address the beginning of the block. The value may be virtual_outgoing_args_rtx. EXTRA is the number of bytes of padding to push in addition to SIZE. BELOW nonzero means this padding comes at low addresses; otherwise, the padding comes at high addresses.
References anti_adjust_stack(), CONSTANT_P, convert_modes(), copy_to_mode_reg(), expand_binop(), gen_int_mode(), known_eq, memory_address, NARROWEST_INT_MODE, negate_rtx(), OPTAB_LIB_WIDEN, plus_constant(), poly_int_rtx_p(), ptr_mode, REG_P, STACK_GROWS_DOWNWARD, and virtual_outgoing_args_rtx.
Referenced by emit_library_call_value_1(), emit_push_insn(), and expand_call().
Extract one of the components of the complex value CPLX. Extract the real part if IMAG_P is false, and the imaginary part if it's true.
References adjust_address_nv, BITS_PER_WORD, CONSTANT_CLASS_P, expand_expr(), EXPAND_NORMAL, extract_bit_field(), gcc_assert, GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_INNER, GET_MODE_SIZE(), MEM_P, NULL, NULL_RTX, REG_NREGS, REG_P, REGNO, simplify_gen_subreg(), SYMBOL_REF_DECL, TREE_CODE, TREE_IMAGPART, TREE_REALPART, and XEXP.
Referenced by emit_move_complex_parts(), emit_move_complex_push(), expand_assignment(), expand_expr_real_1(), and flip_storage_order().
Subroutine of above: reduce EXP to the precision of TYPE (in the signedness of TYPE), possibly returning the result in TARGET. TYPE is known to be a partial integer type.
References count, exp(), expand_and(), expand_expr(), EXPAND_NORMAL, expand_shift(), gcc_assert, GET_MODE, GET_MODE_PRECISION(), immed_wide_int_const(), wi::mask(), poly_int_rtx_p(), SCALAR_INT_TYPE_MODE, wi::to_poly_wide(), TYPE_PRECISION, TYPE_UNSIGNED, and wide_int_to_tree().
void reflect_16_bit_value | ( | rtx * | op | ) |
Reflect 16-bit value for the 16-bit target.
References gen_common_operation_to_reflect().
Referenced by generate_reflecting_code_standard().
void reflect_32_bit_value | ( | rtx * | op | ) |
Reflect 32-bit value for the 32-bit target.
References gen_common_operation_to_reflect().
Referenced by generate_reflecting_code_standard().
void reflect_64_bit_value | ( | rtx * | op | ) |
Reflect 64-bit value for the 64-bit target.
References gen_common_operation_to_reflect().
Referenced by generate_reflecting_code_standard().
void reflect_8_bit_value | ( | rtx * | op | ) |
Reflect 8-bit value for the 8-bit target.
References gen_common_operation_to_reflect().
Referenced by generate_reflecting_code_standard().
Subroutine of expand_expr: return true iff there is no way that EXP can reference X, which is being modified. TOP_P is nonzero if this call is going to be used to determine whether we need a temporary for EXP, as opposed to a recursive call to this function. It is always safe for this routine to return false since it merely searches for optimization opportunities.
References alias_sets_conflict_p(), COMPLETE_TYPE_P, CONSTRUCTOR_ELTS, DECL_EXPR_DECL, DECL_INITIAL, DECL_P, DECL_RTL, DECL_RTL_IF_SET, DECL_RTL_SET_P, exp(), FOR_EACH_VEC_SAFE_ELT, gcc_unreachable, get_alias_set(), GET_CODE, GET_MODE, i, constructor_elt::index, MEM_ALIAS_SET, MEM_P, NULL_TREE, REG_P, REGNO, rtx_equal_p(), safe_from_p(), staticp(), SUBREG_REG, tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, tcc_vl_exp, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_OPERAND_LENGTH, TREE_STATIC, TREE_TYPE, TREE_VALUE, true_dependence(), TYPE_ARRAY_MAX_SIZE, TYPE_SIZE, constructor_elt::value, virtual_outgoing_args_rtx, and XEXP.
Referenced by expand_builtin_fabs(), expand_constructor(), expand_expr_real_2(), expand_operands(), and safe_from_p().
A subroutine of clear_storage. Expand a call to memset. Return the return value of memset, 0 otherwise.
References build_call_expr(), builtin_decl_implicit(), CALL_EXPR_TAILCALL, CONST_INT_P, convert_to_mode(), copy_addr_to_reg(), copy_to_mode_reg(), expand_call(), integer_type_node, make_tree(), NULL_RTX, ptr_type_node, sizetype, TYPE_MODE, and XEXP.
Referenced by clear_storage_hints().
bool set_storage_via_setmem | ( | rtx | object, |
rtx | size, | ||
rtx | val, | ||
unsigned int | align, | ||
unsigned int | expected_align, | ||
HOST_WIDE_INT | expected_size, | ||
unsigned HOST_WIDE_INT | min_size, | ||
unsigned HOST_WIDE_INT | max_size, | ||
unsigned HOST_WIDE_INT | probable_max_size ) |
Expand a setmem pattern; return true if successful.
References byte_mode, CONST_INT_P, create_convert_operand_from(), create_convert_operand_to(), create_fixed_operand(), create_integer_operand(), direct_optab_handler(), FOR_EACH_MODE_IN_CLASS, gcc_assert, GET_MODE_BITSIZE(), GET_MODE_MASK, insn_data, INTVAL, maybe_expand_insn(), expand_operand::mode, NULL, and opt_mode< T >::require().
Referenced by asan_emit_stack_protection(), clear_storage_hints(), and expand_builtin_memset_args().
Return TRUE if expression STMT is suitable for replacement. Never consider memory loads as replaceable, because those don't ever lead into constant expressions.
References gimple_assign_rhs1(), gimple_assign_single_p(), is_gimple_val(), and ssa_is_replaceable_p().
Referenced by expand_expr_real_1().
rtx store_by_pieces | ( | rtx | to, |
unsigned HOST_WIDE_INT | len, | ||
by_pieces_constfn | constfun, | ||
void * | constfundata, | ||
unsigned int | align, | ||
bool | memsetp, | ||
memop_ret | retmode ) |
Generate several move instructions to store LEN bytes generated by CONSTFUN to block TO. (A MEM rtx with BLKmode). CONSTFUNDATA is a pointer which will be passed as argument in every CONSTFUN call. ALIGN is maximum alignment we can assume. MEMSETP is true if this is a memset operation and false if it's a copy of a constant string. Return value is based on RETMODE argument.
References gcc_assert, optimize_insn_for_speed_p(), RETURN_BEGIN, RETURN_END_MINUS_ONE, SET_BY_PIECES, STORE_BY_PIECES, and targetm.
Referenced by asan_emit_stack_protection(), expand_builtin_memory_copy_args(), expand_builtin_memset_args(), expand_builtin_strncpy(), store_expr(), and try_store_by_multiple_pieces().
void store_constructor | ( | tree | exp, |
rtx | target, | ||
int | cleared, | ||
poly_int64 | size, | ||
bool | reverse ) |
Store the value of constructor EXP into the rtx TARGET. TARGET is either a REG or a MEM; we know it cannot conflict, since safe_from_p has been called. CLEARED is true if TARGET is known to have been zero'd. SIZE is the number of bytes of TARGET we are allowed to modify: this may not be the same as the size of EXP if we are assigning to a field which has been packed to exclude padding bits. If REVERSE is true, the store is to be done in reverse order.
References adjust_address, bit_position(), BITS_PER_WORD, BLOCK_OP_NORMAL, build2(), build_decl(), build_int_cst(), clear_storage(), CONST0_RTX, CONSTRUCTOR_ELT, CONSTRUCTOR_ELTS, CONSTRUCTOR_NELTS, convert_move(), convert_optab_handler(), copy_rtx(), count, create_input_operand(), create_output_operand(), DECL_BIT_FIELD, DECL_FIELD_OFFSET, DECL_MODE, DECL_NONADDRESSABLE_P, DECL_SIZE, do_pending_stack_adjust(), emit_clobber(), emit_insn(), emit_jump(), emit_label(), emit_move_insn(), exp(), expand_assignment(), expand_binop(), expand_insn(), expand_normal(), EXPR_LOCATION, expr_size(), fields_length(), fold_build2, fold_convert, FOR_EACH_CONSTRUCTOR_ELT, FOR_EACH_CONSTRUCTOR_VALUE, force_reg(), gcc_assert, gcc_unreachable, GEN_INT, gen_int_mode(), gen_label_rtx(), gen_reg_rtx(), get_alias_set(), GET_MODE, GET_MODE_BITSIZE(), GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_PRECISION(), GET_MODE_SIZE(), highest_pow2_factor(), HOST_WIDE_INT_1U, i, constructor_elt::index, initializer_zerop(), int_bit_position(), int_size_in_bytes(), integer_one_node, integer_type_node, poly_int< N, C >::is_constant(), jumpif(), known_eq, known_gt, known_le, wi::mask(), maybe_gt, MEM_ALIAS_SET, MEM_KEEP_ALIAS_SET_P, MEM_P, expand_operand::mode, mostly_zeros_p(), NULL, NULL_TREE, offset, offset_address(), optab_handler(), OPTAB_WIDEN, poly_int_tree_p(), promote_decl_mode(), REG_P, REGMODE_NATURAL_SIZE, rtvec_alloc(), RTVEC_ELT, rtx_equal_p(), SCALAR_INT_MODE_P, SET_DECL_RTL, size_binop, ssize_int, ssizetype, store_constructor(), store_constructor_field(), store_expr(), expand_operand::target, poly_int< N, C >::to_constant(), TREE_CODE, tree_fits_shwi_p(), tree_fits_uhwi_p(), TREE_OPERAND, TREE_SIDE_EFFECTS, TREE_STATIC, tree_to_shwi(), tree_to_uhwi(), TREE_TYPE, TYPE_DOMAIN, lang_hooks_for_types::type_for_mode, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_NONALIASED_COMPONENT, TYPE_PRECISION, TYPE_REVERSE_STORAGE_ORDER, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_UNSIGNED, TYPE_VECTOR_SUBPARTS(), lang_hooks::types, uniform_vector_p(), profile_probability::uninitialized(), constructor_elt::value, expand_operand::value, vec_safe_iterate(), VECTOR_BOOLEAN_TYPE_P, vector_element_bits(), VECTOR_MODE_P, VECTOR_TYPE_P, wide_int_to_tree(), word_mode, and WORD_REGISTER_OPERATIONS.
Referenced by emit_push_insn(), expand_constructor(), expand_expr_real_1(), load_register_parameters(), store_constructor(), store_constructor_field(), and store_field().
|
static |
Helper function for store_constructor. TARGET, BITSIZE, BITPOS, MODE, EXP are as for store_field. CLEARED is as for store_constructor. ALIAS_SET is the alias set to use for any stores. If REVERSE is true, the store is to be done in reverse order. This provides a recursive shortcut back to store_constructor when it isn't necessary to go through store_field. This is so that we can pass through the cleared field to let store_constructor know that we may not have to clear a substructure if the outer structure has already been cleared.
References adjust_address, copy_rtx(), exp(), GET_MODE, GET_MODE_ALIGNMENT, known_eq, MEM_ALIAS_SET, MEM_KEEP_ALIAS_SET_P, MEM_P, expand_operand::mode, set_mem_alias_set(), store_constructor(), store_field(), expand_operand::target, and TREE_CODE.
Referenced by store_constructor().
Generate code for computing expression EXP, and storing the value into TARGET. If the mode is BLKmode then we may return TARGET itself. It turns out that in BLKmode it doesn't cause a problem. because C has no operators that could combine two different assignments into the same BLKmode object with different values with no sequence point. Will other languages need this to be more thorough? If CALL_PARAM_P is nonzero, this is a store into a call param on the stack, and block moves may need to be treated specially. If NONTEMPORAL is true, try using a nontemporal store instruction. If REVERSE is true, the store is to be done in reverse order.
References adjust_address, adjust_address_1(), BLOCK_OP_CALL_PARM, BLOCK_OP_NORMAL, build_array_type(), build_index_type(), can_store_by_pieces(), change_address(), clear_storage(), const0_rtx, CONST_INT_P, CONSTANT_P, convert_modes(), convert_move(), convert_to_mode(), copy_blkmode_from_reg(), copy_node(), curr_insn_location(), do_pending_stack_adjust(), emit_barrier(), emit_block_move(), emit_cmp_and_jump_insns(), emit_group_load(), emit_group_move(), emit_group_store(), emit_jump_insn(), emit_label(), emit_move_insn(), emit_storent_insn(), exp(), expand_binop(), expand_expr(), expand_expr_real(), EXPAND_NORMAL, EXPAND_STACK_PARM, expr_size(), flip_storage_order(), fold_convert_loc(), force_operand(), gcc_assert, gcc_unreachable, GEN_INT, gen_label_rtx(), get_address_mode(), GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_CLASS, GET_MODE_PRECISION(), highest_pow2_factor(), int_expr_size(), int_size_in_bytes(), integer_zerop(), INTEGRAL_TYPE_P, INTVAL, jumpifnot(), known_eq, make_tree(), MEM_ADDR_SPACE, MEM_ALIGN, MEM_P, mems_same_for_tbaa_p(), NO_DEFER_POP, NULL, NULL_RTX, offset_address(), OK_DEFER_POP, OPTAB_LIB_WIDEN, plus_constant(), poly_int_rtx_p(), REG_P, RETURN_BEGIN, RETURN_END, rtx_equal_p(), rtx_to_poly_int64(), SCALAR_INT_MODE_P, side_effects_p(), signed_or_unsigned_type_for(), simplify_gen_subreg(), size_binop_loc(), size_int, sizetype, store_bit_field(), store_by_pieces(), store_expr(), STORE_MAX_PIECES, string_cst_read_str(), SUBREG_CHECK_PROMOTED_SIGN, subreg_promoted_mode(), SUBREG_PROMOTED_SIGN, SUBREG_PROMOTED_VAR_P, SUBREG_REG, subreg_unpromoted_mode(), expand_operand::target, targetm, TREE_CODE, TREE_OPERAND, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, lang_hooks_for_types::type_for_mode, TYPE_MODE, TYPE_PRECISION, TYPE_UNSIGNED, lang_hooks::types, UINTVAL, profile_probability::uninitialized(), and VOID_TYPE_P.
Referenced by expand_assignment(), expand_expr_real_1(), expand_expr_real_2(), initialize_argument_information(), insert_value_copy_on_edge(), store_constructor(), store_expr(), and store_field().
|
static |
Store the value of EXP (an expression tree) into a subfield of TARGET which has mode MODE and occupies BITSIZE bits, starting BITPOS bits from the start of TARGET. If MODE is VOIDmode, it means that we are storing into a bit-field. BITREGION_START is bitpos of the first bitfield in this region. BITREGION_END is the bitpos of the ending bitfield in this region. These two fields are 0, if the C++ memory model does not apply, or we are not interested in keeping track of bitfield regions. Always return const0_rtx unless we have something particular to return. ALIAS_SET is the alias set for the destination. This value will (in general) be different from that for TARGET, since TARGET is a reference to the containing structure. If NONTEMPORAL is true, try generating a nontemporal store. If REVERSE is true, the store is to be done in reverse order.
References adjust_address, AGGREGATE_TYPE_P, BITS_PER_WORD, bits_to_bytes_round_up, BLOCK_OP_NORMAL, CALL_EXPR_RETURN_SLOT_OPT, const0_rtx, convert_modes(), copy_blkmode_from_reg(), copy_rtx(), DECL_MODE, DECL_P, DECL_SIZE, direct_store, emit_block_move(), emit_group_store(), exp(), expand_expr(), EXPAND_NORMAL, expand_normal(), expand_shift(), extract_bit_field(), flip_storage_order(), gcc_assert, gcc_checking_assert, gen_int_mode(), gen_reg_rtx(), GET_CODE, get_def_for_expr(), GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_BITSIZE(), GET_MODE_CLASS, gimple_assign_rhs1(), int_size_in_bytes(), INTEGRAL_TYPE_P, poly_int< N, C >::is_constant(), is_int_mode(), known_eq, known_ge, known_le, maybe_gt, MEM_ALIAS_SET, MEM_ALIGN, MEM_KEEP_ALIAS_SET_P, MEM_P, expand_operand::mode, NULL, NULL_RTX, poly_int_tree_p(), REG_P, opt_mode< T >::require(), set_mem_alias_set(), smallest_int_mode_for_size(), store_bit_field(), store_constructor(), store_expr(), expand_operand::target, targetm, poly_int< N, C >::to_constant(), wi::to_poly_offset(), TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MODE, TYPE_PRECISION, TYPE_REVERSE_STORAGE_ORDER, and TYPE_SIZE.
Referenced by expand_assignment(), expand_expr_real_2(), and store_constructor_field().
Return STRING_CST if an ARG corresponds to a string constant or zero if it doesn't. If we return nonzero, set *PTR_OFFSET to the (possibly non-constant) offset in bytes within the string that ARG is accessing. If MEM_SIZE is non-zero the storage size of the memory is returned. If DECL is non-zero the constant declaration is returned if available.
References constant_byte_string().
Referenced by c_strlen(), constant_byte_string(), fold_read_from_constant_string(), getbyterep(), gimple_fold_builtin_memory_op(), and simplify_builtin_call().
|
static |
Helper function for store_expr storing of STRING_CST.
References c_readstr(), const0_rtx, gcc_assert, GET_MODE_SIZE(), expand_operand::mode, offset, TREE_STRING_LENGTH, and TREE_STRING_POINTER.
Referenced by store_expr().
|
static |
Alignment in bits the TARGET of an assignment may be assumed to have.
References CASE_CONVERT, DECL_ALIGN, MAX, MIN, expand_operand::target, target_align(), TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_ALIGN.
Referenced by get_misalign_in_elems(), highest_pow2_factor_for_target(), target_align(), vect_enhance_data_refs_alignment(), and vect_gen_prolog_loop_niters().
|
static |
Returns a tree for the size of EXP in bytes.
References DECL_P, DECL_SIZE_UNIT, exp(), size_in_bytes(), and TREE_TYPE.
Referenced by expr_size(), and int_expr_size().
bool try_casesi | ( | tree | index_type, |
tree | index_expr, | ||
tree | minval, | ||
tree | range, | ||
rtx | table_label, | ||
rtx | default_label, | ||
rtx | fallback_label, | ||
profile_probability | default_probability ) |
Attempt to generate a casesi instruction. Returns true if successful, false otherwise (i.e. if there is no casesi instruction). DEFAULT_PROBABILITY is the probability of jumping to the default label.
References build2(), convert_to_mode(), create_convert_operand_from_type(), create_fixed_operand(), create_input_operand(), do_pending_stack_adjust(), emit_cmp_and_jump_insns(), expand_jump_insn(), expand_normal(), fold_convert, GET_MODE_BITSIZE(), integer_zero_node, NULL_RTX, SCALAR_INT_TYPE_MODE, targetm, TREE_TYPE, lang_hooks_for_types::type_for_mode, and lang_hooks::types.
Referenced by emit_case_dispatch_table().
bool try_tablejump | ( | tree | index_type, |
tree | index_expr, | ||
tree | minval, | ||
tree | range, | ||
rtx | table_label, | ||
rtx | default_label, | ||
profile_probability | default_probability ) |
References convert_modes(), do_pending_stack_adjust(), do_tablejump(), expand_normal(), fold_build2, fold_convert, targetm, TREE_TYPE, TYPE_MODE, and TYPE_UNSIGNED.
Referenced by emit_case_dispatch_table().
Return true if word I of OP lies entirely in the undefined bits of a paradoxical subreg.
References GET_CODE, GET_MODE, GET_MODE_SIZE(), i, known_ge, known_le, offset, subreg_memory_offset(), and SUBREG_REG.
Referenced by emit_move_multi_word().
Add USE expressions to *CALL_FUSAGE for each REG contained in the PARALLEL REGS. This is for calls that pass values in multiple non-contiguous locations. The Irix 6 ABI has examples of this.
References i, REG_P, use_reg(), XEXP, XVECEXP, and XVECLEN.
Referenced by emit_library_call_value_1(), and load_register_parameters().
Add a USE expression for REG to the (possibly empty) list pointed to by CALL_FUSAGE. REG must denote a hard register.
References gcc_assert, gen_rtx_EXPR_LIST(), HARD_REGISTER_P, expand_operand::mode, and REG_P.
Referenced by load_register_parameters(), and use_reg().
void use_regs | ( | rtx * | call_fusage, |
int | regno, | ||
int | nregs ) |
Add USE expressions to *CALL_FUSAGE for each of NREGS consecutive regs, starting at REGNO. All of these registers must be hard registers.
References gcc_assert, i, regno_reg_rtx, and use_reg().
Referenced by emit_library_call_value_1(), and load_register_parameters().
|
static |
Return the widest mode that can be used to perform part of an operation OP on SIZE bytes. Try to use QI vector modes where possible.
References by_pieces_mode_supported_p(), can_use_qi_vectors(), candidate(), FOR_EACH_MODE_IN_CLASS, gcc_checking_assert, GET_MODE_INNER, GET_MODE_SIZE(), is_a(), NARROWEST_INT_MODE, and opt_mode< T >::require().
Referenced by by_pieces_ninsns(), can_store_by_pieces(), op_by_pieces_d::get_usable_mode(), op_by_pieces_d::op_by_pieces_d(), and op_by_pieces_d::run().
Write to one of the components of the complex value CPLX. Write VAL to the real part if IMAG_P is false, and the imaginary part if its true. If UNDEFINED_P then the value in CPLX is currently undefined.
References adjust_address_nv, BITS_PER_WORD, emit_move_insn(), gcc_assert, GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_INNER, GET_MODE_SIZE(), MEM_P, REG_NREGS, REG_P, REGNO, simplify_gen_subreg(), store_bit_field(), and XEXP.
Referenced by clear_storage_hints(), emit_move_complex_parts(), expand_addsub_overflow(), expand_arith_overflow(), expand_arith_overflow_result_store(), expand_arith_set_overflow(), expand_assignment(), expand_expr_real_2(), expand_ifn_atomic_compare_exchange(), expand_ifn_atomic_compare_exchange_into_call(), expand_mul_overflow(), expand_neg_overflow(), and expand_UADDC().
int cse_not_expected |
Convert tree expression to rtl instructions, for GNU compiler. Copyright (C) 1988-2024 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.
If this is nonzero, we do not bother generating VOLATILE around volatile memory references, and we are willing to output indirect addresses. If cse is to follow, we reject indirect addresses so a useful potential cse is generated; if it is used only once, instruction combination will produce the same indirect address eventually.
Referenced by memory_address_addr_space(), noce_try_cmove_arith(), prepare_function_start(), rest_of_handle_cse(), rest_of_handle_cse2(), rest_of_handle_cse_after_global_opts(), and use_anchored_address().