2 #include "pips_config.h"
29 #include "resources.h"
109 struct cpv p = { .
e=
e, .rm=
false };
265 bool dependence_b =
false;
267 list private_ents1 =
NIL, private_ents2 =
NIL;
469 #define dot_print_label_string( ftg, str ) \
470 fprintf(ftg," [fontsize=24,fontcolor=black, label=\""); \
473 if ( c == '"' ) { /* some char must be escaped */ \
474 (void) putc( '\\', ftg); \
476 (void) putc( c, ftg); \
478 fprintf(ftg," \"]; \n");
505 ver =
"too large statement label with ordering \\n";
528 fprintf( ftg,
"subgraph cluster%d { color = blue; \n ",
count );
597 string tg_name = NULL;
627 fprintf( ftg,
"digraph {\n compound=true;ratio=fill; node[fontsize=24,fontname=\"Courier\",labelloc=\"t\"];nodesep=.05;\n" );
graph copy_graph(graph p)
GRAPH.
static statement in_same_sequence(statement child, sequence seq)
static transformer p_transformer
static void check_private_variables_call_walker(call c, struct cpv *p)
static bool check_private_variables_loop_walker(loop l, struct cpv *p)
static graph clean_sdg(statement module_stmt, graph tg)
Second step to form a clustered DG (SDG), delete dependences between statement s1 and another stateme...
static set get_private_entities(void *s)
static list enclosed_statements_ast(statement stmt, list children_s)
bool statement_equal_p(statement s1, statement s2)
void print_SDGs(statement stmt, graph tg, FILE *ftg, gen_array_t annotations)
vertex statement_to_vertex(statement s, graph g)
dg_vertex_label vertex_label
static list private_variables(statement stat)
bool sequence_dependence_graph(char *module_name)
static bool statement_in_sequence_p(statement s, statement stmt, bool found_p)
int NBCLUSTERS
parameters of BDSC, to be recovered using pips properties
static void print_sdg_task(FILE *ftg, gen_array_t annotations, statement stmt)
return a dot graph for SDG, print only nodes that have at least one successor
dg_arc_label arc_label
Instantiation of the dependence graph:
static bool sequence_dg(statement stmt)
static bool same_level_p(statement s1, statement s2, bool found_p)
static void get_private_entities_walker(loop l, set s)
graph partitioning_sdg(statement module_stmt)
#define dot_print_label_string(ftg, str)
print the string str in file descriptor fd, removing all
gen_array_t annotations
Global variables.
static bool test_dependence_using_regions(statement s1, statement s2)
for precision in dependences in arrays, we use array regions in this function
static string prettyprint_dot_label(statement s, string label1)
bool has_entity_with_same_name(entity, list)
inlining.c
size_t gen_array_nitems(const gen_array_t a)
gen_array_t gen_array_make(size_t size)
declarations...
void * gen_array_item(const gen_array_t a, size_t i)
transformer transformer_identity()
Allocate an identity transformer.
struct _newgen_struct_statement_ * statement
#define region_entity(reg)
list RegionsIntersection(list l1, list l2, bool(*intersection_combinable_p)(effect, effect))
list RegionsIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : outpu...
list regions_write_regions(list)
list regions_read_regions(list)
void set_methods_for_convex_effects(void)
methods.c
void init_convex_rw_prettyprint(const char *)
list convex_regions_transformer_compose(list, transformer)
compose.c
void set_rw_effects(statement_effects)
bool w_r_combinable_p(effect, effect)
void reset_out_effects(void)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
void set_out_effects(statement_effects)
void set_in_effects(statement_effects)
void reset_in_effects(void)
bool w_w_combinable_p(effect, effect)
void generic_effects_reset_all_methods(void)
bool r_w_combinable_p(effect, effect)
void reset_cumulated_rw_effects(void)
list load_statement_local_regions(statement)
void reset_rw_effects(void)
const char * module_name(const char *s)
Return the module part of an entity name.
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
#define gen_recurse(start, domain_number, flt, rwt)
#define successor_vertex(x)
struct _newgen_struct_graph_ * graph
#define vertex_successors(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.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#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.
void gen_free_list(list l)
free the spine of the list
#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.
int gen_occurences(const void *vo, const list l)
count occurences of vo in l
#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_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
loop statement_loop(statement)
Get the loop of a statement.
whileloop statement_whileloop(statement)
Get the whileloop of a statement.
forloop statement_forloop(statement)
Get the forloop of a statement.
bool statement_loop_p(statement)
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
bool set_belong_p(const set, const void *)
set set_append_list(set, const list)
add list l items to set s, which is returned.
set set_make(set_type)
Create an empty set of any type but hash_private.
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)
text Text_Statement(entity, int, statement)
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
bool same_entity_p(entity e1, entity e2)
predicates on entities
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
set get_referenced_entities(void *elem)
retrieves the set of entities used in elem beware that this entities may be formal parameters,...
#define loop_domain
newgen_language_domain_defined
#define statement_ordering(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define call_domain
newgen_callees_domain_defined
@ is_instruction_whileloop
#define instruction_tag(x)
#define sequence_statements(x)
#define whileloop_body(x)
#define statement_instruction(x)
#define statement_comments(x)
#define instruction_test(x)
#define statement_undefined_p(x)
#define statement_number(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
void set_transformer_map(statement_mapping)
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
void path_initialize(statement, statement, statement, path *, path *)
path_transformer.c
void reset_transformer_map(void)
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.
string text_to_string(text t)
SG: moved here from ricedg.