PIPS
|
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "boolean.h"
#include <stdbool.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "database.h"
#include "misc.h"
#include "text.h"
#include "text-util.h"
#include "ri-util.h"
#include "effects-util.h"
#include "accel-util.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "pipsdbm.h"
#include "resources.h"
#include "control.h"
#include "c_syntax.h"
#include "conversion.h"
#include "properties.h"
#include "transformations.h"
#include "effects-convex.h"
#include "complexity_ri.h"
#include "complexity.h"
#include <time.h>
#include "dg.h"
#include "graph.h"
#include "ricedg.h"
#include "chains.h"
#include "task_parallelization.h"
Go to the source code of this file.
Typedefs | |
typedef dg_arc_label | arc_label |
Instantiation of the dependence graph: More... | |
typedef dg_vertex_label | vertex_label |
Functions | |
bool | costly_task (statement st) |
cost_model.c More... | |
double | polynomial_to_numerical (Ppolynome poly_amount) |
double | size_of_regions (list l_data) |
static list | used_data (statement(st)) |
static double | task_time (statement s) |
double | edge_cost (statement s1, statement s2) |
double | t_level (vertex v, graph dg, gen_array_t annotations) |
First parameter is the top level (earliest start time) for each node. More... | |
void | top_level (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. More... | |
void | priorities (gen_array_t annotations) |
void | initialization (graph dg, gen_array_t annotations) |
void | parse_instrumented_file (char *file_name, graph dg, gen_array_t annotations) |
typedef dg_arc_label arc_label |
Instantiation of the dependence graph:
Definition at line 44 of file cost_model.c.
typedef dg_vertex_label vertex_label |
Definition at line 45 of file cost_model.c.
void bottom_level | ( | graph | dg, |
gen_array_t | annotations | ||
) |
Second parameter is the bottom level (latest start time) for each node.
dg | g |
annotations | nnotations |
Definition at line 223 of file cost_model.c.
References annotations, annotation::blevel, dg, annotation::edge_cost, FOREACH, gen_array_addto(), gen_array_item(), graph_vertices, level, max, statement_equal_p(), statement_ordering, SUCCESSOR, successor_vertex, annotation::task_time, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by BDSC(), and DSC().
st | t |
Definition at line 52 of file cost_model.c.
References CAR, instruction_block, instruction_tag, instruction_test, is_instruction_block, is_instruction_call, is_instruction_forloop, is_instruction_loop, is_instruction_test, is_instruction_whileloop, MAPL, STATEMENT, statement_call(), statement_contains_user_call_p(), statement_instruction, test_false, test_true, and user_call_p().
Referenced by cluster_stage_spire(), cluster_stage_spire_generation(), hierarchical_schedule(), and hierarchical_schedule_step().
s1 | 1 |
s2 | 2 |
Definition at line 147 of file cost_model.c.
References FOREACH, load_statement_local_regions(), polynome_add(), POLYNOME_NUL, polynomial_to_numerical(), REGION, region_enumerate(), regions_dup(), regions_read_regions(), regions_write_regions(), RegionsIntersection(), s1, and w_r_combinable_p().
Referenced by initialization().
void initialization | ( | graph | dg, |
gen_array_t | annotations | ||
) |
dg | g |
annotations | nnotations |
Definition at line 267 of file cost_model.c.
References annotations, annotation::cluster, annotation::data, dg, edge_cost(), annotation::edge_cost, FOREACH, gen_array_addto(), gen_array_make(), gen_length(), get_int_property(), graph_vertices, malloc(), annotation::nbclusters, annotation::order_sched, annotation::scheduled, statement_ordering, SUCCESSOR, successor_vertex, task_time(), annotation::task_time, used_data(), VERTEX, vertex_successors, vertex_to_statement(), and x.
Referenced by dsc_code_parallelization(), hbdsc_parallelization(), and make_unstructured_from_loop().
void parse_instrumented_file | ( | char * | file_name, |
graph | dg, | ||
gen_array_t | annotations | ||
) |
file_name | ile_name |
dg | g |
annotations | nnotations |
Definition at line 296 of file cost_model.c.
References annotations, dg, annotation::edge_cost, file_name, FOREACH, gen_array_addto(), gen_array_item(), gen_array_make(), graph_vertices, malloc(), statement_ordering, statement_to_vertex(), SUCCESSOR, successor_vertex, annotation::task_time, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by dsc_code_parallelization(), and hbdsc_parallelization().
double polynomial_to_numerical | ( | Ppolynome | poly_amount | ) |
if polynomial is not a constant monomial, we use
an heuristic to map it into a numerical constant take the higher degree monomial and decide upon its coefficient
poly_amount | oly_amount |
Definition at line 93 of file cost_model.c.
References int, monome_coeff, monome_term, polynome_max_degree(), polynome_monome, POLYNOME_NUL_P, polynome_succ, POLYNOME_UNDEFINED_P, and vect_sum().
Referenced by edge_cost(), size_of_regions(), and task_time().
void priorities | ( | gen_array_t | annotations | ) |
annotations | nnotations |
Definition at line 253 of file cost_model.c.
References annotations, annotation::blevel, gen_array_addto(), gen_array_item(), gen_array_nitems(), annotation::prio, and annotation::tlevel.
Referenced by BDSC(), and DSC().
double size_of_regions | ( | list | l_data | ) |
l_data | _data |
Definition at line 115 of file cost_model.c.
References entity_type, expression_to_polynome(), FOREACH, int_to_expression(), polynome_add(), polynome_mult(), POLYNOME_NUL, polynomial_to_numerical(), REGION, region_entity, region_enumerate(), SizeOfElements(), type_variable, and variable_basic.
Referenced by MCW(), and transfer_cost().
double t_level | ( | vertex | v, |
graph | dg, | ||
gen_array_t | annotations | ||
) |
First parameter is the top level (earliest start time) for each node.
intptr_t)
dg | g |
annotations | nnotations |
Definition at line 168 of file cost_model.c.
References annotations, dg, annotation::edge_cost, FOREACH, gen_array_addto(), gen_array_item(), gen_array_size(), graph_vertices, level, malloc(), max, statement_equal_p(), statement_ordering, SUCCESSOR, successor_vertex, annotation::task_time, annotation::tlevel, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by top_level(), and update_priority_values().
|
static |
Definition at line 134 of file cost_model.c.
References complexity_polynome(), load_statement_complexity(), and polynomial_to_numerical().
Referenced by hierarchical_schedule_step(), and initialization().
void top_level | ( | graph | dg, |
gen_array_t | annotations | ||
) |
dg | g |
annotations | nnotations |
Definition at line 211 of file cost_model.c.
References annotations, dg, FOREACH, graph_vertices, t_level(), and VERTEX.
Referenced by BDSC(), and DSC().
Definition at line 126 of file cost_model.c.
References load_statement_local_regions(), NIL, r_w_combinable_p(), regions_dup(), regions_read_regions(), regions_write_regions(), and RegionsMustUnion().
Referenced by initialization().