29 #include "pips_config.h"
42 #include "resources.h"
78 pips_debug (5,
"kernel_load_store used suffix : %s\n", suffix);
94 const string enginerc) {
97 debug_on(
"KERNEL_LOAD_STORE_DEBUG_LEVEL");
178 string ur =
user_request(
"number of nodes for your kernel?\n");
186 pips_user_error(
"you tried to kernelize a loop whose index is not private\n");
217 const char* host_call_name=
get_string_property_or_ask(
"KERNELIZE_HOST_CALL_NAME",
"name of the fucntion to call the kernel ?");
int get_int_property(const string)
callees make_callees(list a)
bool db_resource_p(const char *rname, const char *oname)
true if exists and in loaded or stored state.
statement outliner(const char *, list)
outline the statements in statements_to_outline into a module named outline_module_name the outlined ...
void do_isolate_statement(statement, const char *, const char *)
perform statement isolation on statement s that is make sure that all access to variables in s are ma...
static const char * caller_name
bool entity_is_argument_p(entity e, cons *args)
callees compute_callees(const statement stat)
Recompute the callees of a module statement.
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
void reset_cumulated_rw_effects(void)
bool cumulated_effects(const string)
bool proper_effects(const string)
const char * module_name(const char *s)
Return the module part of an entity name.
char * get_string_property(const char *)
#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 reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
const char * get_current_module_name(void)
Get the name of the current module.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
void replace_entity(void *s, entity old, entity new)
per variable version of replace_entities.
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
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)
#define ENDP(l)
Test if a list is empty.
#define NIL
The empty list (nil in Lisp)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
void db_put_or_update_memory_resource(const char *rname, const char *oname, void *p, bool update_is_ok)
Put a resource into the current workspace database.
loop statement_loop(statement)
Get the loop of a statement.
call statement_call(statement)
Get the call of a statement.
bool statement_call_p(statement)
bool statement_loop_p(statement)
bool kernelize(const string module_name)
turn a loop flagged with LOOP_LABEL into a kernel (GPU, terapix ...)
bool flag_kernel(const string module_name)
static void kernel_load_store_generator(statement s, const char *module_name)
Generate a communication around a statement instead of plain memory access if it is a call to a funct...
bool kernel_load_store(const char *module_name)
Generate malloc/copy-in/copy-out on the call sites of this module.
static bool kernel_load_store_engine(const char *module_name, const string enginerc)
run kernel load store using either region or effect engine
static bool do_kernelize(statement s, entity loop_label)
create a statement eligible for outlining into a kernel #1 find the loop flagged with loop_label #2 m...
bool bootstrap_kernels(const string module_name)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_internal_error
string user_request(const char *,...)
#define same_string_p(s1, s2)
int nb_nodes
The timing function.
const char * get_string_property_or_ask(const char *, const char[])
static const char * prefix
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define make_statement_list(stats...)
easy list constructor
bool same_entity_p(entity e1, entity e2)
predicates on entities
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
const char * module_local_name(entity e)
Returns the module local user name.
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
void RemoveLocalEntityFromDeclarations(entity, entity, statement)
entity find_label_entity(const char *, const char *)
util.c
struct _newgen_struct_callees_ * callees
#define loop_execution(x)
#define instruction_loop_p(x)
#define callees_callees(x)
#define instruction_loop(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define statement_label(x)
#define entity_undefined_p(x)
#define execution_sequential_p(x)
#define statement_instruction(x)
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
statement loop_strip_mine(statement loop_statement, int chunk_size, int chunk_number)
loop_strip_mine():