PIPS
prettyprint.c File Reference
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "union.h"
#include "matrix.h"
#include "ri.h"
#include "constants.h"
#include "ri-util.h"
#include "misc.h"
#include "complexity_ri.h"
#include "database.h"
#include "graph.h"
#include "dg.h"
#include "paf_ri.h"
#include "parser_private.h"
#include "property.h"
#include "properties.h"
#include "prettyprint.h"
#include "reduction.h"
#include "text.h"
#include "text-util.h"
#include "tiling.h"
#include "pipsdbm.h"
#include "resources.h"
#include "static_controlize.h"
#include "paf-util.h"
#include "pip.h"
#include "array_dfg.h"
#include "prgm_mapping.h"
#include "reindexing.h"
+ Include dependency graph for prettyprint.c:

Go to the source code of this file.

Macros

#define CM_FORTRAN_EXT   ".fcm"
 Ansi includes
More...
 
#define CRAFT_FORTRAN_EXT   ".craft"
 

Typedefs

typedef dfg_vertex_label vertex_label
 Local defines. More...
 
typedef dfg_arc_label arc_label
 

Functions

statement make_layout_statement (entity ae, int serial, int news)
 ====================================================================== More...
 
statement make_shared_statement (entity ae, int serial, int news)
 ====================================================================== More...
 
void cmf_layout_align (statement mod_stat)
 ====================================================================== More...
 
void craft_layout_align (statement mod_stat)
 ====================================================================== More...
 
bool print_parallelizedCMF_code (char *mod_name)
 ====================================================================== More...
 
bool print_parallelizedCRAFT_code (char *mod_name)
 ====================================================================== More...
 

Variables

list lparams
 Array bounds. More...
 
static graph current_dfg
 
static bdt current_bdt
 

Macro Definition Documentation

◆ CM_FORTRAN_EXT

#define CM_FORTRAN_EXT   ".fcm"

Ansi includes

Newgen includes
C3 includes
Pips includes

Definition at line 76 of file prettyprint.c.

◆ CRAFT_FORTRAN_EXT

#define CRAFT_FORTRAN_EXT   ".craft"

Definition at line 77 of file prettyprint.c.

Typedef Documentation

◆ arc_label

Definition at line 81 of file prettyprint.c.

◆ vertex_label

Local defines.

Definition at line 80 of file prettyprint.c.

Function Documentation

◆ cmf_layout_align()

void cmf_layout_align ( statement  mod_stat)

======================================================================

void cmf_layout_align(statement mod_stat):

Static control of the node

We extract the bdt corresponding to this node.

We count the number of non constant dimension for each domain.

We get the array entity corresponding to this node.

Layout

We add these declarations to the statement of the module

After reindexing, the first statement is in fact a sequence and no longer an unstructured. Trust it to simplify the following:

Definition at line 183 of file prettyprint.c.

