25 #include "pips_config.h"
61 for ( ; v2!= NULL; v2=v2->
succ) {
76 if (CompList !=
NIL) {
101 fprintf(stderr,
"*********************************************************************\n");
103 fprintf(stderr,
"---------------------------------------------------------------------\n");
131 fprintf(stderr,
"\nReference Template :: \n[ ");
132 for (i = 0; i < Rank; i++) {
163 unsigned int i, I, J, K;
166 fprintf(stderr,
"\nBoundary Pairs ::\n");
169 for (i = 0; i < Rank; i++) {
171 fprintf(stderr,
" <= X%d <= ", i);
181 for (; i < ((Rank * (Rank + 1)) / 2); i++) {
184 fprintf(stderr,
" <= X%d + X%d <= ", I, J);
204 for (; i < (Rank * Rank); i++) {
206 fprintf(stderr,
" <= X%d - X%d <= ", I, J);
295 pips_debug(5,
"PutBoundPair : dump Low and Up vectors \n");
364 unsigned int LoIndex, HiIndex,
Index, i;
366 LoIndex = (I < J) ? I : J;
367 HiIndex = (I < J) ? J : I;
369 for (i = 1; i < (LoIndex + 1); i++)
450 for (cnt = 0; cnt < Rank; cnt++) {
456 for (cnt = 0; cnt < Rank * Rank; cnt++) {
510 for (DimNo = 0; inds !=
NIL; DimNo++, inds =
CDR(inds)) {
619 list OldList, NewList, NewEle;
634 for (DimNo = 0; DimNo < Rank; DimNo++) {
670 unsigned Index, I, J;
679 for (ZhiExprNo = 0; ZhiExprNo < Rank; ZhiExprNo++) {
680 lbExpr =
LSEC(Dad, ZhiExprNo);
681 ubExpr =
USEC(Dad, ZhiExprNo);
683 lbExpr =
Lbound(Loop, lbExpr);
685 ubExpr =
Ubound(Loop, ubExpr);
695 for (I = 0; I < Rank; I++) {
696 for (J = I + 1; J < Rank; J++) {
700 int PlusOffset, MinusOffset;
702 PlusOffset = Rank +
Index;
703 MinusOffset = ((Rank * (Rank + 1)) / 2) +
Index;
709 if (
LSEC(Dad, PlusOffset) == NULL) {
720 if (
USEC(Dad, PlusOffset) == NULL) {
732 if (
LSEC(Dad, MinusOffset) == NULL) {
743 if (
USEC(Dad, MinusOffset) == NULL) {
774 Low =
Lbound(Loop, lbExpr);
776 Up =
Ubound(Loop, ubExpr);
785 unsigned Index, Offset;
786 LinExpr lbExpr, ubExpr, TmpExpr1, TmpExpr2;
806 Offset = Rank +
Index;
811 lbExpr =
LSEC(Dad, I);
812 TmpExpr1 =
LSEC(Dad, J);
818 ubExpr =
USEC(Dad, I);
819 TmpExpr2 =
USEC(Dad, J);
825 Offset = (Rank * (Rank + 1)) / 2 +
Index;
830 lbExpr =
LSEC(Dad, I);
831 TmpExpr1 =
USEC(Dad, J);
837 ubExpr =
USEC(Dad, I);
838 TmpExpr2 =
LSEC(Dad, J);
865 New_iter1 = Vars->
New;
866 for (; !
ENDP(New_iter1); (New_iter1 =
CDR(New_iter1))) {
870 New_iter2 =
CDR(New_iter1);
872 for (; !
ENDP(New_iter2); New_iter2 =
CDR(New_iter2)) {
878 Offset = Rank +
Index;
879 TmpExpr1 =
LSEC(Dad, J);
881 TmpExpr2 =
USEC(Dad, J);
886 Offset = ((Rank * (Rank + 1)) / 2) +
Index;
887 TmpExpr1 =
USEC(Dad, J);
889 TmpExpr2 =
LSEC(Dad, J);
1019 LinExpr Low = NULL, Up = NULL;
1028 for (i = 0; i < Rank; i++) {
1037 for (i = 0; i < (Rank * Rank); i++) {
1039 if ((
LSEC(S1, i) != NULL) && (
LSEC(S2, i) != NULL)) {
1043 if ((
USEC(S1, i) != NULL) && (
USEC(S2, i) != NULL)) {
ref_temp make_ref_temp(intptr_t a1, rtype a2)
rtype make_rtype(enum rtype_utype tag, void *val)
bound_pair make_bound_pair(intptr_t a1, Pvecteur a2, Pvecteur a3)
simple_section make_simple_section(context_info a1, dad_struct a2)
context_info make_context_info(intptr_t a1, intptr_t a2, intptr_t a3)
dad_struct make_dad_struct(list a1, list a2)
static reference ref
Current stmt (an integer)
static hash_table Ref
Refs maps each statement to the effects it references.
#define LSEC(x, i)
accessing DAD components
OpFlag
used for merging linear expressions
#define comp_desc_reference(x)
#define bound_pair_lb_(x)
#define dad_struct_shape(x)
#define bound_pair_index(x)
#define comp_desc_section(x)
#define BOUND_PAIR(x)
newgen_simple_section_domain_defined
#define ref_temp_index(x)
#define context_info_undefined
#define simple_section_dad(x)
#define bound_pair_ub_(x)
#define REF_TEMP(x)
REF_TEMP.
#define COMP_DESC(x)
COMP_DESC.
#define simple_section_context(x)
#define dad_struct_rtemps(x)
#define context_info_rank(x)
#define ref_temp_rtype(x)
void vect_debug(Pvecteur v)
constraint.c
bool vect_constant_p(Pvecteur)
bool vect_constant_p(Pvecteur v): v contains only a constant term, may be zero
#define ENDP(l)
Test if a list is empty.
#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.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
#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 pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
const char * entity_minimal_name(entity e)
Do preserve scope informations.
#define NORMALIZE_EXPRESSION(e)
#define normalized_linear_p(x)
#define reference_variable(x)
#define EXPRESSION(x)
EXPRESSION.
#define reference_indices(x)
#define variable_dimensions(x)
#define normalized_linear(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Pvecteur vect_multiply(Pvecteur v, Value x)
Pvecteur vect_multiply(Pvecteur v, Value x): multiplication du vecteur v par le scalaire x,...
void TransSimpSec(comp_desc Desc, loop Loop, tVariants *Vars)
void DisplaySimpleSection(simple_section Dad)
}}
tVariants TransRefTemp(loop ThisLoop, comp_desc Desc)
}}
bool IsExprConst(LinExpr Expr)
}}
dad_struct AllocateDadStruct(int Rank)
}}
unsigned int ComputeIndex(unsigned int I, unsigned int J, unsigned int Rank)
}}
LinExpr GetBoundary(simple_section Dad, int DimNo, unsigned Low)
}}
simple_section SimpUnion(simple_section S1, simple_section S2)
}}
void ComputeBoundaries(simple_section Dad, loop Loop, LinExpr lbExpr, LinExpr ubExpr, unsigned Offset)
compute both boundary expression and store in the tSS array
void PrintCompRegions(list CompList)
}}
void UpdateUnresolved(simple_section Dad, loop Loop)
}}
simple_section AllocateSimpleSection(reference ref)
Pvecteur my_vect_substract(Pvecteur pvec1, Pvecteur pvec2)
LinExpr Ubound(loop Loop, LinExpr Lin)
Pvecteur my_vect_var_subst(Pvecteur vect, Variable var, Pvecteur new_vect)
{{ my vect var subst function
void ComputeRTandSS(expression Sub, unsigned DimNo, simple_section Dad, loop Loop)
initialise reference template and shapes for inner most references
LinExpr MaxBoundary(LinExpr Lin1, LinExpr Lin2)
}}
LinExpr MinBoundary(LinExpr Lin1, LinExpr Lin2)
}}
void DisplayRefTemp(simple_section Dad)
}}
void DisplayDad(comp_desc TheDad)
void TranslateRefsToLoop(loop ThisLoop, list ListOfComps)
}}
LinExpr Lbound(loop Loop, LinExpr Lin)
}}
void PrintLinExpr(LinExpr Lin)
}}
void PrintSimp(comp_desc Dad)
}}
unsigned int CardinalityOf(list gl)
LinExpr CopyAccVec(LinExpr Expr)
}}
void PutBoundPair(simple_section Dad, _int DimNo, LinExpr Low, LinExpr Up)
}}
void TranslateToLoop(loop ThisLoop, comp_desc Desc)
}}
LinExpr MergeLinExprs(LinExpr Expr1, LinExpr Expr2, OpFlag Op)
}}
expression GetAccVec(unsigned No, const reference ref)
return the n'th subscript expression
tag GetRefTemp(simple_section Dad, _int DimNo)
}}
void ScanAllDims(loop Loop, comp_desc Desc)
}}
bool DivExists(loop Loop, LinExpr Lin)
check whether loop index variable var is contained in LinExpr
void PutRefTemp(simple_section Dad, int DimNo, tag Val)
}}
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
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_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
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...
int vect_compare(Pvecteur *pv1, Pvecteur *pv2)
for qsort, returns:
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
bool vect_contains_variable_p(Pvecteur v, Variable var)
bool vect_contains_variable_p(Pvecteur v, Variable var) BA 19/05/94 input : a vector and a variable o...