PIPS
alias_classes.c File Reference
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "effects-util.h"
#include "misc.h"
#include "effects-generic.h"
#include "effects-convex.h"
#include "semantics.h"
#include "transformer.h"
#include "pipsdbm.h"
#include "alias-classes.h"
+ Include dependency graph for alias_classes.c:

Go to the source code of this file.

Functions

static bool same_reg_ignore_action (region reg1, region reg2)
 tests if reg1 and reg2 are the same, ignoring their action_tags (IN/OUT) but checking their precision (may/exact) More...
 
static bool member (region reg, list reg_list)
 tests if reg and any member of reg_list are same_reg_ignore_action More...
 
static list append_reg_if_not_present (list reg_list, region reg)
 adds reg as final element on the end of reg_list unless reg is already present in reg_list i.e. More...
 
static list union_lists (list initial_reg_list, list additional_list)
 add a copy of each element in additional_list not already present in initial_reg_list to the end of initial_reg_list (ignoring the action) More...
 
static void compare_other_list (region elem, list other_list)
 global variables IN: rest_list, l_lists global variables modified: rest_list, l_lists More...
 
static void compare_rest_lists (region elem)
 global variables IN: rest_list, rest_lists, l_lists global variables modified: rest_list, l_lists, rest_lists compares "elem" (the current element from the list currently being made into a class) to each element of each list of "rest_lists" (the other lists not yet made into classes) if a match is found, "other_list" (the other list containing the matching element "other_elem") is appended to "rest_list" (the not yet treated elements from the list currently being made into a class) and "other_list" will no longer be a member of "l_lists" if not, "other_list" is appended to "l_lists" More...
 
static void make_class_from_list (list reg_list)
 global variables IN: new_class, rest_lists, l_lists global variables modified: new_class, l_lists, rest_lists, rest_list More...
 
static void unite_lists_containing_same_exact_region ()
 global variables IN: l_lists, l_alias_classes global variables modified:class, l_lists, rest_lists, rest_list, l_alias_classes More...
 
static list compare_heads_rest_lists (region head, list new_list)
 global variables IN: l_alias_lists global variables modified: l_alias_lists compares "head" (the head of the current list) to the head of each list of "rest_lists" (the other lists not yet treated) if a match is found, "other_list" (the other list containing the matching head "other_head") is appended to "new_list" and "other_list" will no longer be a member of "l_alias_lists" if not, "other_list" is appended to "l_alias_lists" More...
 
static void unite_lists_with_same_head ()
 global variables IN: l_alias_lists, l_lists global variables modified: l_alias_lists, l_lists More...
 
bool alias_classes (const char *module_name)
 alias_classes.c More...
 

Variables

static list l_alias_lists
 
static list l_alias_classes
 
static list l_lists
 
static list new_class
 
static list rest_list
 
static list rest_lists
 

Function Documentation

◆ alias_classes()

bool alias_classes ( const char *  module_name)

alias_classes.c

ATTENTION: we have to do ALL this just to call print_inout_regions for debug !!

and this to call print_region set_action_interpretation(ACTION_IN,ACTION_OUT);

that's it, but we musn't forget to reset everything below

ifdebug(9) { pips_debug(9,"add list:\n"); print_inout_regions(module_alias_list); }

Parameters
module_nameodule_name

Definition at line 514 of file alias_classes.c.

