25 #include "pips_config.h"
39 #include "resources.h"
127 finalOffset = finalOffset * (upper - lower + 1);
130 *retVal = finalOffset *
offset;
235 *bHasCallStat =
true;
262 bool bHasCallStat =
false;
276 static intptr_t gCurFifoCounter = 1;
284 intptr_t newFifoNum = gCurFifoCounter;
286 gCurFifoCounter += 1;
297 realFifoNum = gCurFifoCounter;
318 gCurFifoCounter += inc;
336 pips_assert(
"(numOfFifo == 2) || (numOfFifo == 3)",
337 (numOfFifo == 2) || (numOfFifo == 3));
345 if(curInc == numOfFifo)
422 if(lToggleEnt ==
NIL)
429 printf(
"generate_mmcd_stat_from_ref 1\n");
470 list * lReadStats,
list * lWriteStats)
634 bool bHasLoop =
false;
707 pips_assert(
"lUnSupportedRef != HASH_UNDEFINED_VALUE",
711 (lUnSupportedRef ==
NIL))
799 ((upVal+1)%rate == 0))
805 else if((upVal+1) < rate)
901 &lSupReadStats, &lSupWriteStats);
930 lStats =
gen_nconc(lStats, lSupReadStats);
937 lStats =
gen_nconc(lStats, lSupWriteStats);
950 transferSize, bufferSizeExp);
957 transferSize, newOuterInd, innerStat);
969 static int number = 0;
1000 &lReadStats, &lWriteStats);
1010 lStats =
gen_nconc(lStats, lWriteStats);
1012 if(lWriteStats !=
NIL)
1035 &lReadStats, &lWriteStats);
1044 lStats =
gen_nconc(lStats, lWriteStats);
1046 if(lWriteStats !=
NIL)
1078 list * lSupportedRef,
list * lUnSupportedRef)
1120 innerStat, newOuterInd,
1121 lSupportedRef, htOffset,
1144 printf(
"generate_code_test\n");
1256 if(strcmp(effAction1, effAction2))
1270 printf(
"create_realFifo_proc\n");
1273 printf(
"create_realFifo_proc it\n");
1283 printf(
"create_realFifo_proc end\n");
void free_normalized(normalized p)
call make_call(entity a1, list a2)
basic make_basic(enum basic_utype tag, void *val)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
test make_test(expression a1, statement a2, statement a3)
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
void free_expression(expression p)
instruction make_instruction(enum instruction_utype tag, void *val)
reference copy_reference(reference p)
REFERENCE.
void free_syntax(syntax p)
synchronization make_synchronization_none(void)
void free_statement(statement p)
static reference ref
Current stmt (an integer)
void const char const char const int
hash_table gLoopToToggleEnt
hash_table gLoopToRef
comEngine_distribute.c
hash_table gLoopToUnSupRef
statement make_wait_step_statement()
entity comEngine_make_new_scalar_variable(const char *prefix, basic bas)
statement comEngine_generate_code(statement stat)
statement generate_code_function(statement stat, bool bCalledFromSeq)
void comEngine_replace_reference_in_stat(statement stat, reference ref, expression new)
list generate_stat_from_ref_list_proc_list(list lRef, list lInStats)
static bool has_call_stat_inside_flt(statement stat, bool *bHasCallStat)
statement make_toggle_mmcd(entity ent)
list process_gLoopToSync_proc(statement stat, list lInStats)
static bool has_loop_inside_flt(statement stat, bool *bHasLoop)
static void has_call_stat_inside_rwt(_UNUSED_ statement stat, _UNUSED_ bool *bHasCallStat)
static hash_table gOldRefToHREFifo
statement get_call_stat_proc(_UNUSED_ statement stat)
statement comEngine_generate_procCode(statement externalized_code, _UNUSED_ list l_in, _UNUSED_ list l_out)
statement make_init_newInd_stat(statement stat, entity newInd)
static void comEngine_replace_reference_in_stat_rwt(expression exp, expression newExp)
static void generate_mmcd_stats_from_ref(list lRef, hash_table htOffset, expression count, list lToggleEnt, list *lReadStats, list *lWriteStats)
static bool get_final_offset(list lRefDim, intptr_t offset, int rank, intptr_t *retVal)
static hash_table gRealFifo
static int alloc_new_slot(entity ent)
static intptr_t get_realFifoNum(intptr_t fifoNum)
static int find_or_create_slot(entity ent)
list add_index_out_effect_proc(loop curLoop, list lStats)
void get_supportedRef_proc(statement stat, hash_table htOffset, list *lSupportedRef, list *lUnSupportedRef)
static bool supported_ref_p(reference ref, entity index, hash_table htOffset)
statement generate_stat_from_ref_list_proc(list lRef, list lToggleEnt, statement stat)
statement make_transStat(statement stat, entity newOuterInd, entity transferSize, expression bufferSizeExp)
static statement generate_mmcd_stat_from_ref(reference curRef, int offset, expression count, bool bRead, list lToggleEnt)
static statement make_mmcd_load_store_stat(string name, expression hreBuff, expression refExp, expression offExp, expression countExp)
statement make_step_inc_statement(int incNum)
static bool has_loop_inside(statement stat)
static list make_lStats(statement stat, entity transferSize, statement innerStat, entity newOuterInd, list lSupportedRef, hash_table htOffset, expression bufferSizeExp)
static entity get_toggleEnt_from_ref(reference curRef, list lToggleEnt)
statement make_loop_step_stat(statement stat, entity newOuterInd)
static reference gRefToReplace
static list make_mmcd_stats_from_ref(statement stat, list lSupportedRef, hash_table htOffset, entity transferSize, entity newOuterInd, statement innerStat)
list make_loop_lStats_proc(statement stat, entity transferSize, statement innerStat, entity newOuterInd, list lSupportedRef, hash_table htOffset, expression bufferSizeExp)
void create_realFifo_proc(statement stat, list lRef)
bool has_call_stat_inside(statement stat)
comEngine_generate_procCode.c
void process_innerStat1_proc(statement stat, entity oldInd, entity newOuterInd, entity newInnerInd)
statement make_exec_mmcd()
statement generate_code_test_proc(statement stat)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
statement make_block_statement(list)
Make a block statement from a list of statement.
void gen_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
list gen_make_list(int domain,...)
#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
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)
loop statement_loop(statement)
Get the loop of a statement.
test statement_test(statement)
Get the test of a statement.
statement make_assign_statement(expression, expression)
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_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 STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
#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,...
void print_reference(reference r)
void print_statement(statement)
Print a statement on stderr.
static void norm(struct rproblem *RR)
cette procedure normalise la fonction cout, calcule les valeurs des seconds membres resultant d'une n...
#define C_LESS_OR_EQUAL_OPERATOR_NAME
#define C_GREATER_THAN_OPERATOR_NAME
#define C_MODULO_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define NORMALIZE_EXPRESSION(e)
#define STATEMENT_NUMBER_UNDEFINED
default values
#define call_to_statement(c)
#define DIVIDE_OPERATOR_NAME
#define empty_comments
Empty comments (i.e.
#define MULTIPLY_OPERATOR_NAME
#define PLUS_C_OPERATOR_NAME
#define make_empty_statement
An alias for make_empty_block_statement.
entity entity_empty_label(void)
entity module_name_to_runtime_entity(const char *name)
similar to module_name_to_entity but generates a warning and a stub if the entity is not found
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
bool expression_integer_value(expression e, intptr_t *pval)
expression reference_to_expression(reference r)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
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)
bool integer_constant_expression_p(expression e)
positive integer constant expression: call to a positive constant or to a sum of positive integer con...
bool expression_reference_p(expression e)
Test if an expression is a reference.
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
int integer_constant_expression_value(expression e)
expression call_to_expression(call c)
Build an expression that call a function or procedure.
extensions empty_extensions(void)
extension.c
#define normalized_undefined
#define expression_domain
newgen_execution_domain_defined
#define REFERENCE(x)
REFERENCE.
#define normalized_linear_p(x)
#define reference_variable(x)
#define dimension_lower(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
@ is_instruction_whileloop
@ is_instruction_sequence
#define instruction_tag(x)
#define expression_normalized(x)
#define dimension_upper(x)
#define reference_indices(x)
#define variable_dimensions(x)
#define statement_instruction(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define type_variable_p(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
#define exp
Avoid some warnings from "gcc -Wshadow".
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...