PIPS
adg_utils.c File Reference
#include "local.h"
+ Include dependency graph for adg_utils.c:

Go to the source code of this file.

Macros

#define GRAPH_IS_DG
 Name : adg_utils.c Package : array_dfg Author : Arnauld LESERVOT Date : 93/06/27 Modified : Documents: Platonoff's thesis and Leservot's thesis "Dataflow Analysis of Array and Scalar References" P. More...
 

Functions

void adg_fill_with_quast (quast *in_pq, quast in_q)
 ====================================================================== More...
 
entity adg_get_integer_entity (int in_i)
 ====================================================================== More...
 
quast adg_compact_quast (quast in_q)
 ====================================================================== More...
 
bool adg_quast_equal_p (quast in_q1, quast in_q2)
 ====================================================================== More...
 
bool adg_quast_value_equal_p (quast_value in_qv1, quast_value in_qv2)
 ====================================================================== More...
 
bool adg_quast_leaf_equal_p (quast_leaf in_ql1, quast_leaf in_ql2)
 ====================================================================== More...
 
bool adg_quast_leaf_label_equal_p (quast in_q1, quast in_q2)
 ====================================================================== More...
 
bool adg_quast_leaf_solution_equal_p (quast in_q1, quast in_q2)
 ====================================================================== More...
 
Psysteme adg_sc_dup (Psysteme in_ps)
 ====================================================================== More...
 
bool adg_is_textualy_after_p (statement in_s1, statement in_s2)
 ====================================================================== More...
 
void adg_sc_update_base (Psysteme *in_pps)
 ====================================================================== More...
 
Psysteme adg_suppress_2nd_in_1st_ps (Psysteme in_ps1, Psysteme in_ps2)
 ====================================================================== More...
 
int adg_number_of_same_loops (list in_l1, list in_l2)
 ====================================================================== More...
 
statement adg_number_to_statement (int in_nb)
 ====================================================================== More...
 
void adg_enrichir (quast in_qu, leaf_label in_ll)
 ====================================================================== More...
 
predicate predicate_dup (predicate in_pred)
 ====================================================================== More...
 
dfg_vertex_label dfg_vertex_label_dup (dfg_vertex_label in_dvl)
 ====================================================================== More...
 
bool adg_simple_ineg_p (Psysteme in_ps)
 ====================================================================== More...
 
quast adg_max_of_leaves (quast *tsou, quast tsou2, int in_i, Ppath in_pa, bool take_last)
 ====================================================================== More...
 
quast adg_path_max_source (quast *tsou, quast *tsou2, Ppath in_pa, list psl, boolean take_last)
 ====================================================================== More...
 
Pvecteur adg_list_to_vect (list in_list, bool with_tcst)
 ====================================================================== More...
 
Psysteme adg_build_Psysteme (predicate in_pred, list in_list)
 ====================================================================== More...
 
Pposs_source adg_path_possible_source (quast *in_tsou, vertex in_ver, int in_dep, Ppath in_pa, bool take_last)
 ====================================================================== More...
 
list adg_increasing_stat_order_sort (list in_list)
 ====================================================================== More...
 
list adg_decreasing_stat_order_sort (list in_list)
 ====================================================================== More...
 
list adg_merge_entities_lists (list l1, list l2)
 ====================================================================== More...
 
list adg_rename_entities (list le, hash_table fst)
 ====================================================================== More...
 
list adg_get_loop_indices (list ll)
 ====================================================================== More...
 

Variables

int Gcount_re
 Global variables. More...
 
statement_mapping Gstco_map
 
boolean PATH_METHOD
 

Macro Definition Documentation

◆ GRAPH_IS_DG

#define GRAPH_IS_DG

Name : adg_utils.c Package : array_dfg Author : Arnauld LESERVOT Date : 93/06/27 Modified : Documents: Platonoff's thesis and Leservot's thesis "Dataflow Analysis of Array and Scalar References" P.

FEAUTRIER Comments :

Definition at line 37 of file adg_utils.c.

Function Documentation

◆ adg_build_Psysteme()

Psysteme adg_build_Psysteme ( predicate  in_pred,
list  in_list 
)

======================================================================

Psysteme adg_build_Psysteme( predicate in_pred, list in_list ) Input : A predicate in_pred. AL 29/07/93 A list of entities in_list. Output : A Psysteme from in_pred ordered according to the list in_list. PUBLIC use.

Call a sort function

Definition at line 895 of file adg_utils.c.

898 {
899  Psysteme ret_ps = NULL;
900  Pvecteur pv2 = NULL;
901 
902  debug(9, "adg_build_Psysteme", "begin \n");
903  if ((in_list == NIL) && (in_pred != predicate_undefined)) {
904  pips_internal_error("Error : there is no correspondance between input Psysteme and input entity list");
905  }
906 
907  ret_ps = (Psysteme) predicate_system( in_pred );
908  pv2 = adg_list_to_vect( in_list, true );
909 
910  /* Call a sort function */
911  sort_psysteme( ret_ps, pv2 );
912 
913  debug(9, "adg_build_Psysteme", "end \n");
914  return( ret_ps );
915 }
Pvecteur adg_list_to_vect(list in_list, bool with_tcst)
======================================================================
Definition: adg_utils.c:865
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define pips_internal_error
Definition: misc-local.h:149
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
void sort_psysteme(Psysteme ps, Pvecteur pv)
==================================================================
Definition: pip.c:729
#define predicate_undefined
Definition: ri.h:2046
#define predicate_system(x)
Definition: ri.h:2069
struct Ssysteme * Psysteme
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89

References adg_list_to_vect(), debug(), NIL, pips_internal_error, predicate_system, predicate_undefined, and sort_psysteme().

+ Here is the call graph for this function:

◆ adg_compact_quast()

quast adg_compact_quast ( quast  in_q)

======================================================================

quast adg_compact_quast( in_q ) AL 1/12/93 Compact a quast with a lot of undefined leaves. Could be costly extended to more general cases. Usefull to compact a quast provided by PIP.

Definition at line 129 of file adg_utils.c.

131 {
132  quast new_true = NULL, new_false = NULL, ret_q = quast_undefined;
133  quast_value qv = NULL;
134  conditional cond = NULL;
135  Psysteme ps1 = NULL;
136 
137  debug( 9, "adg_compact_quast", "begin\n");
138  if ( in_q == quast_undefined ) return quast_undefined;
139 
140  qv = quast_quast_value( in_q );
141  if ( qv == quast_value_undefined ) return quast_undefined;
142  if ( quast_value_quast_leaf_p( qv ) ) return in_q;
143 
144  cond = quast_value_conditional( qv );
145  ps1 = predicate_system( conditional_predicate( cond ) );
146  new_true = adg_compact_quast( conditional_true_quast( cond ) );
147  new_false = adg_compact_quast( conditional_false_quast( cond ) );
148 
149  if (adg_quast_equal_p( new_true, new_false ))
150  {free_quast( new_false ); return new_true;}
151  else if ((new_true != quast_undefined) &&
152  (quast_quast_value(new_true) != quast_value_undefined) &&
154  conditional co = NULL;
155  quast cfq = NULL, cft = NULL;
156 
158  cfq = conditional_false_quast( co );
159  cft = conditional_true_quast( co );
160  if( adg_quast_equal_p( cfq, new_false ) ) {
161  Psysteme ps = NULL;
162 
163  ps1->base = NULL; sc_creer_base(ps1);
167  cft, new_false) ),
168  quast_newparms( in_q ) );
169  }
172  new_true, new_false) ),
173  quast_newparms( in_q ) );
174  }
175  else {
178  new_true, new_false) ),
179  quast_newparms( in_q ) );
180  }
181 
182  debug( 9, "adg_compact_quast", "end\n");
183  return ret_q;
184 }
void free_quast(quast p)
Definition: paf_ri.c:483
quast_value make_quast_value(enum quast_value_utype tag, void *val)
Definition: paf_ri.c:565
quast make_quast(quast_value a1, list a2)
Definition: paf_ri.c:516
conditional make_conditional(predicate a1, quast a2, quast a3)
Definition: paf_ri.c:138
predicate make_predicate(Psysteme a1)
Definition: ri.c:1820
bool adg_quast_equal_p(quast in_q1, quast in_q2)
======================================================================
Definition: adg_utils.c:192
quast adg_compact_quast(quast in_q)
======================================================================
Definition: adg_utils.c:129
#define conditional_true_quast(x)
Definition: paf_ri.h:302
#define quast_undefined
Definition: paf_ri.h:603
#define quast_value_undefined
Definition: paf_ri.h:639
@ is_quast_value_conditional
Definition: paf_ri.h:655
#define conditional_false_quast(x)
Definition: paf_ri.h:304
#define quast_newparms(x)
Definition: paf_ri.h:629
#define quast_value_conditional_p(x)
Definition: paf_ri.h:676
#define quast_value_quast_leaf_p(x)
Definition: paf_ri.h:673
#define quast_quast_value(x)
Definition: paf_ri.h:627
#define conditional_predicate(x)
Definition: paf_ri.h:300
#define quast_value_conditional(x)
Definition: paf_ri.h:678
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
Definition: sc_alloc.c:129
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Definition: sc_alloc.c:176
Psysteme sc_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
Pbase base
Definition: sc-local.h:75

