GCC Middle and Back End API Reference
sese.h File Reference

Go to the source code of this file.

Data Structures

struct  sese_s
struct  ifsese_s
struct  rename_map_elt_s
struct  gimple_bb

Typedefs

typedef struct sese_ssese
typedef struct ifsese_sifsese
typedef struct rename_map_elt_srename_map_elt
typedef struct gimple_bbgimple_bb_p

Functions

sese new_sese (edge, edge)
void free_sese (sese)
void sese_insert_phis_for_liveouts (sese, basic_block, edge, edge)
void build_sese_loop_nests (sese)
edge copy_bb_and_scalar_dependences (basic_block, sese, edge, vec< tree >, bool *)
struct loopoutermost_loop_in_sese (sese, basic_block)
tree scalar_evolution_in_region (sese, loop_p, tree)
static bool sese_contains_loop ()
static unsigned sese_nb_params ()
static bool bb_in_region ()
static bool bb_in_sese_p ()
static bool stmt_in_sese_p ()
static bool defined_in_sese_p ()
static bool loop_in_sese_p ()
static unsigned int sese_loop_depth ()
static sese split_region_for_bb ()
static basic_block block_before_sese ()
void if_region_set_false_region (ifsese, sese)
ifsese move_sese_in_condition (sese)
edge get_true_edge_from_guard_bb (basic_block)
edge get_false_edge_from_guard_bb (basic_block)
void set_ifsese_condition (ifsese, tree)
static edge if_region_entry ()
static edge if_region_exit ()
static basic_block if_region_get_condition_block ()
hashval_t rename_map_elt_info (const void *)
int eq_rename_map_elts (const void *, const void *)
static rename_map_elt new_rename_map_elt ()
static void recompute_all_dominators ()
static struct loopgbb_loop ()
static loop_p gbb_loop_at_index ()
static int nb_common_loops ()
static bool scev_analyzable_p ()

Typedef Documentation

typedef struct gimple_bb * gimple_bb_p
typedef struct ifsese_s * ifsese
A single entry single exit specialized for conditions.   
typedef struct rename_map_elt_s * rename_map_elt
Structure containing the mapping between the old names and the new
   names used after block copy in the new loop context.   
typedef struct sese_s * sese
A Single Entry, Single Exit region is a part of the CFG delimited
   by two edges.   

Function Documentation

static bool bb_in_region ( )
inlinestatic
Checks whether BB is contained in the region delimited by ENTRY and
   EXIT blocks.   

References CDI_DOMINATORS, dominated_by_p(), basic_block_def::preds, and edge_def::src.

Referenced by bb_in_sd_region(), and bb_in_sese_p().

static basic_block block_before_sese ( )
inlinestatic
Returns the block preceding the entry of a SESE.   

Referenced by scalar_evolution_in_region().

void build_sese_loop_nests ( sese  )
edge copy_bb_and_scalar_dependences ( basic_block  bb,
sese  region,
edge  next_e,
vec< tree iv_map,
bool *  gloog_error 
)
Copies BB and includes in the copied BB all the statements that can
   be reached following the use-def chains from the memory accesses,
   and returns the next edge following this new block.  GLOOG_ERROR is
   set when the code generation cannot continue.   

References hash_table< Descriptor, Allocator >::create(), hash_table< Descriptor, Allocator >::dispose(), graphite_copy_stmts_from_block(), remove_phi_nodes(), single_succ_edge(), and split_edge().

Referenced by translate_clast_user().

static bool defined_in_sese_p ( )
inlinestatic
Returns true when NAME is defined in REGION.   

References stmt_in_sese_p().

Referenced by scalar_evolution_in_region(), and scev_analyzable_p().

int eq_rename_map_elts ( const void *  ,
const void *   
)
void free_sese ( sese  )
static struct loop* gbb_loop ( )
staticread
Return the innermost loop that contains the basic block GBB.   

Referenced by gbb_loop_at_index(), nb_common_loops(), nb_pbbs_in_loops(), and pbb_loop().

static loop_p gbb_loop_at_index ( )
inlinestatic
Returns the gimple loop, that corresponds to the loop_iterator_INDEX.
   If there is no corresponding gimple loop, we return NULL.   

References gbb_loop(), loop_outer(), sese_contains_loop(), and sese_loop_depth().

Referenced by build_iv_mapping().

edge get_false_edge_from_guard_bb ( basic_block  )
edge get_true_edge_from_guard_bb ( basic_block  )
static edge if_region_entry ( )
inlinestatic
static edge if_region_exit ( )
inlinestatic

References ifsese_s::region.

static basic_block if_region_get_condition_block ( )
inlinestatic
void if_region_set_false_region ( ifsese  ,
sese   
)
ifsese move_sese_in_condition ( sese  )
static int nb_common_loops ( )
inlinestatic
The number of common loops in REGION for GBB1 and GBB2.   

References find_common_loop(), gbb_loop(), and sese_loop_depth().

Referenced by build_scop_scattering().

static rename_map_elt new_rename_map_elt ( )
inlinestatic
Constructs a new SCEV_INFO_STR structure for VAR and INSTANTIATED_BELOW.   

References rename_map_elt_s::expr, and rename_map_elt_s::old_name.

Referenced by set_rename().

sese new_sese ( edge  ,
edge   
)
struct loop* outermost_loop_in_sese ( sese  ,
basic_block   
)
read
static void recompute_all_dominators ( )
inlinestatic
hashval_t rename_map_elt_info ( const void *  )
tree scalar_evolution_in_region ( sese  ,
loop_p  ,
tree   
)
static bool sese_contains_loop ( )
inlinestatic
Check that SESE contains LOOP.   

References bitmap_bit_p(), and loop::num.

Referenced by gbb_loop_at_index(), and sese_record_loop().

void sese_insert_phis_for_liveouts ( sese  region,
basic_block  bb,
edge  false_e,
edge  true_e 
)
Insert in the block BB phi nodes for variables defined in REGION
   and used outside the REGION.  The code generation moves REGION in
   the else clause of an "if (1)" and generates code in the then
   clause that is at this point empty:

   | if (1)
   |   empty;
   | else
   |   REGION;

References sese_add_exit_phis_edge(), sese_build_liveouts(), and update_ssa().

Referenced by gloog().

static unsigned int sese_loop_depth ( )
inlinestatic
Returns the loop depth of LOOP in REGION.  The loop depth
   is the same as the normal loop depth, but limited by a region.

   Example:

   loop_0
     loop_1
       {
         S0
            <- region start
         S1

         loop_2
           S2

         S3
            <- region end
       }

    loop_0 does not exist in the region -> invalid
    loop_1 exists, but is not completely contained in the region -> depth 0
    loop_2 is completely contained -> depth 1   

References loop_in_sese_p(), and loop_outer().

Referenced by extract_affine_chrec(), gbb_loop_at_index(), and nb_common_loops().

static unsigned sese_nb_params ( )
inlinestatic
The number of parameters in REGION.  

Referenced by find_scop_parameters().

void set_ifsese_condition ( ifsese  ,
tree   
)
static sese split_region_for_bb ( )
inlinestatic
static bool stmt_in_sese_p ( )
inlinestatic
Returns true when STMT is defined in REGION.   

References bb_in_sese_p(), and gimple_bb().

Referenced by defined_in_sese_p(), and detect_commutative_reduction().