PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/times.h>
#include <sys/time.h>
#include "genC.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "union.h"
#include "matrice.h"
#include "matrix.h"
#include "ri.h"
#include "constants.h"
#include "ri-util.h"
#include "misc.h"
#include "complexity_ri.h"
#include "database.h"
#include "graph.h"
#include "dg.h"
#include "paf_ri.h"
#include "parser_private.h"
#include "property.h"
#include "reduction.h"
#include "text.h"
#include "text-util.h"
#include "tiling.h"
#include "pipsdbm.h"
#include "resources.h"
#include "static_controlize.h"
#include "paf-util.h"
#include "pip.h"
#include "array_dfg.h"
#include "prgm_mapping.h"
Go to the source code of this file.
Macros | |
#define | DOT "." |
Name : prgm_mapping.c Package : prgm_mapping Author : Alexis Platonoff Date : april 1993 Historic : Documents: SOON Comments : This file contains the functions for the computation of the placement function. More... | |
#define | BDT_STRING "bdt" |
#define | STMT_HT_SIZE 100 /**hash table max size */ |
#define | DTF_HT_SIZE 200 /**hash table max size */ |
#define | ENT_HT_SIZE 200 /**hash table max size */ |
#define | PLC_EXT ".plc_file" |
Typedefs | |
typedef dfg_vertex_label | vertex_label |
Local defines. More... | |
typedef dfg_arc_label | arc_label |
Functions | |
bool | print_plc (char *module_name) const |
======================================================================== More... | |
list | plc_make_proto () |
======================================================================== More... | |
void | initialize_mu_list (int stmt, int dim) |
======================================================================== More... | |
int | plc_make_min_dim () |
======================================================================== More... | |
int | plc_make_dim () |
======================================================================== More... | |
void | plc_make_distance () |
======================================================================== More... | |
Psysteme | cutting_conditions (list df_l) |
======================================================================== More... | |
list | sort_dfg_node (list l_nodes) |
======================================================================== More... | |
void | edge_weight () |
======================================================================== More... | |
bool | in_list_p (chunk *c, list l) |
======================================================================== More... | |
void | add_to_list (chunk *c, list *l) |
======================================================================== More... | |
int | prototype_dimension (Ppolynome pp, list ind_l) |
======================================================================== More... | |
bool | is_not_trivial_p (list vvs) |
======================================================================== More... | |
list | valuer (int dim, list xunks, list pcunks) |
======================================================================== More... | |
void | sort_unknowns (list *lambda, int dmax) |
======================================================================== More... | |
list | partition_unknowns (list *unks, int dmax) |
======================================================================== More... | |
Psysteme | system_inversion_restrict (Psysteme sys, list unks_l, list var_l, list par_l, int nb_restrict, bool is_first) |
======================================================================== More... | |
bool | solve_system_by_succ_elim (Psysteme sys, list *sigma) |
======================================================================== More... | |
bool | constant_vecteur_p (Pvecteur pv) |
========================================================================= More... | |
Psysteme | broadcast_dimensions (placement pla, list mu_list) |
========================================================================= More... | |
Psysteme | completer_n_base (Psysteme sys, Psysteme dims_sys, list var_l, list par_l, int dim) |
======================================================================== More... | |
void | pm_matrice_scalar_mult (int scal, matrice mat_M, int m, int n) |
========================================================================= More... | |
list | partial_broadcast_coefficients (list var_l, list *used_mu) |
========================================================================= More... | |
bool | is_mu_coeff_p (entity e) |
======================================================================== More... | |
list | get_mu_coeff (list sigma) |
========================================================================= More... | |
void | vvs_on_prototypes (list sigma) |
========================================================================= More... | |
bool | prgm_mapping (char *module_name) |
========================================================================= More... | |
Variables | |
plc | pfunc |
Internal variables More... | |
graph | the_dfg |
The placement function. More... | |
bdt | the_bdt |
The data flow graph. More... | |
int | nb_nodes |
The timing function. More... | |
int | nb_dfs |
The number of nodes in the DFG. More... | |
hash_table | DtfToSink |
The number of dataflows in the DFG. More... | |
hash_table | DtfToDist |
Mapping from a dataflow to its sink statement. More... | |
hash_table | DtfToWgh |
Mapping from a dataflow to its distance. More... | |
hash_table | StmtToProto |
Mapping from a dataflow to its weight. More... | |
hash_table | StmtToPdim |
Mapping from a statement (int) to its prototype. More... | |
hash_table | StmtToBdim |
Mapping from a statement to the dim of its plc func. More... | |
hash_table | StmtToDim |
Mapping from a statement to the dim of its bdt. More... | |
hash_table | StmtToLamb |
Mapping from a stmt to its iteration space dim. More... | |
hash_table | StmtToMu |
Mapping from a stmt to its lambda coeff. More... | |
hash_table | UnkToFrenq |
Mapping from a stmt to its mu coeff. More... | |
int | count_mu_coeff |
Mapping from an entity to its frenq in the plc proto. More... | |
list | subs_l |
list | prgm_parameter_l |
global variables More... | |
#define BDT_STRING "bdt" |
Definition at line 90 of file prgm_mapping.c.
#define DOT "." |
Name : prgm_mapping.c Package : prgm_mapping Author : Alexis Platonoff Date : april 1993 Historic : Documents: SOON Comments : This file contains the functions for the computation of the placement function.
The main function is prgm_mapping(). Ansi includes
performance purpose performance purpose Newgen includes
C3 includes
Pips includes
Macro functions
Definition at line 89 of file prgm_mapping.c.
Definition at line 92 of file prgm_mapping.c.
Definition at line 93 of file prgm_mapping.c.
#define PLC_EXT ".plc_file" |
Definition at line 121 of file prgm_mapping.c.
Definition at line 91 of file prgm_mapping.c.
typedef dfg_arc_label arc_label |
Definition at line 119 of file prgm_mapping.c.
typedef dfg_vertex_label vertex_label |
Local defines.
Definition at line 118 of file prgm_mapping.c.
void add_to_list | ( | chunk * | c, |
list * | l | ||
) |
========================================================================
Definition at line 939 of file prgm_mapping.c.
References CHUNK, CONS, and in_list_p().
=========================================================================
Psysteme broadcast_dimensions(placement pla, list mu_list)
Definition at line 1799 of file prgm_mapping.c.
References CAR, CHUNK, constant_vecteur_p(), contrainte_make(), ENDP, ENTITY, NIL, placement_dims, POP, prototype_factorize(), sc_add_egalite(), and sc_new().
Referenced by mapping_on_broadcast(), and partial_broadcast_coefficients().
========================================================================
Definition at line 1834 of file prgm_mapping.c.
References append_eg(), Ssysteme::base, contrainte_make(), list_to_base(), pips_internal_error, sc_add_egalite(), sc_creer_base(), sc_dup(), sc_new(), sc_rm(), Scontrainte::vecteur, and vecteurs_libres_p().
Referenced by partial_broadcast_coefficients().
=========================================================================
Definition at line 1785 of file prgm_mapping.c.
References TCST.
Referenced by broadcast_dimensions().
========================================================================
Mapping from a dataflow to its distance
Iteration vector of the sink statement.
Structure parameters.
sink_par_l = gen_append(static_control_params(sink_stct), CONS(ENTITY, (entity) TCST, NIL));
We transforme this polynome ("pp_dist") into two systems of equations, Mi and Mp (cf. above).
Definition at line 682 of file prgm_mapping.c.
References adg_number_to_statement(), append_eg(), CAR, CONS, DATAFLOW, DtfToDist, DtfToSink, ENDP, ENTITY, fprint_psysteme(), fprintf(), gen_append(), get_debug_level(), get_stco_from_current_map(), hash_get(), int, NIL, nullify_factors(), polynome_dup(), polynome_rm(), POP, prgm_parameter_l, sc_new(), sc_normalize(), sink_stmt, static_control_to_indices(), and TCST.
Referenced by prgm_mapping().
void edge_weight | ( | ) |
========================================================================
We initialize the weight and sink statement hash tables
For each dataflow of the data flow graph we compute its weight.
Transformation system of equations
We append the execution domain of the sink.
We append the governing predicate. "sc_trans" is what we called Ee (the emitter set, cf. above).
Gauss-Jordan eliminations (with equalities).
Fourier-Motzkin eliminations (with inequalities).
We compute the number of implicit equations.
We compute the weight of the current dataflow.
We update the hash tables keyed by the dataflow with its weight and its sink statement.
Definition at line 795 of file prgm_mapping.c.
References adg_number_to_statement(), CAR, CDR, communication_dim(), count_implicit_equation(), DATAFLOW, dataflow_governing_pred, dataflow_transformation, debug(), DtfToSink, DtfToWgh, elim_var_with_eg(), ENTITY, entity_local_name(), fprint_dataflow(), fprint_psysteme(), fprintf(), gen_length(), get_debug_level(), get_stco_from_current_map(), gov_pred, graph_vertices, hash_pointer, hash_put(), hash_table_make(), is_broadcast_p(), is_reduction_p(), make_expression_equalities(), nb_dfs, NIL, predicate_system, predicate_undefined, put_source_ind(), sc_append(), sc_dup(), sink_stmt, source_stmt, static_control_to_indices(), SUCC_DATAFLOWS, SUCCESSOR, successor_vertex, the_dfg, trans_l, VERTEX, VERTEX_DOMAIN, vertex_int_stmt(), and vertex_successors.
Referenced by prgm_mapping().
=========================================================================
Definition at line 2155 of file prgm_mapping.c.
References CAR, CONS, ENDP, ENTITY, is_mu_coeff_p(), NIL, POP, VAR_VAL, and var_val_variable.
========================================================================
Definition at line 917 of file prgm_mapping.c.
References CAR, CHUNK, ENDP, and POP.
Referenced by add_to_list(), and partition_unknowns().
========================================================================
Definition at line 284 of file prgm_mapping.c.
References CONS, count_mu_coeff, ENTITY, gen_nconc(), hash_put(), make_coeff(), MU_COEFF, NIL, and StmtToMu.
Referenced by plc_make_dim().
========================================================================
Definition at line 2144 of file prgm_mapping.c.
References entity_local_name(), and MU_COEFF.
Referenced by get_mu_coeff().
========================================================================
Mapping from a statement to its prototype
For each stmt in the dataflow graph we test if its proto is trivial
we carry on if the prototype is not trivial
Definition at line 1096 of file prgm_mapping.c.
References adg_number_to_statement(), CAR, CDR, fprint_vvs(), fprintf(), gen_length(), get_debug_level(), get_stco_from_current_map(), graph_vertices, hash_get(), hash_int, hash_put(), hash_table_free(), hash_table_make(), int, nb_nodes, NIL, plc_fprint_proto(), polynome_dup(), polynome_fprint(), prototype_dimension(), pu_is_inferior_var(), pu_variable_name(), static_control_to_indices(), StmtToBdim, StmtToProto, the_dfg, VERTEX, vertex_int_stmt(), and vvs_on_polynome().
Referenced by solve_system_by_succ_elim().
=========================================================================
Construction of the directions that might be generated by the prototype.
Construction of -P.M
Construction of A.L + D
A.L + D - P.M
Definition at line 1936 of file prgm_mapping.c.
References ACCESS, adg_number_to_statement(), append_eg(), broadcast_dimensions(), CAR, completer_n_base(), compose_vvs(), contrainte_make(), crt_stmt, DENOMINATOR, Ssysteme::egalites, elim_var_with_eg(), ENDP, ENTITY, fprint_entity_list(), fprint_pla_pp_dims(), fprint_psysteme(), fprint_vvs(), fprintf(), gen_append(), gen_length(), get_debug_level(), get_stco_from_current_map(), hash_get(), int, list_to_base(), make_vvs_from_sc(), matrice_fprint(), matrice_free, matrice_new, matrice_nulle(), matrice_transpose(), matrices_to_contraintes_with_sym_cst(), Ssysteme::nb_eq, NIL, pfunc, PLACEMENT, placement_dims, placement_statement, plc_placements, pm_matrice_scalar_mult(), POP, prgm_parameter_l, prototype_factorize(), pu_contraintes_to_matrices(), sc_add_egalite(), sc_creer_base(), sc_make(), sc_new(), static_control_to_indices(), StmtToMu, StmtToPdim, StmtToProto, TCST, vect_coeff(), and VECTEUR_NUL_P.
Referenced by prgm_mapping().
========================================================================
Definition at line 1498 of file prgm_mapping.c.
References CAR, CDR, CONS, CONSP, ENDP, ENTITY, entity_undefined, fprint_entity_list(), fprintf(), gen_append(), gen_nconc(), gen_remove(), get_debug_level(), graph_vertices, hash_get(), in_list_p(), is_index_coeff_p(), NIL, polynome_fprint(), POP, prototype_factorize(), pu_is_inferior_var(), pu_variable_name(), StmtToProto, the_dfg, VECTEUR_NUL_P, VERTEX, and vertex_int_stmt().
Referenced by prgm_mapping().
int plc_make_dim | ( | ) |
========================================================================
For each node of the data flow graph we compute its dimension.
We compute the dimension of the current node
We compute the dimension of the timing function of the current node
Definition at line 365 of file prgm_mapping.c.
References adg_number_to_statement(), bdt_schedules, bdt_undefined, CAR, CDR, ENDP, ENTITY, EXPRESSION, expression_constant_p(), expression_normalized, gen_length(), get_stco_from_current_map(), graph_vertices, hash_pointer, hash_put(), hash_table_make(), initialize_mu_list(), nb_nodes, NIL, NORMALIZE_EXPRESSION, normalized_linear, POP, SCHEDULE, schedule_dims, schedule_statement, static_control_to_indices(), StmtToBdim, StmtToMu, StmtToPdim, the_bdt, the_dfg, vect_coeff(), VERTEX, and vertex_int_stmt().
Referenced by prgm_mapping().
void plc_make_distance | ( | ) |
========================================================================
Mapping from a stmt to its prototype
Mapping from a dataflow to its distance
We create the hash table.
Prototype of the source statement.
Iteration vector of the source statement.
Prototype of the sink statement.
For each dataflow of the data flow graph we compute a distance.
Transformations of the dataflows.
There should be as much transformation expressions as source indices in the source iteration vector.
We now compute PI(source, h(x)). This is done by making the substitution, in the source prototype, of each index of the iteration vector of the source statement to the corresponding transformation expression.
For this, we duplicate our polynome (source prototype) in "aux_pp". Then, for each index, we get its factor in "aux_pp", multiply it with the corresponding transformation, add it to "pp_dist" (initialized to POLYNOME_NUL) and eliminate the index in "aux_pp" (we substitute the index by POLYNOME_NUL). Then, we add "aux_pp" to "pp_dist", it contains the remnants of "pp_source" that are not factor of one of the indices.
We now compute the distance : D = PI(sink, x) - PI(source, h(x)) Still, it is a polynome ("pp_dist").
We now eliminate variables in order to have free variables. This is done using the implicit equations of the execution domain intersection the governing predicate.
We put this polynome in the hash table.
Definition at line 453 of file prgm_mapping.c.
References adg_number_to_statement(), Ssysteme::base, base_to_list(), CAR, CDR, DATAFLOW, dataflow_governing_pred, dataflow_transformation, dfg_arc_label_dataflows, DtfToDist, elim_var_with_eg(), ENTITY, entity_local_name(), EXPRESSION, expression_to_polynome(), expression_to_string(), find_implicit_equation(), fprint_dataflow(), fprint_psysteme(), fprint_vvs(), fprintf(), gen_length(), get_debug_level(), get_stco_from_current_map(), gov_pred, graph_vertices, hash_get(), hash_pointer, hash_put(), hash_table_make(), make_vvs_from_sc(), nb_dfs, NIL, pips_assert, polynome_add(), polynome_dup(), polynome_fprint(), polynome_mult(), polynome_negate(), POLYNOME_NUL, predicate_system, predicate_undefined, prototype_factorize(), prototype_var_subst(), pu_is_inferior_var(), pu_variable_name(), sc_intersection(), sc_new(), sink_stmt, source_stmt, static_control_to_indices(), StmtToProto, SUCCESSOR, successor_arc_label, successor_vertex, the_dfg, trans_l, vecteur_to_polynome(), VERTEX, VERTEX_DOMAIN, vertex_int_stmt(), vertex_successors, and vvs_on_polynome().
Referenced by prgm_mapping().
int plc_make_min_dim | ( | ) |
========================================================================
For each node of the data flow graph we compute its dimension.
We compute the dimension of the current node
We get the dimension of the timing and placement function of the current node
Definition at line 313 of file prgm_mapping.c.
References adg_number_to_statement(), CAR, CDR, gen_length(), get_stco_from_current_map(), graph_vertices, hash_get(), hash_pointer, hash_table_make(), int, nb_nodes, NIL, static_control_to_indices(), StmtToBdim, StmtToMu, StmtToPdim, the_bdt, the_dfg, VERTEX, and vertex_int_stmt().
Referenced by prgm_mapping().
list plc_make_proto | ( | ) |
========================================================================
the DFG
Mapping from a statement to its prototype
Mapping from a statement to its lambda coeff
We create the hash table that will contain the prototype
We initialize the counter of coefficients in order to have all unknowns represented by different entities.
For each node of the data flow graph we compute a prototype.
We get the "static_control" associated to the statement.
We get the list of indices of the englobing loops and structure parameters.
First, we initialize the polynome in building the constant term.
Then, for each index (ind) we build the monome ind*COEFF#, and add it to the polynome.
Then, for each parameter (par) we build the monome par*COEFF#, and add it to the polynome.
We put the new prototype on the hash table.
Definition at line 190 of file prgm_mapping.c.
References adg_number_to_statement(), CAR, CDR, CONS, CONST_COEFF, dfg_vertex_label_statement, ENDP, ENTITY, gen_append(), gen_nconc(), get_stco_from_current_map(), graph_vertices, hash_int, hash_put(), hash_table_make(), INDEX_COEFF, make_coeff(), make_polynome(), nb_nodes, NIL, PARAM_COEFF, polynome_add(), polynome_mult(), POP, prgm_parameter_l, static_control_to_indices(), StmtToLamb, StmtToProto, the_dfg, VERTEX, and vertex_vertex_label.
Referenced by prgm_mapping().
=========================================================================
Definition at line 1878 of file prgm_mapping.c.
References ACCESS.
Referenced by partial_broadcast_coefficients().
bool prgm_mapping | ( | char* | module_name | ) |
=========================================================================
The placement function
The timing function
The number of nodes in the DFG
The number of dataflows in the DFG
Mapping from a dataflow to its distance
Mapping from a statement to its prototype
Perf.mesurement
List of the unknowns coefficients
Initialize debugging functions
We get the required data: module entity, code, static_control, dataflow graph, timing function.
The DFG
the BDT
First we count the number of nodes and dataflows
We look for the broadcasts
We sort the nodes of "the_dfg" in decreasing dimension order. The dimension of a node is the dimension of the iteration space of its instruction.
INITIALIZATION
We create a prototype for each statement. Each prototype is mapped to its statement in the hash table "StmtToProto". An other hash table "StmtToProto" associates the unknown coefficients used in the prototype and the statement. The returned value "lambda" gives all the coefficients that have been created.
plc_make_dim() has to initialize the Mu list
We compute the dimension of the placement function of each instruction, and the greatest one (dmax). This is based on the timing function, if it exists.
The number of mapping dimensions can be computed as a minimum, see plc_make_min_dim()
Mapping dimension can be fixed with the environment variable MAPPING_DIMENSION
We initialize the prgm_mapping function.
Computation of the weight of each dataflow of the DFG.
We get all the dataflows of the graph
We sort the dataflows in decreasing weight order
EDGES TREATMENT
BROADCAST CONDITIONS
We take into account the broadcast conditions
OD : we could give "remnants_df_l" as an arg, in order to only compute the useful distances.
DISTANCE COMPUTATION
Computation of the distance of each dataflow.
CUTTING CONDITIONS
We compute the list of equations that are to be nullified in order to zero out all the distances.
We eliminate all the unknowns that are valuated by the substitution computed above "sigma"; and then we cut it in two parts, one containing the indices coefficients, one containing the parameters coefficients, both sorted by decreasing frenquency in the prototypes. Before cutting the list "lambda" into two parts, we take into account the partial broadcast prototypes (contain in "pfunc") to replace some of the "lambda" coeff by the "mu" coeff. The new sigma is returned by this function.
UNELIMINATED COEFF SORTING
COEFF PARTITION
VALUATION
We valuate all the remaining unknowns by building successively each dimension.
module_name | odule |
Definition at line 2213 of file prgm_mapping.c.
References adg_pure_dfg(), bdt_undefined, broadcast(), broadcast_conditions(), CAR, CDR, compare_dfs_weight(), CONS, CONSP, count_mu_coeff, cutting_conditions(), DATAFLOW, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug(), debug_off, debug_on, DtfToDist, DtfToSink, DtfToWgh, edge_weight(), ENDP, exp, EXPRESSION, expression_undefined, fprint_bdt(), fprint_dataflow(), fprint_dfg(), fprint_entity_list(), fprint_plc(), fprint_plc_pp_dims(), fprint_psysteme(), fprint_vvs(), fprintf(), gen_nconc(), gen_remove(), general_merge_sort(), get_debug_level(), get_graph_dataflows(), GET_STATEMENT_MAPPING, graph_vertices, hash_get(), int, int_to_expression(), local_name_to_top_level_entity(), make_placement(), make_plc(), malloc(), mod_stat, module_name(), nb_dfs, nb_nodes, NIL, partial_broadcast_coefficients(), partition_unknowns(), pfunc, pips_internal_error, PLACEMENT, placement_dims, plc_fprint_dfs(), plc_fprint_distance(), plc_fprint_proto(), plc_make_dim(), plc_make_distance(), plc_make_min_dim(), plc_make_proto(), plc_placements, polynome_dup(), polynome_fprint(), polynome_to_vecteur(), POP, prgm_parameter_l, pu_is_inferior_var(), pu_variable_name(), Pvecteur_to_expression(), reset_current_module_entity(), reset_current_stco_map(), set_current_module_entity(), set_current_stco_map(), solve_system_by_succ_elim(), sort_dfg_node(), sort_unknowns(), static_control_params, static_control_undefined, static_control_yes, StmtToProto, strdup(), STS, SUCC_DATAFLOWS, SUCCESSOR, the_bdt, the_dfg, user_warning, valuer(), VAR_VAL, var_val_variable, VERTEX, vertex_int_stmt(), vertex_successors, vvs_on_polynome(), and vvs_on_prototypes().
bool print_plc | ( | char* | module_name | ) | const |
========================================================================
Definition at line 124 of file prgm_mapping.c.
References concatenate(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, fprint_plc(), fprintf(), free(), get_debug_level(), module_name(), PLC_EXT, safe_fclose(), safe_fopen(), strdup(), and user_log().
========================================================================
We construct A.L, in which each line correspond to the factor of one index in "pp".
L is the list of variables contained in AL.
OLD VERSION
Definition at line 985 of file prgm_mapping.c.
References Ssysteme::base, base_dimension, CAR, contrainte_make(), dim_H(), Ssysteme::egalites, ENDP, ENTITY, fprint_entity_list(), fprint_psysteme(), fprintf(), get_debug_level(), matrice_fprint(), matrice_free, matrice_hermite(), matrice_new, Ssysteme::nb_eq, polynome_fprint(), POP, prototype_factorize(), pu_contraintes_to_matrices(), pu_is_inferior_var(), pu_variable_name(), pu_vect_fprint(), sc_add_egalite(), sc_creer_base(), and sc_new().
Referenced by is_not_trivial_p().
========================================================================
We walk through all the equations of M_ps.
We apply on this expression the substitution "sigma"
We create the elementary substitution with a variable not yet eliminated.
esult = true;
We apply it on all prototypes, if none becomes trivial ...
esult = true;
Definition at line 1722 of file prgm_mapping.c.
References compose_vvs(), fprint_vvs(), fprintf(), get_debug_level(), is_not_trivial_p(), NIL, plc_make_vvs_with_vector(), pu_egalite_fprint(), pu_variable_name(), pu_vect_fprint(), Scontrainte::succ, Scontrainte::vecteur, and vvs_on_vecteur().
Referenced by broadcast_conditions(), and prgm_mapping().
========================================================================
For each node of the data flow graph we compute its dimension.
Definition at line 748 of file prgm_mapping.c.
References adg_number_to_statement(), CAR, CDR, compare_nodes_dim(), gen_length(), general_merge_sort(), get_stco_from_current_map(), hash_int, hash_put(), hash_table_free(), hash_table_make(), nb_nodes, NIL, static_control_to_indices(), StmtToDim, VERTEX, and vertex_int_stmt().
Referenced by prgm_mapping().
========================================================================
void sort_unknowns(list *lambda, int dmax) :
Definition at line 1441 of file prgm_mapping.c.
References CAR, CDR, compare_unks_frenq(), CONS, debug(), ENDP, ENT_HT_SIZE, ENTITY, entity_local_name(), free(), gen_nconc(), general_merge_sort(), graph_vertices, hash_get(), hash_pointer, hash_put(), hash_table_free(), hash_table_make(), is_index_coeff_p(), malloc(), NIL, pl, POP, prototype_factorize(), StmtToProto, the_dfg, UnkToFrenq, vect_size(), VERTEX, and vertex_int_stmt().
Referenced by prgm_mapping().
Psysteme system_inversion_restrict | ( | Psysteme | sys, |
list | unks_l, | ||
list | var_l, | ||
list | par_l, | ||
int | nb_restrict, | ||
bool | is_first | ||
) |
========================================================================
Definition at line 1663 of file prgm_mapping.c.
References A, ACCESS, B, completer_base(), contraintes_with_sym_cst_to_matrices(), Ssysteme::egalites, gen_length(), list_to_base(), matrice_free, matrice_general_inversion(), matrice_new, matrice_nulle(), matrice_transpose(), Ssysteme::nb_eq, pu_matrices_to_contraintes(), and sc_make().
========================================================================
(void) polynome_free(sub_pp);
We sort the unknowns in order to have the auxiliary variables first
Definition at line 1189 of file prgm_mapping.c.
References adg_number_to_statement(), apply_farkas(), AUXIL_COEFF, Ssysteme::base, base_to_list(), CAR, CDR, compare_coeff(), compose_vvs(), CONS, CONSP, contrainte_dup(), contrainte_make(), Ssysteme::egalites, elim_var_with_eg(), ENDP, ENTITY, exp, EXPRESSION, expression_constant_p(), expression_normalized, expression_to_int(), find_or_create_coeff(), fprint_entity_list(), fprint_psysteme(), fprint_vvs(), fprintf(), gen_concatenate(), gen_nconc(), general_merge_sort(), get_debug_level(), get_stco_from_current_map(), graph_vertices, hash_get(), imprime_quast(), is_quast_value_conditional, is_quast_value_quast_leaf, list_to_base(), make_vvs(), make_vvs_from_sc(), Ssysteme::nb_eq, NIL, NO_OFL_CTRL, NORMALIZE_EXPRESSION, normalized_linear, nullify_factors(), offset, pip_integer_min(), polynome_dup(), polynome_fprint(), polynome_free(), POP, predicate_system, prgm_parameter_l, pu_is_inferior_var(), pu_variable_name(), quast_leaf_solution, quast_quast_value, quast_undefined, quast_value_quast_leaf, quast_value_tag, quast_value_undefined, sc_add_egalite(), sc_add_inegalite(), sc_creer_base(), sc_new(), sc_normalize(), static_control_to_indices(), StmtToProto, Scontrainte::succ, TCST, the_dfg, user_error, VAR_VAL, var_val_value, vect_cl2_ofl_ctrl(), vect_multiply(), vect_new(), vect_rm(), VERTEX, VERTEX_DOMAIN, vertex_int_stmt(), vvs_on_polynome(), vvs_on_systeme(), and vvs_on_vvs().
Referenced by prgm_mapping().
void vvs_on_prototypes | ( | list | sigma | ) |
=========================================================================
Definition at line 2175 of file prgm_mapping.c.
References CAR, CDR, graph_vertices, hash_del(), hash_get(), hash_put(), NIL, StmtToProto, the_dfg, VERTEX, vertex_int_stmt(), and vvs_on_polynome().
Referenced by prgm_mapping().
int count_mu_coeff |
Mapping from an entity to its frenq in the plc proto.
Definition at line 113 of file prgm_mapping.c.
Referenced by initialize_mu_list(), and prgm_mapping().
hash_table DtfToDist |
Mapping from a dataflow to its sink statement.
Definition at line 104 of file prgm_mapping.c.
Referenced by cutting_conditions(), plc_fprint_distance(), plc_make_distance(), and prgm_mapping().
hash_table DtfToSink |
The number of dataflows in the DFG.
Definition at line 103 of file prgm_mapping.c.
Referenced by broadcast_conditions(), cutting_conditions(), edge_weight(), and prgm_mapping().
hash_table DtfToWgh |
Mapping from a dataflow to its distance.
Definition at line 105 of file prgm_mapping.c.
Referenced by compare_dfs_weight(), edge_weight(), plc_fprint_dfs(), and prgm_mapping().
int nb_dfs |
The number of nodes in the DFG.
Definition at line 102 of file prgm_mapping.c.
Referenced by edge_weight(), plc_make_distance(), and prgm_mapping().
int nb_nodes |
The timing function.
Definition at line 101 of file prgm_mapping.c.
Referenced by do_kernelize(), is_not_trivial_p(), plc_make_dim(), plc_make_min_dim(), plc_make_proto(), prgm_mapping(), reindexing(), and sort_dfg_node().
plc pfunc |
Internal variables
Global variables
Definition at line 98 of file prgm_mapping.c.
Referenced by mapping_on_broadcast(), partial_broadcast_coefficients(), and prgm_mapping().
list prgm_parameter_l |
global variables
lint
Definition at line 115 of file prgm_mapping.c.
Referenced by apply_farkas(), broadcast_conditions(), broadcast_of_dataflow(), cutting_conditions(), mapping_on_broadcast(), partial_broadcast_coefficients(), plc_make_proto(), prgm_mapping(), and valuer().
hash_table StmtToBdim |
Mapping from a statement to the dim of its plc func.
Definition at line 108 of file prgm_mapping.c.
Referenced by is_not_trivial_p(), plc_make_dim(), and plc_make_min_dim().
hash_table StmtToDim |
Mapping from a statement to the dim of its bdt.
Definition at line 109 of file prgm_mapping.c.
Referenced by compare_nodes_dim(), and sort_dfg_node().
hash_table StmtToLamb |
Mapping from a stmt to its iteration space dim.
Definition at line 110 of file prgm_mapping.c.
Referenced by broadcast_conditions(), mapping_on_broadcast(), and plc_make_proto().
hash_table StmtToMu |
Mapping from a stmt to its lambda coeff.
Definition at line 111 of file prgm_mapping.c.
Referenced by initialize_mu_list(), mapping_on_broadcast(), partial_broadcast_coefficients(), plc_make_dim(), and plc_make_min_dim().
hash_table StmtToPdim |
Mapping from a statement (int) to its prototype.
Definition at line 107 of file prgm_mapping.c.
Referenced by broadcast_conditions(), mapping_on_broadcast(), partial_broadcast_coefficients(), plc_make_dim(), and plc_make_min_dim().
hash_table StmtToProto |
Mapping from a dataflow to its weight.
Definition at line 106 of file prgm_mapping.c.
Referenced by is_not_trivial_p(), partial_broadcast_coefficients(), partition_unknowns(), plc_fprint_proto(), plc_make_distance(), plc_make_proto(), prgm_mapping(), sort_unknowns(), valuer(), and vvs_on_prototypes().
list subs_l |
Definition at line 114 of file prgm_mapping.c.
bdt the_bdt |
The data flow graph.
Definition at line 100 of file prgm_mapping.c.
Referenced by plc_make_dim(), plc_make_min_dim(), prgm_mapping(), print_bdt(), re_do_it(), reindexing(), and stmt_bdt_directions().
graph the_dfg |
The placement function.
Definition at line 99 of file prgm_mapping.c.
Referenced by edge_weight(), is_not_trivial_p(), partition_unknowns(), plc_make_dim(), plc_make_distance(), plc_make_min_dim(), plc_make_proto(), prgm_mapping(), print_array_dfg(), re_do_it(), reindexing(), sa_do_it(), single_assign(), sort_unknowns(), valuer(), and vvs_on_prototypes().
hash_table UnkToFrenq |
Mapping from a stmt to its mu coeff.
Definition at line 112 of file prgm_mapping.c.
Referenced by compare_unks_frenq(), and sort_unknowns().