25 #include "pips_config.h"
40 #include "resources.h"
150 *bHasLoopInside =
true;
163 bool bHasLoopInside =
false;
168 return bHasLoopInside;
339 static int numFifo = 1;
383 bool firstRef,
int inc)
396 bool alreadyAttached =
false;
407 if((!strcmp(effAction1,
R_EFFECT) && !firstRef) ||
408 (!strcmp(effAction1,
W_EFFECT) && firstRef))
410 alreadyAttached =
true;
565 bool actionWrite =
false;
569 bool effEntIsIndex =
false;
578 effEntIsIndex =
true;
623 #define LESSER_DIRECTION 4
624 #define GREATER_DIRECTION 1
625 #define ZERO_DIRECTION 2
626 #define ANY_DIRECTION 7
627 #define NO_DIRECTION 0
670 if(counter == loopLev)
679 if(((!strcmp(dir,
"<")) ||
680 (!strcmp(dir,
"<="))) &&
685 else if(((!strcmp(dir,
">")) ||
686 (!strcmp(dir,
">="))) &&
691 else if(!strcmp(dir,
"="))
709 while (n1 !=
NIL && n2 !=
NIL) {
771 if((readRef !=
ref) &&
839 if(lWriteLoop !=
NIL)
847 if(lastRLoop != lastWLoop)
853 if((comLoop != lastRLoop) &&
854 (comLoop != lastWLoop))
885 bool firstRef,
list lIndRef)
894 bool attachToThisLoop =
false;
904 attachToThisLoop =
true;
1055 bool firstRef =
true;
1059 list old = lCallRef;
1094 bool firstRef =
false;
static reference ref
Current stmt (an integer)
#define value_sign(v)
trian operators on values
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
hash_table gLoopToRef
comEngine_distribute.c
static bool check_call_distribution_feasability(statement inStat)
list reference_indices_entity_list(reference ref)
bool comEngine_feasability(statement externalized_code, graph dg)
static statement g_externalized_code
static bool is_good_direction_p(Ptsg sg, int loopLev, bool bReadIsSource)
static int ray_to_direction[3]
static statement find_common_loop(list n1, list n2, list *lWLoops)
static bool attach_ref_to_loop(reference callRef, statement inStat, bool firstRef, list lIndRef)
static char * direction_to_representation[8]
static int vertex_to_direction[3]
static bool check_loop_distribution_feasability(statement stat)
static hash_table gRefToEncLoop
static list local_syntax_to_reference_list(syntax s, list lr)
static void fill_gRefToEncLoop(statement stat)
static int line_to_direction[3]
static void compute_fifo_from_ref(reference ref, bool bReadAct, int inc)
bool code_has_write_eff_ref_p(reference ref, statement stat)
static void fill_gRefToEncLoop_loop(statement stat)
static void attach_ref_to_stat(reference callRef, statement stat, hash_table pTable, bool firstRef, int inc)
static bool check_distribution_feasability(statement stat)
static void fill_gRefToEncLoop_call(statement stat)
static bool entity_in_ref_list(entity searchedEnt, list lRef)
#define GREATER_DIRECTION
static int find_or_create_fifo_from_ref(reference ref, bool bReadAct, hash_table refToFifo, int inc)
static bool check_for_conflict(reference ref)
static bool process_ref_list(list lCallRef, bool firstRef, statement inStat)
static bool has_loop_inside(statement stat)
static void fill_gRefToEncLoop_test(statement stat)
static bool check_test_distribution_feasability(statement inStat)
static void has_loop_inside_rwt(statement stat, bool *bHasLoopInside)
list comEngine_expression_to_reference_list(expression e, list lr)
conversion of an expression into a list of references; references are appended to list lr as they are...
#define cone_generating_system(x)
#define CONFLICT(x)
CONFLICT.
#define dg_arc_label_conflicts(x)
#define conflict_source(x)
list load_cumulated_rw_effects_list(statement)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_write_p(eff)
#define effect_read_p(eff)
#define effect_scalar_p(eff) entity_scalar_p(effect_entity(eff))
entity effect_entity(effect)
cproto-generated files
#define action_write_p(x)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
#define successor_arc_label(x)
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
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)
list gen_concatenate(const list l1x, const list l2x)
concatenate two lists.
list gen_copy_seq(list l)
Copy a list structure.
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
list gen_last(list l)
Return the last element of a list.
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#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.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
loop statement_loop(statement)
Get the loop of a statement.
test statement_test(statement)
Get the test of a statement.
void hash_dont_warn_on_redefinition(void)
hash_table hash_table_make(hash_key_type key_type, size_t size)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
void hash_warn_on_redefinition(void)
these function set the variable should_i_warn_on_redefinition to the value true or false
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define HASH_MAP(k, v, code, ht)
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
string reference_to_string(reference r)
static hash_table pl
properties are stored in this hash table (string -> property) for fast accesses.
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
bool same_entity_p(entity e1, entity e2)
predicates on entities
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool reference_equal_p(reference r1, reference r2)
list expression_to_reference_list(expression e, list lr)
conversion of an expression into a list of references; references are appended to list lr as they are...
bool same_expression_p(expression e1, expression e2)
this is slightly different from expression_equal_p, as it will return true for a+b vs b+a
#define REFERENCE(x)
REFERENCE.
#define syntax_reference(x)
#define reference_variable(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define range_increment(x)
#define EXPRESSION(x)
EXPRESSION.
@ is_instruction_whileloop
@ is_instruction_sequence
#define instruction_tag(x)
#define sequence_statements(x)
#define reference_indices(x)
#define instruction_sequence(x)
#define test_condition(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define expression_syntax(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
#define sg_sommets(sg)
vieilles definitions des fonctions d'impression void sg_fprint(); #define print_sg(sg) sg_fprint(stdo...
#define sg_rayons(sg)
acces au premier rayon de la liste des rayons d'un systeme generateur defini par un pointeur: sg_rayo...
struct type_sg * Ptsg
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
#define SG_UNDEFINED_P(sg)
#define sg_droites(sg)
acces a la premiere droite de la liste des droites d'un systeme generateur defini par un pointeur: sg...
void sg_fprint_as_ddv(FILE *fd, Ptsg sg)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
struct Svecteur * vecteur
structure de donnees Sommet
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
#define exp
Avoid some warnings from "gcc -Wshadow".
#define BASE_NULLE
MACROS SUR LES BASES.
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...