PIPS
|
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "boolean.h"
#include <stdbool.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "database.h"
#include "misc.h"
#include "text.h"
#include "text-util.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "accel-util.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "pipsdbm.h"
#include "resources.h"
#include "control.h"
#include "conversion.h"
#include "properties.h"
#include "semantics.h"
#include "transformations.h"
#include "effects-convex.h"
#include "complexity_ri.h"
#include "dg.h"
#include "graph.h"
#include "ricedg.h"
#include "chains.h"
#include "task_parallelization.h"
Go to the source code of this file.
Data Structures | |
struct | cpv |
Macros | |
#define | dot_print_label_string(ftg, str) |
print the string str in file descriptor fd, removing all More... | |
Typedefs | |
typedef dg_arc_label | arc_label |
Instantiation of the dependence graph: More... | |
typedef dg_vertex_label | vertex_label |
Variables | |
static transformer | p_transformer |
static graph | sdg |
int | NBCLUSTERS |
parameters of BDSC, to be recovered using pips properties More... | |
int | MEMORY_SIZE |
string | INSTRUMENTED_FILE |
gen_array_t | annotations |
Global variables. More... | |
gen_array_t | clusters |
static int | count = 0 |
#define dot_print_label_string | ( | ftg, | |
str | |||
) |
print the string str in file descriptor fd, removing all
typedef dg_arc_label arc_label |
typedef dg_vertex_label vertex_label |
Definition at line 88 of file SDG.c.
References cpv::e, gen_recurse_stop(), get_referenced_entities(), cpv::rm, set_belong_p(), and set_free().
Referenced by private_variables().
Definition at line 98 of file SDG.c.
References cpv::e, has_entity_with_same_name(), and loop_locals.
Referenced by private_variables().
Second step to form a clustered DG (SDG), delete dependences between statement s1 and another statement S2 if s1 is not in a sequence and redondont dependences.
Definition at line 421 of file SDG.c.
References CONS, count, FOREACH, gen_free_list(), gen_occurences(), graph_vertices, NIL, STATEMENT, statement_in_sequence_p(), statement_ordering, SUCCESSOR, successor_vertex, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by partitioning_sdg().
Definition at line 141 of file SDG.c.
References CAR, CONS, forloop_body, instruction_block, instruction_tag, instruction_test, is_instruction_block, is_instruction_call, is_instruction_forloop, is_instruction_loop, is_instruction_test, is_instruction_whileloop, loop_body, MAPL, STATEMENT, statement_forloop(), statement_instruction, statement_loop(), statement_whileloop(), test_false, test_true, and whileloop_body.
Referenced by sequence_dg().
|
static |
Definition at line 73 of file SDG.c.
References gen_context_recurse, gen_true2(), get_private_entities_walker(), loop_domain, set_make(), and set_pointer.
Referenced by private_variables().
Definition at line 67 of file SDG.c.
References loop_locals, and set_append_list().
Referenced by get_private_entities().
Definition at line 246 of file SDG.c.
References FOREACH, same_level_p(), sequence_statements, STATEMENT, and statement_undefined.
Referenced by sequence_dg().
module_stmt | odule_stmt |
Definition at line 455 of file SDG.c.
References clean_sdg(), gen_null(), gen_recurse, sdg, sequence_dg(), and statement_domain.
Referenced by sequence_dependence_graph().
Definition at line 481 of file SDG.c.
References concatenate(), entity_undefined, free_text(), statement_comments, strdup(), string_undefined, Text_Statement(), and text_to_string().
Referenced by print_sdg_task().
|
static |
return a dot graph for SDG, print only nodes that have at least one successor
Definition at line 500 of file SDG.c.
References annotations, annotation::cluster, concatenate(), dot_print_label_string, fprintf(), gen_array_item(), gen_array_nitems(), i2a(), annotation::order_sched, prettyprint_dot_label(), statement_ordering, strdup(), and annotation::task_time.
Referenced by print_SDGs().
void print_SDGs | ( | statement | stmt, |
graph | tg, | ||
FILE * | ftg, | ||
gen_array_t | annotations | ||
) |
stmt | tmt |
tg | g |
ftg | tg |
annotations | nnotations |
Definition at line 520 of file SDG.c.
References annotations, annotation::cluster, count, annotation::edge_cost, FOREACH, forloop_body, fprintf(), gen_array_item(), gen_array_nitems(), graph_vertices, instruction_tag, instruction_test, intptr_t, is_instruction_block, is_instruction_forloop, is_instruction_loop, is_instruction_test, is_instruction_whileloop, loop_body, print_sdg_task(), sequence_statements, STATEMENT, statement_equal_p(), statement_forloop(), statement_instruction, statement_loop(), statement_ordering, statement_sequence(), statement_whileloop(), SUCCESSOR, successor_vertex, test_false, test_true, VERTEX, vertex_successors, vertex_to_statement(), and whileloop_body.
Referenced by hbdsc_parallelization(), and sequence_dependence_graph().
Definition at line 104 of file SDG.c.
References call_domain, check_private_variables_call_walker(), check_private_variables_loop_walker(), CONS, cpv::e, ENTITY, gen_context_multi_recurse(), gen_null(), gen_true(), get_private_entities(), loop_domain, NIL, cpv::rm, SET_FOREACH, and set_free().
Referenced by test_dependence_using_regions().
Definition at line 199 of file SDG.c.
References CAR, forloop_body, instruction_block, instruction_tag, instruction_test, is_instruction_block, is_instruction_forloop, is_instruction_loop, is_instruction_test, is_instruction_whileloop, loop_body, MAPL, s1, STATEMENT, statement_equal_p(), statement_forloop(), statement_instruction, statement_loop(), statement_whileloop(), test_false, test_true, and whileloop_body.
Referenced by in_same_sequence().
bool sequence_dependence_graph | ( | char * | module_name | ) |
The proper effect to detect the I/O operations:
dg contains the original dependences before clustering and scheduling, it is saved to not make a side effect on the original dg when constructing the SDG
module_name | odule_name |
Definition at line 593 of file SDG.c.
References concatenate(), copy_graph(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, ddg, fprintf(), free(), free_value_mappings(), gen_array_make(), generic_effects_reset_all_methods(), get_current_module_entity(), init_convex_rw_prettyprint(), module_name(), module_name_to_entity(), module_to_value_mappings(), partitioning_sdg(), print_SDGs(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_in_effects(), reset_ordering_to_statement(), reset_out_effects(), reset_precondition_map(), reset_proper_rw_effects(), reset_rw_effects(), reset_transformer_map(), safe_fclose(), safe_fopen(), sdg, set_cumulated_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_precondition_map(), set_proper_rw_effects(), set_rw_effects(), set_transformer_map(), and strdup().
pdate the sdg for st(parent) using enclosing_stmt instead of the enclosed one child
Definition at line 321 of file SDG.c.
References CONS, enclosed_statements_ast(), FOREACH, gen_occurences(), in_same_sequence(), NIL, p_transformer, path_initialize(), sdg, sequence_statements, STATEMENT, statement_equal_p(), statement_ordering, statement_sequence(), statement_sequence_p(), statement_to_vertex(), statement_undefined, statement_undefined_p, SUCCESSOR, successor_vertex, test_dependence_using_regions(), transformer_identity(), vertex_successors, and vertex_to_statement().
Referenced by partitioning_sdg().
s1 | 1 |
s2 | 2 |
Definition at line 123 of file SDG.c.
References s1, statement_number, and statement_ordering.
Referenced by print_SDGs(), same_level_p(), sequence_dg(), statement_in_sequence_p(), and statement_to_vertex().
Definition at line 366 of file SDG.c.
References CAR, forloop_body, instruction_block, instruction_tag, instruction_test, is_instruction_block, is_instruction_forloop, is_instruction_loop, is_instruction_test, is_instruction_whileloop, loop_body, MAPL, STATEMENT, statement_equal_p(), statement_forloop(), statement_instruction, statement_loop(), statement_whileloop(), test_false, test_true, and whileloop_body.
Referenced by clean_sdg().
Definition at line 131 of file SDG.c.
References graph_vertices, MAP, statement_equal_p(), VERTEX, vertex_to_statement(), and vertex_undefined.
Referenced by sequence_dg().
for precision in dependences in arrays, we use array regions in this function
Definition at line 263 of file SDG.c.
References convex_regions_transformer_compose(), cpv::e, ENTITY, FOREACH, gen_length(), gen_nconc(), gen_remove(), load_statement_local_regions(), loop_locals, NIL, p_transformer, private_variables(), r_w_combinable_p(), REGION, region_entity, regions_dup(), regions_read_regions(), regions_write_regions(), RegionsIntersection(), s1, same_entity_p(), statement_loop(), statement_loop_p(), w_r_combinable_p(), and w_w_combinable_p().
Referenced by sequence_dg().
gen_array_t annotations |
Global variables.
Definition at line 62 of file SDG.c.
Referenced by allocate_task_to_cluster(), BDSC(), bottom_level(), cancel_schedule(), DSC(), dsc_code_parallelization(), DSRW(), end_idle_clusters(), hbdsc_parallelization(), hierarchical_schedule(), hierarchical_schedule_step(), initialization(), MCW(), move_task_to_cluster(), parse_instrumented_file(), print_sdg_task(), print_SDGs(), priorities(), ready_node(), schedule_failsafe(), select_task_with_highest_priority(), t_level(), tlevel_decrease(), top_level(), update_parallel_task(), update_priority_values(), and zeroing_multiple_edges().
gen_array_t clusters |
Definition at line 63 of file SDG.c.
Referenced by allocate_task_to_cluster(), critical_path_length(), DSC(), dsc_code_parallelization(), end_idle_clusters(), hbdsc_parallelization(), initialization_clusters(), max_start_time_cluster(), MCW(), min_start_time_cluster(), move_task_to_cluster(), tlevel_decrease(), and zeroing_multiple_edges().
|
static |
Definition at line 519 of file SDG.c.
Referenced by adg_enrichir(), adg_number_of_same_loops(), adg_vertex_to_ordering(), build_convex_constraints_from_vertices(), build_second_comb(), character_occurences_in_string(), clean_sdg(), clear_C_comment(), concatenate(), count_dataflows_on_ref(), create_farkas_poly(), create_var_name(), cycle_to_flow_sensitive_preconditions(), dag_computation_count(), dag_or_cycle_to_flow_sensitive_postconditions_or_transformers(), dag_to_flow_sensitive_preconditions(), dagvtx_dot(), db_unput_resources(), delete_named_resources(), do_loop_unroll_with_epilogue(), entity_all_module_xxx_locations_typed(), entity_all_xxx_locations_typed(), find_kth_points_to_node_in_points_to_path(), FixCInternalLabels(), fprint_functional(), fprint_pla_pp_dims(), general_build_signature(), generate_mmcd_stat_from_ref(), generate_mmcd_stats_from_ref(), get_optimal_opcode(), get_time_ent(), include_trans_in_poly(), lf_count(), make_lInitStats(), make_proto(), mapping_to_domain_list(), mapping_to_value_number(), my_clean_ps(), new_array_elements_backward_substitution_in_transformer(), new_array_elements_forward_substitution_in_transformer(), points_to_subscripts_to_number_of_unbounded_dimensions(), print_make_cache(), print_SDGs(), PRINTF_FETCHARGS(), put_source_ind(), raw_flint_message(), ref_count_rwt(), reference_ith_index(), replace_ref_by_ent(), reset_C_comment(), safe_fread(), safe_fwrite(), sc_fprint(), search_scc_bdt(), simplify_minmax_contrainte(), SimplifyGraph(), stco_renumber_code(), SupressDependances(), switch_cast_to_copy(), tpips_help(), transformer_with_temporary_values_p(), typing_assign_substring(), typing_buffer_inout(), typing_implied_do(), typing_substring(), VASNPRINTF(), and words_any_reference().
string INSTRUMENTED_FILE |
Definition at line 59 of file SDG.c.
Referenced by dsc_code_parallelization(), and hbdsc_parallelization().
int MEMORY_SIZE |
Definition at line 58 of file SDG.c.
Referenced by dsc_code_parallelization(), find_cluster(), hbdsc_parallelization(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), tlevel_decrease(), and zeroing_multiple_edges().
int NBCLUSTERS |
parameters of BDSC, to be recovered using pips properties
cproto-generated files
Definition at line 57 of file SDG.c.
Referenced by cluster_stage_spire(), dsc_code_parallelization(), gen_recv_communications(), gen_send_communications(), hbdsc_parallelization(), hierarchical_schedule(), initialization_clusters(), rebuild_topological_sort(), spire_distributed_unstructured_to_structured(), and spire_shared_unstructured_to_structured().
|
static |
Definition at line 53 of file SDG.c.
Referenced by sequence_dg(), and test_dependence_using_regions().
|
static |
Definition at line 54 of file SDG.c.
Referenced by partitioning_sdg(), sequence_dependence_graph(), and sequence_dg().