PIPS
propagate.c
Go to the documentation of this file.
1 /*
2 
3  $Id: propagate.c 23412 2017-08-09 15:07:09Z irigoin $
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 /* {{{ banner*/
28 /* package complementary sections : Manjunathaiah M , 18-4-96
29  *
30  * This File contains the functions computing the regions of a module :
31  * proper, local and global.
32  *
33  *
34  */
35 /* }}} */
36 
37 #include "all.h"
38 #include "prettyprint.h"
39 
40 #define IS_EG TRUE
41 #define NOT_EG FALSE
42 
43 #define PHI_FIRST TRUE
44 #define NOT_PHI_FIRST FALSE
45 
46 /* global static variable local_regions_map, and its access functions */
47 DEFINE_CURRENT_MAPPING(local_comp_regions, list)
48 
49 /* {{{ auxilliary functions*/
50 void CheckStride(loop __attribute__ ((unused)) Loop)
51 {
52  /* expression Stride = range_increment(loop_range(Loop)); */
53 
54 }
55 
56 /* just concatentate list for now : change later */
57 list CompRegionsExactUnion(list l1, list l2, bool __attribute__ ((unused)) (*union_combinable_p)(effect,effect))
58 {
59  return(gen_nconc(l1,l2));
60 }
61 
62 /* just concatentate list for now : change later */
63 list CompRegionsMayUnion(list l1, list l2, bool __attribute__ ((unused)) (*union_combinable_p)(effect,effect))
64 {
65  return(gen_nconc(l1,l2));
66 }
67 
68 
69 /* }}} */
70 
71 /* {{{ process the body of a procedure*/
72 /* ===============================================================================
73  *
74  * INTRAPROCEDURAL ARRAY REGIONS ANALYSIS
75  *
76  * =============================================================================== */
77 
78 /* {{{ intra procedural entry point "complementary_sections" calls comp_regions*/
79 /* {{{ comments*/
80 /* bool regions(const char* module_name)
81  * input : the name of the current module
82  * output : nothing.
83  * modifies : computes the local regions of a module.
84  * comment : local regions can contain local variables.
85  */
86 /* }}} */
87 bool comp_regions(const char* module_name)
88 {
89  /* {{{ code*/
90  /* {{{ initialize*/
91  /* regions_init(); */
92 
93  /* get the current properties concerning regions */
95 
96  /* Get the code of the module. */
98  db_get_memory_resource(DBR_CODE, module_name, true) );
99  /* }}} */
100  /* {{{ transformers and preconditions*/
101  /* Get the transformers and preconditions of the module. */
103  db_get_memory_resource(DBR_TRANSFORMERS, module_name, true) );
105  db_get_memory_resource(DBR_PRECONDITIONS, module_name, true) );
106  /* }}} */
107  /* {{{ predicates for purpose of debugging*/
108  /* predicates defining summary regions from callees have to be
109  translated into variables local to module */
111 
112 
114  db_get_memory_resource(DBR_CUMULATED_EFFECTS, module_name, true));
116  db_get_memory_resource(DBR_PROPER_EFFECTS, module_name, true));
118 
119  debug_on("COMP_REGIONS_DEBUG_LEVEL");
120  pips_debug(3, "begin\n");
121 
122  /* }}} */
123  /* }}} */
124  /* Compute the regions of the module. */
126  /* {{{ for dependence analysis : currently masked */
127  /* set_proper_regions_map( MAKE_STATEMENT_MAPPING() ); */
128  /* }}} */
130  /* {{{ code*/
131  /* {{{ debug stmts*/
132  /* if (op_statistics_p()) print_regions_op_statistics(module_name, R_RW); */
133 
134  pips_debug(3, "end\n");
135 
136  debug_off();
137  /* }}} */
138  /* {{{ store in database : modify later*/
139  DB_PUT_MEMORY_RESOURCE(DBR_COMPSEC,
142 
143 
144  /* DB_PUT_MEMORY_RESOURCE(DBR_PROPER_REGIONS,
145  strdup(module_name),
146  (char*) listmap_to_effectsmap(get_proper_regions_map()));
147  */
148  /* }}} */
149  /* {{{ finalise*/
157  /* }}} */
158  /* }}} */
159 
160  return(true);
161 }
162 /* }}} */
163 /* {{{ comp_regions_of_statement*/
164 /* {{{ comments*/
165 /* list comp_regions_of_statement(statement s)
166  * input : the current statement.
167  * output : a list of regions.
168  * modifies : the local regions_map.
169  * comment : computes the local regions of a statement and stores it
170  * in the local_regions_map.
171  */
172 /* }}} */
174 {
175  /* {{{ code*/
176  /* {{{ inits*/
177  transformer t_stat, context;
178  list lreg, lpropreg = NIL;
179 
180  ifdebug(3)
181  {
182  pips_debug(3, "begin\n\tComputation of regions of statement %03td\n",
183  statement_number(s));
184  }
185  /* }}} */
186  /* {{{ transformer and preconditions*/
188 
189  /* compute the regions on the instruction of the statement */
190  t_stat = load_statement_transformer(s);
191 
192  /* }}} */
193  /* }}} */
194 
196  t_stat, context, &lpropreg);
197 
198  /* {{{ code*/
199  /* {{{ store the result : currently masked, modify later*/
200  /* FI: make a copy to safely store that intermediate state in the mapping */
201  /* debug_regions_consistency(lreg);
202  debug_regions_consistency(lpropreg);
203  store_statement_proper_regions(s, lpropreg);
204  */
206  /* }}} */
207  /* }}} */
208 
209  return(lreg);
210 }
211 
212 /* }}} */
213 /* {{{ comp_regions_of_instruction*/
214 /* {{{ comments*/
215 /* list comp_regions_of_instruction(instruction i, transformer t_inst, context,
216  * list *plpropreg)
217  * input : the current instruction and the corresponding transformer
218  * and context (i.e. precondition), and a pointer that will contain
219  * the proper regions of the instruction.
220  * output : the corresponding list of regions.
221  * modifies : nothing.
222  */
223 /* }}} */
225  list *plpropreg)
226 {
227  /* {{{ init*/
228  list lreg = NIL;
229 
230  *plpropreg = NIL;
231 
232  /* }}} */
233  switch(instruction_tag(i))
234  {
235  /* {{{ code*/
236  case is_instruction_goto:
237  /* {{{ code*/
238  pips_debug(3, "goto\n");
239  break;
240  /* }}} */
241  case is_instruction_test:
242  /* {{{ code*/
243  ifdebug(3)
244  {
245  pips_debug(3, "test : %s\n",
247  }
248  lreg = comp_regions_of_test(instruction_test(i), context, plpropreg);
249  break;
250  /* }}} */
251  case is_instruction_loop:
252  /* {{{ code*/
253  ifdebug(3)
254  {
255  pips_debug(3, "loop : index %s\n",
257  }
258  lreg = comp_regions_of_loop(instruction_loop(i), t_inst, context, plpropreg);
259  break;
260  /* }}} */
261  case is_instruction_call:
262  /* {{{ code*/
263  ifdebug(3)
264  {
265  pips_debug(3, "call : %s\n",
267  }
268  lreg = comp_regions_of_call(instruction_call(i), context, plpropreg);
269  break;
270  /* }}} */
272  /* {{{ code*/
273  pips_debug(3, "unstructured\n");
275  break ;
276  /* }}} */
277  case is_instruction_block:
278  /* {{{ code*/
279  pips_debug(3, "inst block\n");
281  break;
282  /* }}} */
283  default:
284  pips_debug(3, "unexpected tag %d\n", instruction_tag(i));
285  /* }}} */
286  }
287 
288  return(lreg);
289 }
290 /* }}} */
291 /* {{{ comp_region_of_block*/
292 /* {{{ comment*/
293 /* list comp_regions_of_block(list linst)
294  * input : a list of instructions, representing a sequential block
295  * of instructions, and the context before the block.
296  * output : a list of regions
297  * modifies : linst.
298  * comment : calls itself recursively to calculate the list of regions.
299  */
300 /* }}} */
302 {
303  /* {{{ init*/
304  statement first_statement;
305  list remaining_block, first_s_regions, lres = NIL;
306 
307  pips_debug(3, "begin\n");
308  /* }}} */
309 
310  /* {{{ Is it end of list ? */
311  if (ENDP(linst))
312  {
313  user_warning("regions_of_block", "empty block\n");
314  lres = NIL;
315  }
316  /* }}} */
317  /* {{{ else process list*/
318  else
319  {
320  /* {{{ regions of CAR(linst)*/
321  first_statement = STATEMENT(CAR(linst));
322  remaining_block = CDR(linst);
323 
324  first_s_regions = comp_regions_of_statement(first_statement);
325  /* }}} */
326  /* {{{ any more statements in CDR(linst)*/
327  if (!ENDP(remaining_block))
328  {
329  /* {{{ load transformer*/
330  list r_block_regions = NIL;
331 
332  /* }}} */
333  r_block_regions = comp_regions_of_block(remaining_block);
334  /* {{{ perform union*/
335  /* {{{ don't know that this means ???*/
336  /* blocked : check later
337  list current_transformer = load_statement_transformer(first_statement);
338  debug_regions_consistency(r_block_regions);
339  project_regions_with_transformer_inverse(r_block_regions,
340  current_transformer,
341  NIL);
342 
343  debug_regions_consistency(r_block_regions);
344  */
345  /* }}} */
346  lres = CompRegionsExactUnion(first_s_regions, r_block_regions, effects_same_action_p);
347  /*
348  debug_regions_consistency(lres);
349  */
350  /* }}} */
351 
352  }
353  /* }}} */
354  /* {{{ if not lres = first_s_regions*/
355  else
356  lres = first_s_regions;
357  /* }}} */
358 
359  }
360  /* }}} */
361 
362  pips_debug(3, "end\n");
363  return lres;
364 }
365 /* }}} */
366 /* {{{ comp_regions of test*/
367 /* list regions_of_test(test t, transformer context, list *plpropreg)
368  * input : a test instruction, the context of the test, and a pointer
369  * toward a list that will contain the proper regions of the test,
370  * which are the regions of its conditionnal part.
371  * output : the corresponding list of regions.
372  * modifies : nothing.
373  */
374 list
377  list __attribute__ ((unused)) *plpropreg) {
378  /* {{{ init*/
379  list le, lt, lf, lc, lr;
380 
381  pips_debug(3, "begin\n");
382  /* }}} */
383 
384  /* {{{ if-then-else including if-condition*/
385  /* regions of the true branch */
387  /* regions of the false branch */
389  /* regions of the combination of both */
391 
392  /* regions of the condition */
394  /* check later
395  *plpropreg = comp_regions_dup(lc);
396  */
397  /* }}} */
398  /* {{{ union the regions : currently just add to the list*/
400  pips_debug(3, "end\n");
401  /* }}} */
402 
403  return(lr);
404 }
405 /* }}} */
406 /* {{{ comp_regions of loop*/
407 /* list comp_regions_of_loop(loop l, transfomer loop_trans, context, list *plpropreg)
408  * input : a loop, its transformer and its context, and a pointer toward a list,
409  * that will contain the proper regions of the loop, which are the
410  * regions of its range.
411  * output : the corresponding list of regions.
412  * modifies : nothing.
413  * comment :
414  */
415 list
417  transformer __attribute__ ((unused)) loop_trans,
419  list __attribute__ ((unused)) *plpropreg) {
420  /* {{{ init*/
421  list index_reg, body_reg, le;
422  /*
423  list global_reg;
424  entity i = loop_index(l);
425  */
426 
427  pips_debug(3, "begin\n");
428  /* }}} */
429 
430  /* CheckStride(l); */
431  /* regions of loop index. */
433  {
434  /* {{{ code*/
435  /* loop index is must-written but may-read because the loop might
436  execute no iterations. */
438 
439  index_reg = comp_regions_of_write(ref, context); /* the loop index is must-written */
440 
441  /* FI, RK: the may-read effect on the index variable is masked by
442  * the intial unconditional write on it (see standard page 11-7, 11.10.3);
443  * if masking is not performed, the read may prevent privatization
444  * somewhere else in the module (12 March 1993)
445  */
446  /* }}} */
447  }
448  else
449  index_reg = NIL ;
450 
451  /* {{{ regions of loop induction variable*/
452  /* regions of loop bound expressions. */
454  index_reg,
457  /* }}} */
458 
459  /* *plpropreg = regions_dup(le); */
460 
461  /* regions of loop body statement. */
462  body_reg = comp_regions_of_statement(loop_body(l));
463 
464  /* insert code to eliminate private variables later */
465 
466  /* projection of regions along the variables modified by the loop; it includes
467  * the projection along the loop index */
468 
469 
470  pips_debug(7, "elimination of variables modified by the loop.\n");
471 
472  /* {{{ In simple sections it is called translation !!*/
473  /*
474  project_regions_with_transformer_inverse(global_reg,
475  loop_trans,
476  CONS(ENTITY,i,NIL));
477  project_regions_along_loop_index(global_reg, i, loop_range(l));
478  */
479 
480  pips_debug(3, "Before Translations surrounding the loop index %s :\n",
482 
483  (void) TranslateRefsToLoop(l, body_reg);
484 
485  le = CompRegionsExactUnion(le, body_reg, effects_same_action_p);
486 
487  ifdebug(3) {
488  pips_debug(3, "After Translations surrounding the loop index %s :\n",
490  PrintCompRegions(le);
491  }
492 
493  pips_debug(3, "end\n");
494  /* }}} */
495 
496  return(le);
497 }
498 
499 /* }}} */
500 /* {{{ comp_regions of call*/
501 /* list comp_regions_of_call(call c, transformer context, list *plpropreg)
502  * input : a call, which can be a call to a subroutine, but also
503  * to an function, or to an intrinsic, or even an assignement.
504  * And a pointer that will be the proper regions of the call; NIL,
505  * except for an intrinsic (assignment or real FORTRAN intrinsic).
506  * output : the corresponding list of regions.
507  * modifies : nothing.
508  * comment :
509  */
511 {
512  list le = NIL;
513  entity e = call_function(c);
514  tag t = value_tag(entity_initial(e));
515  const char* n = module_local_name(e);
516  list pc = call_arguments(c);
517 
518  *plpropreg = NIL;
519 
520  pips_debug(3, "begin\n");
521 
522  switch (t)
523  {
524  /* {{{ code*/
525  case is_value_code:
526  pips_debug(3, "external function %s\n", n);
527  /* masked now : change later */
528  /*
529  le = comp_regions_of_external(e, pc, context);
530  */
531  break;
532 
533  case is_value_intrinsic:
534  pips_debug(3, "intrinsic function %s\n", n);
535  le = comp_regions_of_intrinsic(e, pc, context);
536  /* masked now : *plpropreg = regions_dup(le); */
537  break;
538 
539  case is_value_symbolic:
540  pips_debug(3, "symbolic\n");
541  break;
542 
543  case is_value_constant:
544  pips_debug(3, "constant\n");
545  break;
546 
547  case is_value_unknown:
548  pips_internal_error("unknown function %s", n);
549  break;
550 
551  default:
552  pips_internal_error("unknown tag %d", t);
553  /* }}} */
554  }
555 
556  pips_debug(3, "end\n");
557 
558  return(le);
559 }
560 
561 /* }}} */
562 /* {{{ comp_regions of unstructured*/
563 /* Computes the effects of the control graph. */
564 /* list comp_regions_of_unstructured( u , t_unst)
565  * input : an unstructured control flow graph and the corresponding
566  * transformer.
567  * output : the corresponding list of regions.
568  * modifies : nothing.
569  * comment :
570  */
572 {
573  control ct;
574  list blocs = NIL ;
575  list le = NIL ;
576 
577  pips_debug(3, "begin\n");
578 
579  ct = unstructured_control( u );
580 
581  if(control_predecessors(ct) == NIL && control_successors(ct) == NIL)
582  {
583  /* there is only one statement in u; no need for a fix-point */
584  pips_debug(3, "unique node\n");
586  }
587  else
588  {
589  CONTROL_MAP(c,
590  {
592  le, effects_same_action_p) ;
593  },ct, blocs) ;
595  gen_free_list(blocs) ;
596  }
597 
598  pips_debug(3, "end\n");
599 
600  return( le ) ;
601 }
602 /* }}} */
603 /* {{{ comp_regions_of_range*/
604 /* list comp_regions_of_range(range r, context)
605  * input : a loop range (bounds and stride) and the context.
606  * output : the corresponding list of regions.
607  * modifies : nothing.
608  * comment :
609  */
611 {
612  list le;
613  expression el = range_lower(r);
614  expression eu = range_upper(r);
615  expression ei = range_increment(r);
616 
617  pips_debug(3, "begin\n");
618 
624 
625  pips_debug(3, "end\n");
626  return(le);
627 }
628 /* }}} */
629 /* {{{ comp_regions_of_syntax*/
630 /* list comp_regions_of_syntax(syntax s, transformer context)
631  * input :
632  * output :
633  * modifies :
634  * comment :
635  */
637 {
638  list le = NIL, lpropreg = NIL;
639 
640  pips_debug(3, "begin\n");
641 
642  switch(syntax_tag(s))
643  {
644  /* {{{ code*/
645  case is_syntax_reference:
647  break;
648  case is_syntax_range:
650  break;
651  case is_syntax_call:
652  le = comp_regions_of_call(syntax_call(s), context, &lpropreg);
653  /* comp_desc_free(lpropreg); */
654  break;
655  default:
656  pips_internal_error("unexpected tag %d", syntax_tag(s));
657  /* }}} */
658  }
659 
660  ifdebug(3)
661  {
662  pips_debug(3, "Regions of expression %s :\n",
664  print_regions(le);
665  }
666 
667  pips_debug(3, "end\n");
668  return(le);
669 }
670 /* }}} */
671 /* {{{ comp_regions_of_expressions*/
672 /* list comp_regions_of_expressions(list exprs, transformer context)
673  * input : a list of expressions and the current context.
674  * output : the correpsonding list of regions.
675  * modifies : nothing.
676  * comment :
677  */
679 {
680  list le = NIL;
681 
682  pips_debug(3, "begin\n");
683 
684  MAP(EXPRESSION, exp,
685  {
688  },
689  exprs);
690 
691  pips_debug(5, "end\n");
692  return(le);
693 }
694 /* {{{ comp_regions_of_expression*/
695 /* list comp_regions_of_expression(expression e, transformer context)
696  * input : an expression and the current context
697  * output : the correpsonding list of regions.
698  * modifies : nothing.
699  * comment :
700  */
702 {
704 }
705 /* }}} */
706 
707 /* }}} */
708 /* {{{ comp_regions_of_read*/
709 /* list comp_regions_of_read(reference ref, transformer context)
710  * input : a reference that is read, and the current context.
711  * output : the corresponding list of regions.
712  * modifies : nothing.
713  * comment :
714  */
716 {
717  /* {{{ init*/
718  list inds = reference_indices(ref);
719  list le = NIL;
720  comp_desc Cdesc;
722 
723  pips_debug(3, "begin\n");
724  /* }}} */
725 
726  /* {{{ code*/
727  /* {{{ this read reference*/
728  if (! entity_scalar_p(e) )
729  {
730  Cdesc = InitCompDesc(ref, is_action_read);
731  le = CONS(COMP_DESC, Cdesc, le);
732  }
733  /* }}} */
734  /* {{{ rest of the references in an expression*/
735  if (! ENDP(inds))
737 
738  /* }}} */
739  /* }}} */
740 
741  pips_debug(3, "end\n");
742  return(le);
743 }
744 /* }}} */
745 /* {{{ comp_regions_of_write*/
746 /* regions of a reference that is written */
747 /* list comp_regions_of_write(reference ref, transformer context)
748  * input : a reference that is written, and the current context.
749  * output : the corresponding list of regions.
750  * modifies : nothing.
751  * comment :
752  */
754 {
755  /* {{{ init*/
756  comp_desc Cdesc;
757  list le = NIL;
759  list inds = reference_indices(ref);
760  /* }}} */
761 
762  pips_debug(3, "begin\n");
763 
764  /* {{{ this write */
765  if (! entity_scalar_p(e) )
766  {
767  Cdesc = InitCompDesc(ref, is_action_write);
768  le = CONS(COMP_DESC, Cdesc, le);
769  }
770  /* }}} */
771  /* {{{ check for arrays in subscripts*/
772  if (! ENDP(inds))
774 
775  /* }}} */
776 
777  pips_debug(3, "end\n");
778 
779  return(le);
780 }
781 /* }}} */
782 
783 /* }}} */
784 
785 
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
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
void store_statement_local_comp_regions(statement, list)
list comp_regions_dup(list)
REGIONS AND LISTS OF REGIONS MANIPULATION
Definition: dbase.c:82
statement_mapping get_local_comp_regions_map(void)
statement_mapping listmap_to_compsecs_map(statement_mapping)
Definition: dbase.c:47
void free_local_comp_regions_map(void)
void TranslateRefsToLoop(loop, list)
}}
Definition: ss.c:577
comp_desc InitCompDesc(reference, tag)
operators.c
Definition: operators.c:30
void set_local_comp_regions_map(statement_mapping)
void PrintCompRegions(list)
}}
Definition: ss.c:74
list comp_regions_of_intrinsic(entity, list, transformer)
myintrinsics.c
Definition: myintrinsics.c:270
#define COMP_DESC(x)
COMP_DESC.
Definition: compsec.h:146
void print_regions(list)
void project_regions_along_parameters(list, list)
void project_regions_along_parameters(list l_reg, list l_param) input : a list of regions to project,...
void get_regions_properties(void)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
void reset_cumulated_rw_effects(void)
bool effects_same_action_p(effect, effect)
@ is_action_write
Definition: effects.h:293
@ is_action_read
Definition: effects.h:292
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
#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
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#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 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 CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#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
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
Definition: pipsdbm-local.h:66
#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_internal_error
Definition: misc-local.h:149
#define debug_off()
Definition: misc-local.h:160
#define user_warning(fn,...)
Definition: misc-local.h:262
#define DEFINE_CURRENT_MAPPING(name, type)
Definition: newgen-local.h:58
#define MAKE_STATEMENT_MAPPING()
Definition: newgen-local.h:43
int tag
TAG.
Definition: newgen_types.h:92
string expression_to_string(expression e)
Definition: expression.c:77
list Words_Syntax(syntax obj)
Definition: misc.c:2664
list comp_regions_of_syntax(syntax s, transformer context)
}}}
Definition: propagate.c:636
list comp_regions_of_expression(expression e, transformer context)
{{{ comp_regions_of_expression
Definition: propagate.c:701
list comp_regions_of_unstructured(unstructured u, transformer t_unst)
}}}
Definition: propagate.c:571
list comp_regions_of_block(list linst)
}}}
Definition: propagate.c:301
list comp_regions_of_statement(statement s)
}}}
Definition: propagate.c:173
list CompRegionsExactUnion(list l1, list l2, bool __attribute__((unused))(*union_combinable_p)(effect, effect))
just concatentate list for now : change later
Definition: propagate.c:57
list comp_regions_of_test(test t, transformer context, list __attribute__((unused)) *plpropreg)
}}}
Definition: propagate.c:375
list comp_regions_of_expressions(list exprs, transformer context)
}}}
Definition: propagate.c:678
list comp_regions_of_loop(loop l, transformer __attribute__((unused)) loop_trans, transformer context, list __attribute__((unused)) *plpropreg)
}}}
Definition: propagate.c:416
list comp_regions_of_range(range r, transformer context)
}}}
Definition: propagate.c:610
list comp_regions_of_instruction(instruction i, transformer t_inst, transformer context, list *plpropreg)
}}}
Definition: propagate.c:224
list CompRegionsMayUnion(list l1, list l2, bool __attribute__((unused))(*union_combinable_p)(effect, effect))
just concatentate list for now : change later
Definition: propagate.c:63
list comp_regions_of_call(call c, transformer context, list *plpropreg)
}}}
Definition: propagate.c:510
list comp_regions_of_write(reference ref, transformer context)
}}}
Definition: propagate.c:753
void CheckStride(loop __attribute__((unused)) Loop)
global static variable local_regions_map, and its access functions
Definition: propagate.c:50
bool comp_regions(const char *module_name)
}}}
Definition: propagate.c:87
list comp_regions_of_read(reference ref, transformer context)
}}}
Definition: propagate.c:715
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
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
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
Definition: variable.c:1113
#define value_tag(x)
Definition: ri.h:3064
#define loop_body(x)
Definition: ri.h:1644
#define loop_execution(x)
Definition: ri.h:1648
#define syntax_reference(x)
Definition: ri.h:2730
#define syntax_tag(x)
Definition: ri.h:2727
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define control_predecessors(x)
Definition: ri.h:943
#define range_upper(x)
Definition: ri.h:2290
#define instruction_loop(x)
Definition: ri.h:1520
#define test_false(x)
Definition: ri.h:2837
@ is_value_intrinsic
Definition: ri.h:3034
@ is_value_unknown
Definition: ri.h:3035
@ is_value_constant
Definition: ri.h:3033
@ is_value_code
Definition: ri.h:3031
@ is_value_symbolic
Definition: ri.h:3032
#define syntax_range(x)
Definition: ri.h:2733
@ is_syntax_range
Definition: ri.h:2692
@ is_syntax_call
Definition: ri.h:2693
@ is_syntax_reference
Definition: ri.h:2691
#define range_increment(x)
Definition: ri.h:2292
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
@ is_instruction_goto
Definition: ri.h:1473
@ is_instruction_unstructured
Definition: ri.h:1475
@ is_instruction_test
Definition: ri.h:1470
@ is_instruction_call
Definition: ri.h:1474
@ is_instruction_loop
Definition: ri.h:1471
#define instruction_tag(x)
Definition: ri.h:1511
#define execution_sequential_p(x)
Definition: ri.h:1208
#define test_true(x)
Definition: ri.h:2835
#define transformer_arguments(x)
Definition: ri.h:2871
#define reference_indices(x)
Definition: ri.h:2328
#define syntax_call(x)
Definition: ri.h:2736
#define control_successors(x)
Definition: ri.h:945
#define test_condition(x)
Definition: ri.h:2833
#define range_lower(x)
Definition: ri.h:2288
#define statement_instruction(x)
Definition: ri.h:2458
#define instruction_call(x)
Definition: ri.h:1529
#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 instruction_test(x)
Definition: ri.h:1517
#define statement_number(x)
Definition: ri.h:2452
#define expression_syntax(x)
Definition: ri.h:1247
#define instruction_unstructured(x)
Definition: ri.h:1532
#define loop_index(x)
Definition: ri.h:1640
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
#define entity_initial(x)
Definition: ri.h:2796
char * strdup()
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
Definition: mappings.c:624
transformer load_statement_precondition(statement)
void set_transformer_map(statement_mapping)
transformer load_statement_transformer(statement)
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
void reset_transformer_map(void)
#define ifdebug(n)
Definition: sg.c:47
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: delay.c:253
string words_to_string(cons *lw)
Definition: print.c:211
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207