References adg_quast_equal_p(), Ssysteme::base, conditional_false_quast, conditional_predicate, conditional_true_quast, debug(), free_quast(), is_quast_value_conditional, make_conditional(), make_predicate(), make_quast(), make_quast_value(), predicate_system, quast_newparms, quast_quast_value, quast_undefined, quast_value_conditional, quast_value_conditional_p, quast_value_quast_leaf_p, quast_value_undefined, sc_append(), sc_creer_base(), and sc_dup().

Referenced by adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_decreasing_stat_order_sort()

list adg_decreasing_stat_order_sort ( list  in_list)

======================================================================

list adg_decreasing_stat_order_sort( list in_list ) AL 28/07/93 Input : A list of vertices in_list. Output : A list of vertices sorted by decreasing order of statement_ordering attached to each vertex ret_list. Method : We scan in_list. For each vertex ver of in_list, we scan ret_list with l1. l2 points on predecessor of l1. According to the order of ver compared to the order of v1 and v2, we insert (or not) ver between l2 and l1. PRIVATE use.

ret_list is presently empty : we initialize it with the new vertex ver

We are at the end of ret_list : we add the new vertex at the end of our list

Core of the pass : compares new input vertex ver

Definition at line 1028 of file adg_utils.c.

1030 {
1031  list ret_list = NIL, prov_l = NIL;
1032 
1033  debug(9,"adg_decreasing_stat_order_sort", "begin\n");
1034  for(; !ENDP(in_list); POP(in_list)) {
1035  bool cont = true;
1036  list l2 = NIL;
1037  vertex ver = VERTEX(CAR( in_list ));
1038  int order = statement_number(adg_vertex_to_statement( ver ));
1039  list l1 = ret_list;
1040 
1041  prov_l = NIL;
1042  ADD_ELEMENT_TO_LIST( prov_l, VERTEX, ver );
1043 
1044  while( cont ) {
1045  int order2 = 0;
1046 
1047  /* ret_list is presently empty : we initialize it
1048  * with the new vertex ver */
1049  if ((l1 == NIL) && (l2 == NIL )) {
1050  ret_list = prov_l;
1051  cont = false;
1052  }
1053  /* We are at the end of ret_list : we add the new
1054  * vertex at the end of our list */
1055  else if ((l1 == NIL) && (l2 != NIL)) {
1056  l2->cdr = prov_l;
1057  cont = false;
1058  }
1059  /* Core of the pass : compares new input vertex ver */
1060  else {
1062  if ((order >= order2) && (l2 == NIL)) {
1063  ret_list = prov_l;
1064  ret_list->cdr = l1;
1065  cont = false;
1066  }
1067  else if ((order >= order2) && (l2 != NIL)) {
1068  l2->cdr = prov_l;
1069  prov_l->cdr = l1;
1070  cont = false;
1071  }
1072  else {
1073  cont = true;
1074  l2 = l1;
1075  POP( l1 );
1076  }
1077  }
1078  }
1079  }
1080  debug(9,"adg_decreasing_stat_order_sort", "returned list length : %d \n",
1081  gen_length( ret_list ));
1082  return( ret_list );
1083 }
statement adg_vertex_to_statement(vertex in_ver)
======================================================================
Definition: adg_graph.c:266
#define VERTEX(x)
VERTEX.
Definition: graph.h:122
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
size_t gen_length(const list l)
Definition: list.c:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
Definition: icfg-local.h:50
#define statement_number(x)
Definition: ri.h:2452
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
struct cons * cdr
The pointer to the next element.
Definition: newgen_list.h:43

References ADD_ELEMENT_TO_LIST, adg_vertex_to_statement(), CAR, cons::cdr, debug(), ENDP, gen_length(), NIL, POP, statement_number, and VERTEX.

Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), and adg_increasing_stat_order_sort().

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

◆ adg_enrichir()

void adg_enrichir ( quast  in_qu,
leaf_label  in_ll 
)

======================================================================

void adg_enrichir( (quast) in_qu, (leaf_label) in_ll ) AL 21/10/93 Input : A quast and a leaf label. Output : Nothing. Just put each leaf_label of quast in_qu equal to in_ll and update the solution. WARNING ! Using global variable : Gstco_map. PRIVATE use !

We get the indices of statement linked to in_ll

Get the dep first indices and put them in prov_l

Add to prov_l the solutions of quast

Definition at line 474 of file adg_utils.c.

477 {
478  quast_value qv = NULL;
479 
480  debug(9, "adg_enrichir", "begin \n");
481  if( in_qu == quast_undefined ) {}
482  else if((qv = quast_quast_value(in_qu))!= quast_value_undefined) {
483  if (quast_value_conditional_p(qv)) {
485  if(cond != conditional_undefined) {
486  adg_enrichir(conditional_true_quast(cond), in_ll);
488  }
489  }
490  if(quast_value_quast_leaf_p(qv)) {
491  int nb, dep, count = 0;
492  statement stat;
493  static_control sc;
494  quast_leaf ql = NULL;
495  list qs = NIL, prov_l = NIL, ind = NIL;
496 
497  /* We get the indices of statement linked to in_ll */
498  nb = leaf_label_statement( in_ll );
499  dep = leaf_label_depth( in_ll );
500  stat = adg_number_to_statement( nb );
503 
504  /* Get the dep first indices and put them in prov_l */
505  for(; !ENDP(ind) && (count < dep); POP(ind), count++) {
507  ADD_ELEMENT_TO_LIST( prov_l, EXPRESSION, exp );
508  }
509 
510  /* Add to prov_l the solutions of quast */
511  ql = quast_value_quast_leaf( qv );
512  if (ql != quast_leaf_undefined) qs = quast_leaf_solution( ql );
513  for(; !ENDP(qs) ; POP(qs)) {
514  expression exp = EXPRESSION(CAR( qs ));
515  ADD_ELEMENT_TO_LIST( prov_l, EXPRESSION, exp );
516  }
517  quast_value_quast_leaf( qv ) = make_quast_leaf( prov_l, in_ll );
518  }
519  }
520  debug(9, "adg_enrichir", "end \n");
521 }
quast_leaf make_quast_leaf(list a1, leaf_label a2)
Definition: paf_ri.c:474
static int count
Definition: SDG.c:519
statement adg_number_to_statement(int in_nb)
======================================================================
Definition: adg_utils.c:461
statement_mapping Gstco_map
Definition: array_dfg.c:47
list adg_get_loop_indices(list ll)
======================================================================
Definition: adg_utils.c:1186
void adg_enrichir(quast in_qu, leaf_label in_ll)
======================================================================
Definition: adg_utils.c:474
#define GET_STATEMENT_MAPPING(map, stat)
Definition: newgen-local.h:49
#define static_control_loops(x)
Definition: paf_ri.h:757
struct _newgen_struct_static_control_ * static_control
Definition: paf_ri.h:184
#define leaf_label_statement(x)
Definition: paf_ri.h:451
#define conditional_undefined
Definition: paf_ri.h:275
#define quast_leaf_solution(x)
Definition: paf_ri.h:591
#define quast_leaf_undefined
Definition: paf_ri.h:567
#define leaf_label_depth(x)
Definition: paf_ri.h:453
#define quast_value_quast_leaf(x)
Definition: paf_ri.h:675
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207

References ADD_ELEMENT_TO_LIST, adg_get_loop_indices(), adg_number_to_statement(), CAR, conditional_false_quast, conditional_true_quast, conditional_undefined, count, debug(), ENDP, ENTITY, entity_to_expression(), exp, EXPRESSION, GET_STATEMENT_MAPPING, Gstco_map, leaf_label_depth, leaf_label_statement, make_quast_leaf(), NIL, POP, quast_leaf_solution, quast_leaf_undefined, quast_quast_value, quast_undefined, quast_value_conditional, quast_value_conditional_p, quast_value_quast_leaf, quast_value_quast_leaf_p, quast_value_undefined, and static_control_loops.

Referenced by adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_fill_with_quast()

void adg_fill_with_quast ( quast in_pq,
quast  in_q 
)

======================================================================

USEFULL FUNCTIONS
====================================================================== ====================================================================== void adg_fill_with_quast( in_pq, in_q ) AL 17/02/94

Definition at line 52 of file adg_utils.c.

55 {
56  debug(8, "adg_fill_with_quast", "begin\n");
57  if (get_debug_level() > 7) {
58  fprintf(stderr, "\n Input quast :\n");
59  imprime_special_quast( stderr, *in_pq );
60  fprintf(stderr, "\n To fill with :\n");
61  imprime_special_quast( stderr, in_q );
62  }
63  if (*in_pq == quast_undefined) *in_pq = in_q;
64  else {
65  quast_value qqv = quast_quast_value( *in_pq );
66  if (quast_value_conditional_p( qqv )) {
68  adg_fill_with_quast( &(conditional_true_quast( cond )), in_q );
70  }
71  }
72  if (get_debug_level() > 7) {
73  fprintf(stderr, "\n Output quast :\n");
74  imprime_special_quast( stderr, *in_pq );
75  }
76  debug(8, "adg_fill_with_quast", "end\n");
77 }
void imprime_special_quast(FILE *fp, quast qu)
===========================================================================
void adg_fill_with_quast(quast *in_pq, quast in_q)
======================================================================
Definition: adg_utils.c:52
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
Definition: debug.c:67
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...

