PIPS
|
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "naming.h"
#include "ri-util.h"
#include "properties.h"
Go to the source code of this file.
Variables | |
const string | FORTRAN_PRAGMA_HEADER = FORTRAN_PRAGMA_HEADER_STRING |
pragma.c More... | |
const string | FORTRAN_OMP_CONTINUATION = FORTRAN_OMP_CONTINUATION_STRING |
Add a pragma as a list of expression to a statement.
st,the | statement on which we want to add a pragma |
l,the | list of expression. |
Make a new pragma:
Add the new pragma to the extension list:
extern string pragma_to_string(pragma);
string str = pragma_to_string (p);
if (str != string_undefined)
pips_debug (5, "pragma : %s added\n", str);
st | t |
Definition at line 460 of file pragma.c.
References extensions_extension, gen_extension_cons(), ifdebug, make_extension_pragma(), make_pragma_expression(), pragma_undefined, and statement_extensions.
Referenced by merge_on_outer(), omp_pragma_expr_for(), and omp_pragma_expr_for_reduction().
Add a string as a pragma to a statement.
st,the | statement on which we want to add a pragma |
s,the | pragma string. |
copy_flag,to | be set to true to duplicate the string |
Duplicate string if requested
dangerous !
Make a new pragma
Will be save as an extension attached to the statement's extension list
st | t |
copy_flag | opy_flag |
Definition at line 425 of file pragma.c.
References extensions_extension, gen_extension_cons(), make_extension_pragma(), make_pragma_string(), statement_extensions, and strdup().
Referenced by add_pragma(), add_pragma_strings_to_statement(), add_pragma_to_sequence(), add_shutdown_pragma_to_return(), add_to_stmt(), compile_omp(), do_computation_intensity(), do_loop_expansion_init(), gen_omp_parallel(), gen_omp_taskwait(), gen_synchronization(), get_statement_pragma_init(), get_statement_pragma_register(), get_statement_pragma_shutdown(), insert_endscop_after_stmt(), insert_endscop_before_stmt(), insert_endscop_in_sequence(), insert_optional_pragma(), new_step_directive(), and normalize_microcode_anotate().
Add a list of strings as as many pragmas to a statement.
st,the | statement on which we want to add a pragma |
l,a | list of pragma string(s) |
copy_flag,to | be set to true to duplicate the string |
st | t |
copy_flag | opy_flag |
Definition at line 448 of file pragma.c.
References add_pragma_str_to_statement(), FOREACH, and STRING.
filter out a pragma (expression list) removing all requested variables @params l_expr is the list of expressions to filter @params to_filter is the list of entities to remove from l_pragma
pips_debug(5,"Handling expression : ");
print_expression(expr);
}
l_expr | of expr |
to_filter | of entities |
Definition at line 256 of file pragma.c.
References call_arguments, ENDP, ENTITY, entity_name, exp, EXPRESSION, expression_call(), expression_to_entity(), FOREACH, gen_expression_cons(), gen_remove(), is_expression_omp_for_p(), is_expression_omp_if_p(), is_expression_omp_omp_p(), is_expression_omp_parallel_p(), is_expression_omp_private_p(), is_expression_omp_reduction_p(), NIL, pips_debug, and pips_internal_error.
Referenced by merge_on_outer().
|
static |
Definition at line 88 of file pragma.c.
References AND_IF_POLICY, get_string_property(), IGNORE_IF_POLICY, and OR_IF_POLICY.
Referenced by pragma_omp_merge_expr().
|
static |
Definition at line 78 of file pragma.c.
References ENTITY_OMP_FOR_P, exp, and expression_to_entity().
Referenced by filter_variables_in_pragma_expr(), and pragma_omp_merge_expr().
|
static |
Definition at line 63 of file pragma.c.
References ENTITY_OMP_IF_P, exp, and expression_to_entity().
Referenced by filter_variables_in_pragma_expr(), and pragma_omp_merge_expr().
|
static |
Definition at line 73 of file pragma.c.
References ENTITY_OMP_OMP_P, exp, and expression_to_entity().
Referenced by filter_variables_in_pragma_expr(), and pragma_omp_merge_expr().
|
static |
Definition at line 83 of file pragma.c.
References ENTITY_OMP_PARALLEL_P, exp, and expression_to_entity().
Referenced by filter_variables_in_pragma_expr(), and pragma_omp_merge_expr().
|
static |
Definition at line 58 of file pragma.c.
References ENTITY_OMP_PRIVATE_P, exp, and expression_to_entity().
Referenced by filter_variables_in_pragma_expr(), and pragma_omp_merge_expr().
|
static |
Definition at line 68 of file pragma.c.
References ENTITY_OMP_REDUCTION_P, exp, and expression_to_entity().
Referenced by filter_variables_in_pragma_expr(), and pragma_omp_merge_expr().
|
static |
Definition at line 104 of file pragma.c.
References AND_IF_POLICY, AND_OPERATOR_NAME, C_AND_OPERATOR_NAME, C_OR_OPERATOR_NAME, CreateIntrinsic(), entity_undefined, expression_undefined, expressions_to_operation(), IGNORE_IF_POLICY, is_language_c, is_language_fortran, is_language_fortran95, language_tag, OR_IF_POLICY, OR_OPERATOR_NAME, and pips_internal_error.
Referenced by pragma_omp_merge_expr().
expression pragma_build_if_condition | ( | expression | cond, |
language | l | ||
) |
build the expression to be put in the if clause.
This functions takes care of the output language.
cond,the | condition to be compared to the threshold |
cond | ond |
Definition at line 159 of file pragma.c.
References C_GREATER_OR_EQUAL_OPERATOR_NAME, call_to_expression(), CreateIntrinsic(), entity_undefined, gen_expression_cons(), get_int_property(), GREATER_OR_EQUAL_OPERATOR_NAME, int_to_expression(), is_language_c, is_language_fortran, is_language_fortran95, language_tag, make_call(), NIL, and pips_internal_error.
Referenced by add_loop_parallel_threshold().
expression pragma_if_as_expr | ( | expression | arg | ) |
arg,the | condition to be evaluted by the if clause |
arg | rg |
Definition at line 184 of file pragma.c.
References call_to_expression(), CreateIntrinsic(), gen_expression_cons(), make_call(), NIL, and OMP_IF_FUNCTION_NAME.
Referenced by add_loop_parallel_threshold(), and pragma_omp_merge_expr().
merge omp pragma.
l_pragma,the | list of pragma to merge. The pragma as to be a list of expression ordered. The pragma list has to be ordered from the outer pragma to the inner pragma as in the original loop nest. |
outer_extensions | uter_extensions |
l_pragma | _pragma |
Definition at line 326 of file pragma.c.
References AND_IF_POLICY, call_arguments, exp, EXPRESSION, expression_call(), expression_equal_in_list_p(), EXTENSION, extension_pragma, FOREACH, gen_expression_cons(), gen_nconc(), get_if_clause_policy(), IGNORE_IF_POLICY, is_expression_omp_for_p(), is_expression_omp_if_p(), is_expression_omp_omp_p(), is_expression_omp_parallel_p(), is_expression_omp_private_p(), is_expression_omp_reduction_p(), merge_conditions(), NIL, OR_IF_POLICY, pips_assert, pips_internal_error, PRAGMA, pragma_expression, pragma_expression_p, pragma_if_as_expr(), pragma_omp_parallel_for_as_exprs(), pragma_private_as_expr_with_args(), set_add_element(), set_belong_p(), set_free(), set_make(), and set_pointer.
Referenced by merge_on_outer().
list pragma_omp_parallel_as_exprs | ( | void | ) |
Definition at line 215 of file pragma.c.
References CONS, CreateIntrinsic(), EXPRESSION, gen_expression_cons(), make_call(), make_expression(), make_syntax_call(), NIL, normalized_undefined, OMP_OMP_FUNCTION_NAME, and OMP_PARALLEL_FUNCTION_NAME.
Referenced by pragma_omp_parallel_for_as_exprs().
list pragma_omp_parallel_for_as_exprs | ( | void | ) |
Definition at line 236 of file pragma.c.
References CreateIntrinsic(), gen_expression_cons(), make_call(), make_expression(), make_syntax_call(), normalized_undefined, OMP_FOR_FUNCTION_NAME, and pragma_omp_parallel_as_exprs().
Referenced by omp_pragma_expr_for(), pragma_omp_merge_expr(), and reductions_get_omp_pragma_expr().
expression pragma_private_as_expr | ( | list | args_ent | ) |
arg,the | private variables as a list of entities |
args_ent | rgs_ent |
Definition at line 207 of file pragma.c.
References entities_to_expressions(), and pragma_private_as_expr_with_args().
Referenced by omp_append_private_clause().
expression pragma_private_as_expr_with_args | ( | list | args_expr | ) |
args_expr,the | private variables as a list of expression |
args_expr | rgs_expr |
Definition at line 196 of file pragma.c.
References CreateIntrinsic(), make_call(), make_expression(), make_syntax_call(), normalized_undefined, and OMP_PRIVATE_FUNCTION_NAME.
Referenced by pragma_omp_merge_expr(), and pragma_private_as_expr().
const string FORTRAN_OMP_CONTINUATION = FORTRAN_OMP_CONTINUATION_STRING |
const string FORTRAN_PRAGMA_HEADER = FORTRAN_PRAGMA_HEADER_STRING |