515 {
516  entity module;
517  list module_alias_lists;
518 
519  debug_on("ALIAS_CLASSES_DEBUG_LEVEL");
520  pips_debug(4,"begin for module %s\n",module_name);
521  ifdebug(4)
522  {
523  /* ATTENTION: we have to do ALL this
524  * just to call print_inout_regions for debug !!
525  */
530  db_get_memory_resource(DBR_CODE,
531  module_name,
532  true) );
535  DBR_CUMULATED_EFFECTS,
536  module_name,
537  true));
540  DBR_PROPER_EFFECTS,
541  module_name,
542  true));
544  /* and this to call print_region
545  set_action_interpretation(ACTION_IN,ACTION_OUT); */
546  /* that's it, but we musn't forget to reset everything below */
547  }
548 
549  l_alias_lists = NIL;
551  l_lists = NIL;
552 
553  module_alias_lists =
555  db_get_memory_resource(DBR_ALIAS_LISTS,
556  module_name,
557  true));
558  MAP(EFFECTS,module_alias_list_effects,
559  {
560  list module_alias_list =
561  effects_effects(module_alias_list_effects);
562 
563 /* ifdebug(9)
564  {
565  pips_debug(9,"add list:\n");
566  print_inout_regions(module_alias_list);
567  }
568  */
569  l_alias_lists = CONS(LIST,module_alias_list,l_alias_lists);
570  },module_alias_lists);
571 
572  ifdebug(9)
573  {
574  pips_debug(9,"alias lists:\n");
575  MAP(LIST,alias_list,
576  {
577  print_inout_regions(alias_list);
578  pips_debug(9,"---\n");
579  },
580  l_alias_lists);
581  }
582 
584 
585  ifdebug(9)
586  {
587  pips_debug(9,"new lists:\n");
588  MAP(LIST,alias_list,
589  {
590  print_inout_regions(alias_list);
591  pips_debug(9,"---\n");
592  },
593  l_lists);
594  }
595 
597 
598  ifdebug(9)
599  {
600  pips_debug(9,"classes:\n");
601  MAP(EFFECTS,alias_class,
602  {
603  print_inout_regions(effects_effects(alias_class));
604  },
606  }
607 
608  DB_PUT_MEMORY_RESOURCE(DBR_ALIAS_CLASSES,
611 
612  ifdebug(4)
613  {
619  }
620  pips_debug(4,"end\n");
621  debug_off();
622 
623  return true;
624 }
effects_classes make_effects_classes(list a)
Definition: effects.c:526
static list l_alias_lists
Definition: alias_classes.c:54
static void unite_lists_containing_same_exact_region()
global variables IN: l_lists, l_alias_classes global variables modified:class, l_lists,...
static void unite_lists_with_same_head()
global variables IN: l_alias_lists, l_lists global variables modified: l_alias_lists,...
static list l_alias_classes
Definition: alias_classes.c:54
static list l_lists
Definition: alias_classes.c:55
void print_inout_regions(list)
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)
#define EFFECTS(x)
EFFECTS.
Definition: effects.h:682
#define effects_effects(x)
Definition: effects.h:710
#define effects_classes_classes(x)
Definition: effects.h:678
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
#define LIST(x)
Definition: genC.h:93
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
#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
#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 debug_off()
Definition: misc-local.h:160
static char * module
Definition: pips.c:74
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
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
#define ifdebug(n)
Definition: sg.c:47
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
void free_value_mappings(void)
Normal call to free the mappings.
Definition: value.c:1212