References conditional_false_quast, conditional_true_quast, debug(), fprintf(), get_debug_level(), imprime_special_quast(), quast_quast_value, quast_undefined, quast_value_conditional, and quast_value_conditional_p.

Referenced by adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_get_integer_entity()

entity adg_get_integer_entity ( int  in_i)

======================================================================

AL 94/02/14

If a Renamed Entity already exists, we use it ; else, we make a new one and increment Gcount_re.

Definition at line 83 of file adg_utils.c.

85 {
86  extern int Gcount_ie;
87  entity new_ent = NULL, mod_ent = NULL;
88  char *name = NULL, *name2 = NULL, *num = NULL;
89 
90 
91  debug(9, "adg_get_integer_entity", "begin \n");
92  num = int2a(in_i);
94  name = strdup(concatenate("I", (char*) num, (char *) NULL));
95  free(num);
96 
97  /* If a Renamed Entity already exists, we use it ;
98  * else, we make a new one and increment Gcount_re.
99  */
100  if ( in_i <= Gcount_ie ) {
101  new_ent = FindOrCreateEntity(
103  (char*) name );
104  }
105  else {
106  Gcount_ie++;
108  MODULE_SEP_STRING, name, NULL ));
109  new_ent = make_entity(name2,
114  }
115 
116  if (get_debug_level() > 7) fprintf(stderr, "New %s\n", entity_local_name( new_ent ));
117 
118  debug(9, "adg_get_integer_entity", "end \n");
119  return( new_ent );
120 }
basic make_basic(enum basic_utype tag, void *val)
Definition: ri.c:155
storage make_storage(enum storage_utype tag, void *val)
Definition: ri.c:2273
value make_value(enum value_utype tag, void *val)
Definition: ri.c:2832
variable make_variable(basic a1, list a2, list a3)
Definition: ri.c:2895
type make_type(enum type_utype tag, void *val)
Definition: ri.c:2706
static entity mod_ent
#define ADFG_MODULE_NAME
int Gcount_ie
Definition: array_dfg.c:46
static int num
Definition: bourdoncle.c:137
void free(void *)
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
#define MODULE_SEP_STRING
Definition: naming-local.h:30
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
#define UUINT(i)
Definition: newgen_types.h:99
#define UU
Definition: newgen_types.h:98
#define make_entity(n, t, s, 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 FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
@ is_basic_int
Definition: ri.h:571
#define ram_undefined
Definition: ri.h:2221
@ is_value_unknown
Definition: ri.h:3035
@ is_storage_ram
Definition: ri.h:2492
@ is_type_variable
Definition: ri.h:2900
char * strdup()
char * int2a(int)
util.c
Definition: util.c:42

References ADFG_MODULE_NAME, concatenate(), debug(), entity_local_name(), FindOrCreateEntity(), fprintf(), free(), Gcount_ie, get_current_module_entity(), get_debug_level(), int2a(), is_basic_int, is_storage_ram, is_type_variable, is_value_unknown, make_basic(), make_entity, make_storage(), make_type(), make_value(), make_variable(), mod_ent, MODULE_SEP_STRING, NIL, num, ram_undefined, strdup(), UU, and UUINT.

Referenced by adg_dataflowgraph_with_extremities().

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

◆ adg_get_loop_indices()

list adg_get_loop_indices ( list  ll)

======================================================================

list adg_get_loop_indices( list ll ) AL 22/07/93 Input : A list of loops ll. Output : A list of entities representing indices of loops in ll. PUBLIC use.

Definition at line 1186 of file adg_utils.c.

1188 {
1189  list ret_list = NIL;
1190  for(; !ENDP(ll); POP(ll))
1191  { ADD_ELEMENT_TO_LIST( ret_list, ENTITY, loop_index(LOOP(CAR( ll ))) ); }
1192  return( ret_list );
1193 }
#define LOOP(x)
LOOP.
Definition: ri.h:1606
#define loop_index(x)
Definition: ri.h:1640

References ADD_ELEMENT_TO_LIST, CAR, ENDP, ENTITY, LOOP, loop_index, NIL, and POP.

Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), and adg_enrichir().

+ Here is the caller graph for this function:

◆ adg_increasing_stat_order_sort()

list adg_increasing_stat_order_sort ( list  in_list)

======================================================================

list adg_increasing_stat_order_sort( list in_list ) AL 28/07/93 Input : A list of vertices in_list. Output : A list of vertices sorted by decreasing order PRIVATE use.

Definition at line 1013 of file adg_utils.c.

1015 { return(gen_nreverse( adg_decreasing_stat_order_sort( in_list ))); }
list adg_decreasing_stat_order_sort(list in_list)
======================================================================
Definition: adg_utils.c:1028
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304

References adg_decreasing_stat_order_sort(), and gen_nreverse().

Referenced by adg_dataflowgraph_with_extremities().

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

◆ adg_is_textualy_after_p()

bool adg_is_textualy_after_p ( statement  in_s1,
statement  in_s2 
)

======================================================================

bool adg_is_textualy_after_p( (statement) in_s1, (statement) in_s2 ) Input : Two statements in_s1 and in_s2. AL 08/11/93 Output : True if in_s1 is before in_s2 in the text program. WARNING: This function compares the statement number of the two statements => these numbers should already be ordered.

Definition at line 373 of file adg_utils.c.

375 { return (statement_number(in_s1) >= statement_number(in_s2));}

References statement_number.

Referenced by adg_dataflowgraph().

+ Here is the caller graph for this function:

◆ adg_list_to_vect()

Pvecteur adg_list_to_vect ( list  in_list,
bool  with_tcst 
)

======================================================================

Pvecteur adg_list_to_vect(list in_list, bool with_tcst) AL 07/10/93 Input : A list of entities and a boolean. Output : A Pvecteur sorted by the in_list order. TCST is added at the end if with_tcst is set to TRUE. PUBLIC use.

Build a Pvecteur according to the reverse order of the in_list

Add the TCST var or not

Reverse the vecteur to recover the order of the input list

Definition at line 865 of file adg_utils.c.

868 {
869  Pvecteur pv2 = NULL, *pvec = NULL, prov_vec = VECTEUR_NUL;
870 
871  debug(9, "adg_list_to_vect", "begin \n");
872 
873  /* Build a Pvecteur according to the reverse order of the in_list */
874  pvec = &prov_vec;
875  for(; !ENDP(in_list); POP(in_list))
876  { vect_add_elem( pvec, (Variable) ENTITY(CAR( in_list )), (Value) 1 ); }
877 
878  /* Add the TCST var or not */
879  if (with_tcst) vect_add_elem( pvec, TCST, VALUE_ONE);
880 
881  /* Reverse the vecteur to recover the order of the input list */
882  pv2 = vect_reversal( *pvec );
883 
884  debug(9, "adg_list_to_vect", "end \n");
885  return pv2;
886 }
int Value
#define VALUE_ONE
Pvecteur vect_reversal(Pvecteur vect_in)
Pvecteur vect_reversal(Pvecteur vect_in); produces the reversal vector of the vect_in.
Definition: private.c:237
#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
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
Definition: unaires.c:72

References CAR, debug(), ENDP, ENTITY, POP, TCST, VALUE_ONE, vect_add_elem(), vect_reversal(), and VECTEUR_NUL.

Referenced by adg_build_Psysteme(), adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_max_of_leaves()

quast adg_max_of_leaves ( quast tsou,
quast  tsou2,
int  in_i,
Ppath  in_pa,
bool  take_last 
)

======================================================================

quast adg_max_of_leaves( tsou, tsou2, in_i, in_pa, take_last) Compute max of two quasts. in_i is the order to ta ... PRIVATE use.

he two leaves are at the same depth : we have three cases

If we are in the deepest position : take textual order

Take the in_i element of solutions

f *tsou and tsou2 distances to the source could be equal

See if tsou2 could be after *tsou

See if *tsou could be after tsou2

Only one of the two is after the other.

Both quast could be a source: look at a deeper stage.

!after1 or !after2

only after1 holds

only after2 holds

!after1 and !after2

Definition at line 578 of file adg_utils.c.

