PIPS
chains.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  chain_type {
  USE_PROPER_EFFECTS = 1 , USE_REGIONS , USE_IN_OUT_REGIONS , USE_PROPER_EFFECTS = 1 ,
  USE_REGIONS , USE_IN_OUT_REGIONS
}
 Warning! Do not modify this file that is automatically generated! More...
 

Functions

graph statement_dependence_graph (statement)
 cproto-generated files More...
 
bool atomic_chains (const string)
 Phase to compute atomic chains based on proper effects (simple memory accesses) More...
 
bool region_chains (const string)
 Phase to compute atomic chains based on array regions. More...
 
bool in_out_regions_chains (const string)
 Phase to compute atomic chains based on in-out array regions. More...
 

Enumeration Type Documentation

◆ chain_type

enum chain_type

Warning! Do not modify this file that is automatically generated!

Modify src/Libs/chains/chains-local.h instead, to add your own modifications. header file built by cproto chains-local.h To choose the concepts used to compute dependence chains

Enumerator
USE_PROPER_EFFECTS 
USE_REGIONS 
USE_IN_OUT_REGIONS 
USE_PROPER_EFFECTS 
USE_REGIONS 
USE_IN_OUT_REGIONS 

Definition at line 35 of file chains.h.

35  {
39 };
@ USE_IN_OUT_REGIONS
Definition: chains.h:38
@ USE_REGIONS
Definition: chains.h:37
@ USE_PROPER_EFFECTS
Definition: chains.h:36

Function Documentation

◆ atomic_chains()

bool atomic_chains ( const  string)

Phase to compute atomic chains based on proper effects (simple memory accesses)

Parameters
stringodule_name

Definition at line 1442 of file chains.c.

1442  {
1444 }
@ USE_PROPER_EFFECTS
Definition: chains-local.h:28
static bool chains(char *module_name, enum chain_type use)
Compute chain dependence for a module according different kinds of store-like effects.
Definition: chains.c:1397
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296

References chains(), module_name(), and USE_PROPER_EFFECTS.

+ Here is the call graph for this function:

◆ in_out_regions_chains()

bool in_out_regions_chains ( const  string)

Phase to compute atomic chains based on in-out array regions.

Parameters
stringodule_name

Definition at line 1456 of file chains.c.

1456  {
1458 }
@ USE_IN_OUT_REGIONS
Definition: chains-local.h:30

References chains(), module_name(), and USE_IN_OUT_REGIONS.

+ Here is the call graph for this function:

◆ region_chains()

bool region_chains ( const  string)

Phase to compute atomic chains based on array regions.

Parameters
stringodule_name

Definition at line 1449 of file chains.c.

1449  {
1450  return chains( module_name, USE_REGIONS );
1451 }
@ USE_REGIONS
Definition: chains-local.h:29

References chains(), module_name(), and USE_REGIONS.

+ Here is the call graph for this function:

◆ statement_dependence_graph()

graph statement_dependence_graph ( statement  s)

cproto-generated files

chains.c

cproto-generated files

@description Statement s is assumed "controlized", i.e. GOTO have been replaced by unstructured.

FIXME FI: this function is bugged. As Pierre said, you have to start with an unstructured for the use-def chain computation to be correct.

Initialize some properties

Initialize global hashtables

Initialize the dg

Initialize data structures for all the statements

It recursively initializes the sets of gens, ins and outs for the statements that appear in st. Note that not only call statements are there, but also enclosing statements (e.g, blocks and loops).

Compute genref phase

Compute inout phase and create conflicts

Definition at line 1218 of file chains.c.

