2 #include "pips_config.h"
29 #include "resources.h"
111 for(cl = 0; cl < nbclusters; cl++)
114 double time = cl_s->
time;
165 if(list_stmts !=
NIL)
182 if(list_stmts !=
NIL){
189 return cluster_stages;
218 cluster_stages =
CONS(
LIST,
L, cluster_stages);
219 bool insert_p =
false;
239 bool ins_p =
true,found_p=
false;
254 cluster_stages =
CONS(
LIST, M, cluster_stages);
277 int nbclustersL, nbclusters, nbclusters_s;
281 int Ps = P - stage_mod;
301 nbclustersL = nbclustersL > nbclusters? nbclustersL : nbclusters;
306 Ps = Ps - nbclustersL;
313 int nbclusters = 0, nbcl;
double cpl;
347 fprintf (stderr,
"Unable to schedule with NBCLUSTERS equal to %d\n",P);
351 fprintf (stderr,
"Unable to schedule with MEMORY SIZE equal to %d\n",M);
355 }
while(cpl1 < cpl && nbcl <= nbclusters && iter <=
MAX_ITER);
368 nbclusters = nbt > nbf? nbt: nbf;
399 string tg_name = NULL;
441 fprintf( ftg,
"digraph {\n compound=true;ratio=fill; node[fontsize=24,fontname=\"Courier\",labelloc=\"t\"];nodesep=.05;\n" );
int DSC(sequence seq, int ordering)
int BDSC(sequence seq, int P, int M, int ordering)
void allocate_task_to_cluster(statement ready_st, int cl_p, int order)
BDSC.c.
bool dsc_code_parallelization(char *module_name)
he main function for performing the hierarchical scheduling (scheduled SDG) using DSC and generating ...
int hierarchical_schedule(statement stmt, int k, int P, int M, bool dsc_p)
static gen_array_t schedule_failsafe()
static double critical_path_length(int nbclusters)
static void cancel_schedule_stmt(gen_array_t annotations_s, statement st)
static list rebuild_topological_sort(list stages)
static void initialization_clusters(bool first_p)
eset to zero for each new sequence to handle
dg_vertex_label vertex_label
list topological_sort(statement stmt)
persistant_statement_to_cluster stmt_to_cluster
graph kdg
Global variables.
dg_arc_label arc_label
Instantiation of the dependence graph:
static void cancel_schedule(gen_array_t annotations_s, list stmts)
static double transfer_cost(statement s, int nbclusters)
static void hierarchical_schedule_step(statement stmt, int P, int M, bool dsc_p)
bool hbdsc_parallelization(char *module_name)
he main function for performing the hierarchical scheduling (scheduled SDG) using BDSC and generating...
int get_int_property(const string)
void update_persistant_statement_to_cluster(persistant_statement_to_cluster f, intptr_t k, intptr_t v)
bool bound_persistant_statement_to_cluster_p(persistant_statement_to_cluster f, intptr_t k)
intptr_t apply_persistant_statement_to_cluster(persistant_statement_to_cluster f, intptr_t k)
persistant_statement_to_cluster make_persistant_statement_to_cluster(void)
void print_SDGs(statement stmt, graph tg, FILE *ftg, gen_array_t annotations)
int NBCLUSTERS
parameters of BDSC, to be recovered using pips properties
gen_array_t annotations
Global variables.
void gen_array_full_free(gen_array_t a)
gen_array_t gen_array_make(size_t size)
declarations...
void gen_array_addto(gen_array_t a, size_t i, void *what)
void * gen_array_item(const gen_array_t a, size_t i)
void gen_array_free(gen_array_t a)
struct _newgen_struct_statement_ * statement
void reset_complexity_map(void)
void set_complexity_map(statement_mapping)
void parse_instrumented_file(char *file_name, graph dg, gen_array_t annotations)
void initialization(graph dg, gen_array_t annotations)
static double task_time(statement s)
double size_of_regions(list l_data)
bool costly_task(statement st)
cost_model.c
void set_methods_for_convex_effects(void)
methods.c
void init_convex_rw_prettyprint(const char *)
void set_rw_effects(statement_effects)
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)
list load_statement_out_regions(statement)
void generic_effects_reset_all_methods(void)
list load_statement_in_regions(statement)
void reset_cumulated_rw_effects(void)
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)
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....
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
#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.
list gen_nreverse(list cp)
reverse a list in place
void gen_remove_once(list *pl, const void *o)
Remove the first occurence of o in list pl:
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
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)
#define CAR(pcons)
Get the value of the first element of a list.
list gen_last(list l)
Return the last element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
int gen_occurences(const void *vo, const list l)
count occurences of vo in l
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.
forloop statement_forloop(statement)
Get the forloop of a statement.
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
#define EXIT_FAILURE
Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xarg...
#define pips_user_warning
string concatenate(const char *,...)
Return the concatenation of the given strings.
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 bool statement_equal_p(statement s1, statement s2)
void set_bool_property(const char *, bool)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define is_instruction_block
soft block->sequence transition
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
#define statement_ordering(x)
#define instruction_tag(x)
#define sequence_statements(x)
#define statement_instruction(x)
#define instruction_test(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 reset_transformer_map(void)
The structure used to build lists in NewGen.
A gen_chunk is used to store every object.