583 {
584  quast_value in_qv = NULL, in_qv2 = NULL;
585  int dep = 0, dep2 = 0;
586  int nb = 0, nb2 = 0, max_depth = 0;
587  leaf_label ll = NULL, ll2 = NULL;
588  quast ret_q = quast_undefined;
589  quast_leaf ql = NULL, ql2 = NULL;
590  statement st = NULL, st2 = NULL;
591  Psysteme delt_sc = NULL, delt_sc1 = NULL, delt_sc2 = NULL;
592  Ppath new_pa1 = NULL, new_pa2 = NULL, new_pa = NULL;
593  Pvecteur pvec = NULL, pv1 = NULL, pv2 = NULL, diff = NULL;
594  bool cut_space=false, after2=false, after1=false, tt=false;
595 
596  debug(9, "adg_max_of_leaves", "begin\n");
597 
598  in_qv = quast_quast_value( *tsou );
599  in_qv2 = quast_quast_value( tsou2 );
600  ql = quast_value_quast_leaf( in_qv );
601  ql2 = quast_value_quast_leaf( in_qv2 );
602  ll = quast_leaf_leaf_label(ql);
603  ll2 = quast_leaf_leaf_label(ql2);
604 
605  if (ll == leaf_label_undefined)
606  { *tsou = copy_quast(tsou2); RETURN(9, "adg_max_of_leaves", *tsou); }
607  if (ll2 == leaf_label_undefined) RETURN(9, "adg_max_of_leaves", copy_quast(*tsou));
608 
609  dep = leaf_label_depth(ll);
610  dep2 = leaf_label_depth(ll2);
611  nb = leaf_label_statement(ll);
612  nb2 = leaf_label_statement(ll2);
613 
614  if (take_last) {
615  if (dep > dep2) RETURN(9, "adg_max_of_leaves", copy_quast(*tsou));
616  if (dep2 > dep) {
617  quast_quast_value( *tsou ) = copy_quast_value(in_qv2);
618  RETURN(9, "adg_max_of_leaves", *tsou);
619  }
620  }
621  else {
622  if (dep2 > dep) RETURN(9, "adg_max_of_leaves", copy_quast(*tsou));
623  if (dep > dep2) {
624  quast_quast_value( *tsou ) = copy_quast_value(in_qv2);
625  RETURN(9, "adg_max_of_leaves", *tsou);
626  }
627  }
628 
629  /*The two leaves are at the same depth : we have three cases*/
630  st = adg_number_to_statement( nb );
631  st2 = adg_number_to_statement( nb2 );
632 
633  /* If we are in the deepest position : take textual order */
634  max_depth = stco_common_loops_of_statements(Gstco_map, st, st2);
635  if ((dep == max_depth) || (in_i == max_depth)) {
636  tt = (statement_number(st) >= statement_number(st2));
637  if (take_last) {
638  if (tt) RETURN(9, "adg_max_of_leaves", copy_quast(*tsou));
639  *tsou = copy_quast(tsou2);
640  RETURN(9, "adg_max_of_leaves", *tsou);
641  }
642  else {
643  if (!tt) RETURN(9, "adg_max_of_leaves", copy_quast(*tsou));
644  *tsou = copy_quast(tsou2);
645  RETURN(9, "adg_max_of_leaves", *tsou);
646  }
647  }
648 
649  /* Take the in_i element of solutions */
652  in_i++;
653 
654  /*If *tsou and tsou2 distances to the source could be equal*/
655  diff = vect_substract( pv1, pv2 );
656  pvec = diff;
657  delt_sc = sc_make(contrainte_make(pvec), CONTRAINTE_UNDEFINED);
658  new_pa = pa_intersect_system( in_pa, delt_sc );
659  cut_space = pa_faisabilite(pa_intersect_system(in_pa, delt_sc));
660 
661  /* See if tsou2 could be after *tsou */
662  pvec = vect_add( vect_new(TCST, VALUE_ONE), diff );
663  delt_sc2 = sc_make(CONTRAINTE_UNDEFINED, contrainte_make(pvec));
664  new_pa2 = pa_intersect_system( in_pa, delt_sc2 );
665  after2 = pa_faisabilite( new_pa2 );
666 
667  /* See if *tsou could be after tsou2 */
668  vect_chg_sgn( diff );
669  pvec = vect_add( vect_new(TCST, VALUE_ONE), diff );
670  delt_sc1 = sc_make(CONTRAINTE_UNDEFINED, contrainte_make(pvec));
671  new_pa1 = pa_intersect_system( in_pa, delt_sc1 );
672  after1 = pa_faisabilite( new_pa1 );
673 
674  /* Only one of the two is after the other. */
675  if (!cut_space) {
676  if (take_last) {
677  if(after1) ret_q = copy_quast( *tsou );
678  else if(after2) ret_q = copy_quast( tsou2 );
679  else pips_internal_error("Bad cutting space !");
680  }
681  else {
682  if(after2) ret_q = copy_quast( *tsou );
683  else if(after1) ret_q = copy_quast( tsou2 );
684  else pips_internal_error("Bad cutting space !");
685  }
686  }
687  /* Both quast could be a source: look at a deeper stage. */
688  else if (after1 && after2) {
689  quast ts = NULL, ts2 = NULL;
690 
691  if (take_last) {
692  ts = copy_quast( *tsou );
693  ts2 = copy_quast( tsou2 );
694  }
695  else {
696  ts = copy_quast( tsou2 );
697  ts2 = copy_quast( *tsou );
698  }
701  make_predicate(delt_sc),
702  adg_max_of_leaves( tsou, tsou2, in_i, new_pa, take_last),
706  make_predicate( delt_sc2 ), ts2, ts )),
707  NIL ) )),
708  NIL );
709  }
710  /* !after1 or !after2 */
711  /* only after1 holds */
712  else if (after1) ret_q = take_last?copy_quast( *tsou ):copy_quast(tsou2);
713  /* only after2 holds */
714  else if (after2) ret_q = take_last?copy_quast( tsou2 ):copy_quast( *tsou );
715  /* !after1 and !after2 */
716  else ret_q = adg_max_of_leaves( tsou, tsou2, in_i, new_pa, take_last);
717 
718  debug(9, "adg_max_of_leaves", "end \n");
719  return( ret_q );
720 }
quast_value copy_quast_value(quast_value p)
QUAST_VALUE.
Definition: paf_ri.c:522
quast copy_quast(quast p)
QUAST.
Definition: paf_ri.c:480
quast adg_max_of_leaves(quast *tsou, quast tsou2, int in_i, Ppath in_pa, bool take_last)
======================================================================
Definition: adg_utils.c:578
#define EXPRESSION_PVECTEUR(e)
#define CONTRAINTE_UNDEFINED
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
Definition: alloc.c:73
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
Definition: list.c:710
int stco_common_loops_of_statements(statement_mapping, statement, statement)
AP, sep 25th 1995 : I have added a function from static_controlise/utils.c.
Definition: utils.c:2497
#define leaf_label_undefined
Definition: paf_ri.h:427
#define quast_leaf_leaf_label(x)
Definition: paf_ri.h:593
Ppath pa_intersect_system(Ppath in_pa, Psysteme in_ps)
Ppath pa_intersect_system( (Ppath) in_pa, (Psysteme) in_ps ) Computes the intersection between in_pa ...
Definition: path.c:178
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg): allocation et initialisation d'un systeme d'equ...
Definition: sc.c:78
#define RETURN(x)
flex uses isatty
Definition: sc_lex.c:777
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
Definition: scalaires.c:151
#define pa_faisabilite(pa)
Definition: union-local.h:112
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Definition: alloc.c:110
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
Definition: binaires.c:53
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2)
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2): allocation d'un vecteur v dont la valeur est la di...
Definition: binaires.c:75

References adg_number_to_statement(), contrainte_make(), CONTRAINTE_UNDEFINED, copy_quast(), copy_quast_value(), debug(), EXPRESSION, EXPRESSION_PVECTEUR, gen_nth(), Gstco_map, is_quast_value_conditional, leaf_label_depth, leaf_label_statement, leaf_label_undefined, make_conditional(), make_predicate(), make_quast(), make_quast_value(), NIL, pa_faisabilite, pa_intersect_system(), pips_internal_error, quast_leaf_leaf_label, quast_leaf_solution, quast_quast_value, quast_undefined, quast_value_quast_leaf, RETURN, sc_make(), statement_number, stco_common_loops_of_statements(), TCST, VALUE_ONE, vect_add(), vect_chg_sgn(), vect_new(), and vect_substract().

Referenced by adg_path_max_source().

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

◆ adg_merge_entities_lists()

list adg_merge_entities_lists ( list  l1,
list  l2 
)

======================================================================

list adg_merge_entities_lists( list l1, list l2 ) AL 23/07/93 Input : Two lists of entities. Output : A list of entities, union of the l1 and l2. Append the new entities of l2 after list l1. PUBLIC use.

Definition at line 1093 of file adg_utils.c.

1095 {
1096  list ret_list = NIL;
1097 
1098  debug(9, "adg_merge_entities_list", "begin \n");
1099  for(; !ENDP(l1); POP(l1) )
1100  { ADD_ELEMENT_TO_LIST( ret_list, ENTITY, ENTITY(CAR( l1 )) );}
1101  for(; !ENDP(l2); POP( l2 )) {
1102  entity ent = ENTITY(CAR(l2));
1103  if ( gen_find_eq(ent, ret_list) == chunk_undefined )
1104  ADD_ELEMENT_TO_LIST( ret_list, ENTITY, ent );
1105  }
1106 
1107  debug(9, "adg_merge_entities_list", "end \n");
1108  return( ret_list );
1109 }
#define chunk_undefined
obsolete
Definition: genC.h:79
void * gen_find_eq(const void *item, const list seq)
Definition: list.c:422

References ADD_ELEMENT_TO_LIST, CAR, chunk_undefined, debug(), ENDP, ENTITY, gen_find_eq(), NIL, and POP.