185 {
186  list list_body, list_la, lae = NIL, li = NIL, lv;
187 
188  for(lv = graph_vertices(current_dfg); !ENDP(lv); POP(lv)) {
189  vertex cv;
190  int cn, bdim;
191  list bv, ciel;
192  string name;
193  char num[32];
194  entity array_ent;
195  static_control stco;
196 
197  cv = VERTEX(CAR(lv));
199 
200  if (cn == ENTRY_ORDER)
201  continue;
202  if (cn == EXIT_ORDER)
203  continue;
204 
205  /* Static control of the node */
207 
208  ciel = static_control_to_indices(stco);
209 
210  if(get_debug_level() > 0) {
211  fprintf(stderr, "\nIn cmf_layout_align, CIEL : ");
212  fprint_entity_list(stderr, ciel);
213  }
214 
215  /* We extract the bdt corresponding to this node. */
216  bv = extract_bdt(current_bdt, cn);
217 
218  /* We count the number of non constant dimension for each
219  domain. */
220  bdim = 0;
221  for (; !ENDP(bv); POP(bv)) {
222  int bcount = 0;
223  schedule sched = SCHEDULE(CAR(bv));
224  list lexp;
225 
226  for (lexp = schedule_dims(sched); !ENDP(lexp); POP(lexp)) {
229 
230  if(normalized_tag(nor) == is_normalized_linear) {
232 
233  if (vars_in_vect_p(vec, ciel))
234  bcount++;
235  }
236  else
237  user_error("cmf_layout_align",
238  "Rational case not treated yet !");
239  }
240 
241  if(bcount > bdim)
242  bdim = bcount;
243  }
244  li = CONS(INT, bdim, li);
245 
246  /* We get the array entity corresponding to this node. */
247  (void) sprintf(num, "%d", cn-BASE_NODE_NUMBER);
249  SAI, num, (string) NULL));
250  array_ent = gen_find_tabulated(name, entity_domain);
251  if(array_ent == entity_undefined)
252  user_error("make_array_bounds",
253  "\nOne ins (%d) has no array entity : %s\n",
254  cn-BASE_NODE_NUMBER, name);
255 
256  lae = CONS(ENTITY, array_ent, lae);
257  }
258 
259  /* Layout */
260  list_la = NIL;
261  for(; !ENDP(lae); POP(lae), POP(li)) {
262  entity ae;
263  int serial, nb_dims, news;
264 
265  ae = ENTITY(CAR(lae));
266  serial = INT(CAR(li));
267  nb_dims =
269  news = nb_dims - serial;
270 
271  list_la = CONS(STATEMENT, make_layout_statement(ae, serial, news),
272  list_la);
273  }
274 
275  /* We add these declarations to the statement of the module */
276  /* After reindexing, the first statement is in fact a sequence and
277  no longer an unstructured. Trust it to simplify the following: */
280  pips_user_error("Body is not a block\n");
281 
282  list_body = gen_nconc(list_la,
285  list_body;
286 }
statement adg_number_to_statement(int in_nb)
======================================================================
Definition: adg_utils.c:461
static list lexp
#define EXIT_ORDER
#define ENTRY_ORDER
@ INT
Definition: atomic.c:48
static int num
Definition: bourdoncle.c:137
#define vertex_vertex_label(x)
Definition: graph.h:152
#define graph_vertices(x)
Definition: graph.h:82
#define VERTEX(x)
VERTEX.
Definition: graph.h:122
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
size_t gen_length(const list l)
Definition: list.c:150
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
void fprint_entity_list(FILE *fp, list l)
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.
Definition: entity.c:3188
static statement mod_stat
We want to keep track of the current statement inside the recurse.
Definition: impact_check.c:41
#define user_error(fn,...)
Definition: misc-local.h:265
#define pips_user_error
Definition: misc-local.h:147
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
Definition: debug.c:67
#define MODULE_SEP_STRING
Definition: naming-local.h:30
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
char * string
STRING.
Definition: newgen_types.h:39
#define BASE_NODE_NUMBER
list static_control_to_indices(static_control)
package mapping : Alexis Platonoff, july 1993
Definition: utils.c:1037
static_control get_stco_from_current_map(statement)
========================================================================
Definition: utils.c:2429
#define SCHEDULE(x)
SCHEDULE.
Definition: paf_ri.h:682
#define dfg_vertex_label_statement(x)
Definition: paf_ri.h:413
#define schedule_dims(x)
Definition: paf_ri.h:717
#define SA_MODULE_NAME
#define SAI
static graph current_dfg
Definition: prettyprint.c:84
static bdt current_bdt
Definition: prettyprint.c:85
statement make_layout_statement(entity ae, int serial, int news)
======================================================================
Definition: prettyprint.c:93
bool vars_in_vect_p(Pvecteur pv, list vars)
======================================================================
list extract_bdt(bdt b, int cn)
=======================================================================
#define NORMALIZE_EXPRESSION(e)
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define type_variable(x)
Definition: ri.h:2949
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define entity_undefined
Definition: ri.h:2761
@ is_instruction_sequence
Definition: ri.h:1469
#define instruction_tag(x)
Definition: ri.h:1511
#define normalized_tag(x)
Definition: ri.h:1778
#define expression_normalized(x)
Definition: ri.h:1249
#define sequence_statements(x)
Definition: ri.h:2360
#define instruction_sequence(x)
Definition: ri.h:1514
#define variable_dimensions(x)
Definition: ri.h:3122
#define statement_instruction(x)
Definition: ri.h:2458
#define entity_type(x)
Definition: ri.h:2792
#define normalized_linear(x)
Definition: ri.h:1781
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
@ is_normalized_linear
Definition: ri.h:1760
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207