1218  {
1219  /* Initialize some properties */
1220  one_trip_do_p = get_bool_property( "ONE_TRIP_DO" );
1221  keep_read_read_dependences_p = get_bool_property( "KEEP_READ_READ_DEPENDENCE" );
1222  mask_effects_p = get_bool_property("CHAINS_MASK_EFFECTS");
1223  dataflow_dependence_only_p = get_bool_property("CHAINS_DATAFLOW_DEPENDENCE_ONLY");
1224 
1225  /* Initialize global hashtables */
1236 
1237  /* Initialize the dg */
1238  dg = make_graph( NIL );
1239 
1240  /* Initialize data structures for all the statements
1241 
1242  It recursively initializes the sets of gens, ins and outs for
1243  the statements that appear in st. Note that not only call statements are
1244  there, but also enclosing statements (e.g, blocks and loops). */
1246 
1247  /* Compute genref phase */
1248  genref_statement( s );
1249 
1250  /* Compute inout phase and create conflicts*/
1251  inout_statement( s );
1252 
1253 #define TABLE_FREE(t) \
1254  {HASH_MAP( k, v, {set_free( (set)v ) ;}, t ) ; hash_table_free(t);}
1255 
1256  TABLE_FREE(Gen);
1257  TABLE_FREE(Ref);
1258  TABLE_FREE(Def_in);
1260  TABLE_FREE(Ref_in);
1262 
1265 
1268 
1269  return ( dg );
1270 }
graph make_graph(list a)
Definition: graph.c:56
#define TABLE_FREE(t)
static hash_table Vertex_statement
Vertex_statement maps each statement to its vertex in the dependency graph.
Definition: chains.c:127
#define INIT_STATEMENT_SIZE
Default sizes for corresponding sets.
Definition: chains.c:85
static bool init_one_statement(statement st)
Initializes the global data structures needed for usedef computation of one statement.
Definition: chains.c:172
static bool dataflow_dependence_only_p
Definition: chains.c:133
static hash_table Def_out
Def_out maps each statement to the statements that are out-coming the statement It's only used for un...
Definition: chains.c:110
static hash_table Ref_in
Ref_in maps each statement to the effects that are in-coming the statement It's only used for unstruc...
Definition: chains.c:115
static hash_table effects2statement
Mapping from effects to the associated statement.
Definition: chains.c:89
static hash_table Def_in
Def_in maps each statement to the statements that are in-coming the statement It's only used for unst...
Definition: chains.c:105
static set current_defs
current_defs is the set of DEF at the current point of the computation
Definition: chains.c:100
static set current_refs
Definition: chains.c:101
static hash_table Gen
Gen maps each statement to the effects it generates.
Definition: chains.c:92
static void inout_statement()
static hash_table Ref
Refs maps each statement to the effects it references.
Definition: chains.c:96
static void genref_statement()
static hash_table Ref_out
Ref_out maps each statement to the effects that are out-coming the statement It's only used for unstr...
Definition: chains.c:120
static bool mask_effects_p
Definition: chains.c:132
static bool keep_read_read_dependences_p
Definition: chains.c:131
static bool one_trip_do_p
Some properties.
Definition: chains.c:130
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
Definition: chains.c:124
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_recurse(start, domain_number, flt, rwt)
Definition: genC.h:283
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
hash_table hash_table_make(hash_key_type key_type, size_t size)
Definition: hash.c:294
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
Definition: hash.c:327
@ hash_pointer
Definition: newgen_hash.h:32
void set_free(set)
Definition: set.c:332
@ set_pointer
Definition: newgen_set.h:44
set set_make(set_type)
Create an empty set of any type but hash_private.
Definition: set.c:102
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362

References current_defs, current_refs, dataflow_dependence_only_p, Def_in, Def_out, dg, effects2statement, Gen, gen_null(), gen_recurse, genref_statement(), get_bool_property(), hash_pointer, hash_table_free(), hash_table_make(), init_one_statement(), INIT_STATEMENT_SIZE, inout_statement(), keep_read_read_dependences_p, make_graph(), mask_effects_p, NIL, one_trip_do_p, Ref, Ref_in, Ref_out, set_free(), set_make(), set_pointer, statement_domain, TABLE_FREE, and Vertex_statement.

Referenced by chains().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: