PIPS
variable_expansion.c
Go to the documentation of this file.
1 /*
2 
3  $Id: variable_expansion.c 23495 2018-10-24 09:19:47Z coelho $
4 
5  Copyright 1989-2016 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 
25 // do not compile unless required
26 #include "phases.h"
27 #if defined(BUILDER_VARIABLE_EXPANSION) || \
28  defined(BUILDER_REDUCTION_VARIABLE_EXPANSION)
29 
30 #ifdef HAVE_CONFIG_H
31  #include "pips_config.h"
32 #endif
33 /* transformation package : Francois Irigoin, October 2005
34  *
35  * variable_expansion.c
36  * ~~~~~~~~~~~~~~~~~~~~
37  *
38  * This File contains the functions expanding local variables used in DO loops into arrays.
39  * SG: added a transformation to expand reduction variables
40  */
41 
42 #include <stdlib.h>
43 #include <stdio.h>
44 
45 #include "genC.h"
46 #include "linear.h"
47 
48 #include "misc.h"
49 #include "pipsdbm.h"
50 #include "properties.h"
51 
52 #include "ri.h"
53 #include "ri-util.h"
54 #include "prettyprint.h" // for debugging
55 
56 #include "effects.h"
57 #include "reductions.h" // used
58 #include "control.h" // module_reorder
59 
60 #include "transformations.h" // make_ref_expr, find_loop_from_label
61 
62 /* bool scalar_expansion(const char* module_name)
63  * input : the name of the current module
64  * output : nothing.
65  * modifies : replaces local scalar variables by arrays and updates the corresponding references
66  * comment : private scalars must have been detected first (see PRIVATIZE_MODULE).
67  * array expansion would be performed in the exact same way.
68  */
69 
70 /* list of expressions referencing the loop indices */
71 
72 typedef struct {
73  list loop_indices ;
74  list loop_replacement ;
75  list loop_dimensions ;
76  entity expanded_variable ;
77  entity expanded_variable_replacment ;
78  list processed_variables ;
79 } scalar_expansion_context;
80 #define DEFAULT_SCALAR_EXPANSION_CONTEXT { NIL,NIL,NIL,entity_undefined,entity_undefined,NIL }
81 
82 static bool perform_reference_expansion(reference r,scalar_expansion_context *ctxt)
83 {
85 
86  if(same_entity_p(v,ctxt->expanded_variable) ) {
87  list il = reference_indices(r);
88 
89  pips_assert("scalar reference", ENDP(il));
90 
91  pips_debug(9, "for variable %s\n", entity_local_name(v));
92 
93  reference_variable(r) = ctxt->expanded_variable_replacment;
94  reference_indices(r) = gen_copy_seq(ctxt->loop_replacement);
95 
96  ifdebug(9) {
97  pips_debug(9, "New reference:");
98  print_reference(r);
99  pips_debug(9, "\n");
100  }
101  }
102  return true;
103 }
104 
105 static
106 void
107 perform_reference_expansion_in_loop(instruction i,scalar_expansion_context *ctxt)
108 {
109  if(instruction_loop_p(i))
110  {
111  loop l = instruction_loop(i);
112  range r = loop_range(l);
113  if(same_entity_p(loop_index(l),ctxt->expanded_variable) )
114  {
115  expression new_ref = make_ref_expr(ctxt->expanded_variable_replacment,gen_copy_seq(ctxt->loop_replacement));
116  /* we have to convert the do-loop into a for-loop */
117  forloop new_loop = make_forloop(
121  copy_expression(new_ref),
122  range_upper(r)),
125  copy_expression(new_ref),
126  range_increment(r)),
127  loop_body(l)
128  );
133  free_loop(l);
135  instruction_forloop(i)=new_loop;
136  }
137  }
138 }
139 
140 static
141 bool prepare_expansion(loop l, scalar_expansion_context* ctxt)
142 {
143  entity i = loop_index(l);
144  range r = loop_range(l);
145 
146  /* Is this loop OK? */
147  bool should_copy=!expression_constant_p(range_lower(r));
149  if(should_copy)
150  {
154  insert_statement(parent,
157 #if 0
159  if(!effects_write_at_least_once_p(peffects))
160  {
161  /* add variable to locals */
162  for(loop ll=l;ll; (ll=(loop)gen_get_ancestor(loop_domain,ll)))
163  loop_locals(ll)=CONS(ENTITY,I,loop_locals(ll));
164  }
165  gen_full_free_list(peffects);
166 #endif
167 
168 
169  }
170  else
174  expression ir = make_op_exp(
175  "-",
178  );
179 
180  /* Update information about the nesting loops. */
181  ctxt->loop_dimensions = gen_append(ctxt->loop_dimensions, CONS(DIMENSION, d, NIL));
182  ctxt->loop_indices = gen_append(ctxt->loop_indices, CONS(EXPRESSION, ie, NIL));
183  ctxt->loop_replacement = gen_append(ctxt->loop_replacement, CONS(EXPRESSION, ir, NIL));
184 
185  ifdebug(9) {
186  pips_debug(9, "Going down, local variables: ");
188  pips_debug(9, "\n");
189  }
190  return true;
191 
192 }
193 
194 static void perform_expansion_and_unstack_index_and_dimension(loop l,scalar_expansion_context* ctxt)
195 {
196  entity i = loop_index(l);
197 
198  /* Select loops marked as relevant on the way down. */
199  if(!ENDP(ctxt->loop_indices)) {
200  expression eli = EXPRESSION(CAR(gen_last(ctxt->loop_indices)));
201  expression elr = EXPRESSION(CAR(gen_last(ctxt->loop_replacement)));
204  dimension d = DIMENSION(CAR(gen_last(ctxt->loop_dimensions)));
205  list evl = NIL;
206  list new_entities = NIL;
207 
208  ifdebug(9) {
209  pips_debug(9, "Going up, local variables: ");
211  pips_debug(9, "\n");
212  }
213 
214  /* Does it contain private variables? */
215  FOREACH(ENTITY, lv, loop_locals(l))
216  {
217  /* Do not expand loop indices nor variables already processed! */
218  if( !same_entity_p(lv,i) && !gen_in_list_p(lv, ctxt->processed_variables)) {
219  type t = entity_type(lv);
220  variable v = type_variable(t);
221  list dims = variable_dimensions(v);
222  pips_assert("Scalar expansion", ENDP(dims) );
223  /* create a new entity to hold the private */
225  entity_user_name(lv),
228  gen_full_copy_list(ctxt->loop_dimensions));
229 
230  evl = CONS(ENTITY, lv, evl);
231  new_entities = CONS(ENTITY, new_entity, new_entities);
232 
233  /* Update its references in the loop body */
234  pips_debug(9, "Expand references to %s\n", entity_local_name(lv));
235  ctxt->expanded_variable = lv;
236  ctxt->expanded_variable_replacment = new_entity;
237  gen_context_multi_recurse(parent,ctxt, reference_domain, perform_reference_expansion, gen_null,
238  instruction_domain,gen_true,perform_reference_expansion_in_loop,
239  0);
240  ctxt->expanded_variable = entity_undefined;
241  ctxt->expanded_variable_replacment = entity_undefined;
242  }
243  }
244 
245  /* Remove the expanded variables and the loop index from the local variable list */
246  gen_list_and_not(&loop_locals(l), ctxt->processed_variables);
247  gen_list_and_not(&loop_locals(l), evl);
248  ctxt->processed_variables = gen_append(ctxt->processed_variables, evl);
249  ctxt->processed_variables = gen_append(ctxt->processed_variables, CONS(ENTITY, i, NIL));
250 
251  gen_remove(&ctxt->loop_indices, (void *) eli);
252  gen_remove(&ctxt->loop_replacement, (void *) elr);
253  gen_remove(&ctxt->loop_dimensions, (void *) d);
254  free_dimension(d);
255  /* add new entities to statement */
256  FOREACH(ENTITY,new_entity,new_entities)
258  gen_free_list(new_entities);
259  }
260  }
261 }
262 
263 static bool scalar_expansion(const char* module_name)
264 {
265  /* prelude */
268  debug_on("SCALAR_EXPANSION_DEBUG_LEVEL");
269  pips_debug(1, "begin\n");
270 
271  /*
272 
273  Go down statements recursively.
274  Each time you enter a loop:
275  * if the loop bounds are constant and if the increment is one,
276  stack them on the bound stack(s) together with the loop index;
277  * else, stop the recursive descent.
278  When new constants bounds have been found, look for local scalar variables.
279  Modify the declaration of the scalar variable in the symbol table according
280  to the bound stack.
281  Modify all its references in the body statement, using the stacked loop indices
282  as reference.
283  Remove it from the local variable field of the current DO loop.
284 
285  */
286  scalar_expansion_context ctxt = DEFAULT_SCALAR_EXPANSION_CONTEXT;
287  gen_context_recurse(get_current_module_statement(),&ctxt, loop_domain, prepare_expansion, perform_expansion_and_unstack_index_and_dimension);
289 
290  /* validate */
292 
293  /* postlude */
294  pips_assert("Supporting lists are both empty", ENDP(ctxt.loop_indices));
295  pips_assert("Supporting lists are both empty", ENDP(ctxt.loop_dimensions));
296 
297  gen_free_list(ctxt.processed_variables);
298 
299  /* Declarations must be regenerated for the code to be compilable */
302 
305  pips_debug(1, "end\n");
306  debug_off();
307 
308  return true;
309 }
310 
311 /**
312  * alias for scalar expansion
313  */
314 bool variable_expansion(const char* module_name)
315 {
316  return scalar_expansion(module_name);
317 }
318 
319 typedef struct {
320  entity old;
321  entity new;
322  expression index;
323 } er;
324 /**
325  * if @a r entity is the same as @a oni[0], repalce the entity by @a oni[1] and append the index @a oni[2]
326  *
327  * @param r reference to check
328  * @param oni [0] old entity to be replaced by [1] with [2] additionnal index
329  */
330 static void do_expand_reference(reference r, er *e)
331 {
332  if(same_entity_p(reference_variable(r),e->old))
333  {
334  reference_variable(r)=e->new;
337  }
338 }
339 
340 /**
341  * call do_expand_reference on each entity of @a s declarations
342  *
343  * @param s statement to check
344  * @param oni forwarded to do_expand_reference
345  */
346 static
347 void do_expand_reference_in_declarations(statement s, entity oni[])
348 {
350  {
351  value v = entity_initial(e);
352  if( !value_undefined_p(v) && value_expression_p( v ) )
353  gen_context_recurse(v, oni, reference_domain, gen_true2, do_expand_reference);
354  }
355 }
356 
357 
358 /**
359  * performs scalar_expansion on variables used for reductions
360  * too
361  */
362 bool reduction_variable_expansion(const char* module_name) {
363  bool success = false;
364  /* prelude */
368 
369  /* do the job */
370  const char* slabel = get_string_property_or_ask("LOOP_LABEL","enter the label of a loop !");
371  entity elabel = find_label_entity(module_name,slabel);
372 
373  if(entity_undefined_p(elabel)) {
374  pips_user_error("label %s does not exist !\n", slabel);
375  }
376  else {
377  statement theloopstatement = find_loop_from_label(get_current_module_statement(),elabel);
379  /* if any reduction found */
380  if(!ENDP(reductions))
381  {
382  /* convert the loop range to an expression */
383  loop theloop = statement_loop(theloopstatement);
384  expression loop_nbiters = range_to_expression(loop_range(theloop),range_to_nbiter);
385  dimension thedim =
388  NIL);
389 
390  /* used to keep track of reference <> expanded reference */
392  list trailing_statements = NIL;
393 
394  /* each reduction will be expanded into a new entity, then a loop will perform the reduction */
395  list newly_declared_entities = NIL;
397  {
399  entity reduction_entity = reference_variable(reduction_reference(red));
400  entity new_entity = entity_undefined;
401  /* check if the reduction entity has already been processed before creating the new entity */
402  if(HASH_UNDEFINED_VALUE == (new_entity = hash_get(new_entities,reduction_entity)) )
403  {
404 
405  /* the new entity is expanded from the reduction entity */
407  "RED",
411  );
412  newly_declared_entities = CONS(ENTITY, new_entity, newly_declared_entities);
413 
414 
415  /* perform the expansion */
416  er _er_ = {
417  reduction_entity,
418  new_entity,
419  make_op_exp("-",
422  )
423 
424  };
425  gen_context_multi_recurse(theloop,&_er_,
426  reference_domain,gen_true,do_expand_reference,
427  statement_domain,gen_true,do_expand_reference_in_declarations,
428  NULL);
429  free_expression(_er_.index);
430 
431  /* register the entity */
432  hash_put(new_entities,reduction_entity,new_entity);
433  }
434 
435  /* create the assigment that put the good value at the beginning of the reduction,
436  * the choice of the good value is not trivial, it should be the neutral element for the reduction operation
437  * if we find a reference to our reduction before any control code, we have nothing to do ! */
438  instruction do_the_assignment = make_instruction_loop(
439  make_loop(
440  loop_index(theloop),
447  NIL)
448  );
449  insert_statement( theloopstatement,instruction_to_statement(do_the_assignment),true);
450 
451  /* create two loops: one for the init, for the reduction */
452  instruction do_the_reduction = make_instruction_loop(
453  make_loop(
454  loop_index(theloop),
455  copy_range(loop_range(theloop)),
463  make_op_exp("-",
466  )
467 
468  ,NIL)))
469  )
470  ),
473  NIL)
474  );
475  /* append it */
476  trailing_statements=CONS(STATEMENT,instruction_to_statement(do_the_reduction),trailing_statements);
477 
478  }
479  }
480  FOREACH(ENTITY,new_entity, newly_declared_entities)
481  AddLocalEntityToDeclarations(new_entity, get_current_module_entity(), theloopstatement);
482  gen_free_list(newly_declared_entities);
483 
484  if(!ENDP(trailing_statements)) {
485  /* create trailing statement and append them */
486  statement all_trailining_statements = make_block_statement(trailing_statements);
487  insert_statement(theloopstatement,all_trailining_statements,false);
488 
489  hash_table_free(new_entities);
490 
491  /* commit changes */
494  success=true;
495  }
496  }
497  }
498 
499  /* postlude */
503  return success;
504 }
505 
506 #endif // BUILDER_ * _VARIABLE_EXPANSION
instruction make_instruction_loop(loop _field_)
Definition: ri.c:1175
range copy_range(range p)
RANGE.
Definition: ri.c:2005
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
Definition: ri.c:1301
basic copy_basic(basic p)
BASIC.
Definition: ri.c:104
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
dimension make_dimension(expression a1, expression a2, list a3)
Definition: ri.c:565
dimension copy_dimension(dimension p)
DIMENSION.
Definition: ri.c:529
execution make_execution_sequential(void)
Definition: ri.c:841
void free_expression(expression p)
Definition: ri.c:853
void free_dimension(dimension p)
Definition: ri.c:532
reference copy_reference(reference p)
REFERENCE.
Definition: ri.c:2047
forloop make_forloop(expression a1, expression a2, expression a3, statement a4)
Definition: ri.c:1025
range make_range(expression a1, expression a2, expression a3)
Definition: ri.c:2041
void free_loop(loop p)
Definition: ri.c:1268
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
bool effects_write_at_least_once_p(list)
list proper_effects_of_expression(expression)
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
Definition: genC.h:285
void gen_full_free_list(list l)
Definition: genClib.c:1023
void free(void *)
#define loop
Definition: gfc2pips.h:54
bool success
Definition: gpips-local.h:59
statement make_block_statement(list)
Make a block statement from a list of statement.
Definition: statement.c:616
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
Definition: statement.c:597
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
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
Definition: genClib.c:2780
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
Definition: list.c:685
#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
void gen_list_and_not(list *a, const list b)
Compute A = A inter non B:
Definition: list.c:963
#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
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
list gen_last(list l)
Return the last element of a list.
Definition: list.c:578
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
Definition: list.c:734
#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
list gen_append(list l1, const list l2)
Definition: list.c:471
list gen_full_copy_list(list l)
Copy a list structure with element copy.
Definition: list.c:535
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
loop statement_loop(statement)
Get the loop of a statement.
Definition: statement.c:1374
statement make_assign_statement(expression, expression)
Definition: statement.c:583
void insert_statement(statement, statement, bool)
This is the normal entry point.
Definition: statement.c:2570
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 expression_constant_p(expression)
HPFC module by Fabien COELHO.
Definition: expression.c:2453
#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 debug_off()
Definition: misc-local.h:160
#define pips_user_error
Definition: misc-local.h:147
@ hash_pointer
Definition: newgen_hash.h:32
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
Definition: newgen_hash.h:56
#define HASH_DEFAULT_SIZE
Definition: newgen_hash.h:26
entity reduction_operator_entity(reduction_operator op)
match a reduction operator against operator entity
Definition: reductions.c:577
void print_reference(reference r)
Definition: expression.c:142
const char * get_string_property_or_ask(const char *, const char[])
void reset_cumulated_reductions(void)
void set_cumulated_reductions(pstatement_reductions)
reductions load_cumulated_reductions(statement)
#define REDUCTION(x)
REDUCTION.
#define reduction_op(x)
#define reduction_reference(x)
#define reductions_list(x)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
#define make_expression_list(stats...)
#define MINUS_OPERATOR_NAME
@ range_to_nbiter
#define PLUS_UPDATE_OPERATOR_NAME
#define LESS_OR_EQUAL_OPERATOR_NAME
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 same_entity_p(entity e1, entity e2)
predicates on entities
Definition: entity.c:1321
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
entity entity_empty_label(void)
Definition: entity.c:1105
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
Definition: entity.c:1380
static int init
Maximal value set for Fortran 77.
Definition: entity.c:320
void print_entities(list l)
Definition: entity.c:167
entity operator_neutral_element(entity op)
Definition: entity.c:2593
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
expression range_to_expression(range r, enum range_to_expression_mode mode)
computes the distance between the lower bound and the upper bound of the range
Definition: eval.c:963
expression reference_to_expression(reference r)
Definition: expression.c:196
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
expression make_op_exp(char *op_name, expression exp1, expression exp2)
================================================================
Definition: expression.c:2012
expression make_ref_expr(entity ent, list args)
Definition: expression.c:4316
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
Definition: expression.c:1832
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
Definition: type.c:1383
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
Definition: variable.c:233
entity make_new_array_variable_with_prefix(const char *, entity, basic, list)
J'ai ameliore la fonction make_new_scalar_variable_with_prefix
Definition: variable.c:785
entity make_new_scalar_variable(entity, basic)
Definition: variable.c:741
entity find_label_entity(const char *, const char *)
util.c
Definition: util.c:43
basic basic_of_reference(reference)
Retrieves the basic of a reference in a newly allocated basic object.
Definition: type.c:1459
#define value_undefined_p(x)
Definition: ri.h:3017
#define loop_body(x)
Definition: ri.h:1644
#define instruction_loop_p(x)
Definition: ri.h:1518
#define reference_variable(x)
Definition: ri.h:2326
#define loop_domain
newgen_language_domain_defined
Definition: ri.h:218
#define range_upper(x)
Definition: ri.h:2290
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define instruction_loop(x)
Definition: ri.h:1520
#define dimension_lower(x)
Definition: ri.h:980
#define type_variable(x)
Definition: ri.h:2949
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
#define range_increment(x)
Definition: ri.h:2292
#define instruction_domain
newgen_functional_domain_defined
Definition: ri.h:202
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define entity_undefined_p(x)
Definition: ri.h:2762
#define reference_domain
newgen_range_domain_defined
Definition: ri.h:338
#define entity_undefined
Definition: ri.h:2761
#define expression_undefined
Definition: ri.h:1223
@ is_instruction_forloop
Definition: ri.h:1477
#define instruction_tag(x)
Definition: ri.h:1511
#define dimension_upper(x)
Definition: ri.h:982
#define reference_indices(x)
Definition: ri.h:2328
#define value_code(x)
Definition: ri.h:3067
#define instruction_forloop(x)
Definition: ri.h:1538
#define loop_locals(x)
Definition: ri.h:1650
#define range_lower(x)
Definition: ri.h:2288
#define variable_dimensions(x)
Definition: ri.h:3122
#define code_decls_text(x)
Definition: ri.h:786
#define statement_declarations(x)
Definition: ri.h:2460
#define loop_range(x)
Definition: ri.h:1642
#define entity_type(x)
Definition: ri.h:2792
#define value_expression_p(x)
Definition: ri.h:3080
#define loop_index(x)
Definition: ri.h:1640
#define statement_undefined
Definition: ri.h:2419
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
#define entity_initial(x)
Definition: ri.h:2796
char * strdup()
#define ifdebug(n)
Definition: sg.c:47
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
statement find_loop_from_label(statement, entity)
Definition: util.c:218
bool reduction_variable_expansion(const char *)
bool variable_expansion(const char *)
variable_expansion.c