References adg_number_to_statement(), BASE_NODE_NUMBER, CAR, concatenate(), CONS, current_bdt, current_dfg, dfg_vertex_label_statement, ENDP, ENTITY, entity_domain, entity_type, entity_undefined, ENTRY_ORDER, EXIT_ORDER, exp, EXPRESSION, expression_normalized, extract_bdt(), fprint_entity_list(), fprintf(), gen_find_tabulated(), gen_length(), gen_nconc(), get_debug_level(), get_stco_from_current_map(), graph_vertices, instruction_sequence, instruction_tag, INT, is_instruction_sequence, is_normalized_linear, lexp, make_layout_statement(), mod_stat, MODULE_SEP_STRING, NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_tag, num, pips_user_error, POP, SA_MODULE_NAME, SAI, SCHEDULE, schedule_dims, sequence_statements, STATEMENT, statement_instruction, static_control_to_indices(), strdup(), type_variable, user_error, variable_dimensions, vars_in_vect_p(), VERTEX, and vertex_vertex_label.

Referenced by print_parallelizedCMF_code().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ craft_layout_align()

void craft_layout_align ( statement  mod_stat)

======================================================================

void craft_layout_align(statement mod_stat):

Static control of the node

We extract the bdt corresponding to this node.

We count the number of non constant dimension for each domain.

We get the array entity corresponding to this node.

Shared

We add these declarations to the statement of the module

After reindexing, the first statement is in fact a sequence and no longer an unstructured. Trust it to simplify the following:

Definition at line 295 of file prettyprint.c.

296 {
297  list list_body, list_la, lae = NIL, li = NIL, lv;
298 
299  for(lv = graph_vertices(current_dfg); !ENDP(lv); POP(lv)) {
300  vertex cv;
301  int cn, bdim;
302  list bv, ciel;
303  string name;
304  char num[32];
305  entity array_ent;
306  static_control stco;
307 
308  cv = VERTEX(CAR(lv));
310 
311  if (cn == ENTRY_ORDER)
312  continue;
313  if (cn == EXIT_ORDER)
314  continue;
315 
316  /* Static control of the node */
318 
319  ciel = static_control_to_indices(stco);
320 
321  if(get_debug_level() > 0) {
322  fprintf(stderr, "\nIn craft_layout_align, CIEL : ");
323  fprint_entity_list(stderr, ciel);
324  }
325 
326  /* We extract the bdt corresponding to this node. */
327  bv = extract_bdt(current_bdt, cn);
328 
329  /* We count the number of non constant dimension for each
330  domain. */
331  bdim = 0;
332  for (; !ENDP(bv); POP(bv)) {
333  int bcount = 0;
334  schedule sched = SCHEDULE(CAR(bv));
335  list lexp;
336 
337  for (lexp = schedule_dims(sched); !ENDP(lexp); POP(lexp)) {
340 
341  if(normalized_tag(nor) == is_normalized_linear) {
343 
344  if (vars_in_vect_p(vec, ciel))
345  bcount++;
346  }
347  else
348  user_error("craft_layout_align",
349  "Rational case not treated yet !");
350  }
351 
352  if(bcount > bdim)
353  bdim = bcount;
354  }
355  li = CONS(INT, bdim, li);
356 
357  /* We get the array entity corresponding to this node. */
358  (void) sprintf(num, "%d", cn-BASE_NODE_NUMBER);
360  SAI, num, (string) NULL));
361  array_ent = gen_find_tabulated(name, entity_domain);
362  if(array_ent == entity_undefined)
363  user_error("craft_layout_align",
364  "\nOne ins (%d) has no array entity : %s\n",
365  cn-BASE_NODE_NUMBER, name);
366 
367  lae = CONS(ENTITY, array_ent, lae);
368  }
369 
370  /* Shared */
371  list_la = NIL;
372  for(; !ENDP(lae); POP(lae), POP(li)) {
373  entity ae;
374  int serial, nb_dims, news;
375 
376  ae = ENTITY(CAR(lae));
377  serial = INT(CAR(li));
378  nb_dims =
380  news = nb_dims - serial;
381 
382  list_la = CONS(STATEMENT, make_shared_statement(ae, serial, news),
383  list_la);
384  }
385 
386  /* We add these declarations to the statement of the module */
387  /* After reindexing, the first statement is in fact a sequence and
388  no longer an unstructured. Trust it to simplify the following: */
391  pips_user_error("Body is not a block\n");
392 
393  list_body = gen_nconc(list_la,
396  list_body;
397  }
statement make_shared_statement(entity ae, int serial, int news)
======================================================================
Definition: prettyprint.c:138

