25 #include "pips_config.h"
120 if ((var==0) || (val==0))
175 list lcontent, lneighbour, ldomain;
177 list lc = lcontent, ln = lneighbour, ld = ldomain, lm =
NIL;
222 bool firstrange =
true;
250 if (blo && bup && bin)
255 sprintf(str,
"%d", lo);
257 sprintf(str,
"%d:%d", lo, up);
260 sprintf(str,
"%d:%d:%d", lo, up, in);
265 return str+strlen(str);
278 for (; l; i++,
POP(l))
282 Value vn = distributed_dim?
325 for ( ; l!=
NIL ; i++, l=
CDR(l))
384 list l1 = lr1, l2 = lr2;
388 for ( ; l1;
POP(l1),
POP(l2))
391 int lo1, up1, in1, lo2, up2, in2;
399 bcst = (blo1 && bup1 && bin1 && blo2 && bup2 && bin2);
408 if (in1!=in2)
return(
false);
411 if ((in1!=1) && ((lo1!=lo2) || (up1!=up2)))
414 if ((in1==1) && ((lo1>lo2) || (up1<up2)))
449 else if (arraydim==0)
542 if (((tu-tl)>n*sz) || (
pl>pu) || ((
pl==pu) && ((tu-tl)>n)))
709 list lr = lrref, conjonction =
NIL;
731 if ((rlo==rup) && (sz!=1) && (rlo>=lo) && (rup<=up))
message make_message(entity a1, list a2, Pvecteur a3, list a4)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
test make_test(expression a1, statement a2, statement a3)
instruction make_instruction(enum instruction_utype tag, void *val)
range make_range(expression a1, expression a2, expression a3)
struct _newgen_struct_entity_ * entity
bool hpfc_integer_constant_expression_p(expression e, int *pi)
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
#define VALUE_TO_INT(val)
range loop_index_to_range(entity index)
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
#define ENDP(l)
Test if a list is empty.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#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
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define CDR(pcons)
Get the list less its first element.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
statement make_continue_statement(entity)
#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_undefined_p(x)
#define alignment_arraydim(x)
#define distribute_processors(x)
#define distribution_parameter(x)
int HpfcExpressionToInt(expression e)
HpfcExpressionToInt(e)
distribution FindDistributionOfProcessorDim(list ldi, int dim, int *tdim)
bool ith_dim_distributed_p(entity array, int i, int *pprocdim)
whether a dimension is distributed or not.
alignment FindAlignmentOfTemplateDim(list lal, int dim)
int processor_number(entity template, int tdim, int tcell, int *pprocdim)
int processor_number(template, tdim, tcell, pprocdim)
#define array_to_template(array)
#define template_to_processors(template)
#define DELTAV
??? very beurk!
entity hpfc_name_to_entity(const char *)
entity load_new_node(entity)
distribute load_hpf_distribution(entity)
align load_hpf_alignment(entity)
intptr_t load_hpf_number(entity)
int vect_size(Pvecteur v)
package vecteur - reductions
bool empty_range_p(range r)
bool lrange_larger_p(list lr1, list lr2)
bool make_guard_expression(entity proc, list lrref, expression *pguard)
bool make_guard_expression(proc, lr, pguard)
list compute_receive_domain(list lr, Pvecteur v)
char * sprint_range(string str, range r)
list generate_message_from_3_lists(entity array, list lcontent, list lneighbour, list ldomain)
list generate_message_from_3_lists(array, lcontent, lneighbour, ldomain)
list add_elem_to_list_of_Pvecteur(list l, int var, int val)
caution, is initial list is destroyed.
list compute_receive_content(entity array, list lr, Pvecteur v)
range complementary_range(entity array, int dim, range r)
range complementary_range(array, dim, r)
list dup_list_of_ranges_list(list l)
??? the complexity of this function could be greatly improved
expression make_mypos_expression(int i, expression exp)
Pvecteur the_index_of_vect(Pvecteur v0)
Message Utilities.
list array_access_to_array_ranges(reference r, list lkref, list lvref)
bool larger_message_in_list(message m, list l)
bool empty_section_p(list lr)
bool message_larger_p(message m1, message m2)
bool message_larger_p(m1, m2)
char * sprint_lrange(string str, list l)
list template_ranges_to_processors_ranges(entity template, list lrt)
statement generate_guarded_statement(statement stat, entity proc, list lr)
list add_to_list_of_ranges_list(list l, range r)
statement loop_nest_guard(statement stat, reference r, list lkref, list lvref)
list array_ranges_to_template_ranges(entity array, list lra)
list dup_list_of_Pvecteur(list l)
??? the complexity of this function could be improved greatly...
#define MESSAGE(x)
newgen_message_domain_defined
#define message_neighbour(x)
#define message_content(x)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_internal_error
static hash_table pl
properties are stored in this hash table (string -> property) for fast accesses.
static int tc
Internal variables
#define ge_expression(e1, e2)
#define le_expression(e1, e2)
#define eq_expression(e1, e2)
entity entity_empty_label(void)
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression reference_to_expression(reference r)
bool expression_integer_constant_p(expression e)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
expression expression_list_to_conjonction(list l)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression Value_to_expression(Value v)
added interface for linear stuff.
dimension FindIthDimension(entity, int)
int dimension_size(dimension)
this function computes the size of a dimension.
int NumberOfDimension(entity)
#define reference_variable(x)
#define dimension_lower(x)
#define range_increment(x)
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
#define expression_normalized(x)
#define dimension_upper(x)
#define reference_indices(x)
#define expression_undefined_p(x)
#define variable_dimensions(x)
#define normalized_linear(x)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
A DOMAIN union describes the structure of a user type.
#define exp
Avoid some warnings from "gcc -Wshadow".
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
struct Svecteur * Pvecteur
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
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_erase_var(Pvecteur *ppv, Variable v)
void vect_erase_var(Pvecteur * ppv, Variable v): projection du vecteur *ppv selon la direction v (i....
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
Pvecteur vect_del_var(Pvecteur v_in, Variable var)
Pvecteur vect_del_var(Pvecteur v_in, Variable var): allocation d'un nouveau vecteur egal a la project...
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...