osprey/kg++fe/gnu/dependence.c File Reference

#include "config.h"
#include "system.h"
#include "rtl.h"
#include "expr.h"
#include "tree.h"
#include "c-common.h"
#include "flags.h"
#include "varray.h"

Include dependency graph for dependence.c:

Go to the source code of this file.

Data Types

type  def_use
type  loop
type  induction
type  dependence
type  subscript

Defines

#define MAX_SUBSCRIPTS   13
#define INDEX_LIMIT_CHECK(NODE)
#define abs(N)   ((N) < 0 ? -(N) : (N))
#define MEM_DEPENDENCY(RTX)   XCWINT (RTX, 2, MEM)

Enumerations

enum  dependence_type {
  dt_flow, dt_anti, dt_output, dt_none,
  dt_flow, dt_anti, dt_output, dt_none
}
enum  direction_type {
  lt, le, eq, gt,
  ge, star, independent, undef,
  lt, le, eq, gt,
  ge, star, independent, undef
}
enum  def_use_type {
  def, use, init_def_use, def,
  use, init_def_use
}
enum  du_status_type { seen, unseen, seen, unseen }
enum  loop_status_type { normal, unnormal, normal, unnormal }
enum  complexity_type {
  ziv, strong_siv, weak_siv, weak_zero_siv,
  weak_crossing_siv, miv, ziv, strong_siv,
  weak_siv, weak_zero_siv, weak_crossing_siv, miv
}

Functions/Subroutines

void init_dependence_analysis PARAMS ((tree))
static void build_def_use PARAMS ((tree, enum def_use_type))
static loop *add_loop PARAMS ((tree, tree, int))
static int find_induction_variable PARAMS ((tree, tree, tree, loop *))
static int get_low_bound PARAMS ((tree, const char *))
static void link_loops PARAMS ((void))
static void check_node_dependence PARAMS ((def_use *))
static int get_coefficients PARAMS ((def_use *, subscript[]))
static int get_one_coefficient PARAMS ((tree, subscript *, def_use *, enum tree_code *))
static void normalize_coefficients PARAMS ((subscript[], loop *, int))
static void classify_dependence PARAMS ((subscript[], subscript[], enum complexity_type[], int *, int))
static void ziv_test PARAMS ((subscript[], subscript[], enum direction_type[][MAX_SUBSCRIPTS], int[][MAX_SUBSCRIPTS], loop *, int))
static int
check_subscript_induction 
PARAMS ((subscript *, subscript *, loop *))
static void gcd_test PARAMS ((subscript[], subscript[], enumdirection_type[][MAX_SUBSCRIPTS], int[][MAX_SUBSCRIPTS], loop *, int))
static int find_gcd PARAMS ((int, int))
static void merge_dependencies PARAMS ((enum direction_type[][MAX_SUBSCRIPTS], int[][MAX_SUBSCRIPTS], int, int))
int have_dependence_p PARAMS ((rtx, rtx, enum direction_type[], int[]))
void init_dependence_analysis (tree exp)
static void build_def_use (tree exp, enum def_use_type du_type)
static loopadd_loop (tree loop_node, tree outer_loop, int nloop)
static int find_induction_variable (tree init_node, tree cond_node, tree incr_node, loop *loop_def)
static int get_low_bound (tree node, const char *variable)
static int have_induction_variable (tree outer_loop, const char *ind_var)
static void link_loops ()
static void get_node_dependence ()
static void check_node_dependence (def_use *du)
static int get_coefficients (def_use *du, coefficients)
static int get_one_coefficient (tree node, subscript *coefficients, def_use *du, enum tree_code *type)
static void normalize_coefficients (coefficients, loop *loop_ptr, int count)
static void classify_dependence (icoefficients, ocoefficients, complexity, int *separability, int count)
static void ziv_test (icoefficients, ocoefficients, direction, distance, loop *loop_ptr, int sub)
static void siv_test (icoefficients, ocoefficients, direction, distance, loop *loop_ptr, int sub)
static int check_subscript_induction (subscript *icoefficient, subscript *ocoefficient, loop *loop_ptr)
static void gcd_test (icoefficients, ocoefficients, direction, distance, loop *loop_ptr, int sub)
static int find_gcd (int x, int y)
static void merge_dependencies (direction, distance, int loop_count, int subscript_count)
static void dump_array_ref (tree node)
int search_dependence (tree node)
void remember_dest_for_dependence (tree node)
int have_dependence_p (rtx dest_rtx, rtx src_rtx, direction, distance)
void end_dependence_analysis ()

