PIPS
|
#include "defines-local.h"
Go to the source code of this file.
Macros | |
#define | debug_print_control(c, w) |
Functions | |
static void | hpf_compile_block (statement stat, statement *hoststatp, statement *nodestatp) |
static void | hpf_compile_test (statement s, statement *hoststatp, statement *nodestatp) |
static list | caller_list_of_bounds (_UNUSED_ entity fun, list le) |
return the list of bounds More... | |
static void | hpf_compile_call (statement stat, statement *hoststatp, statement *nodestatp) |
returned node version More... | |
static void | compile_control (control c, statement_mapping maph, statement_mapping mapn) |
static void | hpf_compile_unstructured (statement stat, statement *hoststatp, statement *nodestatp) |
static void | hpf_compile_sequential_loop (statement stat, statement *hoststatp, statement *nodestatp) |
static void | hpf_compile_parallel_body (statement body, statement *hoststatp, statement *nodestatp) |
static void | hpf_compile_parallel_loop (statement stat, statement *hoststatp, statement *nodestatp) |
static bool | loop_flt (loop l) |
static bool | parallel_loop_in_stat_p (statement s) |
static void | hpf_compile_loop (statement stat, statement *hoststatp, statement *nodestatp) |
void | hpf_compiler (statement stat, statement *hoststatp, statement *nodestatp) |
what: compile a statement into a host and SPMD node code. More... | |
Variables | |
entity | host_module |
HPFC - Fabien Coelho, May 1993 and later... More... | |
entity | node_module |
static bool | parallel_loop_found |
is there a parallel loop down s? More... | |
#define debug_print_control | ( | c, | |
w | |||
) |
Definition at line 49 of file compiler.c.
return the list of bounds
of expression
of expression
le | of expression |
Definition at line 133 of file compiler.c.
References array_distributed_p(), CONS, entity_name, EXPRESSION, expression_syntax, gen_length(), gen_nth(), hpfc_array_bound(), ith_dim_overlapable_p(), load_new_node(), NIL, NumberOfDimension(), pips_debug, reference_variable, syntax_reference, and syntax_reference_p.
Referenced by hpf_compile_call().
|
static |
Definition at line 326 of file compiler.c.
References control_statement, DEBUG_STAT, hpf_compiler(), make_control(), NIL, and SET_CONTROL_MAPPING.
Referenced by hpf_compile_unstructured().
|
static |
of statements
Definition at line 58 of file compiler.c.
References CONS, DEBUG_STAT, entity_name, gen_nreverse(), host_module, hpf_compiler(), instruction_block, instruction_block_p, is_instruction_block, MakeStatementLike(), MAP, NIL, node_module, pips_assert, STATEMENT, and statement_instruction.
Referenced by hpf_compiler().
|
static |
returned node version
IO functions should be detected earlier, in hpf_compiler
"kill" FC directive. tells that the array is dead, hence all copies are live...
of statement
no reference to distributed arrays... the call is just translated into local objects.
should consider read and written variables
of expressions
C1-ALPHA
reductions are detected here. They are not handled otherwise
C1-BETA
call to something with distributed variables, which is not an assignment. Since I do not use the effects as I should, nothing is done...
temporary (?:-) hack
of expressions
hoststatp | compiled statement |
nodestatp | returned host version |
Definition at line 175 of file compiler.c.
References array_distributed_p(), call_arguments, call_function, call_reduction_p(), caller_list_of_bounds(), CAR, CDR, compile_reduction(), CONS, copy_call(), dead_fcd_directive_p(), DEBUG_STAT, ENTITY_ASSIGN_P, entity_name, EXPRESSION, expression_syntax, expression_to_entity(), gen_nconc(), generate_all_liveness(), generate_c1_alpha(), generate_c1_beta(), host_module, instruction_block, instruction_call, instruction_call_p, IO_CALL_P, is_instruction_block, is_instruction_call, lUpdateExpr(), lUpdateExpr_but_distributed(), make_call(), MakeStatementLike(), MAP, NIL, node_module, pips_assert, pips_debug, pips_internal_error, ref_to_dist_array_p(), reference_variable, STATEMENT, statement_instruction, syntax_call, syntax_call_p, syntax_reference, syntax_reference_p, update_object_for_module(), and update_overlaps_in_caller().
Referenced by hpf_compiler().
|
static |
should verify that only listed in labels and distributed entities are defined inside the body of the loop
Definition at line 623 of file compiler.c.
References atomic_accesses_only_p(), entity_empty_label(), execution_parallel_p, full_copy_p(), generate_full_copy(), generate_subarray_shift(), hpf_compile_parallel_loop(), hpf_compile_sequential_loop(), indirections_inside_statement_p(), insert_comments_to_statement(), instruction_loop, loop_body, loop_execution, make_continue_statement(), make_empty_statement, NIL, Overlap_Analysis(), parallel_loop_in_stat_p(), pips_assert, pips_debug, statement_comments, statement_instruction, statement_loop_p(), string_undefined_p, and subarray_shift_p().
Referenced by hpf_compiler().
|
static |
??? dependances are not surely respected in the definitions list... should check that only locals variables, that are not replicated, may be defined during the body of the loop...
very partial
Definition at line 518 of file compiler.c.
References AddOnceToIndicesList(), copy_statement(), FindDefinitionsOf(), FindRefToDistArrayInStatement(), gen_free_list(), gen_length(), gen_nconc(), generate_parallel_body(), lIndicesOfRef(), make_block_statement(), and NIL.
Referenced by hpf_compile_parallel_loop().
|
static |
Definition at line 551 of file compiler.c.
References copy_statement(), entity_undefined, execution_parallel_p, FindRefToDistArrayInStatement(), gen_free_list(), hpf_compile_parallel_body(), instruction_loop, instruction_loop_p, is_execution_sequential, is_instruction_loop, loop_body, loop_execution, loop_index, loop_label, loop_range, make_continue_statement(), make_execution(), make_loop(), make_range(), MakeStatementLike(), NewVariableForModule(), NIL, node_module, pips_assert, range_increment, range_lower, range_upper, statement_instruction, statement_loop(), UpdateExpressionForModule(), and UU.
Referenced by hpf_compile_loop().
|
static |
of entities
??? memory leak, hostbody is lost whatever it was.
Definition at line 460 of file compiler.c.
References DEBUG_STAT, empty_code_p(), entity_undefined, host_module, hpf_compiler(), instruction_loop, is_execution_sequential, is_instruction_loop, lNewVariableForModule(), loop_body, loop_index, loop_label, loop_locals, loop_range, make_continue_statement(), make_execution(), make_loop(), make_range(), MakeStatementLike(), NewVariableForModule(), node_module, range_increment, range_lower, range_upper, statement_instruction, statement_loop(), UpdateExpressionForModule(), and UU.
Referenced by hpf_compile_loop().
if it may happen that a condition modifies the value of a distributed variable, this condition is to be put out of the statement, for separate compilation.
Definition at line 87 of file compiler.c.
References DEBUG_STAT, entity_name, host_module, hpf_compiler(), instruction_test, instruction_test_p, is_instruction_test, make_test(), MakeStatementLike(), node_module, pips_assert, statement_instruction, test_condition, test_false, test_true, and UpdateExpressionForModule().
Referenced by hpf_compiler().
|
static |
nothing spacial is done! ??? there may be a problem with the label of the statement, if any.
HOST statement
NODE statement
Definition at line 348 of file compiler.c.
References blocks, compile_control(), CONS, CONTROL, CONTROL_MAP, control_statement, control_undefined_p, debug_print_control, DEBUG_STAT, FREE_CONTROL_MAPPING, gen_free_list(), gen_in_list_p(), GET_CONTROL_MAPPING, hpf_compiler(), ifdebug, instruction_unstructured, instruction_unstructured_p, is_instruction_unstructured, MAKE_CONTROL_MAPPING, make_unstructured(), MakeStatementLike(), MAP, NIL, one_statement_unstructured, pips_assert, pips_debug, statement_instruction, unstructured_control, unstructured_exit, and update_control_lists().
Referenced by hpf_compiler().
what: compile a statement into a host and SPMD node code.
how: double code rewriting in a recursive traversal of stat. input: statement stat. output: statements *hoststatp and *nodestatp side effects: ? bugs or features:
of hpfc_reduction
necessary
remapping
HPF REDUCTION
else usual stuff
of statement
stat | tat |
hoststatp | oststatp |
nodestatp | odestatp |
Definition at line 710 of file compiler.c.
References bound_hpf_reductions_p(), bound_renamings_p(), compile_hpf_reduction(), CONS, DEBUG_STAT, gen_nconc(), get_current_module_statement(), handle_hpf_reduction(), hpf_compile_block(), hpf_compile_call(), hpf_compile_loop(), hpf_compile_test(), hpf_compile_unstructured(), instruction_tag, io_efficient_compile(), is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, load_statement_only_io(), make_block_statement(), NIL, pips_debug, pips_internal_error, remapping_compile(), root_statement_remapping_inits(), STATEMENT, and statement_instruction.
Referenced by compile_control(), compile_module(), hpf_compile_block(), hpf_compile_sequential_loop(), hpf_compile_test(), and hpf_compile_unstructured().
Definition at line 607 of file compiler.c.
References execution_parallel_p, gen_recurse_stop(), loop_execution, and parallel_loop_found.
Referenced by parallel_loop_in_stat_p().
Definition at line 615 of file compiler.c.
References gen_null(), gen_recurse, loop_domain, loop_flt(), and parallel_loop_found.
Referenced by hpf_compile_loop().
entity host_module |
HPFC - Fabien Coelho, May 1993 and later...
Compiler
stat is the current statement to be compiled, and there are pointers to the current statement building of the node and host codes. the module of these are also kept in order to add the needed declarations generated by the compilation.
however, every entities of the compiled program, and of both generated programs will be mixed, due to the tabulated nature of these objects. some objects will be shared. I don't think this is a problem. global variables
Definition at line 47 of file compiler.c.
Referenced by add_declaration_to_host_and_link(), AddCommonToHostAndNodeModules(), AddEntityToHostAndNodeModules(), compile_module(), generate_c1_beta(), generate_read_of_ref_for_all(), hpf_compile_block(), hpf_compile_call(), hpf_compile_sequential_loop(), hpf_compile_test(), hpfc_common_hook(), hpfc_module_suffix(), init_host_and_node_entities(), NewVariableForModule(), old_name(), put_generated_resources_for_common(), put_generated_resources_for_module(), and update_object_for_module().
entity node_module |
Definition at line 47 of file compiler.c.
Referenced by AddCommonToHostAndNodeModules(), AddEntityToHostAndNodeModules(), compile_module(), extract_lattice(), generate_c1_alpha(), generate_c1_beta(), generate_compute_local_indices(), generate_get_value_locally(), generate_hpf_remapping_file(), generate_optimized_code_for_loop_nest(), generate_parallel_body(), generate_read_of_ref_for_all(), generate_receive_from_computer(), generate_send_to_computer(), hpf_compile_block(), hpf_compile_call(), hpf_compile_parallel_loop(), hpf_compile_sequential_loop(), hpf_compile_test(), hpfc_module_suffix(), init_host_and_node_entities(), Overlap_Analysis(), put_generated_resources_for_common(), put_generated_resources_for_module(), st_compute_current_computer(), st_compute_current_owners(), and st_compute_ith_local_index().
|
static |
is there a parallel loop down s?
Definition at line 606 of file compiler.c.
Referenced by loop_flt(), and parallel_loop_in_stat_p().