2 #include "pips_config.h"
28 #include "resources.h"
53 bool costly_p =
false;
106 if(curr_degree == max_degree) {
271 float clock = 1, overhead = 0;
276 float x = (float)((
float)rand()/((float)RAND_MAX) * (float)sigma/100);
282 double *ec = (
double *)
malloc(
sizeof(
double));
283 *ec = clock *
edge_cost(
stmt, child) * (1+((float)rand()/(float)RAND_MAX * sigma/100)) + overhead;
300 int ordering, ordering2;
311 double *ec = (
double *)
malloc(
sizeof(
double));
317 while (!feof(finstrumented) && (fscanf(finstrumented,
"%d->%d = %lf \n", &ordering,&ordering2, &cost)))
330 double *ec = (
double *)
malloc(
sizeof(
double));
337 fclose(finstrumented);
int get_int_property(const string)
gen_array_t annotations
Global variables.
void const char const char const int
size_t gen_array_nitems(const gen_array_t a)
size_t gen_array_size(const 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)
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
struct _newgen_struct_statement_ * statement
Ppolynome complexity_polynome(complexity comp)
Because complexity is composed of two elements, we use this function to get the first element : polyn...
complexity load_statement_complexity(statement)
void parse_instrumented_file(char *file_name, graph dg, gen_array_t annotations)
void bottom_level(graph dg, gen_array_t annotations)
Second parameter is the bottom level (latest start time) for each node.
void top_level(graph dg, gen_array_t annotations)
void initialization(graph dg, gen_array_t annotations)
static list used_data(statement(st))
double polynomial_to_numerical(Ppolynome poly_amount)
static double task_time(statement s)
double t_level(vertex v, graph dg, gen_array_t annotations)
First parameter is the top level (earliest start time) for each node.
dg_vertex_label vertex_label
double size_of_regions(list l_data)
double edge_cost(statement s1, statement s2)
dg_arc_label arc_label
Instantiation of the dependence graph:
bool costly_task(statement st)
cost_model.c
void priorities(gen_array_t annotations)
#define region_entity(reg)
list RegionsMustUnion(list l1, list l2, bool(*union_combinable_p)(effect, effect))
list RegionsMustUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a l...
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)
Ppolynome region_enumerate(effect)
bool w_r_combinable_p(effect, effect)
bool r_w_combinable_p(effect, effect)
list load_statement_local_regions(statement)
#define successor_vertex(x)
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
#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.
#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.
call statement_call(statement)
Get the call of a statement.
bool statement_contains_user_call_p(statement)
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
static vertex statement_to_vertex(statement s, graph g)
Value vect_sum(Pvecteur v)
Value vect_sum(Pvecteur v): somme des coefficients d'un vecteur (i.e.
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2) returns pp1 * pp2.
void polynome_add(Ppolynome *ppp, Ppolynome pp2)
void polynome_add(Ppolynome* ppp, Ppolynome pp2) (*ppp) = (*ppp) + pp2.
int polynome_max_degree(Ppolynome pp)
int polynome_max_degree(Ppolynome pp) returns the degree of polynomial pp Let's hope there aren't too...
static bool statement_equal_p(statement s1, statement s2)
#define POLYNOME_UNDEFINED_P(pp)
#define polynome_monome(pp)
#define monome_coeff(pm)
Macros definitions.
#define POLYNOME_NUL_P(pp)
#define polynome_succ(pp)
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool user_call_p(call c)
Test if a call is a user call.
Ppolynome expression_to_polynome(expression exp)
===========================================================================
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
#define statement_ordering(x)
@ is_instruction_whileloop
#define instruction_tag(x)
#define statement_instruction(x)
#define instruction_test(x)
#define variable_basic(x)
#define STATEMENT(x)
STATEMENT.
The structure used to build lists in NewGen.