Variables

static tree dest_to_remember
static varray_type def_use_chain
static varray_type dep_chain
static varray_type loop_chain
static varray_type induction_chain


Define Documentation

#define abs (  )     ((N) < 0 ? -(N) : (N))

Definition at line 1146 of file dependence.c.

#define INDEX_LIMIT_CHECK ( NODE   ) 

Value:

(TREE_CODE_CLASS (TREE_CODE (NODE)) == '<') \
  && (TREE_CODE (TREE_OPERAND (NODE, 0)) == VAR_DECL \
      && (IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (NODE, 0))) \
    == IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (incr_node, 0))))) \
      ? 1 : 0

Referenced by find_induction_variable().

#define MAX_SUBSCRIPTS   13

Definition at line 36 of file dependence.c.

Referenced by check_node_dependence().

#define MEM_DEPENDENCY ( RTX   )     XCWINT (RTX, 2, MEM)

Definition at line 1418 of file dependence.c.

Referenced by have_dependence_p().


Enumeration Type Documentation

Enumerator:
ziv 
strong_siv 
weak_siv 
weak_zero_siv 
weak_crossing_siv 
miv 
ziv 
strong_siv 
weak_siv 
weak_zero_siv 
weak_crossing_siv 
miv 

Definition at line 77 of file dependence.c.

Enumerator:
def 
use 
init_def_use 
def 
use 
init_def_use 

Definition at line 71 of file dependence.c.

Enumerator:
dt_flow 
dt_anti 
dt_output 
dt_none 
dt_flow 
dt_anti 
dt_output 
dt_none 

Definition at line 62 of file dependence.c.

Enumerator:
lt 
le 
eq 
gt 
ge 
star 
independent 
undef 
lt 
le 
eq 
gt 
ge 
star 
independent 
undef 

Definition at line 66 of file dependence.c.

Enumerator:
seen 
unseen 
seen 
unseen 

Definition at line 73 of file dependence.c.

Enumerator:
normal 
unnormal 
normal 
unnormal 

Definition at line 75 of file dependence.c.


Function Documentation

static loop* add_loop ( tree  loop_node,
tree  outer_loop,
int  nloop 
) [static]

static void build_def_use ( tree  exp,
enum def_use_type  du_type 
) [static]

static void check_node_dependence ( def_use du  )  [static]

static int check_subscript_induction ( subscript icoefficient,
subscript ocoefficient,
loop loop_ptr 
) [static]

Definition at line 1124 of file dependence.c.

References loop::ind, induction::next, induction::variable, and subscript::variable.

Referenced by gcd_test(), and siv_test().

static void classify_dependence ( icoefficients  ,
ocoefficients  ,
complexity  ,
int *  separability,
int  count 
) [static]

Definition at line 980 of file dependence.c.

References idx, memset, miv, strong_siv, weak_crossing_siv, weak_siv, weak_zero_siv, and ziv.

Referenced by check_node_dependence().

static void dump_array_ref ( tree  node  )  [static]

Definition at line 1266 of file dependence.c.

References DECL_NAME, IDENTIFIER_POINTER, printf(), TREE_CODE, TREE_INT_CST_LOW, and TREE_OPERAND.

Referenced by dump_array_ref().

void end_dependence_analysis (  ) 

Definition at line 1464 of file dependence.c.

References dep_chain, and VARRAY_FREE.

static int find_gcd ( int  x,
int  y 
) [static]

Definition at line 1186 of file dependence.c.

References abs, g, and r.

Referenced by gcd_test().

static int find_induction_variable ( tree  init_node,
tree  cond_node,
tree  incr_node,
loop loop_def 
) [static]

