GCC Middle and Back End API Reference
et-forest.c File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "et-forest.h"
Include dependency graph for et-forest.c:

Data Structures

struct  et_occ

Functions

static void set_depth ()
static void set_depth_add ()
static void set_prev ()
static void set_next ()
static void et_recomp_min ()
static void et_check_occ_sanity ()
static void et_check_sanity ()
static void et_check_tree_sanity ()
static int record_path_before_1 ()
static void record_path_before ()
static int check_path_after_1 ()
static void check_path_after ()
static void et_splay ()
static struct et_occet_new_occ ()
struct et_nodeet_new_tree ()
void et_free_tree ()
void et_free_tree_force ()
void et_free_pools ()
void et_set_father ()
void et_split ()
struct et_nodeet_nca ()
bool et_below ()
struct et_nodeet_root ()

Variables

static alloc_pool et_nodes
static alloc_pool et_occurrences
static int len
static void * datas [MAX_NODES]
static int depths [MAX_NODES]

Function Documentation

static void check_path_after ( )
static
   Checks whether the path represented by a tree containing OCC was
   not changed since the last recording.  

Referenced by et_splay().

static int check_path_after_1 ( )
static
   Checks whether the path represented by OCC, with depth incremented by DEPTH,
   was not changed since the last recording.  

References et_occ::prev.

Referenced by record_path_before().

bool et_below ( )
   Checks whether the node UP is an ancestor of the node DOWN.  
         In case O1 and O2 are in two different trees, we must just restore the
         original state.  

Referenced by nearest_common_dominator_for_set().

static void et_check_occ_sanity ( )
static
   Checks whether neighborhood of OCC seems sane.  

References et_occ::next, and et_occ::parent.

static void et_check_sanity ( )
static
   Checks whether tree rooted at OCC is sane.  

References et_occ::parent.

static void et_check_tree_sanity ( )
static
   Checks whether tree containing OCC is sane.  

References et_occ::depth.

Referenced by et_splay().

void et_free_pools ( void  )
   Release the alloc pools, if they are empty.  
void et_free_tree ( )
   Releases et tree T.  

References free_alloc_pool_if_empty().

void et_free_tree_force ( )
   Releases et tree T without maintaining other nodes.  
struct et_node* et_nca ( )
read
   Finds the nearest common ancestor of the nodes N1 and N2.  
         O1 and O2 are in different components of the forest.  

Referenced by get_dominated_to_depth().

static struct et_occ* et_new_occ ( )
staticread
   Create a new et tree occurrence of NODE.  
struct et_node* et_new_tree ( )
read
   Create a new et tree containing DATA.  

Referenced by assign_dfs_numbers().

static void et_recomp_min ( )
inlinestatic
   Recompute minimum for occurrence OCC.  

References et_occ::depth, et_occ::min, and et_occ::min_occ.

Referenced by et_splay().

struct et_node* et_root ( )
read
   Returns the root of the tree that contains NODE.  
     The root of the tree corresponds to the rightmost occurrence in the
     represented path.  
void et_set_father ( )
   Sets father of et tree T to FATHER.  
     Update the path represented in the splay tree.  
     Update the tree.  

Referenced by get_dominated_by_region().

static void et_splay ( )
static
   Splay the occurrence OCC to the root of the tree.  
                 zig 
                 zag 
                 zig zig 
                 zag zig 
                 zig zag 
                 zag zag 

References check_path_after(), et_check_tree_sanity(), et_recomp_min(), et_occ::min, et_occ::min_occ, et_occ::next, et_occ::parent, et_occ::prev, set_depth(), set_depth_add(), set_next(), and set_prev().

void et_split ( )
   Splits the edge from T to its father.  
     Update the path represented by the splay tree.  
     Update the tree.  

References et_node::left, and et_node::right.

Referenced by get_dominated_by_region().

static void record_path_before ( )
static
   Records the path represented by a tree containing OCC.  

References check_path_after_1(), et_occ::depth, et_occ::next, and et_occ::of.

static int record_path_before_1 ( )
static
   Records the path represented by OCC, with depth incremented by DEPTH.  
static void set_depth ( )
inlinestatic
   Changes depth of OCC to D.  

Referenced by et_splay().

static void set_depth_add ( )
inlinestatic
   Adds D to the depth of OCC.  

Referenced by et_splay().

static void set_next ( )
inlinestatic
   Sets next field of OCC to P.  

Referenced by et_splay().

static void set_prev ( )
inlinestatic
   Sets prev field of OCC to P.  

Referenced by et_splay().


Variable Documentation

void* datas[MAX_NODES]
static
int depths[MAX_NODES]
static
alloc_pool et_nodes
static
alloc_pool et_occurrences
static