PIPS
|
#include <stdarg.h>
#include <stdlib.h>
#include <setjmp.h>
Go to the source code of this file.
Macros | |
#define | TIMEOUT_CODE (128+14) |
#define | STRINGIFY_SECOND_STAGE(symbol) #symbol |
To generate a string from a macro: More... | |
#define | STRINGIFY(symbol) STRINGIFY_SECOND_STAGE(symbol) |
If not using this 2-stage macro evaluation, the generated string is not the value of the macro but the name of the macro... More... | |
#define | abort() pips_stop(internal_error_log, -1, "abort() called") |
#define | exit(code) pips_stop(user_error_log, code, "exit(%d) called", code) |
#define | pips_unknown_function "Unknown Function Name" |
#define | CURRENT_FUNCTION pips_unknown_function |
#define | pips_debug pips_debug_func2 |
these macros use the GNU extensions that allow variadic macros, including with an empty list. More... | |
#define | pips_user_warning pips_user_warning_func2 |
#define | pips_user_error pips_user_error_func2 |
#define | pips_user_irrecoverable_error pips_user_irrecoverable_error_func2 |
#define | pips_internal_error pips_internal_error_func2 |
#define | pips_log pips_log_func2 |
#define | pips_stop pips_stop_func2 |
#define | pips_where(out) fprintf(out, "[%s] (%s:%d) ", CURRENT_FUNCTION, __FILE__, __LINE__) |
#define | debug_on(env) debug_on_function(env, CURRENT_FUNCTION, __FILE__, __LINE__) |
#define | debug_off() debug_off_function(CURRENT_FUNCTION, __FILE__, __LINE__) |
#define | pips_assert(what, predicate) |
common macros, two flavors depending on NDEBUG More... | |
#define | pips_user_assert(what, predicate) |
#define | ifdebug(l) if (the_current_debug_level>=(l)) |
#define | pips_exit(code, format, args...) pips_user_warning(format, ##args), exit(code) |
#define | same_string_p(s1, s2) function_same_string_p(s1,s2) |
FI:need to breakpoint while inlining is available. More... | |
#define | same_stringn_p(a, b, c) (!strncmp((a),(b),(c))) |
#define | MAXPATHLEN 1024 |
MAXPATHLEN is defined in <sys/param.h> for SunOS... More... | |
#define | PIPS_CATCH(what) |
#define | SIGN_EQ(a, b) ((((a)>0 && (b)>0) || ((a)<0 && (b)<0)) ? true : false) |
SG moved there from transformation.h. More... | |
#define | FORTRAN_DIV(n, d) (SIGN_EQ((n),(d)) ? ABS(n)/ABS(d) : -(ABS(n)/ABS(d))) |
#define | C_DIVISION(n, d) ((n)/(d)) |
#define | FORTRAN_MOD(n, m) (SIGN_EQ((n),(m)) ? ABS(n)%ABS(m) : -(ABS(n)%ABS(m))) |
#define | C_MODULO(n, m) ((n)%(m)) |
#define | asprintf safe_asprintf |
#define | vasprintf safe_vasprintf |
#define | __has_attribute(att) 0 |
#define | _UNUSED_ __attribute__((unused)) |
#define | _NORETURN_ __attribute__((noreturn)) |
#define | _FALLTHROUGH_ |
#define | user_warning(fn, ...) pips_user_warning_func(fn, __FILE__, __LINE__, __VA_ARGS__) |
#define | user_error(fn, ...) pips_user_error_func(fn, __FILE__, __LINE__, __VA_ARGS__) |
Typedefs | |
typedef void(* | reset_func_t) (void) |
Enumerations | |
enum | pips_log_t { none_log , info_log , warning_log , spear_warning_log , spear_error_log , user_error_log , internal_error_log , irrecoverable_error_log , none_log , info_log , warning_log , spear_warning_log , spear_error_log , user_error_log , internal_error_log , irrecoverable_error_log } |
Warning! Do not modify this file that is automatically generated! More... | |
enum | measurement_type { SBRK_MEASURE , NET_MEASURE , GROSS_MEASURE , SBRK_MEASURE , NET_MEASURE , GROSS_MEASURE } |
Measurement type for mem_spy.c. More... | |
Functions | |
void _NORETURN_ | pips_stop_func (const char *, const char *, const int, pips_log_t, int, const string,...) |
expecititely declare "noreturn" functions... More... | |
void _NORETURN_ | pips_internal_error_func (const char *, const char *, const int, const char *,...) |
void _NORETURN_ | pips_user_error_func (const char *, const char *, const int, const char *,...) |
void _NORETURN_ | pips_user_irrecoverable_error_alist (const char *, const char *, const int, const char *, va_list *) |
void _NORETURN_ | pips_user_irrecoverable_error_func (const char *, const char *, const int, const char *,...) |
void _NORETURN_ | pips_stop_func2 (pips_log_t, int, const string,...) |
void _NORETURN_ | pips_internal_error_func2 (const char *,...) |
void _NORETURN_ | pips_user_error_func2 (const char *,...) |
void _NORETURN_ | pips_user_irrecoverable_error_func2 (const char *,...) |
void | set_debug_level (const int) |
SET_DEBUG_LEVEL is a function that sets the current debuging level to the value passed as argument. More... | |
int | get_debug_level (void) |
GET_DEBUG_LEVEL returns the current debugging level. More... | |
_int | get_debug_stack_pointer (void) |
The pair get_ and set_debug_stack_pointer() should never be used except to clean up the stack after a long jump. More... | |
void | set_debug_stack_pointer (const int) |
void | debug_on_function (const char *, const char *, const char *, const int) |
void | debug_off_function (const char *, const char *, const int) |
void | print_debug_stack (void) |
function used to debug (can be called from dbx) BB 6.12.91 More... | |
void | debug (const int, const char *, const char *,...) |
ARARGS0. More... | |
void | pips_debug_function (const int, const char *,...) |
pips_debug is a nice macro that depends on gcc to generate the function name and to handle a variable number of arguments. More... | |
double | get_process_memory_size (void) |
double | get_process_gross_heap_size (void) |
FILE * | check_fopen (const char *, const char *) |
file.c More... | |
FILE * | safe_fopen (const char *, const char *) |
int | safe_fclose (FILE *, const char *) |
int | safe_fflush (FILE *, char *) |
FILE * | safe_freopen (char *, char *, FILE *) |
int | safe_fseek (FILE *, long int, int, char *) |
long int | safe_ftell (FILE *, char *) |
void | safe_rewind (FILE *, char *) |
int | safe_fgetc (FILE *, char *) |
int | safe_getc (FILE *, char *) |
char * | safe_fgets (char *, int, FILE *, char *) |
int | safe_fputc (int, FILE *, char *) |
int | safe_putc (int, FILE *, char *) |
int | safe_fputs (char *, FILE *, char *) |
int | safe_fread (char *, int, int, FILE *, char *) |
int | safe_fwrite (char *, int, int, FILE *, char *) |
int | safe_list_files_in_directory (gen_array_t, string, string, bool(*)(const char *)) |
returns a sorted arg list of files matching regular expression re in directory 'dir' and with file_name_predicate() returning true on the file name (for example use directory_exists_p to select directories, of file_exists_p to select regular files). More... | |
void | list_files_in_directory (gen_array_t, string, string, bool(*)(const char *)) |
The same as the previous safe_list_files_in_directory() but with no return code and a call to user error if it cannot open the directory. More... | |
bool | directory_exists_p (const char *) |
bool | file_exists_p (const char *) |
char * | strescape (const char *) |
protect a string, for example for use in a system call list of non escaped characters in the macro above. More... | |
string | nth_path (const char *, int) |
Returns the allocated nth path from colon-separated path string. More... | |
char * | find_file_in_directories (const char *, const char *) |
returns an allocated string pointing to the file, possibly with an additional path taken from colon-separated dir_path. More... | |
bool | file_readable_p (char *) |
bool | create_directory (char *) |
bool | purge_directory (char *) |
char * | get_cwd (void) |
returns the current working directory name. More... | |
char * | safe_readline (FILE *) |
returns the allocated line read, whatever its length. More... | |
string | safe_read_nth_line (string, int) |
Assumes "fn" is the name of a text file, opens it, and returns its nth line (starting with 1) in a newly allocated buffer, whatever the line length. More... | |
string | safe_get_line_interval (const string, int, int) |
return lines f-l from file fn as a string More... | |
void | safe_copy_line_interval (string, int, int, FILE *) |
Assumes "fn" is the name of a text file, opens it, and copies the lines whose number belongs to [f..l] into file descriptor "out", except if they have been generated by a C preprocessor. More... | |
char * | safe_readfile (FILE *) |
returns the file as an allocated string. More... | |
void | safe_cat (FILE *, FILE *) |
void | safe_append (FILE *, char *, int, bool) |
void | safe_copy (char *, char *) |
int | safe_display (char *) |
Display a file through $PIPS_MORE (or $PAGER) if stdout is a TTY, on stdout otherwise. More... | |
char * | pips_filename (char *, char *, bool) |
Some OS do not define basename and dirname. More... | |
char * | pips_basename (char *, char *) |
char * | pips_initial_filename (char *, char *) |
The source file name access path is shortened or not depending on the property. More... | |
char * | pips_dirname (char *) |
void | safe_unlink (const char *) |
Delete the given file. More... | |
void | safe_symlink (const char *, const char *) |
void | safe_link (const char *, const char *) |
Create a hard link to topath. More... | |
char * | safe_system_output (char *) |
attempt shell substitutions to what. More... | |
char * | safe_system_substitute (char *) |
returns what after variable, command and file substitutions. More... | |
char * | safe_new_tmp_file (char *) |
SunOS forgets to declare this one. More... | |
FILE * | fopen_config (const char *, const char *, const char *) |
void | set_pips_current_computation (const char *, const char *) |
message.c More... | |
string | get_pips_current_pass_name (void) |
Export this piece of information to customize warning functions in passes. More... | |
string | get_pips_current_module (void) |
void | reset_pips_current_computation (void) |
void | set_pips_meta_informations (const char *, const char *, const char *) |
string | default_user_request (const char *, va_list *) |
USER_REQUEST is a function that should be called to request some data from the user. More... | |
string | user_request (const char *,...) |
void | close_log_file (void) |
void | open_log_file (const string) |
void | log_on_file (const char *) |
void | pips_user_log_func (const char *,...) |
void | user_log (const char *,...) |
void | pips_thanks (string, string) |
display pips thanks on startup, if it on a tty. More... | |
void | open_warning_file (const char *) |
void | close_warning_file (void) |
void | append_to_warning_file (const char *, const char *, va_list *) |
To be used in error handling functions. More... | |
void | pips_user_warning_alist (const char *, const char *, const int, const char *, va_list *) |
void | pips_user_warning_func (const char *, const char *, const int, const char *,...) |
void | pips_user_warning_func2 (const char *,...) |
fallback version without a calling function name More... | |
bool | function_same_string_p (const char *, const char *) |
void | open_xml_logfile (const char *) |
void | close_xml_logfile (void) |
string | pips_log_tag_name (pips_log_t tag) |
void | pips_log_desc (const pips_log_t tag, const string, const string, const string, const string, const int, const string, const string, const int, const int, const string, const string, const string) |
log entry with preprocessed format/arguments More... | |
void | pips_log_alist (const pips_log_t tag, const string, const string, const string, const string, const int, const string, const string, const int, const int, const string, const string, const string, va_list *) |
log entry with unprocessed format/alist arguments More... | |
void | pips_log_func (const string, const string, const int, const pips_log_t tag, const string, const string, const string, const string, const int, const int, const string, const string, const string,...) |
direct pips_log call with format and free arguments ("...") More... | |
void | pips_log_stop (const char *, const char *, const int, const pips_log_t tag, const int, const string,...) |
quick log and stop, called on timeout this must not invoke malloc as it may still held locks if interrupted this implementation is missing XML escapes... More... | |
int | safe_vasprintf (char **, const char *, va_list) |
int | safe_asprintf (char **, const char *,...) |
void | start_dotting (FILE *, const char, const char *,...) |
dotting.c More... | |
void | stop_dotting (void) |
void | list_to_array (list, gen_array_t) |
args.c More... | |
void | update_list_from_array (list, gen_array_t) |
Just modify the strings in a list from an array of strings. More... | |
void | sort_list_of_strings (list) |
Sort a list of strings. More... | |
string | list_to_string (list) |
Return the malloc()ed version of the concatenation of all the strings in the list. More... | |
void | safe_system (string) |
system.c More... | |
int | safe_system_no_abort (string) |
the command to be executed More... | |
int | safe_system_no_abort_no_warning (string) |
the command to be executed More... | |
void | push_pips_context (char const *, char const *, int) |
exception.c More... | |
void | pop_pips_context (char const *, char const *, int) |
void | push_performance_spy (void) |
perf_spy.c More... | |
void | pop_performance_spy (FILE *, string) |
void | pips_malloc_debug (void) |
malloc_debug.c More... | |
void | reset_hooks_register (reset_func_t) |
reset_hooks.c More... | |
void | reset_hooks_call (void) |
this function is expected to be called when catching an exception. More... | |
void | reset_hooks_is_empty (void) |
check that the stack was cleaned. More... | |
void | reset_hooks_unregister (reset_func_t) |
remove registered cleanup hook. More... | |
Variables | |
int | the_current_debug_level |
cproto-generated files More... | |
string(* | pips_request_handler )(const char *, va_list *) |
default assignment of pips_request_handler is default_user_request. More... | |
void(* | pips_log_handler )(const char *fmt, va_list *args) |
USER_LOG is a function that should be called to log the current PIPS request, as soon as it is relevant. More... | |
void(* | pips_warning_handler )(const char *, const char *, va_list *) |
default assignment of pips_warning_handler is default_user_warning. More... | |
void(* | pips_error_handler )(const char *, const char *, va_list *) |
PROMPT_USER schould be implemented. More... | |
void(* | pips_internal_error_handler )(const char *, const char *,...) |
PIPS_ERROR is a function that should be called to terminate PIPS execution when data structures are corrupted. More... | |
#define _NORETURN_ __attribute__((noreturn)) |
#define _UNUSED_ __attribute__((unused)) |
#define abort | ( | ) | pips_stop(internal_error_log, -1, "abort() called") |
#define asprintf safe_asprintf |
#define CURRENT_FUNCTION pips_unknown_function |
#define debug_off | ( | ) | debug_off_function(CURRENT_FUNCTION, __FILE__, __LINE__) |
#define debug_on | ( | env | ) | debug_on_function(env, CURRENT_FUNCTION, __FILE__, __LINE__) |
#define exit | ( | code | ) | pips_stop(user_error_log, code, "exit(%d) called", code) |
#define ifdebug | ( | l | ) | if (the_current_debug_level>=(l)) |
#define MAXPATHLEN 1024 |
#define pips_assert | ( | what, | |
predicate | |||
) |
#define PIPS_CATCH | ( | what | ) |
#define pips_debug pips_debug_func2 |
#define pips_exit | ( | code, | |
format, | |||
args... | |||
) | pips_user_warning(format, ##args), exit(code) |
#define pips_internal_error pips_internal_error_func2 |
#define pips_stop pips_stop_func2 |
#define pips_user_assert | ( | what, | |
predicate | |||
) |
#define pips_user_error pips_user_error_func2 |
#define pips_user_irrecoverable_error pips_user_irrecoverable_error_func2 |
#define pips_user_warning pips_user_warning_func2 |
#define same_string_p | ( | s1, | |
s2 | |||
) | function_same_string_p(s1,s2) |
FI:need to breakpoint while inlining is available.
#define same_string_p(s1, s2) (strcmp((s1), (s2)) == 0)
#define STRINGIFY | ( | symbol | ) | STRINGIFY_SECOND_STAGE(symbol) |
#define user_error | ( | fn, | |
... | |||
) | pips_user_error_func(fn, __FILE__, __LINE__, __VA_ARGS__) |
#define user_warning | ( | fn, | |
... | |||
) | pips_user_warning_func(fn, __FILE__, __LINE__, __VA_ARGS__) |
#define vasprintf safe_vasprintf |
enum measurement_type |
enum pips_log_t |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/misc/misc-local.h instead, to add your own modifications. header file built by cproto misc-local.h
Definition at line 39 of file misc.h.
void append_to_warning_file | ( | const char * | calling_function_name, |
const char * | format, | ||
va_list * | args | ||
) |
To be used in error handling functions.
calling_function_name | alling_function_name |
format | ormat |
args | rgs |
Definition at line 306 of file message.c.
References get_bool_property(), get_pips_current_module(), get_pips_current_pass_name(), pips_log_alist(), properties_initialized_p(), and warning_log.
FILE* check_fopen | ( | const char * | file, |
const char * | mode | ||
) |
file | ile |
mode | ode |
Definition at line 56 of file file.c.
References pips_user_warning.
Referenced by load_meta_data().
void close_log_file | ( | void | ) |
Definition at line 162 of file message.c.
References get_bool_property(), log_file, and pips_internal_error.
Referenced by check_delete_workspace(), close_workspace(), create_workspace(), gpips_main(), open_log_file(), and wpips_main().
void close_warning_file | ( | void | ) |
Definition at line 293 of file message.c.
References free(), safe_fclose(), warning_file, and warning_file_name.
Referenced by check_delete_workspace(), close_workspace(), and create_workspace().
void close_xml_logfile | ( | void | ) |
Definition at line 631 of file message.c.
References safe_fclose(), xml_logfile, and xml_logfile_name.
bool create_directory | ( | char * | name | ) |
name | ame |
Definition at line 435 of file file.c.
References directory_exists_p(), pips_internal_error, and pips_user_warning.
Referenced by db_create_workspace(), and db_get_directory_name_for_module().
void debug | ( | const int | the_expected_debug_level, |
const char * | calling_function_name, | ||
const char * | a_message_format, | ||
... | |||
) |
ARARGS0.
margin_length is the length of the part of the margin that is not used
If the current debug level is not high enough, do nothing:
print name of function printing debug message
print out remainder of message
the_expected_debug_level | he_expected_debug_level |
calling_function_name | alling_function_name |
a_message_format | _message_format |
Definition at line 189 of file debug.c.
References fprintf(), MAX_MARGIN, and the_current_debug_level.
Referenced by abbrev_menu_event_filter_proc(), abbrev_menu_with_text_menu_notify(), add_common_variables_to_hash_table(), add_loop_skip_condition(), adg_build_Psysteme(), adg_compact_quast(), adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), adg_decreasing_stat_order_sort(), adg_dup_disjunctive_nodes(), adg_enrichir(), adg_fill_with_quast(), adg_fprint_pred(), adg_fprint_predicate_list(), adg_get_conjonctions(), adg_get_disjunctions(), adg_get_exec_domain(), adg_get_integer_entity(), adg_get_predicate_of_loops(), adg_get_read_entity_vertices(), adg_get_write_entity_vertices(), adg_list_same_order_in_dg(), adg_list_to_vect(), adg_make_disjunctions(), adg_max_of_leaves(), adg_merge_entities_lists(), adg_number_of_same_loops(), adg_number_to_vertex(), adg_only_call_WR_dependence(), adg_path_max_source(), adg_path_possible_source(), adg_predicate_list_dup(), adg_pure_dfg(), adg_pure_dfg2(), adg_quast_leaf_label_equal_p(), adg_quast_leaf_solution_equal_p(), adg_rename_entities(), adg_reorder_statement_number(), adg_reverse_graph(), adg_same_dfg_vertex_number(), adg_same_order_in_dg(), adg_same_order_in_dvl(), adg_sc_dup(), adg_suppress_2nd_in_1st_ps(), adg_update_dfg(), adg_vertex_to_ordering(), adg_write_reference_list(), affect_comp_regions(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), atomize_one_message(), atomizer_of_block(), atomizer_of_expression(), atomizer_of_loop(), atomizer_of_statement(), atomizer_of_test(), atomizer_of_unstructured(), attach_to_character_region(), attach_to_word_list(), basic_of_constant(), block_to_postcondition(), bound_distribution(), bound_generation(), build_and_test_dependence_context(), build_image_base(), build_sc_machine(), build_sc_with_several_uniform_ref(), build_trail(), c_statement(), call_instruction_to_communications(), check_first_statement(), check_range_wrt_precondition(), choose_one_syntax_in_references_list(), classify_reference(), close_workspace_notify(), comp_regions_of_implied_do(), comp_regions_of_ioelem(), comp_regions_of_iolist(), complex_bound_computation(), complex_bound_generation(), compute_iteration_domain(), conflict_dup(), constraint_distribution(), control_to_label_name(), create_tile_basis(), creer_nom_entite(), creer_nom_var(), current_module(), deal_with_attachment_boundary(), deal_with_attachments_at_this_character(), declaration_with_overlaps(), DeclareVariable(), decorate_trail(), defs_elim_of_assign_call(), defs_elim_of_statement(), defs_elim_of_unstructured(), dependance_vertices_p(), dfg_vertex_label_dup(), dg_arc_label_dup(), dg_vertex_dup(), dg_vertex_label_dup(), directory_gen_pullright(), display_memory_usage(), do_it(), edge_weight(), EffectsInfDifference(), EffectsSupDifference(), egalite_distribution(), end_query_pad_notify(), epips_execute_command(), EvalBinaryOp(), event_procedure(), expression_int_scalar(), fetch_callees_complexities(), find_iteration_domain(), flinter(), formal_and_actual_parameters_association(), formal_array_resizing_bottom_up(), full_unroll_pragma(), generate_one_message(), genref_statement(), get_more_derived_resources(), GetChar(), gpips_main_loop(), hpfc_overlap_kill_unused_scalars_rewrite(), hyperplane(), in_effect_list_p(), init_cost_table(), init_host_and_node_entities(), interactive_hyperplane_direction(), interactive_partitioning_matrix(), io_comp_regions(), IsCapKeyword(), iteration_domain_from_statement(), local_entity_of_module_p(), logical_expression_p(), loop_bounds_to_tile_bounds(), loop_increment_value(), loop_index_domaine_to_contrainte(), loop_iteration_domaine_to_sc(), loop_nest_to_local_variables(), loop_nest_to_wp65_code(), loop_strip_mine(), loop_to_postcondition(), lower_bound_generation(), main(), make(), make_all_movement_blocks(), make_datum_movement(), make_emulated_shared_variable(), make_lin_op_exp(), make_load_blocks(), make_movements_loop_body_wp65(), make_new_local_variables(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_op_exp(), make_scanning_over_one_tile(), make_scanning_over_tiles(), make_store_blocks(), make_tile_constraints(), MakeAtom(), MakeLabel(), MakeNewLabelledStatement(), MakeStatement(), message_manageable_p(), messages_handling(), module_name_to_preconditions(), module_to_wp65_modules(), movement_computation(), my_adg_expressions_to_predicate(), nlc_linear_expression_p(), no_write_comp_regions(), normal_expression_of_statement(), normal_expression_of_unstructured(), old_array_bound_check_instrumentation(), old_reductions(), old_summary_precondition(), Overlap_Analysis(), parametric_statement_feasible_p(), partial_eval_reference(), pip_solve(), pip_solve_min_with_big(), pips_malloc_debug(), prgm_mapping(), PrintData(), proper_comp_regions_of_intrinsic(), query_canvas_event_proc(), read_commands_from_emacs(), read_reference_list(), ReadLine(), reference_conflicting_p(), reference_conflicting_test_and_update(), reference_conversion_expression(), reference_conversion_statement(), region_dynamic_var_elim(), region_exact_projection_along_parameters(), region_exact_projection_along_variables(), region_non_exact_projection_along_parameters(), region_sc_projection_ofl_along_parameter(), RegionsEntitiesInfDifference(), RegionsInfDifference(), RegionsIntersection(), RegionsMayUnion(), RegionsMustUnion(), RegionsSupDifference(), remove_useless_continue_or_empty_code_in_unstructured(), restructure_if_then_else(), ReuseLabelledStatement(), rice_loop(), rice_update_dependence_graph(), sc_faisabilite_optim(), sc_image_computation(), sc_minmax_of_variable_optim(), sc_proj_on_di(), sc_to_tableau(), scalar_assign_call(), scalar_written_in_call(), schoose_abbrev_menu_with_text_text_notify(), set_control_to_label(), set_dimensions_of_local_variable_family(), set_dimensions_of_local_variables(), set_first_format_statement(), sort_unknowns(), st_arguments(), st_declarations(), st_declarations_comment(), st_declarations_init(), st_statement(), statement_does_return(), statement_to_communications(), statement_to_label(), stco_common_loops_of_statements(), strip_mine(), summary_total_postcondition(), test_bound_generation(), test_to_postcondition(), TestDependence(), text_unstructured(), tile_hyperplane_constraints(), tile_membership(), tile_membership_constraints(), transformer_general_consistency_p(), undefined_statement_list_p(), unframe_commands_from_emacs(), uniform_dependence_p(), unstructured_reorder(), unstructured_to_total_precondition(), unstructured_while_p(), update_basis(), update_common_layout(), update_common_sizes(), update_options(), update_summary_precondition(), update_used_labels(), upper_bound_generation(), wp65(), wp65_conform_p(), wp65_debug_print_text(), wpips_main_loop(), and xml_declarations_with_explicit_motif().
void debug_off_function | ( | const char * | function, |
const char * | file, | ||
const int | line | ||
) |
function | unction |
file | ile |
line | ine |
Definition at line 135 of file debug.c.
References current, debug_stack, idls, level, line, pips_assert, pips_internal_error, same_string_p, and set_debug_level().
void debug_on_function | ( | const char * | env, |
const char * | function, | ||
const char * | file, | ||
const int | line | ||
) |
env | nv |
function | unction |
file | ile |
line | ine |
Definition at line 112 of file debug.c.
References debug_stack, env, debug_level::file, debug_level::function, idls, debug_level::level, debug_level::line, line, debug_level::name, pips_assert, set_debug_level(), and STACK_LENGTH.
string default_user_request | ( | const char * | fmt, |
va_list * | args | ||
) |
USER_REQUEST is a function that should be called to request some data from the user.
It returns the string typed by the user until the return key is typed. USER_REQUEST should be called as:
USER_REQUEST(format [, arg] ... )
where format and arg-list are passed as arguments to vprintf.
fmt | mt |
args | rgs |
Definition at line 124 of file message.c.
References fprintf(), and safe_readline().
bool directory_exists_p | ( | const char * | name | ) |
name | ame |
Definition at line 314 of file file.c.
References buf.
Referenced by create_directory(), db_get_directory_name_for_module(), db_open_workspace(), generate_a_directory_menu(), pips_change_directory(), pips_get_workspace_list(), purge_directory(), and workspace_exists_p().
bool file_exists_p | ( | const char * | name | ) |
name | ame |
Definition at line 321 of file file.c.
References buf.
Referenced by add_new_compilation_unit(), add_new_module_from_text(), find_file_in_directories(), get_first_main_module(), hpfc_get_file_list(), load_meta_data(), parse_arguments(), pips_get_fortran_list(), safe_display(), and text_area_included().
bool file_readable_p | ( | char * | name | ) |
name | ame |
Definition at line 428 of file file.c.
References buf.
Referenced by freia_compile(), freia_opencl_compile_calls(), and workspace_ok_p().
char* find_file_in_directories | ( | const char * | file_name, |
const char * | dir_path | ||
) |
returns an allocated string pointing to the file, possibly with an additional path taken from colon-separated dir_path.
returns NULL if no file was found.
looks for the file with an additional path ahead.
file_name | ile_name |
dir_path | ir_path |
Definition at line 399 of file file.c.
References concatenate(), file_exists_p(), file_name, free(), nth_path(), pips_assert, relative_name_if_necessary(), and strdup().
Referenced by find_file(), parse_arguments(), and process_user_file().
FILE* fopen_config | ( | const char * | canonical_name, |
const char * | cproperty, | ||
const char * | cenv | ||
) |
canonical_name | anonical_name |
cproperty | property |
cenv | env |
Definition at line 952 of file file.c.
References concatenate(), CONFIG_DEFAULT_RIGHT, DEFAULT_CONFIG_DIR, get_string_property(), and safe_fopen().
Referenced by build_aliases(), get_help_topic(), get_help_topics(), get_model(), init_cost_table(), parse_makefile(), and simd_treematcher().
bool function_same_string_p | ( | const char * | s1, |
const char * | s2 | ||
) |
char* get_cwd | ( | void | ) |
returns the current working directory name.
argh
Definition at line 486 of file file.c.
References PATH_MAX.
Referenced by direct_change_directory(), generate_directory_menu(), make_open_workspace(), pips_change_directory(), send_view_to_emacs(), show_directory(), and wpips_display_graph_file_display().
int get_debug_level | ( | void | ) |
GET_DEBUG_LEVEL returns the current debugging level.
Definition at line 67 of file debug.c.
References the_current_debug_level.
Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), adg_fill_with_quast(), adg_get_disjunctions(), adg_get_exec_domain(), adg_get_integer_entity(), adg_get_predicate_of_loops(), adg_rename_entities(), adg_update_dfg(), analyze_quast(), array_dfg(), atomizer(), average_probability_matrix(), better_elim_var_with_eg(), bound_compute(), broadcast_conditions(), build_bdt_null(), build_contraction_matrices(), build_first_comb(), build_list_of_min(), build_new_ref(), build_second_comb(), build_third_comb(), build_third_subcomb(), calculate_delay(), change_base_in_sc(), cmf_layout_align(), compatible_pc_p(), constraint_to_bound(), controls_to_hash_table(), count_dataflows_on_ref(), count_implicit_equation(), craft_layout_align(), create_farkas_poly(), cutting_conditions(), dataflows_on_reference(), edge_weight(), find_implicit_equation(), full_loop_unroll(), get_bounds_expression(), get_number_of_ins(), get_unsatisfied_system(), include_trans_on_LC_in_ref(), init_use_preconditions(), is_not_trivial_p(), lhs_subs_in_ins(), list_of_exp_equals_1n_p(), loop_strip_mine(), loops_mapping_of_statement(), make_bounds(), make_causal_external(), make_causal_internal(), make_layout_statement(), make_primal(), make_reindex(), make_shared_statement(), mapping_on_broadcast(), matrix_to_system(), my_adg_expressions_to_predicate(), my_build_new_ref(), my_substitute_var_with_vec(), new_elim_var_with_eg(), node_successors_to_matrix(), nullify_factors(), old_reductions(), partial_broadcast_coefficients(), partial_eval_statement(), partial_eval_syntax(), partition_unknowns(), pip_solve(), pip_solve_min_with_big(), pips_malloc_debug(), plc_elim_var_with_eg(), plc_make_distance(), plc_make_vvs_with_vector(), predicate_to_expression(), prepare_array_bounds(), prepare_reindexing(), prgm_mapping(), print_array_dfg(), print_bdt(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), print_plc(), prototype_dimension(), psystem_to_expression(), re_do_it(), reference_filter(), reindexing(), rm_non_x_var(), sa_do_it(), sc_to_tableau(), scheduling(), search_scc_bdt(), separate_variables(), separate_variables_2(), simplify_bdt(), simplify_dimension(), single_assign(), solve_system_by_succ_elim(), unstructured_to_complexity(), valuer(), and wpips_xview_error().
_int get_debug_stack_pointer | ( | void | ) |
The pair get_ and set_debug_stack_pointer() should never be used except to clean up the stack after a long jump.
Definition at line 92 of file debug.c.
References idls.
Referenced by catch_user_error(), push_pips_context(), safe_do_something(), and tpips_exec().
string get_pips_current_module | ( | void | ) |
Definition at line 82 of file message.c.
References current_module.
Referenced by append_to_warning_file(), c_parser_user_warning_alist(), csplit_parser_warning_alist(), pips_internal_error_alist(), pips_log_stop(), pips_stop_file(), pips_stop_xml(), pips_user_error_alist(), pips_user_irrecoverable_error_alist(), pips_user_warning_alist(), semantics_user_warning_alist(), and spear_log_alist().
string get_pips_current_pass_name | ( | void | ) |
Export this piece of information to customize warning functions in passes.
Passes are also called "phases" in PIPS jargon.
Definition at line 77 of file message.c.
References current_phase.
Referenced by append_to_warning_file(), c_parser_user_warning_alist(), csplit_parser_warning_alist(), pips_internal_error_alist(), pips_log_stop(), pips_stop_file(), pips_stop_xml(), pips_user_error_alist(), pips_user_irrecoverable_error_alist(), pips_user_warning_alist(), semantics_user_warning_alist(), and spear_log_alist().
double get_process_gross_heap_size | ( | void | ) |
mallinfo is not portable
This is used part of the heap, but it may be bigger
struct mallinfo heap_info = mallinfo();
double memory_size = (heap_info.uordbytes)/(double)(1 << 20);
sbrk(0))/(double)(1 << 20)
Definition at line 254 of file debug.c.
Referenced by apply_a_rule(), logs_off(), and logs_on().
double get_process_memory_size | ( | void | ) |
This is about the always increasing swap space
etext is not portable. it is not even documented on SUN:-)
extern etext; double memory_size = (sbrk(0) - etext)/(double)(1 << 20);
void list_files_in_directory | ( | gen_array_t | files, |
string | dir, | ||
string | re, | ||
bool(*)(const char *) | file_name_predicate | ||
) |
The same as the previous safe_list_files_in_directory() but with no return code and a call to user error if it cannot open the directory.
files | iles |
dir | ir |
re | e |
Definition at line 299 of file file.c.
References pips_user_error, and safe_list_files_in_directory().
Referenced by pips_get_fortran_list(), and pips_get_workspace_list().
void list_to_array | ( | list | l, |
gen_array_t | a | ||
) |
Definition at line 38 of file args.c.
References gen_array_addto(), gen_free_list(), MAP, and STRING.
Referenced by prettyprint_dependence_graph(), prettyprint_dependence_graph_view(), sort_list_of_strings(), and xml_Chain_Graph().
Return the malloc()ed version of the concatenation of all the strings in the list.
Definition at line 74 of file args.c.
References concatenate(), free(), MAP, NIL, strdup(), and STRING.
Referenced by basic_to_string(), c_words_entity(), c_words_simplified_entity(), FindOrCreateCurrentEntity(), flush_statement_comment(), generic_c_words_simplified_entity(), get_symbol_table(), module_loops(), UpdateEntity(), UpdateFunctionEntity(), UpdatePointerEntity(), words_points_to_reference(), and words_type().
void log_on_file | ( | const char * | desc | ) |
desc | esc |
Definition at line 190 of file message.c.
References info_log, and pips_log_desc().
Referenced by gpips_user_error_message(), gpips_user_log(), gpips_user_warning_message(), wpips_user_error_message(), wpips_user_log(), and wpips_user_warning_message().
Returns the allocated nth path from colon-separated path string.
path_list | the string that contains a colon-separated path |
n | the n-th instance to extract |
If the path is empty or if n is out-of-bound, NULL is returned. The resulting string is *not*escaped, and can contain spaces
Find the n-th part:
Out-of-bound...
Compute the length up to the COLON or the end of string:
path_list | ath_list |
Definition at line 362 of file file.c.
References COLON, and strndup().
Referenced by find_file_in_directories(), and include_path_to_include_flags().
void open_log_file | ( | const | string | ) |
string | ir |
Definition at line 171 of file message.c.
References close_log_file(), concatenate(), free(), get_bool_property(), LOG_FILE, log_file, pips_user_error, and strdup().
Referenced by create_workspace(), and open_workspace().
void open_warning_file | ( | const char * | dir | ) |
dir | ir |
Definition at line 286 of file message.c.
References assert, concatenate(), safe_fopen(), strdup(), warning_file, WARNING_FILE_NAME, and warning_file_name.
Referenced by create_workspace(), and open_workspace().
void open_xml_logfile | ( | const char * | filename | ) |
filename | ilename |
Definition at line 607 of file message.c.
References append_xml_attribute(), pips_cc, pips_date, pips_revisions, safe_fopen(), string_buffer_append(), string_buffer_free(), string_buffer_make(), string_buffer_to_file(), STRINGIFY, xml_logfile, and xml_logfile_name.
Referenced by parse_arguments().
char* pips_basename | ( | char * | fullpath, |
char * | suffix | ||
) |
fullpath | ullpath |
suffix | uffix |
Definition at line 822 of file file.c.
References pips_filename().
Referenced by compilation_unit_of_module(), csplit_open_compilation_unit(), get_new_user_file(), hpfc_fclose(), hpfc_fopen(), insert_check_alias_before_statement(), insert_flag_before_call_site(), insert_test_before_caller(), insert_test_before_statement(), module_name_to_input_file_name(), process_thru_fortran_pp(), step_install(), and used_before_set().
void pips_debug_function | ( | const int | the_expected_debug_level, |
const char * | a_message_format, | ||
... | |||
) |
pips_debug is a nice macro that depends on gcc to generate the function name and to handle a variable number of arguments.
if these feature are not available, it will be this function. the function name won't be available. FC May 95.
If the current debug level is not high enough, do nothing:
print out remainder of message
the_expected_debug_level | he_expected_debug_level |
a_message_format | _message_format |
Definition at line 224 of file debug.c.
References fprintf(), and the_current_debug_level.
char* pips_dirname | ( | char * | fullpath | ) |
fullpath | ullpath |
Definition at line 837 of file file.c.
References strdup().
Referenced by filter_file(), and parse_arguments().
char* pips_filename | ( | char * | fullpath, |
char * | suffix, | ||
bool | short_p | ||
) |
Some OS do not define basename and dirname.
Others like DEC OSF1 do. So define them and use another name for them:
/some/path/to/file.suffix -> file
This may create conflicting file names, when the same source filename is used in different subdirectory as in:
create foo mod.c src/mod.c src/init/mod.c src/close/mod.c
To avoid the problem a larger part of the access path should be preserved. This can be done by substituting / by another character.
Drop the suffix
ok
Keep the basename only
fullpath[i+1:len]
Or substitute slashes by a neutral character
fullpath | ullpath |
suffix | uffix |
short_p | hort_p |
Definition at line 775 of file file.c.
References malloc(), SLASH_SUBSTITUTION_CHARACTER, and strndup().
Referenced by pips_basename(), and pips_initial_filename().
char* pips_initial_filename | ( | char * | fullpath, |
char * | suffix | ||
) |
The source file name access path is shortened or not depending on the property.
It is shorten if the name conflicts are not managed.
fullpath | ullpath |
suffix | uffix |
Definition at line 829 of file file.c.
References get_bool_property(), and pips_filename().
Referenced by process_thru_C_pp().
void _NORETURN_ pips_internal_error_func | ( | const char * | funcname, |
const char * | funcfile, | ||
const int | funcline, | ||
const char * | fmt, | ||
... | |||
) |
funcname | uncname |
funcfile | uncfile |
funcline | uncline |
fmt | mt |
Definition at line 394 of file message.c.
References pips_internal_error_alist().
void _NORETURN_ pips_internal_error_func2 | ( | const char * | format, |
... | |||
) |
format | ormat |
Definition at line 408 of file message.c.
References pips_internal_error_alist(), and pips_unknown_function.
void pips_log_alist | ( | const pips_log_t | tag, |
const | string, | ||
const | string, | ||
const | string, | ||
const | string, | ||
const int | pips_line, | ||
const | string, | ||
const | string, | ||
const int | user_line, | ||
const int | user_line2, | ||
const | string, | ||
const | string, | ||
const | string, | ||
va_list * | args | ||
) |
log entry with unprocessed format/alist arguments
string | ips_pass |
string | ips_owner |
string | ips_func |
string | ips_file |
pips_line | ips_line |
string | ser_func |
string | ser_file |
user_line | ser_line |
user_line2 | ser_line2 |
string | tmt |
string | uggestion |
string | ormat |
args | rgs |
Definition at line 1200 of file message.c.
References free(), info_log, internal_error_log, pips_error_handler, pips_internal_error_handler, pips_log_display(), pips_log_end(), pips_log_handler, pips_log_in_progress(), pips_warning_handler, spear_warning_log, user_error_log, user_file, vasprintf(), and warning_log.
Referenced by append_to_warning_file(), c_parser_user_warning_alist(), csplit_parser_warning_alist(), pips_internal_error_alist(), pips_log_func(), pips_user_error_alist(), pips_user_irrecoverable_error_alist(), pips_user_log_alist(), pips_user_warning_alist(), semantics_user_warning_alist(), and spear_log_alist().
void pips_log_desc | ( | const pips_log_t | tag, |
const | string, | ||
const | string, | ||
const | string, | ||
const | string, | ||
const int | pips_line, | ||
const | string, | ||
const | string, | ||
const int | user_line, | ||
const int | user_line2, | ||
const | string, | ||
const | string, | ||
const | string | ||
) |
log entry with preprocessed format/arguments
string | ips_pass |
string | ips_owner |
string | ips_func |
string | ips_file |
pips_line | ips_line |
string | ser_func |
string | ser_file |
user_line | ser_line |
user_line2 | ser_line2 |
string | tmt |
string | uggestion |
string | escription |
Definition at line 1173 of file message.c.
References pips_log_display(), pips_log_end(), pips_log_in_progress(), and user_file.
Referenced by log_on_file().
void pips_log_func | ( | const | string, |
const | string, | ||
const int | pips_line, | ||
const pips_log_t | tag, | ||
const | string, | ||
const | string, | ||
const | string, | ||
const | string, | ||
const int | user_line, | ||
const int | user_line2, | ||
const | string, | ||
const | string, | ||
const | string, | ||
... | |||
) |
direct pips_log call with format and free arguments ("...")
string | ips_func |
string | ips_file |
pips_line | ips_line |
string | ips_pass |
string | ips_owner |
string | ser_func |
string | ser_file |
user_line | ser_line |
user_line2 | ser_line2 |
string | tmt |
string | uggestion |
string | ormat |
Definition at line 1286 of file message.c.
References pips_log_alist(), and user_file.
void pips_log_stop | ( | const char * | function, |
const char * | file, | ||
const int | lineno, | ||
const pips_log_t | tag, | ||
const int | code, | ||
const | string, | ||
... | |||
) |
quick log and stop, called on timeout this must not invoke malloc as it may still held locks if interrupted this implementation is missing XML escapes...
function | unction |
file | ile |
lineno | ineno |
code | ode |
string | ormat |
Definition at line 1323 of file message.c.
References code2status(), exit, fprintf(), get_pips_current_module(), get_pips_current_pass_name(), module, pips_log_tag_name(), and xml_logfile.
Referenced by pips_timeout_callback().
string pips_log_tag_name | ( | pips_log_t | tag | ) |
Definition at line 938 of file message.c.
References info_log, internal_error_log, irrecoverable_error_log, none_log, spear_error_log, spear_warning_log, user_error_log, and warning_log.
Referenced by pips_log_file(), pips_log_stop(), pips_stop_file(), and pips_stop_xml().
void pips_malloc_debug | ( | void | ) |
include "stdlib.h"
Definition at line 34 of file malloc_debug.c.
References debug(), debug_off, debug_on, get_debug_level(), malloc(), and pips_assert.
Referenced by apply_a_rule(), and safe_do_something().
void _NORETURN_ pips_stop_func | ( | const char * | pips_func, |
const char * | pips_file, | ||
const int | pips_line, | ||
pips_log_t | tag, | ||
int | code, | ||
const | string, | ||
... | |||
) |
expecititely declare "noreturn" functions...
because cproto generated headers seem to ignore attributes
pips_func | ips_func |
pips_file | ips_file |
pips_line | ips_line |
code | ode |
format | ormat |
Definition at line 904 of file message.c.
References pips_stop_alist().
Referenced by pips_log_in_progress().
void _NORETURN_ pips_stop_func2 | ( | pips_log_t | tag, |
int | code, | ||
const | string, | ||
... | |||
) |
code | ode |
string | ormat |
Definition at line 924 of file message.c.
References pips_stop_alist().
display pips thanks on startup, if it on a tty.
name | ame |
path | ath |
Definition at line 265 of file message.c.
void _NORETURN_ pips_user_error_func | ( | const char * | func_name, |
const char * | funcfile, | ||
const int | funcline, | ||
const char * | format, | ||
... | |||
) |
func_name | unc_name |
funcfile | uncfile |
funcline | uncline |
format | ormat |
Definition at line 478 of file message.c.
References pips_user_error_alist().
void _NORETURN_ pips_user_error_func2 | ( | const char * | format, |
... | |||
) |
format | ormat |
Definition at line 492 of file message.c.
References pips_unknown_function, and pips_user_error_alist().
void _NORETURN_ pips_user_irrecoverable_error_alist | ( | const char * | func_name, |
const char * | funcfile, | ||
const int | funcline, | ||
const char * | format, | ||
va_list * | args | ||
) |
func_name | unc_name |
funcfile | uncfile |
funcline | uncline |
format | ormat |
args | rgs |
Definition at line 516 of file message.c.
References exit, get_pips_current_module(), get_pips_current_pass_name(), irrecoverable_error_log, and pips_log_alist().
Referenced by pips_user_irrecoverable_error_func(), and pips_user_irrecoverable_error_func2().
void _NORETURN_ pips_user_irrecoverable_error_func | ( | const char * | func_name, |
const char * | funcfile, | ||
const int | funcline, | ||
const char * | format, | ||
... | |||
) |
func_name | unc_name |
funcfile | uncfile |
funcline | uncline |
format | ormat |
Definition at line 535 of file message.c.
References pips_user_irrecoverable_error_alist().
void _NORETURN_ pips_user_irrecoverable_error_func2 | ( | const char * | format, |
... | |||
) |
format | ormat |
Definition at line 550 of file message.c.
References pips_user_irrecoverable_error_alist().
void pips_user_log_func | ( | const char * | format, |
... | |||
) |
format | ormat |
Definition at line 225 of file message.c.
References pips_user_log_alist().
void pips_user_warning_alist | ( | const char * | function_name, |
const char * | funcfile, | ||
const int | funcline, | ||
const char * | format, | ||
va_list * | args | ||
) |
function_name | unction_name |
funcfile | uncfile |
funcline | uncline |
format | ormat |
args | rgs |
Definition at line 328 of file message.c.
References get_bool_property(), get_pips_current_module(), get_pips_current_pass_name(), pips_log_alist(), properties_initialized_p(), and warning_log.
Referenced by pips_user_warning_func(), and pips_user_warning_func2().
void pips_user_warning_func | ( | const char * | calling_function_name, |
const char * | funcfile, | ||
const int | funcline, | ||
const char * | format, | ||
... | |||
) |
calling_function_name | alling_function_name |
funcfile | uncfile |
funcline | uncline |
format | ormat |
Definition at line 346 of file message.c.
References pips_user_warning_alist().
void pips_user_warning_func2 | ( | const char * | format, |
... | |||
) |
fallback version without a calling function name
format | ormat |
Definition at line 362 of file message.c.
References pips_unknown_function, and pips_user_warning_alist().
void pop_performance_spy | ( | FILE * | f, |
string | msg | ||
) |
msg | sg |
Definition at line 97 of file perf_spy.c.
References current, f(), fprintf(), message_assert, printf_usage_delta(), stack_index, and usage_stack.
Referenced by hpf_remapping().
void pop_pips_context | ( | char const * | file, |
char const * | function, | ||
int | line | ||
) |
file | ile |
function | unction |
line | ine |
Definition at line 50 of file exception.c.
References debug_stack, line, pips_debug, pips_internal_error, set_debug_stack_pointer(), and stack_pop().
Referenced by atinit(), gpips_main(), pips_main(), tpips_main(), and wpips_main().
void print_debug_stack | ( | void | ) |
bool purge_directory | ( | char * | name | ) |
name | ame |
Definition at line 453 of file file.c.
References concatenate(), directory_exists_p(), and pips_user_warning.
Referenced by db_create_workspace().
void push_performance_spy | ( | void | ) |
Definition at line 89 of file perf_spy.c.
References message_assert, stack_index, usage_stack, and USAGE_STACK_SIZE.
Referenced by hpf_remapping().
void push_pips_context | ( | char const * | file, |
char const * | function, | ||
int | line | ||
) |
file | ile |
function | unction |
line | ine |
Definition at line 43 of file exception.c.
References debug_stack, get_debug_stack_pointer(), line, pips_debug, stack_make(), and stack_push().
Referenced by atinit(), gpips_main(), pips_main(), tpips_main(), and wpips_main().
void reset_hooks_call | ( | void | ) |
this function is expected to be called when catching an exception.
Definition at line 53 of file reset_hooks.c.
References f(), FOREACH, gen_free_list(), NIL, reset_hooks, and VOID_STAR.
Referenced by reset_static_phase_variables().
void reset_hooks_is_empty | ( | void | ) |
check that the stack was cleaned.
Definition at line 66 of file reset_hooks.c.
References NIL, pips_assert, and reset_hooks.
Referenced by catch_user_error().
void reset_hooks_register | ( | reset_func_t | function | ) |
function | unction |
Definition at line 44 of file reset_hooks.c.
References CONS, gen_in_list_p(), pips_assert, reset_hooks, and VOID_STAR.
Referenced by atomize_as_required(), hpfc_close(), hpfc_common(), hpfc_compile(), hpfc_directives_handler(), hpfc_filter(), hpfc_init(), module_to_value_mappings(), and print_module_icfg().
void reset_hooks_unregister | ( | reset_func_t | function | ) |
remove registered cleanup hook.
function | unction |
Definition at line 73 of file reset_hooks.c.
References gen_in_list_p(), gen_remove_once(), pips_assert, and reset_hooks.
Referenced by atomize_as_required(), free_value_mappings(), hpfc_close(), hpfc_common(), hpfc_compile(), hpfc_directives_handler(), hpfc_filter(), hpfc_init(), and print_module_icfg().
void reset_pips_current_computation | ( | void | ) |
Definition at line 87 of file message.c.
References current_module, current_phase, free(), and pips_assert.
Referenced by create_workspace(), and reset_current_phase_context().
out | ut |
file | ile |
margin | argin |
but_comments | ut_comments |
Definition at line 679 of file file.c.
References out, pips_internal_error, safe_fclose(), and safe_fopen().
Referenced by callgraph_module_name().
int safe_asprintf | ( | char ** | strp, |
const char * | fmt, | ||
... | |||
) |
strp | trp |
fmt | mt |
Definition at line 1408 of file message.c.
References safe_vasprintf().
void safe_cat | ( | FILE * | out, |
FILE * | in | ||
) |
out | ut |
in | n |
Definition at line 669 of file file.c.
References out, pips_internal_error, and safe_fflush().
Referenced by handle_include_file(), safe_copy(), safe_display(), step_install(), and unsplit_internal().
void safe_copy | ( | char * | source, |
char * | target | ||
) |
source | ource |
target | arget |
Definition at line 706 of file file.c.
References out, safe_cat(), safe_fclose(), and safe_fopen().
Referenced by compile_a_pure_function(), compile_a_special_io_function(), and step_compile_generated_module().
Assumes "fn" is the name of a text file, opens it, and copies the lines whose number belongs to [f..l] into file descriptor "out", except if they have been generated by a C preprocessor.
Line starting with '#' are counted but not copied.
This function is used by the PIPS preprocessor and its parsers to print out the lines where an error has been detected.
Do not reproduce this line as it was generated by an external preprocessor whose behavior is not controlled
fn | n |
out | ut |
Definition at line 601 of file file.c.
References current_line, f(), MAX_INPUT_LINE_SIZE, out, pips_assert, safe_fclose(), safe_fgets(), and safe_fopen().
int safe_display | ( | char * | fname | ) |
Display a file through $PIPS_MORE (or $PAGER) if stdout is a TTY, on stdout otherwise.
Return false if the file couldn't be displayed.
fname | name |
Definition at line 722 of file file.c.
References exit, file_exists_p(), pips_internal_error, pips_user_error, safe_cat(), safe_fclose(), and safe_fopen().
Referenced by display(), and display_a_resource().
int safe_fclose | ( | FILE * | stream, |
const char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 77 of file file.c.
References pips_internal_error, and pips_user_irrecoverable_error.
Referenced by actual_c_parser(), actual_symbol_table_dump(), add_new_compilation_unit(), add_new_module_from_text(), alias_check(), build_aliases(), check_first_statement(), clean_file(), close_resource_file(), close_warning_file(), close_xml_logfile(), csplit_close_compilation_unit(), csplit_close_files(), csplit_copy(), dag_dot_dump(), davinci_dump_expressions(), davinci_print_control_nodes(), davinci_print_non_deterministic_unstructured(), direct_change_directory(), directive_in_file_p(), dump_current_statement(), f95split(), find_eol_coding(), flinter(), freia_compile(), freia_opencl_compile_calls(), full_graph_of_calls(), generic_print_xml_application(), get_first_main_module(), get_new_user_file(), gfc2pips_namespace(), gpu_xml_dump(), graph_of_calls(), handle_file_name(), handle_include_file(), hbdsc_parallelization(), hpfc_fclose(), html_prettyprint(), html_prettyprint_symbol_table(), load_entities(), load_meta_data(), make_resource_from_starting_node(), make_text_resource(), module_to_callgraph(), open_logfile(), open_makefile(), outliner_independent(), parse_arguments(), parse_makefile(), ParserError(), pips_process_file(), pips_split_file(), print_array_dfg(), print_bdt(), print_code_smalltalk(), print_crough(), print_dependence_or_chains_graph(), print_dinf_statistics(), print_dot_dependence_or_chains_graph(), print_dsup_statistics(), print_filtered_dg_or_dvdg(), print_interface(), print_loopnest_dependence_cone(), print_loops(), print_module_name_to_toposorts(), print_plc(), print_proj_op_statistics(), print_sesam_tasks_buffers_header(), print_umay_statistics(), print_umust_statistics(), print_xml_code(), print_xml_code_with_explicit_motif(), process_user_file(), put_result(), region_translation_statistics_close(), rice_dependence_graph(), safe_append(), safe_copy(), safe_copy_line_interval(), safe_display(), safe_get_line_interval(), safe_read_nth_line(), save_entities(), save_makefile(), save_meta_data(), sequence_dependence_graph(), step_compile_analysed_module(), step_compile_generated_module(), step_install(), text_area_included(), the_actual_parser(), tpips_close(), unimodular(), unsplit_internal(), used_before_set(), write_an_attachment_file(), write_to_eole(), and writeresult().
int safe_fflush | ( | FILE * | stream, |
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 90 of file file.c.
References pips_internal_error.
Referenced by safe_cat().
int safe_fgetc | ( | FILE * | stream, |
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 147 of file file.c.
References pips_internal_error.
char* safe_fgets | ( | char * | s, |
int | n, | ||
FILE * | stream, | ||
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 170 of file file.c.
References pips_internal_error.
Referenced by get_main_entity_name(), safe_copy_line_interval(), and safe_read_nth_line().
FILE* safe_fopen | ( | const char * | filename, |
const char * | what | ||
) |
filename | ilename |
what | hat |
Definition at line 67 of file file.c.
References f(), and pips_internal_error.
Referenced by actual_c_parser(), actual_symbol_table_dump(), add_new_compilation_unit(), add_new_module_from_text(), alias_check(), check_first_statement(), clean_file(), csplit(), csplit_open_compilation_unit(), dag_dot_dump(), davinci_dump_expressions(), davinci_print_control_nodes(), davinci_print_non_deterministic_unstructured(), direct_change_directory(), directive_in_file_p(), do_recompile_module(), dump_current_statement(), f95split(), find_eol_coding(), flinter(), fopen_config(), freia_compile(), freia_opencl_compile_calls(), full_graph_of_calls(), generic_print_xml_application(), get_first_main_module(), get_new_user_file(), gfc2pips_namespace(), gpu_xml_dump(), graph_of_calls(), handle_file_name(), handle_include_file(), hbdsc_parallelization(), Hierarchical_tiling(), hpfc_fopen(), html_prettyprint(), html_prettyprint_symbol_table(), load_entities(), make_resource_from_starting_node(), make_text_resource(), module_to_callgraph(), open_logfile(), open_resource_file(), open_warning_file(), open_xml_logfile(), outliner_independent(), pips_process_file(), pips_split_file(), print_array_dfg(), print_bdt(), print_code_smalltalk(), print_crough(), print_dependence_or_chains_graph(), print_dinf_statistics(), print_dot_dependence_or_chains_graph(), print_dsup_statistics(), print_filtered_dg_or_dvdg(), print_interface(), print_loopnest_dependence_cone(), print_loops(), print_module_name_to_toposorts(), print_plc(), print_proj_op_statistics(), print_sesam_tasks_buffers_header(), print_umay_statistics(), print_umust_statistics(), print_xml_code(), print_xml_code_with_explicit_motif(), process_user_file(), put_result(), read_from_eole(), region_translation_statistics_close(), rice_dependence_graph(), safe_append(), safe_copy(), safe_copy_line_interval(), safe_display(), safe_get_line_interval(), safe_read_nth_line(), save_entities(), save_makefile(), save_meta_data(), sc_delimiter(), sequence_dependence_graph(), step_compile_analysed_module(), step_compile_generated_module(), step_install(), text_area_included(), the_actual_parser(), Tiling2_buffer(), Tiling_buffer_allocation(), unimodular(), unsplit_internal(), used_before_set(), write_an_attachment_file(), write_to_eole(), and writeresult().
int safe_fputs | ( | char * | s, |
FILE * | stream, | ||
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 203 of file file.c.
References pips_internal_error.
ptr | tr |
element_size | lement_size |
count | ount |
stream | tream |
filename | ilename |
Definition at line 214 of file file.c.
References count, and pips_internal_error.
FILE* safe_freopen | ( | char * | filename, |
char * | what, | ||
FILE * | stream | ||
) |
filename | ilename |
what | hat |
stream | tream |
Definition at line 99 of file file.c.
References f(), and pips_internal_error.
stream | tream |
offset | ffset |
wherefrom | herefrom |
filename | ilename |
Definition at line 112 of file file.c.
References offset, and pips_internal_error.
long int safe_ftell | ( | FILE * | stream, |
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 123 of file file.c.
References pips_internal_error.
ptr | tr |
element_size | lement_size |
count | ount |
stream | tream |
filename | ilename |
Definition at line 227 of file file.c.
References count, and pips_internal_error.
return lines f-l from file fn as a string
string | n |
Definition at line 539 of file file.c.
References asprintf, f(), free(), line, pips_assert, safe_fclose(), safe_fopen(), safe_readline(), string_buffer_append(), string_buffer_free(), string_buffer_make(), and string_buffer_to_string().
Referenced by c_parser_user_warning_alist().
int safe_getc | ( | FILE * | stream, |
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 158 of file file.c.
References pips_internal_error.
void safe_link | ( | const char * | topath, |
const char * | frompath | ||
) |
Create a hard link to topath.
That means that the file is accessible with the new name frompath too.
Throw a pips_internal_error() if it fails.
topath | opath |
frompath | rompath |
Definition at line 878 of file file.c.
References pips_internal_error.
Referenced by add_new_module_from_text().
int safe_list_files_in_directory | ( | gen_array_t | files, |
string | dir, | ||
string | re, | ||
bool(*)(const char *) | file_name_predicate | ||
) |
returns a sorted arg list of files matching regular expression re in directory 'dir' and with file_name_predicate() returning true on the file name (for example use directory_exists_p to select directories, of file_exists_p to select regular files).
re has the ed syntax.
Return 0 on success, -1 on directory openning error.
files | iles |
dir | an allocated array |
re | the directory we're interested in |
file_name_predicate | regular expression condition to list a file |
Definition at line 250 of file file.c.
References concatenate(), free(), gen_array_dupaddto(), gen_array_sort(), pips_assert, pips_user_error, and strdup().
Referenced by generate_a_directory_menu(), hpfc_get_file_list(), and list_files_in_directory().
char* safe_new_tmp_file | ( | char * | prefix | ) |
SunOS forgets to declare this one.
extern char * mktemp(char *);
FI: mkstemp() is being deprecated and it returns an integer, usable as file descriptor, not a character string.
prefix | refix |
Definition at line 935 of file file.c.
References concatenate(), pips_assert, prefix, and strdup().
Referenced by apply_eole_on_statement(), and parse_arguments().
Assumes "fn" is the name of a text file, opens it, and returns its nth line (starting with 1) in a newly allocated buffer, whatever the line length.
Returns NULL if it does not exist.
This function is used by the PIPS preprocessor and its parsers to print out the line where an error has been detected.
fn | n |
Definition at line 523 of file file.c.
References current_line, MAX_INPUT_LINE_SIZE, safe_fclose(), safe_fgets(), safe_fopen(), and safe_readline().
Referenced by csplit_parser_warning_alist().
char* safe_readfile | ( | FILE * | file | ) |
returns the file as an allocated string.
is dropped at the time.
file | ile |
Definition at line 650 of file file.c.
References buf, free(), line, and safe_readline().
Referenced by safe_system_output().
char* safe_readline | ( | FILE * | file | ) |
returns the allocated line read, whatever its length.
returns NULL on EOF. also some asserts. FC 09/97.
larger for trailing '\0'
file | ile |
Definition at line 497 of file file.c.
References buf, free(), malloc(), pips_assert, and strdup().
Referenced by clean_file(), declarations_read(), default_user_request(), get_first_main_module(), get_help_topic(), get_help_topics(), get_next_line(), handle_file(), load_meta_data(), process_user_file(), safe_get_line_interval(), safe_read_nth_line(), and safe_readfile().
void safe_rewind | ( | FILE * | stream, |
char * | filename | ||
) |
stream | tream |
filename | ilename |
Definition at line 136 of file file.c.
References pips_internal_error.
void safe_symlink | ( | const char * | topath, |
const char * | frompath | ||
) |
topath | opath |
frompath | rompath |
Definition at line 862 of file file.c.
References pips_internal_error.
void safe_system | ( | string | command | ) |
abort if fails. FC 09/95 the command to be executed
command | ommand |
Definition at line 38 of file system.c.
References pips_internal_error.
Referenced by apply_eole_on_statement(), direct_change_directory(), edit_notify(), gpips_display_graph_file_display(), help_launch_pips_firefox(), hpfc_filter(), hpfc_install(), hpfc_make(), hpfc_print_file(), hpfc_run(), main(), print_c_code(), step_compile_generated_module(), and step_install().
the command to be executed
For portability reasons, do not use pips_user_warning() here
command | ommand |
Definition at line 47 of file system.c.
References pips_internal_error, and pips_user_warning.
Referenced by check_delete_workspace(), check_input_file_syntax(), process_thru_C_pp(), process_thru_fortran_pp(), and unsplit_internal().
the command to be executed
command | ommand |
Definition at line 63 of file system.c.
References pips_internal_error.
Referenced by unsplit_internal().
char* safe_system_output | ( | char * | what | ) |
attempt shell substitutions to what.
returns NULL on errors.
on failures, do not stop it anyway...
what | hat |
Definition at line 890 of file file.c.
References free(), pips_internal_error, pips_user_warning, and safe_readfile().
Referenced by safe_system_substitute().
char* safe_system_substitute | ( | char * | what | ) |
returns what after variable, command and file substitutions.
the returned string is newly allocated. it's NULL on errors.
what | hat |
Definition at line 919 of file file.c.
References concatenate(), and safe_system_output().
Referenced by tp_substitutions().
void safe_unlink | ( | const char * | file_name | ) |
Delete the given file.
Throw a pips_internal_error() if it fails.
file_name | ile_name |
Definition at line 852 of file file.c.
References file_name, and pips_internal_error.
Referenced by add_new_module_from_text(), apply_eole_on_statement(), filter_file(), and handle_include_file().
int safe_vasprintf | ( | char ** | strp, |
const char * | fmt, | ||
va_list | args | ||
) |
strp | trp |
fmt | mt |
args | rgs |
Definition at line 1398 of file message.c.
References pips_assert, ret, and vasprintf().
Referenced by safe_asprintf().
void set_debug_level | ( | const int | l | ) |
SET_DEBUG_LEVEL is a function that sets the current debuging level to the value passed as argument.
Valid debuging values are from 0 to 9. 0 means no debug, 9 means extensive debug. Other values are illegal.
Definition at line 60 of file debug.c.
References message_assert, and the_current_debug_level.
Referenced by debug_off_function(), debug_on_function(), and set_debug_stack_pointer().
void set_debug_stack_pointer | ( | const int | i | ) |
Definition at line 97 of file debug.c.
References debug_stack, idls, level, pips_internal_error, pips_user_warning, and set_debug_level().
Referenced by catch_user_error(), pop_pips_context(), safe_do_something(), and tpips_exec().
void set_pips_current_computation | ( | const char * | rname, |
const char * | oname | ||
) |
message.c
rname | name |
oname | name |
Definition at line 65 of file message.c.
References current_module, current_phase, pips_assert, and strdup().
Referenced by create_workspace(), and set_current_phase_context().
void set_pips_meta_informations | ( | const char * | revs, |
const char * | date, | ||
const char * | comp | ||
) |
revs | evs |
date | ate |
comp | omp |
Definition at line 102 of file message.c.
References pips_cc, pips_date, and pips_revisions.
Referenced by atinit(), gpips_main(), pips_init(), pips_main(), tpips_main(), and wpips_main().
void sort_list_of_strings | ( | list | l | ) |
Sort a list of strings.
Definition at line 59 of file args.c.
References gen_array_free(), gen_array_make(), gen_array_nitems(), gen_array_sort(), gen_length(), list_to_array(), pips_assert, and update_list_from_array().
void start_dotting | ( | FILE * | dotting_file, |
const char | dotting_character, | ||
const char * | fmt, | ||
... | |||
) |
Emit a message and then a waiting character every second till it is notified to shut up.
Francois Irigoin, 18 April 1990
Modification:
dotting_file | otting_file |
dotting_character | otting_character |
fmt | mt |
Definition at line 78 of file dotting.c.
References pips_debug.
void stop_dotting | ( | void | ) |
alarm(0); (void) signal(SIGALRM, SIG_DFL);
Vire le "\n" qui interfère... RK. if (dotting_file == stdout) user_log("\n"); else { (void) putc('
', dotting_file); if(dotting_file!=stderr) fflush(dotting_file); }
char* strescape | ( | const char * | source | ) |
protect a string, for example for use in a system call list of non escaped characters in the macro above.
source | ource |
Definition at line 334 of file file.c.
References malloc(), and to_escape.
Referenced by check_delete_workspace(), check_input_file_syntax(), and process_thru_C_pp().
void update_list_from_array | ( | list | l, |
gen_array_t | a | ||
) |
Just modify the strings in a list from an array of strings.
The array of string must have at least as much as strings as in the list. No free is done.
Definition at line 49 of file args.c.
References CAR, gen_array_item(), MAPL, and STRING.
Referenced by sort_list_of_strings().
void user_log | ( | const char * | format, |
... | |||
) |
format | ormat |
Definition at line 234 of file message.c.
References pips_user_log_alist().
Referenced by abc_with_allocation_size(), add_new_compilation_unit(), add_new_module_from_text(), alias_check(), apply_a_rule(), array_bound_check_instrumentation(), array_bound_check_interprocedural(), array_dfg(), atomizer(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_call(), bottom_up_abc_reference(), check_input_file_syntax(), checkpoint_workspace(), clean_up_sequences_rewrite(), continue_create_workspace_notify(), create_workspace(), db_close_module(), db_save_workspace(), delete_some_resources(), display_alias_check_statistics(), display_alias_propagation_statistics(), display_bottom_up_abc_statistics(), display_clean_up_sequences_statistics(), display_impact_alias_statistics(), display_interprocedural_abc_statistics(), display_top_down_abc_statistics(), display_unspaghettify_statistics(), display_used_before_set_statistics(), do_resource_usage_check(), end_directory_notify(), find_statements_interactively_walker(), formal_array_resizing_bottom_up(), full_unroll(), full_unroll_pragma(), get_view_file(), gpips_display_graph_file_display(), gpips_user_request(), impact_check(), initialize_and_verify_common_variable(), initialize_and_verify_local_variable(), interactive_hyperplane_direction(), interactive_partitioning_matrix(), interprocedural_abc_arrays(), interprocedural_abc_statement_rwt(), lazy_open_module(), LinkInstToCurrentBlock(), logs_off(), loop_chunk_size_and_strip_mine(), main(), make_close_workspace(), make_special_value(), NewStmt(), notify_hpfc_file_view(), open_module(), open_workspace(), open_workspace_notify(), options_select(), parse_arguments(), pips_main(), pips_signal_handler(), print_array_dfg(), print_bdt(), print_code_static_control(), print_plc(), process_user_file(), put_summary(), referencenodeclfilter(), reindexing(), safe_concurrent_apply(), safe_do_something(), safe_set_property(), select_a_module_by_default(), select_rule(), set_env_log_and_free(), single_assign(), static_controlize(), stmt_flt(), strip_mine(), SubstituteAlternateReturns(), text_comp_region(), text_region_no_action(), top_down_abc_array(), tp_system(), unroll(), update_options(), UpdateEntity(), wpips_display_graph_file_display(), wpips_interrupt_pipsmake(), and wpips_user_request().
string user_request | ( | const char * | , |
... | |||
) |
Referenced by ask_a_missing_file(), controlize_distribution(), do_kernelize(), find_statements_interactively_walker(), guard_elimination(), Hierarchical_tiling(), interactive_hyperplane_direction(), interactive_partitioning_matrix(), loop_chunk_size_and_strip_mine(), Tiling2_buffer(), Tiling_buffer_allocation(), unimodular(), and unroll().
|
extern |
PROMPT_USER schould be implemented.
(its a warning with consent of the user) The question is: how schould it be called? USER_ERROR is a function that should be called to terminate the current PIPS request execution or to restore the previous saved stack environment when an error in a Fortran file or elsewhere is detected. USER_ERROR first prints on stderr a description of the error, then tests the property ABORT_ON_USER_ERROR and aborts case true. Else it will restore the last saved stack environment (ie. come back to the last executed setjmp(pips_top_level) ), except for eventuality it has already been called. In this case, it terminates execution with exit. USER_ERROR should be called as:
USER_ERROR(fonction, format [, arg] ... )
where function is a string containing the name of the function calling USER_ERROR, and where format and arg-list are passed as arguments to vprintf.
Modifications:
Definition at line 455 of file message.c.
Referenced by atinit(), gpips_main(), pips_log_alist(), tpips_init(), and wpips_main().
|
extern |
PIPS_ERROR is a function that should be called to terminate PIPS execution when data structures are corrupted.
PIPS_ERROR should be called as: PIPS_ERROR(fonction, format [, arg] ... ) where function is a string containing the name of the function calling PIPS_ERROR, and where format and arg-list are passed as arguments to vprintf. PIPS_ERROR terminates execution with abort.
Definition at line 511 of file message.c.
Referenced by pips_log_alist(), and tpips_init().
|
extern |
USER_LOG is a function that should be called to log the current PIPS request, as soon as it is relevant.
loging will occure if property USER_LOG_P is TRUE. USER_LOG should be called as:
USER_LOG(format [, arg] ... )
where format and arg-list are passed as arguments to vprintf. default assignment of pips_log_handler is default_user_log. Some top-level (eg. wpips) may need a special user_log proceedure; they should let pips_log_handler point toward it.
Every procedure pointed to by pips_log_handler must test the property USER_LOG_P; this is necessary because (* pips_log_handler) may be called anywhere (because VARARGS), whithout verifying it.
Definition at line 216 of file message.c.
Referenced by atinit(), gpips_main(), pips_log_alist(), and wpips_main().
|
externdefault |
default assignment of pips_request_handler is default_user_request.
Some top-level (eg. wpips) may need a special user_request proceedure; they should let pips_request_handler point toward it.
Definition at line 139 of file message.c.
Referenced by gpips_main(), tpips_init(), and wpips_main().
|
extern |
default assignment of pips_warning_handler is default_user_warning.
Some top-level (eg. wpips) may need a special user_warning proceedure; they should let pips_warning_handler point toward it.
Definition at line 325 of file message.c.
Referenced by gpips_main(), pips_log_alist(), and wpips_main().
|
extern |
cproto-generated files
debug.c
cproto-generated files
Modifications:
debug.c