PIPS
out_effects_engine.c
Go to the documentation of this file.
1 /*
2 
3  $Id: out_effects_engine.c 23065 2016-03-02 09:05:50Z 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 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 /* package generic effects : Be'atrice Creusillet 6/97
28  *
29  * File: out_effects_engine.c
30  * ~~~~~~~~~~~~~~~~~~~~~~~~~~
31  *
32  * This File contains the generic functions necessary for the computation of
33  * all types of out effects.
34  *
35  */
36 #include <stdio.h>
37 #include <string.h>
38 
39 #include "genC.h"
40 
41 #include "linear.h"
42 #include "ri.h"
43 #include "effects.h"
44 #include "database.h"
45 
46 #include "ri-util.h"
47 #include "prettyprint.h" // for debugging
48 #include "effects-util.h"
49 #include "constants.h"
50 #include "misc.h"
51 #include "text-util.h"
52 #include "text.h"
53 
54 #include "properties.h"
55 
56 #include "transformer.h"
57 #include "pipsdbm.h"
58 #include "workspace-util.h"
59 #include "resources.h"
60 //#include "preprocessor.h"
61 
62 #include "effects-generic.h"
63 //#include "effects-convex.h" // only for add_precondition_to_scalar_convex_regions
64 
65 typedef struct {
66  bool memory_effects_only;
67  bool memory_in_out_effects_only;
68  effects_representation_val representation;
69 } out_effects_context;
70 
71 
72 static void init_out_effects_context(out_effects_context *ctxt,
73  effects_representation_val representation)
74 {
75  ctxt->memory_effects_only = get_bool_property("MEMORY_EFFECTS_ONLY");
76  ctxt->memory_in_out_effects_only = get_bool_property("MEMORY_IN_OUT_EFFECTS_ONLY");
77 
78  if (! ctxt->memory_effects_only
79  && ctxt->memory_in_out_effects_only)
80  // if the MEMORY_EFFECTS_ONLY is FALSE on input, and
81  // we don't want to compute OUT non-memory effects,
82  // we have to temporarily set MEMORY_EFFECTS_ONLY to
83  // TRUE so that functions computing R/W effects
84  // do not compute non memory effects which would have to be filtered.
85  set_bool_property("MEMORY_EFFECTS_ONLY", true);
86  ctxt->representation = representation;
87 }
88 
89 static void reset_out_effects_context(out_effects_context *ctxt)
90 {
91  if (! ctxt->memory_effects_only
92  && ctxt->memory_in_out_effects_only)
93  // if the MEMORY_EFFECTS_ONLY is FALSE on input, and
94  // we did not want to compute IN non-memory effects,
95  // we have to reset MEMORY_EFFECTS_ONLY to FALSE.
96  set_bool_property("MEMORY_EFFECTS_ONLY", false);
97 }
98 
99 
100 static list convert_rw_effects(list lrw, out_effects_context *ctxt)
101 {
102  if (!ctxt->memory_effects_only
103  && ctxt->memory_in_out_effects_only)
104  lrw = effects_store_effects(lrw);
105 
106  return lrw;
107 }
108 
109 
110 static void reset_converted_rw_effects(list *lrw, out_effects_context *ctxt)
111 {
112  if (!ctxt->memory_effects_only
113  && ctxt->memory_in_out_effects_only)
114  gen_free_list(*lrw);
115  *lrw = NIL;
116 }
117 
118 /**************************** GENERIC INTERPROCEDURAL OUT EFFECTS ANALYSIS */
119 
120 
123 static list l_sum_out_eff = list_undefined;
124 
125 void
127 {
128  l_sum_out_eff = list_undefined;
129 }
130 
131 void
133 {
134  if (list_undefined_p(l_sum_out_eff))
135  l_sum_out_eff = l_out;
136  else {
137  // functions that can be pointed by effects_test_union_op:
138  // EffectsMayUnion
139  // RegionsMayUnion
140  // ReferenceTestUnion
141  l_sum_out_eff = (*effects_test_union_op)(l_sum_out_eff, l_out,
143  }
144 }
145 
146 list
148 {
149  return(l_sum_out_eff);
150 }
151 
152 /* void out_effects_from_call_site_to_callee(call c)
153  * input : a potential call site for current_callee.
154  * output : nothing
155  * modifies : l_sum_out_reg becomes the may union of l_sum_out_reg and
156  * the translated out regions of the current call site.
157  * comment :
158  */
159 static void
160 out_effects_from_call_site_to_callee(call c)
161 {
163  list l_out = NIL, l_tmp = NIL;
164 
165  if (call_function(c) != current_callee)
166  return;
167 
168  context = (*load_context_func)(current_stmt);
170 
172  call_arguments(c), l_out,
173  context);
174 
175  set pre_out_set = set_make(set_pointer);
176  FOREACH(EFFECT, eff, l_tmp)
177  {
179  if (!entity_pointer_p(e))
180  set_add_element(pre_out_set, pre_out_set, e);
181  }
182 
183  list l_sum_rw_eff = (*db_get_summary_rw_effects_func)(module_local_name(current_callee));
184 
185  /* It's necessary to take the intersection with the summary regions of the
186  * callee to avoid problems due to multiple usages of the same actual
187  * parameter for different formal ones :
188  *
189  * <a(PHI1)-OUT-MUST-{PHI1==i}
190  * foo(a, a, i)
191  *
192  * <tab1-R-MUST-{PHI1==i}>, <tab2-W-MUST-{PHI1==i}
193  * void foo(int tab1[], int tab2[], int i)
194  *
195  * Without the intersection, we would obtain :
196  *
197  * <tab1-OUT-MUST-{PHI1==i}>, <tab2-OUT-MUST-{PHI1==i}
198  */
199  pips_debug_effects(2, "R/W effects : \n", l_sum_rw_eff);
200  // functions that can be pointed by effects_intersection_op:
201  // effects_undefined_binary_operator
202  // RegionsIntersection
203  // effects_entities_intersection
204  l_tmp = (*effects_intersection_op)(l_tmp, effects_dup(l_sum_rw_eff),
206  pips_debug_effects(2, "l_tmp after intersection : \n", l_tmp);
207 
208  /*
209  * AM : Trying to handle Effects/missing_out.tpips
210  * effects WRITE <array[PHI1]-write-MAY-{0<=PHI1}> and "pre" OUT <array[PHI1][PHI2]-write-EXACT-{0<=PHI1, PHI1+1<=n, 0<=PHI2, PHI2+1<=m}>
211  * are not combinable (same entity but different dims). Over-approximate OUT by WRITE
212  */
213  set out_set = set_make(set_pointer);
214  FOREACH(EFFECT, eff, l_tmp)
215  {
217  set_add_element(out_set, out_set, e);
218  }
219  FOREACH(EFFECT, eff, l_sum_rw_eff)
220  {
221  if(action_write_p(effect_action(eff)))
222  {
224 
225  if(!set_belong_p(out_set, e) && set_belong_p(pre_out_set, e))
226  {
227  effect new = copy_effect(eff);
229  l_tmp = CONS(EFFECT, new, l_tmp);
230  }
231  }
232  }
233  set_free(pre_out_set);
234  set_free(out_set);
235 
237 }
238 
239 
240 static bool
241 summary_out_effects_stmt_filter(statement s)
242 {
243  pips_debug(1, "statement %03zd\n", statement_number(s));
244  current_stmt = s;
245  return(true);
246 }
247 
248 
249 static list
250 out_effects_from_caller_to_callee(entity caller, entity callee)
251 {
252  const char *caller_name;
253  statement caller_statement;
254 
257  caller_name = module_local_name(caller);
258  pips_debug(2, "begin for caller: %s\n", caller_name);
259 
260  /* All we need to perform the translation */
262  db_get_memory_resource(DBR_CODE, caller_name, true) );
263  caller_statement = get_current_module_statement();
264 
265  // functions that can be pointed by effects_computation_init_func:
266  // effects_computation_no_init
267  // init_convex_in_out_regions
268  // init_convex_rw_regions
269  (*effects_computation_init_func)(caller_name);
270 
272 
274  gen_multi_recurse(caller_statement,
275  statement_domain, summary_out_effects_stmt_filter, gen_null,
276  call_domain, out_effects_from_call_site_to_callee, gen_null,
277  NULL);
278 
283 
284  // functions that can be pointed by effects_computation_reset_func:
285  // effects_computation_no_reset
286  // reset_convex_in_out_regions
287  // reset_convex_rw_regions
288  (*effects_computation_reset_func)(caller_name);
289 
290  pips_debug(2, "end\n");
291  return(l_sum_out_eff);
292 }
293 
294 
295 
296 /* bool summary_out_effects_engine(const char* module_name)
297  * input : the name of the current module.
298  * output : the list of summary out effects
299  * modifies : nothing.
300  * comment : computes the summary out effects of the current module, using the
301  * out effects at all its call sites.
302  */
303 bool
305 {
306  list l_eff = NIL;
307 
308  /* Look for all call sites in the callers */
309  callees callers = (callees) db_get_memory_resource(DBR_CALLERS,
310  module_name,
311  true);
313 
316  make_statement_global_stack(); // for calls to semantics libray
317 
318  debug_on("OUT_EFFECTS_DEBUG_LEVEL");
319  ifdebug(1)
320  {
321  pips_debug(1, "begin for %s with %td callers\n",
322  module_name,
323  gen_length(callees_callees(callers)));
325  fprintf(stderr, "%s, ", caller_name);
326  }
327  fprintf(stderr, "\n");
328  }
329 
333  (void)out_effects_from_caller_to_callee(caller,callee);
334  }
335 
337  if (list_undefined_p(l_eff))
338  l_eff = NIL;
339 
340  (*db_put_summary_out_effects_func)(module_name, l_eff);
341 
342  ifdebug(1)
343  {
345  db_get_memory_resource(DBR_CODE, module_local_name(callee), true) );
346 
347  pips_debug(1, "summary out_effects for module %s:\n", module_name);
348  (*effects_prettyprint_func)(l_eff);
349  pips_debug(1, "end\n");
351  }
352 
355  free_statement_global_stack(); // for calls to semantics libray
356 
357  debug_off();
358  return true;
359 }
360 
361 
362 
363 /***************************** GENERIC INTRAPROCEDURAL OUT EFFECTS ANALYSIS */
364 
365 /* void out_regions_from_unstructured_to_nodes(unstructured u,
366  * transformer c_trans, list l_out)
367  * input : an unstructured piece of code, the corresponding transformer, and
368  * the corresponding out regions.
369  * output : nothing.
370  * modifies : nothing.
371  * comment : computes the out regions of each node of the unstructured.
372  * For a one node unstructured, it is trivial.
373  * In the usual case, If OUT_0 is the out region for the whole structure,
374  * IN_0 the in region for the whole structure and W_i the write region
375  * at node i, then OUT_i = (OUT_0 union IN_0) inter W_i. And the result
376  * is a may region.
377  */
378 static bool
379 out_effects_from_unstructured_to_nodes(unstructured u, out_effects_context *ctxt)
380 {
382  list blocs = NIL;
383  control ct;
384  list
385  l_out_unst, /* OUT effects of the unstructured */
386  l_in; /* IN effects of the unstructured */
387 
388  pips_debug(1, "begin\n");
389 
390  /* First, we get the out regions of the statement corresponding to the
391  * unstructured.
392  */
393  l_out_unst = effects_dup(load_out_effects_list(unst_stat));
394 
395  ct = unstructured_control( u );
396 
397  if(control_predecessors(ct) == NIL && control_successors(ct) == NIL)
398  {
399  /* there is only one statement in u; */
400  pips_debug(6,"unique node\n");
401  store_out_effects_list(control_statement(ct), l_out_unst);
402  }
403  else
404  {
405  transformer unst_trans = (*load_transformer_func)(unst_stat);
406  // functions that can be pointed by effects_transformer_inverse_composition_op:
407  // effects_composition_with_transformer_nop
408  // effects_undefined_composition_with_transformer
409  // convex_regions_inverse_transformer_compose
410  (*effects_transformer_inverse_composition_op)(l_out_unst, unst_trans);
411 
412  l_in = load_in_effects_list(unst_stat);
413  // functions that can be pointed by effects_union_op:
414  // ProperEffectsMustUnion
415  // RegionsMustUnion
416  // ReferenceUnion
417  // EffectsMustUnion
418  l_out_unst = (*effects_union_op)(l_out_unst, effects_dup(l_in),
420  effects_to_write_effects(l_out_unst);
421 
422  CONTROL_MAP(c,
423  {
424  statement node_stat = control_statement(c);
425  transformer node_prec = (*load_context_func)(node_stat);
426  list l_out_node = effects_dup(l_out_unst);
427  list l_rw = convert_rw_effects(load_rw_effects_list(node_stat), ctxt);
428  list l_w_node =
430  reset_converted_rw_effects(&l_rw, ctxt);
431 
432  // functions that can be pointed by effects_precondition_composition_op:
433  // effects_composition_with_preconditions_nop
434  // convex_regions_precondition_compose
435  l_out_node = (*effects_precondition_composition_op)(
436  l_out_node, node_prec, true);
437  // functions that can be pointed by effects_intersection_op:
438  // effects_undefined_binary_operator
439  // RegionsIntersection
440  // effects_entities_intersection
441  l_out_node = (*effects_intersection_op)(
442  l_out_node, l_w_node, w_w_combinable_p);
443  effects_to_may_effects(l_out_node);
444  store_out_effects_list(node_stat, l_out_node);
445  /* effects_free(l_w_node); */ /* ??? seems not a good idea... FC */
446 
447  }, ct, blocs) ;
448 
449  gen_free_list(blocs) ;
450  }
451 
452  effects_free(l_out_unst);
453 
454  pips_debug(1,"end\n");
455  return(true);
456 }
457 
458 
459 /* void out_regions_from_loop_to_body(loop l, transformer c_trans, list l_out)
460  * input : a loop, its transformer, and its out regions.
461  * output : nothing.
462  * modifies : nothing.
463  * comment : computes the out regions of the loop body. See report E/185
464  * for more details.
465  */
466 static bool
467 out_effects_from_loop_to_body(loop l, out_effects_context *ctxt)
468 {
469  statement
470  loop_stat = effects_private_current_stmt_head(),
471  body_stat = loop_body(l);
472  list
473  l_out_loop,
474  l_body_out = NIL,
475  l_body_w = NIL;
476  entity i = loop_index(l);
477  range r = loop_range(l);
478  descriptor range_descriptor = descriptor_undefined;
479  transformer loop_trans = (*load_transformer_func)(loop_stat);
480  transformer loop_proper_context = transformer_undefined;
481 
482  ifdebug(1){
483  pips_debug(1, "begin\n");
484  pips_debug(1, "loop index %s.\n", entity_minimal_name(i));
485  }
486 
487  /* OUT effects of loop */
488  l_out_loop = effects_dup(load_out_effects_list(loop_stat));
489  ifdebug(1){
490  debug(1,"","OUT_L = \n");
491  (*effects_prettyprint_func)(l_out_loop);
492  }
493 
494  /* range variable of loop */
495  /* Required to add them for out loop, and write loop body */
496  // functions that can be pointed by loop_descriptor_make_func:
497  // loop_undefined_descriptor_make
498  // loop_convex_descriptor_make
499  range_descriptor = (*loop_descriptor_make_func)(l);
500  if(descriptor_defined_p(range_descriptor)) {
501  loop_proper_context = descriptor_to_context(range_descriptor);
502  // seem to work without
503  //add_precondition_to_scalar_convex_regions = true; // old hack from In effects
504  }
505 
506  /* Write effects/regions of loop body */
507  /* Since write regions of scalar variable doesn't have the polyhedral constraint
508  * for loop indices, need to add them
509  */
510  list l_rw = convert_rw_effects(load_rw_effects_list(body_stat), ctxt);
511  l_body_w = effects_write_effects_dup(l_rw);
512  reset_converted_rw_effects(&l_rw, ctxt);
513  // functions that can be pointed by effects_precondition_composition_op:
514  // effects_composition_with_preconditions_nop
515  // convex_regions_precondition_compose
516  l_body_w =
517  (*effects_precondition_composition_op)(l_body_w, loop_proper_context, true);
518  ifdebug(1){
519  debug(1,"","W(i) = \n");
520  (*effects_prettyprint_func)(l_body_w);
521  }
522 
523  /* l_out = append(T_B(l_out), loop_proper_preconditions) */
524  // functions that can be pointed by effects_transformer_inverse_composition_op:
525  // effects_composition_with_transformer_nop
526  // effects_undefined_composition_with_transformer
527  // convex_regions_inverse_transformer_compose
528  l_out_loop =
529  (*effects_transformer_inverse_composition_op)(l_out_loop, loop_trans);
530  // functions that can be pointed by effects_precondition_composition_op:
531  // effects_composition_with_preconditions_nop
532  // convex_regions_precondition_compose
533  l_out_loop =
534  (*effects_precondition_composition_op)(l_out_loop, loop_proper_context, true);
535  ifdebug(1){
536  debug(1,"","l_out = append(T_B(l_out), loop_proper_preconditions) = \n");
537  (*effects_prettyprint_func)(l_out_loop);
538  }
539 
541  {
542  // functions that can be pointed by effects_intersection_op:
543  // effects_undefined_binary_operator
544  // RegionsIntersection
545  // effects_entities_intersection
546  l_body_out =
547  (*effects_intersection_op)(l_out_loop, l_body_w, w_w_combinable_p);
548  array_effects_to_may_effects(l_body_out);
549  }
550  else
551  {
553  Value incr = vect_coeff
555  list
556  l_body_in = load_cumulated_in_effects_list(body_stat),
557  l_next_w,
558  l_prev_w,
559  l_next_in,
560  l_out_glob,
561  l_out_loc;
563  add_old_value(i);
564  entity
565  i_prime = entity_to_intermediate_value(i),
566  i_d_prime = entity_to_old_value(i);
567  Pvecteur
568  i_prime_gt_i,
569  i_d_prime_gt_i,
570  i_prime_gt_i_d_prime;
571  descriptor
572  d_i_i_prime,
573  d_i_i_prime_i_d_prime;
575  c_i_i_prime,
576  c_i_i_prime_i_d_prime;
577 
578  /* we will need to add several systems of constraints to the effects:
579  * d_i_i_prime = {i'> i, lb<=i<=ub}
580  * d_i_i_prime_i_d_prime = {i<i''<i', lb<=i<=ub, lb<=i'<=ub} */
581  i_prime_gt_i =
582  vect_make(
583  VECTEUR_NUL,
584  (Variable) (value_one_p(incr)? i : i_prime), VALUE_ONE,
585  (Variable) (value_one_p(incr)? i_prime : i), VALUE_MONE,
586  TCST, VALUE_ONE);
587  d_i_i_prime = copy_descriptor(range_descriptor);
588  d_i_i_prime = descriptor_inequality_add(d_i_i_prime, i_prime_gt_i);
589  c_i_i_prime = descriptor_to_context(d_i_i_prime);
590  free_descriptor(d_i_i_prime);
591 
592 
593  i_d_prime_gt_i =
594  vect_make(
595  VECTEUR_NUL,
596  (Variable) (value_one_p(incr)? i : i_d_prime), VALUE_ONE,
597  (Variable) (value_one_p(incr)? i_d_prime : i), VALUE_MONE,
598  TCST, VALUE_ONE);
599  i_prime_gt_i_d_prime =
600  vect_make(
601  VECTEUR_NUL,
602  (Variable) (value_one_p(incr)? i_d_prime : i_prime), VALUE_ONE,
603  (Variable) (value_one_p(incr)? i_prime : i_d_prime), VALUE_MONE,
604  TCST, VALUE_ONE);
605  d_i_i_prime_i_d_prime = copy_descriptor(range_descriptor);
606  descriptor_variable_rename(d_i_i_prime_i_d_prime, i, i_prime);
607  d_i_i_prime_i_d_prime =
608  descriptor_append(d_i_i_prime_i_d_prime, range_descriptor);
609  d_i_i_prime_i_d_prime =
610  descriptor_inequality_add(d_i_i_prime_i_d_prime, i_d_prime_gt_i);
611  d_i_i_prime_i_d_prime =
612  descriptor_inequality_add(d_i_i_prime_i_d_prime, i_prime_gt_i_d_prime);
613  c_i_i_prime_i_d_prime = descriptor_to_context(d_i_i_prime_i_d_prime);
614  free_descriptor(d_i_i_prime_i_d_prime);
615 
616 
617  /* l_next_w = proj_i'(W(i', i'>i)) */
618  l_next_w = effects_dup(l_body_w);
619  // functions that can be pointed by effects_descriptors_variable_change_func:
620  // effects_descriptors_variable_change_nop
621  // effects_undefined_descriptors_variable_change
622  // convex_regions_descriptor_variable_rename
623  l_next_w =
624  (*effects_descriptors_variable_change_func)(l_next_w, i, i_prime);
625  // functions that can be pointed by effects_precondition_composition_op:
626  // effects_composition_with_preconditions_nop
627  // convex_regions_precondition_compose
628  l_next_w = (*effects_precondition_composition_op)(l_next_w, c_i_i_prime, true);
629 
630  ifdebug(1){
631  debug(1,"","W(i', i'>i) = \n");
632  (*effects_prettyprint_func)(l_next_w);
633  }
634  // functions that can be pointed by effects_union_over_range_op:
635  // effects_union_over_range_nop
636  // simple_effects_union_over_range
637  // convex_regions_union_over_range
638  l_next_w = (*effects_union_over_range_op)(l_next_w, i_prime, r, descriptor_undefined);
639  ifdebug(1){
640  debug(1,"","proj_i'(W(i', i'>i)) = \n");
641  (*effects_prettyprint_func)(l_next_w);
642  }
643 
644  /* l_out_glob = ( W(i) inter l_out_loop) -_{sup} l_next_w */
645  // functions that can be pointed by effects_sup_difference_op:
646  // effects_undefined_binary_operator
647  // RegionsSupDifference
648  // EffectsSupDifference
649  // functions that can be pointed by effects_intersection_op:
650  // effects_undefined_binary_operator
651  // RegionsIntersection
652  // effects_entities_intersection
653  l_out_glob = (*effects_sup_difference_op)(
654  (*effects_intersection_op)(effects_dup(l_body_w),
655  l_out_loop,
657  l_next_w,
659 
660  ifdebug(1){
661  debug(1,"","l_out_glob = \n");
662  (*effects_prettyprint_func)(l_out_glob);
663  }
664 
665  /* l_prev_w = proj_i''(W(i'', i<i''<i')) */
666  l_prev_w = effects_dup(l_body_w);
667  // functions that can be pointed by effects_descriptors_variable_change_func:
668  // effects_descriptors_variable_change_nop
669  // effects_undefined_descriptors_variable_change
670  // convex_regions_descriptor_variable_rename
671  l_prev_w =
672  (*effects_descriptors_variable_change_func)(l_prev_w, i, i_d_prime);
673  // functions that can be pointed by effects_precondition_composition_op:
674  // effects_composition_with_preconditions_nop
675  // convex_regions_precondition_compose
676  l_prev_w =
677  (*effects_precondition_composition_op)(l_prev_w, c_i_i_prime_i_d_prime, true);
678 
679  ifdebug(1){
680  debug(1,"","W(i'', i<i''<i') = \n");
681  (*effects_prettyprint_func)(l_prev_w);
682  }
683 
684  // functions that can be pointed by effects_union_over_range_op:
685  // effects_union_over_range_nop
686  // simple_effects_union_over_range
687  // convex_regions_union_over_range
688  l_prev_w = (*effects_union_over_range_op)(
689  l_prev_w, i_d_prime, r, descriptor_undefined);
690 
691  ifdebug(1){
692  debug(1,"","proj_i''(W(i'', i<i''<i')) = \n");
693  (*effects_prettyprint_func)(l_prev_w);
694  }
695 
696  /* l_next_in = proj_i'( IN(i', i'>i) -_{sup} l_prev_w) */
697  l_next_in = effects_dup(l_body_in);
698  // functions that can be pointed by effects_descriptors_variable_change_func:
699  // effects_descriptors_variable_change_nop
700  // effects_undefined_descriptors_variable_change
701  // convex_regions_descriptor_variable_rename
702  l_next_in =
703  (*effects_descriptors_variable_change_func)(l_next_in, i, i_prime);
704  // functions that can be pointed by effects_precondition_composition_op:
705  // effects_composition_with_preconditions_nop
706  // convex_regions_precondition_compose
707  l_next_in = (*effects_precondition_composition_op)(l_next_in, c_i_i_prime, true);
708 
709  ifdebug(1){
710  debug(1,"","IN(i', i<i') = \n");
711  (*effects_prettyprint_func)(l_next_in);
712  }
713  // functions that can be pointed by effects_sup_difference_op:
714  // effects_undefined_binary_operator
715  // RegionsSupDifference
716  // EffectsSupDifference
717  l_next_in = (*effects_sup_difference_op)(
718  l_next_in, l_prev_w, r_w_combinable_p);
719 
720  ifdebug(1){
721  debug(1,"","IN(i', i<i') - proj_i''(W(i'')) = \n");
722  (*effects_prettyprint_func)(l_next_in);
723  }
724  // functions that can be pointed by effects_union_over_range_op:
725  // effects_union_over_range_nop
726  // simple_effects_union_over_range
727  // convex_regions_union_over_range
728  l_next_in = (*effects_union_over_range_op)(
729  l_next_in, i_prime, r, descriptor_undefined);
730 
731  /* l_out_loc = W(i) inter l_next_in */
732  // functions that can be pointed by effects_intersection_op:
733  // effects_undefined_binary_operator
734  // RegionsIntersection
735  // effects_entities_intersection
736  l_out_loc = (*effects_intersection_op)(effects_dup(l_body_w),
737  l_next_in,
739 
740  ifdebug(1){
741  debug(1,"","l_out_loc = \n");
742  (*effects_prettyprint_func)(l_out_loc);
743  }
744 
745  /* l_body_out = l_out_glob Umust l_out_loc */
746  // functions that can be pointed by effects_union_op:
747  // ProperEffectsMustUnion
748  // RegionsMustUnion
749  // ReferenceUnion
750  // EffectsMustUnion
751  l_body_out = (*effects_union_op)(l_out_glob, l_out_loc, w_w_combinable_p);
752  }
753 
754  // seem to work without
755  //add_precondition_to_scalar_convex_regions = false; // old hack from In effects
756 
757  store_out_effects_list(body_stat, l_body_out);
758  ifdebug(1){
759  debug(1,"","l_body_out = \n");
760  (*effects_prettyprint_func)(l_body_out);
761  pips_debug(1, "end\n");
762  }
763  return(true);
764 }
765 
766 
767 /* static bool out_effects_from_test_to_branches(test t)
768  * input : a test.
769  * output : the true boolean.
770  * modifies : .
771  * comment : computes the out regions of each branch of the test.
772  */
773 static bool
774 out_effects_from_test_to_branches(test t, out_effects_context *ctxt)
775 {
776  statement
777  test_stat = effects_private_current_stmt_head(),
778  branche;
779  list
780  l_out_test,
781  l_out_branche = NIL,
782  l_w_branche;
783  transformer prec_branche;
784  int i;
785 
786  /* First, we get the out regions of the statement corresponding to the test
787  */
788  l_out_test = load_out_effects_list(test_stat);
789 
790  ifdebug(1) {
791  pips_debug(1,"begin\n");
792  pips_debug(1,"OUT effects of the current test :\n");
793  (*effects_prettyprint_func)(l_out_test);
794  }
795 
796  /* Then we compute the out regions for each branch */
797  for(i=1; i<=2; i++)
798  {
799  branche = (i==1)? test_true(t) : test_false(t);
800  list l_rw_branche = convert_rw_effects(load_rw_effects_list(branche), ctxt);
801  l_w_branche = effects_write_effects_dup(l_rw_branche);
802  reset_converted_rw_effects(&l_rw_branche, ctxt);
803  prec_branche = (*load_context_func)(branche);
804 
805  l_out_branche = effects_dup(l_out_test);
806  // functions that can be pointed by effects_precondition_composition_op:
807  // effects_composition_with_preconditions_nop
808  // convex_regions_precondition_compose
809  l_out_branche = (*effects_precondition_composition_op)(
810  l_out_branche, prec_branche, false);
811  // functions that can be pointed by effects_intersection_op:
812  // effects_undefined_binary_operator
813  // RegionsIntersection
814  // effects_entities_intersection
815  l_out_branche = (*effects_intersection_op)(
816  l_out_branche, l_w_branche, w_w_combinable_p);
817  store_out_effects_list(branche, l_out_branche);
818  }
819 
820  ifdebug(1) {
821  debug(1,"","l_out_branche = \n");
822  (*effects_prettyprint_func)(l_out_branche);
823  pips_debug(1, "end\n");
824  }
825  return(true);
826 }
827 
828 /* Rout[s in for(c)s] = Rw[s] * MAY ?
829  * Certainly can do something similar to out_effects_from_loop_to_body
830  * since C for loop as some regularity like Fortran DO loop
831  */
832 static bool out_effects_from_for_to_body(forloop f, out_effects_context *ctxt)
833 {
834  statement body;
835  list /* of effect */ lout;
836  pips_debug(1, "begin\n");
837 
838  body = forloop_body(f);
839  list l_rw = convert_rw_effects(load_rw_effects_list(body), ctxt);
840  lout = effects_write_effects_dup(l_rw);
841  reset_converted_rw_effects(&l_rw, ctxt);
842  MAP(EFFECT, e,
844  lout);
845  store_out_effects_list(body, lout);
846 
847  ifdebug(1) {
848  debug(1,"","lout = \n");
849  (*effects_prettyprint_func)(lout);
850  pips_debug(1, "end\n");
851  }
852  return true;
853 }
854 
855 /* Rout[s in while(c)s] = Rw[s] * MAY ?
856  */
857 static bool out_effects_from_while_to_body(whileloop w, out_effects_context *ctxt)
858 {
859  statement body;
860  list /* of effect */ lout;
861  pips_debug(1, "begin\n");
862 
863  body = whileloop_body(w);
864  list l_rw = convert_rw_effects(load_rw_effects_list(body), ctxt);
865  lout = effects_write_effects_dup(l_rw);
866  reset_converted_rw_effects(&l_rw, ctxt);
867  MAP(EFFECT, e,
869  lout);
870  store_out_effects_list(body, lout);
871 
872  ifdebug(1) {
873  debug(1,"","lout = \n");
874  (*effects_prettyprint_func)(lout);
875  pips_debug(1, "end\n");
876  }
877  return true;
878 }
879 
880 /* void out_regions_from_block_to_statements(list l_stat, list l_out, ctrans)
881  * input : a list of statement contituting a linear sequence, the
882  * correponding out regions and the transformer of the block.
883  * output : nothing.
884  * modifies : nothing.
885  * comment : computes the out regions of each statement in the sequence.
886  * uses the algorithm described in report E/185.
887  */
888 static bool
889 out_effects_from_block_to_statements(sequence seq, out_effects_context *ctxt)
890 {
892  list l_out_seq = load_out_effects_list(seq_stat);
893  list l_stat = sequence_statements(seq);
894 
895  ifdebug(1) {
896  pips_debug(1,"begin\n");
897  pips_debug(1,"OUT effects of the current block :\n");
898  (*effects_prettyprint_func)(l_out_seq);
899  }
900 
901  if (ENDP(l_stat))
902  {
903  /* empty block of statements. Nothing to do. */
904  if (get_bool_property("WARN_ABOUT_EMPTY_SEQUENCES"))
905  pips_user_warning("empty sequence\n");
906  // return true;
907  }
908  else if (gen_length(l_stat) == 1)
909  {
910  /* if there is only one instruction in the block of statement,
911  * its out effects are the effects of the block */
912  ifdebug(1) {
913  pips_debug(1,"only one statement\n");
914  }
915 
916  store_out_effects_list(STATEMENT(CAR(l_stat)), effects_dup(l_out_seq));
917  }
918  else
919  {
920  list l_stat_reverse = gen_nreverse(gen_copy_seq(l_stat));
921  list l_next_stat_w_eff = NIL;
922  list l_out_prime = NIL;
923  list l_out_stat = NIL;
924  list l_in_prime = NIL;
925  list l_tmp = NIL;
926  // FI: no need for a completed transformer when dealing with a
927  // sequence
928  transformer seq_trans = (*load_transformer_func)(seq_stat);
929 
930  l_out_seq = effects_dup(l_out_seq);
931 
932  /* OUT'_{n+1} = T_B(OUT(B)) */
933  // functions that can be pointed by effects_transformer_inverse_composition_op:
934  // effects_composition_with_transformer_nop
935  // effects_undefined_composition_with_transformer
936  // convex_regions_inverse_transformer_compose
937  (*effects_transformer_inverse_composition_op)(l_out_seq, seq_trans);
938  l_out_prime = l_out_seq;
939 
940  ifdebug(1)
941  {
942  pips_debug(1,"OUT effects of block after translation into store"
943  " after block:\n");
944  (*effects_prettyprint_func)(l_out_prime);
945  }
946 
947  /* We go through each statement (S_k) in reverse order */
948  MAP(STATEMENT, c_stat,
949  {
950  transformer c_stat_trans = (*load_completed_transformer_func)(c_stat);
951  list l_c_stat_rw_eff = convert_rw_effects(load_rw_effects_list(c_stat), ctxt);
952  list l_c_stat_w_eff = effects_write_effects(l_c_stat_rw_eff);
953  reset_converted_rw_effects(&l_c_stat_rw_eff, ctxt);
954 
955  ifdebug(1) {
956  pips_debug(1,"intermediate effects\n");
957  print_statement(c_stat);
958  debug(1,"","W(k) = \n");
959  (*effects_prettyprint_func)(l_c_stat_w_eff);
960  debug(1,"","W(k+1) = \n");
961  (*effects_prettyprint_func)(l_next_stat_w_eff);
962  }
963 
964  /* OUT'_k = T_k^{-1} [ OUT'_{k+1} -_{sup} W_{k+1} ] */
965  // functions that can be pointed by effects_sup_difference_op:
966  // effects_undefined_binary_operator
967  // RegionsSupDifference
968  // EffectsSupDifference
969  l_out_prime =
970  (*effects_sup_difference_op)(l_out_prime,
971  effects_dup(l_next_stat_w_eff),
973  // functions that can be pointed by effects_transformer_composition_op:
974  // effects_composition_with_transformer_nop
975  // effects_undefined_composition_with_transformer
976  // convex_regions_transformer_compose
977  // simple_effects_composition_with_effect_transformer
978  (*effects_transformer_composition_op)(l_out_prime, c_stat_trans);
979 
980  ifdebug(1){
981  debug(1,"","OUT'_k = \n");
982  (*effects_prettyprint_func)(l_out_prime);
983  }
984 
985  /* OUT_k = W_k inter [ OUT'_k Umust T_k^{-1} (IN'_{k+1})] */
986  ifdebug(1){
987  debug(1,"","IN'_(k+1) = \n");
988  (*effects_prettyprint_func)(l_in_prime);
989  }
990  // functions that can be pointed by effects_transformer_composition_op:
991  // effects_composition_with_transformer_nop
992  // effects_undefined_composition_with_transformer
993  // convex_regions_transformer_compose
994  // simple_effects_composition_with_effect_transformer
995  (*effects_transformer_composition_op)(l_in_prime, c_stat_trans);
996 
997  ifdebug(1){
998  debug(1,"","IN'_(k+1) = "
999  "(after elimination of modified variables)\n");
1000  (*effects_prettyprint_func)(l_in_prime);
1001  }
1002 
1003  // functions that can be pointed by effects_union_op:
1004  // ProperEffectsMustUnion
1005  // RegionsMustUnion
1006  // ReferenceUnion
1007  // EffectsMustUnion
1008  l_tmp = (*effects_union_op)(effects_dup(l_out_prime),
1009  l_in_prime, w_w_combinable_p);
1010 
1011  ifdebug(1){
1012  debug(1,"","OUT'_k Umust IN'_(k+1) = \n");
1013  (*effects_prettyprint_func)(l_tmp);
1014  }
1015 
1016  // functions that can be pointed by effects_intersection_op:
1017  // effects_undefined_binary_operator
1018  // RegionsIntersection
1019  // effects_entities_intersection
1020  l_out_stat = (*effects_intersection_op)(effects_dup(l_c_stat_w_eff),
1021  l_tmp,
1023 
1024  ifdebug(1){
1025  debug(1,"","OUT_k = \n");
1026  (*effects_prettyprint_func)(l_out_stat);
1027  }
1028 
1029  /* store the out effects of the current statement */
1030  store_out_effects_list(c_stat, l_out_stat);
1031 
1032  /* keep some information about the current statement, which will be
1033  * the next statement. */
1034  l_next_stat_w_eff = l_c_stat_w_eff;
1035  l_in_prime = effects_dup(load_cumulated_in_effects_list(c_stat));
1036  effects_to_write_effects(l_in_prime);
1037  },
1038  l_stat_reverse);
1039 
1040  }
1041  pips_debug(1,"end\n");
1042  return(true);
1043 }
1044 
1045 
1046 static bool
1047 out_effects_statement_filter(statement s, _UNUSED_ out_effects_context *ctxt)
1048 {
1049  ifdebug(1) {
1050  pips_debug(1, "Entering statement %03zd :\n", statement_ordering(s));
1051  print_statement(s);
1052  }
1055  return true;
1056 }
1057 
1058 static void
1059 out_effects_statement_leave(statement s, _UNUSED_ out_effects_context *ctxt)
1060 {
1062  (void) pop_statement_global_stack();
1063  pips_debug(1, "End statement %03zd :\n", statement_ordering(s));
1064 }
1065 
1066 
1067 static void
1068 out_effects_of_module_statement(statement module_stat, out_effects_context *ctxt)
1069 {
1071  make_statement_global_stack(); // used by semantics for warnings and errors
1072  pips_debug(1,"begin\n");
1073 
1075  module_stat, ctxt,
1076  statement_domain, out_effects_statement_filter, out_effects_statement_leave,
1077  sequence_domain, out_effects_from_block_to_statements, gen_null,
1078  test_domain, out_effects_from_test_to_branches, gen_null,
1079  loop_domain, out_effects_from_loop_to_body, gen_null,
1080  whileloop_domain, out_effects_from_while_to_body, gen_null,
1081  forloop_domain, out_effects_from_for_to_body, gen_null,
1082  unstructured_domain, out_effects_from_unstructured_to_nodes, gen_null,
1083  call_domain, gen_false, gen_null, /* calls are treated in another phase*/
1084  NULL);
1085 
1086  pips_debug(1,"end\n");
1089 }
1090 
1091 
1092 /* bool out_effects_engine(const char* module_name):
1093  * input : the name of the current module.
1094  * requires : that transformers and precondition maps be set if needed.
1095  * (it depends on the chosen instanciation of *load_context_func
1096  * and *load_transformer_func).
1097  * output : nothing !
1098  * modifies :
1099  * comment : computes the out effects of the current module.
1100  */
1101 bool
1102 out_effects_engine(const char* module_name, effects_representation_val representation)
1103 {
1104  statement module_stat;
1105  list l_sum_out = NIL;
1106 
1107  debug_on("OUT_EFFECTS_DEBUG_LEVEL");
1108  debug(1, "out_effects", "begin\n");
1109 
1111 
1113 
1114  /* Get the code of the module. */
1116  db_get_memory_resource(DBR_CODE, module_name, true) );
1117  module_stat = get_current_module_statement();
1118 
1119  // functions that can be pointed by effects_computation_init_func:
1120  // effects_computation_no_init
1121  // init_convex_in_out_regions
1122  // init_convex_rw_regions
1123  (*effects_computation_init_func)(module_name);
1124 
1125  /* Get the various effects and in_effects of the module. */
1126 
1129 
1133 
1134  /* initialise the map for out effects */
1135  init_out_effects();
1136 
1137  /* Get the out_summary_effects of the current module */
1138  l_sum_out = (*db_get_summary_out_effects_func)(module_name);
1139 
1140  /* And stores them as the out regions of the module statement */
1141  store_out_effects_list(module_stat, effects_dup(l_sum_out));
1142 
1143  /* Compute the out_effects of the module. */
1144  out_effects_context ctxt;
1145  init_out_effects_context(&ctxt, representation);
1146  out_effects_of_module_statement(module_stat, &ctxt);
1147  reset_out_effects_context(&ctxt);
1148 
1149  pips_debug(1, "end\n");
1150 
1151  debug_off();
1152 
1153  (*db_put_out_effects_func)(module_name, get_out_effects());
1154 
1157 
1158  reset_rw_effects();
1160  reset_in_effects();
1164  // functions that can be pointed by effects_computation_reset_func:
1165  // effects_computation_no_reset
1166  // reset_convex_in_out_regions
1167  // reset_convex_rw_regions
1168  (*effects_computation_reset_func)(module_name);
1169 
1171 
1172  return true;
1173 }
bool descriptor_defined_p(descriptor p)
Definition: effects.c:402
descriptor copy_descriptor(descriptor p)
DESCRIPTOR.
Definition: effects.c:389
effect copy_effect(effect p)
EFFECT.
Definition: effects.c:448
void free_descriptor(descriptor p)
Definition: effects.c:392
static const char * caller_name
Definition: alias_check.c:122
static entity callee
Definition: alias_pairs.c:62
#define value_one_p(val)
#define VALUE_MONE
int Value
#define VALUE_ONE
static statement current_stmt
static entity current_callee
#define pips_debug_effects(level, message, l_eff)
effects_representation_val
void free_effects_private_current_context_stack(void)
void set_invariant_in_effects(statement_effects)
void update_out_summary_effects_list(list)
void set_cumulated_in_effects(statement_effects)
void effects_to_write_effects(list)
list effects_store_effects(list)
statement_effects(* db_get_invariant_in_effects_func)(const char *)
void set_rw_effects(statement_effects)
void reset_invariant_in_effects(void)
void effects_to_may_effects(list)
void init_out_effects(void)
void make_effects_private_current_context_stack(void)
list load_out_effects_list(statement)
void reset_out_summary_effects_list(void)
out_effects_engine.c
list generic_effects_forward_translation(entity, list, list, transformer)
void make_effects_private_current_stmt_stack(void)
utils.c
list get_out_summary_effects_list(void)
void descriptor_variable_rename(descriptor, entity, entity)
void reset_cumulated_in_effects(void)
statement_effects(* db_get_invariant_rw_effects_func)(const char *)
void array_effects_to_may_effects(list)
bool out_effects_engine(const char *, effects_representation_val)
list effects_write_effects_dup(list)
bool w_r_combinable_p(effect, effect)
transformer descriptor_to_context(descriptor)
statement_effects(* db_get_out_effects_func)(const char *)
statement effects_private_current_stmt_pop(void)
void reset_out_effects(void)
bool get_descriptor_range_p(void)
void free_effects_private_current_stmt_stack(void)
bool normalizable_and_linear_loop_p(entity, range)
void effects_free(list)
list load_in_effects_list(statement)
descriptor descriptor_inequality_add(descriptor, Pvecteur)
statement_effects(* db_get_cumulated_in_effects_func)(const char *)
bool summary_out_effects_engine(const char *)
statement effects_private_current_stmt_head(void)
void set_out_effects(statement_effects)
void effects_private_current_stmt_push(statement)
descriptor descriptor_append(descriptor, descriptor)
void set_in_effects(statement_effects)
list load_cumulated_in_effects_list(statement)
void reset_in_effects(void)
list effects_dup(list)
bool w_w_combinable_p(effect, effect)
list load_rw_effects_list(statement)
list effects_write_effects(list)
void store_out_effects_list(statement, list)
void reset_invariant_rw_effects(void)
statement_effects get_out_effects(void)
statement_effects(* db_get_in_effects_func)(const char *)
bool r_w_combinable_p(effect, effect)
void set_invariant_rw_effects(statement_effects)
void reset_rw_effects(void)
bool effects_same_action_p(effect, effect)
statement_effects(* db_get_rw_effects_func)(const char *)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_approximation_tag(eff)
#define approximation_tag(x)
Definition: effects.h:362
#define effect_action(x)
Definition: effects.h:642
#define action_write_p(x)
Definition: effects.h:314
#define descriptor_undefined
Definition: effects.h:559
@ is_approximation_may
Definition: effects.h:341
#define effect_approximation(x)
Definition: effects.h:644
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define STRING(x)
Definition: genC.h:87
#define CONTROL_MAP(ctl, code, c, list)
Macro to walk through all the controls reachable from a given control node of an unstructured.
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
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
Definition: genClib.c:3428
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
Definition: genClib.c:3373
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
Definition: genClib.c:2796
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define list_undefined_p(c)
Return if a list is undefined.
Definition: newgen_list.h:75
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
#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
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
#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
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226
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
static void reset_converted_rw_effects(list *lrw, live_paths_analysis_context *ctxt)
static list convert_rw_effects(list lrw, live_paths_analysis_context *ctxt)
#define debug_on(env)
Definition: misc-local.h:157
#define _UNUSED_
Definition: misc-local.h:232
#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_user_warning
Definition: misc-local.h:146
#define debug_off()
Definition: misc-local.h:160
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
const char * entity_minimal_name(entity e)
Do preserve scope informations.
Definition: naming.c:214
void set_free(set)
Definition: set.c:332
bool set_belong_p(const set, const void *)
Definition: set.c:194
@ 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
set set_add_element(set, const set, const void *)
Definition: set.c:152
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
void print_statement(statement)
Print a statement on stderr.
Definition: statement.c:98
void set_bool_property(const char *, bool)
#define NORMALIZE_EXPRESSION(e)
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
bool entity_pointer_p(entity e)
Definition: entity.c:745
statement pop_statement_global_stack(void)
Definition: static.c:352
void push_statement_on_statement_global_stack(statement)
Definition: static.c:333
void free_statement_global_stack(void)
Definition: static.c:358
void make_statement_global_stack(void)
Definition: static.c:318
#define forloop_domain
newgen_extensions_domain_defined
Definition: ri.h:178
#define loop_body(x)
Definition: ri.h:1644
#define test_domain
newgen_entity_domain_defined
Definition: ri.h:418
struct _newgen_struct_callees_ * callees
Definition: ri.h:55
#define transformer_undefined
Definition: ri.h:2847
#define unstructured_domain
newgen_type_domain_defined
Definition: ri.h:442
#define call_function(x)
Definition: ri.h:709
#define callees_callees(x)
Definition: ri.h:675
#define reference_variable(x)
Definition: ri.h:2326
#define loop_domain
newgen_language_domain_defined
Definition: ri.h:218
#define control_predecessors(x)
Definition: ri.h:943
#define statement_ordering(x)
Definition: ri.h:2454
#define test_false(x)
Definition: ri.h:2837
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
#define range_increment(x)
Definition: ri.h:2292
#define call_domain
newgen_callees_domain_defined
Definition: ri.h:58
#define entity_undefined
Definition: ri.h:2761
#define test_true(x)
Definition: ri.h:2835
#define sequence_statements(x)
Definition: ri.h:2360
#define control_successors(x)
Definition: ri.h:945
#define whileloop_body(x)
Definition: ri.h:3162
#define whileloop_domain
newgen_variable_domain_defined
Definition: ri.h:466
#define loop_range(x)
Definition: ri.h:1642
#define call_arguments(x)
Definition: ri.h:711
#define control_statement(x)
Definition: ri.h:941
#define statement_number(x)
Definition: ri.h:2452
#define normalized_linear(x)
Definition: ri.h:1781
#define sequence_domain
newgen_reference_domain_defined
Definition: ri.h:346
#define forloop_body(x)
Definition: ri.h:1372
#define loop_index(x)
Definition: ri.h:1640
#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 ...
#define ifdebug(n)
Definition: sg.c:47
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: delay.c:253
entity entity_to_intermediate_value(entity)
Definition: value.c:879
void add_intermediate_value(entity)
Definition: value.c:1476
void add_old_value(entity)
Definition: value.c:1440
entity entity_to_old_value(entity)
Definition: value.c:869
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60
Pvecteur vect_make(Pvecteur v, Variable var, Value val,...)
Pvecteur vect_make(v, [var, val,]* 0, val) Pvecteur v; // may be NULL, use assigne anyway Variable va...
Definition: alloc.c:165
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
Definition: unaires.c:228