25 #include "pips_config.h"
60 vertex v_entry = NULL, v_exit = NULL;
62 debug(9,
"adg_pure_dfg",
"begin\n");
72 if (or ==
EXIT_ORDER) { v_exit = ve;
continue; }
78 vertex ver, ver2 = NULL, ver5 = NULL;
83 if ((ver == v_entry) || (ver == v_exit))
continue;
100 if ((ver3 == v_entry) || (ver3 == v_exit))
continue;
114 debug(9,
"adg_pure_dfg",
"end\n");
127 vertex v_entry = NULL, v_exit = NULL;
129 debug(9,
"adg_pure_dfg2",
"begin\n");
162 debug(9,
"adg_pure_dfg2",
"end\n");
177 cons *pv1 = NULL, *ps = NULL, *pc = NULL;
180 fprintf(fd,
"\n ************************ Dependence graph ************************\n");
192 fprintf(fd,
"\t%02d --> %02d with conflicts\n", dvl1, dvl2);
218 fprintf(fd,
"\n******************** End of Dependence graph ********************\n");
246 debug(9,
"adg_number_to_vertex",
"begin\n");
254 debug(9,
"adg_number_to_vertex",
"end\n");
283 debug(9,
"adg_vertex_to_ordering",
"Number of ver : %d\n",
count);
285 debug(9,
"adg_vertex_to_ordering",
" -> ordering %d\n", order);
296 bool is_in_list =
false;
298 for( ; (l !=
NIL) && (! is_in_list); l =
CDR(l))
327 debug(7,
"adg_reorder_statement_number",
"begin\n");
330 for(; !
ENDP(verl);
POP(verl)) {
342 debug(9,
"adg_reorder_statement_number",
343 " Vertex-Statement : %d Ordering of Statement : %d\n",
348 debug(7,
"adg_reorder_statement_number",
"end\n");
364 debug(9,
"adg_same_dfg_vertex_number",
"doing\n");
370 if ( prov_i == in_i )
return( ver );
373 debug(9,
"adg_same_dfg_vertex_number",
"end\n");
386 void adg_update_dfg( in_sou, in_ref, in_dest, in_pa, in_context, in_test, in_gr, in_lp )
398 debug(7,
"adg_update_dfg",
"begin\n");
417 int sou_nb, dest_vls = (
int) NULL;
436 for(; dj != NULL; dj = dj->
succ) {
441 if (dj->
psys != SC_UNDEFINED) {
443 if (prov_ps == SC_UNDEFINED)
continue;
470 for(; !
ENDP(succ_l) && !(get_it);
POP(succ_l)) {
474 if (vv != in_dest)
continue;
488 quast qt = NULL, qf = NULL;
496 in_context, in_test, in_gr, in_lp );
502 in_context, in_test, in_gr, in_lp );
505 debug(7,
"adg_update_dfg",
"end\n");
519 list test_pred_l = NULL, prl =
NIL;
521 debug(9,
"adg_get_exec_domain",
"begin\n");
531 else prl = test_pred_l;
535 debug(9,
"adg_get_exec_domain",
"end\n");
557 debug(9,
"adg_same_order_in_dvl",
"Ordering of ver : %d\n", in);
561 if( in2 != in )
continue;
563 debug(9,
"adg_same_order_in_dvl",
"-> %d\n", in2);
587 debug(7,
"adg_dup_disjunctive_nodes",
"begin \n");
591 list new_ver_l = NULL, succ_list = NULL;
601 for(; !
ENDP(succ_list);
POP( succ_list )) {
607 int in2 = (
int) NULL;
647 else for(; !
ENDP(prl);
POP(prl)) {
660 for(; !
ENDP(succ_list);
POP(succ_list)) {
673 for(; !
ENDP(new_ver_l);
POP(new_ver_l))
677 debug(7,
"adg_dup_disjunctive_nodes",
"end \n");
692 list ls = NULL, ret_list =
NIL;
695 debug( 9,
"adg_write_reference_list",
"begin\n" );
699 for(; !
ENDP( ls );
POP( ls ) ) {
705 for(; !
ENDP( conflist );
POP( conflist )) {
712 debug( 9,
"adg_write_reference_list",
"end\n" );
729 debug(9,
"in_effect_list_p",
"begin\n");
732 for(; !
ENDP(l) && !ret_bo ;
POP(l) ) {
737 debug(9,
"in_effect_list_p",
"end\n");
764 for(aux_l = effs; !
ENDP(aux_l);
POP(aux_l)) {
774 debug( 7,
"read_reference_list",
"end\n" );
789 debug(7,
"adg_only_call_WR_dependence",
"begin \n");
793 list succ_list = NULL;
795 vertex ver, new_ver = NULL;
809 for(;!
ENDP( succ_list );
POP( succ_list )) {
814 vertex succ_ver = NULL, new_succver = NULL;
820 for(;!
ENDP( conflist );
POP( conflist )) {
832 if (new_conflist !=
NIL) {
848 debug(7,
"adg_only_call_WR_dependence",
"end \n" );
870 if(sc == SC_UNDEFINED) {
898 Ptsg cgs = NULL, new_gs = NULL ;
900 debug(9,
"conflict_dup",
"begin\n");
915 debug(9,
"conflict_dup",
"end\n");
930 debug(9,
"dg_arc_label_dup",
"begin\n");
937 debug(9,
"dg_arc_label_dup",
"end\n");
948 debug(9,
"dg_vertex_label_dup",
"doing for statement n. : %d\n",
969 debug(9,
"dg_vertex_dup",
"statement n. : %02d\n",
980 debug(9,
"dg_vertex_dup",
"end\n");
1001 debug(9,
"adg_list_same_order_in_dg",
"begin\n");
1003 for(;!
ENDP(in_l);
POP(in_l)) {
1008 debug(9,
"adg_list_same_order_in_dg",
"end \n");
1029 debug(9,
"adg_same_order_in_dg",
"doing \n");
1053 debug(7,
"adg_reverse_graph",
"begin \n");
1087 debug(7,
"adg_reverse_graph",
"end \n");
dg_arc_label make_dg_arc_label(list a)
conflict make_conflict(effect a1, effect a2, cone a3)
cone make_cone(list a1, Ptsg a2)
dg_vertex_label make_dg_vertex_label(intptr_t a1, sccflags a2)
dg_vertex_label copy_dg_vertex_label(dg_vertex_label p)
DG_VERTEX_LABEL.
successor make_successor(arc_label a1, vertex a2)
vertex make_vertex(vertex_label a1, list a2)
graph copy_graph(graph p)
GRAPH.
dfg_arc_label copy_dfg_arc_label(dfg_arc_label p)
DFG_ARC_LABEL.
dataflow make_dataflow(reference a1, list a2, predicate a3, communication a4)
dfg_arc_label make_dfg_arc_label(list a)
dfg_vertex_label make_dfg_vertex_label(intptr_t a1, predicate a2, sccflags a3)
predicate make_predicate(Psysteme a1)
int adg_vertex_to_ordering(vertex in_ver)
======================================================================
graph adg_pure_dfg2(graph in_gr)
======================================================================
bool integer_in_list_p(int i, list l)
===========================================================================
graph adg_dup_disjunctive_nodes(graph g, statement_mapping stco_map)
======================================================================
list adg_list_same_order_in_dg(list in_l, vertex in_v)
======================================================================
list adg_get_exec_domain(static_control stco)
======================================================================
list adg_write_reference_list(vertex ver, effect reff)
======================================================================
int adg_number_to_ordering(int in_nb)
======================================================================
statement adg_vertex_to_statement(vertex in_ver)
======================================================================
vertex adg_same_order_in_dg(list l, vertex v)
======================================================================
int Gcount_re
External variables.
vertex adg_number_to_vertex(graph in_dfg, int in_nb)
======================================================================
vertex dg_vertex_dup(vertex ver)
======================================================================
dg_vertex_label dg_vertex_label_dup(dg_vertex_label dg_vl)
======================================================================
hash_table Gvertex_number_to_statement
Global variables.
list read_reference_list(vertex ver, list ent_l1, list ent_l2)
======================================================================
graph adg_pure_dfg(graph in_gr)
======================================================================
list adg_same_order_in_dvl(list l, vertex ver)
======================================================================
graph adg_only_call_WR_dependence(graph g)
======================================================================
void adg_reorder_statement_number(graph in_dfg)
======================================================================
static effect effect_dup(effect eff)
effect effect_dup(effect eff) input : an effect.
bool in_effect_list_p(list l, effect eff)
======================================================================
conflict conflict_dup(conflict conf)
======================================================================
graph adg_reverse_graph(graph g)
======================================================================
dg_arc_label dg_arc_label_dup(dg_arc_label dg_al)
======================================================================
void adg_update_dfg(quast in_sou, reference in_ref, vertex in_dest, Ppath in_pa, Psysteme in_context, Psysteme in_test, graph in_gr, list *in_lp)
======================================================================
void adg_print_graph(FILE *fd, statement mod_stat, graph mod_graph)
======================================================================
vertex adg_same_dfg_vertex_number(list in_l, int in_i)
======================================================================
list adg_get_disjunctions(list exp_l)
======================================================================
list adg_make_disjunctions(list ps_l1, list ps_l2)
======================================================================
predicate adg_get_predicate_of_loops(list loops)
======================================================================
void adg_fprint_dataflow(FILE *fp, int sink, dataflow df)
===========================================================================
void adg_fprint_predicate_list(FILE *fp, list sc_l)
===========================================================================
void adg_sc_update_base(Psysteme *in_pps)
======================================================================
Psysteme adg_suppress_2nd_in_1st_ps(Psysteme in_ps1, Psysteme in_ps2)
======================================================================
void const char const char const int
#define cone_generating_system(x)
struct _newgen_struct_effect_ * effect
#define sccflags_undefined
#define dg_vertex_label_statement(x)
struct _newgen_struct_dg_arc_label_ * dg_arc_label
#define CONFLICT(x)
CONFLICT.
#define dg_arc_label_conflicts(x)
#define conflict_source(x)
list load_proper_rw_effects_list(statement)
list words_effect(effect)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_reference(e)
FI: it would be useful to assert cell_preference_p(effect_cell(e)), but I do not know how to do it in...
#define make_convex_effect(reference, action, approximation, system)
#define make_simple_effect(reference, action, approximation)
#define action_write_p(x)
#define effect_approximation(x)
#define successor_vertex(x)
#define successor_arc_label(x)
#define vertex_vertex_label(x)
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
#define ENDP(l)
Test if a list is empty.
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
#define CDR(pcons)
Get the list less its first element.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
bool assignment_statement_p(statement)
Test if a statement is an assignment.
hash_table hash_table_make(hash_key_type key_type, size_t size)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
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.
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
static list verlist
of vertex
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
static statement mod_stat
We want to keep track of the current statement inside the recurse.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
#define GET_STATEMENT_MAPPING(map, stat)
statement ordering_to_statement(int o)
Get the statement associated to a given ordering.
bool is_entity_in_list_p(entity, list)
===========================================================================
vertex in_dfg_vertex_list(list, vertex)
===========================================================================
#define static_control_loops(x)
#define conditional_true_quast(x)
#define DATAFLOW(x)
DATAFLOW.
#define quast_value_undefined
struct _newgen_struct_static_control_ * static_control
#define leaf_label_statement(x)
#define dfg_vertex_label_undefined
#define dfg_arc_label_dataflows(x)
#define conditional_false_quast(x)
#define static_control_tests(x)
#define communication_undefined
#define quast_leaf_solution(x)
struct _newgen_struct_dfg_vertex_label_ * dfg_vertex_label
#define dfg_vertex_label_statement(x)
#define quast_value_conditional_p(x)
#define quast_value_quast_leaf_p(x)
#define quast_value_quast_leaf(x)
#define quast_leaf_leaf_label(x)
#define quast_quast_value(x)
#define dfg_vertex_label_exec_domain(x)
#define conditional_predicate(x)
#define quast_value_conditional(x)
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 ...
Ppath pa_intersect_complement(Ppath in_pa, Pcomplement in_pc)
Ppath pa_intersect_complement( (Ppath) in_pa, (Pcomplement) in_pc ) Computes the intersection between...
static hash_table pl
properties are stored in this hash table (string -> property) for fast accesses.
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...
bool reference_equal_p(reference r1, reference r2)
#define PREDICATE(x)
PREDICATE.
#define reference_variable(x)
#define statement_ordering(x)
#define predicate_undefined
#define statement_number(x)
#define predicate_system(x)
#define statement_undefined
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
bool sc_empty_p(Psysteme sc)
bool sc_empty_p(Psysteme sc): check if the set associated to sc is the constant sc_empty or not.
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Psysteme sc_elim_redund(Psysteme ps)
Psysteme sc_elim_redund(Psysteme ps): elimination des contraintes lineaires redondantes dans le syste...
Psysteme sc_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
struct type_sg * Ptsg
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
#define SG_UNDEFINED_P(sg)
Ptsg sg_dup(Ptsg sg_in)
Ptsg sg_dup(Ptsg sg_in): allocation d'un systeme generateur sg_out et copie sans sharing des ensemble...
void sg_fprint(FILE *f, Ptsg sg, char *(*nom_var)(Variable))
void sg_fprint(FILE * f, Ptsg sg, char * (*nom_var)()): impression d'un systeme generateur
Warning! Do not modify this file that is automatically generated!
The structure used to build lists in NewGen.
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
void print_words(FILE *fd, cons *lw)
#define pa_path_to_disjunct(pa)