PIPS
|
#include "makefile.h"
Go to the source code of this file.
Typedefs | |
typedef bool(* | pipsmake_callback_handler_type) (void) |
Warning! Do not modify this file that is automatically generated! More... | |
Functions | |
void | pipsmake_error (const char *) |
symbols exported by lex / yacc More... | |
int | pipsmake_lex (void) |
int | pipsmake_parse (void) |
void | yyerror (const char *) |
work around cproto 4.7t issue More... | |
void | fprint_virtual_resources (FILE *, const char *, list) |
void | fprint_makefile (FILE *, makefile) |
makefile | parse_makefile (void) |
rule | find_rule_by_phase (const char *) |
this function returns the rule that defines builder pname More... | |
void | add_rule (rule) |
makefile | open_makefile (const char *) |
void | save_makefile (const char *) |
bool | close_makefile (const char *) |
int | yywrap (void) |
symbols form lexer.l More... | |
int | init_lex (void) |
void | yyerror_lex_part (const char *) |
void | set_current_phase_context (const char *, const char *) |
cproto-generated files More... | |
void | reset_current_phase_context (void) |
void | reset_make_cache (void) |
void | init_make_cache (void) |
bool | make_cache_p (void) |
Can the make cache be used? More... | |
void | reinit_make_cache_if_necessary (void) |
bool | make_cache_hit_p (void *) |
void | add_resource_to_make_cache (void *) |
void | remove_resource_from_make_cache (void *) |
void | print_make_cache (void) |
Debug function, to be tested... More... | |
bool | make_cache_consistent_p (void) |
Debug function: make sure that up-to-date resources do exist in the resource database. More... | |
void | reset_static_phase_variables (void) |
Static variables used by phases must be reset on error although pipsmake does not know which ones are used. More... | |
rule | find_rule_by_resource (const char *) |
This function returns the active rule to produce resource rname. More... | |
bool | rmake (const char *, const char *) |
recursive make resource. More... | |
int | delete_obsolete_resources (void) |
void | delete_some_resources (void) |
this is quite ugly, but I wanted to put the enumeration down to pipsdbm. More... | |
bool | check_resource_up_to_date (const char *, const char *) |
To be used in a rule. More... | |
void | delete_named_resources (const char *) |
Delete from up_to_date_resources make cache all the resources with a given resource name. More... | |
void | delete_all_resources (void) |
string | get_first_main_module (void) |
Should be able to handle Fortran applications, C applications and mixed Fortran/C applications. More... | |
void | do_resource_usage_check (const char *, rule) |
check the usage of resources More... | |
bool | safe_make (const char *, const char *) |
bool | safe_apply (const char *, const char *) |
bool | safe_concurrent_apply (const char *, gen_array_t) |
bool | safe_set_property (const char *, const char *) |
gen_array_t | get_callers (string) |
Get all the callers of the specified module. More... | |
gen_array_t | get_callees (string) |
Get all the callers of the specified module. More... | |
void | save_active_phases (void) |
activate.c More... | |
void | retrieve_active_phases (void) |
bool | active_phase_p (const char *) |
bool | saved_active_phase_p (const char *) |
Debugging function. More... | |
void | fprint_activated (FILE *) |
string | active_phase_for_resource (string) |
return the phase which would be used to build a given resource. More... | |
const char * | activate_phase (const char *) |
const char * | activate (const char *) |
bool | activate_phases (void) |
Use property ACTIVE_PHASES to active the phases required by the user. More... | |
void | activate_language (language) |
Choose the right combination of activate and setproperty for a given language. More... | |
bool | rule_use_resource_produced (rule) |
Test if a rule uses a resource it produces. More... | |
string | build_pgm_makefile (const char *) |
openclose.c More... | |
string | make_open_workspace (const char *) |
bool | make_close_workspace (bool) |
FI->GO: could be in top-level, no? More... | |
void | checkpoint_workspace (void) |
checkpoint the current workspace, i.e. More... | |
void | set_pipsmake_callback (pipsmake_callback_handler_type) |
callback.c More... | |
void | reset_pipsmake_callback (void) |
bool | run_pipsmake_callback (void) |
bool | unsplit (const string) |
unsplit.c More... | |
bool | unsplit_parsed (const string) |
bool | array_dfg (string) |
stubs.c More... | |
bool | print_array_dfg (string) |
bool | scheduling (string) |
================================================================= More... | |
bool | print_bdt (string) |
================================================================= More... | |
bool | prgm_mapping (string) |
========================================================================= More... | |
bool | print_plc (string) |
bool | reindexing (string) |
====================================================================== More... | |
bool | print_parallelizedCMF_code (string) |
====================================================================== More... | |
bool | print_parallelizedCRAFT_code (string) |
====================================================================== More... | |
string | build_view_file (const char *) |
view.c More... | |
string | get_dont_build_view_file (const char *) |
void | reset_pips_timeout (void) |
signal.c More... | |
void | set_pips_timeout (unsigned int) |
set pips timeout on delay setting to 0 removes the current timeout. More... | |
void | set_pips_timeout_from_env (void) |
set pips timeout using PIPS_TIMEOUT environment variable More... | |
void | initialize_signal_catcher (void) |
void | pipsmake_restart (FILE *) |
void | pipsmake_pop_buffer_state (void) |
int | pipsmake_get_lineno (void) |
FILE * | pipsmake_get_in (void) |
FILE * | pipsmake_get_out (void) |
int | pipsmake_get_leng (void) |
char * | pipsmake_get_text (void) |
void | pipsmake_set_lineno (int) |
void | pipsmake_set_in (FILE *) |
void | pipsmake_set_out (FILE *) |
int | pipsmake_get_debug (void) |
void | pipsmake_set_debug (int) |
int | pipsmake_lex_destroy (void) |
void * | pipsmake_alloc (yy_size_t) |
void * | pipsmake_realloc (void *, yy_size_t) |
void | pipsmake_free (void *) |
int | pipsmake_wrap (void) |
Variables | |
FILE * | pipsmake_in |
int | pipsmake_char |
readmakefile.c More... | |
int | pipsmake_nerrs |
int | pipsmake_leng |
lexer.c More... | |
FILE * | pipsmake_out |
int | pipsmake_lineno |
int | pipsmake__flex_debug |
char * | pipsmake_text |
typedef bool(* pipsmake_callback_handler_type) (void) |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/pipsmake/pipsmake-local.h instead, to add your own modifications. header file built by cproto pipsmake-local.h
Definition at line 33 of file pipsmake.h.
const char* activate | ( | const char * | phase | ) |
phase | hase |
Definition at line 214 of file activate.c.
References activate_phase(), and pips_user_error.
Referenced by activate_language(), make_pre_post_transformation(), options_select(), select_rule(), and update_options().
void activate_language | ( | language | l | ) |
Choose the right combination of activate and setproperty for a given language.
This is not really compatible with the litterate programming of pipsmake-rc.tex, where this information should be encoded.
Usual properties for Fortran
Usual properties for Fortran 90/95
Usual properties for C
The language is unknown
Definition at line 254 of file activate.c.
References activate(), active_phase_p(), language_c_p, language_fortran95_p, language_fortran_p, pips_user_warning, and set_bool_property().
Referenced by add_a_file(), and create_workspace().
const char* activate_phase | ( | const char * | phase | ) |
find rule that describes phase
phase | hase |
Definition at line 124 of file activate.c.
References active_phase_p(), CAR, db_get_current_workspace_name(), db_unput_resources(), debug_off, debug_on, delete_derived_resources(), find_rule_by_phase(), find_rule_by_resource(), FOREACH, free(), gen_length(), get_bool_property(), makefile_active_phases, MAPL, owner_callees_p, owner_callers_p, owner_select_p, parse_makefile(), pips_assert, pips_debug, pips_user_warning, rule_phase, rule_produced, rule_required, rule_undefined, same_string_p, strdup(), STRING, VIRTUAL_RESOURCE, virtual_resource_name, and virtual_resource_owner.
Referenced by activate(), and activate_phases().
bool activate_phases | ( | void | ) |
Use property ACTIVE_PHASES to active the phases required by the user.
Definition at line 224 of file activate.c.
References activate_phase(), active_phase_p(), free(), get_string_property(), pips_debug, same_string_p, and strdup().
Referenced by create_workspace().
return the phase which would be used to build a given resource.
res | es |
Definition at line 119 of file activate.c.
References find_rule_by_resource(), and rule_phase.
bool active_phase_p | ( | const char * | phase | ) |
phase | hase |
Definition at line 80 of file activate.c.
References FOREACH, makefile_active_phases, parse_makefile(), same_string_p, STRING, and STUB_ERROR.
Referenced by activate_language(), activate_phase(), activate_phases(), make_pre_post_transformation(), points_to_unary_operation_to_transformer(), and ProcessEntry().
void add_resource_to_make_cache | ( | void * | res_id | ) |
FI: debugging messages cannot be factorized here because of sibling resources, unless an extra parameter is added...
res_id | es_id |
Definition at line 225 of file pipsmake.c.
References set_add_element(), and up_to_date_resources.
Referenced by check_physical_resource_up_to_date(), and rmake().
void add_rule | ( | rule | r | ) |
Definition at line 1704 of file readmakefile.c.
bool array_dfg | ( | char * | mod_name | ) |
void array_dfg( (char*) module_name ) AL 93/06/29
It computes the array data flow graph using Feautrier's algorithm. This kind of graph detects the real dependances between arrays. It could be computed on a static control program. The original code is prepared by the static_controlize package. See its comments for more details.
summary or not ?
Initialize debugging functions
Initialization of the pass
set current_module_entity to ent ...
If the input program is not a static_control one, return
What will we compute ?
We need the dependance graph for a first source approximation. The graph is first reversed to have the possible source statement. Then we take only the WR dependances. At the end : duplicate nodes "a la Redon" for IF statement.
We reorder the statement number linked to each vertex in order to distinguich duplicated vertices
We compute the core of the pass
End of the program
mod_name | odule |
Definition at line 501 of file array_dfg.c.
References adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), adg_dup_disjunctive_nodes(), adg_only_call_WR_dependence(), adg_pure_dfg(), adg_reorder_statement_number(), adg_reverse_graph(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, dg, fprint_dfg(), Gcount_ie, Gcount_re, get_debug_level(), GET_STATEMENT_MAPPING, Gstco_map, Gstructural_parameters, local_name_to_top_level_entity(), mod_stat, my_fai_count, my_pip_count, pips_user_error, printf(), reset_current_module_entity(), reset_current_module_statement(), reset_proper_rw_effects(), set_current_module_entity(), set_proper_rw_effects(), static_control_params, static_control_yes, strdup(), SUMMARY, and user_log().
string build_pgm_makefile | ( | const char * | ) |
string build_view_file | ( | const char * | print_type | ) |
print_type | rint_type |
Definition at line 97 of file view.c.
References get_view_file(), and print_type().
Referenced by display(), display_a_resource(), gpips_display_graph_file_display(), gpips_display_plain_file(), wpips_display_graph_file_display(), wpips_display_plain_file(), and wpips_display_WP65_file().
bool check_resource_up_to_date | ( | const char * | rname, |
const char * | oname | ||
) |
To be used in a rule.
use and update the up_to_dat list created by makeapply
rname | name |
oname | name |
Definition at line 1468 of file pipsmake.c.
References check_physical_resource_up_to_date(), and db_resource_p().
Referenced by check_physical_resource_up_to_date(), and rmake().
void checkpoint_workspace | ( | void | ) |
checkpoint the current workspace, i.e.
save everything so that it is possible to reopen it in case of failure.
FC 25/06/2003 this seems to break pipsmake internal data... pips_debug(3, "\tdeleting obsolete resources...\n"); delete_obsolete_resources();
Definition at line 129 of file openclose.c.
References db_checkpoint_workspace(), db_get_current_workspace_name(), pips_debug, save_makefile(), save_properties(), and user_log().
Referenced by apply_a_rule(), and pips_signal_handler().
bool close_makefile | ( | const char * | name | ) |
void delete_all_resources | ( | void | ) |
Definition at line 1513 of file pipsmake.c.
References db_delete_all_resources(), init_make_cache(), and reset_make_cache().
void delete_named_resources | ( | const char * | rn | ) |
Delete from up_to_date_resources make cache all the resources with a given resource name.
There is no internal data structure in pipsdbm to access these resources efficiently... The two-level mapping of database.c must be inverted.
FI: FC claims in an e-mail that this could be done more efficiently but does not explain how.
rn | n |
Definition at line 1482 of file pipsmake.c.
References count, db_retrieve_resources(), db_unput_resources(), FOREACH, gen_free_list(), make_cache_consistent_p(), make_cache_hit_p(), make_cache_p(), pips_assert, pips_debug, remove_resource_from_make_cache(), and STRING.
Referenced by delete_derived_resources().
int delete_obsolete_resources | ( | void | ) |
Definition at line 1432 of file pipsmake.c.
References check_physical_resource_up_to_date(), db_delete_obsolete_resources(), init_make_cache(), make_cache_p(), and reset_make_cache().
Referenced by delete_some_resources().
void delete_some_resources | ( | void | ) |
this is quite ugly, but I wanted to put the enumeration down to pipsdbm.
Definition at line 1446 of file pipsmake.c.
References db_delete_all_resources(), delete_obsolete_resources(), dont_interrupt_pipsmake_asap(), get_string_property(), pips_internal_error, same_string_p, and user_log().
Referenced by close_workspace().
void do_resource_usage_check | ( | const char * | oname, |
rule | ru | ||
) |
check the usage of resources
es_write
oname | name |
ru | u |
Definition at line 1559 of file pipsmake.c.
References build_real_resources(), concatenate(), FOREACH, gen_full_free_list(), get_logged_resources(), pips_debug, real_resource_owner_name, real_resource_resource_name, res_read, res_write, rule_produced, rule_required, set_belong_p(), set_clear(), set_del_element(), SET_MAP, set_undefined, strdup(), and user_log().
Referenced by apply_a_rule().
rule find_rule_by_phase | ( | const char * | pname | ) |
this function returns the rule that defines builder pname
walking thru rules
pname | name |
Definition at line 1686 of file readmakefile.c.
Referenced by add_rule().
rule find_rule_by_resource | ( | const char * | rname | ) |
This function returns the active rule to produce resource rname.
It selects the first active rule in the database which produces the resource but does not use/require it.
walking thru rules
walking thru resources required by this rule to eliminate rules using and producing this resource, e.g. code transformations for the CODE resource.
rname | name |
Definition at line 694 of file pipsmake.c.
References FOREACH, makefile_active_phases, makefile_rules, owner_callees_p, owner_callers_p, parse_makefile(), pips_debug, RULE, rule_phase, rule_produced, rule_required, rule_undefined, same_string_p, STRING, VIRTUAL_RESOURCE, virtual_resource_name, and virtual_resource_owner.
Referenced by activate_phase(), active_phase_for_resource(), array_bound_check_top_down(), check_physical_resource_up_to_date(), rice_regions_dependence_graph(), rmake(), safe_find_rule_by_resource(), safe_make(), update_options(), and used_before_set().
void fprint_activated | ( | FILE * | fd | ) |
fd | d |
Definition at line 110 of file activate.c.
References FOREACH, fprintf(), makefile_active_phases, parse_makefile(), and STRING.
Referenced by retrieve_active_phases(), and select_rule().
void fprint_makefile | ( | FILE * | fd, |
makefile | m | ||
) |
fd | d |
Definition at line 1649 of file readmakefile.c.
Referenced by parse_makefile().
void fprint_virtual_resources | ( | FILE * | fd, |
const char * | dir, | ||
list | lrv | ||
) |
fd | d |
dir | ir |
lrv | rv |
Definition at line 1611 of file readmakefile.c.
Referenced by fprint_makefile().
gen_array_t get_callees | ( | string | module | ) |
Get all the callers of the specified module.
The returned value is allocated dynamically and needs to be freed by the caller of this function
module | odule |
Definition at line 1816 of file pipsmake.c.
References callees_callees, db_get_memory_resource(), gen_array_from_list(), module, pips_internal_error, and safe_make().
Referenced by get_callees_of().
gen_array_t get_callers | ( | string | module | ) |
Get all the callers of the specified module.
The returned value is allocated dynamically and needs to be freed by the caller of this function
module | odule |
Definition at line 1799 of file pipsmake.c.
References callees_callees, db_get_memory_resource(), gen_array_from_list(), module, pips_internal_error, and safe_make().
Referenced by get_callers_of().
string get_dont_build_view_file | ( | const char * | print_type | ) |
print_type | rint_type |
Definition at line 102 of file view.c.
References get_view_file(), and print_type().
Referenced by wpips_display_WP65_file().
string get_first_main_module | ( | void | ) |
Should be able to handle Fortran applications, C applications and mixed Fortran/C applications.
This is a duplicate for pipsdbm function, get_main_entity_name()
Definition at line 1525 of file pipsmake.c.
References concatenate(), db_get_current_workspace_directory(), debug_off, debug_on, file_exists_p(), free(), MAIN_FILE_NAMES, safe_fclose(), safe_fopen(), safe_readline(), strdup(), string_undefined, and string_undefined_p.
Referenced by get_main(), and select_a_module_by_default().
int init_lex | ( | void | ) |
void init_make_cache | ( | void | ) |
Definition at line 199 of file pipsmake.c.
References pips_assert, pips_debug, set_make(), set_pointer, set_undefined_p, and up_to_date_resources.
Referenced by apply(), concurrent_apply(), delete_all_resources(), delete_obsolete_resources(), make(), make_post_transformation(), make_pre_post_transformation(), and reinit_make_cache_if_necessary().
void initialize_signal_catcher | ( | void | ) |
Definition at line 126 of file signal.c.
References pips_signal_handler(), and set_pips_timeout_from_env().
Referenced by pips_main(), and tpips_main().
bool make_cache_consistent_p | ( | void | ) |
Debug function: make sure that up-to-date resources do exist in the resource database.
If the cache does not exist, it is considered consistent.
FI: the first test should be enough
Definition at line 275 of file pipsmake.c.
References db_resource_name(), db_resource_owner_name(), db_resource_p(), SET_FOREACH, set_undefined_p, string_undefined_p, and up_to_date_resources.
Referenced by delete_named_resources().
bool make_cache_hit_p | ( | void * | rr_id | ) |
rr_id | r_id |
Definition at line 219 of file pipsmake.c.
References set_belong_p(), and up_to_date_resources.
Referenced by check_physical_resource_up_to_date(), delete_named_resources(), make_required(), rmake(), and update_preserved_resources().
bool make_cache_p | ( | void | ) |
Can the make cache be used?
Definition at line 207 of file pipsmake.c.
References set_undefined_p, and up_to_date_resources.
Referenced by delete_named_resources(), delete_obsolete_resources(), and make_required().
FI->GO: could be in top-level, no?
lazy...
dup because freed in db_close_workspace
is_quit | s_quit |
Definition at line 102 of file openclose.c.
References close_makefile(), db_close_workspace(), db_get_current_module_name(), db_get_current_workspace_name(), db_reset_current_module_name(), free(), save_properties(), strdup(), and user_log().
Referenced by close_workspace().
string make_open_workspace | ( | const char * | name | ) |
should be an error?
name | ame |
Definition at line 72 of file openclose.c.
References db_close_workspace(), db_get_current_workspace_name(), db_open_workspace(), get_cwd(), makefile_undefined, open_makefile(), open_properties(), pips_debug, and pips_user_warning.
Referenced by open_workspace().
makefile open_makefile | ( | const char * | name | ) |
name | ame |
Definition at line 1770 of file readmakefile.c.
makefile parse_makefile | ( | void | ) |
Definition at line 1663 of file readmakefile.c.
Referenced by find_rule_by_phase(), and open_makefile().
void* pipsmake_alloc | ( | yy_size_t | ) |
void pipsmake_error | ( | const char * | ) |
symbols exported by lex / yacc
void pipsmake_free | ( | void * | ) |
int pipsmake_get_debug | ( | void | ) |
FILE* pipsmake_get_in | ( | void | ) |
int pipsmake_get_leng | ( | void | ) |
int pipsmake_get_lineno | ( | void | ) |
FILE* pipsmake_get_out | ( | void | ) |
char* pipsmake_get_text | ( | void | ) |
int pipsmake_lex | ( | void | ) |
int pipsmake_lex_destroy | ( | void | ) |
int pipsmake_parse | ( | void | ) |
void pipsmake_pop_buffer_state | ( | void | ) |
void* pipsmake_realloc | ( | void * | , |
yy_size_t | |||
) |
void pipsmake_restart | ( | FILE * | ) |
void pipsmake_set_debug | ( | int | ) |
void pipsmake_set_in | ( | FILE * | ) |
void pipsmake_set_lineno | ( | int | ) |
void pipsmake_set_out | ( | FILE * | ) |
int pipsmake_wrap | ( | void | ) |
=========================================================================
The placement function
The timing function
The number of nodes in the DFG
The number of dataflows in the DFG
Mapping from a dataflow to its distance
Mapping from a statement to its prototype
Perf.mesurement
List of the unknowns coefficients
Initialize debugging functions
We get the required data: module entity, code, static_control, dataflow graph, timing function.
The DFG
the BDT
First we count the number of nodes and dataflows
We look for the broadcasts
We sort the nodes of "the_dfg" in decreasing dimension order. The dimension of a node is the dimension of the iteration space of its instruction.
INITIALIZATION
We create a prototype for each statement. Each prototype is mapped to its statement in the hash table "StmtToProto". An other hash table "StmtToProto" associates the unknown coefficients used in the prototype and the statement. The returned value "lambda" gives all the coefficients that have been created.
plc_make_dim() has to initialize the Mu list
We compute the dimension of the placement function of each instruction, and the greatest one (dmax). This is based on the timing function, if it exists.
The number of mapping dimensions can be computed as a minimum, see plc_make_min_dim()
Mapping dimension can be fixed with the environment variable MAPPING_DIMENSION
We initialize the prgm_mapping function.
Computation of the weight of each dataflow of the DFG.
We get all the dataflows of the graph
We sort the dataflows in decreasing weight order
EDGES TREATMENT
BROADCAST CONDITIONS
We take into account the broadcast conditions
OD : we could give "remnants_df_l" as an arg, in order to only compute the useful distances.
DISTANCE COMPUTATION
Computation of the distance of each dataflow.
CUTTING CONDITIONS
We compute the list of equations that are to be nullified in order to zero out all the distances.
We eliminate all the unknowns that are valuated by the substitution computed above "sigma"; and then we cut it in two parts, one containing the indices coefficients, one containing the parameters coefficients, both sorted by decreasing frenquency in the prototypes. Before cutting the list "lambda" into two parts, we take into account the partial broadcast prototypes (contain in "pfunc") to replace some of the "lambda" coeff by the "mu" coeff. The new sigma is returned by this function.
UNELIMINATED COEFF SORTING
COEFF PARTITION
VALUATION
We valuate all the remaining unknowns by building successively each dimension.
module_name | odule |
Definition at line 2213 of file prgm_mapping.c.
References adg_pure_dfg(), bdt_undefined, broadcast(), broadcast_conditions(), CAR, CDR, compare_dfs_weight(), CONS, CONSP, count_mu_coeff, cutting_conditions(), DATAFLOW, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug(), debug_off, debug_on, DtfToDist, DtfToSink, DtfToWgh, edge_weight(), ENDP, exp, EXPRESSION, expression_undefined, fprint_bdt(), fprint_dataflow(), fprint_dfg(), fprint_entity_list(), fprint_plc(), fprint_plc_pp_dims(), fprint_psysteme(), fprint_vvs(), fprintf(), gen_nconc(), gen_remove(), general_merge_sort(), get_debug_level(), get_graph_dataflows(), GET_STATEMENT_MAPPING, graph_vertices, hash_get(), int, int_to_expression(), local_name_to_top_level_entity(), make_placement(), make_plc(), malloc(), mod_stat, module_name(), nb_dfs, nb_nodes, NIL, partial_broadcast_coefficients(), partition_unknowns(), pfunc, pips_internal_error, PLACEMENT, placement_dims, plc_fprint_dfs(), plc_fprint_distance(), plc_fprint_proto(), plc_make_dim(), plc_make_distance(), plc_make_min_dim(), plc_make_proto(), plc_placements, polynome_dup(), polynome_fprint(), polynome_to_vecteur(), POP, prgm_parameter_l, pu_is_inferior_var(), pu_variable_name(), Pvecteur_to_expression(), reset_current_module_entity(), reset_current_stco_map(), set_current_module_entity(), set_current_stco_map(), solve_system_by_succ_elim(), sort_dfg_node(), sort_unknowns(), static_control_params, static_control_undefined, static_control_yes, StmtToProto, strdup(), STS, SUCC_DATAFLOWS, SUCCESSOR, the_bdt, the_dfg, user_warning, valuer(), VAR_VAL, var_val_variable, VERTEX, vertex_int_stmt(), vertex_successors, vvs_on_polynome(), and vvs_on_prototypes().
=================================================================
void print_bdt(module_name): print the bdt of module name
AC 94/03/30
module_name | odule |
Definition at line 89 of file scheduling.c.
References BDT_EXT, concatenate(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, fprint_bdt(), fprintf(), free(), get_debug_level(), module_name(), safe_fclose(), safe_fopen(), strdup(), the_bdt, and user_log().
void print_make_cache | ( | void | ) |
Debug function, to be tested...
Definition at line 251 of file pipsmake.c.
References count, db_resource_name(), db_resource_owner_name(), printf(), SET_FOREACH, set_undefined_p, string_undefined_p, and up_to_date_resources.
======================================================================
Static controlize code
The DFG, the BDT and the PLC
mod_name | odule |
Definition at line 401 of file prettyprint.c.
References adg_pure_dfg(), close_prettyprint(), CM_FORTRAN_EXT, cmf_layout_align(), code_decls_text, current_bdt, current_dfg, db_get_memory_resource(), debug_off, debug_on, empty_text(), entity_code(), fprint_bdt(), fprint_dfg(), fprint_plc(), free(), get_current_module_entity(), get_debug_level(), get_stco_from_current_map(), get_string_property(), init_prettyprint(), local_name_to_top_level_entity(), lparams, make_text(), make_text_resource(), MERGE_TEXTS, mod_stat, module, NIL, pips_internal_error, PRETTYPRINT_PARALLEL, reset_current_module_entity(), reset_current_stco_map(), set_bool_property(), set_current_module_entity(), set_current_stco_map(), set_string_property(), static_control_params, static_control_undefined, static_control_yes, strdup(), STS, and text_module().
======================================================================
Static controlize code
The DFG, the BDT and the PLC
mod_name | odule |
Definition at line 482 of file prettyprint.c.
References adg_pure_dfg(), close_prettyprint(), code_decls_text, CRAFT_FORTRAN_EXT, craft_layout_align(), current_bdt, current_dfg, db_get_memory_resource(), debug_off, debug_on, empty_text(), entity_code(), fprint_bdt(), fprint_dfg(), fprint_plc(), free(), get_current_module_entity(), get_debug_level(), get_stco_from_current_map(), get_string_property(), init_prettyprint(), local_name_to_top_level_entity(), lparams, make_text(), make_text_resource(), MERGE_TEXTS, mod_stat, module, NIL, pips_internal_error, PRETTYPRINT_PARALLEL, reset_current_module_entity(), reset_current_stco_map(), set_bool_property(), set_current_module_entity(), set_current_stco_map(), set_string_property(), static_control_params, static_control_undefined, static_control_yes, strdup(), STS, and text_module().
bool reindexing | ( | char * | mod_name | ) |
======================================================================
void reindexing((char*) mod_name):
Initialize debugging functions
We get the required data: module entity, code, static_control,
dataflow graph.
mod_stat = copy_statement((statement) db_get_memory_resource(DBR_CODE, mod_name, true));
The DFG, the BDT and the PLC
First we count the number of nodes to initialize the hash tables
The temporary variables counter
Remove the old code:
And replace it by the new one:
print the values of the delay
mod_name | odule |
Definition at line 664 of file reindexing.c.
References CONS, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, delay_table, ENDP, fprint_bdt(), fprint_delay(), fprint_dfg(), fprint_plc(), free_instruction(), get_current_module_entity(), get_current_module_statement(), get_debug_level(), get_stco_from_current_map(), graph_vertices, h_node, hash_int, hash_table_free(), hash_table_make(), ht_ab, local_name_to_top_level_entity(), lparams, make_instruction_block(), mod_stat, nb_nodes, NIL, pips_internal_error, POP, re_do_it(), reset_current_module_entity(), reset_current_module_statement(), reset_current_stco_map(), set_current_module_entity(), set_current_module_statement(), set_current_stco_map(), STATEMENT, statement_instruction, static_control_params, static_control_undefined, static_control_yes, strdup(), STS, tc, the_bdt, the_dfg, and user_log().
void reinit_make_cache_if_necessary | ( | void | ) |
Definition at line 212 of file pipsmake.c.
References init_make_cache(), reset_make_cache(), set_undefined_p, and up_to_date_resources.
void remove_resource_from_make_cache | ( | void * | res_id | ) |
res_id | es_id |
Definition at line 239 of file pipsmake.c.
References db_resource_name(), db_resource_owner_name(), pips_debug, set_del_element(), and up_to_date_resources.
Referenced by delete_named_resources(), make_required(), and update_preserved_resources().
void reset_current_phase_context | ( | void | ) |
Definition at line 96 of file pipsmake.c.
References entity_basic_concrete_types_reset(), reset_pips_current_computation(), and reset_std_static_entities().
Referenced by callgraph(), and catch_user_error().
void reset_make_cache | ( | void | ) |
Definition at line 191 of file pipsmake.c.
References pips_assert, pips_debug, set_free(), set_undefined, set_undefined_p, and up_to_date_resources.
Referenced by apply(), concurrent_apply(), delete_all_resources(), delete_obsolete_resources(), make(), make_post_transformation(), make_pre_post_transformation(), reinit_make_cache_if_necessary(), safe_concurrent_apply(), and safe_do_something().
void reset_pips_timeout | ( | void | ) |
Definition at line 60 of file signal.c.
References pips_timeout_set, and POP_TIMEOUT.
Referenced by set_pips_timeout(), and set_pips_timeout_from_env().
void reset_pipsmake_callback | ( | void | ) |
Definition at line 51 of file callback.c.
References callback, callback_set_p, and message_assert.
Referenced by gpips_main(), and wpips_main().
void reset_static_phase_variables | ( | void | ) |
Static variables used by phases must be reset on error although pipsmake does not know which ones are used.
FI: let us hope this is documented in PIPS developer guide... It is not mentionned in the PIPS tutorial. And rightly so I believe. It should be linked to the exception pips_user_error().
From ri-util/static.c
Macro-generated resets
Definition at line 298 of file pipsmake.c.
References DECLARE_ERROR_HANDLER, error_reset_cumulated_rw_effects(), error_reset_current_module_entity(), error_reset_current_module_statement(), error_reset_invariant_rw_effects(), error_reset_proper_rw_effects(), error_reset_rw_effects(), proper_effects_error_handler(), reset_hooks_call(), reset_precondition_map(), reset_total_precondition_map(), and reset_transformer_map().
Referenced by catch_user_error(), and safe_do_something().
void retrieve_active_phases | ( | void | ) |
Definition at line 58 of file activate.c.
References fprint_activated(), gen_free_string_list(), ifdebug, makefile_active_phases, NIL, parse_makefile(), and saved_active_phases.
Referenced by apply(), concurrent_apply(), make(), safe_concurrent_apply(), and safe_do_something().
bool rmake | ( | const char * | rname, |
const char * | oname | ||
) |
recursive make resource.
Should be static, but FI uses it in callgraph.c
is it up to date ?
YES, IT IS!
this resource exists but may be up-to-date?
NO, IT IS NOT.
the resource is already being required... this is bad
Well, the resource does not exists, we have to build it.
Let's check if the proper options have been selected.
These conditions should not be hardwired here but managed by the tpips script language.
we look for the active rule to produce this resource
we recursively make the pre transformations.
we recursively make required resources.
we build the resource
set up-to-date all the produced resources for that rule
we recursively make the post transformations.
rname | name |
oname | name |
Definition at line 919 of file pipsmake.c.
References add_resource_to_make_cache(), apply_a_rule(), build_real_resources(), check_resource_up_to_date(), db_get_resource_id(), db_print_all_required_resources(), db_resource_is_required_p(), db_resource_p(), db_set_resource_as_required(), db_time_of_resource(), find_rule_by_resource(), FOREACH, gen_full_free_list(), make_cache_hit_p(), make_post_transformation(), make_pre_transformation(), make_required(), pips_debug, pips_internal_error, pips_user_error, pips_user_warning, REAL_RESOURCE, real_resource_owner_name, real_resource_resource_name, rule_phase, rule_produced, rule_undefined, and same_string_p.
Referenced by build_real_resources(), callgraph(), make(), and make_required().
Test if a rule uses a resource it produces.
find resource res that is produced by phase
owner vro = virtual_resource_owner(vr);
We DO check callers and callees (DB,08/96)
if ( owner_callers_p(vro) || owner_callees_p(vro) ) {} else
Definition at line 353 of file activate.c.
References CAR, MAPL, rule_produced, rule_required, same_string_p, VIRTUAL_RESOURCE, and virtual_resource_name.
Referenced by get_more_derived_resources().
bool run_pipsmake_callback | ( | void | ) |
Definition at line 59 of file callback.c.
References callback_set_p.
Referenced by apply_a_rule().
bool safe_apply | ( | const char * | phase_n, |
const char * | module_n | ||
) |
phase_n | hase_n |
module_n | odule_n |
Definition at line 1723 of file pipsmake.c.
References apply(), find_rule_by_phase(), and safe_do_something().
Referenced by apply(), execute_safe_apply_outside_the_notifier(), execute_safe_apply_outside_the_notifyer(), hpfc_notify(), and pips_main().
bool safe_concurrent_apply | ( | const char * | phase_n, |
gen_array_t | modules | ||
) |
phase_n | hase_n |
modules | odules |
Definition at line 1729 of file pipsmake.c.
References any_exception_error, CATCH, concurrent_apply(), debug_off, debug_on, find_rule_by_phase(), free(), logs_off(), logs_on(), ok, pips_user_warning, reset_make_cache(), RETHROW, retrieve_active_phases(), rule_undefined, strdup(), string_array_join(), the_last_just_thrown_exception, timeout_error, TRY, UNCATCH, and user_log().
Referenced by capply().
bool safe_make | ( | const char * | res_n, |
const char * | module_n | ||
) |
res_n | es_n |
module_n | odule_n |
Definition at line 1717 of file pipsmake.c.
References find_rule_by_resource(), make(), and safe_do_something().
Referenced by get_callees(), get_callees_of(), get_callers(), get_callers_of(), get_view_file(), loop_pragma(), module_loops(), pips_main(), tp_set_current_module(), and try_to_parse_everything_just_in_case().
bool safe_set_property | ( | const char * | propname, |
const char * | value | ||
) |
propname | ropname |
value | alue |
Definition at line 1781 of file pipsmake.c.
References free(), line, parse_properties_string(), and user_log().
Referenced by set_property().
void save_active_phases | ( | void | ) |
Definition at line 49 of file activate.c.
References gen_copy_string_list(), makefile_active_phases, NIL, parse_makefile(), and saved_active_phases.
Referenced by apply(), concurrent_apply(), and make().
void save_makefile | ( | const char * | name | ) |
name | ame |
Definition at line 1801 of file readmakefile.c.
Referenced by close_makefile().
bool saved_active_phase_p | ( | const char * | phase | ) |
Debugging function.
phase | hase |
Definition at line 93 of file activate.c.
References ENDP, FOREACH, fprintf(), same_string_p, saved_active_phases, and STRING.
=================================================================
void scheduling(mod_name ): this is the main function to calculate the schedules of the node of a dfg. It first reverse the graph to have each node in function of its predecessors, then calculates the strongly connected components by the Trajan algorithm, then calls the function that really find the schedules.
AC 93/10/30
We get the required data: module entity, code, static_control, dataflow graph, timing function.
Read the DFG
mod_name | odule |
Definition at line 133 of file scheduling.c.
References adg_pure_dfg(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, dfg, dfg_find_sccs(), dfg_reverse_graph(), fprint_bdt_with_stat(), fprint_dfg(), fprint_sccs(), fprintf(), get_debug_level(), GET_STATEMENT_MAPPING, local_name_to_top_level_entity(), mod_stat, pips_internal_error, reset_current_module_entity(), reset_current_stco_map(), search_graph_bdt(), set_current_module_entity(), set_current_stco_map(), static_control_undefined, static_control_yes, strdup(), and STS.
void set_current_phase_context | ( | const char * | rname, |
const char * | oname | ||
) |
cproto-generated files
rname | name |
oname | name |
Definition at line 89 of file pipsmake.c.
References entity_basic_concrete_types_init(), reset_std_static_entities(), and set_pips_current_computation().
Referenced by callgraph(), and catch_user_error().
void set_pips_timeout | ( | unsigned int | delay | ) |
set pips timeout on delay setting to 0 removes the current timeout.
delay | elay |
Definition at line 70 of file signal.c.
References pips_timeout_callback(), pips_timeout_set, PUSH_TIMEOUT, reset_pips_timeout(), and set_timeout_callback().
void set_pips_timeout_from_env | ( | void | ) |
set pips timeout using PIPS_TIMEOUT environment variable
Definition at line 84 of file signal.c.
References pips_timeout_callback(), pips_timeout_set, PUSH_TIMEOUT_ENV, reset_pips_timeout(), and set_timeout_callback().
Referenced by initialize_signal_catcher().
void set_pipsmake_callback | ( | pipsmake_callback_handler_type | p | ) |
Definition at line 43 of file callback.c.
References callback, callback_set_p, and message_assert.
Referenced by gpips_main(), and wpips_main().
name | ame |
Definition at line 185 of file unsplit.c.
References unsplit_internal().
bool unsplit_parsed | ( | const | string | ) |
string | ame |
Definition at line 190 of file unsplit.c.
References unsplit_internal().
void yyerror | ( | const char * | s | ) |
work around cproto 4.7t issue
symbols from readmakefile.y
work around cproto 4.7t issue
symbols from readmakefile.y
work around cproto 4.7t issue
Definition at line 1927 of file genread_yacc.c.
void yyerror_lex_part | ( | const char * | ) |
int yywrap | ( | void | ) |
symbols form lexer.l
|
extern |
|
extern |
|
extern |
Definition at line 142 of file pipsmake.h.
|
extern |
lexer.c
|
extern |
|
extern |
|
extern |
|
extern |