PIPS
|
This file holds the generation of omp pragma for reductions. More...
Go to the source code of this file.
Variables | |
static const string | OMP_PRAGMA_FOR_HEADER_C = "omp parallel for" |
static const string | OMP_PRAGMA_FOR_HEADER_F = "omp parallel do" |
static const string | REDUCTION_KEYWORD = "reduction" |
static bool | all_reduction = false |
This file holds the generation of omp pragma for reductions.
Definition in file pragma.c.
|
static |
remenber if all the statement analazed are reduction since the last reset
stmt,the | statement to test for reduction |
Definition at line 43 of file pragma.c.
References all_reduction, and statement_is_reduction().
Referenced by reductions_get_omp_pragma_expr(), and reductions_get_omp_pragma_str().
l,the | loop to analyze for omp reduction |
exprs,the | pragma as a list of expression |
Definition at line 293 of file pragma.c.
References gen_expression_cons(), gen_length(), loop_private_variables_as_entites(), and pragma_private_as_expr().
Referenced by omp_pragma_expr_for(), and omp_pragma_expr_for_reduction().
|
static |
o | the reduction operator to analyze |
Definition at line 61 of file pragma.c.
References AND_OPERATOR_NAME, BITWISE_AND_OPERATOR_NAME, BITWISE_OR_OPERATOR_NAME, BITWISE_XOR_OPERATOR_NAME, C_AND_OPERATOR_NAME, C_OR_OPERATOR_NAME, CreateIntrinsic(), entity_undefined, EQUIV_OPERATOR_NAME, is_reduction_operator_and, is_reduction_operator_bitwise_and, is_reduction_operator_bitwise_or, is_reduction_operator_bitwise_xor, is_reduction_operator_csum, is_reduction_operator_eqv, is_reduction_operator_max, is_reduction_operator_min, is_reduction_operator_neqv, is_reduction_operator_none, is_reduction_operator_or, is_reduction_operator_prod, is_reduction_operator_sum, MAX_OPERATOR_NAME, MIN_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, NON_EQUIV_OPERATOR_NAME, OR_OPERATOR_NAME, pips_assert, pips_internal_error, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, prettyprint_language_is_fortran_p(), and reduction_operator_tag.
Referenced by reduction_as_expr().
|
static |
o | the reduction operator to analyze |
Definition at line 151 of file pragma.c.
References is_reduction_operator_and, is_reduction_operator_bitwise_and, is_reduction_operator_bitwise_or, is_reduction_operator_bitwise_xor, is_reduction_operator_csum, is_reduction_operator_eqv, is_reduction_operator_max, is_reduction_operator_min, is_reduction_operator_neqv, is_reduction_operator_none, is_reduction_operator_or, is_reduction_operator_prod, is_reduction_operator_sum, pips_assert, pips_internal_error, prettyprint_language_is_fortran_p(), reduction_operator_tag, and string_undefined.
Referenced by reduction_as_str().
generate "pragma omp for" as a list of expressions
l,the | loop to analyze for omp for |
stmt,the | statament where the pragma should be attached |
stmt | tmt |
Definition at line 366 of file pragma.c.
References add_pragma_expr_to_statement(), execution_parallel_p, loop_execution, omp_append_private_clause(), pips_debug, and pragma_omp_parallel_for_as_exprs().
Referenced by process_reductions_in_openmp_loop().
generate pragma for a reduction as a list of expressions
l,the | loop to analyze for omp reduction |
stmt,the | statament where the pragma should be attached |
strict,if | set to true, only one-liner statements with reductions are handled |
stmt | tmt |
strict | trict |
Definition at line 346 of file pragma.c.
References add_pragma_expr_to_statement(), omp_append_private_clause(), pips_debug, reductions_get_omp_pragma_expr(), and statement_remove_omp_clauses().
Referenced by process_reductions_in_openmp_loop().
|
static |
r | the reduction to process |
Definition at line 121 of file pragma.c.
References copy_reference(), CreateIntrinsic(), gen_expression_cons(), make_call(), make_expression(), make_reference(), make_syntax_call(), make_syntax_reference(), NIL, normalized_undefined, omp_operator_entity(), OMP_REDUCTION_FUNCTION_NAME, pips_debug, reduction_op, reduction_reference, and ref.
Referenced by reductions_get_omp_pragma_expr().
allocates and returns a string for reduction r
Definition at line 207 of file pragma.c.
References concatenate(), omp_operator_str(), pips_debug, REDUCTION_KEYWORD, reduction_op, reduction_reference, reference_to_string(), and strdup().
Referenced by reductions_get_omp_pragma_str().
pragma.c
stmt | tmt |
strict | trict |
Definition at line 227 of file pragma.c.
References all_reduction, compute_all_reduction(), FOREACH, gen_expression_cons(), gen_nconc(), gen_recurse, gen_true(), load_printed_reductions(), NIL, pips_debug, pragma_omp_parallel_for_as_exprs(), REDUCTION, reduction_as_expr(), reductions_list, reductions_on_scalar(), reset_all_reduction(), statement_domain, and statement_is_reduction().
Referenced by omp_pragma_expr_for_reduction().
l,the | loop associated with the statement |
stmt,the | statement to analyzed for reductions, must be a loop |
stmt | tmt |
Definition at line 259 of file pragma.c.
References all_reduction, buf, compute_all_reduction(), FOREACH, gen_recurse, gen_true(), load_printed_reductions(), OMP_PRAGMA_FOR_HEADER_C, OMP_PRAGMA_FOR_HEADER_F, pips_debug, prettyprint_language_is_fortran_p(), REDUCTION, reduction_as_str(), reductions_list, reductions_on_scalar(), reset_all_reduction(), statement_domain, statement_is_reduction(), strdup(), string_buffer_append(), string_buffer_free_all(), string_buffer_make(), and string_buffer_to_string().
|
static |
reds,the | reductions to analyze |
Definition at line 49 of file pragma.c.
References FOREACH, NIL, REDUCTION, reduction_reference, reductions_list, ref, and reference_indices.
Referenced by reductions_get_omp_pragma_expr(), and reductions_get_omp_pragma_str().
|
static |
reset the all_reduction flag
Definition at line 26 of file pragma.c.
References all_reduction.
Referenced by reductions_get_omp_pragma_expr(), and reductions_get_omp_pragma_str().
stmt,the | statement to test for reduction |
Definition at line 32 of file pragma.c.
References bound_printed_reductions_p(), gen_length(), load_printed_reductions(), and reductions_list.
Referenced by compute_all_reduction(), reductions_get_omp_pragma_expr(), and reductions_get_omp_pragma_str().
|
static |
Definition at line 304 of file pragma.c.
References call_function, entity_local_name(), exp, EXPRESSION, expression_call(), expression_call_p(), EXTENSION, extension_pragma, extensions_extension, FOREACH, gen_copy_seq(), gen_remove_once(), lname(), OMP_OMP_FUNCTION_NAME, OMP_PRIVATE_FUNCTION_NAME, OMP_REDUCTION_FUNCTION_NAME, pragma_expression, pragma_expression_p, pragma_string, pragma_string_p, same_string_p, and statement_extensions.
Referenced by omp_pragma_expr_for_reduction().
Definition at line 20 of file pragma.c.
Referenced by compute_all_reduction(), reductions_get_omp_pragma_expr(), reductions_get_omp_pragma_str(), and reset_all_reduction().
|
static |
Definition at line 15 of file pragma.c.
Referenced by reductions_get_omp_pragma_str().
|
static |
Definition at line 16 of file pragma.c.
Referenced by reductions_get_omp_pragma_str().
|
static |
Definition at line 17 of file pragma.c.
Referenced by reduction_as_str().