25 #include "pips_config.h"
30 #define ADD_ELEMENT_TO_LIST( _list, _type, _element) \
31 (_list = gen_nconc( _list, CONS( _type, _element, NIL)))
65 string gr_buffer =
strdup(
"");
66 bool first_node_parent =
true;
71 bool first_node_child =
true;
72 if (first_node_parent)
73 first_node_parent =
false;
76 fprintf(out_f,
"l(\"%s\",n(\"\",[a(\"OBJECT\",\"%s\")],[\n", node_name_parent, node_name_parent);
81 first_node_child =
false;
85 fprintf(out_f,
" l(\"\",e(\"\",[],r(\"%s\")))", node_name_child);
87 string temp_buffer =
strdup(
concatenate(gr_buffer,
",\nl(\"", node_name_parent,
"-", node_name_child,
"\",n(\"\",[a(\"OBJECT\",\"", (
string)
successor_arc_label(succ),
"\"),a(\"_GO\",\"ellipse\")],[\n l(\"\",e(\"\",[],r(\"", node_name_child,
"\")))]))", NULL));
89 gr_buffer = temp_buffer;
90 fprintf(out_f,
" l(\"\",e(\"\",[],r(\"%s-%s\")))", node_name_parent, node_name_child);
96 fprintf(out_f,
"%s", gr_buffer);
131 vertex vertex_parent = NULL;
132 vertex vertex_child = NULL;
137 string node_name_parent = (
string)
malloc(
sizeof(
string)*strlen(variable_name_parent) + 30);
138 string node_name_child = (
string)
malloc(
sizeof(
string)*strlen(variable_name_child) + 30);
141 memset(node_name_parent, 0,
sizeof(
string)*strlen(variable_name_parent) + 30);
142 memset(node_name_child, 0,
sizeof(
string)*strlen(variable_name_child) + 30);
143 sprintf(node_name_parent,
"%d-<%s>-%c", l1, variable_name_parent, statement_action_parent);
144 sprintf(node_name_child,
"%d-<%s>-%c", l2, variable_name_child, statement_action_child);
153 else sprintf(node_name_parent + strlen(node_name_parent),
" %td",
statement_number(
s1));
155 sprintf(node_name_child + strlen(node_name_child),
" %td-%s",
statement_number(s2),
157 else sprintf(node_name_child + strlen(node_name_child),
" %td",
statement_number(s2));
160 memset(succ_label, 0, strlen(succ_label));
163 strcat(succ_label,
"levels(");
165 sprintf(succ_label + strlen(succ_label),
168 strcat(succ_label,
")");
204 string dg_name = NULL;
205 string local_dg_name = NULL;
223 "/", local_dg_name, NULL));
279 string dc_name,local_dc_name;
302 pips_user_warning(
"loop label does not exist\n",
"Please give a valid label (%s not valid)\n",lp_label);
306 fprintf(fp,
"Label: %s ",lp_label);
333 fprintf(fp,
"- Dependence Cone Basis :");
363 if (first)
fprintf(fp,
"- No Dependencies");
successor make_successor(arc_label a1, vertex a2)
vertex make_vertex(vertex_label a1, list a2)
intptr_t apply_persistant_statement_to_int(persistant_statement_to_int f, statement k)
void free_persistant_statement_to_int(persistant_statement_to_int p)
void fprint_string_Value(FILE *, char *, Value)
bool vect_in_basis_p(Pvecteur v, Pbase b)
Pvecteur vect_in_basis_p(Pvecteur v, Pbase b): check that all coordinates in v are in b,...
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
#define cone_generating_system(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 get_list_of_variable_to_filter(void)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
list effect_words_reference(reference)
prettyprint.c
const char * module_name(const char *s)
Return the module part of an entity name.
FILE * safe_fopen(const char *filename, const char *what)
char * get_string_property(const char *)
int safe_fclose(FILE *stream, const char *filename)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_recurse(start, domain_number, flt, rwt)
#define successor_vertex(x)
#define successor_arc_label(x)
struct _newgen_struct_graph_ * graph
#define vertex_vertex_label(x)
#define vertex_successors(x)
#define vertex_undefined_p(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#define NIL
The empty list (nil in Lisp)
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
persistant_statement_to_int statement_to_line_number(statement)
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.
void base_fprint(FILE *f, Pbase b, get_variable_name_t variable_name)
void base_fprint(FILE * f, Pbase b, char * (*variable_name)()): impression d'une base sur le fichier ...
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
void * memset(void *str, int c, size_t len)
memset.c – set an area of memory to a given value Copyright (C) 1991, 2003, 2009-2011 Free Software F...
#define pips_user_warning
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define same_string_p(s1, s2)
#define string_undefined_p(s)
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
string db_get_current_workspace_directory(void)
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...
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
string safe_entity_name(entity e)
predicates and functions for entities
int module_to_declaration_length(entity func)
Number of user declaration lines for a module.
entity find_label_entity(const char *, const char *)
util.c
#define reference_variable(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define entity_undefined_p(x)
#define instruction_call_p(x)
#define statement_instruction(x)
#define persistant_statement_to_int_undefined
#define instruction_call(x)
#define statement_undefined_p(x)
#define statement_number(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
#define sg_sommets(sg)
vieilles definitions des fonctions d'impression void sg_fprint(); #define print_sg(sg) sg_fprint(stdo...
#define sg_rayons(sg)
acces au premier rayon de la liste des rayons d'un systeme generateur defini par un pointeur: sg_rayo...
struct type_sg * Ptsg
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
#define sg_nbre_sommets(sg)
nombre de sommets: int sg_nbre_sommets(Ptsg)
#define SG_UNDEFINED_P(sg)
#define sg_nbre_droites(sg)
nombre de droites: int sg_nbre_droites(Ptsg)
#define sg_nbre_rayons(sg)
nombre de rayons: int sg_nbre_rayons(Ptsg)
#define sg_droites(sg)
acces a la premiere droite de la liste des droites d'un systeme generateur defini par un pointeur: sg...
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
structure de donnees Sommet
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
string words_to_string(cons *lw)
static void statement_in_loopnest(statement s)
static void print_cone_vecteur(FILE *fd, Pvecteur v, Ptsg gs, int type)
entity selected_label
Interface with pipsmake for interactive loop transformations: loop interchange, hyperplane method,...
void prettyprint_graph_daVinci(FILE *out_f, list l_of_vers)
print a graph to daVinci format, each label of successor is represented by a circular node,...
static statement test_statement_of_reference
list make_filtered_dg_or_dvdg(statement mod_stat, graph mod_graph)
bool print_filtered_dg_or_dvdg(string mod_name, bool is_dv)
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
void prettyprint_graph_text(FILE *out_f, list l_of_vers)
print a graph to text format
vertex get_vertex_in_list(list in_l, string in_s)
get vertex in a list by the vertex's label
static bool statement_in_loopnest_p
bool print_loopnest_dependence_cone(const char *module_name)
char *(* get_variable_name_t)(Variable)
Pbase vect_copy(Pvecteur b)
direct duplication.
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...