References CONS, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, EFFECTS, effects_classes_classes, effects_effects, free_value_mappings(), get_current_module_entity(), ifdebug, l_alias_classes, l_alias_lists, l_lists, LIST, local_name_to_top_level_entity(), make_effects_classes(), MAP, module, module_name(), module_to_value_mappings(), NIL, pips_debug, print_inout_regions(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_proper_rw_effects(), strdup(), unite_lists_containing_same_exact_region(), and unite_lists_with_same_head().

+ Here is the call graph for this function:

◆ append_reg_if_not_present()

static list append_reg_if_not_present ( list  reg_list,
region  reg 
)
static

adds reg as final element on the end of reg_list unless reg is already present in reg_list i.e.

is same_reg_ignore_action as an element of reg_list

Definition at line 160 of file alias_classes.c.

161 {
162  list new_reg_list;
163 
164  pips_debug(4,"begin\n");
165 
166 
167 /*
168  ifdebug(9)
169  {
170  set_action_interpretation(ACTION_IN,ACTION_OUT);
171  pips_debug(9,"add:\n\t");
172  print_region(reg);
173  pips_debug(9,"to:\n\t");
174  print_inout_regions(reg_list);
175  reset_action_interpretation();
176  }
177 */
178 
179  if (!member(reg,reg_list))
180  new_reg_list = gen_nconc(reg_list,CONS(EFFECT,reg,NIL));
181  else
182  new_reg_list = reg_list;
183 
184  pips_debug(4,"end\n");
185 
186  return new_reg_list;
187 }
static bool member(region reg, list reg_list)
tests if reg and any member of reg_list are same_reg_ignore_action
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344

References CONS, EFFECT, gen_nconc(), member(), NIL, and pips_debug.

Referenced by union_lists().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compare_heads_rest_lists()

static list compare_heads_rest_lists ( region  head,
list  new_list 
)
static

global variables IN: l_alias_lists global variables modified: l_alias_lists compares "head" (the head of the current list) to the head of each list of "rest_lists" (the other lists not yet treated) if a match is found, "other_list" (the other list containing the matching head "other_head") is appended to "new_list" and "other_list" will no longer be a member of "l_alias_lists" if not, "other_list" is appended to "l_alias_lists"

here, we don't need to account of the actions of the two regions: if a sub-program has the same IN and OUT regions for one array, then we will have created two alias lists which are identical except for the actions of the regions: now we get rid of one

Definition at line 403 of file alias_classes.c.

404 {
406  region other_head;
407 
409  l_alias_lists = NIL;
410 
411  MAP(LIST, other_list,
412  {
413  ifdebug(4)
414  {
415  pips_debug(4,"begin for:\n");
417  print_region(head);
419  }
420 
421  if (other_list != NIL)
422  {
423  other_head = EFFECT(CAR(other_list));
424 
425  ifdebug(9)
426  {
427  pips_debug(9,"compare elem:\n");
429  print_region(other_head);
431  }
432 
433 /* here, we don't need to account of the actions of the
434  * two regions: if a sub-program has the same IN and
435  * OUT regions for one array, then we will have
436  * created two alias lists which are identical except for
437  * the actions of the regions: now we get rid of one
438  */
439  if ( same_reg_ignore_action(head,other_head) )
440  {
441  pips_debug(9,"same\n");
442 
443  new_list = union_lists(new_list,CDR(other_list));
444  }
445  else
446  {
447  l_alias_lists = CONS(LIST,other_list,l_alias_lists);
448  }
449  }
450 
451  },rest_lists);
452 
453  pips_debug(4,"end\n");
454 
455  return new_list;
456 }
static list rest_lists
Definition: alias_classes.c:55
static bool same_reg_ignore_action(region reg1, region reg2)
tests if reg1 and reg2 are the same, ignoring their action_tags (IN/OUT) but checking their precision...
Definition: alias_classes.c:63
static list union_lists(list initial_reg_list, list additional_list)
add a copy of each element in additional_list not already present in initial_reg_list to the end of i...
#define region
simulation of the type region
#define ACTION_IN
#define ACTION_OUT
void reset_action_interpretation(void)
void set_action_interpretation(string, string)
prettyprint.c
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define print_region(x)
Definition: print.c:343

References ACTION_IN, ACTION_OUT, CAR, CDR, CONS, EFFECT, ifdebug, l_alias_lists, LIST, MAP, NIL, pips_debug, print_region, region, reset_action_interpretation(), rest_lists, same_reg_ignore_action(), set_action_interpretation(), and union_lists().

Referenced by unite_lists_with_same_head().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compare_other_list()

static void compare_other_list ( region  elem,
list  other_list 
)
static

global variables IN: rest_list, l_lists global variables modified: rest_list, l_lists

here, it doesn't matter whether the regions have the same action

Definition at line 218 of file alias_classes.c.

219 {
220  bool result = false;
221  region other_elem;
222  list rest_other_list;
223 
224  ifdebug(4)
225  {
226  pips_debug(4,"begin for elem:\n");
228  print_region(elem);
230  pips_debug(4,"and list:\n");
231  print_inout_regions(other_list);
232  }
233 
234  if (other_list != NIL)
235  {
236  rest_other_list = other_list;
237  do {
238  other_elem = EFFECT(CAR(rest_other_list));
239  rest_other_list = CDR(rest_other_list);
240 
241  ifdebug(9)
242  {
243  pips_debug(9,"compare elem:\n");
245  print_region(other_elem);
247  }
248 
249  if ( effect_exact_p(other_elem) )
250  {
251  pips_debug(9,"exact\n");
252 
253 /* here, it doesn't matter whether the regions have the same action */
254  if ( same_reg_ignore_action(elem,other_elem) )
255  {
256  pips_debug(9,"same\n");
257 
258  rest_list = union_lists(rest_list,other_list);
259  result = true;
260  }
261  }
262  } while (result == false && rest_other_list != NIL);
263  if (result == false)
264  l_lists = CONS(LIST,other_list,l_lists);
265  }
266  pips_debug(4,"end\n");
267 }
static list rest_list
Definition: alias_classes.c:55
#define effect_exact_p(eff)

References ACTION_IN, ACTION_OUT, CAR, CDR, CONS, EFFECT, effect_exact_p, ifdebug, l_lists, LIST, NIL, pips_debug, print_inout_regions(), print_region, region, reset_action_interpretation(), rest_list, same_reg_ignore_action(), set_action_interpretation(), and union_lists().

Referenced by compare_rest_lists().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compare_rest_lists()

static void compare_rest_lists ( region  elem)
static

global variables IN: rest_list, rest_lists, l_lists global variables modified: rest_list, l_lists, rest_lists compares "elem" (the current element from the list currently being made into a class) to each element of each list of "rest_lists" (the other lists not yet made into classes) if a match is found, "other_list" (the other list containing the matching element "other_elem") is appended to "rest_list" (the not yet treated elements from the list currently being made into a class) and "other_list" will no longer be a member of "l_lists" if not, "other_list" is appended to "l_lists"

Definition at line 284 of file alias_classes.c.

285 {
286  list other_list;
287 
288  while (rest_lists != NIL)
289  {
290  ifdebug(4)
291  {
292  pips_debug(4,"begin for:\n");
294  print_region(elem);
296  }
297 
298  other_list = LIST(CAR(rest_lists));
300  compare_other_list(elem, other_list);
301  }
302  pips_debug(4,"end\n");
303 }
static void compare_other_list(region elem, list other_list)
global variables IN: rest_list, l_lists global variables modified: rest_list, l_lists

References ACTION_IN, ACTION_OUT, CAR, CDR, compare_other_list(), ifdebug, LIST, NIL, pips_debug, print_region, reset_action_interpretation(), rest_lists, and set_action_interpretation().

Referenced by make_class_from_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_class_from_list()

static void make_class_from_list ( list  reg_list)
static

global variables IN: new_class, rest_lists, l_lists global variables modified: new_class, l_lists, rest_lists, rest_list

Definition at line 310 of file alias_classes.c.

311 {
312  region elem;
313 
314  ifdebug(4)
315  {
316  pips_debug(4,"begin for:\n");
317  print_inout_regions(reg_list);
318  }
319 
320  rest_list = reg_list;
321 
322  while (rest_list != NIL)
323  {
324  elem = EFFECT(CAR(rest_list));
326 
327  ifdebug(9)
328  {
329  pips_debug(9,"elem:\n");
331  print_region(elem);
333  }
334 
335  if ( effect_exact_p(elem) )
336  {
337  pips_debug(9,"exact\n");
338 
340  l_lists = NIL;
341  compare_rest_lists(elem);
342  }
344  }
345 
346  pips_debug(4,"end\n");
347 }
static list new_class
Definition: alias_classes.c:55
static void compare_rest_lists(region elem)
global variables IN: rest_list, rest_lists, l_lists global variables modified: rest_list,...

References ACTION_IN, ACTION_OUT, CAR, CDR, compare_rest_lists(), CONS, EFFECT, effect_exact_p, gen_nconc(), ifdebug, l_lists, new_class, NIL, pips_debug, print_inout_regions(), print_region, region, reset_action_interpretation(), rest_list, rest_lists, and set_action_interpretation().

Referenced by unite_lists_containing_same_exact_region().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ member()

static bool member ( region  reg,
list  reg_list 
)
static

tests if reg and any member of reg_list are same_reg_ignore_action

Definition at line 113 of file alias_classes.c.

114  {
115  region elem;
116  list rest_list;
117  bool result = false;
118 
119  pips_debug(4,"begin\n");
120 
121 /*
122  ifdebug(9)
123  {
124  set_action_interpretation(ACTION_IN,ACTION_OUT);
125  pips_debug(9,"test if:\n\t");
126  print_region(reg);
127  pips_debug(9,"is in:\n\t");
128  print_inout_regions(reg_list);
129  reset_action_interpretation();
130  }
131  */
132 
133  rest_list = reg_list;
134 
135  if (reg_list != NIL)
136 
137  do{
138  elem = EFFECT(CAR(rest_list));
139  if (same_reg_ignore_action(elem,reg))
140  {
141  result = true;
142 
143  pips_debug(4,"is member\n");
144  }
145 
147  }while (rest_list != NIL && result == false);
148 
149  pips_debug(4,"end\n");
150 
151  return result;
152  }

References CAR, CDR, EFFECT, NIL, pips_debug, region, rest_list, and same_reg_ignore_action().

Referenced by append_reg_if_not_present(), and tile_membership().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_reg_ignore_action()

static bool same_reg_ignore_action ( region  reg1,
region  reg2 
)
static

tests if reg1 and reg2 are the same, ignoring their action_tags (IN/OUT) but checking their precision (may/exact)

pips_debug(1,"same entity\n");

pips_debug(1,"same approx\n");

Definition at line 63 of file alias_classes.c.

64  {
65  Psysteme reg1_sys, reg2_sys;
66  bool result = false;
67 
68  pips_debug(4,"begin\n");
69 
70  if (effect_undefined_p(reg1) || effect_undefined_p(reg2)) return result;
71 
72  if (effect_entity(reg1) == effect_entity(reg2))
73  {
74 /* pips_debug(1,"same entity\n"); */
75 
76  if (effect_approximation_tag(reg1) ==
78  {
79 /* pips_debug(1,"same approx\n"); */
80 
81  ifdebug(1)
82  {
84  pips_debug(1,"compare:\n\t");
85  print_region(reg1);
86  pips_debug(1,"with:\n\t");
87  print_region(reg2);
89  }
90 
91  reg1_sys = region_system(reg1);
92  reg2_sys = region_system(reg2);
93  if ( sc_equal_p_ofl(reg1_sys,reg2_sys) )
94  {
95  result = true;
96 
97  pips_debug(1,"same region\n");
98  }
99  else
100  pips_debug(1,"not same region\n");
101  }
102  }
103  pips_debug(4,"end\n");
104 
105  return result;
106  }
#define region_system(reg)
#define effect_approximation_tag(eff)
entity effect_entity(effect)
cproto-generated files
Definition: effects.c:52
#define effect_undefined_p(x)
Definition: effects.h:615
#define sc_equal_p_ofl(ps1, ps2)
Definition: union-local.h:84

References ACTION_IN, ACTION_OUT, effect_approximation_tag, effect_entity(), effect_undefined_p, ifdebug, pips_debug, print_region, region_system, reset_action_interpretation(), sc_equal_p_ofl, and set_action_interpretation().

Referenced by compare_heads_rest_lists(), compare_other_list(), and member().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ union_lists()

static list union_lists ( list  initial_reg_list,
list  additional_list 
)
static

add a copy of each element in additional_list not already present in initial_reg_list to the end of initial_reg_list (ignoring the action)

Definition at line 196 of file alias_classes.c.

197 {
198  list new_reg_list = initial_reg_list;
199 
200  pips_debug(4,"begin\n");
201 
202  MAP(EFFECT,additional_reg,
203  {
204  new_reg_list =
205  append_reg_if_not_present(new_reg_list,additional_reg);
206  },additional_list);
207 
208  pips_debug(4,"end\n");
209 
210  return new_reg_list;
211 }
static list append_reg_if_not_present(list reg_list, region reg)
adds reg as final element on the end of reg_list unless reg is already present in reg_list i....

References append_reg_if_not_present(), EFFECT, MAP, and pips_debug.

Referenced by compare_heads_rest_lists(), and compare_other_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unite_lists_containing_same_exact_region()

static void unite_lists_containing_same_exact_region ( )
static

global variables IN: l_lists, l_alias_classes global variables modified:class, l_lists, rest_lists, rest_list, l_alias_classes

ifdebug(9) { pips_debug(9,"new_class:\n"); print_inout_regions(new_class);
pips_debug(9,"l_lists:\n"); MAP(LIST,alias_list, { print_inout_regions(alias_list);
pips_debug(9,"---\n"); }, l_lists); }

if (l_lists != NIL) unite_lists_containing_same_exact_region();

Definition at line 355 of file alias_classes.c.

356 {
357  list next_list;
358 
359  while (l_lists != NIL)
360  {
361  pips_debug(4,"begin\n");
362 
363  next_list = LIST(CAR(l_lists));
364  l_lists = CDR(l_lists);
365  new_class = NIL;
366 
367  make_class_from_list(next_list);
371 
372 /* ifdebug(9)
373  {
374  pips_debug(9,"new_class:\n");
375  print_inout_regions(new_class);
376  pips_debug(9,"l_lists:\n");
377  MAP(LIST,alias_list,
378  {
379  print_inout_regions(alias_list);
380  pips_debug(9,"---\n");
381  },
382  l_lists);
383  }*/
384 
385 /* if (l_lists != NIL) unite_lists_containing_same_exact_region(); */
386  }
387  pips_debug(4,"end\n");
388 }
effects make_effects(list a)
Definition: effects.c:568
static void make_class_from_list(list reg_list)
global variables IN: new_class, rest_lists, l_lists global variables modified: new_class,...
list regions_dup(list)

References CAR, CDR, CONS, EFFECTS, l_alias_classes, l_lists, LIST, make_class_from_list(), make_effects(), new_class, NIL, pips_debug, and regions_dup().

Referenced by alias_classes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unite_lists_with_same_head()

static void unite_lists_with_same_head ( )
static

global variables IN: l_alias_lists, l_lists global variables modified: l_alias_lists, l_lists

ifdebug(9) { pips_debug(9,"new_list:\n"); print_inout_regions(new_list);
pips_debug(9,"l_alias_lists:\n"); MAP(LIST,alias_list, { print_inout_regions(alias_list);
pips_debug(9,"---\n"); }, l_alias_lists); }

Definition at line 463 of file alias_classes.c.

464 {
465  list next_list, new_list;
466  region head;
467 
468  pips_debug(4,"begin\n");
469 
470  while (l_alias_lists != NIL)
471  {
472 
473  next_list = LIST(CAR(l_alias_lists));
475  new_list = next_list;
476 
477  if (next_list != NIL)
478  {
479  head = EFFECT(CAR(next_list));
480 
481  ifdebug(9)
482  {
483  pips_debug(9,"head:\n");
485  print_region(head);
487  }
488 
489  new_list = compare_heads_rest_lists(head, new_list);
490  }
491 
492  l_lists = CONS(LIST,new_list,l_lists);
493 
494 /* ifdebug(9)
495  {
496  pips_debug(9,"new_list:\n");
497  print_inout_regions(new_list);
498  pips_debug(9,"l_alias_lists:\n");
499  MAP(LIST,alias_list,
500  {
501  print_inout_regions(alias_list);
502  pips_debug(9,"---\n");
503  },
504  l_alias_lists);
505  }
506  */
507  }
508 
509  pips_debug(4,"end\n");
510 }
static list compare_heads_rest_lists(region head, list new_list)
global variables IN: l_alias_lists global variables modified: l_alias_lists compares "head" (the head...

References ACTION_IN, ACTION_OUT, CAR, CDR, compare_heads_rest_lists(), CONS, EFFECT, ifdebug, l_alias_lists, l_lists, LIST, NIL, pips_debug, print_region, region, reset_action_interpretation(), and set_action_interpretation().

Referenced by alias_classes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ l_alias_classes

list l_alias_classes
static

Definition at line 54 of file alias_classes.c.

Referenced by alias_classes(), and unite_lists_containing_same_exact_region().

◆ l_alias_lists

list l_alias_lists
static

◆ l_lists

◆ new_class

list new_class
static

◆ rest_list

list rest_list
static

Definition at line 55 of file alias_classes.c.

Referenced by compare_other_list(), make_class_from_list(), and member().

◆ rest_lists

list rest_lists
static