PIPS
|
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "boolean.h"
#include <stdbool.h>
#include <limits.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 "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 "complexity.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.
Macros | |
#define | MAX_ITER 1 |
Typedefs | |
typedef dg_arc_label | arc_label |
Instantiation of the dependence graph: More... | |
typedef dg_vertex_label | vertex_label |
Functions | |
static gen_array_t | schedule_failsafe () |
static void | cancel_schedule (gen_array_t annotations_s, list stmts) |
static void | cancel_schedule_stmt (gen_array_t annotations_s, statement st) |
static double | critical_path_length (int nbclusters) |
static void | initialization_clusters (bool first_p) |
eset to zero for each new sequence to handle More... | |
static list | rebuild_topological_sort (list stages) |
list | topological_sort (statement stmt) |
static double | transfer_cost (statement s, int nbclusters) |
static void | hierarchical_schedule_step (statement stmt, int P, int M, bool dsc_p) |
int | hierarchical_schedule (statement stmt, int k, int P, int M, bool dsc_p) |
bool | hbdsc_parallelization (char *module_name) |
he main function for performing the hierarchical scheduling (scheduled SDG) using BDSC and generating the graph (unstructured) BDSC-based top-down hierarchical scheduling More... | |
bool | dsc_code_parallelization (char *module_name) |
he main function for performing the hierarchical scheduling (scheduled SDG) using DSC and generating SPIRE More... | |
Variables | |
graph | kdg |
Global variables. More... | |
graph | ddg |
statement | return_st = statement_undefined |
persistant_statement_to_cluster | stmt_to_cluster |
typedef dg_arc_label arc_label |
typedef dg_vertex_label vertex_label |
|
static |
Definition at line 79 of file HBDSC.c.
References annotations, bound_persistant_statement_to_cluster_p(), annotation::cluster, annotation::edge_cost, FOREACH, gen_array_addto(), gen_array_item(), annotation::scheduled, STATEMENT, statement_ordering, stmt_to_cluster, and update_persistant_statement_to_cluster().
Referenced by cancel_schedule_stmt(), and hierarchical_schedule().
|
static |
Definition at line 93 of file HBDSC.c.
References cancel_schedule(), instruction_tag, is_instruction_block, is_instruction_loop, loop_body, sequence_statements, statement_instruction, statement_loop(), and statement_sequence().
Referenced by hierarchical_schedule_step().
|
static |
Definition at line 108 of file HBDSC.c.
References clusters, gen_array_item(), max, and cluster::time.
Referenced by hierarchical_schedule().
bool dsc_code_parallelization | ( | char * | module_name | ) |
he main function for performing the hierarchical scheduling (scheduled SDG) using DSC and generating SPIRE
The proper effect to detect the I/O operations:
omplexities (task processing time)
roperties to set the parameters of BDSC
ost model generation
SC-based top-down hierarchical scheduling
Reorder the module, because new statements have been generated.
module_name | odule_name |
Definition at line 473 of file HBDSC.c.
References annotations, clusters, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, free_value_mappings(), gen_array_free(), gen_array_make(), generic_effects_reset_all_methods(), get_bool_property(), get_current_module_entity(), get_string_property(), hierarchical_schedule(), init_convex_rw_prettyprint(), initialization(), INSTRUMENTED_FILE, kdg, make_persistant_statement_to_cluster(), MEMORY_SIZE, module_name(), module_name_to_entity(), module_reorder(), module_to_value_mappings(), NBCLUSTERS, parse_instrumented_file(), reset_complexity_map(), 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(), set_bool_property(), set_complexity_map(), 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(), stmt_to_cluster, and strdup().
bool hbdsc_parallelization | ( | char * | module_name | ) |
he main function for performing the hierarchical scheduling (scheduled SDG) using BDSC and generating the graph (unstructured) BDSC-based top-down hierarchical scheduling
The proper effect to detect the I/O operations:
omplexities (task processing time)
roperties to set the parameters of BDSC
ost model generation
module_name | odule_name |
Definition at line 396 of file HBDSC.c.
References annotations, clusters, concatenate(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, fprintf(), free(), free_value_mappings(), gen_array_full_free(), gen_array_make(), gen_consistent_p(), generic_effects_reset_all_methods(), get_bool_property(), get_current_module_entity(), get_int_property(), get_string_property(), hierarchical_schedule(), init_convex_rw_prettyprint(), initialization(), initialization_clusters(), INSTRUMENTED_FILE, kdg, make_persistant_statement_to_cluster(), MEMORY_SIZE, module_name(), module_name_to_entity(), module_to_value_mappings(), NBCLUSTERS, parse_instrumented_file(), print_SDGs(), reset_complexity_map(), 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(), set_bool_property(), set_complexity_map(), 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(), stmt_to_cluster, and strdup().
Definition at line 311 of file HBDSC.c.
References allocate_task_to_cluster(), annotations, BDSC(), cancel_schedule(), costly_task(), critical_path_length(), annotation::data, DSC(), exit, EXIT_FAILURE, forloop_body, fprintf(), gen_array_free(), gen_array_item(), gen_length(), get_bool_property(), hierarchical_schedule_step(), instruction_tag, instruction_test, is_instruction_block, is_instruction_forloop, is_instruction_loop, is_instruction_test, loop_body, MAX_ITER, NBCLUSTERS, annotation::nbclusters, NIL, schedule_failsafe(), sequence_statements, statement_forloop(), statement_instruction, statement_loop(), statement_ordering, statement_sequence(), annotation::task_time, test_false, and test_true.
Referenced by dsc_code_parallelization(), hbdsc_parallelization(), and hierarchical_schedule_step().
Definition at line 274 of file HBDSC.c.
References annotations, cancel_schedule_stmt(), annotation::cluster, costly_task(), FOREACH, gen_array_free(), gen_array_item(), gen_length(), get_bool_property(), hierarchical_schedule(), LIST, annotation::nbclusters, pips_user_warning, schedule_failsafe(), statement_ordering, task_time(), annotation::task_time, topological_sort(), and transfer_cost().
Referenced by hierarchical_schedule().
|
static |
eset to zero for each new sequence to handle
Definition at line 122 of file HBDSC.c.
References clusters, cluster::data, gen_array_addto(), gen_array_item(), malloc(), NBCLUSTERS, NIL, and cluster::time.
Referenced by hbdsc_parallelization().
we suppose that we have only one return statement at the end of the module :(
Definition at line 146 of file HBDSC.c.
References apply_persistant_statement_to_cluster(), bound_persistant_statement_to_cluster_p(), CONS, declaration_statement_p(), FOREACH, gen_nreverse(), LIST, NBCLUSTERS, NIL, return_st, return_statement_p(), STATEMENT, statement_ordering, and stmt_to_cluster.
Referenced by topological_sort().
|
static |
Definition at line 59 of file HBDSC.c.
References annotations, annotation::cluster, annotation::edge_cost, FOREACH, gen_array_addto(), gen_array_item(), gen_array_make(), gen_length(), graph_vertices, kdg, malloc(), annotation::scheduled, statement_ordering, SUCCESSOR, successor_vertex, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by hierarchical_schedule(), and hierarchical_schedule_step().
stmt | tmt |
Definition at line 192 of file HBDSC.c.
References CAR, CONS, FOREACH, gen_array_addto(), gen_array_free(), gen_array_item(), gen_array_make(), gen_copy_seq(), gen_last(), gen_length(), gen_occurences(), gen_remove_once(), graph_vertices, kdg, LIST, NIL, rebuild_topological_sort(), sequence_statements, STATEMENT, statement_equal_p(), statement_ordering, statement_sequence(), SUCCESSOR, successor_vertex, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by cluster_stage_spire_generation(), and hierarchical_schedule_step().
Definition at line 264 of file HBDSC.c.
References get_bool_property(), load_statement_in_regions(), load_statement_out_regions(), regions_dup(), and size_of_regions().
Referenced by hierarchical_schedule_step().
graph ddg |
Definition at line 52 of file HBDSC.c.
Referenced by sequence_dependence_graph().
graph kdg |
Global variables.
Definition at line 52 of file HBDSC.c.
Referenced by allocate_task_to_cluster(), BDSC(), bdsc_code_instrumentation(), DSC(), dsc_code_parallelization(), end_idle_clusters(), hbdsc_parallelization(), MCW(), move_task_to_cluster(), ready_node(), schedule_failsafe(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), tlevel_decrease(), topological_sort(), update_priority_values(), and zeroing_multiple_edges().
statement return_st = statement_undefined |
Definition at line 53 of file HBDSC.c.
Referenced by gen_omp_parallel(), mpi_finalize(), mpi_initialize(), openmp_task_generation(), rebuild_topological_sort(), spire_distributed_unstructured_to_structured(), and spire_shared_unstructured_to_structured().
persistant_statement_to_cluster stmt_to_cluster |
Definition at line 56 of file HBDSC.c.
Referenced by allocate_task_to_cluster(), cancel_schedule(), cluster_stage_spire(), cluster_stage_spire_generation(), dsc_code_parallelization(), hbdsc_parallelization(), move_task_to_cluster(), rebuild_topological_sort(), spire_distributed_unstructured_to_structured(), and spire_shared_unstructured_to_structured().