GCC Middle and Back End API Reference
combine-stack-adj.c File Reference

Data Structures

struct  csa_reflist
struct  record_stack_refs_data

Functions

static int stack_memref_p (rtx)
static rtx single_set_for_csa (rtx)
static void free_csa_reflist (struct csa_reflist *)
static struct csa_reflistrecord_one_stack_ref (rtx, rtx *, struct csa_reflist *)
static int try_apply_stack_adjustment (rtx, struct csa_reflist *, HOST_WIDE_INT, HOST_WIDE_INT)
static void combine_stack_adjustments_for_block (basic_block)
static int record_stack_refs (rtx *, void *)
static void combine_stack_adjustments ()
static int stack_memref_p ()
static rtx single_set_for_csa ()
static void free_csa_reflist ()
static struct csa_reflistrecord_one_stack_ref ()
static int record_stack_refs ()
static void maybe_move_args_size_note ()
static rtx prev_active_insn_bb ()
static rtx next_active_insn_bb ()
static void force_move_args_size_note ()
static void combine_stack_adjustments_for_block ()
static bool gate_handle_stack_adjustments ()
static unsigned int rest_of_handle_stack_adjustments ()
rtl_opt_passmake_pass_stack_adjustments ()

Function Documentation

static void combine_stack_adjustments ( )
static
Main entry point for stack adjustment combination.   

References combine_stack_adjustments_for_block().

Referenced by rest_of_handle_stack_adjustments().

static void combine_stack_adjustments_for_block ( basic_block  )
static
static void force_move_args_size_note ( )
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(), emit_insn_before(), find_reg_note(), record_stack_refs_data::insn, insn_nothrow_p(), maybe_move_args_size_note(), next_active_insn_bb(), and prev_active_insn_bb().

Referenced by combine_stack_adjustments_for_block().

static void free_csa_reflist ( struct csa_reflist )
static
static void free_csa_reflist ( )
static
Free the list of csa_reflist nodes.   

References free(), and csa_reflist::next.

static bool gate_handle_stack_adjustments ( )
static
rtl_opt_pass* make_pass_stack_adjustments ( )
static void maybe_move_args_size_note ( )
static
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(), and find_reg_note().

Referenced by combine_stack_adjustments_for_block(), and force_move_args_size_note().

static rtx next_active_insn_bb ( )
static

References active_insn_p().

Referenced by force_move_args_size_note().

static rtx prev_active_insn_bb ( )
static
Return the next (or previous) active insn within BB.   

References active_insn_p().

Referenced by force_move_args_size_note().

static struct csa_reflist* record_one_stack_ref ( rtx  ,
rtx ,
struct csa_reflist  
)
staticread

Referenced by record_stack_refs().

static struct csa_reflist* record_one_stack_ref ( )
staticread
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, csa_reflist::next, csa_reflist::ref, and csa_reflist::sp_offset.

static int record_stack_refs ( rtx ,
void *   
)
static
static unsigned int rest_of_handle_stack_adjustments ( )
static
static rtx single_set_for_csa ( rtx  )
static
static rtx single_set_for_csa ( )
static
Recognize either normal single_set or the hack in i386.md for
   tying fp and sp adjustments.   

References SET.

static int stack_memref_p ( rtx  )
static

Referenced by record_stack_refs().

static int stack_memref_p ( )
static
Recognize a MEM of the form (sp) or (plus sp const).   
static int try_apply_stack_adjustment ( rtx  insn,
struct csa_reflist reflist,
HOST_WIDE_INT  new_adjust,
HOST_WIDE_INT  delta 
)
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(), csa_reflist::insn, lowpart_subreg(), csa_reflist::next, plus_constant(), csa_reflist::ref, replace_equiv_address(), replace_equiv_address_nv(), single_set_for_csa(), csa_reflist::sp_offset, and validate_change().

Referenced by combine_stack_adjustments_for_block().