PIPS
|
#include <stdarg.h>
#include "defines-local.h"
#include "syntax.h"
#include "c_syntax.h"
#include "workspace-util.h"
#include "prettyprint.h"
Go to the source code of this file.
Macros | |
#define | STEP_RT_INTEGER4 DEFAULT_INTEGER_TYPE_SIZE |
#define | STEP_RT_INTEGER8 DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE |
#define | STEP_RT_SYMBOLIC_INTEGER STEP_RT_INTEGER4 |
#define | STEP_RT_ARRAY_INDEX_INTEGER STEP_RT_INTEGER4 |
#define | STEP_RT_LOOP_INDEX_INTEGER STEP_RT_INTEGER4 |
Variables | |
set | step_created_entity = set_undefined |
set | step_created_symbolic = set_undefined |
static list | local_declaration = NIL |
#define STEP_RT_ARRAY_INDEX_INTEGER STEP_RT_INTEGER4 |
Definition at line 22 of file compile_RT.c.
#define STEP_RT_INTEGER4 DEFAULT_INTEGER_TYPE_SIZE |
Definition at line 18 of file compile_RT.c.
#define STEP_RT_INTEGER8 DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE |
Definition at line 19 of file compile_RT.c.
#define STEP_RT_LOOP_INDEX_INTEGER STEP_RT_INTEGER4 |
Definition at line 23 of file compile_RT.c.
#define STEP_RT_SYMBOLIC_INTEGER STEP_RT_INTEGER4 |
Definition at line 21 of file compile_RT.c.
statement build_call_STEP_AllToAll | ( | entity | module, |
entity | array, | ||
bool | is_partial, | ||
bool | is_interlaced | ||
) |
Pourquoi register ?
Full communications
module | odule |
array | rray |
is_partial | s_partial |
is_interlaced | s_interlaced |
Definition at line 640 of file compile_RT.c.
References array, call_STEP_subroutine2(), entity_to_expression(), free(), module, RT_STEP_alltoall_full, RT_STEP_alltoall_full_interlaced, RT_STEP_alltoall_partial_interlaced, RT_STEP_register_alltoall_partial, STEP_NBLOCKING_ALG_NAME, step_symbolic_expression(), STEP_TAG_DEFAULT_NAME, and strdup().
Referenced by generate_call_stepalltoall().
statement build_call_STEP_flush | ( | void | ) |
Definition at line 758 of file compile_RT.c.
References call_STEP_subroutine2(), and RT_STEP_flush.
Referenced by generate_call_flush().
array | rray |
Definition at line 600 of file compile_RT.c.
References array, CONS, copy_expression(), DIMENSION, dimension_lower, dimension_upper, entity_name, entity_to_expression(), entity_type, entity_undefined, EXPRESSION, FOREACH, gen_length(), gen_nreverse(), int_to_expression(), make_call_statement(), NIL, pips_assert, pips_debug, RT_STEP_init_arrayregions, step_type(), string_undefined, type_variable, unbounded_dimension_p(), and variable_dimensions.
Referenced by generate_call_init_regionArray().
statement build_call_STEP_set_recvregions | ( | entity | user_array, |
expression | expr_nb_workchunk, | ||
entity | regions_array | ||
) |
user_array | ser_array |
expr_nb_workchunk | xpr_nb_workchunk |
regions_array | egions_array |
Definition at line 736 of file compile_RT.c.
References call_STEP_subroutine2(), cast_STEP_ARG(), entity_to_expression(), pips_debug, and RT_STEP_set_recvregions.
Referenced by generate_call_set_regionarray().
statement build_call_STEP_set_sendregions | ( | entity | user_array, |
expression | expr_nb_workchunk, | ||
entity | regions_array, | ||
bool | is_interlaced, | ||
bool | is_reduction | ||
) |
user_array | ser_array |
expr_nb_workchunk | xpr_nb_workchunk |
regions_array | egions_array |
is_interlaced | s_interlaced |
is_reduction | s_reduction |
Definition at line 701 of file compile_RT.c.
References call_STEP_subroutine2(), cast_STEP_ARG(), entity_to_expression(), free(), pips_debug, RT_STEP_set_interlaced_sendregions, RT_STEP_set_reduction_sendregions, RT_STEP_set_sendregions, and strdup().
Referenced by generate_call_set_regionarray().
comm_stmt | omm_stmt |
Definition at line 681 of file compile_RT.c.
References call_STEP_subroutine2(), comment(), concatenate(), CONS, ENDP, entity_undefined, gen_nconc(), make_block_statement(), make_continue_statement(), NIL, put_a_comment_on_a_statement(), RT_STEP_flush, STATEMENT, and strdup().
name | ame |
args | rgs |
Definition at line 857 of file compile_RT.c.
References CONS, entity_to_expression(), entity_undefined, entity_undefined_p, EXPRESSION, gen_nconc(), make_call_statement(), NIL, pips_assert, pips_debug, STEP_DEBUG_STATEMENT, step_type(), and string_undefined.
name | ame |
Definition at line 819 of file compile_RT.c.
References CONS, entity_undefined, EXPRESSION, gen_nreverse(), make_call_statement(), NIL, pips_debug, STEP_DEBUG_STATEMENT, and string_undefined.
Referenced by build_call_STEP_AllToAll(), build_call_STEP_flush(), build_call_STEP_set_recvregions(), build_call_STEP_set_sendregions(), build_call_STEP_WaitAll(), compile_barrier(), compile_master(), compile_reduction(), generate_call_compute_loopslices(), generate_call_construct_begin_construct_end(), generate_call_get_commsize(), generate_call_get_rank(), generate_call_get_rank_loopbounds(), generate_call_get_workchunk_loopbounds(), and step_compile_analysed_module().
name | ame |
Definition at line 781 of file compile_RT.c.
References ADDRESS_OF_OPERATOR_NAME, CONS, entity_intrinsic(), entity_scalar_p(), entity_to_expression(), entity_type, entity_undefined, EXPRESSION, fortran_module_p(), gen_nreverse(), get_current_module_entity(), make_call_statement(), MakeUnaryCall(), NIL, pips_debug, STEP_DEBUG_STATEMENT, string_undefined, and type_variable_p.
|
static |
Definition at line 40 of file compile_RT.c.
References compilation_unit_of_module(), entity_storage, FindOrCreateEntity(), fortran_module_p(), get_current_module_entity(), get_current_module_name(), make_basic_pointer(), make_basic_typedef(), make_storage_rom(), MakeCastExpression(), MakeTypeVariable(), NIL, put_new_typedef(), storage_undefined_p, and TYPEDEF_PREFIX.
Referenced by build_call_STEP_set_recvregions(), and build_call_STEP_set_sendregions().
void check_entity_step_type | ( | entity | data | ) |
Definition at line 845 of file compile_RT.c.
References entity_undefined_p, pips_assert, pips_debug, and step_type().
Referenced by compile_reduction().
new_module | ew_module |
loop_stmt | oop_stmt |
Definition at line 176 of file compile_RT.c.
References call_STEP_subroutine2(), entity_to_expression(), get_entity_step_commsize(), loop_range, pips_debug, range_increment, range_lower, range_upper, and RT_STEP_compute_loopslices.
Referenced by compile_loopslices().
void generate_call_construct_begin_construct_end | ( | entity | new_module, |
step_directive | drt, | ||
statement | mpi_begin_stmt, | ||
statement | mpi_end_stmt | ||
) |
new_module | ew_module |
drt | rt |
mpi_begin_stmt | pi_begin_stmt |
mpi_end_stmt | pi_end_stmt |
Definition at line 60 of file compile_RT.c.
References call_STEP_subroutine2(), directive_txt, free(), get_step_directive_name(), insert_statement(), RT_STEP_construct_begin, RT_STEP_construct_end, step_symbolic_expression(), and string_undefined_p.
Referenced by compile_body().
void generate_call_flush | ( | statement * | stepalltoall_stmt | ) |
stepalltoall_stmt | tepalltoall_stmt |
Definition at line 85 of file compile_RT.c.
References build_call_STEP_flush(), ENDP, insert_statement(), pips_debug, and statement_block().
Referenced by compile_regions().
new_module | ew_module |
Definition at line 193 of file compile_RT.c.
References call_STEP_subroutine2(), entity_to_expression(), get_entity_step_commsize(), get_expression_addr(), pips_debug, and RT_STEP_get_commsize.
Referenced by compile_loopslices().
new_module | ew_module |
Definition at line 161 of file compile_RT.c.
References call_STEP_subroutine2(), entity_to_expression(), get_entity_step_rank(), get_expression_addr(), rank, and RT_STEP_get_rank.
Referenced by compile_loopbounds().
new_module | ew_module |
loop_stmt | oop_stmt |
Definition at line 138 of file compile_RT.c.
References call_STEP_subroutine2(), entity_to_expression(), get_entity_step_rank(), get_expression_addr(), loop_index, pips_debug, RT_STEP_get_loopbounds, STEP_BOUNDS_LOW, STEP_BOUNDS_UP, and step_local_loop_index().
Referenced by compile_loopbounds().
void generate_call_get_workchunk_loopbounds | ( | entity | mpi_module, |
loop | loop_stmt, | ||
statement * | compute_regions_stmt | ||
) |
mpi_module | pi_module |
loop_stmt | oop_stmt |
compute_regions_stmt | ompute_regions_stmt |
Definition at line 119 of file compile_RT.c.
References call_STEP_subroutine2(), entity_to_expression(), get_expression_addr(), insert_statement(), int_to_expression(), loop_index, make_op_exp(), pips_debug, PLUS_OPERATOR_NAME, RT_STEP_get_loopbounds, STEP_BOUNDS_LOW, STEP_BOUNDS_UP, step_local_loop_index(), and step_local_slice_index().
Referenced by add_workchunk_loop().
void generate_call_init_regionArray | ( | list | referenced_entities, |
statement | before, | ||
statement __attribute__((unused)) | after | ||
) |
Definition at line 210 of file compile_RT.c.
References build_call_STEP_init_regionArray(), CONS, ENTITY, entity_name, entity_scalar_p(), entity_type, FOREACH, gen_nreverse(), insert_statement(), make_block_statement(), NIL, pips_debug, STATEMENT, and type_variable_p.
Referenced by compile_body().
ATTENTION recrée alors qu'avant réutilisé
mpi_module | pi_module |
compute_regions_stmt | ompute_regions_stmt |
Definition at line 101 of file compile_RT.c.
References entity_empty_label(), entity_to_expression(), get_entity_step_commsize(), insert_statement(), instruction_to_statement(), int_to_expression(), make_empty_block_statement(), make_execution_sequential(), make_instruction_loop(), make_loop(), make_range(), NIL, and step_local_slice_index().
Referenced by add_workchunk_loop().
Que signifie local?
module | odule |
Definition at line 519 of file compile_RT.c.
References entity_name, entity_scalar_p(), entity_type, module, NIL, pips_assert, pips_debug, STEP_COMM_SIZE_NAME, step_local_RT_Integer(), STEP_RT_ARRAY_INDEX_INTEGER, and type_variable_p.
Referenced by generate_call_compute_loopslices(), generate_call_get_commsize(), generate_call_set_regionarray(), and generate_loop_workchunk().
module | odule |
Definition at line 513 of file compile_RT.c.
References module, NIL, STEP_COMM_RANK_NAME, step_local_RT_Integer(), and STEP_RT_ARRAY_INDEX_INTEGER.
Referenced by compile_master(), generate_call_get_rank(), and generate_call_get_rank_loopbounds().
expression get_expression_addr | ( | expression | expr | ) |
Used to add & in front of variable name for C modules: var —> &var
expr | xpr |
Definition at line 27 of file compile_RT.c.
References ADDRESS_OF_OPERATOR_NAME, entity_intrinsic(), fortran_module_p(), get_current_module_entity(), and MakeUnaryCall().
Referenced by compile_master(), compile_reduction(), generate_call_get_commsize(), generate_call_get_rank(), generate_call_get_rank_loopbounds(), and generate_call_get_workchunk_loopbounds().
void set_RT_add_local | ( | entity | e | ) |
Definition at line 247 of file compile_RT.c.
References set_add_element(), set_make(), set_pointer, set_undefined_p, and step_created_entity.
Referenced by step_local_RT_Integer(), and step_parameter().
|
static |
Definition at line 277 of file compile_RT.c.
References set_add_element(), set_make(), set_pointer, set_undefined_p, and step_created_symbolic.
Referenced by step_parameter().
expression step_function | ( | string | name, |
list | args | ||
) |
name | ame |
args | rgs |
Definition at line 359 of file compile_RT.c.
References concatenate(), entity_domain, entity_type, entity_undefined_p, gen_find_tabulated(), make_call_expression(), MODULE_SEP_STRING, pips_assert, TOP_LEVEL_MODULE_NAME, and type_functional_p.
module | odule |
name | ame |
Definition at line 534 of file compile_RT.c.
References module, NIL, step_local_RT_Integer(), and STEP_RT_LOOP_INDEX_INTEGER.
Referenced by generate_call_get_rank_loopbounds(), generate_call_get_workchunk_loopbounds(), loop_basic_workchunk_to_workchunk(), and loopbounds_substitution().
module | odule |
Definition at line 499 of file compile_RT.c.
References CONS, DIMENSION, int_to_expression(), make_dimension(), module, NIL, STEP_INDEX_SLICE_LOW_NAME, STEP_INDEX_SLICE_UP_NAME, step_local_RT_Integer(), STEP_LOOPSLICES_NAME, STEP_MAX_NB_LOOPSLICES_NAME, STEP_RT_LOOP_INDEX_INTEGER, and step_symbolic_expression().
entity step_local_regionArray | ( | entity | module, |
entity | array, | ||
string | region_array_name, | ||
expression | expr_nb_region | ||
) |
module | odule |
array | rray |
region_array_name | egion_array_name |
expr_nb_region | xpr_nb_region |
Definition at line 428 of file compile_RT.c.
References array, CONS, CreateIntrinsic(), DIMENSION, entity_name, entity_variable_p, expression_undefined_p, fortran_module_p(), free(), get_current_module_entity(), int_to_expression(), make_dimension(), MakeBinaryCall(), MINUS_C_OPERATOR_NAME, module, NIL, NumberOfDimension(), pips_assert, pips_debug, STEP_INDEX_SLICE_LOW_NAME, STEP_INDEX_SLICE_UP_NAME, step_local_RT_Integer(), STEP_RT_ARRAY_INDEX_INTEGER, step_symbolic_expression(), and strdup().
Referenced by region_to_statement().
|
static |
Definition at line 386 of file compile_RT.c.
References ABSTRACT_LOCATION, add_variable_to_area(), CONS, DYNAMIC_AREA_LOCAL_NAME, ENTITY, entity_kind, entity_name, entity_storage, entity_type, entity_undefined_p, entity_user_name(), entity_variable_p, FindOrCreateEntity(), free(), gen_nconc(), get_current_module_entity(), local_declaration, make_basic_int(), make_ram(), make_storage_ram(), MakeTypeVariable(), NIL, pips_assert, pips_debug, set_RT_add_local(), strdup(), and type_undefined_p.
Referenced by get_entity_step_commsize(), get_entity_step_rank(), step_local_loop_index(), step_local_loopSlices(), step_local_regionArray(), and step_local_slice_index().
module | odule |
Definition at line 486 of file compile_RT.c.
References module, NIL, step_local_RT_Integer(), STEP_RT_ARRAY_INDEX_INTEGER, and STEP_SLICE_INDEX_NAME.
Referenced by compute_region(), generate_call_get_workchunk_loopbounds(), and generate_loop_workchunk().
entity step_parameter | ( | string | name_, |
entity | module, | ||
expression | expr | ||
) |
Fortran PARAMETER (TEST = expr)
C const int TEST=1
DT74 "TOP-LEVEL:TEST"T77 2 T80 T31 0 4 )()(T63 0 U))))T70 1 T64 R74 "TOP-LEVEL:TOP-LEVEL" R74 "TOP-LEVEL:*STATIC*" 0 ()))T79 5 T44 T73 2 T33 R74 "TOP-LEVEL:1"
T77: type T80: variable T31: basic 0: int T63: qualifier 0: const T70: storage 1: ram T64: ram T79: value 5: expression T44:Expression T73: syntax 2: call T33:call R74: entity"TOP-LEVEL:1"
name_ | ame_ |
module | odule |
expr | xpr |
Definition at line 285 of file compile_RT.c.
References ABSTRACT_LOCATION, add_C_variable_to_area(), AddEntityToModuleCompilationUnit(), compilation_unit_of_module(), CONS, entity_initial, entity_kind, entity_storage, entity_symbolic_p, entity_type, entity_undefined_p, entity_user_name(), expression_undefined_p, FindOrCreateEntity(), fortran_module_p(), free(), get_current_module_entity(), get_current_module_name(), get_top_level_entity(), int_to_expression(), is_type_variable, make_basic_int(), make_qualifier_const(), make_ram(), make_storage_ram(), make_type(), make_value_expression(), make_variable(), MakeParameter(), MakeTypeVariable(), module, NIL, pips_assert, QUALIFIER, set_RT_add_local(), STATIC_AREA_LOCAL_NAME, step_add_created_symbolic(), STEP_RT_SYMBOLIC_INTEGER, strdup(), TOP_LEVEL_MODULE_NAME, and type_undefined_p.
Referenced by step_symbolic().
void step_RT_clean_local | ( | void | ) |
reinitialisation du type sinon, la recompilation echoue
Definition at line 255 of file compile_RT.c.
References entity_initial, entity_storage, entity_type, free_storage(), free_type(), free_value(), set_clear(), SET_FOREACH, set_undefined_p, step_created_entity, storage_undefined, type_undefined, type_undefined_p, and value_undefined.
Referenced by compile_mpi().
module | odule |
body | ody |
Definition at line 376 of file compile_RT.c.
References AddLocalEntityToDeclarations(), ENTITY, FOREACH, local_declaration, module, and NIL.
Referenced by compile_mpi().
name | ame |
module | odule |
Definition at line 348 of file compile_RT.c.
References expression_undefined, module, and step_parameter().
Referenced by step_symbolic_expression().
expression step_symbolic_expression | ( | string | name, |
entity | module | ||
) |
name | ame |
module | odule |
Definition at line 353 of file compile_RT.c.
References entity_to_expression(), module, and step_symbolic().
Referenced by bound_to_statement(), build_call_STEP_AllToAll(), generate_call_construct_begin_construct_end(), region_to_statement(), step_local_loopSlices(), and step_local_regionArray().
Definition at line 542 of file compile_RT.c.
References basic_complex, basic_float, basic_int, basic_tag, entity_name, entity_type, entity_undefined, entity_undefined_p, is_basic_complex, is_basic_float, is_basic_int, is_basic_string, MakeConstant(), pips_assert, pips_debug, pips_user_error, STEP_COMPLEX16_NAME, STEP_COMPLEX8_NAME, STEP_INTEGER1_NAME, STEP_INTEGER2_NAME, STEP_INTEGER4_NAME, STEP_INTEGER8_NAME, STEP_REAL4_NAME, STEP_REAL8_NAME, type_variable, type_variable_p, and variable_basic.
Referenced by build_call_STEP_init_regionArray(), call_STEP_subroutine(), check_entity_step_type(), and compile_reduction().
Definition at line 374 of file compile_RT.c.
Referenced by step_local_RT_Integer(), and step_RT_set_local_declarations().
set step_created_entity = set_undefined |
Definition at line 245 of file compile_RT.c.
Referenced by loop_basic_workchunk_to_workchunk(), set_RT_add_local(), step_RT_clean_local(), and update_referenced_entities().
set step_created_symbolic = set_undefined |
Definition at line 276 of file compile_RT.c.
Referenced by step_add_created_symbolic(), and update_referenced_entities().