PIPS
|
Go to the source code of this file.
string build_outline_name | ( | const char * | base_prefix, |
const char * | mod_name | ||
) |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/gpu/gpu-local.h instead, to add your own modifications. header file built by cproto gpu-local.h Nothing yet... cproto-generated files gpu-ify.c
Warning! Do not modify this file that is automatically generated!
base_prefix | ase_prefix |
mod_name | od_name |
Definition at line 78 of file gpu-ify.c.
References build_new_top_level_module_name(), concatenate(), free(), get_bool_property(), prefix, and strdup().
Referenced by get_next_task_name(), and gpu_ify_statement().
Callback for gen_recurse Remove annotation on a loop nest.
Definition at line 465 of file loop_nest_annotate.c.
References comment(), empty_comments_p(), statement_comments, and string_undefined.
Referenced by gpu_clear_annotations_on_loop_nest().
module | odule |
funcs | uncs |
do_casts | o_casts |
Definition at line 378 of file gpu_qualify_pointers.c.
References array_type_p(), call_arguments, call_function, glopriv_context_t::call_sites, callee, callees_callees, CAR, CDR, glopriv_context_t::changed, code_declarations, collect_glopriv_data(), glopriv_context_t::do_casts, dummy_identifier, dummy_unknown_p, entity_array_p(), entity_function_p(), entity_initial, entity_local_name(), entity_name, entity_pointer_p(), entity_storage, entity_type, entity_variable_p, f(), FOREACH, formal_offset, formal_parameter_p(), free_glopriv(), functional_parameters, gen_length(), gen_nth(), glopriv_context_t::globals, hash_defined_p(), hash_get(), is_global(), is_private(), module, module_name_to_entity(), new_glopriv(), PARAMETER, parameter_dummy, parameter_type, params, pips_assert, pips_debug, pips_user_error, pips_user_warning, pointer_type_p(), glopriv_context_t::privates, set_as_private(), set_belong_p(), set_global(), set_variable_qualifier(), storage_formal, type_functional, type_variable, type_variable_p, value_code, value_code_p, and variable_is_glopriv().
Referenced by gpu_qualify_pointers().
void gather_grid_dim | ( | statement | s, |
void * | ctx | ||
) |
ctx | tx |
Definition at line 165 of file xml_output.c.
References comment(), CONS, pips_debug, statement_comments, string_undefined_p, and strndup().
Referenced by gpu_xml_dump().
bool gpu_clear_annotations_on_loop_nest | ( | const | string | ) |
Remove all annotations on a loop nest.
string | od_name |
Definition at line 477 of file loop_nest_annotate.c.
References clear_annotated_loop_nest(), gen_null(), gen_recurse, module_statement, PIPS_PHASE_POSTLUDE, PIPS_PHASE_PRELUDE, and statement_domain.
Transform all the parallel loop nests of a module into smaller independent functions suitable for GPU-style accelerators.
What can be done is more detailed in gpu_ify_statement(). The various functions are generated or not according to different properties.
module_name | is the name of the module to work on. |
Outline the previous marked loop nests. First put the statements to outline in the good order:
Clean module name from prefix
mod_name | od_name |
Definition at line 347 of file gpu-ify.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, depth_of_parallel_perfect_loop_nest(), entity_name, FOREACH, gen_free_list(), gen_nreverse(), gen_null(), gen_recurse, get_clean_mod_name(), get_current_module_entity(), get_current_module_statement(), global_name_to_user_name(), gpu_ify_statement(), loop_nests_to_outline, mark_loop_to_outline(), module_statement, NIL, PIPS_PHASE_POSTLUDE, PIPS_PHASE_PRELUDE, reset_cumulated_rw_effects(), set_cumulated_rw_effects(), STATEMENT, and statement_domain.
bool gpu_loop_nest_annotate | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 406 of file loop_nest_annotate.c.
References gpu_loop_nest_annotate_on_statement(), module_name(), module_statement, PIPS_PHASE_POSTLUDE, and PIPS_PHASE_PRELUDE.
for(i=0; i<=100; i++) for(j=0; j<=200; j++) foo();
==>
// Loop nest P4A begin,2D(200, 100) for(i=0; i<=100; i++) for(j=0; j<=200; j++) // Loop nest P4A end if (i<=100&&j<=200) foo();
for loops must have been transformed into loops.
mod_name | name of the module |
Initialize context
Annotate the loop nests of the module.
Clean up things: (hasn't it been done previously in loop_annotate?)
Definition at line 383 of file loop_nest_annotate.c.
References expression_undefined, gpu_lna_context::fail_p, gen_context_recurse, gen_free_list(), get_bool_property(), gpu_lna_context::gpu_loop_nest_annotate_parallel_p, gpu_lna_context::guard_expression, gpu_lna_context::inner_loop, gpu_lna_context::inner_reached, gpu_lna_context::l_enclosing_loops, gpu_lna_context::l_number_iter_exp, loop_annotate(), loop_domain, gpu_lna_context::loop_nest_depth, loop_push(), loop_undefined, gpu_lna_context::max_loop_nest_depth, and NIL.
Referenced by gpu_ify_statement(), and gpu_loop_nest_annotate().
bool gpu_parallelize_annotated_loop_nest | ( | const | string | ) |
Parallelize the launcher based on loop nest annotate sentinels.
string | od_name |
Definition at line 445 of file loop_nest_annotate.c.
References gen_null(), gen_recurse, module_statement, parallelize_annotated_loop_nest(), PIPS_PHASE_POSTLUDE, PIPS_PHASE_PRELUDE, and statement_domain.
bool gpu_qualify_pointers | ( | const | string | ) |
string | odule_name |
Definition at line 575 of file gpu_qualify_pointers.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, do_gpu_qualify_pointers(), get_bool_property(), get_current_module_entity(), get_current_module_statement(), module_name(), module_name_to_entity(), pips_debug, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), and set_current_module_statement().
PIPSMAKE INTERFACE.
Set the current module entity required to have many things working in PIPS:
First find grid dimension by looking for magic comments
of const strings
Print current module
mod_name | od_name |
Definition at line 187 of file xml_output.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, entity_type, entity_user_name(), find_ith_parameter(), FOREACH, functional_parameters, gather_grid_dim(), gen_context_recurse, gen_length(), gen_true2(), get_current_module_entity(), module, module_name_to_entity(), module_statement, NIL, NL, pips_assert, pips_debug, reset_current_module_entity(), reset_current_module_statement(), safe_fclose(), safe_fopen(), same_string_p, set_current_module_entity(), set_current_module_statement(), statement_consistent_p(), statement_domain, strdup(), type_functional, type_functional_p, xml_print, xml_print_parameter(), and xml_set_output().
Set the current module entity required to have many things working in PIPS:
mod_name | od_name |
Definition at line 77 of file one_thread_kernel.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, enclose_in_a_parallel_loop(), module_name_to_entity(), module_reorder(), module_statement, pips_assert, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_consistent_p().
void xml_print_entity_full | ( | entity | e | ) |
Definition at line 132 of file xml_output.c.
References entity_name, entity_type, xml_output(), and xml_print_type().