PIPS
rice.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/rice/rice-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef rice_header_included
7 #define rice_header_included
8 /* rice-local.h */
9 /*
10 
11  $Id: rice-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 /* macros */
33 #define VERTEX_ENCLOSING_SCC(v) \
34  sccflags_enclosing_scc(dg_vertex_label_sccflags((dg_vertex_label) \
35  vertex_vertex_label(v)))
36 
37 
38 /* a macro to insert an element at the end of a list. c is the element
39 to insert. bl and el are pointers to the begining and the end of the
40 list. */
41 
42 #define INSERT_AT_END(bl, el, c) \
43  { cons *_insert_ = c; if (bl == NIL) bl = _insert_; else CDR(el) = _insert_; el = _insert_; CDR(el) = NIL; }
44 
45 
46 /* external variables. see declarations in kennedy.c */
47 extern graph dg;
48 extern bool rice_distribute_only;
49 extern int Nbrdoall;
50 /* cproto-generated files */
51 /* rice.c */
52 extern graph dg;
54 extern int enclosing;
55 extern void rice_unstructured(unstructured /*u*/, int /*l*/, statement (* /*codegen_fun*/)(statement, graph, set, int, bool));
56 extern statement rice_statement(statement /*stat*/, int /*l*/, statement (* /*codegen_fun*/)(statement, graph, set, int, bool));
57 extern statement rice_loop(statement /*stat*/, int /*l*/, statement (* /*codegen_fun*/)(statement, graph, set, int, bool));
58 extern bool do_it(string /*mod_name*/, bool /*distribute_p*/, string /*what*/, statement (* /*codegen_fun*/)(statement, graph, set, int, bool));
59 extern bool distributer(string /*mod_name*/);
60 extern bool rice_all_dependence(string /*mod_name*/);
61 extern bool rice_data_dependence(string /*mod_name*/);
62 extern bool rice_cray(string /*mod_name*/);
63 /* codegen.c */
64 extern bool ignore_this_conflict(vertex /*v1*/, vertex /*v2*/, conflict /*c*/, int /*l*/);
65 extern statement find_level_l_loop_statement(scc /*s*/, int /*l*/);
66 extern set scc_region(scc /*s*/);
67 extern bool contains_level_l_dependence(scc /*s*/, set /*region*/, int /*level*/);
68 extern bool strongly_connected_p(scc /*s*/, int /*l*/);
69 extern statement MakeNestOfParallelLoops(int /*l*/, cons */*loops*/, statement /*body*/, bool /*task_parallelize_p*/);
70 extern int statement_imbrication_level(statement /*st*/);
71 extern statement MakeNestOfStatementList(int /*l*/, int /*nbl*/, list */*lst*/, list /*loops*/, list */*block*/, list */*eblock*/, bool /*task_parallelize_p*/);
72 extern statement CodeGenerate(statement /*stat*/, graph /*g*/, set /*region*/, int /*l*/, bool /*task_parallelize_p*/);
73 extern statement MakeLoopAs(statement /*old_loop_statement*/, tag /*seq_or_par*/, statement /*body*/);
74 extern statement IsolatedStatement(scc /*s*/, int /*l*/, bool /*task_parallelize_p*/);
75 extern statement ConnectedStatements(graph /*g*/, scc /*s*/, int /*l*/, bool /*task_parallelize_p*/);
76 /* scc.c */
77 extern void set_sccs_drivers(bool (* /*ignore_this_vertex_fun*/)(set, vertex), bool (* /*ignore_this_successor_fun*/)(vertex, set, successor, int));
78 extern void reset_sccs_drivers(void);
79 extern void LowlinkCompute(graph /*g*/, set /*region*/, vertex /*v*/, int /*level*/, sccs /*Components*/);
80 extern int IsInStack(vertex /*v*/);
81 extern sccs FindSccs(graph /*g*/, set /*region*/, int /*level*/);
82 extern void ComputeInDegree(graph /*g*/, set /*region*/, int /*l*/);
83 extern list TopSortSccs(graph /*g*/, set /*region*/, int /*l*/, sccs /*Components*/);
84 extern list FindAndTopSortSccs(graph /*g*/, set /*region*/, int /*l*/);
85 extern void PrintScc(scc /*s*/);
86 extern void PrintSccs(sccs /*ss*/);
87 /* icm.c */
88 extern void dump_sef(statement_effects /*se*/);
89 extern void print_list_entities(list /*l*/);
90 extern bool invariant_code_motion(const char */*module_name*/);
91 #endif /* rice_header_included */
int tag
TAG.
Definition: newgen_types.h:92
bool rice_distribute_only
to know if do loop parallelization must be done
Definition: rice.h:53
sccs FindSccs(graph, set, int)
FindSccs is the interface function to compute the SCCs of a graph.
Definition: scc.c:206
int statement_imbrication_level(statement)
Definition: codegen.c:345
bool ignore_this_conflict(vertex, vertex, conflict, int)
codegen.c
Definition: codegen.c:163
bool strongly_connected_p(scc, int)
this function returns true if scc s is stronly connected at level l, i.e.
Definition: codegen.c:284
statement IsolatedStatement(scc, int, bool)
If the isolated statement is a CALL and is not a CONTINUE, regenerate the nested loops around it.
Definition: codegen.c:571
int enclosing
This is an horrendous hack.
Definition: rice.c:67
statement find_level_l_loop_statement(scc, int)
s is a strongly connected component which is analyzed at level l.
Definition: codegen.c:213
bool contains_level_l_dependence(scc, set, int)
s is a strongly connected component for which a DO loop is being produced.
Definition: codegen.c:239
bool rice_all_dependence(string)
Definition: rice.c:400
void set_sccs_drivers(bool(*)(set, vertex), bool(*)(vertex, set, successor, int))
scc.c
statement MakeNestOfParallelLoops(int, cons *, statement, bool)
this function creates a nest of parallel loops around an isolated statement whose iterations may exec...
Definition: codegen.c:310
statement rice_loop(statement, int, statement(*)(statement, graph, set, int, bool))
Eventually parallelize a do-loop with Ã&#160; la Rice algorithm.
Definition: rice.c:160
statement ConnectedStatements(graph, scc, int, bool)
BB: ConnectedStatements() is called when s contains more than one vertex or one vertex dependent upon...
Definition: codegen.c:614
statement rice_statement(statement, int, statement(*)(statement, graph, set, int, bool))
Definition: rice.c:82
set scc_region(scc)
Definition: codegen.c:226
void reset_sccs_drivers(void)
Definition: scc.c:98
void rice_unstructured(unstructured, int, statement(*)(statement, graph, set, int, bool))
Definition: rice.c:69
void print_list_entities(list)
Definition: icm.c:151
bool distributer(string)
Definition: rice.c:354
void dump_sef(statement_effects)
icm.c
Definition: icm.c:75
statement MakeNestOfStatementList(int, int, list *, list, list *, list *, bool)
Definition: codegen.c:350
list TopSortSccs(graph, set, int, sccs)
void PrintSccs(sccs)
Definition: scc.c:356
void LowlinkCompute(graph, set, vertex, int, sccs)
Definition: scc.c:115
bool rice_cray(string)
Definition: rice.c:413
int IsInStack(vertex)
this function checks if vertex v is in the stack
Definition: scc.c:183
void PrintScc(scc)
Definition: scc.c:346
list FindAndTopSortSccs(graph, set, int)
Definition: scc.c:317
void ComputeInDegree(graph, set, int)
Definition: scc.c:244
bool invariant_code_motion(const char *)
Phase that hoists loop invariant code out of loops.
Definition: icm.c:1495
int Nbrdoall
statement MakeLoopAs(statement, tag, statement)
This function creates a new loop whose characteristics (index, bounds, ...) are similar to those of o...
Definition: codegen.c:517
statement CodeGenerate(statement, graph, set, int, bool)
bool do_it(string, bool, string, statement(*)(statement, graph, set, int, bool))
Definition: rice.c:261
bool rice_data_dependence(string)
Definition: rice.c:406
graph dg
external variables.
Definition: rice.h:52
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59
The structure used to build lists in NewGen.
Definition: newgen_list.h:41