25 #include "pips_config.h"
40 #include "resources.h"
175 lToggleEnt =
CONS(
ENTITY, toggleEnt, lToggleEnt);
326 innerStat, newOuterInd,
327 lSupportedRef, htOffset,
333 innerStat, newOuterInd,
334 lSupportedRef, htOffset,
394 list lSupportedRef,
list lUnSupportedRef,
410 (lUnSupportedRef !=
NIL))
414 if(lUnSupportedRef !=
NIL)
473 newOuterInd, newInnerInd);
490 innerStat1, newOuterInd,
491 lSupportedRef, htOffset,
492 bufferSizeExp, newInnerInd);
503 printf(
"generate_code_loop\n");
533 &lSupportedRef, &lUnSupportedRef);
587 if(lSupportedRef !=
NIL)
594 lSupportedRef, lUnSupportedRef,
595 htOffset, bufferSizeExp,
596 newOuterInd, newInnerInd);
602 printf(
"put lToggleEnt\n");
620 if(lUnSupportedRef !=
NIL)
742 printf(
"newStat == statement_undefined\n");
851 CDR(lPrevSeq) = newLStats;
900 lPrevSeq = newStatCons;
907 lTempSeq = newStatCons;
953 pips_assert(
"lUnSupportedRef != HASH_UNDEFINED_VALUE",
956 if(lUnSupportedRef ==
NIL)
1020 list old = lCallRef;
1097 printf(
"generate_code_call 2\n");
instruction make_instruction_loop(loop _field_)
execution make_execution(enum execution_utype tag, void *val)
call make_call(entity a1, list a2)
range copy_range(range p)
RANGE.
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
basic make_basic(enum basic_utype tag, void *val)
basic copy_basic(basic p)
BASIC.
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)
synchronization make_synchronization_none(void)
range make_range(expression a1, expression a2, expression a3)
hash_table gLoopToToggleEnt
expression gBufferSizeEnt
hash_table gLoopToRef
comEngine_distribute.c
hash_table gStatToHtOffset
hash_table gLoopToUnSupRef
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...
statement make_wait_step_statement()
list make_loop_lStats_HRE(statement stat, entity transferSize, statement innerStat, entity newOuterInd, _UNUSED_ list lSupportedRef, _UNUSED_ hash_table htOffset, expression bufferSizeExp)
void get_supportedRef_HRE(statement stat, list *lSupportedRef, list *lUnSupportedRef)
statement get_call_stat_HRE(statement stat)
list process_gLoopToSync_HRE(statement stat, list lInStats)
statement generate_stat_from_ref_list_HRE(list lRef, statement stat)
list generate_stat_from_ref_list_HRE_list(list lRef, list lInStats)
statement generate_code_test_HRE(statement stat)
void process_replacement_HRE(list lRef, expression buffIndExp, statement *stat)
list process_replacement_HRE_OutRef(list lRef, list lStats)
static statement generate_code_loop(statement stat)
entity comEngine_make_new_scalar_variable(const char *prefix, basic bas)
static statement generate_code_call(statement stat, bool bCalledFromSeq)
static void process_opt_replace(statement *newStat)
static void fill_gLoopToToggleEnt(statement stat, list lRef)
static list glOutEffStats
statement comEngine_generate_code(statement stat)
static hash_table gHtCurNewInd
hash_table gLoopToOuterInd
comEngine_generate_code.c
static statement usual_loop_tiling(statement stat, statement newBody, list lSupportedRef, list lUnSupportedRef, hash_table htOffset, expression bufferSizeExp, entity newOuterInd, entity newInnerInd)
static void update_toggle_init_stats_list(statement stat)
statement generate_code_function(statement stat, bool bCalledFromSeq)
static void fill_gLoopToOpt(list lRef)
statement make_toggle_init_statement(entity toggleEnt)
static statement make_loopStat1(statement stat, entity transferSize, statement innerStat, entity newOuterInd, list lSupportedRef, hash_table htOffset, expression bufferSizeExp, entity newInnerInd)
static list replace_glCurRep_in_seq(list lStats, list lPrevSeq, list lSeq)
statement make_toggle_inc_statement(entity toggleEnt, int val)
static void process_ref_lists(statement stat, list *lInRef)
static statement process_code_seq(statement newStat, statement stat)
static void add_toggle_inc_statements(statement stat, list lInStats)
static statement add_exec_mmcd(statement stat)
static statement generate_code_seq(statement stat)
void comEngine_replace_reference_in_stat(statement stat, reference ref, expression new)
list generate_stat_from_ref_list_proc_list(list lRef, list lInStats)
statement make_toggle_mmcd(entity ent)
list process_gLoopToSync_proc(statement stat, list lInStats)
statement get_call_stat_proc(_UNUSED_ statement stat)
statement make_init_newInd_stat(statement stat, entity newInd)
list add_index_out_effect_proc(loop curLoop, list lStats)
statement generate_stat_from_ref_list_proc(list lRef, list lToggleEnt, statement stat)
statement make_step_inc_statement(int incNum)
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)
void process_innerStat1_proc(statement stat, entity oldInd, entity newOuterInd, entity newInnerInd)
statement make_exec_mmcd()
statement generate_code_test_proc(statement stat)
hash_table gLoopToOpt
cproto-generated files
statement comEngine_opt_loop_interchange(statement stat, statement innerStat, entity newInd)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
statement make_block_statement(list)
Make a block statement from a list of statement.
entity get_current_module_entity(void)
Get the entity of the current module.
list gen_make_list(int domain,...)
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
#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)
loop statement_loop(statement)
Get the loop of a statement.
bool statement_test_p(statement)
bool statement_call_p(statement)
bool statement_loop_p(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 STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
#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_statement(statement)
Print a statement on stderr.
static const char * prefix
#define C_MODULO_OPERATOR_NAME
#define statement_block_p(stat)
#define STATEMENT_NUMBER_UNDEFINED
default values
#define empty_comments
Empty comments (i.e.
#define C_EQUAL_OPERATOR_NAME
#define make_empty_statement
An alias for make_empty_block_statement.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity entity_empty_label(void)
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
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)
expression call_to_expression(call c)
Build an expression that call a function or procedure.
extensions empty_extensions(void)
extension.c
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
#define expression_domain
newgen_execution_domain_defined
#define REFERENCE(x)
REFERENCE.
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
@ is_instruction_sequence
#define instruction_tag(x)
#define sequence_statements(x)
#define instruction_sequence(x)
#define statement_instruction(x)
#define instruction_call(x)
@ is_execution_sequential
#define call_arguments(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
The structure used to build lists in NewGen.
#define exp
Avoid some warnings from "gcc -Wshadow".