25 #include "pips_config.h"
149 for(;number>0;number--)
150 result =
CONS(
ENTITY, creation(number), result);
163 result = SC_UNDEFINED,
183 sc_base(result) = NULL;
230 sc_base(result) = NULL;
267 sc_projection_along_variables_with_test_ofl_ctrl
499 for(dim=processor_dim; dim>=1; dim--)
521 *plrebuild = lrebuild;
533 fprintf(stderr,
"deducables:\n ");
586 syst = sc_variable_substitution_with_eq_ofl_ctrl(syst,
eq,
704 pcondition, pproc_echelon, ptile_echelon);
733 *psc = (
sc_rm(*psc), cleared);
791 Psysteme proc_echelon, tile_echelon, condition;
799 (&syst,
array, ¶meters, &processors, &scanners, &rebuild);
802 &condition, &proc_echelon, &tile_echelon);
817 condition, proc_echelon, tile_echelon,
818 parameters, processors, scanners, rebuild,
830 Psysteme row_echelon = SC_UNDEFINED, condition = SC_UNDEFINED;
836 (&syst,
array, ¶meters, &tmp, &scanners, &rebuild);
854 condition, row_echelon,
855 parameters, scanners, rebuild,
879 entity primary, host_array;
918 lh_collect =
NIL, lh_io =
NIL, lh_update =
NIL,
919 ln_collect =
NIL, ln_io =
NIL, ln_update =
NIL;
954 pips_debug(7,
"skipping array %s movements - none needed\n",
normalized make_normalized(enum normalized_utype tag, void *val)
expression make_expression(syntax a1, normalized a2)
statement copy_statement(statement p)
STATEMENT.
reference make_reference(entity a1, list a2)
syntax make_syntax(enum syntax_utype tag, void *val)
static entity current_entity
bdt base
Current expression.
bool entity_hpfc_dummy_p(entity e)
Variables.
Psysteme entity_to_declaration_constraints(entity e, tag what)
gives back the constraints due to the declarations.
Psysteme hpfc_compute_unicity_constraints(entity e)
Psysteme hpfc_compute_unicity_constraints(e) entity e should be an array;.
Psysteme generate_system_for_distributed_variable(entity v)
Psysteme generate_system_for_variable(v) entity v;.
effect entity_to_region(statement stat, entity ent, tag act)
effect entity_to_region(stat, ent, act) statement stat; entity ent; tag act;
Psysteme hpfc_unstutter_dummies(entity array)
entity host_module
HPFC - Fabien Coelho, May 1993 and later...
int compare_Pvecteur(Pvecteur *pv1, Pvecteur *pv2)
comparison function for Pvecteur in pips, to be used by qsort.
#define CONTRAINTE_UNDEFINED
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
Pcontrainte contrainte_var_min_coeff(Pcontrainte, Variable, Value *, bool)
Pcontrainte contrainte_var_min_coeff(Pcontrainte contraintes, Variable v, int *coeff) input : a list ...
void egalite_fprint(FILE *, Pcontrainte, char *(*)(Variable))
void reset_information_for_code_optimizations(void)
void set_information_for_code_optimizations(Psysteme)
I could keep the system for further optimizations...
int dummy
A dummy file, to prevent empty libraries from breaking builds.
bool(* dynamic_entity_p)(entity)
as expected, true if entity e is dynamic.
#define region
simulation of the type region
list load_out_effects_list(statement)
list load_in_effects_list(statement)
list load_rw_effects_list(statement)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_variable(e)
For COMPATIBILITY purpose only - DO NOT USE anymore.
bool io_effect_entity_p(entity)
#define approximation_may_p(x)
#define action_write_p(x)
#define effect_approximation(x)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
statement make_block_statement(list)
Make a block statement from a list of statement.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
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
void gen_free_list(list l)
free the spine of the list
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
bool empty_code_p(statement)
statement.c
statement make_continue_statement(entity)
void store_new_host_variable(entity new, entity old)
#define HPFC_PACKAGE
local definitions
bool replicated_p(entity e)
replicated_p
#define array_to_template(array)
#define DEBUG_SYST(D, W, S)
#define array_to_processors(array)
#define DEBUG_BASE(D, W, B)
#define DEBUG_ELST(D, W, L)
#define template_to_processors(template)
#define is_movement_update
#define hpfc_warning
WARNING.
#define DEBUG_STAT(D, W, S)
#define movement_update_p(t)
#define is_movement_collect
Efficient I/O tags.
#define add_to_list_of_vars(l, fun, n)
list of variables...
list base_to_list(Pbase base)
Most includes are centralized here.
#define movement_collect_p(t)
void generate_io_statements_for_distributed_arrays(entity, tag, Psysteme, Psysteme, Psysteme, list, list, list, list, statement *, statement *)
bool bound_new_host_p(entity)
entity hpfc_name_to_entity(const char *)
entity get_ith_template_dummy(int)
entity get_ith_cycle_dummy(int)
void generate_io_statements_for_shared_arrays(entity, tag, Psysteme, Psysteme, list, list, list, statement *, statement *)
entity get_ith_region_dummy(int)
entity get_ith_array_dummy(int)
entity get_ith_shift_dummy(int)
entity load_primary_entity(entity)
entity get_ith_block_dummy(int)
statement hpfc_make_call_statement(entity, list)
statement hpfc_make_call_statement(e, l) generate a call statement to function e, with expression lis...
entity get_ith_processor_dummy(int)
entity get_ith_local_dummy(int)
entity load_new_host(entity)
bool array_distributed_p(entity)
static void put_variables_in_ordered_lists(Psysteme *psyst, entity array, list *plparam, list *plproc, list *plscan, list *plrebuild)
Variables of Psysteme syst are ordered and put in different lists.
void hpfc_simplify_condition(Psysteme *psc, statement stat, tag move)
void hpfc_simplify_condition(psc, stat, move)
void clean_the_system(Psysteme *ps, list *plrm, list *pltry)
list make_list_of_dummy_variables(entity(*creation)(), int number)
of entity
static Psysteme generate_distributed_io_system(entity array, statement stat, tag move, tag act)
static Psysteme clean_shared_io_system(Psysteme syst, entity array, tag move)
static bool current_entity_is_updated_before_p(statement stat, entity current_entity)
IN Regions(effects) are used to verify if the entity current_entity is initialized before it's used i...
void io_efficient_compile(statement stat, statement *hp, statement *np)
compile an io statement
static Psysteme statement_context(statement stat, tag move)
static void add_declaration_to_host_and_link(entity array)
add a local declaration for entity array on the host.
list hpfc_order_variables(list le, bool number_first)
list hpfc_order_variables(list)
void hpfc_algorithm_row_echelon(Psysteme syst, list scanners, Psysteme *pcond, Psysteme *penum)
io-compile.c
static list hpfc_order_specific_variables(list le, entity(*creation)())
output 7 entities created by creation if in list le
static Psysteme generate_shared_io_system(entity array, statement stat, tag move, tag act)
void hpfc_algorithm_tiling(Psysteme syst, list processors, list scanners, Psysteme *pcondition, Psysteme *pproc_echelon, Psysteme *ptile_echelon)
void remove_variables_from_system(Psysteme *ps, list *plv)
static bool current_entity_is_used_later_p(statement stat, entity current_entity)
HPFC module by Fabien COELHO.
static Psysteme clean_distributed_io_system(Psysteme syst, entity array, tag move)
collect or update
static Psysteme generate_io_system(entity array, statement stat, tag move, tag act)
generates the Psystem for IOs inside the statement stat, that use entity ent which should be a variab...
static void generate_io_collect_or_update(entity array, statement stat, tag move, tag act, statement *psh, statement *psn)
list simplify_deducable_variables(Psysteme syst, list vars, list *pleftvars)
list simplify_deducable_variables(syst, vars, pleftvars) Psysteme syst; list vars,...
void remove_variables_if_possible(Psysteme *psyst, list *plvars)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define REGIONS_MODULE_NAME
Already defined.
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity AddEntityToModule(entity e, entity module)
!!! caution, it may not be a module, but a common...
const char * entity_module_name(entity e)
See comments about module_name().
Pbase entity_list_to_base(list l)
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
int NumberOfDimension(entity)
#define storage_formal_p(x)
#define reference_variable(x)
#define entity_storage(x)
#define storage_formal(x)
#define EXPRESSION(x)
EXPRESSION.
#define transformer_relation(x)
#define expression_normalized(x)
#define statement_number(x)
#define normalized_linear(x)
#define predicate_system(x)
#define STATEMENT(x)
STATEMENT.
Psysteme sc_rn(Pbase b)
Psysteme sc_rn(Pbase b): build a Psysteme without constraints to define R^n, where n is b's dimension...
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
bool sc_empty_p(Psysteme sc)
bool sc_empty_p(Psysteme sc): check if the set associated to sc is the constant sc_empty or not.
void build_sc_nredund_2pass(Psysteme volatile *psc)
void build_sc_nredund_2pass Psysteme *psc;
Psysteme extract_nredund_subsystem(Psysteme s1, Psysteme s2)
Psysteme extract_nredund_subsystem(s1, s2) Psysteme s1, s2;.
Pcontrainte eq
element du vecteur colonne du systeme donne par l'analyse
Psysteme sc_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void algorithm_tiling(Psysteme syst, Pbase outer, Pbase inner, Psysteme *pcondition, Psysteme *ptile_enum, Psysteme *piter_enum)
void algorithm_row_echelon_generic(Psysteme scn, Pbase base_index, Psysteme *pcondition, Psysteme *penumeration, bool redundancy)
each variable should be at least within one <= and one >=; scn IS NOT modified.
void sc_vect_sort(Psysteme s, int(*compare)(Pvecteur *, Pvecteur *))
the name is self explanatory, I guess.
void sc_sort(Psysteme sc, Pbase sort_base, int(*compare)(Pvecteur *, Pvecteur *))
SORT a Psysteme according to sort_base and compare (given to qsort).
transformer load_statement_precondition(statement)
transformer load_statement_postcondition(statement)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
@ keep
bj > b1 -> h1/hj = h1
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define BASE_NULLE
MACROS SUR LES BASES.
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;