PIPS
atomizer.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/atomizer/atomizer-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef atomizer_header_included
7 #define atomizer_header_included
8 /* atomizer-local.h */
9 /*
10 
11  $Id: atomizer-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 /*
33  #define ATOMIZER_MODULE_NAME "ATOMIZE"
34  */
35 #define TMP_ENT 1
36 #define AUX_ENT 2
37 #define DOUBLE_PRECISION_SIZE 8
38 
39 /* During the computation, the program has to deal with blocks of statements.
40  * We define a new structure in order to have a simple control over all
41  * the manipulations of the blocks of statements.
42  *
43  * With this new structure we know the current statement being translated
44  * and the list of statements (ie the block) in which we put the new
45  * statements created.
46  */
47 typedef struct {
48  list last;
49  list first;
50  bool stmt_generated;
51  } Block;
52 /* The list "first" is a truncated list from the first to the current
53  * statement (not included).
54  * The list "last" is a truncated list from the current statement (included)
55  * to the last.
56  * The union of "first" and "last" is equal to the entire block.
57  *
58  * The bool "stmt_generated" says if the current statement has:
59  * _ true : already generated statements.
60  * _ false : not generated statements.
61  *
62  * Thus, when the current statement generates a new statement it is put at the
63  * end of the list "first" (just before the current statement).
64  * The current statement gives its caracteristics to the new one if the bool
65  * "stmt_generated" is false; this allows to keep these caracteristics
66  * at the first statement of the list generated by the translation of the
67  * current statement.
68  * The caracteristics of a statement are its "label", "number", "ordering" and
69  * "comments" (cf. RI).
70  */
71 
72 /* This global variable is used for the modification of the control graph,
73  * see commentaries of atomizer_of_unstructured() in atomizer.c.
74  */
75 extern list l_inst;
76 
77 // moved to ri-util/variable.c
78 // extern list integer_entities, real_entities, complex_entities,
79 // logical_entities, double_entities, char_entities;
80 
81 /* Mappings for the cumulated effects of statements. */
82 /* extern statement_mapping cumulated_effects_map;*/
83 /* cproto-generated files */
84 /* new_atomizer.c */
85 extern bool new_atomizer(char */*mod_name*/);
86 /* atomizer.c */
87 extern list l_inst;
88 extern hash_table MemToTmp;
89 extern void normalize_wp65_code(statement /*stat*/);
90 extern bool atomizer(const string /*mod_name*/);
92 extern void atomizer_of_statement(statement /*stmt*/, Block */*cb*/);
93 extern void atomizer_of_block(instruction /*i*/);
94 extern void atomizer_of_test(test /*t*/, Block */*cb*/);
95 extern void atomizer_of_loop(loop /*l*/, Block */*cb*/);
96 extern void atomizer_of_call(call /*c*/, Block */*cb*/);
97 extern void atomizer_of_intrinsic(call /*c*/, Block */*cb*/);
98 extern void atomizer_of_external(call /*c*/, Block */*cb*/);
99 extern list atomizer_of_expressions(list /*expl*/, Block */*cb*/);
100 extern expression atomizer_of_expression(expression /*exp*/, Block */*cb*/, int /*mem_var*/);
101 extern void atomizer_of_array_indices(expression /*exp*/, Block */*cb*/);
102 /* utils.c */
103 extern bool instruction_in_list_p(instruction /*inst*/, list /*l*/);
104 extern bool nlc_linear_expression_p(expression /*exp*/);
105 /* codegen.c */
106 extern void put_stmt_in_Block(statement /*new_stmt*/, Block */*cb*/);
107 extern expression assign_tmp_to_exp(expression /*exp*/, Block */*cb*/);
108 extern void insert_one_type_declaration(entity /*mod_entity*/, list /*var_to_decl*/, string /*type_decl*/);
109 extern void insert_new_declarations(char */*mod_name*/);
110 extern void store_expression(expression /*exp*/, Block */*cb*/);
111 /* control.c */
112 extern void modify_blocks(control /*c*/);
113 extern void atom_get_blocs(control /*c*/, cons **/*l*/);
114 extern control find_control_block(control /*c*/);
115 /* norm_exp.c */
116 extern void normal_expression_of_expression(expression /*exp*/);
117 extern void normal_expression_of_statement(statement /*s*/);
119 extern int get_nlc_number(entity /*nlc_ent*/);
120 extern void reconfig_expression(expression /*exp*/);
121 /* defs_elim.c */
122 extern bool true_dependence_with_entity_p(conflict /*conf*/, entity /*e*/);
123 extern bool defs_elim_of_assign_call(statement /*assign_stmt*/, graph /*dg*/);
124 extern bool defs_elim_of_statement(statement /*s*/, graph /*dg*/);
125 extern void defs_elim_of_unstructured(unstructured /*u*/, graph /*dg*/);
126 #endif /* atomizer_header_included */
bool true_dependence_with_entity_p(conflict, entity)
defs_elim.c
Definition: defs_elim.c:82
void atomizer_of_loop(loop, Block *)
===========================================================================
Definition: atomizer.c:603
expression assign_tmp_to_exp(expression, Block *)
===========================================================================
Definition: codegen.c:155
void atomizer_of_intrinsic(call, Block *)
===========================================================================
Definition: atomizer.c:699
int get_nlc_number(entity)
===========================================================================
Definition: norm_exp.c:198
void atomizer_of_call(call, Block *)
===========================================================================
Definition: atomizer.c:660
void atomizer_of_test(test, Block *)
===========================================================================
Definition: atomizer.c:543
bool defs_elim_of_statement(statement, graph)
===========================================================================
Definition: defs_elim.c:211
void atomizer_of_statement(statement, Block *)
===========================================================================
Definition: atomizer.c:381
void normalize_wp65_code(statement)
Definition: atomizer.c:161
void put_stmt_in_Block(statement, Block *)
codegen.c
Definition: codegen.c:89
void atom_get_blocs(control, cons **)
void normal_expression_of_statement(statement)
===========================================================================
Definition: norm_exp.c:123
void normal_expression_of_expression(expression)
norm_exp.c
Definition: norm_exp.c:72
void insert_new_declarations(char *)
===========================================================================
Definition: codegen.c:285
void modify_blocks(control)
control.c
Definition: control.c:51
void normal_expression_of_unstructured(unstructured)
===========================================================================
Definition: norm_exp.c:176
bool defs_elim_of_assign_call(statement, graph)
===========================================================================
Definition: defs_elim.c:136
list l_inst
The list "first" is a truncated list from the first to the current statement (not included).
Definition: atomizer.h:87
hash_table MemToTmp
These lists memorize all the new created entities of each type.
Definition: atomizer.c:95
void atomizer_of_block(instruction)
===========================================================================
Definition: atomizer.c:473
void atomizer_of_external(call, Block *)
===========================================================================
Definition: atomizer.c:753
expression atomizer_of_expression(expression, Block *, int)
===========================================================================
Definition: atomizer.c:849
bool instruction_in_list_p(instruction, list)
utils.c
Definition: utils.c:50
void insert_one_type_declaration(entity, list, string)
===========================================================================
Definition: codegen.c:229
control find_control_block(control)
===========================================================================
Definition: control.c:115
bool nlc_linear_expression_p(expression)
===========================================================================
Definition: utils.c:78
list atomizer_of_expressions(list, Block *)
===========================================================================
Definition: atomizer.c:811
void atomizer_of_array_indices(expression, Block *)
===========================================================================
Definition: atomizer.c:932
bool new_atomizer(char *)
Mappings for the cumulated effects of statements.
Definition: new_atomizer.c:164
void atomizer_of_unstructured(unstructured)
void defs_elim_of_unstructured(unstructured, graph)
===========================================================================
Definition: defs_elim.c:291
bool atomizer(const string)
===========================================================================
Definition: atomizer.c:226
void store_expression(expression, Block *)
===========================================================================
Definition: codegen.c:335
void reconfig_expression(expression)
===========================================================================
Definition: norm_exp.c:334
During the computation, the program has to deal with blocks of statements.
The structure used to build lists in NewGen.
Definition: newgen_list.h:41