PIPS
|
#include "effects.h"
Go to the source code of this file.
Variables | |
char | lib_ri_util_prettyprint_c_rcsid [] |
misc.c More... | |
void actual_symbol_table_dump | ( | const char * | module_name, |
bool | is_parsed | ||
) |
This function is called in two different context: as a standalone phase or as part of debugging the parser?!?
module_name | odule_name |
is_parsed | s_parsed |
Definition at line 582 of file symbol_table.c.
References code_language, concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, entity_initial, entity_undefined_p, fprintf(), free(), get_current_module_entity(), get_symbol_table(), is_language_c, language_c_p, language_fortran95_p, language_fortran_p, module, module_name(), module_name_to_entity(), out, pips_internal_error, reset_current_module_entity(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_prettyprint_language_tag(), strdup(), value_code, and value_code_p.
Referenced by parsed_symbol_table(), and symbol_table().
void add_expr_to_pragma_expr_list | ( | pragma | pr, |
expression | ex | ||
) |
Add an expression to the pragma current expression list.
pr,the | pragma to process. |
ex,the | expression to add. |
Add the new pragma to the extension list:
pr | r |
ex | x |
Definition at line 147 of file pragma.c.
References free(), gen_expression_cons(), pips_assert, pips_debug, pragma_expression, pragma_expression_p, and pragma_to_string().
Referenced by add_loop_parallel_threshold().
void add_target_to_alternate_return_set | ( | entity | l | ) |
Definition at line 814 of file misc.c.
References gen_once(), ifdebug, list_undefined_p, pips_assert, and set_of_labels_required_for_alternate_returns.
Referenced by words_regular_call().
Nga Nguyen, 19/09/2003: To not rewrite the same thing, I use the words_basic() function
Definition at line 87 of file type.c.
References gen_free_list(), list_to_string(), NIL, and words_basic().
Referenced by add_formal_to_actual_bindings(), any_expression_to_transformer(), any_user_call_site_to_transformer(), arguments_are_something(), can_terapixify_expression_p(), check_call_basic(), DeclareVariable(), dprint(), dump_common_layout(), dump_functional(), entities_type_and_name(), fortran_user_call_to_transformer(), fprint_any_environment(), fprint_functional(), get_symbol_table(), is_varibale_array_element_specifier(), mpi_recv_ctx(), mpi_send_ctx(), print_entity_variable(), register_scalar_communications(), relation_to_transformer(), rename_op(), sac_commenter(), sentence_basic_declaration(), string_expression_to_transformer(), stub_head(), stub_var_decl(), this_entity_cdeclaration(), type_and_size_of_var(), type_this_call(), type_this_entity_if_needed(), type_this_expression(), type_this_instruction(), TypeFunctionalEntity(), typing_arguments_of_user_function(), typing_function_argument_type_to_return_type(), variable_to_string(), xml_Full_Type(), and xml_TaskReturnParameter().
In case comments are not formatted according to C rules, e.g.
when prettyprinting Fortran code as C code, add // at beginning of lines
Note: this is supposed to have been dealt with by another function called before, ensure_comment_consistency()
line beginning
line end
current position, pointer in comments
We do not need spaces before a line feed
r_margin | _margin |
Definition at line 4165 of file misc.c.
References ADD_SENTENCE_TO_TEXT, C_comment_p(), CHAIN_SWORD, CONS, cp, free(), gen_strndup0(), is_sentence_unformatted, MAKE_ONE_WORD_SENTENCE, make_sentence(), MAKE_SWORD, make_text(), make_unformatted(), NIL, sentence_undefined, and STRING.
Referenced by C_comment_to_text().
bool c_brace_expression_p | ( | expression | e | ) |
Definition at line 898 of file declarations.c.
References call_function, ENTITY_BRACE_INTRINSIC_P, expression_call_p(), expression_syntax, f(), and syntax_call.
Referenced by words_brace_expression().
In case the input code is not C code, non-standard comments have to be detected.
Definition at line 4094 of file misc.c.
Referenced by C_any_comment_to_text(), and C_comment_to_text().
Special handling for C comments with each line indented according to the context.
I do not see the interest if the user code is already indented... RK OK, since the blanks outside the comments are removed by the parser.
margin | argin |
comment | omment |
Definition at line 4270 of file misc.c.
References C_any_comment_to_text(), C_comment_p(), comment(), and text_undefined.
Referenced by text_trail().
Output a Fortan-like do-loop range as a C-like for-loop index part.
@description Assume that the increment is an integer so we can generate the good condition. Since the do-loops are recognized in C program part only with this assumptions, it is a good assumption.
call c = syntax_call(expression_syntax(range_increment(obj)));
Complete the initialization assignment
Check the final bound
Increasing or decreasing index?
Assume the increment has an integer value with a known sign If The increment is negative, that means the index is tested against a lower bound Else we assume to test against an upper bound
check if we have something of the form exp -1 as range_upper
Additionally, we want to pretty print a strict comparison if certain conditions are met. This could be the default choice , but the impact on the validation would be huge
Priority for LESS, GREATER, LESS_OR_EQUAL, GREATER_OR_EQUAL: 15
Increment the loop index
obj | bj |
ppdl | pdl |
Definition at line 457 of file misc.c.
References CHAIN_SWORD, copy_expression(), entity_type, entity_user_name(), free_expression(), gen_nconc(), get_referenced_entities(), int_to_expression(), make_op_exp(), negative_expression_p(), pips_user_warning, PLUS_OPERATOR_NAME, positive_expression_p(), range_increment, range_lower, range_upper, SET_FOREACH, set_free(), ultimate_type(), unsigned_type_p(), words_expression(), and words_subexpression().
Referenced by text_loop_default().
position of a line end
Find the first end of line:
No end-of-line, so use all the rest of the comment:
Skip the '
' at the end since the line concept is the notion of sentence
Analyze the next line:
Do not indent if the line is empty
margin | argin |
comment | omment |
Definition at line 4237 of file misc.c.
References ADD_SENTENCE_TO_TEXT, comment(), gen_strndup0(), line, MAKE_ONE_WORD_SENTENCE, make_text(), NIL, and strdup().
Generate declarations for a list of entities belonging to the same statement declaration.
ppdl: derived from the parser declared entity; used to decide if a derived type entity de must be declared as a reference to de (e.g. "struct s") or as the type definition of de (e.g. "struct s {}"). Of course, the type can be defined only once, even if it is referenced several times. Hence, pdl, the list pointed to by ppdl is updated in the loop to avoid redeclarations.
Dummy enum must be printed sometimes because their members are exposed directly.
module | odule |
ldecl | decl |
margin | argin |
ppdl | pdl |
Definition at line 1452 of file declarations.c.
References basic_derived, c_text_entity(), derived_type_p(), DUMMY_ENUM_PREFIX, DUMMY_STRUCT_PREFIX, DUMMY_UNION_PREFIX, ENTITY, entity_name, entity_storage, entity_type, FOREACH, gen_once(), implicit_c_variable_p(), make_text(), MEMBER_SEP_STRING, MERGE_TEXTS, module, NIL, storage_formal_p, STRUCT_PREFIX, text_undefined, type_area_p, type_statement_p, type_unknown_p, type_used_in_type_declarations_p(), type_variable, ultimate_type(), UNION_PREFIX, and variable_basic.
Referenced by c_text_related_entities(), and ensure_comment_consistency().
Regeneration of declarations from the symbol table.
FI: strange recursion, probably due to Francois...
Regeneration of declarations... ==================== Variables and Function prototypes for C =========== pdl is the parser declaration list. It is used to decide if a derived entity should be simply declared, "struct s", or fully defined, "struct s {....}". It is accessed by its pointer ppdl
c_text_related_entities calls c_text_entities calls c_text_entity calls back c_text_related_entities (!) but with only one element... may call words_variable_or_function calls c_words_simplified_entity calls generic_c_words_simplified_entity
Note: text when newline are involved, words when everything fits on one line.
module | odule |
margin | argin |
ppdl | pdl |
init_p | nit_p |
Definition at line 2087 of file declarations.c.
References c_text_related_entities(), CONS, ENTITY, EXPRESSION, gen_free_list(), gen_full_free_list(), int_to_expression(), module, and NIL.
Referenced by c_text_entities(), c_text_entity_simple(), and compilation_unit_text().
module | odule |
margin | argin |
Definition at line 2100 of file declarations.c.
References c_text_entity(), gen_free_list(), module, and NIL.
Referenced by stub_text().
It is assumed that all entities in list el can be declared by an unique statement, i.e.
their types must be closely related, as in
"int i, *pj, foo();".
But you can also have:
"struct one { struct too {int a;};};"
where no variable is declared. And the parser generate a declaration list stating that "struct two" and "struct one" are declared in this statement.
In other words, this function prints out a C declaration statement, taking into account the derived entities that have to be defined exactly once, pdl. Of course, pdl can be updated by the caller when a derived entity is declared so as to avoid a redeclaration.
At this first level, the declarations of derived types use several lines. If a nested declaration occurs, the nested declaration is packed on a unique line.
List icl indicates for each entity if it should be initialized or not. This is useful for global variable initializations.
If we are not in a compilation unit, the initialization control list is useless and may be wrong because of program transformations such as scalar renaming.
The last entity may be a place holder
overwrite the parser declaration list pdl with del
A declaration has two parts: declaration specifiers and declarator (even with initializer) In declaration specifiers, we can have:
This part is for storage specifiers
&& (extern_p || explicit_extern_entity_p(module, e_last)
|| (extern_entity_p(module, e_last) && !type_functional_p(t_last))))
The global variables stored in static area and in ram but they are not static so a condition is needed, which checks if it is not a global variable
If a derived type is declared first, the qualifiers are carried by the type of the second entity
This part is for type specifiers, type qualifiers, function specifiers and declarator Three special cases for struct/union/enum definitions are treated here. Variable (scalar, array), pointer, function, variables of type struct/union/enum and typedef are treated by function c_words_entity
c = words_variable_or_function(module, e1, true, pc, in_type_declaration, pdl);
the word list pc must have been inserted in text r
Add the declared variables or more declared variables.
add the asm qualifier if needed
the final semi column,
the word list pc must be added to the last sentence of text r
module | odule |
del | el |
margin | argin |
sn | n |
ppdl | pdl |
cl | l |
Definition at line 1815 of file declarations.c.
References ADD_SENTENCE_TO_TEXT, add_words_to_text(), asprintf, c_text_entities(), CAR, CDR, CHAIN_SWORD, compilation_unit_entity_p(), CONS, declarable_type_p(), derived_entity_p(), DUMMY_ENUM_PREFIX, DUMMY_STRUCT_PREFIX, DUMMY_UNION_PREFIX, ENDP, ENTITY, entity_local_name(), entity_module_p(), entity_name, entity_qualifiers(), entity_storage, entity_type, entity_undefined_p, entity_user_name(), ENUM_PREFIX, EXPRESSION, false, filtered_declaration_list(), FOREACH, free(), gen_in_list_p(), gen_last(), gen_length(), gen_nconc(), gen_once(), get_bool_property(), INDENTATION, integer_constant_expression_value(), is_sentence_unformatted, is_type_area, is_type_enum, is_type_functional, is_type_statement, is_type_struct, is_type_union, is_type_unknown, is_type_varargs, is_type_variable, is_type_void, list_undefined, lname(), MAKE_ONE_WORD_SENTENCE, make_sentence(), make_text(), make_unformatted(), MERGE_TEXTS, module, NIL, pips_assert, pips_debug, pips_internal_error, place_holder_variable_p(), POP, QUALIFIER, qualifier_asm, qualifier_asm_p, ram_section, static_area_p(), static_module_p(), storage_ram, storage_ram_p, strdup(), STRUCT_PREFIX, text_sentences, TOP_LEVEL_MODULE_NAME, true, type_enum, type_struct, type_tag, type_union, type_variable, type_variable_p, TYPEDEF_PREFIX, UNION_PREFIX, variable_qualifiers, words_enum(), words_enum_reference(), words_qualifiers(), words_struct_reference(), words_union(), and words_variable_or_function().
Referenced by c_text_entity().
name | ame |
ppdl | pdl |
Definition at line 1421 of file declarations.c.
References generic_c_words_entity(), ifdebug, list_to_string(), and pips_debug.
Referenced by ensure_comment_consistency(), generic_c_words_simplified_entity(), UpdatePointerEntity(), words_basic(), and words_parameters().
list c_words_simplified_entity | ( | type | t, |
list | name, | ||
bool | is_first, | ||
bool | in_type_declaration, | ||
list * | ppdl | ||
) |
The declaration list pointer ppdl is passed down to determine if an internal derived type must be fully expanded within another declaration or not.
If it is declared by itself, there is no need to expand its declaration again.
name | ame |
is_first | s_first |
in_type_declaration | n_type_declaration |
ppdl | pdl |
Definition at line 1408 of file declarations.c.
References generic_c_words_simplified_entity(), ifdebug, list_to_string(), and pips_debug.
Referenced by ensure_comment_consistency(), and words_variable_or_function().
area.c
area.c
of entity
empty common!
take the first function as the reference for the check.
SAME name, type, offset
common | ommon |
Definition at line 107 of file area.c.
References area_layout, CAR, common_members_of_module(), comparable_entity_in_list_p(), ENTITY, entity_area_p(), entity_storage, entity_type, gen_free_list(), ok, pips_assert, POP, ram_function, ref, storage_ram, and type_area.
Referenced by text_area_included().
extension.c
es,the | extension to be closed |
Today we only generate omp parallel do pragma so the close is pretty easy. Later we will have to analyze the extension to generate the close string accordingly.
Definition at line 49 of file extension.c.
References close_pragma(), and extension_pragma.
Referenced by close_extensions().
string close_extensions | ( | extensions | es, |
bool | nl | ||
) |
es,the | extensions to be closed |
nl,set | to true to get the string with a final new line character |
Use a string_buffer for efficient string concatenation:
Free the buffer with its strings:
es | s |
nl | l |
Definition at line 58 of file extension.c.
References close_extension(), empty_extensions_p(), EXTENSION, extensions_extension, FOREACH, strdup(), string_buffer_append(), string_buffer_free_all(), string_buffer_make(), string_buffer_to_string(), and string_undefined.
void close_prettyprint | ( | void | ) |
because some prettyprint functions may be used for debug, so the last hook set by somebody may have stayed there although being non sense...
Definition at line 242 of file misc.c.
References empty_text(), and text_statement_hook.
Referenced by generic_print_code_pv(), get_any_comp_regions_text(), get_continuation_condition_text(), get_semantic_text(), print_code_or_source_comp(), print_code_points_to(), print_code_static_control(), print_parallelized_code_common(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), store_new_module(), text_code_points_to(), text_code_reductions(), and wp65().
string contrainte_text_format | ( | string | aux_line, |
string | continuation, | ||
text | txt, | ||
Pcontrainte | c, | ||
bool | is_inegalite, | ||
string(*)(Variable) | variable_name, | ||
bool | a_la_fortran, | ||
bool | first_line | ||
) |
aux_line | ux_line |
continuation | ontinuation |
txt | xt |
is_inegalite | s_inegalite |
a_la_fortran | _la_fortran |
first_line | irst_line |
Definition at line 285 of file constraint_to_text.c.
References continuation, contrainte_error(), contrainte_to_text_1(), contrainte_to_text_2(), CONTRAINTE_UNDEFINED_P, contrainte_vecteur, pips_assert, variable_name(), vect_check(), and VECTEUR_NUL.
Referenced by contraintes_text_format(), egalite_text_format(), and inegalite_text_format().
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().
void dump_common_layout | ( | string_buffer | result, |
entity | c, | ||
bool | debug_p, | ||
bool | isfortran | ||
) |
FI: a weaker test to stay independent from the syntax library and its internal static variables.
This piece of code can be used in a pass or as debugging code for library syntax.
result | esult |
debug_p | ebug_p |
isfortran | sfortran |
Definition at line 120 of file symbol_table.c.
References area_size, arguments_difference(), arguments_union(), array_size(), basic_to_string(), check_derived_and_typedef(), concatenate(), DYNAMIC_RAM_OFFSET, ENDP, ENTITY, entity_local_name(), entity_module_name(), entity_name, entity_storage, entity_type, entity_user_name(), FOREACH, free(), gen_free_list(), get_bool_property(), get_common_members(), get_current_module_entity(), heap_area_p(), HeapArea, i2a(), NIL, NL, pips_assert, pips_debug, pips_internal_error, place_holder_variable_p(), ram_function, ram_offset, ram_section, ram_shared, SizeOfArray(), sort_list_of_entities(), stack_area_p(), StackArea, storage_ram, storage_ram_p, string_buffer_append(), type_area, type_variable, type_variable_p, UNDEFINED_RAM_OFFSET, user_warning, and variable_basic.
Referenced by get_symbol_table().
void dump_control_to_label_name | ( | hash_table | h | ) |
Definition at line 500 of file unstructured.c.
References control_statement, fprintf(), HASH_MAP, and statement_identification().
Referenced by text_unstructured().
void dump_trail | ( | list | trail | ) |
trail | rail |
Definition at line 263 of file unstructured.c.
References CAR, CONTROL, control_statement, ENDP, fprintf(), MAPL, and statement_identification().
Referenced by c_unstructured(), and text_unstructured().
void egalite_debug | ( | Pcontrainte | c | ) |
Definition at line 58 of file constraint_to_text.c.
References egalite_fprint(), and entity_local_name().
Referenced by sc_projection_optim_along_vecteur_ofl().
string egalite_text_format | ( | string | aux_line, |
string | continuation, | ||
text | txt, | ||
Pcontrainte | eg, | ||
string(*)(Variable) | variable_name, | ||
bool | a_la_fortran, | ||
bool | first_line | ||
) |
aux_line | ux_line |
continuation | ontinuation |
txt | xt |
eg | g |
a_la_fortran | _la_fortran |
first_line | irst_line |
Definition at line 321 of file constraint_to_text.c.
References continuation, contrainte_text_format(), and variable_name().
EOLE : The multiply-add operator is used within the optimize transformation ( JZ - sept 98) - fma(a,b,c) -> ((a*b)+c)
of string
obj | bj |
precedence | recedence |
leftmost | eftmost |
ppdl | pdl |
Definition at line 2049 of file misc.c.
References eole_fmx_specific_op().
MULTIPLY-SUB operator.
of string
obj | bj |
precedence | recedence |
leftmost | eftmost |
ppdl | pdl |
Definition at line 2056 of file misc.c.
References eole_fmx_specific_op().
expression expand_expression | ( | expression | , |
entity | , | ||
range | |||
) |
expression expand_reference | ( | syntax | s, |
expression | e, | ||
entity | i, | ||
range | r | ||
) |
A reference cannot always be expanded.
Subscript expression coupling as in A(I,I) prevent expansion and an undefined expression is returned. Non-affine expressions such as A(I**2) cannot be transformed into triplets but can be tranformed into implicit DO vectors.
Arguments s, e, i and r should not be shared with the returned expression.
expand occurence of loop index
expand 1 subscript expression or fail or leave unexpanded
If dim is greater than 1, subscript expressions are coupled as in A(I,I+1).
new_args should be freed
Just the spine or more?
Definition at line 225 of file fortran90.c.
References CAR, CONS, copy_expression(), copy_range(), expand_expression(), EXPRESSION, expression_undefined, expression_undefined_p, gen_free_list(), gen_nreverse(), is_syntax_range, is_syntax_reference, make_expression(), make_reference(), make_syntax(), MAPL, NIL, normalized_undefined, reference_indices, reference_variable, same_entity_p(), set_add_element(), set_belong_p(), syntax_reference, and vectors.
Referenced by expand_expression().
string expression_to_string | ( | expression | e | ) |
Definition at line 77 of file expression.c.
References FOREACH, free(), gen_free_list(), NIL, out, STRING, words_expression(), and words_to_string().
Referenced by adg_get_conjonctions(), any_assign_operation_to_transformer(), any_basic_update_to_transformer(), any_expression_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), any_update_to_transformer(), atomize_or_associate_for_level(), atomizer_of_array_indices(), atomizer_of_expression(), atomizer_of_intrinsic(), build_third_comb(), c_brace_expression_string(), c_convex_effects_on_formal_parameter_backward_translation(), c_dim_string(), cell_reference_compare(), comp_regions_of_instruction(), consecutive_expression_p(), constraint_to_bound(), copy_n_reference(), do_atomize_if_different_level(), edge_cost_polynome(), equal_condition_to_points_to(), equal_must_vreference(), expression_to_post_pv(), expressions_to_predicate(), fprint_bdt(), fprint_bdt_with_stat(), fprint_plc(), freed_pointer_to_points_to(), freia_is_transpose_call(), get_bounds_expression(), have_null_value_in_pointer_expression_p(), have_sizeof_value_in_multiply_pointer_expression_p(), imprime_quast(), internal_pointer_assignment_to_points_to(), interprocedural_abc_arrays(), intrinsic_call_to_points_to(), is_param_dynamic(), loop_annotate(), make_available_scalar(), make_bottom_up_abc_tests(), make_bounds(), make_expression_equalities(), make_interprocedural_abc_tests(), make_reindex(), MakeCaseStatement(), malloc_arg_to_type(), malloc_to_abstract_location(), mppa_compile_dag(), mppa_helper_args_params(), my_adg_expressions_to_predicate(), ndf_normalized_test(), nlc_linear_expression_p(), non_equal_condition_to_points_to(), normal_expression_of_expression(), normalize_test_leaves(), opkill_may_vreference(), opkill_must_vreference(), perform_array_element_substitutions_in_transformer(), perform_substitution_in_expression(), plc_make_distance(), pointer_binary_operation_to_transformer(), points_to_compare_cell(), points_to_compare_cells(), points_to_compare_location(), points_to_compare_ptr_cell(), points_to_unary_operation_to_transformer(), predicate_to_expression(), prepare_array_bounds(), print_list_of_expressions(), psystem_to_expression(), rational_op_exp(), remove_minmax(), sa_print_ins(), sc_conditional(), sc_delimiter(), semantics_usable_points_to_reference_p(), set_entity_initial(), side_effects_p(), sigmac_params_decl(), sp_feautrier_expression_p(), sp_linear_expression_p(), splc_feautrier_expression_p(), splc_linear_expression_p(), splc_positive_relation_p(), st_brace_expression_as_string(), st_declaration_init(), this_entity_cdeclaration(), translate_IO_ref(), vect_to_string(), words_points_to_reference(), xml_Argument(), xml_Array(), xml_AssignArgument(), xml_Bounds(), xml_Bounds_and_Stride(), xml_Call(), xml_Chain_Graph(), xml_loop(), and xml_Pattern_Paving().
to be added later when extension can be something else than pragma switch (extension_tag(e)) { case is_extension_pragma:
default: pips_internal_error("Unknown extension type"); }
Definition at line 86 of file extension.c.
References extension_pragma, and pragma_to_string().
Referenced by extensions_to_string().
string extensions_to_string | ( | extensions | es, |
bool | nl | ||
) |
return a new allocated string with the string representation of the extensions.
Basically you'll get one extension per line
Assume that all the extension from the extensions (note the presence or not of the "s"...) are defined below.
es,the | extensions to translate to strings |
nl,set | to true to get the string with a final new line character |
Prettyprint in the correct language:
Use a string_buffer for efficient string concatenation:
Free the buffer with its strings:
es | s |
nl | l |
Definition at line 111 of file extension.c.
References empty_extensions_p(), EXTENSION, extension_to_string(), extensions_extension, FOREACH, strdup(), string_buffer_append(), string_buffer_free_all(), string_buffer_make(), string_buffer_to_string(), and string_undefined.
Referenced by loop_pragma().
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/prettyprint/prettyprint-local.h instead, to add your own modifications. header file built by cproto prettyprint-local.h cproto-generated files allocatable.c
Warning! Do not modify this file that is automatically generated!
name | is the name of the array (prettyprint name) |
name | ame |
ndim | dim |
Definition at line 97 of file allocatable.c.
References ALLOCATABLE_LBOUND_PREFIX, ALLOCATABLE_PREFIX, ALLOCATABLE_UBOUND_PREFIX, asprintf, CAR, concatenate(), CONS, DIMENSION, ENTITY, entity_initial, entity_storage, entity_to_expression(), entity_type, entity_undefined, FindEntity(), FindOrCreateTopLevelEntity(), free(), make_bound(), make_data_field(), make_dimension(), make_storage_rom(), make_type_struct(), make_value_unknown(), NIL, pips_assert, printf(), strdup(), STRING, STRUCT_PREFIX, TOP_LEVEL_MODULE_NAME, and words_basic().
Referenced by gfc2pips_getbasic(), and gfc2pips_symbol2entity().
prompt the user to select contiguous statement in s
s | statement to search into |
Definition at line 258 of file statement.c.
References find_statements_interactively_walker(), gen_context_recurse, gen_nreverse(), gen_null2(), NIL, and statement_domain.
Referenced by outline().
void fprint_expression | ( | FILE * | f, |
expression | e | ||
) |
expression.c
Definition at line 47 of file expression.c.
References expression_syntax, f(), gen_free_list(), NIL, print_words(), and words_syntax().
void fprint_list_of_exp | ( | FILE * | fp, |
list | exp_l | ||
) |
void fprint_list_of_exp(FILE *fp, list exp_l): prints in the file "fp" the list of expression "exp_l".
We separate the expressions with a colon (","). We do not end the print with a line feed.
fp | p |
exp_l | xp_l |
Definition at line 229 of file expression.c.
References CAR, CDR, exp, EXPRESSION, fprintf(), gen_free_list(), NIL, words_expression(), and words_to_string().
Referenced by analyze_quast(), build_first_comb(), build_new_ref(), calculate_delay(), compatible_pc_p(), fprint_call(), fprint_dataflow(), fprint_loop(), get_unsatisfied_system(), include_trans_on_LC_in_ref(), list_of_exp_equals_1n_p(), make_causal_external(), make_causal_internal(), make_reindex(), printf_loop(), search_scc_bdt(), and simplify_dimension().
void fprint_reference | ( | FILE * | fd, |
reference | r | ||
) |
fd | d |
Definition at line 128 of file expression.c.
References fprintf(), gen_free_list(), NIL, print_words(), reference_domain, reference_domain_number, reference_undefined_p, and words_reference().
Referenced by fprint_wp65_hash_tables(), and print_reference().
void fprint_statement | ( | FILE * | fd, |
statement | s | ||
) |
Print statement "s" on file descriptor "fd".
Print the statement according to the current PRETTYPRINT_LANGUAGE property
See text_named_module() for improvements.
fd | d |
Definition at line 68 of file statement.c.
References debug_off, debug_on, entity_undefined, fprintf(), free_text(), gen_free_list(), NIL, pop_current_module_statement(), print_text(), push_current_module_statement(), reset_alternate_return_set(), reset_label_counter(), set_alternate_return_set(), statement_domain, statement_domain_number, statement_undefined_p, and text_statement().
Referenced by initialize_array_variable(), initialize_scalar_variable(), insert_check_alias_before_statement(), insert_flag_before_call_site(), insert_test_before_caller(), insert_test_before_statement(), print_statement(), and step_compile_generated_module().
obj | bj |
Definition at line 336 of file misc.c.
References effective_test_true(), empty_statement_p(), one_liner_p(), prettyprint_gcc_c_braces_p, statement_test(), statement_test_p(), and test_false.
Referenced by text_block_ifthen().
text generate_alternate_return_targets | ( | void | ) |
Definition at line 824 of file misc.c.
References C_CONTINUE_FUNCTION_NAME, CONS, CONTINUE_FUNCTION_NAME, ENDP, FOREACH, gen_nconc(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, is_sentence_unformatted, label_local_name(), make_sentence(), make_text(), make_unformatted(), NIL, pips_internal_error, s1, SENTENCE, sentence_undefined, set_of_labels_required_for_alternate_returns, STATEMENT_NUMBER_UNDEFINED, strdup(), STRING, string_undefined, and text_undefined.
Referenced by ensure_comment_consistency().
list generic_c_words_entity | ( | type | t, |
list | name, | ||
bool | is_safe, | ||
bool | add_dummy_parameter_name_p, | ||
list * | ppdl | ||
) |
This recursive function prints a C variable with its type.
It can be a simple variable declaration such as "int a" or complicated one such as "int (* forces[10])()" (an array of 10 pointers, each pointer points to a function with no parameter and the return type is int).
Type "t" is recursively traversed and the obtained attribute are accumulated in the list "name" (name of the type, not name of the variable).
Purpose of "is_safe"? Seems to be passed down recursively but never to be used...
In C, functional type can be decorated by optional dummy parameter names.
name | ame |
is_safe | s_safe |
add_dummy_parameter_name_p | dd_dummy_parameter_name_p |
ppdl | pdl |
Definition at line 980 of file declarations.c.
References generic_c_words_simplified_entity().
Referenced by c_words_entity(), safe_c_words_entity(), and stub_text().
list generic_c_words_simplified_entity | ( | type | t, |
list | name, | ||
bool | is_safe, | ||
bool | add_dummy_parameter_name_p, | ||
bool | is_first, | ||
bool | in_type_declaration, | ||
bool | argument_p, | ||
list * | ppdl | ||
) |
Same as above, but the bool is_first is used to skip a type specifier which is useful when several variables or types are defined in a unique statement such as "int i, *pi, ai[10],...;".
type t: new type to add in front of the word list name
list name: later part of the declaration being built
bool is_safe: does not seem to be used anymore
bool add_dummy_parameter_name_p: for function declarations, add a dummy parameter name to the type of each formal parameter
bool is_first: prettyprint the qualifiers or not; they should be printed only once when they apply to several declarations as in:
"register int i, j;"
in_type_declaration is set to true when a variable is declared at the same time as its type
argument_p: the type is used as argument type in a function declaration
list ppdl: pointer to the declaration list to decide if data structures appearing in another data structure must be declared independently or not. See validation cases struct03.c, struct04.c and struct05.c.
Function name is an expression like *vfs[] in (*vfs[])() (syntax = application), or an abstract function type, so parentheses must be added
Function name is a simple reference
RK wants us to use another better function than i2a, but its name is not documented next to i2a() source code and here the string is going to be strduped, which makes i2a() a better choice.
ips_debug(3,"Parameter type %s\n ", type_undefined_p(t1)? "type_undefined" : words_to_string(words_type(t1, ppdl, true)));
c_words_entity(t1,NIL) should be replaced by c_words_entity(t1,name_of_corresponding_parameter)
Add type qualifiers if there are
FI: left out of the previous declaration internal representation
&& !qualifiers_p
Array name is an expression like __ctype+1 in (__ctype+1)[*np] (syntax = subscript), or abstract type, parentheses must be added
Array name is a simple reference
The derived type has been declared explicitly elsewhere: see struct05.c
The derived type is declared by itself
Do not recurse down if the derived type reference itself
A place holder variable has no name and require no space
This section is derived from c_text_entity()
it is used for structures, unions and enums which have no names because they are part of a more global declaration such as typedef s
FI: The union and the struct cases could be merged.
name | ame |
is_safe | s_safe |
add_dummy_parameter_name_p | dd_dummy_parameter_name_p |
is_first | s_first |
in_type_declaration | n_type_declaration |
argument_p | rgument_p |
ppdl | pdl |
Definition at line 1017 of file declarations.c.
References argument_p(), array_type_p(), basic_bit, basic_derived, basic_pointer, basic_type_p(), basic_typedef, bit_type_p(), c_words_entity(), CAR, CDR, CHAIN_SWORD, concatenate(), CONS, constant_int, constant_int_p, copy_type(), declarable_type_p(), derived_type_p(), DUMMY_ENUM_PREFIX, dummy_identifier, DUMMY_MEMBER_PREFIX, DUMMY_STRUCT_PREFIX, DUMMY_UNION_PREFIX, dummy_unknown_p, ENDP, ENTITY, entity_initial, entity_local_name(), entity_name, entity_type, entity_user_name(), ENUM_PREFIX, f(), free(), free_type(), functional_parameters, functional_result, gen_full_free_list(), gen_in_list_p(), gen_length(), gen_nconc(), gen_once(), get_bool_property(), i2a(), list_to_string(), list_undefined, lparams, NIL, overloaded_parameters_p(), PARAMETER, parameter_dummy, parameter_type, pips_debug, pips_internal_error, pointer_type_p(), POP, qualifiers_const_p(), qualifiers_restrict_p(), ret, same_string_p, strdup(), STRING, string_type_p(), string_undefined, string_undefined_p, STRUCT_PREFIX, symbolic_constant, symbolic_expression, type_enum, type_enum_p, type_functional, type_functional_p, type_struct, type_struct_p, type_undefined_p, type_union, type_union_p, type_varargs_p, type_variable, type_variable_p, type_void, type_void_p, typedef_type_p(), UNION_PREFIX, value_symbolic, variable_basic, variable_dimensions, variable_qualifiers, words_dimensions(), words_expression(), words_initial_qualifiers(), words_late_qualifiers(), words_qualifiers(), and words_type().
Referenced by c_words_simplified_entity(), and generic_c_words_entity().
string get_comment_continuation | ( | void | ) |
Start a single line comment with continuation (blank spaces)
Definition at line 167 of file misc.c.
References get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, and pips_internal_error.
Referenced by text_pointer_value(), text_pointer_values(), text_points_to_relation(), text_points_to_relations(), text_region_no_action(), and text_transformer().
string get_comment_sentinel | ( | void | ) |
Start a single line comment.
Definition at line 154 of file misc.c.
References get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, and pips_internal_error.
Referenced by init_text_statement(), loop_annotate(), mark_block(), print_any_reductions(), text_complexity(), text_continuation(), text_pointer_value(), text_pointer_values(), text_points_to(), text_points_to_relation(), text_points_to_relations(), text_reductions(), text_region_no_action(), text_transformer(), and text_unstructured().
unsigned int get_prettyprint_indentation | ( | void | ) |
Definition at line 177 of file misc.c.
References INDENTATION, and prettyprint_language_is_fortran_p().
Referenced by ensure_comment_consistency(), sentence_area(), sentence_basic_declaration(), sentence_data(), sentence_data_statement(), sentence_external(), sentence_symbolic(), and text_entity_declaration().
return variable
To simplify validation, at the expense of some information about the parsing process.
FI: struct, union and enum are also declared (in theory...), but their characteristics should be given differently.
&& (storage_ram_p(s) || storage_return_p(s) || storage_formal_p(s))
FI: How do we want to print out structures, unions and enums?
FI: How do we want to print out typedefs?
FI: it would be useful to dump more information aout fields and members
Formal parameters
Return variable
Structure of each area/common
isfortran | sfortran |
Definition at line 304 of file symbol_table.c.
References area_size, basic_pointer, basic_pointer_p, basic_to_string(), CAR, code_declarations, code_externs, compare_entities(), concatenate(), derived_entity_p(), dump_common_layout(), dump_functional(), ENDP, ENTITY, entity_domain, entity_domain_number, entity_enum_p(), entity_initial, entity_list_p(), entity_module_p(), entity_name, entity_storage, entity_struct_p(), entity_type, entity_undefined, entity_undefined_p, entity_union_p(), f(), FOREACH, formal_offset, gen_copy_seq(), gen_free_list(), gen_sort_list(), i2a(), list_to_string(), list_undefined, module_local_name(), NIL, NL, pips_assert, pips_debug, pips_internal_error, POP, SizeOfElements(), storage_formal, storage_formal_p, storage_return_p, storage_undefined_p, strdup(), string_buffer_append(), string_buffer_free(), string_buffer_make(), string_buffer_to_string(), type_area, type_area_p, type_functional, type_functional_p, type_to_string(), type_variable, type_variable_p, type_void_p, typedef_entity_p(), ultimate_type(), value_code, variable_basic, variable_dimensions, variable_qualifiers, words_dimensions(), and words_qualifiers().
Referenced by actual_symbol_table_dump().
void html_output | ( | const char * | out, |
bool | cr | ||
) |
out | ut |
cr | r |
Definition at line 105 of file html_prettyprinter.c.
References html_print, NL, and out.
Referenced by html_print_area(), html_print_basic(), html_print_constant(), html_print_entity_full(), html_print_entity_name(), html_print_expression(), html_print_formal(), html_print_mode(), html_print_parameter(), html_print_qualifier(), html_print_ram(), html_print_rom(), html_print_statement(), html_print_storage(), html_print_type(), html_print_unstructured(), html_print_value(), and html_print_whileloop().
bool html_prettyprint | ( | const | string | ) |
Set the current module entity required to have many things working in PIPS:
The debug is now controled by this environment variable name:
Print current module
string | od_name |
Definition at line 818 of file html_prettyprinter.c.
References begin_block(), concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_on, end_block(), get_bool_property(), html_print, html_print_statement(), html_print_symbol_table(), html_set_output(), module_name_to_entity(), module_statement, NL, pips_assert, pips_debug, reset_current_module_entity(), reset_current_module_statement(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_current_module_statement(), statement_consistent_p(), and strdup().
bool html_prettyprint_symbol_table | ( | const | string | ) |
string | odule |
Definition at line 872 of file html_prettyprinter.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), DB_PUT_FILE_RESOURCE, html_set_output(), module, pips_debug, safe_fclose(), safe_fopen(), and strdup().
void html_print_entity_full | ( | entity | e | ) |
Definition at line 521 of file html_prettyprinter.c.
References begin_block(), end_block(), entity_initial, entity_name, entity_storage, entity_type, html_output(), html_print_storage(), html_print_type(), and html_print_value().
Referenced by html_print_symbol_table().
void html_print_symbol_table | ( | void | ) |
Print symbol table
Definition at line 805 of file html_prettyprinter.c.
References begin_block(), end_block(), entity_domain, FOREACH, gen_filter_tabulated(), gen_true(), html_print, html_print_entity_full(), and NL.
Referenced by html_prettyprint().
void inegalite_debug | ( | Pcontrainte | c | ) |
Definition at line 53 of file constraint_to_text.c.
References entity_local_name(), and inegalite_fprint().
string inegalite_text_format | ( | string | , |
string | , | ||
text | , | ||
Pcontrainte | , | ||
string(*)(void) | , | ||
bool | , | ||
bool | |||
) |
checks that the prettyprint hook was actually reset...
Definition at line 231 of file misc.c.
References empty_text(), pips_assert, and text_statement_hook.
Referenced by generic_print_code_pv(), get_any_comp_regions_text(), get_continuation_condition_text(), get_semantic_text(), print_code_or_source(), print_code_or_source_comp(), print_code_points_to(), print_code_static_control(), print_parallelized_code_common(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), store_new_module(), text_code_points_to(), text_code_reductions(), and wp65().
exported for unstructured.c
FI: before calling the hook, statement_ordering(obj) should be checked
module | odule |
margin | argin |
obj | bj |
Definition at line 3462 of file misc.c.
References ADD_SENTENCE_TO_TEXT, asprintf, attach_decoration_to_text(), buffer, empty_text(), get_bool_property(), get_comment_sentinel(), instruction_block_p, instruction_unstructured_p, is_sentence_formatted, make_sentence(), make_text(), module, NIL, ORDERING_NUMBER, ORDERING_STATEMENT, statement_instruction, statement_ordering, STATEMENT_ORDERING_UNDEFINED, and text_statement_hook.
Referenced by text_trail().
A simplified version of find_last_statement() located in prettyprint.c and designed to be used within the prettyprinter.
Hopefully it is a return statement. Since the semantics of STOP is ignored by the parser, a final STOp should be followed by a RETURN.
Definition at line 168 of file statement.c.
References CAR, CONTROL, control_statement, ENDP, gen_free_list(), gen_last(), instruction_block, last_statement(), pips_assert, STATEMENT, statement_call_p(), statement_expression_p(), statement_forloop_p(), statement_goto_p(), statement_instruction, statement_loop_p(), statement_sequence_p(), statement_undefined, statement_undefined_p, statement_unstructured(), statement_unstructured_p(), statement_whileloop_p(), and unstructured_to_trail().
Referenced by compile_omp(), FixCReturnStatements(), last_statement(), and step_compile_analysed_module().
bool make_text_resource | ( | const char * | mod_name, |
const char * | res_name, | ||
const char * | file_ext, | ||
text | texte | ||
) |
print.c
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().
bool maxima_simplify | ( | expression * | presult | ) |
call maxima to simplify an expression prefer simplify_expression !
try to call maxima to simplify this expression
strip out banner
look for first %
skip the three next chars
parse the output
presult | result |
Definition at line 180 of file expression.c.
References asprintf, exp, expression_undefined_p, free(), free_expression(), gen_free_list(), get_current_module_entity(), NIL, string_to_expression(), words_expression(), and words_to_string().
True is statement "s" can be printed out without enclosing braces when it is the true branch of a test.
This is a special case because of dangling else clauses. bool one_liner_true_branch_p(statement s) { bool one_p = false; if(!statement_test_p(s)) one_p = one_liner_p(s); else { test t = instruction_test(statement_instruction(s)); statement f = test_false(t); if(!(empty_statement_p(f) || nop_statement_p(f))) one_p = true; // No need to worry, the else clause exists else { // Make sure there is no internal dangling else... one_p = one_liner_test_p(t); } } return one_p; }
True is test "t" contains a non-empty final "else" clause. bool one_liner_test_p(test t) { bool one_liner_p = false; /* We must make sure that the final else clause is not empty *\/ statement f = test_false(t); if(empty_statement_p(f) || nop_statement_p(f)) one_liner_p = false; else if(statement_test_p(f)) { /* Go down recursively for "else if" constructs. *\/ instruction i = statement_instruction(f); test ft = instruction_test(i); one_liner_p = one_liner_test_p(ft); } else one_liner_p = true; return one_liner_p; }
Can this statement be printed on one line, without enclosing braces, if it is embedded in a loop?
Another test must be used if Statement "s" is embedded in a test a a true branch.
There may be many lines hidden behind another block construct when code is generated in a non canonical way as for {{x=1;y=2;}}
OK, we could check deeper, but this is only useful for redundant internal representations. Let's forget about niceties such as skipping useless braces.
Definition at line 301 of file misc.c.
References CAR, ENDP, gen_length(), instruction_call_p, instruction_expression_p, instruction_forloop_p, instruction_goto_p, instruction_loop_p, instruction_sequence, instruction_sequence_p, instruction_test_p, instruction_whileloop_p, return_instruction_p(), sequence_statements, STATEMENT, statement_declarations, and statement_instruction.
Referenced by ensure_comment_consistency(), gcc_if_block_braces_required_p(), text_block_else(), text_block_elseif(), text_block_ifthen(), text_loop_default(), text_trail(), and text_whileloop().
void output_a_graph_view_of_the_unstructured | ( | text | , |
entity | , | ||
const char * | , | ||
int | , | ||
unstructured | , | ||
int | |||
) |
Referenced by ensure_comment_consistency(), and text_unstructured().
bool parsed_symbol_table | ( | const char * | module_name | ) |
bool c_symbol_table(const char* module_name)
{ set_prettyprint_language_tag(is_language_c); //all the way down to words_basic() actual_symbol_table_dump(module_name, false); return true; } bool fortran_symbol_table(const char* module_name) { actual_symbol_table_dump(module_name, true); return true; } To replace c_symbol_table() and fortran_symbol_table() because the information about the language is available in the symbol table.
This the symbol table is never duplicated, this function's output is correct only if the controlizer has not been applied.
module_name | odule_name |
Definition at line 665 of file symbol_table.c.
References actual_symbol_table_dump(), and module_name().
Definition at line 69 of file pragma.c.
References C_PRAGMA_HEADER_STRING, concatenate(), EXPRESSION, FOREACH, FORTRAN_OMP_CONTINUATION_STRING, FORTRAN_PRAGMA_HEADER_STRING, gen_free_list(), gen_insert_before(), gen_nreverse(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, is_pragma_expression, is_pragma_string, MAX_LINE_LENGTH, NIL, pips_assert, pips_internal_error, pragma_expression, pragma_string, pragma_tag, prettyprint_language_is_fortran_p(), strdup(), STRING, string_buffer_append(), string_buffer_append_list(), string_buffer_free_all(), string_buffer_make(), string_buffer_to_string(), string_undefined, and words_expression().
Referenced by add_expr_to_pragma_expr_list(), build_omp_pragma_list(), build_outer(), extension_to_string(), inner_rewrite(), and pragma_scmp_task_p().
bool print_code | ( | const | string | ) |
string | 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().
Ronan, 5/09/1995. .Ker yell@ cri. ensmp .fr
mod_name | od_name |
Definition at line 47 of file print_code_as_a_graph.c.
References print_code(), and set_bool_property().
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().
void print_dummy | ( | dummy | d | ) |
Display a "dummy" on stderr, useful for debugging.
d | is the dummy to display |
Definition at line 93 of file parameter.c.
References dummy_defined_p(), dummy_identifier, entity_name, and fprintf().
Referenced by print_parameter().
void print_entity_variable | ( | entity | e | ) |
entity.c
entity.c
if it is just a variable, the type is printed, otherwise just the entity name is printed
Definition at line 56 of file entity.c.
References basic_to_string(), entity_name, entity_type, fprintf(), gen_map(), print_dimension(), type_variable, type_variable_p, variable_basic, and variable_dimensions.
Referenced by apply_abstract_effect_to_transformer(), call_to_transformer(), copy_write_statement_with_cumulated_regions(), entity_in_ref(), generic_apply_effect_to_transformer(), make_send_receive_conversion(), prepare_context(), print_ctx(), print_ctx_task(), print_distributed_arrays(), print_processors(), print_templates(), and regenerate_toggles().
void print_expression | ( | expression | e | ) |
no file descriptor is passed to make is easier to use in a debugging stage.
Do not make macros of those printing functions
Definition at line 58 of file expression.c.
References expression_domain, expression_domain_number, expression_normalized, expression_syntax, expression_undefined, fprintf(), normalized_undefined, print_normalized(), and print_syntax().
Referenced by abc_with_allocation_size(), affine_expression_of_loop_index_p(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), any_basic_update_to_transformer(), any_expression_to_transformer(), array_size_stride(), atom_cse_expression(), atomize_this_expression(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_reference(), call_rwt(), copy_from_statement(), copy_from_test(), copy_to_statement(), copy_to_test(), cse_expression_flt(), debug_cost_expression_array(), dprint(), expr_cse_flt(), expression_equal_in_context_p(), expression_in_array_subscript(), expression_less_than_in_context(), expression_substitute_variable(), expression_to_points_to_sources(), find_entities_to_wrap(), formal_variable_add_aliases(), gfc2pips_code2instruction_(), Hierarchical_tiling(), HpfcExpressionToInt(), impact_check_two_scalar_variables_in_path(), integer_expression_to_transformer(), interprocedural_abc_arrays(), invariant_expression_p(), loop_flt(), loop_strip_mine(), make_list_of_flags(), make_send_receive_conversion(), MakeDimension(), MemberIdentifierToExpression(), partial_eval_reference(), pointer_expression_to_transformer(), print_alias_association(), print_alignment(), print_dimension(), print_distribution(), print_eformat(), print_expressions(), proper_to_summary_simple_effect(), ram_variable_add_aliases(), remove_minmax(), rename_statement_declarations(), same_or_equivalence_argument_add_aliases(), size_of_dummy_array(), split_update_call(), store_initial_value(), subscript_value(), substitute_and_create(), substitute_ghost_variable_in_expression(), Tiling_buffer_allocation(), top_down_abc_array(), top_down_abc_call(), transformer_add_condition_information_updown(), transformer_add_integer_relation_information(), translate_to_module_frame(), verify_array_element(), verify_used_before_set_call(), and verify_used_before_set_expression().
void print_expressions | ( | list | le | ) |
le | e |
Definition at line 98 of file expression.c.
References EXPRESSION, MAP, and print_expression().
Referenced by add_prettyprint_control_list_to_declaration_statement(), dprint(), MakeFunctionExpression(), outliner_parameters(), and verify_used_before_set_call().
mod | od |
sl | l |
Definition at line 79 of file loop.c.
References entity_name, FOREACH, gen_free_list(), LOOP, loop_label, NIL, print_text(), and text_loop().
void print_mode | ( | mode | m | ) |
Display a "mode" on stderr, useful for debugging.
p | is the mode to display |
Definition at line 76 of file parameter.c.
References fprintf(), mode_defined_p(), mode_reference_p, and mode_value_p.
Referenced by print_parameter().
void print_normalized | ( | normalized | n | ) |
should be replaced by a call to expression_fprint() if it's ever added to linear library
Definition at line 168 of file expression.c.
References fprintf(), normalized_complex_p, normalized_linear, and vect_debug().
Referenced by print_expression().
void print_number_to_statement | ( | hash_table | nts | ) |
nts | ts |
Definition at line 209 of file statement.c.
References fprintf(), HASH_MAP, nts, and print_statement().
Referenced by get_any_comp_regions_text(), get_continuation_condition_text(), and get_semantic_text().
void print_parallel_statement | ( | statement | s | ) |
Definition at line 156 of file statement.c.
References free(), get_string_property(), PRETTYPRINT_PARALLEL, print_statement(), set_string_property(), and strdup().
Referenced by CodeGenerate(), do_it(), MakeLoopAs(), rice_loop(), and rice_statement().
bool print_parallelized77_code | ( | const | string | ) |
string | od_name |
Definition at line 294 of file print.c.
References print_parallelized_code_common().
bool print_parallelized90_code | ( | const | string | ) |
string | od_name |
Definition at line 289 of file print.c.
References print_parallelized_code_common().
bool print_parallelized_code | ( | const | string | ) |
string | od_name |
Definition at line 284 of file print.c.
References print_parallelized_code_common().
bool print_parallelizedHPF_code | ( | const | string | ) |
string | odule_name |
Definition at line 299 of file print.c.
References module_name(), and print_parallelized_code_common().
bool print_parallelizedMPI_code | ( | const | string | ) |
string | od_name |
Definition at line 314 of file print.c.
References print_parallelized_code_common().
bool print_parallelizedOMP_code | ( | const | string | ) |
string | od_name |
Definition at line 306 of file print.c.
References all_priv, get_bool_property(), pips_user_warning, and print_parallelized_code_common().
void print_parameter | ( | parameter | p | ) |
p | is the parameter to display |
Definition at line 45 of file parameter.c.
References fprintf(), parameter_dummy, parameter_mode, parameter_type, parameter_undefined, print_dummy(), print_mode(), and print_type().
Referenced by print_parameters().
void print_parameters | ( | list | lp | ) |
Display a parameter on stderr, useful for debugging.
lp | is the list of parameters to display |
lp | p |
Definition at line 63 of file parameter.c.
References FOREACH, PARAMETER, and print_parameter().
Referenced by outliner_parameters().
void print_qualifier | ( | qualifier | q | ) |
Definition at line 138 of file type.c.
References CONS, gen_free_list(), NIL, print_qualifiers(), and QUALIFIER.
Referenced by dprint().
void print_qualifiers | ( | list | ql | ) |
ql | l |
Definition at line 131 of file type.c.
References dump_words(), gen_full_free_list(), and words_qualifiers().
Referenced by dprint(), and print_qualifier().
void print_reference | ( | reference | r | ) |
Definition at line 142 of file expression.c.
References fprint_reference().
Referenced by align_check(), bottom_up_abc_reference(), build_sc_with_several_uniform_ref(), create_realFifo_proc(), dprint(), entity_in_ref(), entity_in_ref_rwt(), fprint_points_to_cell(), generate_mmcd_stat_from_ref(), make_lInitStats(), make_load_blocks(), make_lSwitchStats(), make_reindex(), make_send_receive_conversion(), make_store_blocks(), Overlap_Analysis(), perform_substitution_in_expression(), phrase_remove_dependences_rwt(), print_or_dump_points_to(), print_reduction(), reference_conflicting_p(), reference_conflicting_test_and_update(), reference_filter(), reference_to_points_to_sinks(), references_for_regions(), remove_write_ref(), rename_statement_reductions(), replace_array_ref_with_fifos2(), simple_indices_p(), some_conflicts_between(), source_to_sinks(), subtsitute_variable_in_reference(), update_indices_for_local_computation(), write_conf_on_ref(), and xml_Chain_Graph().
void print_reference_list | ( | list | lr | ) |
lr | r |
Definition at line 147 of file expression.c.
References CAR, ENDP, entity_local_name(), fprintf(), MAPL, REFERENCE, and reference_variable.
Referenced by call_instruction_to_communications(), loop_nest_to_local_variables(), and print_references().
void print_references | ( | list | rl | ) |
rl | l |
Definition at line 163 of file expression.c.
References print_reference_list().
Referenced by dprint(), and UseFormalArguments().
bool print_source | ( | const | string | ) |
string | od_name |
Definition at line 278 of file print.c.
References is_user_view, and print_code_or_source().
void print_statement | ( | statement | s | ) |
Print a statement on stderr.
Print the statement according to the current PRETTYPRINT_LANGUAGE property
See text_named_module() for improvements.
Definition at line 98 of file statement.c.
References fprint_statement().
Referenced by abc_instrumentation_insert_before_statement(), add_aliases_for_current_call_site(), adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), assign_statement_task_mapping(), atomize_as_required(), bottom_up_abc_insert_before_statement(), bottom_up_abc_statement_rwt(), build_binary_operators_with_huffman(), c_code_string(), c_unstructured(), call_flt(), call_to_transformer(), comEngine_opt_loop_interchange(), compile_body(), compute_distribution_controlization_context(), compute_region(), connect_unstructured(), controlize_distribution(), copy_n_reference(), copy_n_statement(), copy_write_statement_with_cumulated_regions(), create_module_with_statement(), cse_expression_flt(), ctx_get_send_statement(), da_process_list(), debug_statement(), debug_unstructured(), distribute_code(), do_it(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_substitute(), dprint(), extract_matching_statements(), extract_non_conflicting_statements(), filter_live_out_regions_statement(), find_statements_interactively_walker(), fprint_bdt_with_stat(), fs_filter(), fsmize_statement(), full_loop_unroll(), full_spaghettify(), full_spaghettify_statement(), generate_code(), generate_code_loop(), generate_code_test_proc(), get_externalized_and_analyzed_function_name(), get_function_name_by_searching_tag(), get_points_to_graph_from_statement(), get_statements_with_comments_containing(), gpu_ify_statement(), gpu_memory_apply(), gpu_promote_sequential_on_sequence(), HRE_distribute(), HRE_distribute_stat(), icm_codegen(), identify_statements_to_distribute(), if_conv_init_statement(), if_conversion_compact_stats(), if_conversion_init(), init_statement_equivalence_table(), initial_code_abc_statement_rwt(), inline_calls(), inline_expression(), inline_expression_call(), inline_statement_crawler(), interprocedural_abc_insert_before_statement(), invariant_code_motion(), is_elsif_test_p(), isolate_code_portion(), loop_strip_mine(), make_array_communication_statement(), make_bottom_up_abc_tests(), make_interprocedural_abc_tests(), make_lInitStats(), make_lSwitchStats(), make_mpi_conversion(), make_send_receive_conversion(), make_statement_copy_i(), make_task_mapping(), mark_loop_to_outline(), mpi_initialize(), opt_loop_interchange_fill_lists(), outliner_patch_parameters(), outliner_statements_referenced_entities(), partial_eval_statement(), phrase_distributor_control_code(), phrase_remove_dependences_rwt(), postcondition_filter(), prepare_context(), prettyprint_dot_dependence_graph(), print_number_to_statement(), print_parallel_statement(), print_statement_of_module(), print_statements(), process_true_call_stat(), reduce_sequence(), reductions_rewrite(), remove_begin_tag(), remove_end_tag(), rename_statement_reductions(), replace_in_sequence_statement_with(), replace_reductions_in_statement(), replicate_declaration(), rice_loop(), rm_db_block(), safe_print_statement(), safescale_distributor(), safescale_module_analysis(), seq_flt(), sequence_to_post_pv(), simdize_simple_statements_pass2(), SimplifyGraph(), smalltalk_code_string(), some_conflicts_between(), spaghettify_statement(), st_statement(), statement_convert_to_statement_with_sequence_of_intruction(), statement_filter(), statement_rewrite(), step_directive_print(), step_update_comm(), store_new_module(), SupressDependances(), taskify_statement(), Tiling2_buffer(), top_down_abc_flt(), top_down_abc_rwt(), variable_private_to_loop_p(), verify_array_element(), verify_array_variable(), verify_scalar_variable(), verify_used_before_set_statement_flt(), wp65_debug_print_text(), and xml_code_string().
void print_statement_of_module | ( | statement | s, |
const char * | mn | ||
) |
mn | n |
Definition at line 111 of file statement.c.
References entity_undefined_p, get_current_module_entity(), local_name_to_top_level_entity(), print_statement(), reset_current_module_entity(), reset_label_counter(), and set_current_module_entity().
void print_statement_set | ( | FILE * | fd, |
set | r | ||
) |
statement.c
fd | d |
Definition at line 49 of file statement.c.
References fprintf(), SET_MAP, and statement_number.
Referenced by CodeGenerate(), rdg_loop(), rice_loop(), and rice_update_dependence_graph().
void print_statements | ( | list | sl | ) |
sl | l |
Definition at line 103 of file statement.c.
References FOREACH, print_statement(), and STATEMENT.
Referenced by dprint(), rename_statement_declarations(), and simdize_simple_statements_pass2().
void print_syntax | ( | syntax | s | ) |
Definition at line 121 of file expression.c.
References gen_free_list(), NIL, print_words(), and words_syntax().
Referenced by interprocedural_mapping(), make_send_receive_conversion(), print_expression(), and print_syntax_expressions().
void print_syntax_expressions | ( | list | le | ) |
le | e |
Definition at line 108 of file expression.c.
References CDR, ENDP, EXPRESSION, expression_syntax, fprintf(), MAP, and print_syntax().
void print_type | ( | type | t | ) |
For debugging.
Definition at line 111 of file type.c.
References debug_off, debug_on, dump_words(), fprintf(), gen_free_list(), NIL, type_domain, type_domain_number, type_undefined_p, and words_type().
Referenced by build_view_file(), create_scalar_stub_sink_cell(), dprint(), entity_all_xxx_locations_typed(), expression_to_points_to_sources(), generic_stub_source_to_sinks(), get_dont_build_view_file(), get_view_file(), gpips_display_plain_file(), print_parameter(), type_dereferencement_depth(), wpips_display_plain_file(), and wpips_display_WP65_file().
void print_types | ( | list | tl | ) |
void printf_loop | ( | loop | lp | ) |
loop.c
loop.c
void fprint_loop(fp, lp): print a loop.
AC 94/06/07 copied from reindexing/reindexing_utils.c for debugging
lp | p |
Definition at line 48 of file loop.c.
References CONS, ENTITY, execution_sequential_p, EXPRESSION, fprint_entity_list(), fprint_list_of_exp(), fprintf(), loop_execution, loop_index, loop_label, loop_locals, loop_range, NIL, range_increment, range_lower, and range_upper.
Referenced by loop_replace_variable().
Referenced by ensure_comment_consistency(), semantics_user_warning_alist(), and spear_log_alist().
module.c
module.c
module | odule |
Definition at line 87 of file module.c.
References db_get_memory_resource(), do_recompile_module(), module, and module_name_to_entity().
Referenced by do_inlining(), and do_unfolding().
Definition at line 87 of file expression.c.
References FOREACH, free(), gen_free_list(), NIL, out, STRING, words_reference(), and words_to_string().
Referenced by adapt_reference_to_type(), add_address_of_value(), analyzed_reference_p(), any_assign_to_transformer(), any_basic_update_to_transformer(), any_update_to_transformer(), attach_ref_to_loop(), basic_update_reflhs_with_rhs_to_transformer(), cell_is_xxx_p(), cell_reference_to_type(), constant_memory_access_path_to_location_name(), convex_cell_reference_preceding_p(), count_dataflows_on_ref(), dereferencing_to_sinks(), extended_source_to_sinks(), filter_formal_context_according_to_actual_context(), forward_substitute_array_location_in_transformer(), fprint_dataflow(), generic_eval_cell_with_points_to(), lhs_subs_in_ins(), new_array_element_backward_substitution_in_transformer(), new_filter_formal_context_according_to_actual_context(), perform_substitution_in_expression(), points_to_cell_name(), points_to_name(), points_to_rank(), points_to_unary_operation_to_transformer(), potential_to_effective_memory_leaks(), print_value_mappings(), print_variables(), process_ref_list(), reduction_as_str(), reference_to_address_entity(), reference_to_address_of_value(), sa_do_it(), semantics_usable_points_to_reference_p(), simple_cell_reference_preceding_p(), simple_pv_translate(), successor_only_has_rr_conflict_p(), and update_reflhs_with_rhs_to_transformer().
void register_intrinsic_handler | ( | const char * | name, |
intrinsic_desc_t * | desc | ||
) |
after this call, name and desc are owned by intrinsic_handlers, but will never be deallocated they must point to permanent storage
name | ame |
desc | esc |
Definition at line 2517 of file misc.c.
References hash_put(), hash_table_undefined_p, init_intrinsic_handlers(), and intrinsic_handlers.
Referenced by step_analyse_init().
expression remove_modulo | ( | expression | exp | ) |
exp | xp |
Definition at line 83 of file craft.c.
References exp, expression_domain, gen_recurse, gen_true(), and rewrite_modulo_expression().
Referenced by text_loop_craft().
void reset_alternate_return_set | ( | void | ) |
Definition at line 804 of file misc.c.
References gen_free_list(), ifdebug, list_undefined, list_undefined_p, pips_assert, and set_of_labels_required_for_alternate_returns.
Referenced by ensure_comment_consistency(), fprint_statement(), and statement_to_text().
void reset_last_statement | ( | void | ) |
void reset_prettyprinter_common_hook | ( | void | ) |
Definition at line 787 of file declarations2.c.
References common_hook, and default_common_hook().
Referenced by hpfc_print_code().
void reset_prettyprinter_head_hook | ( | void | ) |
Definition at line 3964 of file misc.c.
References head_hook.
Referenced by compile_mpi(), and hpfc_print_code().
Ignore the parser declared entities?
name | ame |
Definition at line 1433 of file declarations.c.
References gen_free_list(), generic_c_words_entity(), and NIL.
Referenced by FindOrCreateCurrentEntity(), UpdateEntity(), and UpdateFunctionEntity().
void safe_print_statement | ( | statement | s | ) |
The return label only can be associated to a RETURN call, however the controlizer does not follow this consistency rule.
Definition at line 140 of file statement.c.
References continue_statement_p(), entity_return_label_p(), fprintf(), print_statement(), statement_identification(), statement_label, and statement_undefined_p.
Referenced by check_new_arc_for_structured_statement(), and IsolatedStatement().
bool same_application_name_p | ( | application | a1, |
application | a2 | ||
) |
a1 | 1 |
a2 | 2 |
Definition at line 109 of file same_names.c.
References application_arguments, application_function, same_expression_name_p(), and same_lexpr_name_p().
Referenced by same_syntax_name_p().
c1 | 1 |
c2 | 2 |
Definition at line 69 of file same_names.c.
References call_arguments, call_function, same_entity_lname_p(), and same_lexpr_name_p().
Referenced by same_syntax_name_p().
cs1 | s1 |
cs2 | s2 |
Definition at line 103 of file same_names.c.
References cast_expression, cast_type, same_expression_name_p(), and same_type_name_p().
Referenced by same_syntax_name_p().
e1 | 1 |
e2 | 2 |
Definition at line 64 of file same_names.c.
References entity_local_name(), and same_string_p.
Referenced by inline_should_inline(), outline_remove_duplicates(), same_call_name_p(), same_ref_name_p(), simd_replace_parameters(), and UseFormalArguments().
bool same_expression_name_p | ( | expression | e1, |
expression | e2 | ||
) |
compare two entities for their appearance point of view.
used for putting common in includes.
e1 | 1 |
e2 | 2 |
Definition at line 159 of file same_names.c.
References expression_syntax, and same_syntax_name_p().
Referenced by same_application_name_p(), same_cast_name_p(), same_lexpr_name_p(), same_range_name_p(), same_sizeofexpression_name_p(), and same_subscript_name_p().
else
l1 | 1 |
l2 | 2 |
Definition at line 53 of file same_names.c.
References CAR, EXPRESSION, gen_length(), POP, and same_expression_name_p().
Referenced by same_application_name_p(), same_call_name_p(), same_ref_name_p(), and same_subscript_name_p().
r1 | 1 |
r2 | 2 |
Definition at line 81 of file same_names.c.
References range_increment, range_lower, range_upper, and same_expression_name_p().
Referenced by same_syntax_name_p().
r1 | 1 |
r2 | 2 |
Definition at line 75 of file same_names.c.
References reference_indices, reference_variable, same_entity_lname_p(), and same_lexpr_name_p().
Referenced by get_complement_expression(), and same_syntax_name_p().
bool same_sizeofexpression_name_p | ( | sizeofexpression | s0, |
sizeofexpression | s1 | ||
) |
s0 | 0 |
s1 | 1 |
Definition at line 88 of file same_names.c.
References s1, same_expression_name_p(), same_type_name_p(), sizeofexpression_expression, sizeofexpression_expression_p, sizeofexpression_type, and sizeofexpression_type_p.
Referenced by same_syntax_name_p(), and same_va_arg_name_p().
ss1 | s1 |
ss2 | s2 |
Definition at line 97 of file same_names.c.
References same_expression_name_p(), same_lexpr_name_p(), subscript_array, and subscript_indices.
Referenced by same_syntax_name_p().
else
s1 | 1 |
s2 | 2 |
Definition at line 130 of file same_names.c.
References is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, pips_internal_error, s1, same_application_name_p(), same_call_name_p(), same_cast_name_p(), same_range_name_p(), same_ref_name_p(), same_sizeofexpression_name_p(), same_subscript_name_p(), same_va_arg_name_p(), syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, syntax_tag, and syntax_va_arg.
Referenced by same_expression_name_p().
For naming homogeneity: expression_to_string(), reference_to_string()...
but type_to_string() is already implemented in ri-util in a less useful form string type_to_string(cons type t) { return string_of_type(t); } This function cannot be in ri-util because of string_of_type()
t0 | 0 |
t1 | 1 |
Definition at line 74 of file type.c.
References free(), s1, same_string_p, and string_of_type().
Referenced by comparable_entity_in_list_p(), same_cast_name_p(), and same_sizeofexpression_name_p().
l1 | 1 |
l2 | 2 |
Definition at line 115 of file same_names.c.
References CAR, gen_length(), POP, s1, same_sizeofexpression_name_p(), and SIZEOFEXPRESSION.
Referenced by same_syntax_name_p().
void sc_syst_debug | ( | Psysteme | s | ) |
Definition at line 46 of file constraint_to_text.c.
References entity_local_name(), and sc_fprint().
Referenced by build_and_test_dependence_context(), dependence_cone_positive(), loop_regions_normalize(), region_exact_projection_along_variable(), region_sc_minimal(), regions_may_convex_hull(), regions_must_convex_hull(), sc_projection_optim_along_vecteur_ofl(), TestDependence(), text_transformer(), and unimodular().
We have no way to distinguish between the SUBROUTINE and PROGRAM They two have almost the same properties.
For the time being, especially for the PUMA project, we have a temporary idea to deal with it: When there's no argument(s), it should be a PROGRAM, otherwise, it should be a SUBROUTINE. Lei ZHOU 18/10/91
correct PROGRAM and SUBROUTINE distinction added, FC 18/08/94 approximate BLOCK DATA / SUBROUTINE distinction also added. FC 09/97
ppdl | pdl |
Definition at line 601 of file declarations.c.
References CHAIN_SWORD, ENDP, entity_blockdata_p(), entity_f95module_p(), entity_main_module_p(), entity_type, entity_user_name(), functional_result, gen_nconc(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, is_sentence_unformatted, is_type_unknown, is_type_variable, is_type_void, make_sentence(), make_unformatted(), NIL, pips_assert, pips_internal_error, prettyprint_language_is_c_p(), static_module_p(), type_functional, type_functional_p, type_tag, type_unknown_p, type_variable, type_variable_p, type_void_p, variable_basic, variable_qualifiers, words_basic(), words_parameters(), and words_qualifiers().
Referenced by ensure_comment_consistency().
Definition at line 583 of file declarations.c.
References gen_free_list(), NIL, and sentence_variable().
Referenced by make_emulated_shared_variable(), and set_dimensions_of_local_variable_family().
ppdl | pdl |
Definition at line 567 of file declarations.c.
References CHAIN_SWORD, entity_type, gen_nconc(), is_sentence_unformatted, make_sentence(), make_unformatted(), NIL, pips_assert, type_variable, type_variable_p, variable_basic, words_basic(), and words_declaration().
Referenced by Sentence_Variable().
void set_alternate_return_set | ( | void | ) |
Definition at line 795 of file misc.c.
References ifdebug, list_undefined_p, NIL, pips_assert, and set_of_labels_required_for_alternate_returns.
Referenced by ensure_comment_consistency(), fprint_statement(), and statement_to_text().
void set_last_statement | ( | statement | ) |
Definition at line 3963 of file misc.c.
References f(), and head_hook.
Referenced by compile_mpi(), and hpfc_print_code().
Definition at line 124 of file statement.c.
References debug_off, debug_on, entity_undefined, gen_free_list(), NIL, reset_alternate_return_set(), reset_label_counter(), set_alternate_return_set(), text_statement(), and text_undefined.
Referenced by control_graph(), insert_impact_description_as_comment(), and subtsitute_variable_in_reference().
string string_of_type | ( | const | type | ) |
Definition at line 56 of file type.c.
References FOREACH, free(), gen_free_list(), NIL, STRING, words_to_string(), and words_type().
Referenced by binary_arithmetic_operator_to_post_pv(), check_type_of_points_to_cells(), declaration_to_post_pv(), FILE_star_effect_reference_p(), malloc_arg_to_type(), malloc_to_abstract_location(), malloc_type_to_abstract_location(), module_initial_parameter_pv(), and xml_print_parameter().
bool symbol_table | ( | const char * | module_name | ) |
To replace c_symbol_table() and fortran_symbol_table() because the information about the language is available in the symbol table.
module_name | odule_name |
Definition at line 673 of file symbol_table.c.
References actual_symbol_table_dump(), and module_name().
Referenced by expression_similar_get_context_p(), and expression_similar_p().
void system_sorted_text_format | ( | string | line, |
string | prefix, | ||
text | txt, | ||
Psysteme | ps, | ||
string(*)(Variable) | variable_name, | ||
bool(*)(Pvecteur) | put_first, | ||
bool | a_la_fortran | ||
) |
lower level hook for regions.
{
repeat twice: once for first, once for not first.
== / .EQ.
<= / .LE.
}
line | ine |
prefix | refix |
txt | xt |
ps | s |
a_la_fortran | _la_fortran |
Definition at line 391 of file constraint_to_text.c.
References add_to_current_line(), contraintes_text_format(), get_string_property(), line, prefix, sc_empty_p(), and variable_name().
Referenced by system_text_format(), text_pointer_value(), text_points_to_relation(), and text_region_no_action().
void system_text_format | ( | string | line, |
string | prefix, | ||
text | txt, | ||
Psysteme | ps, | ||
string(*)(Variable) | variable_name, | ||
bool | a_la_fortran | ||
) |
appends ps to line/txt with prefix continuations.
line | ine |
prefix | refix |
txt | xt |
ps | s |
a_la_fortran | _la_fortran |
Definition at line 453 of file constraint_to_text.c.
References line, prefix, system_sorted_text_format(), and variable_name().
Referenced by text_continuation(), and text_transformer().
needed for hpfc
common | ommon |
module | odule |
Definition at line 1228 of file declarations2.c.
References common_members_of_module(), CONS, ENTITY, entity_type, gen_free_list(), module, NIL, pips_assert, text_entity_declaration(), and type_area_p.
Referenced by hpfc_print_common(), and text_area_included().
exported for hpfc.
Assume Fortran only!
module | odule |
Definition at line 1216 of file declarations2.c.
References code_declarations, entity_code(), gen_free_list(), module, NIL, and text_entity_declaration().
Referenced by ensure_comment_consistency(), and init_host_and_node_entities().
The previous declaration list is useless in Fortran, but the signature of functions designed for C or Fortran must be respected.
Definition at line 1244 of file declarations2.c.
References ADD_SENTENCE_TO_TEXT, code_initializations, empty_comments_p(), entity_initial, entity_module_p(), FOREACH, gen_free_list(), is_sentence_formatted, list_undefined, make_sentence(), make_text(), NIL, pips_assert, sentence_data_statement(), sequence_statements, STATEMENT, statement_comments, strdup(), and value_code.
Referenced by ensure_comment_consistency().
text text_loop | ( | entity | module, |
const char * | label, | ||
int | margin, | ||
loop | obj, | ||
int | n, | ||
list * | ppdl, | ||
bool | is_recursive_p | ||
) |
exported for conversion/look_for_nested_loops.c
small hack to show the initial label of the loop to name it...
quite ugly management of other prettyprints...
module | odule |
label | abel |
margin | argin |
obj | bj |
ppdl | pdl |
is_recursive_p | s_recursive_p |
Definition at line 3264 of file misc.c.
References ADD_SENTENCE_TO_TEXT, CAR, concatenate(), entity_empty_label_p(), entity_local_name(), execution_tag, gen_length(), get_bool_property(), instruction_assign_p(), instruction_sequence, instruction_sequence_p, is_execution_parallel, is_execution_sequential, is_sentence_formatted, LABEL_PREFIX, loop_body, loop_execution, loop_label, make_sentence(), make_text(), MERGE_TEXTS, module, NIL, pips_internal_error, pp_cmf_style_p, pp_craft_style_p, pp_f90_style_p, sequence_statements, STATEMENT, statement_instruction, strdup(), text_loop_90(), text_loop_cmf(), text_loop_craft(), text_loop_default(), and text_undefined.
Referenced by print_loops_list(), and text_instruction().
fortran90.c
fortran90.c
text_loop_90() only is called if the loop is parallel and if its body is a unique assignment statement or a list containing a unique assignment.
statement_ordering must be initialized too to avoid a prettyprinter warning
FI: Although new_s has been converted to text, it cannot always be freed. I do not know which part of new_s is reused in the result of text_statement() or somewhere else... Found with valgrind and validation case Prettyprint/aa01.tpips
No legal vector form has been found
module | odule |
label | abel |
margin | argin |
obj | bj |
Definition at line 77 of file fortran90.c.
References body_to_assignment_statement(), call_arguments, CAR, CDR, expand_expression(), EXPRESSION, expression_consistent_p(), expression_undefined, expression_undefined_p, free_expression(), gen_free_list(), instruction_call, loop_body, loop_consistent_p(), loop_index, loop_range, make_assign_statement(), module, NIL, pips_assert, set_free(), set_make(), set_pointer, statement_comments, statement_instruction, statement_number, statement_ordering, text_loop_default(), text_statement(), text_undefined, and vectors.
Referenced by text_loop().
text text_loop_cmf | ( | entity | module, |
const char * | label, | ||
int | margin, | ||
loop | obj, | ||
int | n, | ||
list | lr, | ||
list | lidx | ||
) |
=====================================================================
module | odule |
label | abel |
margin | argin |
obj | bj |
lr | r |
lidx | idx |
Definition at line 66 of file cmfortran.c.
References CAR, CDR, CHAIN_SWORD, CONS, ENDP, ENTITY, entity_local_name(), gen_nconc(), instruction_assign_p(), instruction_call, instruction_loop, instruction_loop_p, is_sentence_unformatted, loop_body, loop_index, loop_range, make_sentence(), make_text(), make_unformatted(), module, NIL, POP, RANGE, SENTENCE, statement_instruction, strdup(), text_undefined, Words_Call(), and words_cmf_loop_range().
Referenced by text_loop().
text text_loop_craft | ( | entity | module, |
const char * | label, | ||
int | margin, | ||
loop | obj, | ||
int | n, | ||
list | lr, | ||
list | lidx | ||
) |
=====================================================================
module | odule |
label | abel |
margin | argin |
obj | bj |
lr | r |
lidx | idx |
Definition at line 92 of file craft.c.
References ADD_SENTENCE_TO_TEXT, call_arguments, CAR, CDR, CHAIN_SWORD, comment(), CONS, copy_expression(), ENDP, ENTITY, entity_local_name(), EXPRESSION, expression_syntax, expression_undefined, gen_free_list(), gen_length(), gen_nconc(), INDENTATION, instruction_assign_p(), instruction_call, instruction_loop, instruction_loop_p, is_sentence_formatted, is_sentence_unformatted, is_syntax_reference, loop_body, loop_index, loop_range, MAKE_ONE_WORD_SENTENCE, make_sentence(), make_text(), make_unformatted(), malloc(), MERGE_TEXTS, module, NIL, POP, RANGE, reference_indices, remove_modulo(), statement_instruction, strdup(), syntax_reference, syntax_tag, text_statement(), user_error, words_expression(), words_loop_range(), words_to_string(), and x.
Referenced by text_loop().
text text_loop_default | ( | entity | module, |
const char * | label, | ||
int | margin, | ||
loop | obj, | ||
int | n, | ||
list * | ppdl, | ||
bool | is_recursive_p | ||
) |
exported for fortran90.c
HPF directives before the loop if required (INDEPENDENT and NEW)
idem if Open MP directives are required
LOOP prologue.
builds the PRIVATE scalar declaration if required
of string
local_var is a global variable which is exploited later...
FI: I do not understand why the local declarations were not added right away. I hope my change (simplification) does not break something else that is not tested by our non-regression suite.
loop BODY
LOOP postlogue
module | odule |
label | abel |
margin | argin |
obj | bj |
ppdl | pdl |
is_recursive_p | s_recursive_p |
Definition at line 3118 of file misc.c.
References ADD_SENTENCE_TO_TEXT, attach_loop_to_sentence_up_to_end_of_text(), C_loop_range(), CHAIN_SWORD, concatenate(), ENDP, entity_empty_label_p(), entity_local_name(), entity_user_name(), execution_sequential_p, gen_nconc(), get_bool_property(), get_prettyprint_language_tag(), INDENTATION, is_language_c, is_language_fortran, is_language_fortran95, is_sentence_unformatted, LABEL_PREFIX, local_flg, local_var, loop_body, loop_execution, loop_index, loop_label, loop_locals, loop_private_variables(), loop_range, MAKE_ONE_WORD_SENTENCE, make_sentence(), make_text(), make_unformatted(), MERGE_TEXTS, module, NIL, one_liner_p(), pips_debug, pips_internal_error, pp_cmf_style_p, pp_craft_style_p, pp_cray_style_p, pp_doall_style_p, pp_hpf_style_p, pp_omp_style_p, prettyprint_all_c_braces_p, sentence_undefined, strdup(), text_hpf_directive(), text_omp_directive(), text_statement_enclosed(), and words_loop_range().
Referenced by text_loop(), and text_loop_90().
Referenced by add_new_module(), do_recompile_module(), ensure_comment_consistency(), generic_print_code_pv(), get_any_comp_regions_text(), get_continuation_condition_text(), get_semantic_text(), hpfc_print_code(), print_code_or_source(), print_code_or_source_comp(), print_code_points_to(), print_code_static_control(), print_parallelized_code_common(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), simd_memory_packing(), store_new_module(), text_code_points_to(), text_code_reductions(), wp65(), and wp65_debug_print_module().
Referenced by create_HRE_module(), create_module_with_statement(), ensure_comment_consistency(), outliner_file(), outliner_independent(), outliner_independent_recursively(), ProcessEntries(), ProcessEntry(), and step_compile_analysed_module().
Definition at line 3084 of file misc.c.
References get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, NIL, OMP_C_CONTINUATION, OMP_C_DIRECTIVE, OMP_C_PARALLELDO, OMP_CONTINUATION, OMP_DIRECTIVE, OMP_PARALLELDO, pips_internal_error, text_directive(), and text_undefined.
Referenced by text_loop_default().
Referenced by ensure_comment_consistency(), fprint_statement_complexity(), make_movements_loop_body_wp65(), prettyprint_dot_label(), and protected_text_statement().
Referenced by ensure_comment_consistency(), fprint_statement(), statement_to_text(), text_block_else(), text_io_block_if(), text_logical_if(), text_loop_90(), text_loop_craft(), text_unstructured(), and text_whileloop().
Referenced by ensure_comment_consistency(), text_block(), text_block_else(), text_block_elseif(), text_block_ifthen(), text_loop_default(), text_trail(), and text_whileloop().
text text_unstructured | ( | entity | module, |
const char * | label, | ||
int | margin, | ||
unstructured | u, | ||
int | num, | ||
list * | ppdl | ||
) |
unstructured.c
build an arbitrary reverse trail of control nodes
decorate control nodes with labels when necessary
generate text with labels and goto's
module | odule |
label | abel |
margin | argin |
num | um |
ppdl | pdl |
Definition at line 55 of file unstructured.c.
References ADD_SENTENCE_TO_TEXT, blocks, CAR, CHAIN_SWORD, CONTROL, CONTROL_MAP, control_predecessors, control_statement, control_successors, debug(), decorate_trail(), dump_control_to_label_name(), dump_trail(), fprintf(), gen_free_list(), gen_length(), gen_nreverse(), get_bool_property(), get_comment_sentinel(), hash_pointer, hash_table_free(), hash_table_make(), ifdebug, is_sentence_unformatted, make_sentence(), make_text(), make_unformatted(), MAPL, MERGE_TEXTS, module, NIL, num, ORDERING_NUMBER, ORDERING_STATEMENT, output_a_graph_view_of_the_unstructured(), print_text(), statement_identification(), statement_ordering, strdup(), text_statement(), text_trail(), unstructured_control, unstructured_exit, and unstructured_to_trail().
Referenced by text_instruction().
type.c
type.c
FI: I am not sure about the language used.
Definition at line 45 of file type.c.
References debug_off, debug_on, gen_free_list(), NIL, words_to_string(), and words_type().
Referenced by adapt_reference_to_type(), add_sizeof_value(), filter_formal_context_according_to_actual_context(), find_kth_points_to_node_in_points_to_path(), intrinsic_call_to_points_to(), new_filter_formal_context_according_to_actual_context(), pips_user_value_name(), print_value_mappings(), type_compatible_super_cell(), type_compatible_with_points_to_cell_p(), and type_to_sizeof_value().
list unstructured_to_trail | ( | unstructured | u | ) |
The exit node must be first (i.e. last) to reach the continuation of the unstructured, or never reached (e.g. because the program loops forever or stops in the unstructured).
Definition at line 240 of file unstructured.c.
References build_trail(), CAR, CONS, CONTROL, control_in_trail_p(), gen_remove(), NIL, unstructured_control, and unstructured_exit.
Referenced by c_unstructured(), ensure_comment_consistency(), last_statement(), new_points_to_unstructured(), and text_unstructured().
bool user_view_p | ( | void | ) |
what about simple DOUBLE PRECISION, REAL, INTEGER...
This may happen in debugging statements
if(basic_int(obj)==4) { pc = CHAIN_SWORD(pc,"INTEGER"); } else {
FI: Use "bool" of stdbool.h instead of "int" but it leads to include issue for generated code; avoid stdbool.h and use "_Bool" directly but it leads to infinite loop from "_Bool" to "_Bool" because "_Bool" is declared as a typedef in anr999
should be a user error? Or simply bootstrap.c is not accurate?
ignore if it is signed or unsigned
The following code maybe redundant, because of tests in c_words_entity
This may occur in the parser when a variable is used before it is fully defined (see ptr in decl42.c)
FI: This space may not be always useful
obj | bj |
ppdl | pdl |
Definition at line 323 of file declarations.c.
References basic_bit, basic_complex, basic_derived, basic_float, basic_int, basic_logical, basic_pointer, basic_string, basic_tag, basic_typedef, basic_undefined_p, c_words_entity(), CHAIN_IWORD, CHAIN_SWORD, constant_int, DUMMY_ENUM_PREFIX, DUMMY_STRUCT_PREFIX, DUMMY_UNION_PREFIX, entity_local_name(), entity_type, entity_user_name(), ENUM_PREFIX, gen_nconc(), get_prettyprint_language_tag(), get_string_property(), is_basic_bit, is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, is_basic_string, is_basic_typedef, is_language_c, is_language_fortran, is_language_fortran95, lname(), NIL, pips_debug, pips_internal_error, STRUCT_PREFIX, symbolic_constant, type_undefined_p, UNION_PREFIX, words_type(), and words_value().
Referenced by basic_to_string(), find_or_create_allocatable_struct(), sentence_head(), sentence_variable(), and words_type().
list words_brace_expression | ( | expression | exp, |
list * | ppdl | ||
) |
exp | xp |
ppdl | pdl |
Definition at line 910 of file declarations.c.
References c_brace_expression_p(), call_arguments, CHAIN_SWORD, exp, EXPRESSION, expression_syntax, gen_nconc(), get_bool_property(), MAP, NIL, syntax_call, and words_expression().
Referenced by words_brace_op(), and words_variable_or_function().
obj | bj |
precedence | recedence |
leftmost | eftmost |
is_a_subroutine | s_a_subroutine |
Definition at line 2597 of file misc.c.
References gen_free_list(), NIL, and words_call().
Referenced by defs_elim_of_assign_call(), do_simdizer_init(), io_filter(), and text_loop_cmf().
exported for cmfortran.c
obj | bj |
precedence | recedence |
leftmost | eftmost |
is_a_subroutine | s_a_subroutine |
ppdl | pdl |
Definition at line 2575 of file misc.c.
References call_function, entity_initial, f(), MAXIMAL_PRECEDENCE, precedence_p, value_intrinsic_p, words_genuine_regular_call(), and words_intrinsic_call().
Referenced by text_instruction(), text_logical_if(), Words_Call(), words_subexpression(), and words_syntax().
There are memory leaks here since a new expression is constructed. =====================================================================
expression_constant_p(range_increment(obj)) &&
obj | bj |
Definition at line 46 of file cmfortran.c.
References call_function, CHAIN_SWORD, entity_local_name(), expression_syntax, gen_nconc(), range_increment, range_lower, range_upper, syntax_call, Words_Expression(), and Words_Subexpression().
Referenced by text_loop_cmf().
declarations.c
declarations.c
this is the case of g77 used after hpfc. thus I added a flag not to prettyprint again the dimensions of common variables. FC.
It is in the standard that dimensions cannot be declared twice in a single module. BC.
prettyprint_common_variable_dimensions_p | rettyprint_common_variable_dimensions_p |
ppdl | pdl |
Definition at line 277 of file declarations.c.
References attach_declaration_to_words(), CAR, CDR, CHAIN_SWORD, DIMENSION, entity_type, entity_user_name(), gen_nconc(), get_bool_property(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, MAPL, NIL, pips_internal_error, pl, type_variable, type_variable_p, variable_dimensions, variable_in_common_p(), variable_static_p(), and words_dimension().
Referenced by loop_private_variables(), sentence_area(), sentence_variable(), and text_entity_declaration().
dims | ims |
ppdl | pdl |
Definition at line 932 of file declarations.c.
References CHAIN_SWORD, FOREACH, gen_nconc(), get_bool_property(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, NIL, pips_internal_error, and words_dimension().
Referenced by generic_c_words_simplified_entity(), get_symbol_table(), and words_type().
list Words_Expression | ( | expression | obj | ) |
of string
obj | bj |
Definition at line 2616 of file misc.c.
References expression_syntax, and Words_Syntax().
Referenced by can_terapixify_expression_p(), effect_words_reference(), eval_var(), reference_conversion_expression(), words_cmf_loop_range(), words_loop_list(), words_numerical_dimension(), and words_test_list().
list words_expression | ( | expression | obj, |
list * | ppdl | ||
) |
This one is exported.
Outer parentheses are never useful. ppdl can point to an empty list, but it must be free on return of string
obj | bj |
ppdl | pdl |
Definition at line 2611 of file misc.c.
References expression_syntax, and words_syntax().
Referenced by adg_fprint_list_of_exp(), C_loop_range(), ensure_comment_consistency(), expression_to_string(), fprint_list_of_exp(), generic_c_words_simplified_entity(), imprime_special_quast(), maxima_simplify(), pragma_to_string(), sentence_data_statement(), sentence_symbolic(), text_block_elseif(), text_block_ifthen(), text_entity_declaration(), text_instruction(), text_logical_if(), text_loop_craft(), text_trail(), text_whileloop(), words_brace_expression(), words_dimension(), words_enum(), words_implied_do(), words_io_control(), words_io_inst(), words_loop_range(), words_omp_red(), words_range(), words_stat_io_inst(), words_subscript_range(), words_va_arg(), and words_variable_or_function().
list words_goto_label | ( | const char * | tlabel | ) |
This function is useful only for parsed codes since gotos are removed by the controlizer.
of string
<<<<<< .working switch (get_prettyprint_language_tag()) { case is_language_fortran: case is_language_fortran95: pc = CHAIN_SWORD(pc, RETURN_FUNCTION_NAME); break; case is_language_c: pc = CHAIN_SWORD(pc, C_RETURN_FUNCTION_NAME); pc = CHAIN_SWORD(pc, ";"); break; default: pips_internal_error("Language unknown !"); break;
In C, a label cannot begin with a number so "l" is added for this case
In C, a label cannot begin with a number so "l" is added for this case
tlabel | label |
Definition at line 1917 of file misc.c.
References C_CONTINUE_FUNCTION_NAME, C_RETURN_FUNCTION_NAME, CHAIN_SWORD, entity_user_name(), f(), function_to_return_value(), get_current_module_entity(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, NIL, pips_internal_error, RETURN_FUNCTION_NAME, RETURN_LABEL_NAME, strdup(), and void_function_p().
Referenced by sentence_goto_label(), and text_trail().
exported for craft
expression_constant_p(range_increment(obj)) &&
obj | bj |
ppdl | pdl |
Definition at line 434 of file misc.c.
References call_function, CHAIN_SWORD, entity_local_name(), expression_syntax, gen_nconc(), range_increment, range_lower, range_upper, syntax_call, words_expression(), and words_subexpression().
Referenced by text_loop_craft(), text_loop_default(), and words_implied_do().
obj | bj |
Definition at line 795 of file declarations.c.
References generic_words_qualifiers().
Referenced by c_text_related_entities(), generic_c_words_simplified_entity(), get_symbol_table(), print_qualifiers(), sentence_head(), words_dimension(), and words_type().
if undefined I print a star, why not!?
C does not include ranges, but the PIPS internal representation does. For instance, constant ranges can be useful to express effects or regions for intrinsics. To be discussed with Beatrice: e.g. memcpy(), strncp(). Especially when they are called with constant arguments.
obj | bj |
ppdl | pdl |
Definition at line 538 of file misc.c.
References call_function, CHAIN_SWORD, CONS, entity_local_name(), expression_syntax, expression_undefined_p, gen_nconc(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, MAKE_SWORD, NIL, pips_internal_error, range_increment, range_lower, range_upper, STRING, syntax_call, unbounded_expression_p(), and words_expression().
Referenced by make_bounds(), and words_syntax().
obj | bj |
Definition at line 786 of file misc.c.
References entity_user_name(), NIL, and Words_Any_Reference().
Referenced by text_region_no_action(), and words_reduction().
obj | bj |
ppdl | pdl |
Definition at line 781 of file misc.c.
References entity_user_name(), and words_any_reference().
Referenced by adg_fprint_dataflow(), fprint_reference(), reference_to_string(), and words_syntax().
obj | bj |
is_a_subroutine | s_a_subroutine |
Definition at line 1081 of file misc.c.
References gen_free_list(), NIL, and words_regular_call().
Referenced by get_sp_of_call_p().
words_regular_call used for user subroutine and user function and intrinsics called like user function such as MOD().
used also by library static_controlize
special cases for stdarg builtin macros
Special cases for stdio.h
else if (ENTITY__IO_GETC_P(f))
pc = CHAIN_SWORD(pc, "getc");
else if (ENTITY__IO_PUTC_P(f))
pc = CHAIN_SWORD(pc, "putc");
Special cases for Fortran intrinsics not available in C
the implied complex operator is hidden... [D]CMPLX_(x,y) -> (x,y)
The corresponding formal parameter cannot be checked by formal_label_replacement_p() because the called modules may not have been parsed yet.
Alternate return actual argument have been replaced by character strings by the parser.
pips_assert("ls has at least four characters", strlen(ls)>=4);
Get rid of initial and final quotes
free(ls1);
The actual label cannot always be used because it might have been eliminated as part of dead code by PIPS since it is not used with the STOP option.
The assertion may be wrong if this piece of code is used to print intermediate statements
words_expression cannot be called because of the C comma operator which require surrounding parentheses in this context. Be careful with unary minus.
alse
obj | bj |
is_a_subroutine | s_a_subroutine |
ppdl | pdl |
Definition at line 868 of file misc.c.
References actual_label_replacement_p(), add_target_to_alternate_return_set(), asprintf, ASSIGN_OPERATOR_PRECEDENCE, call_arguments, call_compatible_type(), call_function, CAR, CDR, CHAIN_SWORD, ENDP, ENTITY_FALSE_P, ENTITY_IMPLIED_CMPLX_P, ENTITY_IMPLIED_DCMPLX_P, entity_initial, ENTITY_ISOC99_FSCANF_P, ENTITY_ISOC99_SCANF_P, ENTITY_ISOC99_SSCANF_P, ENTITY_ISOC99_VFSCANF_P, ENTITY_ISOC99_VSCANF_P, ENTITY_ISOC99_VSSCANF_P, entity_local_name(), ENTITY_MAX_P, ENTITY_MIN_P, entity_name, ENTITY_TRUE_P, entity_type, entity_undefined_p, entity_user_name(), ENTITY_VA_COPY_P, ENTITY_VA_END_P, ENTITY_VA_START_P, EXPRESSION, expression_call_p(), expression_syntax, f(), find_label_entity(), functional_result, gen_length(), gen_nconc(), get_bool_property(), get_current_module_name(), get_prettyprint_language_tag(), get_string_property(), is_language_c, is_language_fortran, is_language_fortran95, ISOC99_FSCANF_USER_FUNCTION_NAME, ISOC99_SCANF_USER_FUNCTION_NAME, ISOC99_SSCANF_USER_FUNCTION_NAME, ISOC99_VFSCANF_USER_FUNCTION_NAME, ISOC99_VSCANF_USER_FUNCTION_NAME, ISOC99_VSSCANF_USER_FUNCTION_NAME, LABEL_PREFIX, label_string_defined_in_current_module_p(), list_undefined, malloc(), NIL, pips_assert, PIPS_C_MAX_OPERATOR_NAME, PIPS_C_MIN_OPERATOR_NAME, pips_internal_error, pips_user_warning, POP, prettyprint_language_is_c_p(), syntax_call, type_functional, type_statement_p, type_void_p, value_constant_p, value_symbolic_p, and words_subexpression().
Referenced by words_call_intrinsic(), words_genuine_regular_call(), words_intrinsic_call(), and Words_Regular_Call().
list Words_Subexpression | ( | expression | obj, |
int | precedence, | ||
bool | leftmost | ||
) |
obj | bj |
precedence | recedence |
leftmost | eftmost |
Definition at line 2695 of file misc.c.
References gen_free_list(), NIL, and words_subexpression().
Referenced by words_cmf_loop_range().
list words_subexpression | ( | expression | obj, |
int | precedence, | ||
bool | leftmost, | ||
list * | ppdl | ||
) |
exported for cmfortran.c
obj | bj |
precedence | recedence |
leftmost | eftmost |
ppdl | pdl |
Definition at line 2674 of file misc.c.
References expression_call_p(), expression_cast(), expression_cast_p(), expression_syntax, syntax_call, words_call(), words_cast(), and words_syntax().
Referenced by C_loop_range(), ensure_comment_consistency(), eole_fmx_specific_op(), words_any_reference(), words_assign_op(), words_assign_substring_op(), words_comma_op(), words_conditional_op(), words_infix_binary_op(), words_infix_nary_op(), words_inverse_op(), words_loop_range(), words_nullary_op_c(), words_nullary_op_fortran(), words_postfix_unary_op(), words_prefix_unary_op(), words_regular_call(), Words_Subexpression(), words_substring_op(), words_unary_minus(), and words_variable_or_function().
@description FI: array constructor R433, p.
37 in Fortran 90 standard, can be used anywhere in arithmetic expressions whereas the triplet notation is restricted to subscript expressions. The triplet notation is used to define array sections (see R619, p. 64).
if undefined I print a star, why not!?
obj | bj |
ppdl | pdl |
Definition at line 629 of file misc.c.
References call_function, CHAIN_SWORD, CONS, entity_local_name(), expression_syntax, expression_undefined_p, gen_nconc(), get_prettyprint_language_tag(), is_language_c, is_language_fortran, is_language_fortran95, MAKE_SWORD, NIL, pips_internal_error, range_increment, range_lower, range_upper, STRING, syntax_call, unbounded_expression_p(), and words_expression().
Referenced by words_any_reference().
obj | bj |
Definition at line 2664 of file misc.c.
References gen_free_list(), NIL, and words_syntax().
Referenced by comp_regions_of_syntax(), Words_Expression(), and xml_Argument().
exported for expression.c
FI->SG: I do not know if in_type_declaration is true, false or a formal parameter
obj | bj |
ppdl | pdl |
Definition at line 2623 of file misc.c.
References is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, NIL, pips_internal_error, syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, syntax_tag, syntax_va_arg, words_application(), words_call(), words_cast(), words_range(), words_reference(), words_sizeofexpression(), words_subscript(), and words_va_arg().
Referenced by fprint_expression(), print_syntax(), words_assign_op(), words_expression(), words_subexpression(), and Words_Syntax().
obj | bj |
Definition at line 891 of file declarations.c.
References NIL, and words_type().
obj is the type to describe
pdl is a list of already/previously declared data structures (not 100 % sure)
argument_p: the type is used as an argument type in a function declaration; if an argument appears with the "unknown" type it is explicitly declared "int"
returns a list of strings, called "words".
The default type is int. It can be skipped in direct declarations, but not as type of an argument in a function declaration
obj | bj |
ppdl | pdl |
argument_p | rgument_p |
Definition at line 821 of file declarations.c.
References argument_p(), CHAIN_SWORD, CONS, dump_functional(), gen_nconc(), is_type_enum, is_type_functional, is_type_struct, is_type_union, is_type_unknown, is_type_varargs, is_type_variable, is_type_void, list_to_string(), NIL, pips_debug, pips_internal_error, STRING, string_buffer_free(), string_buffer_make(), string_buffer_to_string(), string_undefined, type_functional, type_tag, type_variable, type_void, variable_basic, variable_dimensions, variable_qualifiers, words_basic(), words_dimensions(), and words_qualifiers().
Referenced by ensure_comment_consistency(), generic_c_words_simplified_entity(), print_type(), string_of_type(), type_to_full_string_definition(), words_basic(), words_parameters(), Words_Type(), and words_va_arg().