Referenced by adg_dataflowgraph().

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

◆ adg_number_of_same_loops()

int adg_number_of_same_loops ( list  in_l1,
list  in_l2 
)

======================================================================

int adg_number_of_same_loops( (list) in_l1, (list) in_l2 ) AL 28/10/93 Input : Two lists of loops in_l1 and in_l2. Output : Number of loops in the two lists that have the same statement ordering. PUBLIC use possible.

Definition at line 438 of file adg_utils.c.

440 {
441  int count = 0;
442 
443  debug(9, "adg_number_of_same_loops", "begin\n");
444  for(; !ENDP(in_l1); POP(in_l1)) {
445  list ll = in_l2;
446  int order1 = statement_ordering( loop_body( LOOP(CAR(in_l1)) ) );
447  for(; !ENDP(ll); POP(ll)) {
448  if (order1 == statement_ordering(loop_body(LOOP(CAR(ll))))) count++;
449  }
450  }
451  debug(9,"adg_number_of_same_loops","number of same loop = %d\n", count);
452  return count;
453 }
#define loop_body(x)
Definition: ri.h:1644
#define statement_ordering(x)
Definition: ri.h:2454

References CAR, count, debug(), ENDP, LOOP, loop_body, POP, and statement_ordering.

Referenced by adg_dataflowgraph().

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

◆ adg_number_to_statement()

statement adg_number_to_statement ( int  in_nb)

======================================================================

statement adg_number_to_statement( (int) in_nb ) AL 25/10/93 Input : Number of a vertex. Output : A statement associated to this vertex. PRIVATE use !

Definition at line 461 of file adg_utils.c.

463 { return ordering_to_statement( adg_number_to_ordering( in_nb ) ); }
int adg_number_to_ordering(int in_nb)
======================================================================
Definition: adg_graph.c:227
statement ordering_to_statement(int o)
Get the statement associated to a given ordering.
Definition: ordering.c:111

References adg_number_to_ordering(), and ordering_to_statement().

Referenced by adg_dataflowgraph(), adg_enrichir(), adg_max_of_leaves(), adg_path_max_source(), adg_path_possible_source(), broadcast_conditions(), broadcast_of_dataflow(), cmf_layout_align(), craft_layout_align(), cutting_conditions(), dims_of_nest(), edge_weight(), fprint_bdt_with_stat(), get_list_of_all_param(), include_parameters_in_sc(), include_trans_in_poly(), is_not_trivial_p(), mapping_on_broadcast(), partial_broadcast_coefficients(), plc_make_dim(), plc_make_distance(), plc_make_min_dim(), plc_make_proto(), prepare_reindexing(), re_do_it(), sa_do_it(), simplify_bdt(), sort_dfg_node(), and valuer().

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

◆ adg_path_max_source()

quast adg_path_max_source ( quast tsou,
quast tsou2,
Ppath  in_pa,
list  psl,
boolean  take_last 
)

======================================================================

quast adg_path_max_source( quast *tsou, quast *tsou2, list psl, Ppath in_pa, bool take_last ) AL 04/08/93

Trivial cases

Case the quast of *tsou is a conditional

quast qt = conditional_true_quast( qvcond ); quast qf = conditional_false_quast( qvcond );

Case the quast of *tsou is a leaf and *tsou2 a conditional

The two quasts are leaves

The two statement have the same depth dep

Definition at line 726 of file adg_utils.c.

731 {
732  quast ret_tsou = quast_undefined;
733  quast_value in_qv = NULL, in_qv2 = NULL;
734 
735  debug(9, "adg_path_max_source", "begin \n");
736  /* Trivial cases */
737  if(*tsou2 == quast_undefined) RETURN(9,"adg_path_max_source",*tsou);
738  in_qv2 = quast_quast_value( *tsou2 );
739  if(in_qv2 == quast_value_undefined) RETURN(9,"adg_path_max_source",*tsou);
740 
741 
742  if(*tsou == quast_undefined)
743  { *tsou = *tsou2; RETURN(9,"adg_path_max_source",*tsou); }
744 
745  /* Case the quast of *tsou is a conditional */
746  in_qv = quast_quast_value( *tsou );
747  if (quast_value_conditional_p(in_qv)) {
748  conditional qvcond = quast_value_conditional( in_qv );
750 /* quast qt = conditional_true_quast( qvcond );
751  quast qf = conditional_false_quast( qvcond );*/
752  Ppath ct = pa_intersect_system( in_pa, cond );
753  Ppath cf = pa_intersect_complement( in_pa, cond );
754 
755  adg_path_max_source(&(conditional_true_quast(qvcond)),tsou2,ct,psl,take_last);
756  adg_path_max_source(&(conditional_false_quast(qvcond)),tsou2,cf,psl,take_last);
757 
758  ret_tsou = *tsou;
759  }
760 
761  /* Case the quast of *tsou is a leaf and *tsou2 a conditional*/
762  else if (quast_value_conditional_p(in_qv2)) {
763  Ppath ct, cf;
764  conditional qvcond = quast_value_conditional( in_qv2 );
765  predicate pred = conditional_predicate( qvcond );
766  Psysteme cond = predicate_system( pred );
767  quast qt = conditional_true_quast( qvcond );
768  quast qf = conditional_false_quast( qvcond );
769  quast qll = *tsou;
770 
771  cond->base = NULL; sc_creer_base( cond );
772  ct = pa_intersect_system( in_pa, cond );
773  cf = pa_intersect_complement( in_pa, cond );
774 
775  if (!pa_faisabilite( ct )) adg_path_max_source(tsou,&qf,in_pa,psl,take_last);
776  else if (!pa_faisabilite(cf)) adg_path_max_source(tsou,&qt,in_pa,psl,take_last);
777  else {
778  quast q3 = copy_quast( qll );
779  quast q4 = copy_quast( qll );
780  quast q1 = adg_path_max_source(&q3, &qt, ct, psl, take_last);
781  quast q2 = adg_path_max_source(&q4, &qf, cf, psl, take_last);
782 
783  if (adg_quast_leaf_solution_equal_p(q1, q2)) *tsou = q1;
785  make_conditional(pred,q1, q2)),psl);
786  }
787 
788  ret_tsou = *tsou;
789  }
790 
791  /* The two quasts are leaves */
792  else if (quast_value_quast_leaf_p(in_qv2) && quast_value_quast_leaf_p(in_qv)) {
793  int dep, dep2, nb, nb2, max_depth;
794  quast q2 = quast_undefined;
795  statement st, st2;
796  bool tt;
797  quast_leaf ql = quast_value_quast_leaf( in_qv );
798  quast_leaf ql2 = quast_value_quast_leaf( in_qv2 );
801 
802  if (ll == leaf_label_undefined)
803  { *tsou = copy_quast(*tsou2); RETURN(9, "adg_path_max_source", *tsou2); }
804  if (ll2 == leaf_label_undefined) RETURN(9, "adg_path_max_source", *tsou);
805 
806  dep = leaf_label_depth(ll);
807  dep2 = leaf_label_depth(ll2);
808  nb = leaf_label_statement(ll);
809  nb2 = leaf_label_statement(ll2);
810 
811  if (take_last) {
812  if (dep > dep2) RETURN(9, "adg_path_max_source", *tsou);
813  if (dep2 > dep) {
814  quast_quast_value( *tsou ) = copy_quast_value(in_qv2);
815  RETURN(9, "adg_path_max_source", *tsou2);
816  }
817  }
818  else {
819  if (dep2 > dep ) RETURN(9, "adg_path_max_source", *tsou);
820  if (dep > dep2) {
821  quast_quast_value( *tsou ) = copy_quast_value(in_qv2);
822  RETURN(9, "adg_path_max_source", *tsou2);
823  }
824  }
825 
826  /* The two statement have the same depth dep */
827  st = adg_number_to_statement( nb );
828  st2 = adg_number_to_statement( nb2 );
829 
830  max_depth = stco_common_loops_of_statements(Gstco_map, st, st2);
831  if (dep == max_depth) {
832  tt = (statement_number(st) >= statement_number(st2));
833  if (take_last) {
834  if (tt) RETURN(9, "adg_path_max_source", *tsou);
835  *tsou = copy_quast(*tsou2);
836  RETURN(9, "adg_path_max_source", *tsou2);
837  }
838  else {
839  if (!tt) RETURN(9, "adg_path_max_source", *tsou);
840  *tsou = copy_quast(*tsou2);
841  RETURN(9, "adg_path_max_source", *tsou2);
842  }
843  }
844 
845  q2 = adg_max_of_leaves( tsou, *tsou2, dep, in_pa, take_last );
847  quast_newparms(*tsou2) );
848  quast_quast_value( *tsou ) = quast_quast_value( q2 );
849  ret_tsou = *tsou;
850  }
851  else pips_internal_error("Anormal quast ");
852 
853  debug(9, "adg_path_max_source", "end \n");
854  return( ret_tsou );
855 }
quast adg_path_max_source(quast *tsou, quast *tsou2, Ppath in_pa, list psl, boolean take_last)
======================================================================
Definition: adg_utils.c:726
bool adg_quast_leaf_solution_equal_p(quast in_q1, quast in_q2)
======================================================================
Definition: adg_utils.c:290
list gen_concatenate(const list l1x, const list l2x)
concatenate two lists.
Definition: list.c:436
Ppath pa_intersect_complement(Ppath in_pa, Pcomplement in_pc)
Ppath pa_intersect_complement( (Ppath) in_pa, (Pcomplement) in_pc ) Computes the intersection between...
Definition: path.c:200

