25 #include "pips_config.h"
42 #define ALPHA_PREFIX "ALPHA"
43 #define LALPHA_PREFIX "LALPHA"
44 #define THETA_PREFIX "THETA"
45 #define PSI_PREFIX "PSI"
46 #define GAMMA_PREFIX "GAMMA"
47 #define DELTA_PREFIX "DELTA"
48 #define IOTA_PREFIX "IOTA"
49 #define SIGMA_PREFIX "SIGMA"
50 #define TMP_PREFIX "TMP"
53 #define is_entity_array 0
54 #define is_entity_template 1
55 #define is_entity_processors 2
114 #define PRIME_LETTER_FOR_VARIABLES "p"
118 #define GET_DUMMY_VARIABLE_ENTITY(MODULE, NAME, lname) \
119 entity get_ith_##lname##_dummy(int i) \
121 return get_ith_dummy(MODULE, NAME, i); \
123 entity get_ith_##lname##_prime(int i) \
125 return get_ith_dummy(MODULE, NAME PRIME_LETTER_FOR_VARIABLES, i); \
145 entity (*gen1)(), (*gen2)();
149 store_dummy_to_prime(gen1(i), gen2(i));
152 #define STORE(name) \
153 put_dummy_and_prime(get_ith_##name##_dummy, get_ith_##name##_prime)
157 init_dummy_to_prime();
170 close_dummy_to_prime();
177 (
Variable(*)()) load_dummy_to_prime);
182 #ifndef Psysteme_undefined
183 #define Psysteme_undefined SC_UNDEFINED
184 #define Psysteme_undefined_p(sc) SC_UNDEFINED_P(sc)
194 make_declaration_constraints_map();
195 make_hpf_align_constraints_map();
196 make_hpf_distribute_constraints_map();
197 make_new_declaration_constraints_map();
202 free_declaration_constraints_map();
203 free_hpf_align_constraints_map();
204 free_hpf_distribute_constraints_map();
205 free_new_declaration_constraints_map();
289 Psysteme p = load_entity_declaration_constraints(e+what);
295 store_entity_declaration_constraints(e+what, p);
482 Psysteme p = load_entity_hpf_align_constraints(e);
489 store_entity_hpf_align_constraints(e, p);
497 Psysteme p = load_entity_hpf_distribute_constraints(e);
504 store_entity_hpf_distribute_constraints(e, p);
584 int tdim, pdim, a, b, n;
633 int gamma_0 = 0, tdim = -1, pdim = -1, a = 0, b = 0,
634 n, plow, pup, tlow, tup, alow, aup;
640 pips_assert(
"distributed dimension", pdim>0 && n>0);
649 gamma_0 = (a*alow + b - tlow) % (n * (pup - plow + 1));
673 int gamma_0 = 0, tdim = -1, pdim = -1, a = 0, b = 0,
674 n, icn, plow, pup, tlow, tup, alow, aup;
680 pips_assert(
"distributed dimension", pdim>0 && n>0);
691 gamma_0 = (a*alow + b - tlow) % (n * (pup - plow + 1));
742 store_entity_new_declaration_constraints(
array, p);
bool hpfc_integer_constant_expression_p(expression e, int *pi)
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
void hpfc_close_dummy_to_prime()
bool entity_hpfc_dummy_p(entity e)
Variables.
static Psysteme hpfc_compute_distribute_constraints(entity e)
Psysteme hpfc_compute_distribute_constraints(e) entity e should be a template;.
static Psysteme hpfc_compute_entity_to_declaration_constraints(entity e, tag what)
#define Psysteme_undefined_p(sc)
Psysteme entity_to_hpf_align_constraints(entity e)
#define is_entity_processors
Psysteme entity_to_declaration_constraints(entity e, tag what)
gives back the constraints due to the declarations.
void free_hpfc_current_mappings()
Psysteme generate_system_for_equal_variables(int n, entity(*gen1)(int), entity(*gen2)(int))
Psysteme hpfc_compute_entity_to_new_declaration(entity array)
Psysteme compute_entity_to_declaration_constraints(entity ent, string suffix, string prefix)
Psysteme compute_entity_to_constraints(ent, suffix, prefix) entity ent: variable the constraints of w...
#define GET_DUMMY_VARIABLE_ENTITY(MODULE, NAME, lname)
define to build the _dummy and _prime of a variable.
static Psysteme hpfc_compute_align_constraints(entity e)
Psysteme hpfc_compute_align_constraints(e) entity e is an array.
void make_hpfc_current_mappings()
??? used with a temporary hack to differentiate array and templates
Psysteme entity_to_hpf_distribute_constraints(entity e)
Psysteme shift_system_to_prime_variables(Psysteme s)
Psysteme hpfc_compute_unicity_constraints(entity e)
Psysteme hpfc_compute_unicity_constraints(e) entity e should be an array;.
Psysteme entity_to_new_declaration(entity array)
void hpfc_init_dummy_to_prime()
#define is_entity_template
Psysteme generate_system_for_distributed_variable(entity v)
Psysteme generate_system_for_variable(v) entity v;.
static void put_dummy_and_prime(entity(*gen1)(), gen2)
shift dummy variables to prime variables.
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)
#define is_entity_array
tags with a newgen look and feel
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
int dummy
A dummy file, to prevent empty libraries from breaking builds.
#define region
simulation of the type region
list load_statement_local_regions(statement)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
#define alignment_undefined
#define distribution_style(x)
#define alignment_constant(x)
#define align_template(x)
#define align_alignment(x)
#define distribute_distribution(x)
#define alignment_rate(x)
#define alignment_arraydim(x)
#define distribute_processors(x)
#define distribution_parameter(x)
#define style_cyclic_p(x)
#define HPFC_PACKAGE
local definitions
void get_entity_dimensions(entity e, int dim, int *plow, int *pup)
void get_alignment(entity array, int dim, int *ptdim, int *pa, int *pb)
int HpfcExpressionToInt(expression e)
HpfcExpressionToInt(e)
distribution FindDistributionOfProcessorDim(list ldi, int dim, int *tdim)
void get_distribution(entity template, int dim, int *ppdim, int *pn)
alignment FindAlignmentOfTemplateDim(list lal, int dim)
tag new_declaration_tag(entity array, int dim)
void get_ith_dim_new_declaration(entity array, int i, int *pmin, int *pmax)
#define array_to_template(array)
#define DEBUG_SYST(D, W, S)
#define iceil(a, b)
integer ceiling function
#define template_to_processors(template)
entity get_ith_template_dummy(int)
entity get_ith_cycle_dummy(int)
bool entity_template_p(entity)
entity get_ith_region_dummy(int)
entity get_ith_array_dummy(int)
distribute load_hpf_distribution(entity)
entity get_ith_shift_dummy(int)
entity get_ith_block_dummy(int)
entity get_ith_processor_dummy(int)
entity get_ith_auxiliary_dummy(int)
align load_hpf_alignment(entity)
entity get_ith_local_dummy(int)
bool array_distributed_p(entity)
#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
#define pips_internal_error
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define GENERIC_LOCAL_MAPPING(name, result, type)
to allow mappings local to a file.
#define same_string_p(s1, s2)
static const char * prefix
#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_module_name(entity e)
See comments about module_name().
dimension entity_ith_dimension(entity, int)
Another semantics would be: is this reference r to e a kill for e? In general, this cannot be answere...
int SizeOfIthDimension(entity, int)
this function returns the size of the ith dimension of a variable e.
int NumberOfDimension(entity)
entity get_ith_dummy(string, string, int)
Returns a numbered entity the name of which is suffix + number, the module of which is prefix.
int variable_entity_dimension(entity)
variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0.
#define reference_variable(x)
#define dimension_lower(x)
#define dimension_upper(x)
#define variable_dimensions(x)
Psysteme sc_rename_variables(Psysteme s, bool(*renamed_p)(), Variable(*new_variable)())
Psysteme sc_rename_variables(s, renamed_p, new_variable) Psysteme s; bool (*renamed_p)(Variable); Var...
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_add_egalite(Psysteme p, Pcontrainte e)
void sc_add_egalite(Psysteme p, Pcontrainte e): macro ajoutant une egalite e a un systeme p; la base ...
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
void sc_add_inegalite(Psysteme p, Pcontrainte i)
void sc_add_inegalite(Psysteme p, Pcontrainte i): macro ajoutant une inegalite i a un systeme p; la b...
Psysteme sc_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
GENERIC_LOCAL_FUNCTION(directives, step_directives)
Copyright 2007, 2008, 2009 Alain Muller, Frederique Silber-Chaussumier.
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
#define VECTEUR_UNDEFINED
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Pvecteur vect_make(Pvecteur v, Variable var, Value val,...)
Pvecteur vect_make(v, [var, val,]* 0, val) Pvecteur v; // may be NULL, use assigne anyway Variable va...
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...