References adg_number_to_statement(), BASE_NODE_NUMBER, CAR, concatenate(), CONS, current_bdt, current_dfg, dfg_vertex_label_statement, ENDP, ENTITY, entity_domain, entity_type, entity_undefined, ENTRY_ORDER, EXIT_ORDER, exp, EXPRESSION, expression_normalized, extract_bdt(), fprint_entity_list(), fprintf(), gen_find_tabulated(), gen_length(), gen_nconc(), get_debug_level(), get_stco_from_current_map(), graph_vertices, instruction_sequence, instruction_tag, INT, is_instruction_sequence, is_normalized_linear, lexp, make_shared_statement(), mod_stat, MODULE_SEP_STRING, NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_tag, num, pips_user_error, POP, SA_MODULE_NAME, SAI, SCHEDULE, schedule_dims, sequence_statements, STATEMENT, statement_instruction, static_control_to_indices(), strdup(), type_variable, user_error, variable_dimensions, vars_in_vect_p(), VERTEX, and vertex_vertex_label.

Referenced by print_parallelizedCRAFT_code().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_layout_statement()

statement make_layout_statement ( entity  ae,
int  serial,
int  news 
)

======================================================================

statement make_layout_statement(entity ae, int serial, news):

put all the pieces of lstat in one statement

Definition at line 93 of file prettyprint.c.

96 {
97  instruction ins;
98  list lstat = NIL;
99  char *comment;
100  statement stat;
101  int i;
102 
103  comment = (char*) malloc(64);
104  sprintf(comment,"CMF$ LAYOUT %s(", entity_local_name(ae));
105  for(i = 0; i < serial; i++) {
106  sprintf(comment, "%s:SERIAL", comment);
107  if((i < serial-1) || ((i == serial-1) && (news > 0)) )
108  sprintf(comment, "%s, ", comment);
109  }
110  for(i = 0; i < news; i++) {
111  sprintf(comment, "%s:NEWS", comment);
112  if(i < news-1)
113  sprintf(comment, "%s, ", comment);
114  }
115  sprintf(comment, "%s)\n", comment);
116 
117  stat = make_nop_statement();
119  lstat = CONS(STATEMENT, stat, lstat);
120 
121  /* put all the pieces of lstat in one statement */
122  stat = make_block_statement(lstat);
123 
124  if(get_debug_level() > 1)
125  fprintf(stderr,
126  "\nmake_layout_statement\n=====================\n%s\n",
127  comment);
128 
129  return(stat);
130 }
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
Definition: freia_spoc.c:52
void * malloc(YYSIZE_T)
statement make_block_statement(list)
Make a block statement from a list of statement.
Definition: statement.c:616
void insert_comments_to_statement(statement, const char *)
Insert a comment string (if non empty) at the beginning of the comments of a statement.
Definition: statement.c:1916
#define make_nop_statement
An alias for make_empty_block_statement.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453

References comment(), CONS, entity_local_name(), fprintf(), get_debug_level(), insert_comments_to_statement(), make_block_statement(), make_nop_statement, malloc(), NIL, and STATEMENT.

Referenced by cmf_layout_align().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_shared_statement()

statement make_shared_statement ( entity  ae,
int  serial,
int  news 
)

======================================================================

statement make_shared_statement(entity ae, int serial, news):

put all the pieces of lstat in one statement

Definition at line 138 of file prettyprint.c.

141 {
142  instruction ins;
143  list lstat = NIL;
144  char *comment;
145  statement stat;
146  int i;
147 
148  comment = (char*) malloc(64);
149  sprintf(comment,"CDIR$ SHARED %s(", entity_local_name(ae));
150  for(i = 0; i < serial; i++) {
151  sprintf(comment, "%s:", comment);
152  if((i < serial-1) || ((i == serial-1) && (news > 0)) )
153  sprintf(comment, "%s, ", comment);
154  }
155  for(i = 0; i < news; i++) {
156  sprintf(comment, "%s:BLOCK", comment);
157  if(i < news-1)
158  sprintf(comment, "%s, ", comment);
159  }
160  sprintf(comment, "%s)\n", comment);
161 
162  stat = make_nop_statement();
164  lstat = CONS(STATEMENT, stat, lstat);
165 
166  /* put all the pieces of lstat in one statement */
167  stat = make_block_statement(lstat);
168 
169  if(get_debug_level() > 1)
170  fprintf(stderr,
171  "\nmake_shared_statement\n=====================\n%s\n",
172  comment);
173 
174  return(stat);
175 }

