PIPS
|
#include "local.h"
Go to the source code of this file.
Macros | |
#define | GRAPH_IS_DG |
Name : adg_prettyprint.c Package : array_dfg Author : Arnauld LESERVOT and Alexis PLATONOFF Date : 93/06/27 Modified : Documents: "Implementation du Data Flow Graph dans PIPS" Comments : More... | |
#define | IS_INEG 0 |
#define | IS_EG 1 |
#define | IS_VEC 2 |
#define | ADFG_EXT ".adfg_file" |
Functions | |
void | fprint_dfg (FILE *fp, graph obj) |
=========================================================================== More... | |
bool | print_array_dfg (char *module_name) const |
=========================================================================== More... | |
void | imprime_special_quast (FILE *fp, quast qu) |
=========================================================================== More... | |
static void | adg_contrainte_fprint (FILE *fp, Pcontrainte c, int is_what, char *(*variable_name)()) |
=========================================================================== More... | |
void | adg_inegalite_fprint (FILE *fp, Pcontrainte ineg, char *(*variable_name)()) |
=========================================================================== More... | |
void | adg_egalite_fprint (FILE *fp, Pcontrainte eg, char *(*variable_name)()) |
=========================================================================== More... | |
void | adg_vecteur_fprint (FILE *fp, Pcontrainte vec, char *(*variable_name)()) |
=========================================================================== More... | |
void | adg_fprint_dataflow (FILE *fp, int sink, dataflow df) |
=========================================================================== More... | |
void | adg_fprint_dfg (FILE *fp, graph obj) |
=========================================================================== More... | |
void | adg_fprint_list_of_exp (FILE *fp, list exp_l) |
=========================================================================== More... | |
void | adg_fprint_pred (FILE *fp, predicate pred) |
=========================================================================== More... | |
void | adg_fprint_psysteme (FILE *fp, Psysteme ps) |
=========================================================================== More... | |
void | adg_fprint_sc_pvecteur (FILE *fp, Psysteme ps) |
=========================================================================== More... | |
void | adg_fprint_predicate_list (FILE *fp, list sc_l) |
=========================================================================== More... | |
#define ADFG_EXT ".adfg_file" |
Definition at line 110 of file adg_prettyprint.c.
#define GRAPH_IS_DG |
Name : adg_prettyprint.c Package : array_dfg Author : Arnauld LESERVOT and Alexis PLATONOFF Date : 93/06/27 Modified : Documents: "Implementation du Data Flow Graph dans PIPS" Comments :
Definition at line 36 of file adg_prettyprint.c.
#define IS_EG 1 |
Definition at line 40 of file adg_prettyprint.c.
#define IS_INEG 0 |
Definition at line 39 of file adg_prettyprint.c.
#define IS_VEC 2 |
Definition at line 41 of file adg_prettyprint.c.
|
static |
===========================================================================
static void adg_contrainte_fprint(FILE *fp, Pcontrainte c, int is_what, char *(*variable_name)()):
prints in the file "fp" the constraint "c", of type equality, inequality or vector according to the value of the integer argument "is_what", using the function "variable_name" for the name of the variables.
The function contrainte_fprint() exists, it is defined in contrainte.c (C3 library). We redefine this function because:
1. we want the constant term in the left hand side 2. we want a third type of contrainte (vector) which does not print the inequality or equality symbol. 3. we do not want a line feed at the end of the constraint
We consider that CONTRAINTE_UNDEFINED => CONTRAINTE_NULLE
Results for a constraint containing the following Pvecteur (2*I) (-J) (-4):
equality: 2 * I - J - 4 = 0 inequality: 2 * I - J - 4 <= 0 vector: 2 * I - J - 4
on admet plusieurs occurences du terme constant!?!
sign
value
trail
IS_VEC
Definition at line 239 of file adg_prettyprint.c.
References CONTRAINTE_UNDEFINED_P, contrainte_vecteur, fprint_Value(), fprintf(), IS_EG, IS_INEG, pips_internal_error, Svecteur::succ, TCST, Svecteur::val, value_addto, value_neg_p, value_notzero_p, value_one_p, value_oppose, value_pos_p, VALUE_ZERO, Svecteur::var, variable_name(), vect_check(), VECTEUR_NUL, and VECTEUR_NUL_P.
Referenced by adg_egalite_fprint(), adg_inegalite_fprint(), and adg_vecteur_fprint().
void adg_egalite_fprint | ( | FILE * | fp, |
Pcontrainte | eg, | ||
char * (*)() | variable_name | ||
) |
===========================================================================
void adg_egalite_fprint(FILE *fp, Pcontraint eg, char *(*variable_name)()): Redefinition of egalite_fprint(). See adg_contrainte_fprint() for details.
Definition at line 311 of file adg_prettyprint.c.
References adg_contrainte_fprint(), IS_EG, and variable_name().
Referenced by adg_fprint_psysteme().
===========================================================================
void adg_fprint_dataflow(FILE *fp, int sink, dataflow df): prints in the file "fp" the dataflow "df" with a sink statement "sink".
printf(fp, "\t\t Communication general \n");
Definition at line 333 of file adg_prettyprint.c.
References adg_fprint_list_of_exp(), adg_fprint_pred(), adg_fprint_sc_pvecteur(), communication_broadcast, communication_reduction, communication_shift, communication_undefined, dataflow_communication, dataflow_governing_pred, dataflow_reference, dataflow_transformation, fprintf(), gov_pred, predicate_system, predicate_undefined, ref, trans_l, words_reference(), and words_to_string().
Referenced by adg_fprint_dfg(), and adg_update_dfg().
void adg_fprint_dfg | ( | FILE * | fp, |
graph | obj | ||
) |
===========================================================================
void adg_fprint_dfg(FILE *fp, graph obj): prints in the file "fp" the Data Flow Graph "obj".
Definition at line 379 of file adg_prettyprint.c.
References adg_fprint_dataflow(), adg_fprint_pred(), CAR, CDR, DATAFLOW, dfg_arc_label_dataflows, dfg_vertex_label_exec_domain, exec_dom, fprintf(), graph_vertices, int, NIL, predicate_undefined, sink_stmt, source_stmt, SUCCESSOR, successor_arc_label, successor_vertex, VERTEX, vertex_int_stmt(), vertex_successors, and vertex_vertex_label.
void adg_fprint_list_of_exp | ( | FILE * | fp, |
list | exp_l | ||
) |
===========================================================================
void adg_fprint_list_of_exp(FILE *fp, list exp_l): prints in the file "fp" the list of expression "exp_l". We separate the expressions with a colon (","). We do not end the print with a line feed.
Definition at line 420 of file adg_prettyprint.c.
References CAR, CDR, exp, EXPRESSION, fprintf(), NIL, words_expression(), and words_to_string().
Referenced by adg_fprint_dataflow().
void adg_fprint_pred | ( | FILE * | fp, |
predicate | pred | ||
) |
===========================================================================
void adg_fprint_pred(FILE *fp, predicate pred): prints in the file "fp" the predicate "pred".
Definition at line 438 of file adg_prettyprint.c.
References adg_fprint_psysteme(), debug(), fprintf(), NIL, predicate_system, and predicate_undefined.
Referenced by adg_fprint_dataflow(), and adg_fprint_dfg().
void adg_fprint_predicate_list | ( | FILE* | fp, |
list | sc_l | ||
) |
===========================================================================
void adg_fprint_predicate_list( file* fp, list sc_l ) AL 15/07/93 Input : pointer on file fp, list of psysteme sc_l Output : A prettyprint of psystemes.
Definition at line 504 of file adg_prettyprint.c.
References adg_fprint_psysteme(), CAR, debug(), ENDP, POP, PREDICATE, and predicate_system.
Referenced by adg_get_disjunctions(), and adg_get_exec_domain().
void adg_fprint_psysteme | ( | FILE * | fp, |
Psysteme | ps | ||
) |
===========================================================================
void adg_fprint_psysteme(FILE *fp, Psysteme ps): prints in the file "fp" the Psysteme "ps". Each constraint is printed either with adg_inegalite_fprint() or adg_egalite_fprint(), both redefined above. See adg_contrainte_fprint() for details.
Definition at line 459 of file adg_prettyprint.c.
References adg_egalite_fprint(), adg_inegalite_fprint(), Ssysteme::egalites, entity_local_name(), fprintf(), Ssysteme::inegalites, and Scontrainte::succ.
Referenced by adg_fprint_pred(), adg_fprint_predicate_list(), adg_get_predicate_of_loops(), and my_adg_expressions_to_predicate().
void adg_fprint_sc_pvecteur | ( | FILE * | fp, |
Psysteme | ps | ||
) |
===========================================================================
void adg_fprint_sc_pvecteur(FILE *fp, Psysteme ps): prints in the file "fp" the Psysteme "ps" as a list of vectors. Each constraint is printed with adg_vecteur_fprint() defined above. See adg_contrainte_fprint() for details.
Definition at line 481 of file adg_prettyprint.c.
References adg_vecteur_fprint(), Ssysteme::egalites, entity_local_name(), fprintf(), Ssysteme::inegalites, and Scontrainte::succ.
Referenced by adg_fprint_dataflow().
void adg_inegalite_fprint | ( | FILE * | fp, |
Pcontrainte | ineg, | ||
char * (*)() | variable_name | ||
) |
===========================================================================
void adg_inegalite_fprint(FILE *fp, Pcontraint ineg, char *(*variable_name)()): Redefinition of inegalite_fprint(). See adg_contrainte_fprint() for details.
Definition at line 301 of file adg_prettyprint.c.
References adg_contrainte_fprint(), IS_INEG, and variable_name().
Referenced by adg_fprint_psysteme().
void adg_vecteur_fprint | ( | FILE * | fp, |
Pcontrainte | vec, | ||
char * (*)() | variable_name | ||
) |
===========================================================================
void adg_vecteur_fprint(FILE *fp, Pcontraint vec char *(*variable_name)()): See adg_contrainte_fprint() for details.
Definition at line 323 of file adg_prettyprint.c.
References adg_contrainte_fprint(), IS_VEC, and variable_name().
Referenced by adg_fprint_sc_pvecteur().
void fprint_dfg | ( | FILE * | fp, |
graph | obj | ||
) |
===========================================================================
void fprint_dfg(FILE *fp, graph obj): prints in the file "fp" the Data Flow Graph "obj".
AP, Nov 28th 1995: Ronan asked me to add the execution domain of the destination. Only done if it is not equal to the source.
Definition at line 47 of file adg_prettyprint.c.
References BASE_NODE_NUMBER, CAR, CDR, DATAFLOW, dfg_arc_label_dataflows, dfg_vertex_label_exec_domain, ENTRY_ORDER, exec_dom, fprint_dataflow(), fprint_pred(), fprintf(), graph_vertices, NIL, predicate_undefined, sink_stmt, source_stmt, SUCCESSOR, successor_arc_label, successor_vertex, VERTEX, vertex_int_stmt(), vertex_successors, and vertex_vertex_label.
Referenced by adg_dataflowgraph_with_extremities(), array_dfg(), prgm_mapping(), print_array_dfg(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), re_do_it(), reindexing(), sa_do_it(), scheduling(), and single_assign().
void imprime_special_quast | ( | FILE * | fp, |
quast | qu | ||
) |
===========================================================================
void imprime_special_quast(fp, qu) AL 04/11/93 Input : An output file fp and a quast qu. Output : Print in fp quast qu with real number of leal_labels.
Definition at line 151 of file adg_prettyprint.c.
References CAR, CDR, conditional_false_quast, conditional_predicate, conditional_true_quast, EXPRESSION, fprint_psysteme(), fprintf(), is_quast_value_conditional, is_quast_value_quast_leaf, leaf_label_depth, leaf_label_statement, leaf_label_undefined, NIL, predicate_system, predicate_undefined, quast_leaf_leaf_label, quast_leaf_solution, quast_leaf_undefined, quast_quast_value, quast_undefined, quast_value_conditional, quast_value_quast_leaf, quast_value_tag, quast_value_undefined, words_expression(), and words_to_string().
Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), and adg_fill_with_quast().
bool print_array_dfg | ( | char* | module_name | ) | const |
===========================================================================
Definition at line 113 of file adg_prettyprint.c.
References ADFG_EXT, concatenate(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, fprint_dfg(), free(), get_debug_level(), module_name(), safe_fclose(), safe_fopen(), strdup(), the_dfg, and user_log().