PIPS
reductions.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/reductions/reductions-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef reductions_header_included
7 #define reductions_header_included
8 /* reductions-local.h */
9 /*
10 
11  $Id: reductions-local.h 23065 2016-03-02 09:05:50Z coelho $
12 
13  Copyright 1989-2016 MINES ParisTech
14 
15  This file is part of PIPS.
16 
17  PIPS is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  any later version.
21 
22  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
23  WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE.
25 
26  See the GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
30 
31 */
32 #include "reductions_private.h"
33 /* shorthands for REDUCTION:
34  */
35 #define reduction_variable(r) reference_variable(reduction_reference(r))
36 #define reduction_none_p(r) reduction_operator_none_p(reduction_op(r))
37 #define reduction_tag(r) reduction_operator_tag(reduction_op(r))
38 #define make_none_reduction(var) \
39  make_reduction(make_reference(var, NIL), \
40  make_reduction_operator(is_reduction_operator_none, UU),\
41  NIL, NIL)
42 
43 /* quick debug macros
44  */
45 #define DEBUG_REDUCTION(level, msg, red) \
46  ifdebug(level){pips_debug(level, msg); print_reduction(red);}
47 #define DEBUG_REDUCTIONS(level, msg, reds) \
48  ifdebug(level){pips_debug(level, msg); \
49  gen_map(print_reduction, reductions_list(reds));}
50 
51 /* end of it
52  */
53 
54 
55 
56 /* cproto-generated files */
57 /* atomic.c */
58 extern bool replace_reduction_with_atomic(string /*mod_name*/);
59 extern bool flag_parallel_reduced_loops_with_atomic(string /*mod_name*/);
60 extern bool flag_parallel_reduced_loops_with_openmp_directives(const char */*mod_name*/);
61 /* stub.c */
62 extern bool old_reductions(string /*mod_name*/);
63 /* reductions.c */
65 extern bool summary_reductions(const char */*module_name*/);
67 extern void reset_proper_reductions(void);
71 extern void init_proper_reductions(void);
72 extern void close_proper_reductions(void);
73 extern void store_proper_reductions(statement /*k*/, reductions /*v*/);
74 extern void update_proper_reductions(statement /*k*/, reductions /*v*/);
79 extern bool proper_reductions(const char */*module_name*/);
81 extern void reset_cumulated_reductions(void);
85 extern void init_cumulated_reductions(void);
86 extern void close_cumulated_reductions(void);
93 extern bool cumulated_reductions(const char */*module_name*/);
95 extern bool same_reduction_p(reduction /*r1*/, reduction /*r2*/);
96 /* utils.c */
97 extern bool reduction_star_p(reduction /*r*/);
98 extern void remove_variable_from_reduction(reduction /*red*/, entity /*var*/);
99 extern bool update_reduction_under_effect(reduction /*red*/, effect /*eff*/);
100 extern bool update_compatible_reduction_with(reduction */*pr*/, entity /*var*/, reduction /*r*/);
101 extern bool update_compatible_reduction(reduction */*pr*/, entity /*var*/, list /*le*/, reductions /*reds*/);
102 extern bool pure_function_p(entity /*f*/);
103 extern bool no_other_effects_on_references(statement /*s*/, list /*lr*/);
104 extern bool call_proper_reduction_p(statement /*s*/, call /*c*/, reduction */*red*/);
105 extern expression get_complement_expression(statement /*s*/, reference /*reduced*/);
106 /* transformation.c */
107 extern bool loop_reductions(string /*module*/);
108 /* pragma.c */
109 extern list reductions_get_omp_pragma_expr(loop /*l*/, statement /*stmt*/, bool /*strict*/);
110 extern string reductions_get_omp_pragma_str(loop /*l*/, statement /*stmt*/);
111 extern bool omp_pragma_expr_for_reduction(loop /*l*/, statement /*stmt*/, bool /*strict*/);
112 extern bool omp_pragma_expr_for(loop /*l*/, statement /*stmt*/);
113 /* prettyprint.c */
115 extern void reset_printed_reductions(void);
119 extern void init_printed_reductions(void);
120 extern void close_printed_reductions(void);
127 extern string note_for_statement(statement /*s*/);
128 extern string reduction_operator_tag_name(tag /*t*/);
129 extern string reduction_operator_name(reduction_operator /*o*/);
130 extern string reduction_name(reduction /*r*/);
131 extern void print_reduction(reduction /*r*/);
132 extern bool print_code_proper_reductions(const char */*module_name*/);
133 extern bool print_code_cumulated_reductions(const char */*module_name*/);
134 /* call.c */
135 extern list summary_to_proper_reference(call /*c*/, reference /*r*/);
136 extern list translate_reductions(call /*c*/);
137 /* propagation.c */
138 extern bool reduction_propagation(const char */*mod_name*/);
139 extern bool reduction_detection(const char */*mod_name*/);
140 #endif /* reductions_header_included */
int tag
TAG.
Definition: newgen_types.h:92
reductions delete_printed_reductions(statement)
void close_cumulated_reductions(void)
bool reduction_propagation(const char *)
propagation.c
Definition: propagation.c:125
bool bound_proper_reductions_p(statement)
void update_proper_reductions(statement, reductions)
bool cumulated_reductions_undefined_p(void)
bool flag_parallel_reduced_loops_with_atomic(string)
Flag loop as parallel when replacement with atomic is possible without doing the replacement.
Definition: atomic.c:411
void store_or_update_proper_reductions(statement, reductions)
void reset_cumulated_reductions(void)
void update_cumulated_reductions(statement, reductions)
void init_proper_reductions(void)
void set_printed_reductions(pstatement_reductions)
void error_reset_printed_reductions(void)
void store_printed_reductions(statement, reductions)
void remove_variable_from_reduction(reduction, entity)
Definition: utils.c:130
void error_reset_proper_reductions(void)
bool reduction_star_p(reduction)
utils.c
Definition: utils.c:46
bool reduction_detection(const char *)
Definition: propagation.c:245
void set_cumulated_reductions(pstatement_reductions)
void store_or_update_cumulated_reductions(statement, reductions)
void init_cumulated_reductions(void)
bool update_compatible_reduction(reduction *, entity, list, reductions)
what to do with reduction *pr for variable var under effects le and reductions reds.
Definition: utils.c:285
bool proper_reductions_undefined_p(void)
bool flag_parallel_reduced_loops_with_openmp_directives(const char *)
Flag loop as parallel with OpenMP directives taking reductions into account.
Definition: atomic.c:426
bool cumulated_reductions(const char *)
handler for pipsmake input: the module name output: TRUE side effects: some
Definition: reductions.c:529
string reduction_operator_name(reduction_operator)
allocates and returns the name of the operator
Definition: prettyprint.c:103
pstatement_reductions get_printed_reductions(void)
pstatement_reductions get_proper_reductions(void)
reductions load_printed_reductions(statement)
string note_for_statement(statement)
generates a short note to tell about the type of the statement being decorated.
Definition: prettyprint.c:55
void close_proper_reductions(void)
void reset_printed_reductions(void)
bool omp_pragma_expr_for(loop, statement)
generate "pragma omp for" as a list of expressions
Definition: pragma.c:366
bool bound_printed_reductions_p(statement)
bool bound_cumulated_reductions_p(statement)
void store_or_update_printed_reductions(statement, reductions)
reductions delete_proper_reductions(statement)
string reductions_get_omp_pragma_str(loop, statement)
Definition: pragma.c:259
reductions load_summary_reductions(entity)
reductions.c
Definition: reductions.c:55
bool loop_reductions(string)
transformation.c
bool call_proper_reduction_p(statement, call, reduction *)
This function look for a reduction and return it if found mallocs are avoided if nothing is found....
Definition: utils.c:633
bool no_other_effects_on_references(statement, list)
checks that the references are the only touched within this statement.
Definition: utils.c:596
bool printed_reductions_undefined_p(void)
prettyprint.c
bool replace_reduction_with_atomic(string)
end of it
Definition: atomic.c:397
reductions load_cumulated_reductions(statement)
bool pure_function_p(entity)
extract the proper reduction of a call (instruction) if any.
Definition: utils.c:343
void print_reduction(reduction)
Definition: prettyprint.c:137
void update_printed_reductions(statement, reductions)
reductions load_proper_reductions(statement)
entity reduction_operator_entity(reduction_operator)
match a reduction operator against operator entity
Definition: reductions.c:577
void reset_proper_reductions(void)
pstatement_reductions get_cumulated_reductions(void)
list summary_to_proper_reference(call, reference)
call.c
Definition: call.c:45
void error_reset_cumulated_reductions(void)
string reduction_operator_tag_name(tag)
returns a (static) string describing the tag t reduction
Definition: prettyprint.c:78
void init_printed_reductions(void)
void store_proper_reductions(statement, reductions)
bool old_reductions(string)
stub.c
Definition: stub.c:63
bool same_reduction_p(reduction, reduction)
Definition: reductions.c:611
void close_printed_reductions(void)
bool print_code_proper_reductions(const char *)
Handlers for PIPSMAKE.
Definition: prettyprint.c:249
list reductions_get_omp_pragma_expr(loop, statement, bool)
pragma.c
Definition: pragma.c:227
bool proper_reductions(const char *)
handler for pipsmake input: module name output: TRUE side effects: some
Definition: reductions.c:359
string reduction_name(reduction)
returns the name of the reduction (!!! not allocated)
Definition: prettyprint.c:110
bool print_code_cumulated_reductions(const char *)
Definition: prettyprint.c:258
bool update_reduction_under_effect(reduction, effect)
Definition: utils.c:155
bool update_compatible_reduction_with(reduction *, entity, reduction)
update *pr according to r for variable var r is not touched.
Definition: utils.c:260
bool omp_pragma_expr_for_reduction(loop, statement, bool)
generate pragma for a reduction as a list of expressions
Definition: pragma.c:346
void set_proper_reductions(pstatement_reductions)
bool summary_reductions(const char *)
handler for pipsmake input: module name output: TRUE side effects: stores the summary reductions to p...
Definition: reductions.c:106
list translate_reductions(call)
of reduction
Definition: call.c:112
reductions delete_cumulated_reductions(statement)
expression get_complement_expression(statement, reference)
Return the "other part" of the reduction.
Definition: utils.c:743
void store_cumulated_reductions(statement, reductions)
The structure used to build lists in NewGen.
Definition: newgen_list.h:41