25 #include "pips_config.h"
42 #define NEXT(cp) (((cp) == NIL) ? NIL : (cp)->cdr)
61 if (ret_pev == NULL) {
62 (void)
fprintf(stderr,
"pev_new: Out of memory space\n");
65 ret_pev->
ent = (
void *) NULL;
66 ret_pev->
lis = (
void *) NULL;
86 debug(9,
"adg_get_read_entity_vertices",
"begin \n");
102 for(; !
ENDP(effs);
POP(effs)) {
116 for(; !
ENDP(ent_l);
POP(ent_l)) {
120 boolean found =
false;
125 for(prov_l = ret_list; !
ENDP(prov_l);
POP(prov_l)) {
129 if (pev2->
ent != ent)
continue;
146 debug(9,
"adg_get_read_entity_vertices",
"end \n");
162 list vl = NULL, ret_list =
NIL;
165 debug(9,
"adg_get_write_entity_vertices",
"begin \n");
174 boolean found =
false;
184 for(; !
ENDP(effs);
POP(effs)) {
197 for(prov_l = ret_list; !
ENDP(prov_l);
POP(prov_l)) {
201 if (pev2->
ent != w_ent)
continue;
217 debug(9,
"adg_get_write_entity_vertices",
"end \n");
238 vertex ret_dest_ver = NULL;
239 list dest_psl = NULL;
241 list write_list = NULL, read_list = NULL;
242 quast entry_q = NULL, exit_q = NULL;
243 vertex entry_v = NULL, exit_v = NULL;
246 debug(1,
"adg_dataflowgraph_with_extremities",
"begin \n");
274 fprintf(stderr,
"\n========================================\n");
275 fprintf(stderr,
"Destination Statement: EXIT NODE \n");
280 ret_dest_ver = exit_v;
282 for(; !
ENDP( write_list );
POP( write_list )) {
290 int ie = (
int) NULL, dims_length = (
int) NULL;
302 for(ie = 1; ie <= dims_length; ie++) {
316 debug(9,
"adg_dataflowgraph",
317 "No candidates => Entry Flow\n");
320 "\n ------ Final Source ------\n");
339 for( ie = 1; !
ENDP(dims);
POP(dims), ie++) {
360 for(; !
ENDP( sou_l );
POP(sou_l) ) {
362 int sou_order = (
int) NULL, sou_d = (
int) NULL;
365 list sou_lcl = NULL, sou_args =
NIL;
369 list sou_loops = NULL;
375 quast *local_source = NULL;
376 Ppath local_path = NULL;
377 int max_depth = (
int) NULL;
378 int enclosing_nb = (
int) NULL;
409 else prov_ps = local_path->
psys;
410 local_source = (
quast*) (poss->
qua);
417 fprintf(stderr,
"\nPossible Source Statement (ordering %d) ",sou_order);
418 fprintf(stderr,
"at depth %d :\n", sou_d);
442 for(ie = 1; !
ENDP(sou_args);
POP(sou_args), ie++){
444 Pvecteur pvec = NULL, exit_pv = NULL;
484 fprintf(stderr,
"\nSource Psysteme :\n");
486 if (sou_ps != SC_UNDEFINED)
489 fprintf(stderr,
"\nContext Psysteme :\n");
494 if (sou_ps == SC_UNDEFINED) {
498 else if (enclosing_nb == 0) {
527 fprintf(stderr,
"\nPresent source quast :\n");
536 fprintf(stderr,
"\n Updated Source :\n");
549 fprintf(stderr,
"\n ------ Final Source ------\n");
574 fprintf(stderr,
"\n========================================\n");
575 fprintf(stderr,
"Destination Statement: ENTRY NODE \n");
580 ret_dest_ver = entry_v;
582 for(; !
ENDP( read_list );
POP( read_list )) {
590 int ie = (
int) NULL, dims_length = (
int) NULL;
602 for(ie = 1; ie <= dims_length; ie++) {
616 debug(9,
"adg_dataflowgraph",
"No candidates => Exit Flow\n");
618 fprintf(stderr,
"\n ------ Final Source ------\n");
637 for( ie = 1; !
ENDP(dims);
POP(dims), ie++) {
658 for(; !
ENDP( sou_l );
POP(sou_l) ) {
660 int sou_order = (
int) NULL, sou_d = (
int) NULL;
666 list sou_psl = NULL, sou_loops = NULL;
668 Psysteme sou_ps = SC_RN, sou_context = SC_RN;
673 quast *local_source = NULL;
674 Ppath local_path = NULL;
675 int max_depth = (
int) NULL;
676 int enclosing_nb = (
int) NULL;
706 local_source = (
quast*) &source;
707 loc_context =
sc_dup( dest_context );
730 for(; !
ENDP(sou_effs);
POP(sou_effs)) {
737 if ( ent != dest_ent)
continue;
743 for(; !
ENDP(sou_read);
POP(sou_read)) {
745 list sou_args = NULL;
751 fprintf(stderr,
"\nPossible Source Statement (ordering %d) ",sou_order);
752 fprintf(stderr,
"at depth %d :\n", sou_d);
754 fprintf(stderr,
"for effect :\n");
770 for(ie = 1; !
ENDP(sou_args);
POP(sou_args), ie++){
772 Pvecteur pvec = NULL, exit_v = NULL;
801 fprintf(stderr,
"\nSource Psysteme :\n");
805 fprintf(stderr,
"\nContext Psysteme :\n");
810 if (sou_ps == SC_UNDEFINED) {
814 else if (enclosing_nb == 0) {
842 fprintf(stderr,
"\nPresent source quast :\n");
851 fprintf(stderr,
"\n Updated Source :\n");
865 fprintf(stderr,
"\n ------ Final Source ------\n");
884 debug(1,
"adg_dataflowgraph",
"end \n");
vertex make_vertex(vertex_label a1, list a2)
leaf_label make_leaf_label(intptr_t a1, intptr_t a2)
quast_value make_quast_value(enum quast_value_utype tag, void *val)
quast make_quast(quast_value a1, list a2)
conditional make_conditional(predicate a1, quast a2, quast a3)
quast_leaf make_quast_leaf(list a1, leaf_label a2)
dfg_vertex_label make_dfg_vertex_label(intptr_t a1, predicate a2, sccflags a3)
predicate make_predicate(Psysteme a1)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
statement adg_vertex_to_statement(vertex in_ver)
======================================================================
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)
======================================================================
predicate adg_get_predicate_of_loops(list loops)
======================================================================
void fprint_dfg(FILE *fp, graph obj)
===========================================================================
void imprime_special_quast(FILE *fp, quast qu)
===========================================================================
Pentity_vertices pev_new()
======================================================================
int Gcount_re
External variables.
hash_table Gvertex_number_to_statement
Global variables.
list Gstructural_parameters
statement_mapping Gstco_map
list adg_get_read_entity_vertices(graph in_dg, list in_l)
======================================================================
graph adg_dataflowgraph_with_extremities(statement mod_stat, statement_mapping stco_map, graph dup_dg)
======================================================================
list adg_get_write_entity_vertices(graph in_dg)
======================================================================
quast adg_path_max_source(quast *tsou, quast *tsou2, Ppath in_pa, list psl, boolean take_last)
======================================================================
quast adg_compact_quast(quast in_q)
======================================================================
Pvecteur adg_list_to_vect(list in_list, bool with_tcst)
======================================================================
void adg_fill_with_quast(quast *in_pq, quast in_q)
======================================================================
list adg_decreasing_stat_order_sort(list in_list)
======================================================================
list adg_increasing_stat_order_sort(list in_list)
======================================================================
Psysteme adg_sc_dup(Psysteme in_ps)
======================================================================
Pposs_source adg_path_possible_source(quast *in_tsou, vertex in_ver, int in_dep, Ppath in_pa, bool take_last)
======================================================================
list adg_get_loop_indices(list ll)
======================================================================
void adg_enrichir(quast in_qu, leaf_label in_ll)
======================================================================
Psysteme adg_suppress_2nd_in_1st_ps(Psysteme in_ps1, Psysteme in_ps2)
======================================================================
entity adg_get_integer_entity(int in_i)
======================================================================
void const char const char const int
#define EXPRESSION_PVECTEUR(e)
struct Sentity_vertices * Pentity_vertices
bool my_sc_faisabilite(Psysteme in_ps)
#define CONTRAINTE_UNDEFINED
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
#define sccflags_undefined
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 action_write_p(x)
#define vertex_vertex_label(x)
#define graph_vertices(x)
#define ENDP(l)
Test if a list is empty.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CAR(pcons)
Get the value of the first element of a list.
bool assignment_statement_p(statement)
Test if a statement is an assignment.
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 statement mod_stat
We want to keep track of the current statement inside the recurse.
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)
bool is_entity_in_list_p(entity, list)
===========================================================================
void pu_vect_fprint(FILE *, Pvecteur)
===========================================================================
void fprint_psysteme(FILE *, Psysteme)
===========================================================================
#define static_control_loops(x)
struct _newgen_struct_static_control_ * static_control
@ is_quast_value_quast_leaf
@ is_quast_value_conditional
#define static_control_params(x)
#define dfg_vertex_label_statement(x)
#define quast_leaf_undefined
#define dfg_vertex_label_exec_domain(x)
Ppath pa_full()
Ppath pa_full() AL 18/11/93 Returns full space path : pa_full = pa_new()
quast pip_integer_max(Psysteme ps_dep, Psysteme ps_context, Pvecteur pv_unknowns)
==================================================================
void print_statement(statement)
Print a statement on stderr.
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
#define syntax_reference(x)
#define reference_variable(x)
#define statement_ordering(x)
#define dimension_lower(x)
#define EXPRESSION(x)
EXPRESSION.
#define predicate_undefined
#define dimension_upper(x)
#define reference_indices(x)
#define variable_dimensions(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define expression_syntax(x)
#define predicate_system(x)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg): allocation et initialisation d'un systeme d'equ...
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
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 ...
Structure to list wich node read or write an effect.
Structure for return of a possible source.
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
void print_words(FILE *fd, cons *lw)
#define is_pa_empty_p(pa)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
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...