|
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 "cfghooks.h"#include "tree-pass.h"#include "memmodel.h"#include "tm_p.h"#include "ssa.h"#include "optabs.h"#include "regs.h"#include "emit-rtl.h"#include "recog.h"#include "cgraph.h"#include "diagnostic.h"#include "fold-const.h"#include "varasm.h"#include "stor-layout.h"#include "stmt.h"#include "print-tree.h"#include "cfgrtl.h"#include "cfganal.h"#include "cfgbuild.h"#include "cfgcleanup.h"#include "dojump.h"#include "explow.h"#include "calls.h"#include "expr.h"#include "internal-fn.h"#include "tree-eh.h"#include "gimple-iterator.h"#include "gimple-expr.h"#include "gimple-walk.h"#include "tree-cfg.h"#include "tree-dfa.h"#include "tree-ssa.h"#include "except.h"#include "gimple-pretty-print.h"#include "toplev.h"#include "debug.h"#include "tree-inline.h"#include "value-prof.h"#include "tree-ssa-live.h"#include "tree-outof-ssa.h"#include "cfgloop.h"#include "insn-attr.h"#include "stringpool.h"#include "attribs.h"#include "asan.h"#include "tree-ssa-address.h"#include "output.h"#include "builtins.h"#include "opts.h"#include "gimple-range.h"#include "rtl-iter.h"Data Structures | |
| class | stack_var |
| struct | vars_ssa_cache |
| struct | vars_ssa_cache::entry |
| struct | part_traits |
| class | stack_vars_data |
Macros | |
| #define | NAME__MAIN "__main" |
| #define | STACK_ALIGNMENT_NEEDED 1 |
| #define | SSAVAR(x) |
| #define | EOC ((unsigned)-1) |
| #define | INVALID_STACK_INDEX ((unsigned)-1) |
| #define | SPCT_HAS_LARGE_CHAR_ARRAY 1 |
| #define | SPCT_HAS_SMALL_CHAR_ARRAY 2 |
| #define | SPCT_HAS_ARRAY 4 |
| #define | SPCT_HAS_AGGREGATE 8 |
Typedefs | |
| typedef hash_map< unsigned, bitmap, part_traits > | part_hashmap |
Variables | |
| struct ssaexpand | SA |
| gimple * | currently_expanding_gimple_stmt |
| static class stack_var * | stack_vars |
| static unsigned | stack_vars_alloc |
| static unsigned | stack_vars_num |
| static hash_map< tree, unsigned > * | decl_to_stack_part |
| static bitmap_obstack | stack_var_bitmap_obstack |
| static unsigned * | stack_vars_sorted |
| static int | frame_phase |
| static bool | has_protected_decls |
| static bool | has_short_buffer |
| static vec< std::pair< rtx_insn *, rtx_insn * > > | head_end_for_bb |
| static hash_map< basic_block, rtx_code_label * > * | lab_rtx_for_bb |
| static hash_map< tree, tree > * | deep_ter_debug_map |
| #define EOC ((unsigned)-1) |
| #define INVALID_STACK_INDEX ((unsigned)-1) |
| #define NAME__MAIN "__main" |
A pass for lowering trees to RTL. Copyright (C) 2004-2026 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/>.
Some systems use __main in a way incompatible with its use in gcc, in these cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You must define both, or neither.
Referenced by expand_main_function(), and write_c_file_glob().
| #define SPCT_HAS_AGGREGATE 8 |
Referenced by stack_protect_classify_type(), and stack_protect_decl_phase().
| #define SPCT_HAS_ARRAY 4 |
Referenced by stack_protect_classify_type(), and stack_protect_decl_phase().
| #define SPCT_HAS_LARGE_CHAR_ARRAY 1 |
Examine TYPE and determine a bit mask of the following features.
Referenced by stack_protect_classify_type(), and stack_protect_decl_phase().
| #define SPCT_HAS_SMALL_CHAR_ARRAY 2 |
Referenced by stack_protect_classify_type(), and stack_protect_decl_phase().
| #define SSAVAR | ( | x | ) |
Referenced by defer_stack_allocation(), expand_one_var(), and set_rtl().
| #define STACK_ALIGNMENT_NEEDED 1 |
Referenced by assign_stack_local_1(), and expand_used_vars().
| typedef hash_map<unsigned, bitmap, part_traits> part_hashmap |
|
static |
Take into account all sizes of partitions and reset DECL_RTLs.
References account_stack_vars(), EOC, i, stack_var::next, NULL, set_rtl(), si, stack_var::size, stack_vars, stack_vars_num, and stack_vars_sorted.
Referenced by account_stack_vars(), and estimated_stack_frame_size().
|
static |
If the points-to solution *PI points to variables that are in a partition together with other variables add all partition members to the pointed-to variables bitmap.
References hash_set< KeyId, Lazy, Traits >::add(), add_partitioned_vars_to_ptset(), pt_solution::anything, bitmap_bit_p, bitmap_clear(), bitmap_empty_p(), bitmap_ior_into(), EXECUTE_IF_SET_IN_BITMAP, hash_map< KeyId, Value, Traits >::get(), i, NULL, and pt_solution::vars.
Referenced by add_partitioned_vars_to_ptset(), and update_alias_info_with_stack_vars().
|
static |
Generate stack partition conflicts between all partitions that are simultaneously live.
References add_scope_conflicts(), add_scope_conflicts_1(), basic_block_def::aux, BASIC_BLOCK_FOR_FN, BITMAP_ALLOC, BITMAP_FREE, bitmap_ior_into(), cfun, vars_ssa_cache::dump(), dump_file, dump_flags, FOR_ALL_BB_FN, FOR_EACH_BB_FN, free(), i, last_basic_block_for_fn, NULL, pre_and_rev_post_order_compute(), stack_var_bitmap_obstack, stack_vars_num, and TDF_DETAILS.
Referenced by add_scope_conflicts(), and expand_used_vars().
|
static |
Helper routine for add_scope_conflicts, calculating the active partitions at the end of BB, leaving the result in WORK. We're called to generate conflicts when FOR_CONFLICT is true, otherwise we're just tracking liveness.
References a, add_scope_conflicts_1(), add_scope_conflicts_2(), BITMAP_ALLOC, bitmap_clear(), bitmap_clear_bit(), bitmap_ior_into(), decl_stack_index(), EDGE_COUNT, EXECUTE_IF_SET_IN_BITMAP, FOR_EACH_EDGE, FOR_EACH_SSA_USE_OPERAND, gimple_assign_lhs(), gimple_clobber_p(), gimple_phi_result(), gsi_after_labels(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), i, INVALID_STACK_INDEX, is_gimple_debug(), basic_block_def::preds, SSA_OP_USE, stack_var_bitmap_obstack, stack_vars, USE_FROM_PTR, VAR_P, visit, visit_conflict(), visit_op(), and walk_stmt_load_store_addr_ops().
Referenced by add_scope_conflicts(), and add_scope_conflicts_1().
|
inlinestatic |
Helper function for add_scope_conflicts_1. For USE on a stmt, if it is a SSA_NAME and in its defining statement is known to be based on some ADDR_EXPR, invoke VISIT on that ADDR_EXPR.
References add_scope_conflicts_2(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, i, stack_vars, TREE_CODE, and visit.
Referenced by add_scope_conflicts_1(), and add_scope_conflicts_2().
|
static |
Ensure that variables in different stack protection phases conflict so that they are not merged and share the same stack slot. Return true if there are any address taken variables.
References add_stack_protection_conflicts(), add_stack_var_conflict(), i, stack_protect_decl_phase(), stack_vars, stack_vars_num, and TREE_ADDRESSABLE.
Referenced by add_stack_protection_conflicts(), and expand_used_vars().
Accumulate DECL into STACK_VARS.
References add_stack_var(), align_local_variable(), stack_var::alignb, stack_var::conflicts, stack_var::decl, DECL_SIZE_UNIT, decl_to_stack_part, EOC, gcc_assert, known_eq, stack_var::next, NULL, pc_rtx, hash_map< KeyId, Value, Traits >::put(), stack_var::representative, set_rtl(), stack_var::size, stack_vars, stack_vars_alloc, stack_vars_num, TREE_CODE, tree_to_poly_uint64(), TREE_TYPE, and TYPE_SIZE_UNIT.
Referenced by add_stack_var(), expand_one_ssa_partition(), and expand_one_var().
|
static |
Make the decls associated with luid's X and Y conflict.
References a, add_stack_var_conflict(), b, BITMAP_ALLOC, bitmap_set_bit, stack_var_bitmap_obstack, stack_vars, and y.
Referenced by add_stack_protection_conflicts(), add_stack_var_conflict(), union_stack_vars(), and visit_conflict().
|
static |
Record the association between the RTL generated for partition PART and the underlying variable of the SSA_NAME VAR.
References adjust_one_expanded_partition_var(), DECL_ARTIFICIAL, gcc_assert, get_pointer_alignment(), ssaexpand::map, mark_reg_pointer(), mark_user_reg(), NO_PARTITION, ssaexpand::partition_to_pseudo, POINTER_TYPE_P, REG_P, SA, set_rtl(), SSA_NAME_VAR, TREE_TYPE, and var_to_partition().
Referenced by adjust_one_expanded_partition_var().
|
inlinestatic |
Align given offset BASE with ALIGN. Truncate up if ALIGN_UP is true, down otherwise. Return truncated BASE value.
References align_base().
Referenced by align_base(), and expand_stack_vars().
|
static |
Ensure that the stack is aligned to ALIGN bytes. Return the new frame offset.
References align_frame_offset(), and alloc_stack_frame_space().
Referenced by align_frame_offset(), expand_one_stack_var_1(), and expand_stack_vars().
Compute the byte alignment to use for DECL. Ignore alignment we can't do with expected alignment of the stack boundary.
References align_local_variable(), GET_MODE_ALIGNMENT, HWASAN_TAG_GRANULE_SIZE, hwassist_sanitize_stack_p(), LOCAL_DECL_ALIGNMENT, MAX, SET_DECL_ALIGN, TREE_CODE, TREE_TYPE, TYPE_ALIGN, and TYPE_MODE.
Referenced by add_stack_var(), align_local_variable(), defer_stack_allocation(), and expand_one_stack_var_1().
|
static |
Allocate SIZE bytes at byte alignment ALIGN from the stack frame. Return the frame offset.
References alloc_stack_frame_space(), cfun, FRAME_GROWS_DOWNWARD, frame_offset, frame_offset_overflow(), frame_phase, and stack_var::size.
Referenced by align_frame_offset(), alloc_stack_frame_space(), expand_one_stack_var_1(), expand_stack_vars(), and expand_used_vars().
|
static |
And helper function that checks for asan phase (with stack protector it is phase 3). This is used as callback for expand_stack_vars. Returns true if any of the vars in the partition need to be protected.
References asan_decl_phase_3(), asan_protect_stack_decl(), EOC, i, stack_var::next, and stack_vars.
Referenced by asan_decl_phase_3(), and expand_used_vars().
|
static |
Check that the given REGNO spanning NREGS is a valid asm clobber operand. Some HW registers cannot be saved/restored, hence they should not be clobbered by asm statements.
References accessible_reg_set, add_range_to_hard_reg_set(), asm_clobber_reg_is_valid(), CLEAR_HARD_REG_SET, crtl, error(), in_hard_reg_set_p(), inform(), input_location, INVALID_REGNUM, overlaps_hard_reg_set_p(), PIC_OFFSET_TABLE_REGNUM, reg_raw_mode, and warning().
Referenced by asm_clobber_reg_is_valid(), and expand_asm_stmt().
Ensure INSN_VAR_LOCATION_LOC (insn) doesn't have unbound complexity. Allow 4 levels of rtl nesting for most rtl codes, and if we see anything deeper than that, create DEBUG_EXPRs and emit DEBUG_INSNs before INSN.
References avoid_complex_debug_insns(), DEBUG_EXPR_TREE_DECL, emit_debug_insn_before(), exp(), gen_rtx_VAR_LOCATION(), GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, make_debug_expr_from_rtl(), MEM_P, NULL_RTX, OBJECT_P, VAR_INIT_STATUS_INITIALIZED, XEXP, XVECEXP, and XVECLEN.
Referenced by avoid_complex_debug_insns(), and expand_debug_locations().
|
static |
Split too deep TER chains for debug stmts using debug temporaries.
References avoid_deep_ter_for_debug(), build_debug_expr_decl(), deep_ter_debug_map, FOR_EACH_SSA_USE_OPERAND, g, get_gimple_for_ssa_name(), hash_map< KeyId, Value, Traits >::get_or_insert(), gimple_build_debug_bind(), gsi_for_stmt(), gsi_insert_after(), GSI_NEW_STMT, is_gimple_assign(), NULL, SSA_NAME_IS_DEFAULT_DEF, SSA_OP_USE, stmt_ends_bb_p(), TREE_CODE, TREE_TYPE, and USE_FROM_PTR.
Referenced by avoid_deep_ter_for_debug().
If there's a chance to get a pseudo for t then if it would be of float mode and the actual access is via an integer mode (lowered memcpy or similar access) then avoid the register expansion if the mode likely is not storage suitable for raw bits processing (like XFmode on i?86).
References avoid_type_punning_on_regs(), bitmap_set_bit, DECL_MODE, DECL_P, DECL_UID, FLOAT_MODE_P, get_base_address(), GET_MODE_BITSIZE(), GET_MODE_INNER, GET_MODE_PRECISION(), SCALAR_INT_MODE_P, TREE_ADDRESSABLE, TREE_TYPE, TYPE_MODE, and use_register_for_decl().
Referenced by avoid_type_punning_on_regs(), and discover_nonconstant_array_refs().
Return the difference between the ceil and the truncated result of a signed division by OP1 with remainder MOD.
References ceil_sdiv_adjust(), const0_rtx, and const1_rtx.
Referenced by ceil_sdiv_adjust(), and expand_debug_expr().
Return the difference between the ceil and the truncated result of an unsigned division by OP1 with remainder MOD.
References ceil_udiv_adjust(), const0_rtx, and const1_rtx.
Referenced by ceil_udiv_adjust(), and expand_debug_expr().
|
static |
A subroutine of expand_used_vars. Walk down through the BLOCK tree and clear TREE_USED on all local variables.
References BLOCK_CHAIN, BLOCK_SUBBLOCKS, BLOCK_VARS, clear_tree_used(), DECL_CHAIN, DECL_NONSHAREABLE, TREE_CODE, TREE_USED, and VAR_P.
Referenced by clear_tree_used(), and expand_used_vars().
|
static |
Create a block containing landing pads and similar stuff.
References add_bb_to_loop(), BB_END, cfun, construct_exit_block(), basic_block_def::count, create_basic_block(), EDGE_COUNT, EDGE_PRED, end(), EXIT_BLOCK_PTR_FOR_FN, expand_function_end(), FOR_EACH_EDGE, get_last_insn(), input_location, LOCATION_LOCUS, make_single_succ_edge(), NEXT_INSN(), NOTE_P, redirect_edge_succ(), return_label, rtl_profile_for_bb(), UNKNOWN_LOCATION, and update_bb_for_insn().
Referenced by construct_exit_block().
|
static |
Create a basic block for initialization code.
References add_bb_to_loop(), cfun, construct_init_block(), basic_block_def::count, create_basic_block(), EDGE_COUNT, EDGE_SUCC, emit_jump(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, expand_split_edge(), gcc_assert, get_insns(), get_last_insn(), gimple_block_label(), init_rtl_bb_info(), jump_target_rtx(), make_single_succ_edge(), NEXT_INSN(), NULL, and update_bb_for_insn().
Referenced by construct_init_block().
|
static |
Convert X to MODE, that must be Pmode or ptr_mode, without emitting any rtl.
References as_a(), CONST_INT_P, convert_debug_memory_address(), gcc_assert, GET_CODE, GET_MODE, GET_MODE_PRECISION(), label_ref_label(), LABEL_REF_NONLOCAL_P, lowpart_subreg(), NULL, PUT_MODE(), REG_P, REG_POINTER, shallow_copy_rtx(), SUBREG_PROMOTED_VAR_P, SUBREG_REG, targetm, and XEXP.
Referenced by convert_debug_memory_address(), and expand_debug_expr().
|
static |
Create a decl for the guard at the top of the stack frame.
References build_decl(), create_stack_guard(), crtl, current_function_decl, DECL_SOURCE_LOCATION, expand_one_stack_var(), NULL, ptr_type_node, TREE_THIS_VOLATILE, and TREE_USED.
Referenced by create_stack_guard(), and expand_used_vars().
|
static |
Returns the DECL's index into the stack_vars array. If the DECL does not exist return INVALID_STACK_INDEX.
References DECL_P, DECL_RTL_IF_SET, decl_stack_index(), decl_to_stack_part, gcc_checking_assert, hash_map< KeyId, Value, Traits >::get(), INVALID_STACK_INDEX, pc_rtx, and stack_vars_num.
Referenced by add_scope_conflicts_1(), decl_stack_index(), vars_ssa_cache::operator()(), visit_conflict(), and visit_op().
A subroutine of expand_one_var. VAR is a variable that will be allocated to the local stack frame. Return true if we wish to add VAR to STACK_VARS so that it will be coalesced with other variables. Return false to allocate VAR immediately. This function is used to reduce the number of variables considered for coalescing, which reduces the size of the quadratic problem.
References align_local_variable(), asan_sanitize_stack_p(), DECL_IGNORED_P, DECL_SIZE_UNIT, defer_stack_allocation(), estimated_poly_value(), MAX_SUPPORTED_STACK_ALIGNMENT, poly_int_tree_p(), SSA_NAME_VAR, SSAVAR, TREE_CODE, TREE_TYPE, and TYPE_SIZE_UNIT.
Referenced by defer_stack_allocation(), expand_one_ssa_partition(), and expand_one_var().
|
static |
RTL expansion is not able to compile array references with variable offsets for arrays stored in single register. Discover such expressions and mark variables as addressable to avoid this scenario.
References avoid_type_punning_on_regs(), bitmap_set_bit, cfun, DECL_P, DECL_UID, discover_nonconstant_array_refs(), discover_nonconstant_array_refs_r(), dyn_cast(), FOR_EACH_BB_FN, get_base_address(), gimple_call_arg(), gimple_call_internal_fn(), gimple_call_internal_p(), gimple_call_lhs(), gimple_get_lhs(), gimple_vdef(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), is_gimple_debug(), NULL_TREE, REFERENCE_CLASS_P, use_register_for_decl(), and walk_gimple_op().
Referenced by discover_nonconstant_array_refs().
Helper function for discover_nonconstant_array_refs. Look for ARRAY_REF nodes with non-constant indexes and mark them addressable.
References bitmap_set_bit, CONVERT_EXPR_P, DECL_MODE, DECL_P, DECL_UID, discover_nonconstant_array_refs_r(), get_base_address(), GET_MODE_SIZE(), is_gimple_min_invariant(), IS_TYPE_OR_DECL_P, NULL_TREE, POLY_INT_CST_P, REFERENCE_CLASS_P, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_MODE, and TYPE_SIZE.
Referenced by discover_nonconstant_array_refs(), and discover_nonconstant_array_refs_r().
|
static |
A debugging aid for expand_used_vars. Dump the generated partitions.
References stack_var::alignb, dump_file, dump_flags, dump_stack_var_partition(), EOC, fputc(), i, stack_var::next, print_dec(), print_generic_expr(), stack_var::representative, si, stack_var::size, stack_vars, stack_vars_num, and stack_vars_sorted.
Referenced by dump_stack_var_partition(), and expand_used_vars().
| HOST_WIDE_INT estimated_stack_frame_size | ( | struct cgraph_node * | node | ) |
Make a fair guess for the size of the stack frame of the function in NODE. This doesn't have to be exact, the result is only used in the inline heuristics. So we don't want to run the full stack var packing algorithm (which is quadratic in the number of stack vars). Instead, we calculate the total size of all stack vars. This turns out to be a pretty fair estimate -- packing of stack vars doesn't happen very often.
References account_stack_vars(), auto_var_in_fn_p(), function::decl, DECL_STRUCT_FUNCTION, estimated_poly_value(), estimated_stack_frame_size(), expand_one_var(), fini_vars_expansion(), FOR_EACH_LOCAL_DECL, i, init_vars_expansion(), pop_cfun(), push_cfun(), stack_vars_num, and stack_vars_sorted.
Referenced by compute_fn_summary(), and estimated_stack_frame_size().
|
static |
Generate RTL for an asm statement (explicit assembler code). STRING is a STRING_CST node containing the assembler code text, or an ADDR_EXPR containing a STRING_CST. VOL nonzero means the insn is volatile; don't optimize it.
References CLEAR_HARD_REG_SET, emit_insn(), expand_asm_loc(), gen_rtx_ASM_INPUT_loc, gen_rtx_MEM(), ggc_strdup, i, MEM_VOLATILE_P, rtvec_alloc(), targetm, TREE_STRING_LENGTH, TREE_STRING_POINTER, and XVECEXP.
Referenced by expand_asm_loc(), and expand_asm_stmt().
|
static |
Generate RTL for an asm statement with arguments. STRING is the instruction template. OUTPUTS is a list of output arguments (lvalues); INPUTS a list of inputs. Each output or input has an expression in the TREE_VALUE and a tree list in TREE_PURPOSE which in turn contains a constraint name in TREE_VALUE (or NULL_TREE) and a constraint string in TREE_PURPOSE. CLOBBERS is a list of STRING_CST nodes each naming a hard register that is clobbered by this insn. LABELS is a list of labels, and if LABELS is non-NULL, FALLTHRU_BB should be the fallthru basic block of the asm goto. Not all kinds of lvalue that may appear in OUTPUTS can be stored directly. Some elements of OUTPUTS may be replaced with trees representing temporary values. The caller should copy those temporary values to the originally specified lvalues. VOL nonzero means the insn is volatile; don't optimize it.
References asm_clobber_reg_is_valid(), asm_operand_ok(), ASM_OPERANDS_INPUT, ASM_OPERANDS_INPUT_CONSTRAINT_EXP, ASM_OPERANDS_LABEL, ASM_OPERANDS_OUTPUT_CONSTRAINT, ASM_OPERANDS_TEMPLATE, assign_temp(), build_string(), cfun, CLEAR_HARD_REG_SET, crtl, DECL_P, DECL_RTL, decode_reg_name_and_count(), do_pending_stack_adjust(), duplicate_insn_chain(), EDGE_COUNT, emit_insn(), emit_jump_insn(), emit_label(), emit_move_insn(), end_sequence(), error_at(), expand_asm_loc(), expand_asm_stmt(), expand_assignment(), expand_expr(), EXPAND_INITIALIZER, EXPAND_MEMORY, EXPAND_NORMAL, EXPAND_WRITE, find_fallthru_edge(), FOR_EACH_EDGE, force_reg(), free_temp_slots(), gcc_assert, gcc_unreachable, gen_label_rtx(), gen_reg_rtx(), gen_rtx_ASM_INPUT_loc, gen_rtx_MEM(), gen_rtx_REG(), generating_concat_p, GET_CODE, get_insns(), get_last_insn(), GET_MODE, ggc_strdup, gimple_asm_basic_p(), gimple_asm_clobber_op(), gimple_asm_input_op(), gimple_asm_label_op(), gimple_asm_nclobbers(), gimple_asm_ninputs(), gimple_asm_nlabels(), gimple_asm_noutputs(), gimple_asm_output_op(), gimple_asm_string(), gimple_asm_volatile_p(), gimple_bb(), gimple_location(), HARD_REGISTER_P, i, input_location, internal_error(), label_rtx(), label_to_block(), make_tree(), mark_addressable(), max_int_size_in_bytes(), MEM_NOTRAP_P, MEM_P, MEM_VOLATILE_P, NULL, NULL_RTX, parse_input_constraint(), parse_output_constraint(), prepend_insn_to_edge(), push_to_sequence(), push_to_sequence2(), r, reg_overlap_mentioned_p(), REG_P, reg_raw_mode, REGNO, rtvec_alloc(), SET_HARD_REG_BIT, set_reg_attrs_for_decl_rtl(), SSA_NAME_VAR, start_sequence(), targetm, TREE_ADDRESSABLE, TREE_CODE, tree_conflicts_with_clobbers_p(), tree_could_trap_p(), tree_fits_poly_int64_p(), TREE_OPERAND, TREE_PURPOSE, TREE_STRING_POINTER, TREE_TYPE, TREE_VALUE, TYPE_MODE, TYPE_SIZE, ULONG_MAX, validize_mem(), warning_at(), and XVECEXP.
Referenced by expand_asm_stmt(), and expand_gimple_stmt_1().
|
static |
A subroutine of expand_gimple_stmt_1, expanding one GIMPLE_CALL statement STMT.
References add_reg_note(), ALLOCA_FUNCTION_CODE_P, build_pointer_type(), build_vl_exp(), BUILT_IN_NORMAL, CALL_ALLOCA_FOR_VAR_P, CALL_EXPR_ARG, CALL_EXPR_BY_DESCRIPTOR, CALL_EXPR_FN, CALL_EXPR_MUST_TAIL_CALL, CALL_EXPR_RETURN_SLOT_OPT, CALL_EXPR_STATIC_CHAIN, CALL_EXPR_TAILCALL, CALL_EXPR_VA_ARG_PACK, CALL_FROM_THUNK_P, CALL_P, called_as_built_in(), cfun, const0_rtx, copy_warning(), decl_debug_args_lookup(), DECL_FUNCTION_CODE(), DECL_HAS_DEBUG_ARGS_P, exp(), expand_assignment(), expand_call_stmt(), expand_debug_expr(), expand_expr(), expand_internal_call(), EXPAND_NORMAL, fndecl_built_in_p(), fold_convert, gcc_assert, get_gimple_for_ssa_name(), get_last_insn(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_call_alloca_for_var_p(), gimple_call_arg(), gimple_call_by_descriptor_p(), gimple_call_chain(), gimple_call_fn(), gimple_call_fndecl(), gimple_call_fntype(), gimple_call_from_thunk_p(), gimple_call_internal_p(), gimple_call_lhs(), gimple_call_must_tail_p(), gimple_call_nocf_check_p(), gimple_call_nothrow_p(), gimple_call_num_args(), gimple_call_return_slot_opt_p(), gimple_call_return_type(), gimple_call_tail_p(), gimple_call_va_arg_pack_p(), gimple_has_side_effects(), gimple_location(), i, is_gimple_assign(), mark_transaction_restart_calls(), PREV_INSN(), replacement_internal_fn(), SET_EXPR_LOCATION, tm_restart_node::stmt, stmt_could_throw_p(), TREE_CODE, TREE_NOTHROW, TREE_SIDE_EFFECTS, and TREE_TYPE.
Referenced by expand_call_stmt(), and expand_gimple_stmt_1().
|
static |
Expand a clobber of LHS. If LHS is stored it in a multi-part register, tell the rtl optimizers that its value is no longer needed.
References DECL_P, DECL_RTL_IF_SET, emit_clobber(), expand_clobber(), GET_MODE, GET_MODE_SIZE(), maybe_gt, REG_P, and REGMODE_NATURAL_SIZE.
Referenced by expand_clobber(), and expand_gimple_stmt_1().
|
static |
Emit code to jump to the address specified by the pointer expression EXP.
References do_pending_stack_adjust(), emit_indirect_jump(), exp(), expand_computed_goto(), and expand_normal().
Referenced by expand_computed_goto(), and expand_gimple_stmt_1().
Return an RTX equivalent to the value of the tree expression EXP.
References adjust_address_nv, ALL_FIXED_POINT_MODE_P, BITINT_TYPE_P, bits_to_bytes_round_down, build_pointer_type(), build_zero_cst(), CASE_CONVERT, ceil_sdiv_adjust(), ceil_udiv_adjust(), COMPLEX_MODE_P, const0_rtx, CONST_INT_P, const_true_rtx, CONSTRUCTOR_ELTS, convert_debug_memory_address(), copy_rtx(), DEBUG_EXPR_TREE_DECL, debug_tree(), DECL_EXTERNAL, DECL_HARD_REGISTER, DECL_IN_CONSTANT_POOL, DECL_NAME, DECL_RTL_IF_SET, DECL_RTL_SET_P, deep_ter_debug_map, exp(), expand_debug_expr(), expand_debug_parm_decl(), expand_expr(), EXPAND_INITIALIZER, FLOAT_MODE_P, floor_sdiv_adjust(), fold_binary, FOR_EACH_CONSTRUCTOR_VALUE, g, gcc_assert, gcc_unreachable, GEN_INT, gen_int_mode(), gen_rtx_MEM(), gen_rtx_SUBREG(), hash_map< KeyId, Value, Traits >::get(), symtab_node::get(), GET_CODE, get_gimple_for_ssa_name(), get_inner_reference(), GET_MODE, GET_MODE_BITSIZE(), GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_PRECISION(), GET_MODE_SIZE(), GET_MODE_UNIT_BITSIZE, GET_MODE_UNIT_PRECISION, get_ref_base_and_extent(), gimple_assign_rhs_to_tree(), handled_component_p(), has_zero_uses(), i, immed_wide_int_const(), int_mode_for_mode(), is_a(), is_gimple_assign(), is_gimple_mem_ref_addr(), is_global_var(), known_eq, known_ge, known_gt, lookup_constant_def(), lowpart_subreg(), make_decl_rtl_for_debug(), ssaexpand::map, maybe_gt, MEM_P, NO_PARTITION, NOTE_P, NULL, NULL_RTX, NULL_TREE, num_trailing_bits, ssaexpand::partition_to_pseudo, plus_constant(), poly_int_cst_value(), poly_int_rtx_p(), opt_mode< T >::require(), round_sdiv_adjust(), round_udiv_adjust(), rtvec_alloc(), SA, SCALAR_INT_MODE_P, SCALAR_INT_TYPE_MODE, SET_DECL_RTL, set_mem_addr_space(), set_mem_attributes(), set_mem_expr(), shallow_copy_rtx(), simplify_gen_binary(), simplify_gen_relational(), simplify_gen_subreg(), simplify_gen_ternary(), simplify_gen_unary(), smallest_int_mode_for_size(), SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, SYMBOL_REF_DECL, target_for_debug_bind(), targetm, tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, tcc_vl_exp, TMR_BASE, TREE_ADDRESSABLE, TREE_CLOBBER_P, TREE_CODE, TREE_CODE_CLASS, TREE_IMAGPART, tree_mem_ref_addr(), TREE_OPERAND, TREE_REALPART, TREE_STATIC, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, TYPE_ADDR_SPACE, TYPE_MODE, TYPE_UNSIGNED, TYPE_VECTOR_SUBPARTS(), UNARY_CLASS_P, VAR_P, var_to_partition(), VECTOR_CST_ELT, VECTOR_CST_NELTS, VECTOR_TYPE_P, word_mode, XEXP, and XVECEXP.
Referenced by expand_call_stmt(), expand_debug_expr(), and expand_debug_locations().
|
static |
Expand the _LOCs in debug insns. We run this after expanding all regular insns, so that any variables referenced in the function will have their DECL_RTLs set.
References avoid_complex_debug_insns(), CONST_SCALAR_INT_P, DEBUG_BIND_INSN_P, deep_ter_debug_map, expand_debug_expr(), expand_debug_locations(), expand_debug_source_expr(), gcc_assert, gen_rtx_UNKNOWN_VAR_LOC, hash_map< KeyId, Value, Traits >::get(), GET_CODE, get_insns(), get_last_insn(), GET_MODE, INSN_VAR_LOCATION, INSN_VAR_LOCATION_DECL, INSN_VAR_LOCATION_LOC, INSN_VAR_LOCATION_STATUS, NEXT_INSN(), NULL, NULL_RTX, NULL_TREE, PREV_INSN(), TREE_CODE, and VAR_INIT_STATUS_UNINITIALIZED.
Referenced by expand_debug_locations().
Return an RTX equivalent to the value of the parameter DECL.
References CONST_INT_P, copy_rtx(), DECL_INCOMING_RTL, ENTRY_VALUE_EXP, expand_debug_parm_decl(), gen_raw_REG(), gen_rtx_REG_offset(), GET_CODE, GET_MODE, HARD_REGISTER_P, MEM_P, NULL_RTX, OUTGOING_REGNO, REG_P, REGNO, replace_equiv_address_nv(), TREE_ADDRESSABLE, virtual_incoming_args_rtx, and XEXP.
Referenced by expand_debug_expr(), expand_debug_parm_decl(), and expand_debug_source_expr().
Return an RTX equivalent to the source bind value of the tree expression EXP.
References current_function_decl, DECL_ABSTRACT_ORIGIN, DECL_CONTEXT, decl_debug_args_lookup(), DECL_INCOMING_RTL, DECL_MODE, DECL_ORIGIN, DECL_RTL_SET_P, exp(), expand_debug_parm_decl(), expand_debug_source_expr(), FLOAT_MODE_P, gcc_unreachable, GET_MODE, GET_MODE_UNIT_BITSIZE, GET_MODE_UNIT_PRECISION, lowpart_subreg(), NULL, NULL_RTX, simplify_gen_subreg(), simplify_gen_unary(), TREE_CODE, TREE_TYPE, TYPE_UNSIGNED, and vec_safe_iterate().
Referenced by expand_debug_locations(), and expand_debug_source_expr().
|
static |
Expand basic block BB from GIMPLE trees to RTL.
References as_a(), BARRIER_P, bitmap_bit_p, build_debug_expr_decl(), can_fallthru(), cfun, const0_rtx, curr_insn_location(), currently_expanding_gimple_stmt, DEBUG_INSN_P, DECL_MODE, DECL_P, DEF_FROM_PTR, delink_stmt_imm_use(), discard_pending_stack_adjust(), do_pending_stack_adjust(), dump_file, dump_flags, dyn_cast(), emit_debug_insn(), emit_insn_after_noloc(), emit_jump(), emit_label(), emit_note(), emit_note_after(), EXIT_BLOCK_PTR_FOR_FN, expand_gimple_basic_block(), expand_gimple_cond(), expand_gimple_stmt(), expand_gimple_tailcall(), FOR_EACH_EDGE, FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, FOR_EACH_SSA_TREE_OPERAND, gcc_assert, gcc_checking_assert, gcc_unreachable, gen_move_insn(), gen_reg_rtx(), GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT, GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT, gen_rtx_VAR_LOCATION(), GET_CODE, get_gimple_for_ssa_name(), get_last_insn(), gimple_assign_rhs_to_tree(), gimple_call_must_tail_p(), gimple_call_set_tail(), gimple_call_tail_p(), gimple_debug_begin_stmt_p(), gimple_debug_bind_get_value(), gimple_debug_bind_get_var(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_debug_inline_entry_p(), gimple_debug_nonbind_marker_p(), gimple_debug_source_bind_get_value(), gimple_debug_source_bind_get_var(), gimple_debug_source_bind_p(), gimple_location(), gimple_return_retval(), gsi_end_p(), gsi_last_bb(), gsi_next(), gsi_remove(), gsi_start_bb(), gsi_stmt(), head_end_for_bb, basic_block_def::index, is_gimple_assign(), is_gimple_debug(), JUMP_P, JUMP_TABLE_DATA_P, lab_rtx_for_bb, LABEL_P, label_rtx_for_bb(), MAY_HAVE_DEBUG_BIND_INSNS, MAY_HAVE_DEBUG_MARKER_INSNS, maybe_dump_rtl_for_gimple_stmt(), basic_block_def::next_bb, NEXT_INSN(), NOTE_BASIC_BLOCK, NOTE_P, NULL, NULL_RTX, NULL_TREE, PAT_VAR_LOCATION_LOC, PREV_INSN(), prev_nondebug_insn(), reorder_operands(), rtl_profile_for_bb(), SA, set_curr_insn_location(), SET_DECL_MODE, SET_USE, SINGLE_SSA_DEF_OPERAND, single_succ(), single_succ_edge(), single_succ_p(), SSA_NAME_VERSION, SSA_OP_DEF, SSA_OP_USE, basic_block_def::succs, target_for_debug_bind(), TDF_DETAILS, TREE_CODE, TREE_TYPE, TYPE_MODE, UNKNOWN_LOCATION, update_bb_for_insn_chain(), update_stmt(), USE_STMT, ssaexpand::values, VAR_INIT_STATUS_INITIALIZED, VAR_INIT_STATUS_UNINITIALIZED, and VECTOR_TYPE_P.
Referenced by expand_gimple_basic_block().
|
static |
A subroutine of expand_gimple_basic_block. Expand one GIMPLE_COND. Returns a new basic block if we've terminated the current basic block and created a new one.
References add_bb_to_loop(), BARRIER_P, BB_END, bitmap_bit_p, basic_block_def::count, create_basic_block(), curr_insn_location(), emit_jump(), expand_gimple_cond(), expand_split_edge(), extract_true_false_edges_from_block(), find_common_loop(), get_last_insn(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_location(), head_end_for_bb, loop::header, basic_block_def::index, integer_onep(), integer_zerop(), jumpif_1(), jumpifnot_1(), label_rtx_for_bb(), loop::latch, basic_block_def::loop_father, maybe_cleanup_end_of_block(), maybe_dump_rtl_for_gimple_stmt(), maybe_optimize_mod_cmp(), maybe_optimize_sub_cmp_0(), basic_block_def::next_bb, NEXT_INSN(), NULL, optimize_insn_for_speed_p(), PREV_INSN(), SA, set_curr_insn_location(), SSA_NAME_DEF_STMT, SSA_NAME_VERSION, targetm, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_TYPE, TYPE_PRECISION, TYPE_UNSIGNED, UNKNOWN_LOCATION, update_bb_for_insn(), update_bb_for_insn_chain(), and ssaexpand::values.
Referenced by expand_gimple_basic_block(), and expand_gimple_cond().
Expand one gimple statement STMT and return the last RTL instruction before any of the newly generated ones. In addition to generating the necessary RTL instructions this also sets REG_EH_REGION notes if necessary and sets the current source location for diagnostics.
References cfun, expand_gimple_stmt(), expand_gimple_stmt_1(), find_reg_note(), free_temp_slots(), gcc_assert, GET_CODE, get_last_insn(), gimple_has_location(), gimple_location(), input_location, insn_could_throw_p(), lookup_stmt_eh_lp(), make_reg_eh_region_note(), next_real_insn(), NULL_RTX, and PATTERN().
Referenced by expand_gimple_basic_block(), expand_gimple_stmt(), and expand_gimple_tailcall().
|
static |
A subroutine of expand_gimple_stmt, expanding one gimple statement STMT that doesn't require special handling for outgoing edges. That is no tailcalls and no GIMPLE_COND.
References as_a(), BLOCK_OP_NORMAL, build2(), CAN_HAVE_LOCATION_P, CASE_LABEL, cfun, CONSTANT_P, convert_modes(), convert_move(), current_function_decl, DECL_RESULT, emit_block_move(), emit_move_insn(), error_mark_node, expand_asm_stmt(), expand_assignment(), expand_call_stmt(), expand_case(), expand_clobber(), expand_computed_goto(), expand_expr(), expand_expr_real_gassign(), expand_gimple_stmt_1(), expand_goto(), expand_label(), EXPAND_NORMAL, expand_null_return(), expand_return(), EXPAND_WRITE, expr_size(), force_operand(), gcc_assert, gcc_unreachable, GET_CODE, GET_MODE, gimple_assign_lhs(), gimple_assign_nontemporal_move_p(), gimple_assign_rhs1(), gimple_assign_rhs_class(), gimple_goto_dest(), gimple_has_location(), gimple_label_label(), gimple_location(), gimple_return_retval(), GIMPLE_SINGLE_RHS, gimple_switch_default_label(), gimple_switch_num_labels(), is_gimple_min_invariant(), NULL_RTX, set_curr_insn_location(), SET_EXPR_LOCATION, SUBREG_PROMOTED_SIGN, SUBREG_PROMOTED_VAR_P, SUBREG_REG, TREE_CLOBBER_P, TREE_CODE, TREE_TYPE, and TYPE_MODE.
Referenced by expand_gimple_stmt(), and expand_gimple_stmt_1().
|
static |
A subroutine of expand_gimple_basic_block. Expand one GIMPLE_CALL that has CALL_EXPR_TAILCALL set. Returns non-null if we actually generated a tail call (something that might be denied by the ABI rules governing the call; see calls.cc). Sets CAN_FALLTHRU if we generated a *conditional* tail call, and can still reach the rest of BB. The case here is __builtin_sqrt, where the NaN result goes through the external function (with a tailcall) and the normal result happens via a sqrt instruction.
References as_a(), BARRIER_P, BB_END, CALL_P, can_fallthru(), cfun, create_basic_block(), delete_insn(), do_pending_stack_adjust(), ei_next(), ei_safe_edge(), ei_start, emit_barrier(), emit_copy_of_insn_after(), emit_insn_before(), emit_label(), emit_note(), end_sequence(), EXIT_BLOCK_PTR_FOR_FN, expand_gimple_stmt(), expand_gimple_tailcall(), expand_remove_edge(), FOR_EACH_SUBRTX_PTR, gcc_assert, gcc_unreachable, gen_label_rtx(), hash_map< KeyId, Value, Traits >::get(), GET_CODE, get_insns(), get_last_insn(), head_end_for_bb, basic_block_def::index, JUMP_LABEL, JUMP_P, LABEL_P, label_ref_label(), LABEL_REF_P, make_edge(), maybe_dump_rtl_for_gimple_stmt(), profile_probability::never(), NEXT_INSN(), NULL, PATTERN(), PREV_INSN(), hash_map< KeyId, Value, Traits >::put(), set_label_ref_label(), SIBLING_CALL_P, start_sequence(), basic_block_def::succs, and update_bb_for_insn_chain().
Referenced by expand_gimple_basic_block(), and expand_gimple_tailcall().
|
static |
Generate RTL code for a `goto' statement with target label LABEL. LABEL should be a LABEL_DECL tree node that was or will later be defined with `expand_label'.
References current_function_decl, decl_function_context(), emit_jump(), expand_goto(), gcc_assert, and jump_target_rtx().
Referenced by expand_gimple_stmt_1(), and expand_goto().
Choose either CUR or NEXT as the leader DECL for a partition. Prefer ignored decls, to simplify debug dumps and reduce ambiguity out of the same user variable being in multiple partitions (this is less likely for compiler-introduced temps). Also used by out-of-SSA to work out which variable a partition will be given.
References DECL_IGNORED_P, DECL_P, expand_leader_merge(), and NULL.
Referenced by expand_leader_merge(), set_rtl(), and split_overlapping_partition_decls().
|
static |
References emit_library_call(), expand_main_function(), init_one_libfunc(), LCT_NORMAL, and NAME__MAIN.
Referenced by expand_main_function().
| void expand_null_return | ( | void | ) |
Generate RTL to return from the current function, with no value. (That is, we do not do anything about returning any value.)
In stmt.cc
References clobber_return_register(), expand_null_return(), and expand_null_return_1().
Referenced by expand_gimple_stmt_1(), expand_null_return(), expand_return(), and print_rtl_single_with_indent().
|
static |
Output a return with no value.
References clear_pending_stack_adjust(), do_pending_stack_adjust(), emit_jump(), expand_null_return_1(), and return_label.
Referenced by expand_null_return(), expand_null_return_1(), and expand_value_return().
|
static |
A subroutine of expand_one_var. Called to assign rtl to a VAR_DECL that has some associated error, e.g. its type is error-mark. We just need to pick something that won't crash the rest of the compiler.
References const0_rtx, DECL_MODE, expand_one_error_var(), gen_reg_rtx(), gen_rtx_MEM(), and SET_DECL_RTL.
Referenced by expand_one_error_var(), and expand_one_var().
|
static |
A subroutine of expand_one_var. Called to assign rtl to a VAR_DECL that will reside in a hard register.
References expand_one_hard_reg_var(), and rest_of_decl_compilation().
Referenced by expand_one_hard_reg_var(), and expand_one_var().
|
static |
A subroutine of expand_one_var. Called to assign rtl to a VAR_DECL that will reside in a pseudo register.
References DECL_ARTIFICIAL, expand_one_register_var(), gcc_assert, gcc_unreachable, gen_reg_rtx(), get_pointer_alignment(), ssaexpand::map, mark_reg_pointer(), mark_user_reg(), NO_PARTITION, NULL, ssaexpand::partition_to_pseudo, POINTER_TYPE_P, promote_decl_mode(), REG_P, SA, set_rtl(), TREE_CODE, TREE_TYPE, and var_to_partition().
Referenced by expand_one_register_var(), and expand_one_var().
|
static |
Create RTL for an SSA partition.
References add_stack_var(), bitmap_bit_p, CONST0_RTX, defer_stack_allocation(), emit_move_insn(), expand_one_ssa_partition(), expand_one_stack_var_1(), gcc_assert, gen_reg_rtx(), GET_MODE_ALIGNMENT, ssaexpand::map, MAX_SUPPORTED_STACK_ALIGNMENT, MINIMUM_ALIGNMENT, NO_PARTITION, NULL, ssaexpand::partition_to_pseudo, ssaexpand::partitions_for_undefined_values, promote_ssa_mode(), record_alignment_for_reg_var(), SA, set_rtl(), TREE_TYPE, TYPE_ALIGN, TYPE_MODE, use_register_for_decl(), and var_to_partition().
Referenced by expand_one_ssa_partition(), and expand_used_vars().
|
static |
Wrapper for expand_one_stack_var_1 that checks SSA_NAMEs are already assigned some MEM.
References expand_one_stack_var(), expand_one_stack_var_1(), gcc_assert, ssaexpand::map, MEM_P, NO_PARTITION, ssaexpand::partition_to_pseudo, SA, TREE_CODE, and var_to_partition().
Referenced by create_stack_guard(), expand_one_stack_var(), and expand_one_var().
|
static |
A subroutine of expand_one_var. Called to immediately assign rtl to a variable to be allocated in the stack frame.
References align_frame_offset(), align_local_variable(), alloc_stack_frame_space(), crtl, DECL_SIZE_UNIT, expand_one_stack_var_1(), expand_one_stack_var_at(), frame_offset, gcc_assert, hwasan_frame_base(), hwasan_increment_frame_tag(), hwasan_record_stack_var(), HWASAN_TAG_GRANULE_SIZE, hwassist_sanitize_stack_p(), MAX_SUPPORTED_STACK_ALIGNMENT, TREE_CODE, tree_to_poly_uint64(), TREE_TYPE, TYPE_SIZE_UNIT, and virtual_stack_vars_rtx.
Referenced by expand_one_ssa_partition(), expand_one_stack_var(), and expand_one_stack_var_1().
|
static |
Assign rtl to DECL at BASE + OFFSET.
References DECL_MODE, DECL_USER_ALIGN, expand_one_stack_var_at(), frame_phase, gcc_assert, gen_rtx_MEM(), hwasan_current_frame_tag(), hwassist_sanitize_stack_p(), known_eq, plus_constant(), SET_DECL_ALIGN, set_mem_align(), set_rtl(), stack_vars_base_reg_p(), targetm, TREE_CODE, TREE_TYPE, trunc_int_for_mode(), and TYPE_MODE.
Referenced by expand_one_stack_var_1(), expand_one_stack_var_at(), and expand_stack_vars().
|
static |
A subroutine of expand_used_vars. Expand one variable according to its flavor. Variables to be placed on the stack are not actually expanded yet, merely recorded. When REALLY_EXPAND is false, only add stack values to be allocated. Return stack usage this variable is supposed to take.
References add_stack_var(), bitmap_bit_p, crtl, current_function_decl, DECL_ALIGN, DECL_ATTRIBUTES, DECL_EXTERNAL, DECL_HARD_REGISTER, DECL_HAS_VALUE_EXPR_P, DECL_MODE, DECL_NONLOCAL_FRAME, DECL_RTL, DECL_RTL_SET_P, DECL_SIZE_UNIT, DECL_SOURCE_LOCATION, DECL_UID, defer_stack_allocation(), error(), error_at(), error_mark_node, expand_one_error_var(), expand_one_hard_reg_var(), expand_one_register_var(), expand_one_stack_var(), expand_one_var(), gcc_assert, GET_MODE_ALIGNMENT, is_global_var(), lookup_attribute(), MAX_SUPPORTED_STACK_ALIGNMENT, MEM_P, MINIMUM_ALIGNMENT, NULL, poly_int_tree_p(), record_alignment_for_reg_var(), SSAVAR, TREE_CODE, TREE_STATIC, TREE_TYPE, TYPE_ALIGN, TYPE_MODE, use_register_for_decl(), valid_constant_size_p(), and VAR_P.
Referenced by estimated_stack_frame_size(), expand_one_var(), expand_used_vars(), and expand_used_vars_for_block().
| void expand_remove_edge | ( | edge | e | ) |
Wrapper around remove_edge during expansion.
References current_ir_type(), expand_remove_edge(), gimple_seq_empty_p(), IR_GIMPLE, phi_nodes(), remove_edge(), and remove_phi_args().
Referenced by expand_case(), expand_gimple_tailcall(), expand_remove_edge(), and maybe_cleanup_end_of_block().
|
static |
Generate RTL to evaluate the expression RETVAL and return it from the current function.
References assign_temp(), const0_rtx, copy_blkmode_to_reg(), current_function_decl, DECL_RESULT, DECL_RTL, error_mark_node, expand_expr(), EXPAND_NORMAL, expand_normal(), expand_null_return(), expand_return(), expand_value_return(), force_not_mem(), GET_CODE, GET_MODE, PUT_MODE(), REG_P, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MODE, and VOID_TYPE_P.
Referenced by expand_gimple_stmt_1(), and expand_return().
|
static |
Split edge E during expansion and instead of creating a new bb on that edge, add there BB. FLAGS should be flags on the new edge from BB to former E->dest.
References EDGE_PRED, expand_split_edge(), basic_block_def::flags, make_single_succ_edge(), phi_nodes(), and redirect_edge_succ().
Referenced by construct_init_block(), expand_gimple_cond(), and expand_split_edge().
|
static |
This function sets crtl->args.internal_arg_pointer to a virtual register if DRAP is needed. Local register allocator will replace virtual_incoming_args_rtx with the virtual register.
References cfun, crtl, expand_stack_alignment(), fixup_tail_calls(), gcc_assert, INCOMING_STACK_BOUNDARY, NULL, PREFERRED_STACK_BOUNDARY, stack_realign_drap, SUPPORTS_STACK_ALIGNMENT, and targetm.
Referenced by expand_stack_alignment().
|
static |
A subroutine of expand_used_vars. Give each partition representative a unique location within the stack frame. Update each partition member with that location.
References hash_set< KeyId, Lazy, Traits >::add(), align_base(), align_frame_offset(), stack_var::alignb, alloc_stack_frame_space(), asan_handled_variables, ASAN_MIN_RED_ZONE_SIZE, asan_protect_stack_decl(), ASAN_RED_ZONE_SIZE, asan_sanitize_stack_p(), ASAN_SHADOW_SHIFT, asan_var_and_redzone_size(), hash_set< KeyId, Lazy, Traits >::contains(), crtl, stack_var::decl, DECL_NAME, DECL_P, DECL_RTL, EOC, expand_one_stack_var_at(), expand_stack_vars(), FRAME_GROWS_DOWNWARD, frame_offset, gcc_assert, gen_int_mode(), gen_reg_rtx(), get_dynamic_stack_base(), get_dynamic_stack_size(), GET_MODE_ALIGNMENT, hwasan_frame_base(), hwasan_increment_frame_tag(), hwasan_record_stack_var(), HWASAN_TAG_GRANULE_SIZE, hwassist_sanitize_stack_p(), i, poly_int< N, C >::is_constant(), known_eq, ssaexpand::map, MAX, MAX_SUPPORTED_STACK_ALIGNMENT, stack_var::next, NULL, NULL_RTX, NULL_TREE, ssaexpand::partition_to_pseudo, pc_rtx, PREFERRED_STACK_BOUNDARY, rtx_to_poly_int64(), SA, si, stack_var::size, stack_vars, stack_vars_num, stack_vars_sorted, targetm, TREE_CODE, var_to_partition(), and virtual_stack_vars_rtx.
Referenced by expand_stack_vars(), and expand_used_vars().
Expand all variables used in the function.
References add_local_decl(), add_scope_conflicts(), add_stack_protection_conflicts(), alloc_stack_frame_space(), asan_decl_phase_3(), asan_emit_allocas_unpoison(), asan_emit_stack_protection(), ASAN_RED_ZONE_SIZE, asan_sanitize_allocas_p(), asan_sanitize_stack_p(), ASAN_SHADOW_SHIFT, bitmap_bit_p, cfun, clear_tree_used(), create_stack_guard(), crtl, current_function_decl, DECL_ARTIFICIAL, DECL_ATTRIBUTES, DECL_EXTERNAL, DECL_IGNORED_P, DECL_INITIAL, DECL_RTL_IF_SET, dump_file, dump_stack_var_partition(), expand_one_ssa_partition(), expand_one_var(), expand_stack_vars(), expand_used_vars(), expand_used_vars_for_block(), fini_vars_expansion(), FOR_EACH_LOCAL_DECL, FOR_EACH_VEC_ELT_REVERSE, FRAME_GROWS_DOWNWARD, frame_offset, frame_phase, gcc_assert, gen_reg_rtx(), GET_CODE, GET_MODE_ALIGNMENT, has_protected_decls, HOST_WIDE_INT_1, hwasan_emit_prologue(), hwasan_emit_untag_frame(), hwasan_get_frame_extent(), hwasan_sanitize_allocas_p(), hwassist_sanitize_stack_p(), i, init_vars_expansion(), is_gimple_reg(), lookup_attribute(), ssaexpand::map, MAX, MEM_P, memtag_sanitize_p(), NULL, NULL_RTX, _var_map::num_partitions, partition_stack_vars(), partition_to_var(), ssaexpand::partitions_for_parm_default_defs, pic_offset_table_rtx, PREFERRED_STACK_BOUNDARY, SA, SPCT_FLAG_ALL, SPCT_FLAG_DEFAULT, SPCT_FLAG_EXPLICIT, SPCT_FLAG_STRONG, STACK_ALIGNMENT_NEEDED, stack_protect_decl_phase_1(), stack_protect_decl_phase_2(), stack_protect_return_slot_p(), stack_vars_num, targetm, poly_int< N, C >::to_constant(), TREE_STATIC, TREE_USED, vec_safe_is_empty(), vec_safe_length(), virtual_operand_p(), virtual_stack_dynamic_rtx, and virtual_stack_vars_rtx.
Referenced by expand_used_vars().
A subroutine of expand_used_vars. Walk down through the BLOCK tree expanding variables. Those variables that can be put into registers are allocated pseudos; those that can't are put on the stack. TOPLEVEL is true if this is the outermost BLOCK.
References BLOCK_CHAIN, BLOCK_SUBBLOCKS, BLOCK_VARS, DECL_CHAIN, DECL_NONSHAREABLE, expand_one_var(), expand_used_vars_for_block(), TREE_CODE, TREE_USED, and VAR_P.
Referenced by expand_used_vars(), and expand_used_vars_for_block().
|
static |
Generate RTL to return from the current function, with value VAL.
References convert_float_to_wider_int(), convert_modes(), current_function_decl, DECL_BY_REFERENCE, DECL_MODE, DECL_RESULT, DECL_RTL, emit_group_load(), emit_move_insn(), expand_null_return_1(), expand_value_return(), GET_CODE, GET_MODE_SIZE(), int_size_in_bytes(), known_gt, promote_function_mode(), SCALAR_FLOAT_MODE_P, SCALAR_INT_MODE_P, TREE_TYPE, and TYPE_UNSIGNED.
Referenced by expand_return(), and expand_value_return().
|
static |
Free up stack variable graph data.
References bitmap_obstack_release(), decl_to_stack_part, fini_vars_expansion(), NULL, stack_var_bitmap_obstack, stack_vars, stack_vars_alloc, stack_vars_num, and stack_vars_sorted.
Referenced by estimated_stack_frame_size(), expand_used_vars(), and fini_vars_expansion().
Return the difference between the floor and the truncated result of a signed division by OP1 with remainder MOD.
References const0_rtx, constm1_rtx, and floor_sdiv_adjust().
Referenced by expand_debug_expr(), and floor_sdiv_adjust().
Return an expression tree corresponding to the RHS of GIMPLE statement STMT.
Header file for lowering trees to RTL. Copyright (C) 2013-2026 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/>.
References build1(), build2(), build3(), CAN_HAVE_LOCATION_P, copy_node(), currently_expanding_to_rtl, EXPR_LOCATION, EXPR_P, gcc_unreachable, gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_rhs_class(), gimple_assign_rhs_code(), gimple_assign_rhs_to_tree(), GIMPLE_BINARY_RHS, gimple_block(), gimple_has_location(), gimple_location(), GIMPLE_SINGLE_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, SET_EXPR_LOCATION, and TREE_TYPE.
Referenced by expand_debug_expr(), expand_gimple_basic_block(), gimple_assign_rhs_to_tree(), insert_debug_temp_for_var_def(), and ipa_param_body_adjustments::prepare_debug_expressions().
|
static |
Prepare for expanding variables.
References bitmap_obstack_initialize(), decl_to_stack_part, has_protected_decls, has_short_buffer, hwasan_record_frame_init(), hwassist_sanitize_stack_p(), init_vars_expansion(), and stack_var_bitmap_obstack.
Referenced by estimated_stack_frame_size(), expand_used_vars(), and init_vars_expansion().
|
static |
Returns the label_rtx expression for a label starting basic block BB.
References as_a(), block_label(), DECL_NONLOCAL, dyn_cast(), emit_label_before(), basic_block_def::flags, gen_label_rtx(), gimple_label_label(), gsi_end_p(), gsi_start_bb(), gsi_stmt(), head_end_for_bb, basic_block_def::index, jump_target_rtx(), lab_rtx_for_bb, LABEL_P, and label_rtx_for_bb().
Referenced by expand_gimple_basic_block(), expand_gimple_cond(), and label_rtx_for_bb().
| rtl_opt_pass * make_pass_expand | ( | gcc::context * | ctxt | ) |
References make_pass_expand().
Referenced by make_pass_dispatcher_calls(), and make_pass_expand().
|
static |
Mark all calls that can have a transaction restart.
References add_reg_note(), CALL_P, cfun, get_last_insn(), label_rtx(), mark_transaction_restart_calls(), next_real_insn(), tm_restart_node::stmt, TREE_CHAIN, TREE_CODE, and TREE_VALUE.
Referenced by expand_call_stmt(), and mark_transaction_restart_calls().
A subroutine of expand_gimple_cond. Given E, a fallthrough edge of a basic block where we just expanded the conditional at the end, possibly clean up the CFG and instruction sequence. LAST is the last instruction before the just emitted jump sequence.
References any_condjump_p(), BARRIER_P, delete_insn(), expand_remove_edge(), gcc_assert, get_last_insn(), JUMP_P, maybe_cleanup_end_of_block(), NEXT_INSN(), and PREV_INSN().
Referenced by expand_gimple_cond(), and maybe_cleanup_end_of_block().
If we need to produce a detailed dump, print the tree representation for STMT to the dump file. SINCE is the last RTX after which the RTL generated for STMT should have been appended.
References dump_file, dump_flags, maybe_dump_rtl_for_gimple_stmt(), NEXT_INSN(), print_gimple_stmt(), print_rtl(), TDF_DETAILS, TDF_LINENO, and TDF_SLIM.
Referenced by expand_gimple_basic_block(), expand_gimple_cond(), expand_gimple_tailcall(), and maybe_dump_rtl_for_gimple_stmt().
|
static |
A subroutine of expand_used_vars. Binpack the variables into
partitions constrained by the interference graph. The overall
algorithm used is as follows:
Sort the objects by size in descending order.
For each object A {
S = size(A)
O = 0
loop {
Look for the largest non-conflicting object B with size <= S.
UNION (A, B)
}
}
References stack_var::alignb, asan_sanitize_stack_p(), i, MAX_SUPPORTED_STACK_ALIGNMENT, partition_stack_vars(), qsort, stack_var::representative, si, stack_var::size, stack_var_cmp(), stack_var_conflict_p(), stack_vars, stack_vars_num, stack_vars_sorted, union_stack_vars(), and update_alias_info_with_stack_vars().
Referenced by expand_used_vars(), and partition_stack_vars().
|
static |
Record the alignment requirements of some variable assigned to a pseudo.
References crtl, gcc_assert, record_alignment_for_reg_var(), and SUPPORTS_STACK_ALIGNMENT.
Referenced by expand_one_ssa_partition(), expand_one_var(), record_alignment_for_reg_var(), and set_parm_rtl().
|
static |
Performs swapping operands of commutative operations to expand the expensive one first.
References bb_seq(), commutative_tree_code(), dump_file, dump_flags, eni_size_weights, estimate_num_insns(), FOR_EACH_SSA_USE_OPERAND, get_gimple_for_ssa_name(), gimple_assign_rhs1_ptr(), gimple_assign_rhs2_ptr(), gimple_assign_rhs_code(), gimple_op(), gimple_set_uid(), gimple_uid(), gsi_end_p(), gsi_next(), gsi_start(), gsi_stmt(), i, is_gimple_assign(), is_gimple_debug(), print_gimple_stmt(), reorder_operands(), SSA_OP_USE, swap_ssa_operands(), TDF_DETAILS, TDF_SLIM, TREE_CODE, and USE_FROM_PTR.
Referenced by expand_gimple_basic_block(), and reorder_operands().
Return the difference between the rounded and the truncated result of a signed division by OP1 with remainder MOD. Halfway cases are rounded away from zero, rather than to the nearest even number.
References const0_rtx, const1_rtx, constm1_rtx, and round_sdiv_adjust().
Referenced by expand_debug_expr(), and round_sdiv_adjust().
Return the difference between the rounded and the truncated result of a unsigned division by OP1 with remainder MOD. Halfway cases are rounded away from zero, rather than to the nearest even number.
References const0_rtx, const1_rtx, and round_udiv_adjust().
Referenced by expand_debug_expr(), and round_udiv_adjust().
|
static |
For each lexical block, set BLOCK_NUMBER to the depth at which it is found in the block tree.
References BLOCK_CHAIN, BLOCK_NUMBER, BLOCK_SUBBLOCKS, and set_block_levels().
Referenced by set_block_levels().
Record the RTL assignment X for the default def of PARM.
References bitmap_bit_p, cfun, DECL_RTL, gcc_assert, GET_MODE_ALIGNMENT, ssaexpand::map, MAX_SUPPORTED_STACK_ALIGNMENT, MEM_P, MINIMUM_ALIGNMENT, NO_PARTITION, ssaexpand::partitions_for_parm_default_defs, record_alignment_for_reg_var(), SA, set_parm_rtl(), set_rtl(), ssa_default_def(), TREE_CODE, TREE_TYPE, TYPE_ALIGN, TYPE_MODE, and var_to_partition().
Referenced by assign_parm_setup_block(), assign_parm_setup_reg(), assign_parm_setup_stack(), assign_parms(), assign_parms_unsplit_complex(), expand_function_start(), and set_parm_rtl().
Associate declaration T with storage space X. If T is no SSA name this is exactly SET_DECL_RTL, otherwise make the partition of T associated with X.
References DECL_RTL, DECL_RTL_SET_P, expand_leader_merge(), gcc_assert, gcc_checking_assert, gcc_unreachable, GET_CODE, GET_MODE, is_gimple_reg(), ssaexpand::map, MEM_EXPR, MEM_P, NO_PARTITION, NULL, NULL_TREE, ssaexpand::partition_to_pseudo, pc_rtx, promote_ssa_mode(), REG_EXPR, REG_P, SA, SET_DECL_RTL, set_mem_attributes(), set_reg_attrs_for_decl_rtl(), set_rtl(), SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, SSAVAR, subreg_lowpart_p(), SUBREG_P, SUBREG_REG, TREE_CODE, TREE_TYPE, use_register_for_decl(), VAR_P, var_to_partition(), XEXP, and XVECEXP.
Referenced by account_stack_vars(), add_stack_var(), adjust_one_expanded_partition_var(), expand_one_register_var(), expand_one_ssa_partition(), expand_one_stack_var_at(), set_parm_rtl(), and set_rtl().
|
static |
References char_type_node, signed_char_type_node, SPCT_HAS_AGGREGATE, SPCT_HAS_ARRAY, SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY, stack_protect_classify_type(), TREE_CHAIN, TREE_CODE, tree_fits_uhwi_p(), tree_to_uhwi(), TREE_TYPE, TYPE_FIELDS, TYPE_MAIN_VARIANT, TYPE_SIZE_UNIT, and unsigned_char_type_node.
Referenced by stack_protect_classify_type(), and stack_protect_decl_phase().
|
static |
Return nonzero if DECL should be segregated into the "vulnerable" upper part of the local stack frame. Remember if we ever return nonzero for any variable in this function. The return value is the phase number in which the variable should be allocated.
References current_function_decl, DECL_ATTRIBUTES, has_protected_decls, has_short_buffer, lookup_attribute(), SPCT_FLAG_ALL, SPCT_FLAG_EXPLICIT, SPCT_FLAG_STRONG, SPCT_HAS_AGGREGATE, SPCT_HAS_ARRAY, SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY, stack_protect_classify_type(), stack_protect_decl_phase(), and TREE_TYPE.
Referenced by add_stack_protection_conflicts(), stack_protect_decl_phase(), stack_protect_decl_phase_1(), and stack_protect_decl_phase_2().
|
static |
Two helper routines that check for phase 1 and phase 2. These are used as callbacks for expand_stack_vars.
References i, stack_protect_decl_phase(), stack_protect_decl_phase_1(), and stack_vars.
Referenced by expand_used_vars(), and stack_protect_decl_phase_1().
|
static |
References i, stack_protect_decl_phase(), stack_protect_decl_phase_2(), and stack_vars.
Referenced by expand_used_vars(), and stack_protect_decl_phase_2().
|
static |
Expand code to initialize the stack_protect_guard. This is invoked at the beginning of a function to be protected.
References const0_rtx, crtl, DECL_P, DECL_RTL, emit_insn(), emit_move_insn(), expand_normal(), gcc_assert, stack_protect_prologue(), targetm, and y.
Referenced by stack_protect_prologue().
|
static |
Check if the current function has calls that use a return slot.
References aggregate_value_p(), cfun, FOR_ALL_BB_FN, gimple_call_fndecl(), gimple_call_fntype(), gimple_call_internal_p(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), is_gimple_call(), stack_protect_return_slot_p(), and TREE_TYPE.
Referenced by expand_used_vars(), and stack_protect_return_slot_p().
|
static |
A subroutine of partition_stack_vars. A comparison function for qsort, sorting an array of indices by the properties of the object.
References a, stack_var::alignb, b, stack_var::decl, DECL_UID, MAX_SUPPORTED_STACK_ALIGNMENT, stack_var::size, SSA_NAME_VERSION, stack_var_cmp(), stack_vars, and TREE_CODE.
Referenced by partition_stack_vars(), and stack_var_cmp().
|
static |
Check whether the decls associated with luid's X and Y conflict.
References a, b, bitmap_bit_p, stack_var_conflict_p(), stack_vars, TREE_CODE, and y.
Referenced by partition_stack_vars(), and stack_var_conflict_p().
|
static |
Check for overlap between registers marked in CLOBBERED_REGS and anything inappropriate in T. Emit error and return the register variable definition for error, NULL_TREE for ok.
References DECL_NAME, DECL_REGISTER, error_at(), tree_conflicts_with_clobbers_p(), and tree_overlaps_hard_reg_set().
Referenced by expand_asm_stmt(), and tree_conflicts_with_clobbers_p().
|
static |
A subroutine of partition_stack_vars. The UNION portion of a UNION/FIND partitioning algorithm. Partitions A and B are known to be non-conflicting. Merge them into a single partition A.
References a, add_stack_var_conflict(), stack_var::alignb, b, BITMAP_FREE, stack_var::conflicts, EOC, EXECUTE_IF_SET_IN_BITMAP, gcc_assert, stack_var::next, stack_var::representative, stack_var::size, stack_vars, and union_stack_vars().
Referenced by partition_stack_vars(), and union_stack_vars().
|
static |
Update points-to sets based on partition info, so we can use them on RTL. The bitmaps representing stack partitions will be saved until expand, where partitioned decls used as bases in memory expressions will be rewritten. It is not necessary to update TBAA info on accesses to the coalesced storage since our memory model doesn't allow TBAA to be used for WAW or WAR dependences. For RAW when the write is to an old object the new object would not have been initialized at the point of the read, invoking undefined behavior.
References add_partitioned_vars_to_ptset(), BITMAP_ALLOC, BITMAP_FREE, BITMAP_GGC_ALLOC, bitmap_set_bit, cfun, create_tmp_var, stack_var::decl, DECL_PT_UID, EOC, FOR_EACH_SSA_NAME, get_ptr_info(), i, make_ssa_name(), stack_var::next, NULL, NULL_TREE, POINTER_TYPE_P, ptr_info_def::pt, pt_solution_set(), ptr_type_node, hash_map< KeyId, Value, Traits >::put(), SSA_NAME_PTR_INFO, stack_var_bitmap_obstack, stack_vars, stack_vars_num, TREE_ADDRESSABLE, TREE_TYPE, and update_alias_info_with_stack_vars().
Referenced by partition_stack_vars(), and update_alias_info_with_stack_vars().
|
static |
Verify that partitions which claim to be the same object really are at the same address. MEM_EXPR-based disambiguation identifies a location by a MEM_EXPR base and an offset from it, so two stack slots carrying one MEM_EXPR read as a single object, which lets an access to one be redirected to the other. out-of-SSA keeps them apart, see the comment above split_overlapping_partition_decls. Call this once the RTL of every partition is final. The partition of a PARM_DECL or RESULT_DECL default definition is given the MEM_EXPR of any other variable in it while its names are walked, and only gets the decl back when its RTL is restored in pass_expand::execute.
References gcc_assert, hash_map< KeyId, Value, Traits >::get_or_insert(), i, ssaexpand::map, MEM_EXPR, MEM_P, num_var_partitions(), ssaexpand::partition_to_pseudo, rtx_equal_p(), SA, verify_partition_mem_exprs(), and XEXP.
Referenced by verify_partition_mem_exprs().
Callback for walk_stmt_ops. If OP is a decl touched by add_stack_var record conflicts between it and all currently active other partitions from bitmap DATA.
References add_stack_var_conflict(), bitmap_set_bit, decl_stack_index(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, get_base_address(), i, INVALID_STACK_INDEX, stack_vars_num, and visit_conflict().
Referenced by add_scope_conflicts_1(), and visit_conflict().
Callback for walk_stmt_ops. If OP is a decl touched by add_stack_var enter its partition number into bitmap DATA.
References bitmap_set_bit, decl_stack_index(), get_base_address(), INVALID_STACK_INDEX, and visit_op().
Referenced by add_scope_conflicts_1(), and visit_op().
| gimple* currently_expanding_gimple_stmt |
This variable holds the currently expanded gimple statement for purposes of communicating the profile info to the builtin expanders.
Referenced by determine_block_size(), expand_addsub_overflow(), expand_builtin_memory_copy_args(), expand_builtin_memset_args(), expand_builtin_strnlen(), expand_expr_divmod(), expand_expr_real_2(), expand_gimple_basic_block(), expand_mul_overflow(), get_min_precision(), maybe_optimize_mod_cmp(), maybe_optimize_pow2p_mod_cmp(), and near_pow2_divisor_range_p().
Referenced by add_stack_var(), decl_stack_index(), fini_vars_expansion(), and init_vars_expansion().
Map from SSA_NAMEs to corresponding DEBUG_EXPR_DECLs created by avoid_deep_ter_for_debug.
Referenced by avoid_deep_ter_for_debug(), expand_debug_expr(), and expand_debug_locations().
|
static |
The phase of the stack frame. This is the known misalignment of virtual_stack_vars_rtx from PREFERRED_STACK_BOUNDARY. That is, (frame_offset+frame_phase) % PREFERRED_STACK_BOUNDARY == 0.
Referenced by alloc_stack_frame_space(), expand_one_stack_var_at(), expand_used_vars(), and try_fit_stack_local().
|
static |
Used during expand_used_vars to remember if we saw any decls for which we'd like to enable stack smashing protection.
Referenced by expand_used_vars(), init_vars_expansion(), and stack_protect_decl_phase().
|
static |
Used during expand_used_vars. Remember if we say a character buffer smaller than our cutoff threshold. Used for -Wstack-protector.
Referenced by init_vars_expansion(), and stack_protect_decl_phase().
Temporary storage for BB_HEAD and BB_END of bbs until they are converted to BB_RTL.
Referenced by expand_gimple_basic_block(), expand_gimple_cond(), expand_gimple_tailcall(), and label_rtx_for_bb().
|
static |
Maps the blocks that do not contain tree labels to rtx labels.
Referenced by expand_gimple_basic_block(), and label_rtx_for_bb().
| struct ssaexpand SA |
This variable holds information helping the rewriting of SSA trees into RTL.
This is the singleton described above.
Referenced by adjust_one_expanded_partition_var(), build_common_tree_nodes(), expand_debug_expr(), expand_gimple_basic_block(), expand_gimple_cond(), expand_one_register_var(), expand_one_ssa_partition(), expand_one_stack_var(), expand_stack_vars(), expand_used_vars(), get_gimple_for_ssa_name(), get_rtx_for_ssa_name(), insert_part_to_rtx_on_edge(), insert_partition_copy_on_edge(), insert_rtx_to_part_on_edge(), insert_value_copy_on_edge(), set_parm_rtl(), set_rtl(), and verify_partition_mem_exprs().
|
static |
Conflict bitmaps go on this obstack. This allows us to destroy all of them in one big sweep.
Referenced by add_scope_conflicts(), add_scope_conflicts_1(), add_stack_var_conflict(), fini_vars_expansion(), init_vars_expansion(), vars_ssa_cache::unshare(), update_alias_info_with_stack_vars(), and vars_ssa_cache::vars_ssa_cache().
|
static |
We have an array of such objects while deciding allocation.
Referenced by account_stack_vars(), add_scope_conflicts_1(), add_scope_conflicts_2(), add_stack_protection_conflicts(), add_stack_var(), add_stack_var_conflict(), asan_decl_phase_3(), vars_ssa_cache::dump(), dump_stack_var_partition(), expand_stack_vars(), fini_vars_expansion(), partition_stack_vars(), stack_protect_decl_phase_1(), stack_protect_decl_phase_2(), stack_var_cmp(), stack_var_conflict_p(), union_stack_vars(), and update_alias_info_with_stack_vars().
|
static |
Referenced by add_stack_var(), and fini_vars_expansion().
|
static |
Referenced by account_stack_vars(), add_scope_conflicts(), add_stack_protection_conflicts(), add_stack_var(), decl_stack_index(), dump_stack_var_partition(), estimated_stack_frame_size(), expand_stack_vars(), expand_used_vars(), fini_vars_expansion(), partition_stack_vars(), update_alias_info_with_stack_vars(), and visit_conflict().
|
static |
An array of indices such that stack_vars[stack_vars_sorted[i]].size is non-decreasing.
Referenced by account_stack_vars(), dump_stack_var_partition(), estimated_stack_frame_size(), expand_stack_vars(), fini_vars_expansion(), and partition_stack_vars().