References adg_max_of_leaves(), adg_number_to_statement(), adg_quast_leaf_solution_equal_p(), Ssysteme::base, conditional_false_quast, conditional_predicate, conditional_true_quast, copy_quast(), copy_quast_value(), debug(), gen_concatenate(), Gstco_map, is_quast_value_conditional, leaf_label_depth, leaf_label_statement, leaf_label_undefined, make_conditional(), make_quast(), make_quast_value(), pa_faisabilite, pa_intersect_complement(), pa_intersect_system(), pips_internal_error, predicate_system, quast_leaf_leaf_label, quast_newparms, quast_quast_value, quast_undefined, quast_value_conditional, quast_value_conditional_p, quast_value_quast_leaf, quast_value_quast_leaf_p, quast_value_undefined, RETURN, sc_creer_base(), statement_number, and stco_common_loops_of_statements().

Referenced by adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_path_possible_source()

Pposs_source adg_path_possible_source ( quast in_tsou,
vertex  in_ver,
int  in_dep,
Ppath  in_pa,
bool  take_last 
)

======================================================================

Pposs_source adg_path_possible_source( quast in_tsou, vertex in_ver, int in_dep, Psysteme in_ps ) Input : The present solution source in_tsou AL 29/07/93 the vertex in_ver to examine and its depth in_dep. and the candidate context in_ps. If take_last is true, we select leaves according to the sequential order (the last one wins). If it is false, the first one wins. Output : Node of quast in_tsou under which we could find a source. PRIVATE use.

The last wins. General usage.

The first wins. Used to compute summary read effects

This vertex is not a possible source

Definition at line 929 of file adg_utils.c.

935 {
936  bool ret_bool = false;
937  quast_value qu_v = NULL;
938  Pposs_source ret_psou;
939 
940  debug(8, "adg_path_possible_source", "begin \n");
941 
942  ret_psou = (Pposs_source) malloc(sizeof(Sposs_source));
943  ret_psou->pat = in_pa;
944  ret_psou->qua = in_tsou;
945 
946  if ( *in_tsou == quast_undefined ) RETURN(8,"adg_path_possible_source 1",ret_psou);
947  qu_v = quast_quast_value( *in_tsou );
948  if (qu_v == quast_value_undefined ) RETURN(8,"adg_path_possible_source 2",ret_psou);
949 
950  if (quast_value_conditional_p(qu_v)) {
951  Ppath pat, paf;
952  Pposs_source pt, pf;
954  quast* tq = &(conditional_true_quast( qvc ));
955  quast* fq = &(conditional_false_quast( qvc ));
957 
958  adg_sc_update_base( &loc_ps );
959  pat = pa_intersect_system( in_pa, loc_ps );
960  paf = pa_intersect_complement( in_pa, loc_ps );
961  pt = adg_path_possible_source( tq, in_ver, in_dep, pat, take_last );
962  pf = adg_path_possible_source( fq, in_ver, in_dep, paf, take_last );
963 
964  if (pa_empty_p( pt->pat )) ret_psou = pf;
965  else if (pa_empty_p( pf->pat )) ret_psou = pt;
966  }
967  else if (quast_value_quast_leaf_p(qu_v)) {
969  int qu_d = leaf_label_depth( qu_ll );
970  statement sou_s = adg_vertex_to_statement(in_ver);
971  int sou_nb = statement_number( sou_s );
973  int qu_order = statement_number( qu_s );
975  bool tt = ( sou_nb <= qu_order );
976 
977  /* The last wins. General usage. */
978  if (take_last) {
979  if( qu_d != in_dep ) {
980  if( (nesting > qu_d) || (nesting > in_dep) ) {
981  if(qu_d <= in_dep) ret_bool = true; }
982  else ret_bool = tt;
983  }
984  else ret_bool = true;
985  }
986  /* The first wins. Used to compute summary read effects */
987  else {
988  if( qu_d != in_dep ) {
989  if( (nesting > qu_d) || (nesting > in_dep) ) {
990  if(qu_d <= in_dep) ret_bool = false;
991  else ret_bool = true;
992  }
993  else ret_bool = !tt;
994  }
995  else ret_bool = true;
996  }
997 
998  /* This vertex is not a possible source */
999  if (!ret_bool) ret_psou->pat = pa_empty();
1000  }
1001 
1002  debug(8, "adg_path_possible_source", "end \n");
1003  return( ret_psou );
1004 }
void adg_sc_update_base(Psysteme *in_pps)
======================================================================
Definition: adg_utils.c:384
Pposs_source adg_path_possible_source(quast *in_tsou, vertex in_ver, int in_dep, Ppath in_pa, bool take_last)
======================================================================
Definition: adg_utils.c:929
struct Sposs_source * Pposs_source
void * malloc(YYSIZE_T)
Ppath pa_empty()
Ppath pa_empty() AL 18/11/93 Returns empty path : pa_empty = sc_empty(NULL) ^ (NIL)
Definition: path.c:135
bool pa_empty_p(Ppath in_pa)
pa_empty_p( (Ppath) in_pa ) AL 18/11/93 Returns True if in_pa = (1*TCST = 0) ^ (NIL)
Definition: path.c:141
static list nesting
assumes:
Structure for return of a possible source.

References adg_number_to_statement(), adg_sc_update_base(), adg_vertex_to_statement(), conditional_false_quast, conditional_predicate, conditional_true_quast, debug(), Gstco_map, leaf_label_depth, leaf_label_statement, malloc(), nesting, pa_empty(), pa_empty_p(), pa_intersect_complement(), pa_intersect_system(), Sposs_source::pat, predicate_system, Sposs_source::qua, quast_leaf_leaf_label, quast_quast_value, quast_undefined, quast_value_conditional, quast_value_conditional_p, quast_value_quast_leaf, quast_value_quast_leaf_p, quast_value_undefined, RETURN, statement_number, and stco_common_loops_of_statements().

Referenced by adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_quast_equal_p()

bool adg_quast_equal_p ( quast  in_q1,
quast  in_q2 
)

======================================================================

bool adg_quast_equal_p() AL 1/12/93 Returns true if the 2 input quasts are equal to quast_undefined. Could be extented.

Definition at line 192 of file adg_utils.c.

194 { return (( in_q1 == quast_undefined ) && (in_q2 == quast_undefined)); }

References quast_undefined.

Referenced by adg_compact_quast(), and adg_quast_value_equal_p().

+ Here is the caller graph for this function:

◆ adg_quast_leaf_equal_p()

bool adg_quast_leaf_equal_p ( quast_leaf  in_ql1,
quast_leaf  in_ql2 
)

======================================================================

bool adg_quast_leaf_equal_p() AL 1/12/93 NOT used, NOT tested.

Definition at line 226 of file adg_utils.c.

228 {
229  leaf_label ll1 = NULL, ll2 = NULL;
230 
231  if ((in_ql1 == quast_leaf_undefined)&&(in_ql2 == quast_leaf_undefined)) return true;
232  if ((in_ql1 == quast_leaf_undefined)||(in_ql2 == quast_leaf_undefined)) return false;
233 
234  ll1 = quast_leaf_leaf_label( in_ql1 );
235  ll2 = quast_leaf_leaf_label( in_ql2 );
236  if (ll1 == leaf_label_undefined) {
237  if (ll2 == leaf_label_undefined) return true;
238  else return false;
239  }
240  else {
241  if (ll2 == leaf_label_undefined) return false;
242  else return( ((int) leaf_label_statement( ll1 ) ==
243  (int) leaf_label_statement( ll2 )) &&
244  ((int) leaf_label_depth( ll1 ) ==
245  (int) leaf_label_depth( ll2 )) );
246  }
247 }

References leaf_label_depth, leaf_label_statement, leaf_label_undefined, quast_leaf_leaf_label, and quast_leaf_undefined.

Referenced by adg_quast_value_equal_p().

+ Here is the caller graph for this function:

◆ adg_quast_leaf_label_equal_p()

bool adg_quast_leaf_label_equal_p ( quast  in_q1,
quast  in_q2 
)

======================================================================

bool adg_quast_leaves_equal_p( (quast) in_q1, (quast) in_q2 ) Returns True if the Two input quast have same leaf-labels.

Definition at line 254 of file adg_utils.c.

