PIPS
eliminate_original_variables.c
Go to the documentation of this file.
1 /*
2 
3  $Id$
4 
5  Copyright 1989-2017 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 
28 
29 /**
30  * Pass: ELIMINATE_ORIGINAL_VARIABLES
31  * Debug mode: MPI_GENERATION_DEBUG_LEVEL
32  * Properties used:
33  * - MPI_NBR_CLUSTER
34  * - MPI_DUPLICATE_VARIABLE_PREFIX
35  * Resource needed:
36  * - DBR_TASK
37  *
38  */
39 
40 #include <stdlib.h>
41 #include <stdio.h>
42 
43 #include "genC.h"
44 #include "linear.h"
45 
46 #include "resources.h"
47 #include "database.h"
48 #include "ri.h"
49 #include "ri-util.h"
50 #include "effects.h"
51 #include "effects-util.h"
52 #include "pipsdbm.h"
53 
54 #include "effects-generic.h"
55 #include "effects-simple.h"
56 #include "control.h"
57 
58 #include "misc.h"
59 
60 #include "properties.h"
61 
62 #include "text-util.h"
63 
64 #include "task_parallelization.h"
65 #include "prettyprint.h"
66 static int compteur_stack_task = 0;
67 
68 /*******************************************************
69  * CONTEXT MANAGEMENT : BEGIN *
70  *******************************************************/
71 
72 /**
73  * ctx_eov:
74  * - stack_task
75  * stack_task is a stack of task
76  * each time we enter a statement,
77  * we add task corresponding to the statement into stack_task
78  * each time we leave a statement,
79  * we remove task corresponding to this statement (the last task added)
80  * we could access to the current task with function eov_current_task
81  * - hash_entity_to_eliminate
82  * hash_entity_to_eliminate is a hash table
83  * with key an variable entity, that we will have to eliminate/replace
84  * with value an array of entity that correspond to the entity that will replace the key
85  * the array size correspond to the number of cluster asked by the user
86  * (see property with #define MPI_GENERATION_NBR_CLUSTER)
87  * structure of hash_entity_to_eliminate
88  * entity_var_key0 -> 0 -> entity_new_var0_0
89  * 1 -> entity_new_var0_1
90  * 2 -> entity_new_var0_2
91  * 3 -> entity_new_var0_3
92  * ...
93  * entity_var_key1 -> 0 -> entity_new_var1_0
94  * 1 -> entity_new_var1_1
95  * 2 -> entity_new_var1_2
96  * 3 -> entity_new_var1_3
97  * ...
98  * ...
99  * - nbr_cluster
100  * nbr_cluster is the number of cluster
101  * it must be different than 0
102  * it's stocked in ctx to not always have to get it from properties
103  * - prefix_new_entity
104  * prefix_new_entity is a string corresponding to the prefix of the new entity
105  * it's stocked in ctx to not always have to get it from properties
106  */
107 typedef struct ctx_eov {
115 
116 static void print_ctx(const ctx_eov_t ctx) {
117  fprintf(stderr, "current_task:\n");
119  fprintf(stderr, "entities to eliminate:\n");
122  fprintf(stderr, "\n");
123  }
124  fprintf(stderr, "nbr_cluster=%d", ctx.nbr_cluster);
125  fprintf(stderr, "current_cluster=%d", ctx.current_cluster);
126 }
127 
128 static ctx_eov_t eov_make_ctx(int nbr_cluster, string prefix_new_entity) {
129  pips_assert("number of cluster can't be equal to 0", nbr_cluster != 0);
130  ctx_eov_t ctx;
131  ctx.stack_task = stack_make(task_domain, 0, 0);
134  ctx.nbr_cluster = nbr_cluster;
135  ctx.current_cluster = -2;
136  ctx.prefix_new_entity = prefix_new_entity;
137  return ctx;
138 }
139 static void eov_free_ctx(ctx_eov_t * ctx) {
140  pips_assert("stack of task not empty", stack_size(ctx->stack_task) == 0);
141 // pips_assert("current_task have to be undefined", ctx->current_task == task_undefined);
143  gen_array_free(a);
144  }
146 }
147 
148 static void eov_stack_task_push_task(ctx_eov_t * ctx, task t) {
150  ctx->current_task = t;
152  stack_push((void *)t, ctx->stack_task);
153 }
156  stack s = ctx->stack_task;
157  task pop = (task) stack_pop(s);
158  if (stack_empty_p(s)) {
160  ctx->current_cluster = -2;
161  }
162  else {
163  ctx->current_task = (task) stack_head(ctx->stack_task);
165  }
166  return pop;
167 }
168 //static task eov_current_task(ctx_eov_t * ctx) {
169 // return ctx->current_task;
170 //}
171 
173  int nbr_cluster = ctx->nbr_cluster;
174  string prefix = ctx->prefix_new_entity;
175 
176  gen_array_t array = gen_array_make(nbr_cluster);
177 
178  string name = "";
179  entity new_entity = entity_undefined;
180 
181  for (int i=0; i<nbr_cluster; i++) {
182  name = concatenate(
185  prefix, entity_user_name(e), "_", i2a(i),
186  NULL);
187 
188  if ((new_entity = gen_find_tabulated(name, entity_domain)) != entity_undefined) {
189  gen_array_addto(array, i, new_entity);
190  }
191  else {
192  pips_internal_error("The variable with name %s doesn't exist.\n"
193  " PIPS can't generate the copy for this variable.\n"
194  " Try to launch pass VARIABLE_REPLICATION.\n", name);
195  }
196  name = "";
197  new_entity = entity_undefined;
198  }
199 
201 }
204 }
205 /**
206  * call entity_to_eliminate_p before eov_get_replaced_enity
207  * check on_cluster <= ctx->nbr_cluster before eov_get_replaced_enity
208  */
209 static entity eov_get_replaced_enity(ctx_eov_t * ctx, entity e, int on_cluster) {
210  //since it was only local call and I know what I do this assert was not needed
211  // pips_assert("entity don't have to be eliminate", entity_to_eliminate_p(ctx, e));
212  //since it was only local call and I know what I do this assert was not needed
213  // pips_assert("entity asked out of bounded", on_cluster <= ctx->nbr_cluster);
214 
216  entity new_entity = gen_array_item(array, on_cluster);
217 
218  return new_entity;
219 }
220 static void eov_set_current_cluster(ctx_eov_t * ctx, int on_cluster) {
221  ctx->current_cluster = on_cluster;
222 }
224  return ctx->current_cluster;
225 }
226 /*******************************************************
227  * CONTEXT MANAGEMENT : END *
228  *******************************************************/
229 
230 
232 
233 /*******************************************************
234  * PREPARE THE CONTEXT: BEGIN *
235  *******************************************************/
236 /**
237  * The function in this section modify the context to know
238  * - where we are
239  * - on which cluster the statement is executed
240  * - which variables will be replaced
241  * - in which expression/loop the variable are replaced
242  */
243 
244 /**
245  * update current_task
246  * update list of entity_variable to eliminate
247  * \param st current statement
248  * \param ctx context to uppdate
249  */
250 static bool prepare_context(statement st, ctx_eov_t *ctx) {
251  ifdebug(2) {
252  pips_debug(2, "prepare_context\n");
253  print_statement(st);
254  }
255  //TODO have to do something for return statement... (on a previous pass?)
257  return false;
258  }
260 
261  // update the current task to work on
262  eov_stack_task_push_task(ctx, t);
263  pips_debug(4, "current_task modified:%s\n", task_to_string(t, false));
264 
265  // update the eliminated variable
266  // Check if it's a declaration statement
267  // if so maybe have to add entity to the list of entity to eliminate
268  if (declaration_statement_p(st)) {
269  // we don't have to eliminate variable on_cluster generated
272  if (strncasecmp(entity_user_name(var), ctx->prefix_new_entity, strlen(ctx->prefix_new_entity)) != 0
273  && !entity_in_list_p(var, task_private_data(t))) {
274  //add entity to the list of entity to eliminate
275  eov_add_entity_to_eliminate(ctx, var);
276  }
277  }
278  ifdebug(4) {
280  if (strncasecmp(entity_user_name(var), ctx->prefix_new_entity, strlen(ctx->prefix_new_entity))) {
281  pips_debug(5, "add entity to entity_to_eliminate:\n");
283  }
284  }
285  }
286  }
287  // for variable on_cluster generated, check if it's an dynamic declaration of an array
288  // and so modify the size of the array with the right new size (the old variable by the new one)
289  else {
291  if (strncasecmp(entity_user_name(var), ctx->prefix_new_entity, strlen(ctx->prefix_new_entity)) == 0
292  && !entity_in_list_p(var, task_private_data(t))) {
293  //Modify type dependency declaration
294  //a1[size] -> a1[size1]
295  //TODO : modify type dependency
296  variable vvar = type_variable(entity_type(var));
297  if (variable_entity_dimension(var)>0) {
298  //if (variable_dimension_number(vvar)) {
299  string scurrent_cluster = strrchr(entity_user_name(var),'_');
300  if (scurrent_cluster != NULL) {
301  int current_cluster = atoi(scurrent_cluster+1);
302  eov_set_current_cluster(ctx, current_cluster);
304  }
305  }
306  }
307  }
308  }
309  }
310 
311  ifdebug(8) {
312  print_ctx(*ctx);
313  }
314  return true;
315 }
316 
317 static void release_context(__attribute__((unused)) statement st, ctx_eov_t *ctx) {
318  pips_debug(2, "release_context\n");
320  ifdebug(8) {
321  print_ctx(*ctx);
322  }
323 }
324 
325 /*******************************************************
326  * PREPARE THE CONTEXT: END *
327  *******************************************************/
328 
329 /**
330  * have to separate loop from reference because
331  * index and locals of loop can also be entity variables
332  * If it's needed, variable present in list of variable to eliminate,
333  * substitute the variable entity present in loop l
334  * by the corresponding one on the corresponding cluster.
335  * \param l loop on which the variable will be substituted
336  * \param ctx context that content the cluster in which the reference will be executed
337  * list on var to eliminate
338  * correspondence between variable and new_variable
339  */
340 static bool loop_replace_variable(loop l, ctx_eov_t *ctx) {
341  ifdebug(3) {
342  pips_debug(3, "work on loop\n");
343  printf_loop(l);
344  ifdebug(8) {
345  print_ctx(*ctx);
346  }
347  }
348  //task t = eov_current_task(ctx);
349  //int on_cluster = task_on_cluster(t);
350  int on_cluster = eov_get_current_cluster(ctx);
351  if (on_cluster>=ctx->nbr_cluster) {
352  pips_user_error("the cluster asked is out of bounded, on_cluster=%%d", on_cluster);
353  return true;
354  }
355 
356  entity idx = loop_index(l);
357  if (eov_entity_to_eliminate_p(ctx, idx)) {
358  entity new_idx = eov_get_replaced_enity(ctx, idx, on_cluster);
359  loop_index(l) = new_idx;
360  }
361 
362  list new_locs = NIL;
363  FOREACH(ENTITY, ent, loop_locals(l)) {
364  if (eov_entity_to_eliminate_p(ctx, ent)) {
365  entity new_ent = eov_get_replaced_enity(ctx, ent, on_cluster);
366  new_locs = gen_nconc(new_locs, CONS(ENTITY,new_ent,NIL));
367  }
368  else {
369  new_locs = gen_nconc(new_locs, CONS(ENTITY,ent,NIL));
370  }
371  }
372 
373  return true;
374 }
375 
376 /**
377  * if it's needed, variable present in list of variable to eliminate,
378  * substitute the variable entity present in reference r
379  * by the corresponding one on the corresponding cluster.
380  * \param r reference on which the variable will be substituted
381  * \param ctx context that content the cluster in which the reference will be executed
382  * list on var to eliminate
383  * correspondence between variable and new_variable
384  */
386  ifdebug(3) {
387  pips_debug(3, "work on reference\n");
388  print_reference(r);
389  ifdebug(8) {
390  print_ctx(*ctx);
391  }
392  }
393  //task t = eov_current_task(ctx);
394  //int on_cluster = task_on_cluster(t);
395  int on_cluster = eov_get_current_cluster(ctx);
396  entity var = reference_variable(r);
397 
398  //Test if we want to substitute the variable
399  if (eov_entity_to_eliminate_p(ctx, var)) {
400  if (on_cluster==-1) {
402  pips_user_error("statement %p in all cluster. This case may never happens.\n%s\n", st, text_to_string(statement_to_text(st)));
403  }
404  else if (on_cluster < ctx->nbr_cluster) {
405  entity new_idx = eov_get_replaced_enity(ctx, var, on_cluster);
406  reference_variable(r) = new_idx;
407  }
408  else {
409  pips_user_error("the cluster asked is out of bounded, on_cluster=%%d", on_cluster);
410  }
411  }
412 }
413 
414 /**
415  * expression_substitute_variable will substitute variable entity that have to be substitute
416  * In fact we can not recurse with this domain but directly recurse with reference_domain
417  * It was done like this because at the beginning,
418  * it was expected to use substitute_entity_in_expression
419  * But a custom substitution is more efficient.
420  * \return false since we make another gen_context_recurse inside expression_substitute_variable
421  * the filter always return false
422  */
424  ifdebug(3) {
425  pips_debug(3, "work on expression\n");
426  print_expression(e);
427  ifdebug(8) {
428  print_ctx(*ctx);
429  }
430  }
431 
432  //We don't use substitute_entity_in_expression for performance
433  // to use substitute_entity_in_expression we will have to parse 2 times the expression
434  // 1 time to find the entity to substitute and make some filter to not have duplicated
435  // 1 time with substitute_entity_in_expression to make the substitution
437 
438  return false;
439 }
440 
441 
443  int nbr_cluster = get_int_property(MPI_GENERATION_NBR_CLUSTER);
445  ctx_eov_t ctx = eov_make_ctx(nbr_cluster, prefix);
446 
447  ifdebug(1) {
448  pips_debug(1, "begin\n");
449  print_ctx(ctx);
450  }
451 
452  // The domain was parse
454  module_statement, &ctx,
455  // to know in which task we are
457  // do the work
458  // have to distinguish loop since it can have variable entity not encapsulated inside an expression...
461  NULL);
462 
463  ifdebug(1) {
464  pips_debug(1, "end\n");
465  print_ctx(ctx);
466  }
467  eov_free_ctx(&ctx);
468  return true;
469 }
470 
471 /**
472  * PIPS pass
473  */
475  entity module;
477  bool good_result_p = true;
478 
479  debug_on("MPI_GENERATION_DEBUG_LEVEL");
480  pips_debug(1, "begin\n");
481 
482  //-- configure environment --//
485 
487  db_get_memory_resource(DBR_CODE, module_name, true) );
489 
490  pips_assert("Statement should be OK before...",
492 
494 
495  //-- get dependencies --//
497  db_get_memory_resource(DBR_TASK, module_name, true));
498 
499 
500  //-- Make the job -- //
502 // gen_recurse(module_statement, statement_domain, gen_true, eliminate_in_statement);
503 
504 
505  /* Reorder the module, because some statements have been added.
506  Well, the order on the remaining statements should be the same,
507  but by reordering the statements, the number are consecutive. Just
508  for pretty print... :-) */
510 
511  pips_assert("Statement should be OK after...",
513 
514  //-- Save modified code to database --//
516 
521 
522  pips_debug(1, "end\n");
523  debug_off();
524 
525  return (good_result_p);
526 }
527 
528 
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
Definition: 3dnow.h:3
int get_int_property(const string)
bool statement_consistent_p(statement p)
Definition: ri.c:2195
static statement module_statement
Definition: alias_check.c:125
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
static void eov_add_entity_to_eliminate(ctx_eov_t *ctx, entity e)
static int compteur_stack_task
Pass: ELIMINATE_ORIGINAL_VARIABLES Debug mode: MPI_GENERATION_DEBUG_LEVEL Properties used:
static void subtsitute_variable_in_reference(reference r, ctx_eov_t *ctx)
if it's needed, variable present in list of variable to eliminate, substitute the variable entity pre...
static ctx_eov_t eov_make_ctx(int nbr_cluster, string prefix_new_entity)
static bool expression_substitute_variable(expression e, ctx_eov_t *ctx)
expression_substitute_variable will substitute variable entity that have to be substitute In fact we ...
static bool prepare_context(statement st, ctx_eov_t *ctx)
The function in this section modify the context to know.
static void release_context(__attribute__((unused)) statement st, ctx_eov_t *ctx)
struct ctx_eov ctx_eov_t
ctx_eov:
static bool make_eliminate_original_variables(__attribute__((unused)) entity module, statement module_statement)
static void print_ctx(const ctx_eov_t ctx)
static task eov_stack_task_pop_task(ctx_eov_t *ctx)
static int eov_get_current_cluster(ctx_eov_t *ctx)
static void eov_set_current_cluster(ctx_eov_t *ctx, int on_cluster)
static entity eov_get_replaced_enity(ctx_eov_t *ctx, entity e, int on_cluster)
call entity_to_eliminate_p before eov_get_replaced_enity check on_cluster <= ctx->nbr_cluster before ...
static void eov_stack_task_push_task(ctx_eov_t *ctx, task t)
static bool eov_entity_to_eliminate_p(ctx_eov_t *ctx, entity e)
static void eov_free_ctx(ctx_eov_t *ctx)
bool eliminate_original_variables(const char *module_name)
PIPS pass.
static bool loop_replace_variable(loop l, ctx_eov_t *ctx)
have to separate loop from reference because index and locals of loop can also be entity variables If...
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
char * get_string_property(const char *)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
Definition: genC.h:285
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
statement get_current_module_statement(void)
Get the current module statement.
Definition: static.c:208
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
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
Definition: genClib.c:3373
gen_chunk * gen_get_ancestor(int, const void *)
return the first ancestor object found of the given type.
Definition: genClib.c:3560
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
Definition: genClib.c:2785
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
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#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
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
call statement_call(statement)
Get the call of a statement.
Definition: statement.c:1406
bool statement_call_p(statement)
Definition: statement.c:364
bool comments_equal_p(string, string)
Definition: statement.c:116
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
Definition: statement.c:224
hash_table hash_table_make(hash_key_type key_type, size_t size)
Definition: hash.c:294
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
Definition: hash.c:449
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
Definition: hash.c:364
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
Definition: hash.c:327
bool hash_defined_p(const hash_table htp, const void *key)
true if key has e value in htp.
Definition: hash.c:484
#define debug_on(env)
Definition: misc-local.h:157
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define pips_internal_error
Definition: misc-local.h:149
#define debug_off()
Definition: misc-local.h:160
#define pips_user_error
Definition: misc-local.h:147
#define MODULE_SEP_STRING
Definition: naming-local.h:30
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
Definition: string.c:121
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
@ hash_pointer
Definition: newgen_hash.h:32
#define HASH_FOREACH(key_type, k, value_type, v, ht)
Definition: newgen_hash.h:71
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
bool stack_empty_p(const stack)
void * stack_head(const stack)
returns the item on top of stack s
Definition: stack.c:420
int stack_size(const stack)
observers
void stack_push(void *, stack)
stack use
Definition: stack.c:373
stack stack_make(int, int, int)
allocation
Definition: stack.c:246
void * stack_pop(stack)
POPs one item from stack s.
Definition: stack.c:399
char * string
STRING.
Definition: newgen_types.h:39
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
static char * module
Definition: pips.c:74
void print_entity_variable(entity e)
print_entity_variable(e)
Definition: entity.c:56
void print_expression(expression e)
no file descriptor is passed to make is easier to use in a debugging stage.
Definition: expression.c:58
void print_reference(reference r)
Definition: expression.c:142
void printf_loop(loop lp)
=======================================================================
Definition: loop.c:48
void print_statement(statement)
Print a statement on stderr.
Definition: statement.c:98
text statement_to_text(statement)
Definition: statement.c:124
static const char * prefix
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
#define ENTITY_C_RETURN_P(e)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
bool entity_in_list_p(entity ent, list ent_l)
look for ent in ent_l
Definition: entity.c:2221
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
string local_name_to_scope(const char *ln)
allocates a new string
Definition: entity.c:563
const char * entity_module_name(entity e)
See comments about module_name().
Definition: entity.c:1092
int variable_entity_dimension(entity)
variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0.
Definition: variable.c:1293
#define expression_domain
newgen_execution_domain_defined
Definition: ri.h:154
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define loop_domain
newgen_language_domain_defined
Definition: ri.h:218
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define type_variable(x)
Definition: ri.h:2949
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
#define reference_domain
newgen_range_domain_defined
Definition: ri.h:338
#define entity_undefined
Definition: ri.h:2761
#define loop_locals(x)
Definition: ri.h:1650
#define statement_declarations(x)
Definition: ri.h:2460
#define statement_comments(x)
Definition: ri.h:2456
#define entity_type(x)
Definition: ri.h:2792
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
#define loop_index(x)
Definition: ri.h:1640
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
#define ifdebug(n)
Definition: sg.c:47
static entity array
the stack head
Definition: stack.c:62
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
hash_table hash_entity_to_eliminate
string task_to_string(task t, bool pretty_print)
Definition: task_mapping.c:84
void print_task(task t)
Pass: TASK_MAPPING Debug mode: MPI_GENERATION_DEBUG_LEVEL Resource generated:
Definition: task_mapping.c:73
#define MPI_GENERATION_NBR_CLUSTER
#define COMMENT_VARIABLE_REPLICATION
#define MPI_GENERATION_PREFIX
task load_parallel_task_mapping(statement)
void set_parallel_task_mapping(statement_task)
void reset_parallel_task_mapping(void)
struct _newgen_struct_task_ * task
Definition: task_private.h:37
#define task_undefined
Definition: task_private.h:89
#define task_on_cluster(x)
Definition: task_private.h:119
#define task_domain
newgen_statement_task_domain_defined
Definition: task_private.h:32
#define task_private_data(x)
Definition: task_private.h:117
string text_to_string(text t)
SG: moved here from ricedg.
Definition: print.c:239