static void gcd_test ( icoefficients  ,
ocoefficients  ,
direction  ,
distance  ,
loop loop_ptr,
int  sub 
) [static]

static int get_coefficients ( def_use du,
coefficients   
) [static]

Definition at line 810 of file dependence.c.

References get_one_coefficient(), i, idx, INT_MIN, offset, TREE_CODE, TREE_INT_CST_LOW, and TREE_OPERAND.

Referenced by check_node_dependence().

static int get_low_bound ( tree  node,
const char *  variable 
) [static]

static void get_node_dependence (  )  [static]

static int get_one_coefficient ( tree  node,
subscript coefficients,
def_use du,
enum tree_code type 
) [static]

int have_dependence_p ( rtx  dest_rtx,
rtx  src_rtx,
direction  ,
distance   
)

static int have_induction_variable ( tree  outer_loop,
const char *  ind_var 
) [static]

void init_dependence_analysis ( tree  exp  ) 

static void link_loops (  )  [static]

static void merge_dependencies ( direction  ,
distance  ,
int  loop_count,
int  subscript_count 
) [static]

Definition at line 1222 of file dependence.c.

References abs, subscript::distance, eq, ge, gt, i, independent, int, INT_MAX, le, lt, and star.

Referenced by check_node_dependence().

static void normalize_coefficients ( coefficients  ,
loop loop_ptr,
int  count 
) [static]

int have_dependence_p PARAMS ( (rtx, rtx, enum direction_type[], int[])   ) 

static void merge_dependencies PARAMS ( (enum direction_type[][MAX_SUBSCRIPTS], int[][MAX_SUBSCRIPTS], int, int)   )  [static]

static int find_gcd PARAMS ( (int, int)   )  [static]

static void gcd_test PARAMS ( (subscript[], subscript[], enumdirection_type[][MAX_SUBSCRIPTS], int[][MAX_SUBSCRIPTS], loop *, int)   )  [static]

static int check_subscript_induction PARAMS ( (subscript *, subscript *, loop *)   )  [static]

static void ziv_test PARAMS ( (subscript[], subscript[], enum direction_type[][MAX_SUBSCRIPTS], int[][MAX_SUBSCRIPTS], loop *, int)   )  [static]

static void classify_dependence PARAMS ( (subscript[], subscript[], enum complexity_type[], int *, int)   )  [static]

static void normalize_coefficients PARAMS ( (subscript[], loop *, int)   )  [static]

static int get_one_coefficient PARAMS ( (tree, subscript *, def_use *, enum tree_code *)   )  [static]

static int get_coefficients PARAMS ( (def_use *, subscript[])   )  [static]

static void check_node_dependence PARAMS ( (def_use *)   )  [static]

static void link_loops PARAMS ( (void  )  [static, read]

Definition at line 77 of file cplus-dem.c.

static int get_low_bound PARAMS ( (tree, const char *)   )  [static]

static int find_induction_variable PARAMS ( (tree, tree, tree, loop *)   )  [static]

static loop* add_loop PARAMS ( (tree, tree, int)   )  [static]

static void build_def_use PARAMS ( (tree, enum def_use_type  )  [static]

void init_dependence_analysis PARAMS ( (tree  ) 

void remember_dest_for_dependence ( tree  node  ) 

Definition at line 1405 of file dependence.c.

References dest_to_remember, TREE_CODE, and TREE_OPERAND.

int search_dependence ( tree  node  ) 

static void siv_test ( icoefficients  ,
ocoefficients  ,
direction  ,
distance  ,
loop loop_ptr,
int  sub 
) [static]

static void ziv_test ( icoefficients  ,
ocoefficients  ,
direction  ,
distance  ,
loop loop_ptr,
int  sub 
) [static]

Definition at line 1054 of file dependence.c.

References loop::depth, independent, and offset.

Referenced by check_node_dependence().


Variable Documentation

Definition at line 175 of file dependence.c.

Referenced by build_def_use(), get_node_dependence(), and init_dependence_analysis().

Definition at line 172 of file dependence.c.

Referenced by remember_dest_for_dependence(), and search_dependence().


Generated on Wed Apr 8 15:31:04 2009 for Open64 by  doxygen 1.5.6