References comment(), CONS, entity_local_name(), fprintf(), get_debug_level(), insert_comments_to_statement(), make_block_statement(), make_nop_statement, malloc(), NIL, and STATEMENT.

Referenced by craft_layout_align().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_parallelizedCMF_code()

bool print_parallelizedCMF_code ( char *  mod_name)

======================================================================

Static controlize code

The DFG, the BDT and the PLC

Parameters
mod_nameodule

Definition at line 401 of file prettyprint.c.

403 {
404  plc the_plc;
405 
406  text r = make_text(NIL);
407  entity module;
409  code c;
410  string s, pp;
411  static_control stco;
413  bool success;
414 
415  debug_on("PRETTYPRINT_DEBUG_LEVEL");
416 
421  }
422  c = entity_code(module);
423  s = code_decls_text(c);
424 
425  /* Static controlize code */
426  mod_stat = (statement) db_get_memory_resource(DBR_CODE, mod_name, true);
427  STS = (statement_mapping) db_get_memory_resource(DBR_STATIC_CONTROL,
428  mod_name, true);
431 
433  if (stco == static_control_undefined)
434  pips_internal_error("This is an undefined static control !");
435  if (!static_control_yes(stco))
436  pips_internal_error("This is not a static control program !");
437 
438  /* The DFG, the BDT and the PLC */
440  mod_name, true));
441  current_bdt = (bdt) db_get_memory_resource(DBR_BDT, mod_name, true);
442  the_plc = (plc) db_get_memory_resource(DBR_PLC, mod_name, true);
443  if (get_debug_level() > 0) {
444  fprint_dfg(stderr, current_dfg);
445  fprint_bdt(stderr, current_bdt);
446  fprint_plc(stderr, the_plc);
447  }
448 
451  set_bool_property("PRETTYPRINT_ALL_DECLARATIONS", true);
452 
454 
455  mod_stat = (statement)
456  db_get_memory_resource(DBR_REINDEXED_CODE, mod_name, true);
457 
458  insure_declaration_coherency_of_module(module, mod_stat);
459 
461 
463 
464  success = make_text_resource(mod_name,
465  DBR_PARALLELPRINTED_FILE,
467  r);
468 
472 
474 
475  debug_off();
476 
477  return(success);
478 }
text make_text(list a)
Definition: text.c:107
graph adg_pure_dfg(graph in_gr)
======================================================================
Definition: adg_graph.c:56
void fprint_dfg(FILE *fp, graph obj)
===========================================================================
static hash_table STS
The "STS" global variable is the hash table that maps the static_control on the statements.
Definition: adg_read_paf.c:155
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
char * get_string_property(const char *)
void free(void *)
bool success
Definition: gpips-local.h:59
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define debug_on(env)
Definition: misc-local.h:157
#define pips_internal_error
Definition: misc-local.h:149
#define debug_off()
Definition: misc-local.h:160
hash_table statement_mapping
these macros are obsolete! newgen functions (->) should be used instead
Definition: newgen-local.h:42
void reset_current_stco_map(void)
========================================================================
Definition: utils.c:2423
void set_current_stco_map(statement_mapping)
========================================================================
Definition: utils.c:2408
void fprint_bdt(FILE *, bdt)
===========================================================================
Definition: print.c:352
struct _newgen_struct_bdt_ * bdt
Definition: paf_ri.h:72
#define static_control_params(x)
Definition: paf_ri.h:755
#define static_control_yes(x)
Definition: paf_ri.h:753
#define static_control_undefined
Definition: paf_ri.h:727
struct _newgen_struct_plc_ * plc
Definition: paf_ri.h:144
static char * module
Definition: pips.c:74
text empty_text(entity __attribute__((unused)) e, int __attribute__((unused)) m, statement __attribute__((unused)) s)
Definition: misc.c:219
void close_prettyprint()
because some prettyprint functions may be used for debug, so the last hook set by somebody may have s...
Definition: misc.c:242
void init_prettyprint(text(*hook)(entity, int, statement))
checks that the prettyprint hook was actually reset...
Definition: misc.c:231
text text_module(entity, statement)
bool make_text_resource(const char *, const char *, const char *, text)
print.c
Definition: print.c:55
void fprint_plc(FILE *fp, plc obj)
========================================================================
Definition: print.c:85
#define PRETTYPRINT_PARALLEL
void set_bool_property(const char *, bool)
void set_string_property(const char *, const char *)
#define CM_FORTRAN_EXT
Ansi includes
Definition: prettyprint.c:76
list lparams
Array bounds.
Definition: reindexing.c:111
void cmf_layout_align(statement mod_stat)
======================================================================
Definition: prettyprint.c:183
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
code entity_code(entity e)
Definition: entity.c:1098
#define code_decls_text(x)
Definition: ri.h:786
#define MERGE_TEXTS(r, t)

