GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "df.h"
#include "insn-config.h"
#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cfgrtl.h"
#include "tree-pass.h"
#include "rtl-iter.h"
Data Structures | |
struct | csa_reflist |
|
static |
Main entry point for stack adjustment combination.
References BITMAP_ALLOC, BITMAP_FREE, cfun, combine_stack_adjustments_for_block(), FOR_EACH_BB_FN, and reg_obstack.
Referenced by rest_of_handle_stack_adjustments().
|
static |
Subroutine of combine_stack_adjustments, called for each basic block.
References BB_END, BB_HEAD, BITMAP_ALLOC, bitmap_copy(), BITMAP_FREE, CALL_P, CONST_INT_P, delete_insn(), DF_LR_IN, df_simulate_initialize_forwards(), df_simulate_one_insn_forwards(), find_reg_note(), force_move_args_size_note(), free_csa_reflist(), GET_CODE, GET_MODE, GET_MODE_SIZE(), csa_reflist::insn, INSN_P, INTVAL, known_eq, maybe_merge_cfa_adjust(), maybe_move_args_size_note(), MEM_P, memory_address_p, csa_reflist::next, NEXT_INSN(), no_unhandled_cfa(), NULL, NULL_RTX, PATTERN(), record_stack_refs(), reg_mentioned_p(), reg_obstack, REG_P, REGNO, SET_DEST, SET_SRC, single_set_for_csa(), STACK_GROWS_DOWNWARD, stack_pointer_rtx, try_apply_stack_adjustment(), and XEXP.
Referenced by combine_stack_adjustments().
|
static |
If INSN has a REG_ARGS_SIZE note, if possible move it to PREV. Otherwise search for a nearby candidate within BB where we can stick the note.
References add_reg_note(), CALL_P, const0_rtx, emit_insn_before(), find_reg_note(), csa_reflist::insn, insn_nothrow_p(), maybe_move_args_size_note(), next_active_insn_bb(), NULL, NULL_RTX, prev_active_insn_bb(), and XEXP.
Referenced by combine_stack_adjustments_for_block().
|
static |
Free the list of csa_reflist nodes.
References free(), and csa_reflist::next.
Referenced by combine_stack_adjustments_for_block().
rtl_opt_pass * make_pass_stack_adjustments | ( | gcc::context * | ctxt | ) |
Merge any REG_CFA_ADJUST_CFA note from SRC into DST. AFTER is true iff DST follows SRC in the instruction stream.
References add_reg_note(), find_reg_note(), gcc_assert, GET_CODE, NULL, NULL_RTX, RTX_FRAME_RELATED_P, SET, SET_DEST, SET_SRC, simplify_replace_rtx(), and XEXP.
Referenced by combine_stack_adjustments_for_block().
If INSN has a REG_ARGS_SIZE note, move it to LAST. AFTER is true iff LAST follows INSN in the instruction stream.
References add_reg_note(), find_reg_note(), csa_reflist::insn, last, NULL, NULL_RTX, and XEXP.
Referenced by combine_stack_adjustments_for_block(), and force_move_args_size_note().
|
static |
References active_insn_p(), BB_END, csa_reflist::insn, NEXT_INSN(), and NULL.
Referenced by force_move_args_size_note().
We only know how to adjust the CFA; no other frame-related changes may appear in any insn to be deleted.
References csa_reflist::insn, REG_NOTE_KIND, REG_NOTES, RTX_FRAME_RELATED_P, and XEXP.
Referenced by combine_stack_adjustments_for_block().
|
static |
Return the next (or previous) active insn within BB.
References active_insn_p(), BB_HEAD, csa_reflist::insn, NULL, and PREV_INSN().
Referenced by force_move_args_size_note().
|
static |
Create a new csa_reflist node from the given stack reference. It is already known that the reference is either a MEM satisfying the predicate stack_memref_p or a REG representing the stack pointer.
References csa_reflist::insn, INTVAL, csa_reflist::next, csa_reflist::ref, REG_P, csa_reflist::sp_offset, stack_pointer_rtx, and XEXP.
Referenced by record_stack_refs().
|
static |
For non-debug insns, record all stack memory references in INSN and return true if there were no other (unrecorded) references to the stack pointer. For debug insns, record all stack references regardless of context and unconditionally return true.
References DEBUG_INSN_P, FOR_EACH_SUBRTX_PTR, GET_CODE, csa_reflist::insn, PATTERN(), record_one_stack_ref(), reg_mentioned_p(), REGNO, stack_memref_p(), and stack_pointer_rtx.
Referenced by combine_stack_adjustments_for_block().
|
static |
References combine_stack_adjustments(), df_analyze(), and df_note_add_problem().
Recognize either normal single_set or the hack in i386.md for tying fp and sp adjustments.
References GET_CODE, i, csa_reflist::insn, NONJUMP_INSN_P, NULL_RTX, PATTERN(), SET, SET_DEST, SET_SRC, single_set(), XVECEXP, and XVECLEN.
Referenced by combine_stack_adjustments_for_block(), and try_apply_stack_adjustment().
Recognize a MEM of the form (sp) or (plus sp const).
References CONST_INT_P, GET_CODE, MEM_P, stack_pointer_rtx, and XEXP.
Referenced by record_stack_refs().
|
static |
Attempt to apply ADJUST to the stack adjusting insn INSN, as well as each of the memories and stack references in REFLIST. Return true on success.
References apply_change_group(), bitmap_bit_p, CONST_INT_P, copy_rtx(), END_REGNO(), GEN_INT, GET_CODE, GET_MODE, HARD_REGISTER_P, i, csa_reflist::insn, lowpart_subreg(), MEM_P, new_adjust(), csa_reflist::next, NULL, NULL_RTX, PATTERN(), plus_constant(), csa_reflist::ref, REG_P, REGNO, remove_reg_equal_equiv_notes(), replace_equiv_address(), replace_equiv_address_nv(), SET_DEST, SET_SRC, single_set_for_csa(), csa_reflist::sp_offset, stack_pointer_rtx, validate_change(), XEXP, XVECEXP, and XVECLEN.
Referenced by combine_stack_adjustments_for_block().