PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "misc.h"
#include "pipsdbm.h"
#include "properties.h"
#include "ri-util.h"
#include "text-util.h"
#include "top-level.h"
#include "prettyprint.h"
#include "pips-libs.h"
Go to the source code of this file.
Macros | |
#define | all_priv "PRETTYPRINT_ALL_PRIVATE_VARIABLES" |
#define | print_effects(e) pips_internal_error("print_effects function not available") |
#define | print_effect(e) pips_internal_error("print_effect function not available") |
#define | print_region(x) pips_internal_error("print_region function not available") |
#define | transformer_with_temporary_values_p(t) ((t) != NULL) |
#define | dump_transformer(t) pips_internal_error("dump_transformer function not available") |
#define | print_transformer(t) pips_internal_error("print_transformer function not available") |
#define | points_to_domain (-1) |
#define | points_to_list_domain (-1) |
#define | points_to_graph_domain (-1) |
#define | print_points_to(x) pips_internal_error("print_points_to function not available") |
#define | print_points_to_cell(x) pips_internal_error("print_points_to_cell function not available") |
#define | print_points_to_cells(x) pips_internal_error("print_points_to_cells function not available") |
#define | print_points_to_list(x) pips_internal_error("print_points_to_list function not available") |
#define | print_points_to_graph(x) pips_internal_error("print_points_to_graph function not available") |
#define | print_points_to_relations(x) pips_internal_error("print_points_to_relations function not available") |
Functions | |
bool | make_text_resource (const char *mod_name, const char *res_name, const char *file_ext, text texte) |
Main C functions to print code, sequential or parallel. More... | |
bool | make_text_resource_and_free (const char *mod_name, const char *res_name, const char *file_ext, text t) |
bool | user_view_p () |
print_code or print_source More... | |
bool | print_code_or_source (string mod_name) |
Generic function to prettyprint some sequential or parallel code, or even user view for the given module. More... | |
static bool | print_parallelized_code_common (const char *mod_name, const char *style) |
Build a textual resource for a parallel code using a string optional parallel style (dialect such as "f90", "doall", "hpf", "omp". More... | |
bool | print_code (const string mod_name) |
bool | print_source (const string mod_name) |
bool | print_parallelized_code (const string mod_name) |
bool | print_parallelized90_code (const string mod_name) |
bool | print_parallelized77_code (const string mod_name) |
bool | print_parallelizedHPF_code (const string module_name) |
bool | print_parallelizedOMP_code (const string mod_name) |
bool | print_parallelizedMPI_code (const string mod_name) |
void | dprint (expression x) |
For debugging: prettyprint many different kinds of newgen objects FC: type should be gen_chunk... More... | |
Variables | |
static bool | is_user_view |
#define dump_transformer | ( | t | ) | pips_internal_error("dump_transformer function not available") |
#define print_effect | ( | e | ) | pips_internal_error("print_effect function not available") |
#define print_effects | ( | e | ) | pips_internal_error("print_effects function not available") |
#define print_points_to | ( | x | ) | pips_internal_error("print_points_to function not available") |
#define print_points_to_cell | ( | x | ) | pips_internal_error("print_points_to_cell function not available") |
#define print_points_to_cells | ( | x | ) | pips_internal_error("print_points_to_cells function not available") |
#define print_points_to_graph | ( | x | ) | pips_internal_error("print_points_to_graph function not available") |
#define print_points_to_list | ( | x | ) | pips_internal_error("print_points_to_list function not available") |
#define print_points_to_relations | ( | x | ) | pips_internal_error("print_points_to_relations function not available") |
#define print_region | ( | x | ) | pips_internal_error("print_region function not available") |
#define print_transformer | ( | t | ) | pips_internal_error("print_transformer function not available") |
#define transformer_with_temporary_values_p | ( | t | ) | ((t) != NULL) |
void dprint | ( | expression | x | ) |
For debugging: prettyprint many different kinds of newgen objects FC: type should be gen_chunk...
Definition at line 392 of file print.c.
References basic_domain, basic_to_string(), CAR, cell_domain, debug_off, debug_on, descriptor_none_p, DIMENSION, dimension_domain, dimension_lower, dimension_upper, dprint(), dump_transformer, effect_descriptor, effect_domain, effects_domain, effects_effects, ENTITY, entity_domain, entity_local_name(), entity_module_name(), entity_name, entity_undefined_p, EXPRESSION, expression_domain, expression_domain_number, expression_undefined_p, FOREACH, fprintf(), free(), get_current_module_entity(), module_name_to_entity(), MODULE_SEP_STRING, points_to_domain, points_to_graph_domain, points_to_list_domain, print_effect, print_effects, print_expression(), print_expressions(), print_points_to, print_points_to_cell, print_points_to_cells, print_points_to_graph, print_points_to_list, print_points_to_relations, print_qualifier(), print_qualifiers(), print_reference(), print_references(), print_region, print_statement(), print_statements(), print_text(), print_type(), print_types(), qualifier_domain, reference_domain, statement_domain, text_domain, TRANSFORMER, transformer_domain, transformer_with_temporary_values_p, type_domain, and x.
Referenced by dprint().
bool make_text_resource | ( | const char * | mod_name, |
const char * | res_name, | ||
const char * | file_ext, | ||
text | texte | ||
) |
Main C functions to print code, sequential or parallel.
print.c
generate resource res_name for module mod_name with prefix file_ext as the text provided. it should be made clear who is to free the texte structure. currently it looks like a massive memory leak.
mod_name | od_name |
res_name | module name |
file_ext | resource name [DBR_...] |
texte | file extension text to be printed as this resource |
Definition at line 55 of file print.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, free(), print_text(), safe_fclose(), safe_fopen(), strdup(), and write_an_attachment_file().
Referenced by make_text_resource_and_free(), print_aliases(), print_code_or_source(), print_code_semantics(), print_code_static_control(), print_code_with_comp_regions(), print_parallelized_code_common(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), store_new_module(), and wp65().
bool make_text_resource_and_free | ( | const char * | mod_name, |
const char * | res_name, | ||
const char * | file_ext, | ||
text | t | ||
) |
mod_name | od_name |
res_name | es_name |
file_ext | ile_ext |
Definition at line 82 of file print.c.
References free_text(), make_text_resource(), and ok.
Referenced by create_HRE_module(), generic_print_code_pv(), print_any_reductions(), print_code_or_source_comp(), print_code_points_to(), print_continuation_conditions(), print_initial_precondition(), print_program_precondition(), ProcessEntries(), and ProcessEntry().
mod_name | od_name |
Definition at line 272 of file print.c.
References is_user_view, and print_code_or_source().
Referenced by print_code_as_a_graph().
Generic function to prettyprint some sequential or parallel code, or even user view for the given module.
FI: This test could be moved up in pipsmake?
FI: Should be a pips_internal_error() as pipsmake is here to avoid this very problem...
Since we want to prettyprint with a sequential syntax, save the PRETTYPRINT_PARALLEL property that may select the parallel output style before overriding it:
Select the default prettyprint style for sequential prettyprint:
Restore the previous PRETTYPRINT_PARALLEL property for the next parallel code prettyprint:
mod_name | od_name |
Definition at line 103 of file print.c.
References begin_attachment_prettyprint(), code_language, concatenate(), db_get_memory_resource(), debug_off, debug_on, empty_text(), end_attachment_prettyprint(), entity_initial, entity_undefined_p, free(), free_text(), get_bool_property(), get_prettyprint_language_tag(), get_string_property(), init_prettyprint(), is_language_c, is_language_fortran, is_language_fortran95, is_user_view, language_tag, make_text(), make_text_resource(), MERGE_TEXTS, mod_stat, module, module_name_to_entity(), NIL, pips_internal_error, pips_user_error, reset_current_module_entity(), reset_current_module_statement(), resource_name, set_current_module_entity(), set_current_module_statement(), set_prettyprint_language_from_property(), set_string_property(), strdup(), string_undefined, text_module(), value_code, and value_code_p.
Referenced by print_code(), and print_source().
mod_name | od_name |
Definition at line 294 of file print.c.
References print_parallelized_code_common().
mod_name | od_name |
Definition at line 289 of file print.c.
References print_parallelized_code_common().
mod_name | od_name |
Definition at line 284 of file print.c.
References print_parallelized_code_common().
|
static |
Build a textual resource for a parallel code using a string optional parallel style (dialect such as "f90", "doall", "hpf", "omp".
Definition at line 202 of file print.c.
References begin_attachment_prettyprint(), close_prettyprint(), db_get_memory_resource(), debug_off, debug_on, empty_text(), end_attachment_prettyprint(), free(), free_text(), get_prettyprint_language_tag(), get_string_property(), init_prettyprint(), is_language_c, is_language_fortran, is_language_fortran95, make_text(), make_text_resource(), MERGE_TEXTS, mod_stat, module, module_name_to_entity(), NIL, pips_internal_error, reset_current_module_entity(), set_current_module_entity(), set_string_property(), strdup(), string_undefined, and text_module().
Referenced by print_parallelized77_code(), print_parallelized90_code(), print_parallelized_code(), print_parallelizedHPF_code(), print_parallelizedMPI_code(), and print_parallelizedOMP_code().
module_name | odule_name |
Definition at line 299 of file print.c.
References module_name(), and print_parallelized_code_common().
mod_name | od_name |
Definition at line 314 of file print.c.
References print_parallelized_code_common().
mod_name | od_name |
Definition at line 306 of file print.c.
References all_priv, get_bool_property(), pips_user_warning, and print_parallelized_code_common().
mod_name | od_name |
Definition at line 278 of file print.c.
References is_user_view, and print_code_or_source().
bool user_view_p | ( | void | ) |
|
static |
Definition at line 93 of file print.c.
Referenced by print_code(), print_code_or_source(), print_source(), and user_view_p().