PIPS
|
#include "defines-local.h"
#include "workspace-util.h"
#include "prettyprint.h"
#include "preprocessor.h"
#include "transformer.h"
#include "semantics.h"
#include "dg.h"
#include "graph.h"
#include "ricedg.h"
#include "bootstrap.h"
#include "STEP_RT_intrinsic.h"
#include "STEP_RT_bootstrap.h"
Go to the source code of this file.
Typedefs | |
typedef dg_arc_label | arc_label |
typedef dg_vertex_label | vertex_label |
Variables | |
static hash_table | step_statement_path = hash_table_undefined |
The step_analyse phase computes three main resources: More... | |
typedef dg_arc_label arc_label |
typedef dg_vertex_label vertex_label |
Definition at line 479 of file analyse.c.
References anywhere_effect_p(), FOREACH, and REGION.
Referenced by compute_directive_regions(), compute_recv_regions(), and compute_send_regions().
|
static |
TODO ajouter un test si tout est vide.
Store SEND/RECV directive statement regions
Initialization of step_effect_path for each send/recv regions
Initialization of step_interlaced and step_partial for each send region
Definition at line 888 of file analyse.c.
References anymodule_anywhere_region_p(), assert, compute_recv_regions(), compute_send_regions(), ENDP, get_current_module_entity(), ifdebug, load_in_effects_list(), load_out_effects_list(), load_rw_effects_list(), module, pips_assert, pips_debug, regions_write_regions(), statement_undefined_p, step_compute_step_interlaced(), step_directive_basic_workchunk(), step_directive_block, step_directive_print(), step_init_effect_path(), step_initialize_step_partial(), step_print_directives_regions(), step_recv_regions_list_store(), and step_send_regions_list_store().
Referenced by compute_SENDRECV_regions().
ANYMODULE ANYWHERE recv regions should cause FULL communications thus ANYMODULE ANYWHERE recv regions are removed from recv regions.
Definition at line 555 of file analyse.c.
References anymodule_anywhere_region_p(), CONS, create_step_regions(), debug_print_effects_list(), FOREACH, gen_full_free_list(), ifdebug, is_action_read, NIL, pips_debug, r_w_combinable_p(), REGION, region_dup(), region_may_p, regions_dup(), and RegionsMustUnion().
Referenced by compute_directive_regions().
ANYMODULE ANYWHERE send regions are a big problem! FIXME.
Definition at line 495 of file analyse.c.
References anymodule_anywhere_region_p(), create_step_regions(), debug_print_effects_list(), FOREACH, free_approximation(), gen_full_free_list(), ifdebug, is_action_write, make_approximation_exact(), NIL, pips_debug, pips_user_warning, REGION, region_approximation, regions_dup(), RegionsIntersection(), STEP_DEBUG_STATEMENT, and w_w_combinable_p().
Referenced by compute_directive_regions().
default: SEND/RECV regions are summarized at the body level of the current module. This will be modified later using the DG
When module call, compute translated SEND and RECV regions
Note: all entities present in the field call_function are not a module ie it could also be a numerical constant, an intrinsics...
default: SEND/RECV regions are summarized at the body level of the current module. This will be modified later using the DG
Definition at line 1078 of file analyse.c.
References assert, call_function, compute_directive_regions(), entity_module_p(), pips_debug, statement_call(), statement_call_p(), statement_undefined_p, STEP_DEBUG_STATEMENT, step_directive_block, step_directives_bound_p(), step_directives_load(), step_summarize_and_map_step_regions(), and step_translate_and_map_step_regions().
Referenced by step_compute_SENDRECV_regions().
Definition at line 1119 of file analyse.c.
References effect_comparable_p(), FOREACH, pips_debug, REGION, text_region(), and text_to_string().
Referenced by step_compute_CHAINS_DG_remove_summary_regions().
|
static |
remove omp private from send and recv regions
Remove precondition contrainte
Definition at line 406 of file analyse.c.
References action_tag, compare_effect_reference(), CONS, entity_name, entity_scalar_p(), extract_nredund_subsystem(), FILE_star_effect_reference_p(), FOREACH, free_action(), gen_sort_list(), io_effect_p(), is_action_read, is_action_write, load_statement_precondition(), make_action_read_memory(), make_action_write_memory(), NIL, pips_assert, pips_debug, predicate_system, rectangularization_region(), region, REGION, region_action, region_any_reference, region_dup(), region_entity, region_system, std_file_effect_p(), step_private_p(), and transformer_relation.
Referenced by compute_recv_regions(), and compute_send_regions().
txt | xt |
Definition at line 334 of file analyse.c.
References CONS, EFFECT, ENDP, FOREACH, free(), get_bool_property(), NIL, pips_debug, set_bool_property(), text_rw_array_regions(), and text_to_string().
Referenced by compute_recv_regions(), compute_send_regions(), step_analyse_CHAINS_DG(), step_print_directives_regions(), step_print_effect_path(), step_translate_and_map_step_regions(), step_update_comm(), and step_update_SUMMARY_SENDRECV_regions().
Definition at line 289 of file analyse.c.
References assert, CAR, ENDP, pips_debug, step_get_effect_path(), STEP_POINT, and step_point_data.
Referenced by step_set_step_partial().
Definition at line 622 of file analyse.c.
References add_intermediate_value(), Ssysteme::base, BASE_NULLE, contrainte_make(), ENDP, ENTITY, entity_name, entity_to_intermediate_value(), FOREACH, NO_OFL_CTRL, pips_debug, region_entity, region_system, sc_add_inegalite(), sc_append(), sc_copy(), sc_creer_base(), sc_integer_feasibility_ofl_ctrl(), sc_rm(), sc_variable_rename(), TCST, VALUE_MONE, VALUE_ONE, vect_make(), and VECTEUR_NUL.
Referenced by step_compute_step_interlaced().
void load_step_comm | ( | void | ) |
Definition at line 190 of file analyse.c.
References db_get_memory_resource(), step_comm_interlaced, step_comm_partial, and step_comm_path.
Referenced by step_analyse(), and step_compile_analysed_module().
Definition at line 395 of file analyse.c.
References base_rm, expressions_to_entities(), gen_free_list(), list_to_base(), reference_indices, region_any_reference, region_system, and sc_rectangular_hull().
Referenced by create_step_regions(), and loop_basic_workchunk_to_workchunk().
void reset_step_comm | ( | void | ) |
Definition at line 199 of file analyse.c.
Referenced by step_compile_analysed_module().
|
static |
Definition at line 227 of file analyse.c.
References make_step_point(), module, and pips_debug.
Referenced by step_init_effect_path(), step_translate_and_map(), and summarize_and_map_step_regions().
bool step_analyse | ( | const char * | module_name | ) |
remove_from_summary_send et remove_from_summary_recv contain only directive regions and translated regions. They do not contain summary regions.
module_name | odule_name |
Definition at line 1429 of file analyse.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, generic_effects_reset_all_methods(), init_convex_rw_regions(), load_step_comm(), local_name_to_top_level_entity(), module, module_name(), pips_debug, reset_convex_rw_regions(), reset_current_module_entity(), reset_current_module_statement(), reset_in_effects(), reset_ordering_to_statement(), reset_out_effects(), reset_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_in_effects(), set_methods_for_convex_effects(), set_ordering_to_statement(), set_out_effects(), set_rw_effects(), step_analyse_CHAINS_DG(), step_compute_SENDRECV_regions(), step_directives_init(), step_directives_reset(), step_statement_path_finalize(), step_statement_path_init(), step_update_comm(), step_update_SUMMARY_SENDRECV_regions(), and store_step_comm().
|
static |
for graph data structure, see newgen/graph.pdf
CHAINS is computed by the REGION_CHAINS phase.
Definition at line 1248 of file analyse.c.
References db_get_memory_resource(), debug_print_effects_list(), FOREACH, graph_vertices, ifdebug, module_name(), NIL, pips_debug, s1, safe_statement_identification(), set_make(), set_pointer, step_compute_CHAINS_DG_remove_summary_regions(), step_compute_CHAINS_DG_SENDRECV_regions(), STEP_DEBUG_STATEMENT, SUCCESSOR, successor_vertex, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by step_analyse().
init intrinsics
other intrinsics
module_name | odule_name |
Definition at line 361 of file analyse.c.
References DB_PUT_MEMORY_RESOURCE, free(), make_map_effect_bool(), make_map_effect_step_point(), make_step_comm(), module_name(), IntrinsicDescriptor::name, pips_debug, pips_srcpath_append(), register_intrinsic_handler(), register_intrinsic_type_descriptor(), STEP_DEFAULT_RT_H, and strdup().
bool step_analysed_module_p | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 179 of file analyse.c.
References db_resource_required_or_available_p(), and module_name().
Referenced by step_compile(), and step_compile_generated_module().
|
static |
a arc label in this CHAINS DG graph is a list of conflicts, see dg.pdf
WRITE-READ dependence
Definition at line 1149 of file analyse.c.
References concerned_entity_p(), CONFLICT, conflict_sink, conflict_source, dg_arc_label_conflicts, effect_read_p, effect_to_string(), effect_write_p, FOREACH, pips_debug, step_get_comparable_effects(), successor_arc_label, text_region(), and text_to_string().
Referenced by step_analyse_CHAINS_DG().
|
static |
compute first directive statement on suffix_sp1 and suffix_sp2
Get directive region
no directive on path thus if regions corresponding to s1 exist, they are translated regions
Get directive region
no directive on path thus if regions corresponding to s1 exist, they are translated regions
Definition at line 1205 of file analyse.c.
References gen_chunk_identity(), gen_find_if(), pips_debug, s1, statement_undefined_p, STEP_DEBUG_STATEMENT, step_directives_bound_p(), step_recv_regions_list_load(), step_send_regions_list_load(), and step_statement_path_factorise().
Referenced by step_analyse_CHAINS_DG().
Initialization of summary regions
Definition at line 1413 of file analyse.c.
References compute_SENDRECV_regions(), entity_name, gen_context_recurse, gen_null2(), module, NIL, pips_debug, statement_domain, step_recv_regions_list_store(), and step_send_regions_list_store().
Referenced by step_analyse().
|
static |
Definition at line 875 of file analyse.c.
References FOREACH, interlaced_basic_workchunk_regions_p(), REGION, and step_directive_basic_workchunk_index().
Referenced by compute_directive_regions().
Definition at line 1135 of file analyse.c.
References EFFECT, effect_comparable_p(), effect_entity(), entity_name, FOREACH, pips_debug, and set_add_element().
Referenced by step_compute_CHAINS_DG_remove_summary_regions().
Definition at line 262 of file analyse.c.
References CONS, ifdebug, NIL, pips_debug, STEP_POINT, step_point_data, and step_print_effect_path().
Referenced by get_directive_statement_region().
Add an initial point into the path, key effect is equal to data field (effect) used as stop condition in step_get_path()
Definition at line 464 of file analyse.c.
References FOREACH, module, pips_debug, REGION, and step_add_point_into_effect_path().
Referenced by compute_directive_regions().
|
static |
All SENDs are initialized as PARTIAL
Definition at line 865 of file analyse.c.
References FOREACH, REGION, and step_set_communication_type_partial().
Referenced by compute_directive_regions().
Definition at line 167 of file analyse.c.
References assert.
Referenced by region_interlaced_p().
Definition at line 173 of file analyse.c.
References assert.
Referenced by comm_partial_p().
|
static |
Definition at line 757 of file analyse.c.
References assert, CONS, debug_print_effects_list(), EFFECT, ENDP, FOREACH, free(), gen_free_list(), get_bool_property(), ifdebug, load_in_effects_list(), load_out_effects_list(), load_rw_effects_list(), NIL, pips_assert, pips_debug, REGION, set_bool_property(), statement_undefined_p, step_directive_basic_workchunk(), text_rw_array_regions(), and text_to_string().
Referenced by compute_directive_regions().
|
static |
Definition at line 236 of file analyse.c.
References CONS, debug_print_effects_list(), EFFECT, entity_name, FOREACH, free(), level, NIL, pips_debug, safe_statement_identification(), STEP_POINT, step_point_data, step_point_module, and step_point_stmt.
Referenced by step_get_effect_path().
Definition at line 744 of file analyse.c.
References effects_effects, gen_nconc(), pips_assert, and pips_debug.
Referenced by step_summarize_and_map_step_regions().
Definition at line 710 of file analyse.c.
References effects_consistent_p(), effects_effects, ifdebug, NIL, pips_assert, and pips_debug.
Referenced by step_compute_CHAINS_DG_SENDRECV_regions(), step_summarize_and_map_step_regions(), and step_update_SUMMARY_SENDRECV_regions().
Definition at line 723 of file analyse.c.
References effects_consistent_p(), ifdebug, make_effects(), pips_assert, and pips_debug.
Referenced by compute_directive_regions(), step_compute_SENDRECV_regions(), and step_translate_and_map_step_regions().
Definition at line 732 of file analyse.c.
References effects_effects, and pips_debug.
Referenced by step_update_SUMMARY_SENDRECV_regions().
Definition at line 698 of file analyse.c.
References effects_effects, gen_nconc(), pips_assert, and pips_debug.
Referenced by step_summarize_and_map_step_regions().
Definition at line 665 of file analyse.c.
References effects_consistent_p(), effects_effects, ifdebug, NIL, pips_assert, and pips_debug.
Referenced by step_compute_CHAINS_DG_SENDRECV_regions(), step_summarize_and_map_step_regions(), and step_update_SUMMARY_SENDRECV_regions().
Definition at line 677 of file analyse.c.
References effects_consistent_p(), ifdebug, make_effects(), pips_assert, and pips_debug.
Referenced by compute_directive_regions(), step_compute_SENDRECV_regions(), and step_translate_and_map_step_regions().
Definition at line 686 of file analyse.c.
References effects_effects, and pips_debug.
Referenced by step_update_SUMMARY_SENDRECV_regions().
|
static |
Definition at line 325 of file analyse.c.
References step_set_step_partial().
Referenced by step_update_comm().
|
static |
Definition at line 329 of file analyse.c.
References step_set_step_partial().
Referenced by step_initialize_step_partial(), and step_update_comm().
Retrieve the corresponding original DIRECTIVE region from any king of region: SUMMARY, TRANSLATED or DIRECTIVE region
Definition at line 309 of file analyse.c.
References get_directive_statement_region(), and pips_debug.
Referenced by step_set_communication_type_full(), and step_set_communication_type_partial().
Definition at line 57 of file analyse.c.
References CONS, gen_copy_seq(), gen_nreverse(), hash_put(), STATEMENT, and step_statement_path.
Referenced by step_statement_path_init().
|
static |
Definition at line 141 of file analyse.c.
References CAR, CONS, ENDP, NIL, pips_debug, POP, s1, STATEMENT, and step_statement_path_get().
Referenced by step_compute_CHAINS_DG_SENDRECV_regions().
|
static |
Definition at line 80 of file analyse.c.
References assert, gen_free_list(), HASH_MAP, hash_table_free(), hash_table_undefined, hash_table_undefined_p, and step_statement_path.
Referenced by step_analyse().
Definition at line 98 of file analyse.c.
References gen_chunk_identity(), gen_find_if(), step_directives_bound_p(), and step_statement_path_get().
Referenced by step_summarize_and_map_step_regions().
Definition at line 93 of file analyse.c.
References hash_get(), and step_statement_path.
Referenced by step_statement_path_factorise(), and step_statement_path_first_directive_statement().
|
static |
Definition at line 71 of file analyse.c.
References assert, gen_context_recurse, HASH_DEFAULT_SIZE, hash_pointer, hash_table_make(), hash_table_undefined_p, NIL, statement_domain, step_statement_path, step_statement_path_build(), and step_statement_path_unbuild().
Referenced by step_analyse().
Definition at line 66 of file analyse.c.
References gen_remove_once().
Referenced by step_statement_path_init().
|
static |
search for the first stmt of type directive_stmt in the path from the body to stmt S
if the first_directive_stmt is different than stmt, it means that stmt is imbricated inside another directive.
In case of an imbricated statement, regions attached to stmt are not summarized at the module level.
Store SEND summary regions
Store RECV summary regions
Definition at line 822 of file analyse.c.
References entity_name, get_current_module_entity(), get_current_module_statement(), module, pips_assert, pips_debug, statement_undefined_p, step_recv_regions_list_add(), step_recv_regions_list_load(), step_send_regions_list_add(), step_send_regions_list_load(), step_statement_path_first_directive_statement(), and summarize_and_map_step_regions().
Referenced by compute_SENDRECV_regions().
for generic_effects_backward_translation()
for generic_effects_backward_translation() cf. summary_rw_effects_engine() dans Libs/effects-generic/rw_effects_engine.c
to avoid low level debug messages of generic_effects_backward_translation
create a new translated effect in list caller_l
map
one called effect should produce a unique translated effect
Definition at line 939 of file analyse.c.
References anywhere_effect_p(), call_arguments, call_function, CAR, CONS, debug_off, debug_on, EFFECT, effect_action_tag, effect_any_reference, entity_array_p(), FOREACH, free_effects_private_current_context_stack(), gen_free_list(), gen_length(), gen_nconc(), generic_effects_backward_translation(), get_current_module_entity(), load_statement_precondition(), make_effects_private_current_context_stack(), module, NIL, pips_assert, pips_debug, pips_user_warning, reference_variable, statement_call(), step_add_point_into_effect_path(), text_rw_array_regions(), and text_to_string().
Referenced by step_translate_and_map_step_regions().
SEND
Store SEND translated regions
RECV
Store RECV translated regions
Definition at line 1021 of file analyse.c.
References apply_statement_effects(), assert, call_function, db_get_memory_resource(), debug_print_effects_list(), effects_effects, ENDP, entity_module_p(), entity_user_name(), free(), ifdebug, pips_debug, safe_statement_identification(), statement_call(), statement_call_p(), step_recv_regions_list_store(), step_send_regions_list_store(), and step_translate_and_map().
Referenced by compute_SENDRECV_regions().
Definition at line 1383 of file analyse.c.
References CONS, debug_print_effects_list(), EFFECT, entity_main_module_p(), entity_user_name(), FOREACH, get_current_module_entity(), ifdebug, MAP_EFFECT_BOOL_MAP, NIL, pips_debug, print_statement(), step_point_data, step_point_module, step_point_stmt, step_set_communication_type_full(), and step_set_communication_type_partial().
Referenced by step_analyse().
|
static |
Regions corresponding to body are SYMMARY regions
Store SEND summary regions
Regions corresponding to body are SYMMARY regions
Store RECV summary regions
Definition at line 1340 of file analyse.c.
References debug_print_effects_list(), get_current_module_statement(), ifdebug, NIL, pips_debug, set_to_list(), step_recv_regions_list_load(), step_recv_regions_list_update(), step_send_regions_list_load(), step_send_regions_list_update(), and update_SUMMARY_SENDRECV_regions().
Referenced by step_analyse().
void store_step_comm | ( | void | ) |
Definition at line 206 of file analyse.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, step_comm_interlaced, step_comm_partial, and step_comm_path.
Referenced by step_analyse().
Definition at line 800 of file analyse.c.
References CONS, copy_effect(), EFFECT, FOREACH, module, NIL, pips_debug, and step_add_point_into_effect_path().
Referenced by step_summarize_and_map_step_regions().
|
static |
Definition at line 1296 of file analyse.c.
References assert, CONS, EFFECT, FOREACH, pips_debug, set_belong_p(), and step_point_data.
Referenced by step_update_SUMMARY_SENDRECV_regions().
|
static |
The step_analyse phase computes three main resources:
Store all different kind of regions:
Definition at line 55 of file analyse.c.
Referenced by step_statement_path_build(), step_statement_path_finalize(), step_statement_path_get(), and step_statement_path_init().