256 {
257  quast_value qv1 = NULL, qv2 = NULL;
258  quast_leaf ql1 = NULL, ql2 = NULL;
259  leaf_label ll1 = NULL, ll2 = NULL;
260 
261  debug(9, "adg_quast_leaves_equal_p", "doing\n");
262  if ((in_q1 == quast_undefined)||(in_q2 == quast_undefined)) return false;
263 
264  qv1 = quast_quast_value( in_q1 );
265  qv2 = quast_quast_value( in_q2 );
266  if ((qv1 == quast_value_undefined)||(qv2 == quast_value_undefined) ||
267  quast_value_conditional_p( qv1 )||quast_value_conditional_p( qv2 )) return false;
268 
269  ql1 = quast_value_quast_leaf( qv1 );
270  ql2 = quast_value_quast_leaf( qv2);
271  if ((ql1 == quast_leaf_undefined)||(ql2 == quast_leaf_undefined)) return false;
272 
273  ll1 = quast_leaf_leaf_label( ql1 );
274  ll2 = quast_leaf_leaf_label( ql2 );
275  if (ll1 == leaf_label_undefined) {
276  if (ll2 == leaf_label_undefined) return true;
277  else return false;
278  }
279  else {
280  if (ll2 == leaf_label_undefined) return false;
281  else return( ((int) leaf_label_statement( ll1 ) ==
282  (int) leaf_label_statement( ll2 )) &&
283  ((int) leaf_label_depth( ll1 ) ==
284  (int) leaf_label_depth( ll2 )) );
285  }
286 }

References debug(), leaf_label_depth, leaf_label_statement, leaf_label_undefined, quast_leaf_leaf_label, quast_leaf_undefined, quast_quast_value, quast_undefined, quast_value_conditional_p, quast_value_quast_leaf, and quast_value_undefined.

+ Here is the call graph for this function:

◆ adg_quast_leaf_solution_equal_p()

bool adg_quast_leaf_solution_equal_p ( quast  in_q1,
quast  in_q2 
)

======================================================================

Definition at line 290 of file adg_utils.c.

292 {
293  quast_value qv1, qv2;
294  quast_leaf ql1 = NULL, ql2 = NULL;
295  list ll1 = NULL, ll2 = NULL;
296 
297  debug(9, "adg_quast_leaf_solution_equal_p", "doing\n");
298  if ((in_q1 == quast_undefined) && (in_q2 == quast_undefined)) return true;
299  if ((in_q1 == quast_undefined)||(in_q2 == quast_undefined)) return false;
300 
301  qv1 = quast_quast_value( in_q1 );
302  qv2 = quast_quast_value( in_q2 );
303  if ((qv1 == quast_value_undefined) && (qv2 == quast_value_undefined)) return true;
304  if ((qv1 == quast_value_undefined)||(qv2 == quast_value_undefined) ||
305  quast_value_conditional_p( qv1 )||quast_value_conditional_p( qv2 )) return false;
306 
307  ql1 = quast_value_quast_leaf( qv1 );
308  ql2 = quast_value_quast_leaf( qv2);
309  if ((ql1 == quast_leaf_undefined) && (ql2 == quast_leaf_undefined)) return true;
310  if ((ql1 == quast_leaf_undefined)||(ql2 == quast_leaf_undefined)) return false;
311 
312  ll1 = quast_leaf_solution(ql1);
313  ll2 = quast_leaf_solution(ql2);
314  if (gen_length(ll1) != gen_length( ll2 )) return false;
315  for(; !ENDP(ll1); POP(ll1) , POP(ll2)) {
318  if (!vect_equal(pv1, pv2)) return false;
319  }
320  return true;
321 }
bool vect_equal(Pvecteur v1, Pvecteur v2)
bool vect_equal(Pvecteur v1, Pvecteur v2): test a egalite de deux vecteurs
Definition: reductions.c:278

References CAR, debug(), ENDP, EXPRESSION, EXPRESSION_PVECTEUR, gen_length(), POP, quast_leaf_solution, quast_leaf_undefined, quast_quast_value, quast_undefined, quast_value_conditional_p, quast_value_quast_leaf, quast_value_undefined, and vect_equal().

Referenced by adg_path_max_source().

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

◆ adg_quast_value_equal_p()

bool adg_quast_value_equal_p ( quast_value  in_qv1,
quast_value  in_qv2 
)

======================================================================

bool adg_quast_value_equal_p() AL 1/12/93 NOT used, NOT tested.

Definition at line 201 of file adg_utils.c.

203 {
204  conditional cond1 = NULL, cond2 = NULL;
205  Psysteme ps1 = NULL, ps2 = NULL;
206 
207  if ((in_qv1 == quast_value_undefined)&&(in_qv2 == quast_value_undefined)) return true;
208  if ((in_qv1 == quast_value_undefined)||(in_qv2 == quast_value_undefined)) return false;
209 
210  if ( quast_value_quast_leaf_p(in_qv1) && quast_value_quast_leaf_p(in_qv2))
212  quast_value_quast_leaf(in_qv2));
213  if (quast_value_quast_leaf_p(in_qv1)||quast_value_quast_leaf_p(in_qv2)) return false;
214 
217  if ((adg_suppress_2nd_in_1st_ps(ps1, ps2) != SC_UNDEFINED) ||
218  (adg_suppress_2nd_in_1st_ps(ps2, ps1) != SC_UNDEFINED) ) return false;
220 }
bool adg_quast_leaf_equal_p(quast_leaf in_ql1, quast_leaf in_ql2)
======================================================================
Definition: adg_utils.c:226
Psysteme adg_suppress_2nd_in_1st_ps(Psysteme in_ps1, Psysteme in_ps2)
======================================================================
Definition: adg_utils.c:403

References adg_quast_equal_p(), adg_quast_leaf_equal_p(), adg_suppress_2nd_in_1st_ps(), conditional_false_quast, conditional_predicate, conditional_true_quast, predicate_system, quast_value_conditional, quast_value_quast_leaf, quast_value_quast_leaf_p, and quast_value_undefined.

+ Here is the call graph for this function:

◆ adg_rename_entities()

list adg_rename_entities ( list  le,
hash_table  fst 
)

======================================================================

list adg_rename_entities( list le, hash_table fst) AL 22/07/93 Input : A list of entities le and a hash table fst.

Output : A list of entities with names RE1 RE2 RE3 ... according to a global counter Gcount_re. If we already have created enough amount of new entities, we reuse them; else, we create new ones. Gcount_re is the total number of such entities. The corresponding changes are kept in the hash_table Gforward_substitute_table ("fst") given in argument. PRIVATE use.

If a Renamed Entity already exists, we use it ; else, we make a new one and increment Gcount_re.

Definition at line 1125 of file adg_utils.c.

1128 {
1129  list ret_l = NIL;
1130  int counter = 0;
1131 
1132  debug(9, "adg_rename_entities", "begin \n");
1133  for(;!ENDP(le); POP(le)) {
1134  extern int Gcount_re;
1135  entity in_ent = NULL, new_ent = NULL, mod_ent = NULL;
1136  char *name = NULL, *name2 = NULL, *num = NULL;
1137 
1138  counter++;
1139  num = int2a(counter);
1141  name = strdup(concatenate("RE", num, (char *) NULL));
1142  free(num);
1143 
1144  /* If a Renamed Entity already exists, we use it ;
1145  * else, we make a new one and increment Gcount_re.
1146  */
1147  if ( counter <= Gcount_re ) {
1148  new_ent = FindOrCreateEntity(
1151  (char*) NULL)),
1152  name );
1153  }
1154  else {
1155  Gcount_re++;
1158  MODULE_SEP_STRING, name, NULL ));
1159  new_ent = make_entity(name2,
1164  }
1165 
1166  ADD_ELEMENT_TO_LIST(ret_l, ENTITY, new_ent);
1167 
1168  in_ent = ENTITY(CAR(le));
1169  hash_put(fst, (char*) in_ent, (char*) entity_to_expression(new_ent));
1170  if (get_debug_level() > 7) {
1171  fprintf(stderr, "Old %s -> New %s\n",
1172  entity_local_name( in_ent ),
1173  entity_local_name( new_ent ));
1174  }
1175  }
1176  debug(9, "adg_rename_entities", "end \n");
1177  return( ret_l );
1178 }
int Gcount_re
Global variables.
Definition: array_dfg.c:45
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
Definition: hash.c:364

References ADD_ELEMENT_TO_LIST, ADFG_MODULE_NAME, CAR, concatenate(), debug(), ENDP, ENTITY, entity_local_name(), entity_to_expression(), FindOrCreateEntity(), fprintf(), free(), Gcount_re, get_current_module_entity(), get_debug_level(), hash_put(), int2a(), is_basic_int, is_storage_ram, is_type_variable, is_value_unknown, make_basic(), make_entity, make_storage(), make_type(), make_value(), make_variable(), mod_ent, MODULE_SEP_STRING, NIL, num, POP, ram_undefined, strdup(), UU, and UUINT.

Referenced by adg_dataflowgraph().

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

◆ adg_sc_dup()

Psysteme adg_sc_dup ( Psysteme  in_ps)

======================================================================

Psysteme adg_sc_dup( (Psysteme) in_ps ) AL 09/11/93 Input : A Psysteme in_ps. Output : A duplicated Psysteme. Smooth version of sc_dup : We avoid any verificatio on the contraintes. PRIVATE use !

Definition at line 331 of file adg_utils.c.

