GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | mem_address |
Functions | |
rtx | addr_for_mem_ref (struct mem_address *, addr_space_t, bool) |
rtx | addr_for_mem_ref (tree exp, addr_space_t as, bool really_expand) |
void | get_address_description (tree, struct mem_address *) |
tree | tree_mem_ref_addr (tree, tree) |
bool | valid_mem_ref_p (machine_mode, addr_space_t, struct mem_address *, code_helper=ERROR_MARK) |
void | move_fixed_address_to_symbol (struct mem_address *, class aff_tree *) |
tree | create_mem_ref (gimple_stmt_iterator *, tree, class aff_tree *, tree, tree, tree, bool) |
void | copy_ref_info (tree, tree) |
tree | maybe_fold_tmr (tree) |
unsigned int | preferred_mem_scale_factor (tree base, machine_mode mem_mode, bool speed) |
|
extern |
Returns address for TARGET_MEM_REF with parameters given by ADDR in address space AS. If REALLY_EXPAND is false, just make fake registers instead of really expanding the operands, and perform the expansion in-place by using one of the "templates".
References mem_address::base, const0_rtx, convert_memory_address, expand_expr(), EXPAND_NORMAL, poly_int< N, C >::from(), gcc_assert, gen_addr_rtx(), gen_raw_REG(), GET_CODE, ggc_strdup, immed_wide_int_const(), mem_address::index, integer_onep(), integer_zerop(), LAST_VIRTUAL_REGISTER, mem_addr_template_list, NULL, NULL_RTX, mem_addr_template::off_p, mem_address::offset, mem_addr_template::ref, SIGNED, simplify_gen_binary(), mem_address::step, mem_addr_template::step_p, mem_address::symbol, targetm, TEMPL_IDX, wi::to_poly_wide(), wi::to_wide(), vec_safe_grow_cleared(), and vec_safe_length().
Referenced by addr_for_mem_ref(), expand_expr_addr_expr_1(), expand_expr_real_1(), get_address_cost(), preferred_mem_scale_factor(), and valid_mem_ref_p().
|
extern |
implement addr_for_mem_ref() directly from a tree, which avoids exporting the mem_address structure.
References addr_for_mem_ref(), exp(), and get_address_description().
Copies the reference information from OLD_REF to NEW_REF, where NEW_REF should be either a MEM_REF or a TARGET_MEM_REF.
References mem_address::base, build_aligned_type(), duplicate_ssa_name_ptr_info(), gcc_assert, get_base_address(), get_object_alignment(), get_ptr_info(), MR_DEPENDENCE_BASE, MR_DEPENDENCE_CLIQUE, NULL_TREE, ptr_info_def::pt, pt_solution_set_var(), reset_flow_sensitive_info(), SSA_NAME_PTR_INFO, TREE_CODE, TREE_OPERAND, TREE_SIDE_EFFECTS, TREE_THIS_VOLATILE, TREE_TYPE, and VAR_P.
Referenced by predicate_load_or_store(), replace_ref(), and rewrite_use_address().
tree create_mem_ref | ( | gimple_stmt_iterator * | gsi, |
tree | type, | ||
aff_tree * | addr, | ||
tree | alias_ptr_type, | ||
tree | iv_cand, | ||
tree | base_hint, | ||
bool | speed ) |
Creates and returns a TARGET_MEM_REF for address ADDR. If necessary computations are emitted in front of GSI. TYPE is the mode of created memory reference. IV_CAND is the selected iv candidate in ADDR, and BASE_HINT is non NULL if IV_CAND comes from a base address object.
References add_offset_to_base(), addr_to_parts(), mem_address::base, create_mem_ref_raw(), fold_build2, fold_build_pointer_plus, force_gimple_operand_gsi(), force_gimple_operand_gsi_1(), gcc_assert, gcc_unreachable, gimplify_mem_ref_parts(), GSI_SAME_STMT, mem_address::index, integer_onep(), integer_zerop(), is_gimple_mem_ref_addr(), is_gimple_val(), mem_ref_valid_without_offset_p(), NULL_TREE, mem_address::offset, sizetype, mem_address::step, mem_address::symbol, TREE_TYPE, unshare_expr(), and useless_type_conversion_p().
Referenced by rewrite_use_address().
|
extern |
Copies components of the address from OP to ADDR.
References mem_address::base, gcc_assert, mem_address::index, integer_zerop(), NULL_TREE, mem_address::offset, mem_address::step, mem_address::symbol, TMR_BASE, TMR_INDEX, TMR_INDEX2, TMR_OFFSET, TMR_STEP, and TREE_CODE.
Referenced by addr_for_mem_ref(), and maybe_fold_tmr().
Move constants in target_mem_ref REF to offset. Returns the new target mem ref if anything changes, NULL_TREE otherwise.
References mem_address::base, build_fold_addr_expr, changed, create_mem_ref_raw(), fold_binary_to_constant(), get_addr_base_and_unit_offset(), get_address_description(), handled_component_p(), mem_address::index, int_const_binop(), integer_zerop(), NULL_TREE, mem_address::offset, offset, size_int, sizetype, mem_address::step, mem_address::symbol, TREE_CODE, TREE_OPERAND, TREE_SIDE_EFFECTS, TREE_THIS_VOLATILE, and TREE_TYPE.
Referenced by maybe_canonicalize_mem_ref_addr().
|
extern |
If ADDR contains an address of object that is a link time constant, move it to PARTS->symbol.
References aff_combination_remove_elt(), aff_comb_elt::coef, aff_tree::elts, fixed_address_object_p(), i, aff_tree::n, NULL_TREE, mem_address::symbol, TREE_CODE, TREE_OPERAND, and aff_comb_elt::val.
Referenced by addr_to_parts(), and get_address_cost().
Return the preferred index scale factor for accessing memory of mode MEM_MODE in the address space of pointer BASE. Assume that we're optimizing for speed if SPEED is true and for size otherwise.
References addr_for_mem_ref(), address_cost(), mem_address::base, GET_MODE_UNIT_SIZE, mem_address::index, integer_one_node, sizetype, mem_address::step, TREE_TYPE, TYPE_ADDR_SPACE, and wide_int_to_tree().
Referenced by add_iv_candidate_for_use().
Returns address of MEM_REF in TYPE.
References fold_build2, fold_build_pointer_plus, fold_convert, integer_zerop(), NULL_TREE, offset, mem_address::step, TMR_BASE, TMR_INDEX, TMR_INDEX2, TMR_OFFSET, TMR_STEP, and TREE_TYPE.
Referenced by expand_debug_expr(), find_interesting_uses_address(), and gimplify_addr().
|
extern |
Returns true if a memory reference in MODE and with parameters given by ADDR is valid on the current target.
References addr_for_mem_ref(), and memory_address_addr_space_p().
Referenced by create_mem_ref_raw(), get_address_cost(), mem_ref_valid_without_offset_p(), and valid_mem_ref_cand_p().