GCC Middle and Back End API Reference
sched-ebb.c File Reference

Functions

static void init_ready_list (void)
static void begin_schedule_ready (rtx)
static int schedule_more_p (void)
static const char * ebb_print_insn (const_rtx, int)
static int rank (rtx, rtx)
static int ebb_contributes_to_priority (rtx, rtx)
static basic_block earliest_block_with_similiar_load (basic_block, rtx)
static void add_deps_for_risky_insns (rtx, rtx)
static void debug_ebb_dependencies (rtx, rtx)
static void ebb_add_remove_insn (rtx, int)
static void ebb_add_block (basic_block, basic_block)
static basic_block advance_target_bb (basic_block, rtx)
static void ebb_fix_recovery_cfg (int, int, int)
static void * save_ebb_state ()
static void restore_ebb_state ()
static void debug_ebb_dependencies ()
static void begin_schedule_ready ()
static void begin_move_insn ()
static const char * ebb_print_insn ()
static int rank ()
void ebb_compute_jump_reg_dependencies ()
static basic_block earliest_block_with_similiar_load ()
static void add_deps_for_risky_insns ()
basic_block schedule_ebb ()
void schedule_ebbs_init ()
void schedule_ebbs_finish ()
void schedule_ebbs ()
static void ebb_add_remove_insn ()
static void ebb_add_block ()
static basic_block advance_target_bb ()

Variables

static int rgn_n_insns
static int sched_rgn_n_insns
static bitmap_head dont_calc_deps
static basic_block last_bb
static struct common_sched_info_def ebb_common_sched_info
static struct sched_deps_info_def ebb_sched_deps_info
static struct haifa_sched_info ebb_sched_info

Function Documentation

static void add_deps_for_risky_insns ( rtx  ,
rtx   
)
static

Referenced by schedule_ebb().

static basic_block advance_target_bb ( basic_block  ,
rtx   
)
static
static basic_block advance_target_bb ( )
static
Return next block in ebb chain.  For parameter meaning please refer to
   sched-int.h: struct sched_info: advance_target_bb.   

References bb_note(), control_flow_insn_p(), and basic_block_def::next_bb.

static void begin_move_insn ( )
static
static void begin_schedule_ready ( rtx  )
static
static void begin_schedule_ready ( )
static
INSN is being scheduled after LAST.  Update counters.   

References sched_rgn_n_insns.

static void debug_ebb_dependencies ( rtx  ,
rtx   
)
static

Referenced by init_ready_list().

static void debug_ebb_dependencies ( )
static
Print dependency information about ebb between HEAD and TAIL.   

References debug_dependencies(), and sched_dump.

static basic_block earliest_block_with_similiar_load ( basic_block  ,
rtx   
)
static
static basic_block earliest_block_with_similiar_load ( )
static
Returns the earliest block in EBB currently being processed where a
   "similar load" 'insn2' is found, and hence LOAD_INSN can move
   speculatively into the found block.  All the following must hold:

   (1) both loads have 1 base register (PFREE_CANDIDATEs).
   (2) load_insn and load2 have a def-use dependence upon
   the same insn 'insn1'.

   From all these we can conclude that the two loads access memory
   addresses that differ at most by a constant, and hence if moving
   load_insn would cause an exception, it would have been caused by
   load2 anyhow.

   The function uses list (given by LAST_BLOCK) of already processed
   blocks in EBB.  The list is formed in `add_deps_for_risky_insns'.   

References basic_block_def::aux, haifa_classify_insn(), basic_block_def::index, and PFREE_CANDIDATE.

static void ebb_add_block ( basic_block  ,
basic_block   
)
static

Referenced by schedule_ebbs_init().

static void ebb_add_block ( )
static
BB was added to ebb after AFTER.   

References bitmap_set_bit(), and basic_block_def::index.

static void ebb_add_remove_insn ( rtx  ,
int   
)
static
static void ebb_add_remove_insn ( )
static
INSN has been added to/removed from current ebb.   

References rgn_n_insns.

void ebb_compute_jump_reg_dependencies ( )
static int ebb_contributes_to_priority ( rtx  next,
rtx  insn 
)
static
NEXT is an instruction that depends on INSN (a backward dependence);
   return nonzero if we should include this dependence in priority
   calculations.   
static void ebb_fix_recovery_cfg ( int  bbi,
int  jump_bbi,
int  jump_bb_nexti 
)
static
Fix internal data after interblock movement of jump instruction.
   For parameter meaning please refer to
   sched-int.h: struct sched_info: fix_recovery_cfg.   

References basic_block_def::index.

Referenced by schedule_ebbs_init().

static const char* ebb_print_insn ( const_rtx  ,
int   
)
static
static const char* ebb_print_insn ( )
static
Return a string that contains the insn uid and optionally anything else
   necessary to identify this insn in an output.  It's valid to use a
   static buffer for this.  The ALIGNED parameter should cause the string
   to be formatted so that multiple output lines will line up nicely.   
static void init_ready_list ( void  )
static
Implementations of the sched_info functions for region scheduling.   
Add all insns that are initially ready to the ready list READY.  Called
   once before scheduling a set of insns.   

References current_sched_info, debug_ebb_dependencies(), haifa_sched_info::next_tail, haifa_sched_info::prev_head, rgn_n_insns, sched_rgn_n_insns, sched_verbose, and try_ready().

static int rank ( rtx  ,
rtx   
)
static
static int rank ( )
static
Compare priority of two insns.  Return a positive number if the second
   insn is to be preferred for scheduling, and a negative one if the first
   is to be preferred.  Zero if they are equally good.   

References basic_block_def::count, and basic_block_def::frequency.

static void restore_ebb_state ( )
static
Restore the state of the frontend from P_, then free it.   

References free(), and sched_rgn_n_insns.

static void* save_ebb_state ( )
static
Allocate memory and store the state of the frontend.  Return the allocated
   memory.   

References sched_rgn_n_insns.

basic_block schedule_ebb ( )
void schedule_ebbs_finish ( void  )
Perform cleanups after scheduling using schedules_ebbs or schedule_ebb.   

References bitmap_clear(), haifa_sched_finish(), reload_completed, and reposition_prologue_and_epilogue_notes().

Referenced by schedule_ebbs().

static int schedule_more_p ( void  )
static
Return nonzero if there are more insns that should be scheduled.   

References rgn_n_insns, and sched_rgn_n_insns.


Variable Documentation

bitmap_head dont_calc_deps
static
Set of blocks, that already have their dependencies calculated.   
struct common_sched_info_def ebb_common_sched_info
static
Used in schedule_insns to initialize current_sched_info for scheduling
   regions (or single basic blocks).   

Referenced by schedule_ebbs_init().

struct sched_deps_info_def ebb_sched_deps_info
static
Initial value:
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL,
1, 0, 0
}

Referenced by schedule_ebbs_init().

int rgn_n_insns
static
@verbatim Instruction scheduling pass.

Copyright (C) 1992-2013 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiema.nosp@m.nn@c.nosp@m.ygnus.nosp@m..com) Enhanced by, and currently maintained by, Jim Wilson (wilso.nosp@m.n@cy.nosp@m.gnus..nosp@m.com)

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/.

The number of insns to be scheduled in total.   

Referenced by ebb_add_remove_insn(), init_ready_list(), schedule_ebb(), and schedule_more_p().

int sched_rgn_n_insns
static