333 {
334  Psysteme cp = SC_UNDEFINED;
335  Pcontrainte eq = NULL, eq_cp = NULL;
336 
337  debug(9, "adg_sc_dup", "begin\n");
338  if (!SC_UNDEFINED_P(in_ps)) {
339  cp = sc_new();
340 
341  for (eq = in_ps->egalites; eq != NULL; eq = eq->succ) {
342  eq_cp = contrainte_new();
344  sc_add_egalite(cp, eq_cp);
345  }
346 
347  for(eq=in_ps->inegalites;eq!=NULL;eq=eq->succ) {
348  eq_cp = contrainte_new();
350  sc_add_inegalite(cp, eq_cp);
351  }
352 
353  if(in_ps->dimension==0) {
354  cp->dimension = 0;
355  cp->base = VECTEUR_UNDEFINED;
356  }
357  else {
358  cp->dimension = in_ps->dimension;
359  cp->base = base_reversal(vect_dup(in_ps->base));
360  }
361  }
362  debug(9, "adg_sc_dup", "end\n");
363  return(cp);
364 }
Pbase base_reversal(Pbase b_in)
Pbase base_reversal(Pbase b_in): produces a basis b_out, having the same basis vectors as b_in,...
Definition: base.c:221
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
Pcontrainte contrainte_new(void)
package contrainte - allocations et desallocations
Definition: alloc.c:47
void sc_add_egalite(Psysteme p, Pcontrainte e)
void sc_add_egalite(Psysteme p, Pcontrainte e): macro ajoutant une egalite e a un systeme p; la base ...
Definition: sc_alloc.c:389
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
Definition: sc_alloc.c:55
void sc_add_inegalite(Psysteme p, Pcontrainte i)
void sc_add_inegalite(Psysteme p, Pcontrainte i): macro ajoutant une inegalite i a un systeme p; la b...
Definition: sc_alloc.c:406
Pcontrainte eq
element du vecteur colonne du systeme donne par l'analyse
Definition: sc_gram.c:108
Pvecteur cp
pointeur sur l'egalite ou l'inegalite courante
Definition: sc_read.c:87
struct Scontrainte * succ
Pcontrainte inegalites
Definition: sc-local.h:71
Pcontrainte egalites
Definition: sc-local.h:70
int dimension
Definition: sc-local.h:74
#define VECTEUR_UNDEFINED
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Definition: alloc.c:51

References base_reversal(), contrainte_new(), contrainte_vecteur, cp, debug(), eq, sc_add_egalite(), sc_add_inegalite(), sc_new(), Scontrainte::succ, vect_dup(), and VECTEUR_UNDEFINED.

Referenced by adg_dataflowgraph(), and adg_dataflowgraph_with_extremities().

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

◆ adg_sc_update_base()

void adg_sc_update_base ( Psysteme in_pps)

======================================================================

void adg_sc_update_base( (Psysteme*) in_pps ) AL 05/11/93 Input : A pointer on Psysteme in_pps. Done : Update base of in_ps. PRIVATE use !

Definition at line 384 of file adg_utils.c.

386 {
387  Psysteme in_ps = (Psysteme) *in_pps;
388 
389  if ((in_ps != SC_UNDEFINED) && (in_ps != SC_RN)) {
390  if ((in_ps->nb_eq == 0) && (in_ps->nb_ineq == 0) ) *in_pps = SC_RN;
391  else { in_ps->base = (Pbase) NULL; sc_creer_base( in_ps ); }
392  }
393 }
int nb_ineq
Definition: sc-local.h:73
int nb_eq
Definition: sc-local.h:72
struct Svecteur * Pbase

References Ssysteme::base, Ssysteme::nb_eq, Ssysteme::nb_ineq, and sc_creer_base().

Referenced by adg_dataflowgraph(), adg_path_possible_source(), and adg_update_dfg().

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

◆ adg_simple_ineg_p()

bool adg_simple_ineg_p ( Psysteme  in_ps)

======================================================================

bool adg_simple_ineg_p( (Psysteme) in_ps ) AL 22/10/93 Input : A psysteme in_ps Output : true if in_ps has only one inegality in it. FALSE otherwhise. PUBLIC use.

Definition at line 568 of file adg_utils.c.

570 { return (in_ps != SC_RN)?((in_ps->nb_eq == 0) && (in_ps->nb_ineq == 1)):false; }

◆ adg_suppress_2nd_in_1st_ps()

Psysteme adg_suppress_2nd_in_1st_ps ( Psysteme  in_ps1,
Psysteme  in_ps2 
)

======================================================================

Psysteme adg_suppress_2nd_in_1st_ps( (Psysteme) in_ps1, (Psysteme) in_ps2 ) AL 03/11/93 Input : 2 Psystemes. Output : Psysteme : Scan in_ps1 and remove from it Pcontraintes in in_ps2. No sharing, No remove input object. PUBLIC use possible.

Definition at line 403 of file adg_utils.c.

405 {
406  Psysteme ret_ps = SC_RN;
407  Pcontrainte eq1 = NULL, eq2 = NULL, ineq1 = NULL, ineq2 = NULL;
408 
409  debug(9, "adg_suppress_2nd_in_1st_ps", "begin\n");
410  if ( in_ps1 == SC_RN ) RETURN(9, "adg_suppress_2nd_in_1st_ps", ret_ps);
411  if ( in_ps2 == SC_RN ) RETURN(9, "adg_suppress_2nd_in_1st_ps", in_ps1);
412  for (eq1 = in_ps1->egalites; eq1 != NULL; eq1 = eq1->succ) {
413  bool ok = true;
414  for (eq2 = in_ps2->egalites; eq2 != NULL; eq2 = eq2->succ)
415  { if (vect_equal(eq1->vecteur, eq2->vecteur)) {ok=false; break; }}
416  if (ok) ret_ps = sc_append( ret_ps,
418  }
419  for (ineq1 = in_ps1->inegalites; ineq1 != NULL; ineq1 = ineq1->succ) {
420  bool ok = true;
421  for (ineq2 = in_ps2->inegalites; ineq2 != NULL; ineq2 = ineq2->succ)
422  { if (vect_equal(ineq1->vecteur, ineq2->vecteur)) {ok=false; break;} }
423  if (ok) ret_ps = sc_append( ret_ps,
424  sc_make( CONTRAINTE_UNDEFINED, contrainte_make(ineq1->vecteur)));
425  }
426 
427  debug(9, "adg_suppress_2nd_in_1st_ps", "end\n");
428  return ret_ps;
429 }
static bool ok
Pvecteur vecteur

References contrainte_make(), CONTRAINTE_UNDEFINED, debug(), ok, RETURN, sc_append(), sc_make(), Scontrainte::succ, vect_equal(), and Scontrainte::vecteur.

Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), adg_quast_value_equal_p(), and adg_update_dfg().

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

◆ dfg_vertex_label_dup()

dfg_vertex_label dfg_vertex_label_dup ( dfg_vertex_label  in_dvl)

======================================================================

dfg_vertex_label_dup( (dfg_vertex_label) in_dvl ) AL 18/10/93 Input : A dfg_vertex_label in_dvl Output : A duplicated dfg_vertex_label. WARNING: tag sccflags is always put to sccflags_undefined !! Should not be used anymore : copy_dfg_vertex_label exists ! PRIVATE use .

Definition at line 545 of file adg_utils.c.

547 {
549 
550  debug(9, "dfg_vertex_label_dup", "begin \n");
551  if( in_dvl != dfg_vertex_label_undefined ) {
552  ret_dvl = make_dfg_vertex_label(
553  dfg_vertex_label_statement( in_dvl ),
556  }
557  debug(9, "dfg_vertex_label_dup", "end \n");
558  return ret_dvl;
559 }
dfg_vertex_label make_dfg_vertex_label(intptr_t a1, predicate a2, sccflags a3)
Definition: paf_ri.c:264
predicate predicate_dup(predicate in_pred)
======================================================================
Definition: adg_utils.c:529
#define sccflags_undefined
Definition: dg.h:247
#define dfg_vertex_label_undefined
Definition: paf_ri.h:388
#define dfg_vertex_label_statement(x)
Definition: paf_ri.h:413
#define dfg_vertex_label_exec_domain(x)
Definition: paf_ri.h:415

References debug(), dfg_vertex_label_exec_domain, dfg_vertex_label_statement, dfg_vertex_label_undefined, make_dfg_vertex_label(), predicate_dup(), and sccflags_undefined.

+ Here is the call graph for this function:

◆ predicate_dup()

predicate predicate_dup ( predicate  in_pred)

======================================================================

predicate predicate_dup( (predicate) in_pred ) AL 18/10/93 Input : A predicate in_pred. Output : A duplicated predicate ret_pred. PUBLIC use possible.

Definition at line 529 of file adg_utils.c.

531 {
532  if ( in_pred != predicate_undefined )
533  return make_predicate( sc_dup( predicate_system(in_pred) ) );
534  else return predicate_undefined;
535 }

References make_predicate(), predicate_system, predicate_undefined, and sc_dup().

Referenced by dfg_vertex_label_dup().

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

Variable Documentation

◆ Gcount_re

int Gcount_re
extern

Global variables.

Global variables.

Definition at line 45 of file array_dfg.c.

Referenced by adg_rename_entities(), and array_dfg().

◆ Gstco_map

◆ PATH_METHOD

boolean PATH_METHOD
extern