25 #include "pips_config.h"
54 ((bool)(intptr_t) (hash_get(stat_bool_map, stat)))
56 #define Store(stat, val) \
57 (hash_put(stat_bool_map, (void*)stat, (void*) (val)))
84 error_reset_current_statement_stack();
98 pips_debug(5,
"block %p: %"PRIdPTR
"\n", q, is_io);
99 Store(current_statement_head(), is_io);
106 pips_debug(5,
"test %p: %"PRIdPTR
"\n", t, is_io);
107 Store(current_statement_head(), is_io);
113 pips_debug(5,
"loop %p: %"PRIdPTR
"\n", l, is_io);
114 Store(current_statement_head(), is_io);
126 Store(current_statement_head(), is_io);
137 pips_debug(5,
"unstructured %p: %"PRIdPTR
"\n", u, is_io);
138 Store(current_statement_head(), (
void*)is_io);
148 make_current_statement_stack();
158 free_current_statement_stack();
256 #define GENERATION(NAME, COLLECT, UPDATE)\
257 static statement NAME(array, move) entity array; tag move;\
258 {pips_assert("valid move", \
259 move==is_movement_collect || move==is_movement_update);\
260 return((move==is_movement_collect) ? (COLLECT) : (UPDATE));}
330 proc_cond_tmp =
sc_dup(proc_echelon),
331 proc_cond = (sc_nredund(&proc_cond_tmp),
340 h_pre = host_pre_io(
array, move),
341 h_in = host_in_io(
array, move),
342 h_post = host_post_io(
array, move),
343 n_pre = node_pre_io(
array, move),
344 n_in = node_in_io(
array, move),
345 n_post = node_post_io(
array, move),
392 " distributed variable ",
Psysteme entity_to_declaration_constraints(entity e, tag what)
gives back the constraints due to the declarations.
static list blocks
lisp of loops
statement systeme_to_loop_nest(Psysteme, list, statement, entity)
sc is used to generate the loop nest bounds for variables vars.
statement generate_optional_if(Psysteme, statement)
statement generate_optional_if(sc, stat)
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
statement hpfc_compute_lid(entity lid, entity proc, entity(*creation)(), entity array)
statement st_compute_lid(proc)
statement generate_deducables(list le)
statement generate_deducables(list le)
statement define_node_processor_id(entity proc, entity(*creation)(int))
builds a statement VAR_i = MYPOS(i, proc_number) // i=1 to proc dimension
statement hpfc_buffer_packing(entity array, entity(*creation)(), bool pack)
array(creation) = buffer(current++) or reverse assignment...
statement hpfc_buffer_initialization(bool is_send, _UNUSED_ bool is_lazy, bool job_was_done)
statement hpfc_packing_of_current__buffer(entity array, bool pack)
CALL (pvmtype) HPFC {,UN}PACK.
statement make_block_statement(list)
Make a block statement from a list of statement.
#define CONTROL_MAP(ctl, code, c, list)
Macro to walk through all the controls reachable from a given control node of an unstructured.
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#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 MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
void insert_comments_to_statement(statement, const char *)
Insert a comment string (if non empty) at the beginning of the comments of a statement.
#define array_to_processors(array)
#define HPFC_HCAST
host/node communications
#define DEBUG_STAT(D, W, S)
#define movement_update_p(t)
bool hpfc_special_io(entity f)
void generate_io_statements_for_distributed_arrays(entity, tag, Psysteme, Psysteme, Psysteme, list, list, list, list, statement *, statement *)
void set_only_io_map(statement_mapping)
entity hpfc_name_to_entity(const char *)
entity get_ith_array_dummy(int)
statement hpfc_make_call_statement(entity, list)
statement hpfc_make_call_statement(e, l) generate a call statement to function e, with expression lis...
entity get_ith_processor_dummy(int)
entity get_ith_local_dummy(int)
bool hpfc_io_like_function(entity)
static statement hpfc_nsend(entity array)
PVM_SEND(HOST_TID, HOST SND CHANNEL, INFO) HOST SND CHANNEL += 2.
void hpfc_io_util_error_handler()
??? neglect expression side effects...
void generate_io_statements_for_shared_arrays(entity array, tag move, Psysteme condition, Psysteme echelon, _UNUSED_ list parameters, list scanners, list rebuild, statement *psh, statement *psn)
generate_io_statements_for_shared_arrays
static void only_io_call(call c)
static void only_io_sequence(sequence q)
static statement_mapping stat_bool_map
HPFC module by Fabien COELHO.
static statement hpfc_hmessage(entity array, entity proc, bool send)
T_LID=CMP_LID(pn, pi...) ? init buffer...
static statement_mapping only_io_mapping(statement program, statement_mapping map)
static void only_io_test(test t)
#define GENERATION(NAME, COLLECT, UPDATE)
static bool host_section_p(list ls)
true if the first statement of a block is a host section marker.
void only_io_mapping_initialize(statement program)
static void only_io_loop(loop l)
static statement hpfc_hcast(entity array)
static statement hpfc_hcast()
static void only_io_unstructured(unstructured u)
static statement hpfc_nrecv(entity array, bool cast)
! init buffer CALL HPFC {RCV FROM HOST, NCAST} CALL (type) BUFFER UNPACK
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define MAKE_STATEMENT_MAPPING()
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define GENERIC_CURRENT_MAPPING(name, result, type)
#define DEFINE_LOCAL_STACK(name, type)
#define hash_table_undefined
Value of an undefined hash_table.
#define same_string_p(s1, s2)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#define HPF_PREFIX
moved here because needed by syntax:-(
#define HOSTSECTION_SUFFIX
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
#define make_empty_statement
An alias for make_empty_block_statement.
bool entity_continue_p(entity f)
bool io_intrinsic_p(entity e)
rue is a statement s is an io intrinsic
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...
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
#define test_domain
newgen_entity_domain_defined
#define expression_domain
newgen_execution_domain_defined
#define unstructured_domain
newgen_type_domain_defined
#define loop_domain
newgen_language_domain_defined
#define statement_domain
newgen_sizeofexpression_domain_defined
#define call_domain
newgen_callees_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define sequence_statements(x)
#define instruction_call_p(x)
#define statement_instruction(x)
#define instruction_call(x)
#define control_statement(x)
#define sequence_domain
newgen_reference_domain_defined
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Psysteme extract_nredund_subsystem(Psysteme s1, Psysteme s2)
Psysteme extract_nredund_subsystem(s1, s2) Psysteme s1, s2;.
static statement current_statement
The structure used to build lists in NewGen.