References adg_pure_dfg(), close_prettyprint(), CM_FORTRAN_EXT, cmf_layout_align(), code_decls_text, current_bdt, current_dfg, db_get_memory_resource(), debug_off, debug_on, empty_text(), entity_code(), fprint_bdt(), fprint_dfg(), fprint_plc(), free(), get_current_module_entity(), get_debug_level(), get_stco_from_current_map(), get_string_property(), init_prettyprint(), local_name_to_top_level_entity(), lparams, make_text(), make_text_resource(), MERGE_TEXTS, mod_stat, module, NIL, pips_internal_error, PRETTYPRINT_PARALLEL, reset_current_module_entity(), reset_current_stco_map(), set_bool_property(), set_current_module_entity(), set_current_stco_map(), set_string_property(), static_control_params, static_control_undefined, static_control_yes, strdup(), STS, and text_module().

+ Here is the call graph for this function:

◆ print_parallelizedCRAFT_code()

bool print_parallelizedCRAFT_code ( char *  mod_name)

======================================================================

Static controlize code

The DFG, the BDT and the PLC

Parameters
mod_nameodule

Definition at line 482 of file prettyprint.c.

484 {
485  plc the_plc;
486 
487  text r = make_text(NIL);
488  entity module;
490  code c;
491  string s, pp;
492  static_control stco;
494  bool success;
495 
496  debug_on("PRETTYPRINT_DEBUG_LEVEL");
497 
502  }
503  c = entity_code(module);
504  s = code_decls_text(c);
505 
506  /* Static controlize code */
507  mod_stat = (statement) db_get_memory_resource(DBR_CODE, mod_name, true);
508  STS = (statement_mapping)db_get_memory_resource(DBR_STATIC_CONTROL,
509  mod_name, true);
512 
514  if (stco == static_control_undefined)
515  pips_internal_error("This is an undefined static control !");
516  if (!static_control_yes(stco))
517  pips_internal_error("This is not a static control program !");
518 
519  /* The DFG, the BDT and the PLC */
521  mod_name,
522  true));
523  current_bdt = (bdt) db_get_memory_resource(DBR_BDT, mod_name, true);
524  the_plc = (plc) db_get_memory_resource(DBR_PLC, mod_name, true);
525  if (get_debug_level() > 0) {
526  fprint_dfg(stderr, current_dfg);
527  fprint_bdt(stderr, current_bdt);
528  fprint_plc(stderr, the_plc);
529  }
530 
533  set_bool_property("PRETTYPRINT_ALL_DECLARATIONS", true);
534 
536 
537  mod_stat = (statement) db_get_memory_resource(DBR_REINDEXED_CODE,
538  mod_name, true);
539 
540  insure_declaration_coherency_of_module(module, mod_stat);
543 
544  success = make_text_resource(mod_name,
545  DBR_PARALLELPRINTED_FILE,
547  r);
548 
553  debug_off();
554 
555  return(success);
556 }
void craft_layout_align(statement mod_stat)
======================================================================
Definition: prettyprint.c:295
#define CRAFT_FORTRAN_EXT
Definition: prettyprint.c:77

References adg_pure_dfg(), close_prettyprint(), code_decls_text, CRAFT_FORTRAN_EXT, craft_layout_align(), current_bdt, current_dfg, db_get_memory_resource(), debug_off, debug_on, empty_text(), entity_code(), fprint_bdt(), fprint_dfg(), fprint_plc(), free(), get_current_module_entity(), get_debug_level(), get_stco_from_current_map(), get_string_property(), init_prettyprint(), local_name_to_top_level_entity(), lparams, make_text(), make_text_resource(), MERGE_TEXTS, mod_stat, module, NIL, pips_internal_error, PRETTYPRINT_PARALLEL, reset_current_module_entity(), reset_current_stco_map(), set_bool_property(), set_current_module_entity(), set_current_stco_map(), set_string_property(), static_control_params, static_control_undefined, static_control_yes, strdup(), STS, and text_module().

+ Here is the call graph for this function:

Variable Documentation

◆ current_bdt

bdt current_bdt
static

◆ current_dfg

◆ lparams