PIPS
HBDSC.c
Go to the documentation of this file.
1 #ifdef HAVE_CONFIG_H
2  #include "pips_config.h"
3 #endif
4 
5 
6 #include <stdio.h>
7 #include <ctype.h>
8 #include <string.h>
9 #include "boolean.h"
10 #include <stdbool.h>
11 #include <limits.h>
12 
13 #include "genC.h"
14 #include "linear.h"
15 #include "ri.h"
16 #include "effects.h"
17 #include "database.h"
18 #include "misc.h"
19 #include "text.h"
20 #include "text-util.h"
21 #include "ri-util.h"
22 #include "effects-util.h"
23 #include "accel-util.h"
24 
25 #include "effects-generic.h"
26 #include "effects-simple.h"
27 
28 #include "pipsdbm.h"
29 #include "resources.h"
30 #include "control.h"
31 #include "conversion.h"
32 #include "properties.h"
33 #include "semantics.h"
34 #include "transformations.h"
35 
36 #include "effects-convex.h"
37 #include "genC.h"
38 #include "complexity_ri.h"
39 #include "complexity.h"
40 #include "dg.h"
41 
42 /* Instantiation of the dependence graph: */
45 #include "graph.h"
46 #include "ricedg.h"
47 #include "chains.h"
48 #include "task_parallelization.h"
49 
50 /* Global variables */
51 
54 #define MAX_ITER 1
55 
56 persistant_statement_to_cluster stmt_to_cluster;// = persistant_statement_to_cluster_undefined;
57 
58 
60  gen_array_t annotations_s = gen_array_make(0);
63  annotation *item = (annotation *)malloc(sizeof(annotation));
65  item->scheduled = vs->scheduled;
66  item->cluster = vs->cluster;
69  vertex s = successor_vertex(su);
70  statement child = vertex_to_statement(s);
72  }
73  gen_array_addto(annotations_s, (int)statement_ordering(s), item);
74  }
75  return annotations_s;
76 }
77 
78 
79 static void cancel_schedule(gen_array_t annotations_s, list stmts)
80 {
81  FOREACH(STATEMENT, s, stmts){
82  annotation *vs = gen_array_item(annotations_s,(int)statement_ordering(s));
84  item->scheduled = vs->scheduled;
85  item->cluster = vs->cluster;
88  item->edge_cost = vs->edge_cost;
90  }
91  return;
92 }
93 static void cancel_schedule_stmt(gen_array_t annotations_s, statement st)
94 {
96  switch(instruction_tag(inst)){
99  break;
100  case is_instruction_loop:
101  cancel_schedule_stmt(annotations_s, loop_body(statement_loop(st)));
102  break;
103  default:
104  break;
105  }
106  return;
107 }
108 static double critical_path_length(int nbclusters){
109  double max = -1;
110  int cl;
111  for(cl = 0; cl < nbclusters; cl++)
112  {
113  cluster *cl_s = gen_array_item(clusters, cl);
114  double time = cl_s->time;
115  if(time > max)
116  max = time;
117  }
118  return max;
119 }
120 
121 /*reset to zero for each new sequence to handle*/
122 static void initialization_clusters(bool first_p)
123 {
124  int i;
125  cluster *cl_s;
126  for(i=0;i<NBCLUSTERS;i++){
127  if(first_p)
128  cl_s = (cluster *)malloc(sizeof(cluster));
129  else
130  cl_s = gen_array_item(clusters, i);
131  cl_s->time = 0;
132  cl_s->data = NIL;
133  gen_array_addto(clusters, i, cl_s);
134  }
135  return;
136 }
137 
138 
139 
140 
141 
142 
143 /*
144  *rebuild cluster_stages by forming a list of list of statements
145  */
147  list K = NIL, cluster_stages = NIL;
148  int i;
149  FOREACH(LIST, stage, stages) {
150  K=NIL;
151  for(i = 0; i < NBCLUSTERS; i++){
152  list list_stmts = NIL;
153  FOREACH(STATEMENT, st, stage) {
157  list_stmts = CONS(STATEMENT, st, list_stmts);
158  }
159  }
160  /* we suppose that we have only one return statement at the
161  end of the module :( */
162  if(return_statement_p(st))
163  return_st = st;
164  }
165  if(list_stmts != NIL)
166  K = CONS(LIST, list_stmts, K);
167  }
168  if(K == NIL){
169  list list_stmts = NIL;
170  FOREACH(STATEMENT, st, stage) {
174  list_stmts = CONS(STATEMENT, st, list_stmts);
175  }
176  else
177  list_stmts = CONS(STATEMENT, st, list_stmts);
178  }
179  if(return_statement_p(st))
180  return_st = st;
181  }
182  if(list_stmts != NIL){
183  K = CONS(LIST, list_stmts, K);
184  }
185  }
186  if(K != NIL)
187  cluster_stages = CONS(LIST, gen_nreverse(K), cluster_stages);
188  }
189  return cluster_stages;
190 }
191 
193 {
194  list K = NIL; uint i;
195  list cluster_stages = NIL;
196  list vertices = graph_vertices(kdg);
198  for(i = 0;i<gen_length(vertices);i++){
199  gen_array_addto(I, i, 0);
200  }
202  FOREACH(VERTEX, v, vertices) {
203  statement parent = vertex_to_statement(v);
204  if(statement_equal_p(st,parent)){
205  FOREACH(SUCCESSOR, su, (vertex_successors(v))) {
206  vertex w = successor_vertex(su);
207  statement child = vertex_to_statement(w);
208  gen_array_addto(I, (int)statement_ordering(child), gen_array_item(I, (int)statement_ordering(child)) + 1);
209  }
210  }
211  }
212  }
214  if(gen_array_item(I, statement_ordering(st)) == 0)
215  K = CONS(STATEMENT, st, K);
216  }
217  list L = gen_copy_seq(K);
218  cluster_stages = CONS(LIST, L, cluster_stages);
219  bool insert_p = false;
220  while(K != NIL){
221  statement st = STATEMENT(CAR(gen_last(K)));
222  gen_remove_once(&K, st);
223  FOREACH(VERTEX, pre, vertices) {
224  statement parent = vertex_to_statement(pre);
225  if(statement_equal_p(parent, st)){
226  FOREACH(SUCCESSOR, su, (vertex_successors(pre))) {
227  vertex v = successor_vertex(su);
228  statement child = vertex_to_statement(v);
229  gen_array_addto(I, (int)statement_ordering(child), gen_array_item(I, (int)statement_ordering(child)) - 1);
230  if(gen_array_item(I, statement_ordering(child)) == 0 && gen_occurences(child, K) == 0) {
231  K = CONS(STATEMENT, child, K);
232  insert_p = true;
233  }
234  }
235  break;
236  }
237  }
238  list M = NIL;
239  bool ins_p = true,found_p=false;
240  FOREACH(STATEMENT, stmt, K){
241  found_p = false;
242  FOREACH(STATEMENT, stmtl, L){
243  if(statement_equal_p(stmt,stmtl))
244  found_p = true;
245  }
246  if(!found_p)
247  M = CONS(STATEMENT,stmt,M);
248  else{
249  ins_p = false;
250  found_p = false;
251  }
252  }
253  if( ins_p && gen_length(M) > 0 && insert_p){
254  cluster_stages = CONS(LIST, M, cluster_stages);
255  insert_p = false;
256  L = gen_copy_seq(K);
257  }
258  }
259  gen_array_free(I);
260  return rebuild_topological_sort(cluster_stages);
261 }
262 
263 
264 static double transfer_cost(statement s, int nbclusters){
265  if(nbclusters == 0 || !get_bool_property("BDSC_DISTRIBUTED_MEMORY"))
266  return 0;
269  double size = size_of_regions(l_in) + size_of_regions(l_out);
270  return size;
271 }
272 
273 
274 static void hierarchical_schedule_step(statement stmt, int P, int M, bool dsc_p)
275 {
276  list cluster_stages = topological_sort(stmt);
277  int nbclustersL, nbclusters, nbclusters_s;
278  double task_time, task_time_s;
279  FOREACH(LIST, cluster_stage, cluster_stages) {
280  int stage_mod = gen_length(cluster_stage);
281  int Ps = P - stage_mod;// + 1;//use current processor
282  FOREACH(LIST, L, cluster_stage){
283  nbclustersL = 0;
284  FOREACH(statement, st, L){
285  if(Ps <= 0){
286  pips_user_warning("NBCLUSTERS is not sufficient to handle nested parts in statement_ordering = %d\n", statement_ordering(st));
287  }
288  else{
289  if(!get_bool_property("COSTLY_TASKS_ONLY") | costly_task(st)){
291  nbclusters = item->nbclusters;
292  task_time = item->task_time;
293  gen_array_t annotations_s = schedule_failsafe();
294  nbclusters_s = hierarchical_schedule(st, (item->cluster == -1)?0:item->cluster, Ps, M, dsc_p);
296  task_time_s = item->task_time;
297  if(nbclusters_s < nbclusters || task_time + transfer_cost(st, nbclusters) < task_time_s + transfer_cost(st, nbclusters_s)){
298  item->nbclusters = nbclusters;
299  cancel_schedule_stmt(annotations_s,st);
300  }
301  nbclustersL = nbclustersL > nbclusters? nbclustersL : nbclusters;
302  gen_array_free(annotations_s);
303  }
304  }
305  }
306  Ps = Ps - nbclustersL;
307  }
308  }
309  return;
310 }
311 int hierarchical_schedule(statement stmt, int k, int P, int M, bool dsc_p)
312 {
313  int nbclusters = 0, nbcl; double cpl;
314  if(!get_bool_property("COSTLY_TASKS_ONLY") | costly_task(stmt)){ //granularity management
317  switch(instruction_tag(inst))
318  {
319  case is_instruction_block:{
321  if(gen_length(sequence_statements(seq))>0){
322  gen_array_t annotations_i = schedule_failsafe(), annotations_s;
323  if(!dsc_p)
324  nbcl = BDSC(seq, P, M, statement_ordering(stmt));
325  else{
326  nbcl = DSC(seq, statement_ordering(stmt));
327  NBCLUSTERS = NBCLUSTERS > nbcl ? NBCLUSTERS:nbcl;
328  }
329  double cpl1 = critical_path_length(nbcl);
330  int iter = 0;
331 
332  do{
333  hierarchical_schedule_step(stmt, P, M, dsc_p);
334  nbclusters = nbcl;
335  cpl = cpl1;
336  annotations_s = schedule_failsafe();
337  cancel_schedule(annotations_i, sequence_statements(seq));
338  if(!dsc_p){
339  nbcl = BDSC(seq, P, M, statement_ordering(stmt));
340  }
341  else{
342  nbcl = DSC(seq, statement_ordering(stmt));
343  NBCLUSTERS = NBCLUSTERS > nbcl ? NBCLUSTERS:nbcl;
344  }
345  cpl1 = critical_path_length(nbcl);
346  if(nbcl == 0){
347  fprintf (stderr, "Unable to schedule with NBCLUSTERS equal to %d\n",P);
348  exit (EXIT_FAILURE);
349  }
350  if(nbcl == -1){
351  fprintf (stderr, "Unable to schedule with MEMORY SIZE equal to %d\n",M);
352  exit (EXIT_FAILURE);
353  }
354  iter ++;
355  } while(cpl1 < cpl && nbcl <= nbclusters && iter <= MAX_ITER);
356  cancel_schedule(annotations_s, sequence_statements(seq));
357  item->task_time = cpl;
358  item->data = NIL;
359  gen_array_free(annotations_i);
360  gen_array_free(annotations_s);
361  }
362  break;
363  }
364  case is_instruction_test : {
365  test t = instruction_test(inst);
366  int nbt = hierarchical_schedule(test_true(t), k, P, M, dsc_p);
367  int nbf = hierarchical_schedule(test_false(t), k, P, M, dsc_p);
368  nbclusters = nbt > nbf? nbt: nbf;
369  break;
370  }
371  case is_instruction_loop :{
372  loop l = statement_loop(stmt);
373  statement body = loop_body(l);
374  nbclusters = hierarchical_schedule(body, k, P, M, dsc_p);
375  break;
376  }
377  case is_instruction_forloop :{
379  statement body = forloop_body(l);
380  nbclusters = hierarchical_schedule(body, k, P, M, dsc_p);
381  break;
382  }
383  default:
384  break;
385  }
386  item->nbclusters = nbclusters;
388  }
389  return nbclusters;
390 }
391 
392 /*The main function for performing the hierarchical scheduling
393  *(scheduled SDG) using BDSC and generating the graph (unstructured)
394  * BDSC-based top-down hierarchical scheduling
395 */
397 {
398  statement module_stat;
399  string tg_name = NULL;
400  FILE *ftg;
401  if (!get_bool_property("COMPLEXITY_EARLY_EVALUATION"))
402  set_bool_property("COMPLEXITY_EARLY_EVALUATION", true);
403  module_stat = (statement)db_get_memory_resource(DBR_CODE, module_name, true);
404  set_ordering_to_statement(module_stat);
406  set_current_module_statement(module_stat);
409  db_get_memory_resource(DBR_TRANSFORMERS, module_name, true));
410  /* The proper effect to detect the I/O operations: */
415  db_get_memory_resource(DBR_REGIONS, module_name, true));
420  kdg = (graph) db_get_memory_resource (DBR_SDG, module_name, true );
421  /*Complexities (task processing time)*/
423  /*Properties to set the parameters of BDSC*/
424  NBCLUSTERS = get_int_property("BDSC_NB_CLUSTERS");
425  MEMORY_SIZE = get_int_property("BDSC_MEMORY_SIZE");
426  INSTRUMENTED_FILE = strdup(get_string_property("BDSC_INSTRUMENTED_FILE"));
427 
428  /*cost model generation */
432  if(strlen(INSTRUMENTED_FILE) == 0)
434  else
437  hierarchical_schedule(module_stat, 0, NBCLUSTERS, MEMORY_SIZE, false);
439  "/",module_name,"/",module_name, "_scheduled_sdg.dot", NULL));
440  ftg = safe_fopen(tg_name, "w");
441  fprintf( ftg, "digraph {\n compound=true;ratio=fill; node[fontsize=24,fontname=\"Courier\",labelloc=\"t\"];nodesep=.05;\n" );
442  print_SDGs(module_stat, kdg, ftg, annotations);
443  fprintf( ftg, "\n}\n" );
444  safe_fclose(ftg, tg_name);
445  free(tg_name);
446 
447  DB_PUT_MEMORY_RESOURCE(DBR_SDG, module_name, (char*) kdg);
449  DB_PUT_MEMORY_RESOURCE(DBR_SCHEDULE, module_name, (char*) stmt_to_cluster);
465  return true;
466 }
467 
468 
469 
470 /*The main function for performing the hierarchical scheduling
471  *(scheduled SDG) using DSC and generating SPIRE
472 */
474 {
475  statement module_stat;
476  if (!get_bool_property("COMPLEXITY_EARLY_EVALUATION"))
477  set_bool_property("COMPLEXITY_EARLY_EVALUATION", true);
478  module_stat = (statement)db_get_memory_resource(DBR_CODE, module_name, true);
479  set_ordering_to_statement(module_stat);
481  set_current_module_statement(module_stat);
484  db_get_memory_resource(DBR_TRANSFORMERS, module_name, true));
485  /* The proper effect to detect the I/O operations: */
490  db_get_memory_resource(DBR_REGIONS, module_name, true));
495 
496  kdg = (graph) db_get_memory_resource (DBR_DG, module_name, true );
497 
498  /*Complexities (task processing time)*/
500 
501  /*Properties to set the parameters of BDSC*/
502  NBCLUSTERS = 1;//INT_MAX;
503  MEMORY_SIZE = -1;
504  INSTRUMENTED_FILE = strdup(get_string_property("BDSC_INSTRUMENTED_FILE"));
505  /*cost model generation */
508  if(sizeof(INSTRUMENTED_FILE) == 8)
510  else
512 
514  /*DSC-based top-down hierarchical scheduling*/
515  hierarchical_schedule(module_stat, 0, NBCLUSTERS, MEMORY_SIZE, true);
516  /* Reorder the module, because new statements have been generated. */
517  module_reorder(module_stat);
518  DB_PUT_MEMORY_RESOURCE(DBR_CODE, module_name, module_stat);
534  return true;
535 }
536 
int DSC(sequence seq, int ordering)
Definition: BDSC.c:623
int BDSC(sequence seq, int P, int M, int ordering)
Definition: BDSC.c:535
void allocate_task_to_cluster(statement ready_st, int cl_p, int order)
BDSC.c.
Definition: BDSC.c:100
bool dsc_code_parallelization(char *module_name)
he main function for performing the hierarchical scheduling (scheduled SDG) using DSC and generating ...
Definition: HBDSC.c:473
int hierarchical_schedule(statement stmt, int k, int P, int M, bool dsc_p)
Definition: HBDSC.c:311
static gen_array_t schedule_failsafe()
Definition: HBDSC.c:59
static double critical_path_length(int nbclusters)
Definition: HBDSC.c:108
static void cancel_schedule_stmt(gen_array_t annotations_s, statement st)
Definition: HBDSC.c:93
static list rebuild_topological_sort(list stages)
Definition: HBDSC.c:146
static void initialization_clusters(bool first_p)
eset to zero for each new sequence to handle
Definition: HBDSC.c:122
dg_vertex_label vertex_label
Definition: HBDSC.c:44
list topological_sort(statement stmt)
Definition: HBDSC.c:192
persistant_statement_to_cluster stmt_to_cluster
Definition: HBDSC.c:56
graph kdg
Global variables.
Definition: HBDSC.c:52
dg_arc_label arc_label
Instantiation of the dependence graph:
Definition: HBDSC.c:43
graph ddg
Definition: HBDSC.c:52
static void cancel_schedule(gen_array_t annotations_s, list stmts)
Definition: HBDSC.c:79
#define MAX_ITER
Definition: HBDSC.c:54
static double transfer_cost(statement s, int nbclusters)
Definition: HBDSC.c:264
statement return_st
Definition: HBDSC.c:53
static void hierarchical_schedule_step(statement stmt, int P, int M, bool dsc_p)
Definition: HBDSC.c:274
bool hbdsc_parallelization(char *module_name)
he main function for performing the hierarchical scheduling (scheduled SDG) using BDSC and generating...
Definition: HBDSC.c:396
int get_int_property(const string)
void update_persistant_statement_to_cluster(persistant_statement_to_cluster f, intptr_t k, intptr_t v)
Definition: ri.c:1543
bool bound_persistant_statement_to_cluster_p(persistant_statement_to_cluster f, intptr_t k)
Definition: ri.c:1552
intptr_t apply_persistant_statement_to_cluster(persistant_statement_to_cluster f, intptr_t k)
Definition: ri.c:1540
persistant_statement_to_cluster make_persistant_statement_to_cluster(void)
Definition: ri.c:1537
int MEMORY_SIZE
Definition: SDG.c:58
void print_SDGs(statement stmt, graph tg, FILE *ftg, gen_array_t annotations)
Definition: SDG.c:520
gen_array_t clusters
Definition: SDG.c:63
string INSTRUMENTED_FILE
Definition: SDG.c:59
int NBCLUSTERS
parameters of BDSC, to be recovered using pips properties
Definition: SDG.c:57
gen_array_t annotations
Global variables.
Definition: SDG.c:62
void gen_array_full_free(gen_array_t a)
Definition: array.c:77
gen_array_t gen_array_make(size_t size)
declarations...
Definition: array.c:40
void gen_array_addto(gen_array_t a, size_t i, void *what)
Definition: array.c:87
void * gen_array_item(const gen_array_t a, size_t i)
Definition: array.c:143
void gen_array_free(gen_array_t a)
Definition: array.c:70
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
void reset_complexity_map(void)
void set_complexity_map(statement_mapping)
void parse_instrumented_file(char *file_name, graph dg, gen_array_t annotations)
Definition: cost_model.c:296
void initialization(graph dg, gen_array_t annotations)
Definition: cost_model.c:267
static double task_time(statement s)
Definition: cost_model.c:134
double size_of_regions(list l_data)
Definition: cost_model.c:115
bool costly_task(statement st)
cost_model.c
Definition: cost_model.c:52
#define max(a, b)
void set_methods_for_convex_effects(void)
methods.c
Definition: methods.c:235
list regions_dup(list)
void init_convex_rw_prettyprint(const char *)
void set_rw_effects(statement_effects)
void reset_out_effects(void)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
void set_out_effects(statement_effects)
void set_in_effects(statement_effects)
void reset_in_effects(void)
list load_statement_out_regions(statement)
void generic_effects_reset_all_methods(void)
list load_statement_in_regions(statement)
void reset_cumulated_rw_effects(void)
void reset_rw_effects(void)
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
FILE * safe_fopen(const char *filename, const char *what)
Definition: file.c:67
char * get_string_property(const char *)
int safe_fclose(FILE *stream, const char *filename)
Definition: file.c:77
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define LIST(x)
Definition: genC.h:93
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
void * malloc(YYSIZE_T)
void free(void *)
#define successor_vertex(x)
Definition: graph.h:118
struct _newgen_struct_graph_ * graph
Definition: graph.h:31
#define vertex_successors(x)
Definition: graph.h:154
#define SUCCESSOR(x)
SUCCESSOR.
Definition: graph.h:86
#define graph_vertices(x)
Definition: graph.h:82
#define VERTEX(x)
VERTEX.
Definition: graph.h:122
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
void gen_remove_once(list *pl, const void *o)
Remove the first occurence of o in list pl:
Definition: list.c:691
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
list gen_copy_seq(list l)
Copy a list structure.
Definition: list.c:501
size_t gen_length(const list l)
Definition: list.c:150
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
list gen_last(list l)
Return the last element of a list.
Definition: list.c:578
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
int gen_occurences(const void *vo, const list l)
count occurences of vo in l
Definition: list.c:746
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
Definition: pipsdbm-local.h:66
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
Definition: statement.c:1328
loop statement_loop(statement)
Get the loop of a statement.
Definition: statement.c:1374
forloop statement_forloop(statement)
Get the forloop of a statement.
Definition: statement.c:1426
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
Definition: statement.c:172
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
Definition: statement.c:224
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
Definition: util.c:45
#define EXIT_FAILURE
Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xarg...
Definition: stdlib.in.h:108
#define pips_user_warning
Definition: misc-local.h:146
#define exit(code)
Definition: misc-local.h:54
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
Definition: ordering.c:172
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
Definition: ordering.c:185
string db_get_current_workspace_directory(void)
Definition: workspace.c:96
static bool statement_equal_p(statement s1, statement s2)
Definition: unstructured.c:55
void set_bool_property(const char *, bool)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
#define is_instruction_block
soft block->sequence transition
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
#define loop_body(x)
Definition: ri.h:1644
#define statement_ordering(x)
Definition: ri.h:2454
#define test_false(x)
Definition: ri.h:2837
@ is_instruction_test
Definition: ri.h:1470
@ is_instruction_forloop
Definition: ri.h:1477
@ is_instruction_loop
Definition: ri.h:1471
#define instruction_tag(x)
Definition: ri.h:1511
#define test_true(x)
Definition: ri.h:2835
#define sequence_statements(x)
Definition: ri.h:2360
#define statement_instruction(x)
Definition: ri.h:2458
#define instruction_test(x)
Definition: ri.h:1517
#define forloop_body(x)
Definition: ri.h:1372
#define statement_undefined
Definition: ri.h:2419
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
Definition: mappings.c:624
void set_transformer_map(statement_mapping)
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
void reset_transformer_map(void)
Definition: pip__tab.h:30
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: statement.c:54
void free_value_mappings(void)
Normal call to free the mappings.
Definition: value.c:1212
A gen_chunk is used to store every object.
Definition: genC.h:58