PIPS
|
#include "defines-local.h"
#include "semantics.h"
#include "resources.h"
#include "pipsdbm.h"
#include "transformations.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "effects-convex.h"
Go to the source code of this file.
Macros | |
#define | HPFC_FILTERED_SUFFIX ".hpfc_filtered" |
bool hpfc_filter(string name) More... | |
Variables | |
static list | the_fakes_object =NIL |
??? to be added to HPFC_STATUS More... | |
static hpfc_status | chs = (hpfc_status) NULL |
??? some memory leaks in the hpfc_status management... More... | |
static list | added_ahead_of_node_code |
??? some quick hack to move bound computations ahead if possible More... | |
#define HPFC_FILTERED_SUFFIX ".hpfc_filtered" |
what: filter the source code for module name. to be called by pipsmake. how: call to a shell script, "hpfc_directives", that transforms hpf directives in "special" subroutine calls to be parsed by the fortran 77 parser. input: the module name. output: none. side effects:
void add_a_common | ( | entity | c | ) |
HPFC module by Fabien COELHO.
Definition at line 48 of file hpfc.c.
References gen_once().
Referenced by init_host_and_node_entities().
void add_a_fake_function | ( | entity | f | ) |
Definition at line 88 of file hpfc.c.
References f(), gen_once(), and the_fakes_object.
Referenced by handle_fake_directive(), and new_fake_function().
void add_a_pure | ( | entity | f | ) |
Definition at line 62 of file hpfc.c.
References f(), and gen_once().
Referenced by handle_pure_directive(), and new_pure_function().
void add_an_io_function | ( | entity | f | ) |
Definition at line 74 of file hpfc.c.
References f(), and gen_once().
Referenced by handle_io_directive(), and new_io_function().
variables to be declared
vars | old -> new remapping of entity |
Definition at line 121 of file hpfc.c.
References CONS, copy_renaming(), gen_copy_seq(), make_remapping(), and REMAPPING.
Referenced by generate_hpf_remapping_file().
void add_remapping_as_used | ( | renaming | x | ) |
Definition at line 135 of file hpfc.c.
References ENTITY, gen_once(), MAP, pips_assert, REMAPPING, remapping_referenced, remapping_renaming, remapping_undefined, remapping_undefined_p, renaming_new, renaming_old, src, and x.
Referenced by remapping_compile().
Definition at line 278 of file hpfc.c.
References node(), store_new_host_variable(), and store_new_node_variable().
Referenced by set_resources_for_module().
|
static |
Definition at line 395 of file hpfc.c.
References gen_recurse, gen_true(), loop_domain, and loop_rwt().
Referenced by compile_module().
|
static |
Definition at line 51 of file hpfc.c.
References declaration_with_overlaps_for_module(), and put_generated_resources_for_common().
Referenced by hpfc_close(), and hpfc_common().
|
static |
INIT
NORMALIZATIONS
here because the module was updated with some external declarations
ACTUAL COMPILATION
DECLARATIONS
SG: we need to add included entites into node_module declaration but only if they are not already present see how beautiful the list usage is, a O(n^2) algorithm !
MORE CODE CLEANING
PUT IN DB
CLOSE
Definition at line 410 of file hpfc.c.
References add_pvm_init_and_end(), added_ahead_of_node_code, clean_the_code(), CONS, declaration_with_overlaps_for_module(), ENTITY, entity_clean_declarations(), entity_code(), entity_declarations, entity_main_module_p(), FOREACH, gen_chunk_undefined_p, gen_find_eq(), gen_nconc(), get_current_module_statement(), host_module, hpf_compiler(), hpfc_close_dummy_to_prime(), hpfc_init_dummy_to_prime(), init_host_and_node_entities(), kill_statement_number_and_ordering(), make_block_statement(), make_host_and_node_modules(), module, NIL, node_module, NormalizeCodeForHpfc(), NormalizeHpfDeclarations(), put_generated_resources_for_module(), reset_resources_for_module(), set_resources_for_module(), set_similar_mappings_for_updates(), STATEMENT, statement_structural_cleaning(), and update_object_for_module().
Referenced by hpfc_compile().
checks for any directive before calling the filter... looks for /^[!Cc*]([Hh][Pp][Ff]|[Ff][Cc][Ff])$/
beginning a line
starting a comment
next char
Definition at line 559 of file hpfc.c.
References f(), pips_debug, safe_fclose(), and safe_fopen().
Referenced by hpfc_filter().
??? some intrinsics should also be considered as pure.
all of them ?
Definition at line 67 of file hpfc.c.
References f(), and gen_in_list_p().
Referenced by hpfc_compile().
void hpfc_add_ahead_of_node_code | ( | statement | s | ) |
Definition at line 404 of file hpfc.c.
References added_ahead_of_node_code, CONS, and STATEMENT.
Referenced by generate_optimized_code_for_loop_nest().
what: closes the hpf compiler execution. to be called by pipsmake. input: the program (workspace) name. output: none. side effects:
global informations
not close, because it would free the memory and pipsdbm will run into troubles when trying to free the resource...
??? the next function is in pipsmake... (should be in pipsdbm only, but pipsmake manages its own cache which must be destroyed also...
fake
name | ame |
Definition at line 798 of file hpfc.c.
References compile_common(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, gen_map(), hpfc_error_handler(), load_hpfc_status(), NO_FILE, pips_debug, put_generated_resources_for_program(), reset_hooks_register(), reset_hooks_unregister(), save_hpfc_status(), and set_string_property().
what: compile a common, that is generate the common for both host and nodes. how: generate files to be included. input: a common name. output: none. side effects:
name | ame |
Definition at line 769 of file hpfc.c.
References compile_common(), debug_off, debug_on, hpfc_error_handler(), load_hpfc_status(), local_name_to_top_level_entity(), pips_debug, reset_hooks_register(), reset_hooks_unregister(), save_hpfc_status(), and set_string_property().
bool hpfc_compile(string name)
what: hpf compile module name. to be called by pipsmake. input: the name of the module to compile. output: none side effects: (many)
just fake for pipsmake...
for callers
name | ame |
Definition at line 699 of file hpfc.c.
References compile_a_pure_function(), compile_a_special_io_function(), compile_module(), CONTINUE_FUNCTION_NAME, DB_PUT_FILE_RESOURCE, debug_off, debug_on, entity_intrinsic(), fortran_library_entity_p(), hpf_directive_entity_p(), hpf_pure_p(), hpfc_entity_reduction_p(), hpfc_error_handler(), hpfc_special_fake(), hpfc_special_io(), load_hpfc_status(), module, module_name_to_entity(), NO_FILE, pips_debug, reset_current_module_entity(), reset_hooks_register(), reset_hooks_unregister(), save_hpfc_status(), set_current_module_entity(), set_string_property(), store_new_host_variable(), and store_new_node_variable().
what: deals with directives.
to be called by pipsmake. input: the name of the module. output: none. side effects: (many)
Definition at line 632 of file hpfc.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, fortran_library_entity_p(), free_update_common_map(), handle_hpf_directives(), hpf_directive_entity_p(), hpfc_entity_reduction_p(), hpfc_error_handler(), hpfc_init_run_time_entities(), load_hpfc_status(), make_update_common_map(), module, module_name_to_entity(), NormalizeCommonVariables(), pips_debug, reset_current_module_entity(), reset_current_module_statement(), reset_hooks_register(), reset_hooks_unregister(), reset_proper_rw_effects(), save_hpfc_status(), set_current_module_entity(), set_current_module_statement(), and set_proper_rw_effects().
Referenced by hpfc_dynamic_directives(), and hpfc_static_directives().
name | ame |
Definition at line 681 of file hpfc.c.
References hpfc_directives_handler().
|
static |
An error_reset_hpfc_status() would be necessary
Definition at line 265 of file hpfc.c.
References hpfc_compile_error_handler(), hpfc_directives_error_handler(), hpfc_io_util_error_handler(), hpfc_special_cases_error_handler(), and hpfc_util_error_handler().
Referenced by hpfc_close(), hpfc_common(), hpfc_compile(), hpfc_directives_handler(), hpfc_filter(), and hpfc_init().
name | ame |
Definition at line 594 of file hpfc.c.
References concatenate(), db_get_current_workspace_directory(), db_get_file_resource, DB_PUT_FILE_RESOURCE, debug_off, debug_on, directive_in_file_p(), file_name, free(), hpf_directive_string_p(), hpfc_error_handler(), HPFC_FILTERED_SUFFIX, pips_debug, reset_hooks_register(), reset_hooks_unregister(), safe_system(), and strdup().
what: initialize the hpfc status for a program. input: the program (workspace) name. output: none. side effects:
vars local to commons
drop hpfc specials
name | ame |
Definition at line 503 of file hpfc.c.
References db_get_directory_name_for_module(), debug_off, debug_on, free(), hpfc_error_handler(), HPFC_PACKAGE, init_hpfc_status(), make_empty_program(), make_language_fortran(), pips_debug, reset_hooks_register(), reset_hooks_unregister(), save_hpfc_status(), set_bool_property(), set_string_property(), and WORKSPACE_SRC_SPACE.
bool hpfc_install(string name)
what: install generated files in a directory. done for wpips. how: all in the hpfc_install shell script. input: program name. output: none. side effects:
name | ame |
Definition at line 838 of file hpfc.c.
References concatenate(), db_get_current_workspace_directory(), db_get_current_workspace_name(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, NO_FILE, pips_debug, and safe_system().
what: compile the generated and installed code. for wpips. how: system call to $HPFC_MAKE input: the workspace name (which is not used) output: none. side effects: may stop if can't execute bugs or features:
name | ame |
Definition at line 864 of file hpfc.c.
References concatenate(), db_get_current_workspace_directory(), debug_off, debug_on, pips_debug, and safe_system().
what: run the program. how: system call sut $HPFC_MAKE... input: none. output: none. side effects:
name | ame |
Definition at line 889 of file hpfc.c.
References concatenate(), db_get_current_workspace_directory(), debug_off, debug_on, pips_debug, and safe_system().
Definition at line 91 of file hpfc.c.
References f(), gen_in_list_p(), and the_fakes_object.
Referenced by hpfc_compile().
Definition at line 77 of file hpfc.c.
References f(), and gen_in_list_p().
Referenced by hpfc_compile(), and only_io_call().
name | ame |
Definition at line 676 of file hpfc.c.
References hpfc_directives_handler().
|
static |
current hpfc status
initialization of data that belongs to the hpf compiler status
Definition at line 168 of file hpfc.c.
References chs, get_data_status(), get_dynamic_status(), get_entity_status(), get_hpf_number_status(), get_hpf_reductions(), get_overlap_status(), init_data_status(), init_dynamic_status(), init_entity_status(), init_hpf_number_status(), init_hpf_reductions(), init_overlap_status(), and make_hpfc_status().
Referenced by hpfc_init().
|
static |
SET them.
Definition at line 229 of file hpfc.c.
References chs, db_get_memory_resource(), hpfc_status_commons, hpfc_status_computed, hpfc_status_data_status, hpfc_status_dynamic_status, hpfc_status_entity_status, hpfc_status_ios, hpfc_status_numbers_status, hpfc_status_overlapsmap, hpfc_status_pures, hpfc_status_reductions, set_data_status(), set_dynamic_status(), set_entity_status(), set_hpf_number_status(), set_hpf_reductions(), and set_overlap_status().
Referenced by hpfc_close(), hpfc_common(), hpfc_compile(), and hpfc_directives_handler().
|
static |
removes DOALL ???
Definition at line 390 of file hpfc.c.
References execution_tag, is_execution_sequential, and loop_execution.
Referenced by clean_the_code().
list of already computed remappings...
exported interface
Definition at line 105 of file hpfc.c.
References MAP, REMAPPING, remapping_renaming, renaming_new, renaming_old, src, and x.
Referenced by remapping_compile().
|
static |
Definition at line 193 of file hpfc.c.
References chs, reset_data_status(), reset_dynamic_status(), reset_entity_status(), reset_hpf_number_status(), reset_hpf_reductions(), and reset_overlap_status().
Referenced by save_hpfc_status().
|
static |
Definition at line 367 of file hpfc.c.
References free_hpfc_current_mappings(), free_only_io_map(), free_postcondition_map(), get_bool_property(), reset_cumulated_references(), reset_current_module_statement(), reset_in_effects(), reset_out_effects(), reset_precondition_map(), and reset_rw_effects().
Referenced by compile_module().
|
static |
GET them.
cleaned!
Definition at line 209 of file hpfc.c.
References chs, DB_PUT_MEMORY_RESOURCE, get_data_status(), get_dynamic_status(), get_entity_status(), get_hpf_number_status(), get_hpf_reductions(), get_overlap_status(), hpfc_status_commons, hpfc_status_computed, hpfc_status_data_status, hpfc_status_dynamic_status, hpfc_status_entity_status, hpfc_status_ios, hpfc_status_numbers_status, hpfc_status_overlapsmap, hpfc_status_pures, hpfc_status_reductions, pips_assert, and reset_hpfc_status().
Referenced by hpfc_close(), hpfc_common(), hpfc_compile(), hpfc_directives_handler(), and hpfc_init().
|
static |
set_bool_property("MUST_REGIONS", true); set_bool_property("EXACT_REGIONS", true);
get_regions_properties(); set_out_effects
((statement_effects)
db_get_memory_resource(DBR_OUT_REGIONS, module_name, true)); set_in_effects ((statement_effects)
db_get_memory_resource(DBR_IN_REGIONS, module_name, true));
Definition at line 284 of file hpfc.c.
References automatic_translation(), compute_postcondition(), CONTINUE_FUNCTION_NAME, db_get_memory_resource(), entity_intrinsic(), get_bool_property(), get_current_module_statement(), get_precondition_map(), HOST_TIMEOFF, HOST_TIMEON, HOSTSECTION_SUFFIX, HPF_PREFIX, HPFC_HTELL, hpfc_init_run_time_entities(), hpfc_name_to_entity(), HPFC_NTELL, HPFC_STOP, local_name_to_top_level_entity(), make_hpfc_current_mappings(), MAKE_STATEMENT_MAPPING, module, module_local_name(), module_name(), NODE_TIMEOFF, NODE_TIMEON, only_io_mapping_initialize(), reset_unique_variable_numbers(), set_cumulated_references(), set_current_module_statement(), set_in_effects(), set_out_effects(), set_postcondition_map(), set_precondition_map(), set_rw_effects(), STOP_FUNCTION_NAME, SYNCHRO, SYNCHRO_SUFFIX, TELL_SUFFIX, TIMEOFF_SUFFIX, and TIMEON_SUFFIX.
Referenced by compile_module().
|
static |
??? some quick hack to move bound computations ahead if possible
of statement
Definition at line 402 of file hpfc.c.
Referenced by compile_module(), and hpfc_add_ahead_of_node_code().
|
static |
??? some memory leaks in the hpfc_status management...
Definition at line 164 of file hpfc.c.
Referenced by init_hpfc_status(), load_hpfc_status(), reset_hpfc_status(), and save_hpfc_status().
??? to be added to HPFC_STATUS
GENERIC_STATIC_STATUS(static, the_fakes, list, NIL, gen_free_list)
Definition at line 86 of file hpfc.c.
Referenced by add_a_fake_function(), and hpfc_special_fake().