#include <cif.h>#include <malloc.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include "unitrecord.h"#include "cif_int.h"#include <sys/types.h>#include <sys/stat.h>

Go to the source code of this file.
Data Types | |
| type | Id_tbl |
Defines | |
| #define | CIF_VERSION 3 |
| #define | CIFCONV_INVALID_RECORDS 2 |
| #define | MEM_ERROR |
| #define | OUT_ERROR(STR, FD, STATUS) |
| #define | ID_BUMP 500 |
| #define | UTBUMP 100 |
| #define | HRECORDS 15 |
| #define | URECORDS 54 |
Enumerations | |
| enum | Boolean { False, True } |
Functions/Subroutines | |
| static int | sortfile (struct Cif_generic *) |
| static int | copy_units (void) |
| static int | write_header (void) |
| static int | get_srcfid (void) |
| static int | write_unit (int, enum Boolean, enum Boolean) |
| int | cif_VerifyCanWrite (char *file) |
| static void | free_copied_blocks () |
| static int | comp_callsite (struct Cif_callsite **, struct Cif_callsite **) |
| static int | comp_comblk (struct Cif_comblk **, struct Cif_comblk **) |
| static int | comp_const (struct Cif_const **, struct Cif_const **) |
| static int | comp_entry (struct Cif_entry **, struct Cif_entry **) |
| static int | comp_file (struct Cif_file **, struct Cif_file **) |
| static int | comp_label (struct Cif_label **, struct Cif_label **) |
| static int | comp_loop (struct Cif_loop **, struct Cif_loop **) |
| static int | comp_message (struct Cif_message **, struct Cif_message **) |
| static int | comp_namelist (struct Cif_namelist **, struct Cif_namelist **) |
| static int | comp_object (struct Cif_object **, struct Cif_object **) |
| static int | comp_stmt_type (struct Cif_stmt_type **, struct Cif_stmt_type **) |
| static int | comp_usage (struct Cif_usage **, struct Cif_usage **) |
| static int | comp_c_tag (struct Cif_c_tag **, struct Cif_c_tag **) |
| static int | comp_c_message (struct Cif_c_message **, struct Cif_c_message **) |
| static int | comp_c_const (struct Cif_c_const **, struct Cif_c_const **) |
| static int | comp_c_entry (struct Cif_c_entry **, struct Cif_c_entry **) |
| static int | comp_c_object (struct Cif_c_object **, struct Cif_c_object **) |
| static int | comp_c_lint_directive (struct Cif_c_lint_directive **, struct Cif_c_lint_directive **) |
| static int | comp_c_macro_def (struct Cif_c_macro_def **, struct Cif_c_macro_def **) |
| static int | comp_c_macro_undef (struct Cif_c_macro_undef **, struct Cif_c_macro_undef **) |
| static int | comp_c_macro_usage (struct Cif_c_macro_usage **, struct Cif_c_macro_usage **) |
| static int | comp_c_entry_end (struct Cif_c_entry_end **, struct Cif_c_entry_end **) |
| static int | comp_cdir (struct Cif_cdir **, struct Cif_cdir **) |
| static int | comp_cdir_doshared (struct Cif_cdir_doshared **, struct Cif_cdir_doshared **) |
| static int | comp_geometry (struct Cif_geometry **, struct Cif_geometry **) |
| static int | comp_continuation (struct Cif_continuation **, struct Cif_continuation **) |
| static int | comp_transform (struct Cif_transform **, struct Cif_transform **) |
| static int | comp_f90_callsite (struct Cif_f90_callsite **, struct Cif_f90_callsite **) |
| static int | comp_f90_comblk (struct Cif_f90_comblk **, struct Cif_f90_comblk **) |
| static int | comp_f90_const (struct Cif_f90_const **, struct Cif_f90_const **) |
| static int | comp_f90_entry (struct Cif_f90_entry **, struct Cif_f90_entry **) |
| static int | comp_f90_loop (struct Cif_f90_loop **, struct Cif_f90_loop **) |
| static int | comp_f90_derived_type (struct Cif_f90_derived_type **, struct Cif_f90_derived_type **) |
| static int | comp_f90_label (struct Cif_f90_label **, struct Cif_f90_label **) |
| static int | comp_f90_namelist (struct Cif_f90_namelist **, struct Cif_f90_namelist **) |
| static int | comp_f90_object (struct Cif_f90_object **, struct Cif_f90_object **) |
| static int | comp_f90_begin_scope (struct Cif_f90_begin_scope **, struct Cif_f90_begin_scope **) |
| static int | comp_f90_end_scope (struct Cif_f90_end_scope **, struct Cif_f90_end_scope **) |
| static int | comp_f90_scope_info (struct Cif_f90_scope_info **, struct Cif_f90_scope_info **) |
| static int | comp_f90_use_module (struct Cif_f90_use_module **, struct Cif_f90_use_module **) |
| static int | comp_f90_rename (struct Cif_f90_rename **, struct Cif_f90_rename **) |
| static int | comp_f90_int_block (struct Cif_f90_int_block **, struct Cif_f90_int_block **) |
| static int | comp_f90_vectorization (struct Cif_f90_vectorization **, struct Cif_f90_vectorization **) |
| static int | comp_cc_type (struct Cif_cc_type **, struct Cif_cc_type **) |
| static int | comp_cc_entry (struct Cif_cc_entry **, struct Cif_cc_entry **) |
| static int | comp_cc_obj (struct Cif_cc_obj **, struct Cif_cc_obj **) |
| static int | comp_cc_subtype (struct Cif_cc_subtype **, struct Cif_cc_subtype **) |
| static int | comp_cc_enum (struct Cif_cc_enum **, struct Cif_cc_enum **) |
| static int | comp_cc_expr (struct Cif_cc_expr **, struct Cif_cc_expr **) |
| static int | comp_src_pos (struct Cif_src_pos **, struct Cif_src_pos **) |
| static int | comp_orig_cmd (struct Cif_orig_cmd **, struct Cif_orig_cmd **) |
| static void | addstruct (struct Cif_generic *) |
| static void | addunit (struct Cif_generic *) |
| static void | add_id (struct Id_tbl *, long) |
| static int | comp_ids (long *, long *) |
| static long | get_max_fid (void) |
| static long | get_max_sid (void) |
| static void | init_id (struct Id_tbl *) |
| static void | makeudir (void) |
| static void | remap_files (void) |
| static void | remap_symbols (void) |
| static int | later_date (char *file_1, char *file_2) |
| static int | cif_next_entry (int cifd, long *cifpos, struct Cif_generic **cif_record) |
| static int | cifconv_type (char *cif_name) |
| static char * | Cif_Make_Cifconv (char *infile, char *outfile, int *rtypes) |
| void | Cif_ConvDir (char *dir) |
| static char * | concat (char *str1, char *str2) |
| int | assertCanWriteDir (char *dir) |
| static char * | cif_convert_to_cifconv (char *filename, int keep, int *tmp_cif, int *rtypes) |
| int | Cif_Cifconv (char *filename, char *optype, int *rtypes, int version, int keep) |
| int | Cif_Cifconv_V2_1 (char *filename, char *optype, int *rtypes, int version, int keep, int sub_version) |
| int | Cif_Cifconv_V3_1 (char *filename, char *optype, int *rtypes, int version, int keep, int sub_version) |
| static struct Cif_generic * | cif_copy_record (struct Cif_generic *cifp) |
| static int | comp_use (struct Cif_use *u1, struct Cif_use *u2) |
| static int | merge_usages (void) |
| static long | get_id (struct Id_tbl *idtp, long id) |
Variables | |
| static char | USMID [] = "@(#) libcif/cif_conv.c 30.22 12/08/96 14:42:46" |
| static int | lang |
| static int | cifconv_return_code = 0 |
| static int | infd |
| static int | outfd |
| static int | tmpfd = -1 |
| static char * | tfile = NULL |
| static long | fdirpos |
| static enum Boolean | canpos = False |
| static int * | global_nuses = (int *) NULL |
| static int | global_nuses_allocated = 0 |
| static enum Boolean | Remap_id |
| static struct Id_tbl | sid |
| static enum Boolean | first_time = True |
| type { | |
| struct Cif_generic ** aptr | |
| int psize | |
| int next | |
| } | patbl [CIF_MAXRECORD] |
| static char * | global_outfile |
| static enum Boolean | global_error_report = False |
| static const int | pabump [CIF_MAXRECORD] |
| static int(* | qcompare [CIF_MAXRECORD])() |
| static char * | cif_tt_dir = (char *) NULL |
| static struct Cif_generic ** | record_store = (struct Cif_generic **) NULL |
| static int | current_store_record = 0 |
| static int | max_store_record = 0 |
| static const int | horder [HRECORDS] |
| static const int | uorder [URECORDS] |
| #define CIF_VERSION 3 |
Definition at line 49 of file cif_conv.c.
| #define CIFCONV_INVALID_RECORDS 2 |
Definition at line 91 of file cif_conv.c.
| #define HRECORDS 15 |
| #define ID_BUMP 500 |
| #define MEM_ERROR |
Value:
{ \
(void) fprintf (stderr, "libcif: %s\n", Cif_Errstring(CIF_NOMEM)); \
exit (1); \
}
Definition at line 95 of file cif_conv.c.
Referenced by add_id(), addstruct(), addunit(), Cif_Make_Cifconv(), makeudir(), merge_usages(), and sortfile().
| #define OUT_ERROR | ( | STR, | |||
| FD, | |||||
| STATUS | ) |
Value:
{ \
(void) fprintf (stderr, "libcif: error %s file %s - %s\n", \
STR, (FD==outfd ? global_outfile : tfile), Cif_Errstring(STATUS)); \
exit (STATUS); \
}
Definition at line 100 of file cif_conv.c.
Referenced by copy_units(), sortfile(), write_header(), and write_unit().
| #define URECORDS 54 |
| #define UTBUMP 100 |
Referenced by addunit().
| enum Boolean |
Definition at line 2519 of file cif_conv.c.
References Id_tbl::cur, ID_BUMP, Id_tbl::max, MEM_ERROR, NULL, realloc, and Id_tbl::tbl.
Referenced by remap_symbols().
| static void addstruct | ( | struct Cif_generic * | cifp | ) | [static] |
Definition at line 1290 of file cif_conv.c.
References aptr, CIF_LG_C, CIF_STMT_TYPE, CIFSTMT, i, malloc, MEM_ERROR, NULL, pabump, patbl, psize, realloc, and Cif_generic::rectype.
Referenced by addunit(), copy_units(), makeudir(), and sortfile().
| static void addunit | ( | struct Cif_generic * | unitp | ) | [static] |
Definition at line 1356 of file cif_conv.c.
References addstruct(), aptr, CIF_FILEDIR, CIFFDIR, CIFUNIT, i, malloc, MEM_ERROR, memset, Cif_unittbl::name, Cif_unittbl::nlen, NULL, patbl, realloc, strlen(), Cif_unittbl::unitpos, UTBUMP, and void.
Referenced by sortfile().
| int assertCanWriteDir | ( | char * | dir | ) |
Definition at line 661 of file cif_conv.c.
References concat(), fclose(), fd, fopen, free(), mode, NULL, S_ISDIR, stat::st_mode, stat, and unlink.
Referenced by cif_convert_to_cifconv().
| int Cif_Cifconv | ( | char * | filename, | |
| char * | optype, | |||
| int * | rtypes, | |||
| int | version, | |||
| int | keep | |||
| ) |
Definition at line 881 of file cif_conv.c.
References _Cif_filetbl, _cif_version, cif_convert_to_cifconv(), Cif_Open_V2(), Cif_Open_V3_1(), CIF_SUB_VERSION_3, cifconv_return_code, Id_tbl::cur, False, first_time, free(), global_error_report, Id_tbl::max, NULL, ret, sid, Id_tbl::tbl, _Cif_File_Tbl::tmp_cif, and True.
Referenced by Cif_Cifconv_V2_1(), Cif_Cifconv_V3_1(), and print_buffered_messages().
| int Cif_Cifconv_V2_1 | ( | char * | filename, | |
| char * | optype, | |||
| int * | rtypes, | |||
| int | version, | |||
| int | keep, | |||
| int | sub_version | |||
| ) |
Definition at line 974 of file cif_conv.c.
References _cif_version, Cif_Cifconv(), and CIF_SUB_VERSION_2.
| int Cif_Cifconv_V3_1 | ( | char * | filename, | |
| char * | optype, | |||
| int * | rtypes, | |||
| int | version, | |||
| int | keep, | |||
| int | sub_version | |||
| ) |
Definition at line 1000 of file cif_conv.c.
References _cif_version, Cif_Cifconv(), and CIF_SUB_VERSION_3.
| void Cif_ConvDir | ( | char * | dir | ) |
Definition at line 632 of file cif_conv.c.
| static char* cif_convert_to_cifconv | ( | char * | filename, | |
| int | keep, | |||
| int * | tmp_cif, | |||
| int * | rtypes | |||
| ) | [static] |
Definition at line 693 of file cif_conv.c.
References access, assertCanWriteDir(), cif_basename(), Cif_Make_Cifconv(), cif_VerifyCanWrite(), cifconv_type(), free(), getenv(), later_date(), malloc, mktemp, NULL, R_OK, sprintf(), strdup, strlen(), tmpdir, and void.
Referenced by Cif_Cifconv().
| static struct Cif_generic* cif_copy_record | ( | struct Cif_generic * | cifp | ) | [static, read] |
Definition at line 1027 of file cif_conv.c.
References Cif_Duplicate(), malloc, NULL, and realloc.
Referenced by sortfile().
| static char* Cif_Make_Cifconv | ( | char * | infile, | |
| char * | outfile, | |||
| int * | rtypes | |||
| ) | [static] |
Definition at line 500 of file cif_conv.c.
References CIF_CIFHDR, Cif_Close(), Cif_Errstring(), CIF_FORM_SORTED, Cif_Getrecord(), CIF_ID_NONCONTIG, CIF_MEM_FREE, CIF_MEM_KEEP, CIF_MEM_MANAGED, Cif_Memmode(), Cif_Open, CIF_VERSION, cifconv_return_code, CIFHDR, exit(), False, fclose(), fopen, fprintf(), free(), free_copied_blocks(), global_outfile, ID_BUMP, infd, malloc, Id_tbl::max, MEM_ERROR, NULL, outfd, Remap_id, ret, sid, sortfile(), strdup, Id_tbl::tbl, tmpfd, True, unlink, and void.
Referenced by cif_convert_to_cifconv().
| static int cif_next_entry | ( | int | cifd, | |
| long * | cifpos, | |||
| struct Cif_generic ** | cif_record | |||
| ) | [static] |
Definition at line 415 of file cif_conv.c.
References Cif_Errstring(), Cif_Getpos(), Cif_Getrecord(), Cif_Setpos(), fprintf(), and void.
Referenced by cifconv_type(), and lines_type().
| int cif_VerifyCanWrite | ( | char * | file | ) |
Definition at line 449 of file cif_lines.c.
References access, cif_concat(), cif_dirname(), dir, F_OK, fclose(), fd, fopen, free(), mode, NULL, S_ISDIR, stat::st_mode, stat, unlink, void, and W_OK.
Referenced by cif_convert_to_cifconv(), and cif_convert_to_lines().
| static int cifconv_type | ( | char * | cif_name | ) | [static] |
Definition at line 455 of file cif_conv.c.
References CIF_CIFHDR, Cif_Close(), CIF_FIRST_RECORD, CIF_FORM_CIFCONV, CIF_FORM_SORTED, CIF_MEM_FREE, cif_next_entry(), Cif_Open, CIF_VERSION, CIFHDR, NULL, and void.
Referenced by cif_convert_to_cifconv().
| static int comp_c_const | ( | struct Cif_c_const ** | p1, | |
| struct Cif_c_const ** | p2 | |||
| ) | [static] |
Definition at line 1822 of file cif_conv.c.
| static int comp_c_entry | ( | struct Cif_c_entry ** | p1, | |
| struct Cif_c_entry ** | p2 | |||
| ) | [static] |
Definition at line 1829 of file cif_conv.c.
Definition at line 1872 of file cif_conv.c.
| static int comp_c_lint_directive | ( | struct Cif_c_lint_directive ** | p1, | |
| struct Cif_c_lint_directive ** | p2 | |||
| ) | [static] |
Definition at line 1843 of file cif_conv.c.
Definition at line 1850 of file cif_conv.c.
| static int comp_c_macro_undef | ( | struct Cif_c_macro_undef ** | p1, | |
| struct Cif_c_macro_undef ** | p2 | |||
| ) | [static] |
Definition at line 1857 of file cif_conv.c.
| static int comp_c_macro_usage | ( | struct Cif_c_macro_usage ** | p1, | |
| struct Cif_c_macro_usage ** | p2 | |||
| ) | [static] |
Definition at line 1865 of file cif_conv.c.
| static int comp_c_message | ( | struct Cif_c_message ** | p1, | |
| struct Cif_c_message ** | p2 | |||
| ) | [static] |
| static int comp_c_object | ( | struct Cif_c_object ** | p1, | |
| struct Cif_c_object ** | p2 | |||
| ) | [static] |
Definition at line 1836 of file cif_conv.c.
Definition at line 1803 of file cif_conv.c.
| static int comp_callsite | ( | struct Cif_callsite ** | p1, | |
| struct Cif_callsite ** | p2 | |||
| ) | [static] |
Definition at line 1886 of file cif_conv.c.
Definition at line 1907 of file cif_conv.c.
Definition at line 1914 of file cif_conv.c.
Definition at line 1893 of file cif_conv.c.
Definition at line 1900 of file cif_conv.c.
Definition at line 1879 of file cif_conv.c.
| static int comp_comblk | ( | struct Cif_comblk ** | p1, | |
| struct Cif_comblk ** | p2 | |||
| ) | [static] |
Definition at line 1475 of file cif_conv.c.
Definition at line 1489 of file cif_conv.c.
| static int comp_f90_begin_scope | ( | struct Cif_f90_begin_scope ** | p1, | |
| struct Cif_f90_begin_scope ** | p2 | |||
| ) | [static] |
Definition at line 1688 of file cif_conv.c.
Definition at line 1624 of file cif_conv.c.
Definition at line 1631 of file cif_conv.c.
| static int comp_f90_derived_type | ( | struct Cif_f90_derived_type ** | p1, | |
| struct Cif_f90_derived_type ** | p2 | |||
| ) | [static] |
Definition at line 1681 of file cif_conv.c.
| static int comp_f90_end_scope | ( | struct Cif_f90_end_scope ** | p1, | |
| struct Cif_f90_end_scope ** | p2 | |||
| ) | [static] |
Definition at line 1695 of file cif_conv.c.
Definition at line 1638 of file cif_conv.c.
| static int comp_f90_int_block | ( | struct Cif_f90_int_block ** | p1, | |
| struct Cif_f90_int_block ** | p2 | |||
| ) | [static] |
Definition at line 1709 of file cif_conv.c.
Definition at line 1646 of file cif_conv.c.
| static int comp_f90_namelist | ( | struct Cif_f90_namelist ** | p1, | |
| struct Cif_f90_namelist ** | p2 | |||
| ) | [static] |
Definition at line 1667 of file cif_conv.c.
Definition at line 1674 of file cif_conv.c.
Definition at line 1723 of file cif_conv.c.
| static int comp_f90_scope_info | ( | struct Cif_f90_scope_info ** | p1, | |
| struct Cif_f90_scope_info ** | p2 | |||
| ) | [static] |
Definition at line 1702 of file cif_conv.c.
| static int comp_f90_use_module | ( | struct Cif_f90_use_module ** | p1, | |
| struct Cif_f90_use_module ** | p2 | |||
| ) | [static] |
Definition at line 1716 of file cif_conv.c.
| static int comp_f90_vectorization | ( | struct Cif_f90_vectorization ** | p1, | |
| struct Cif_f90_vectorization ** | p2 | |||
| ) | [static] |
Definition at line 1730 of file cif_conv.c.
Definition at line 1496 of file cif_conv.c.
Definition at line 1768 of file cif_conv.c.
Definition at line 1503 of file cif_conv.c.
| static int comp_message | ( | struct Cif_message ** | p1, | |
| struct Cif_message ** | p2 | |||
| ) | [static] |
| static int comp_namelist | ( | struct Cif_namelist ** | p1, | |
| struct Cif_namelist ** | p2 | |||
| ) | [static] |
Definition at line 1538 of file cif_conv.c.
| static int comp_object | ( | struct Cif_object ** | p1, | |
| struct Cif_object ** | p2 | |||
| ) | [static] |
Definition at line 1545 of file cif_conv.c.
Definition at line 1935 of file cif_conv.c.
| static int comp_stmt_type | ( | struct Cif_stmt_type ** | p1, | |
| struct Cif_stmt_type ** | p2 | |||
| ) | [static] |
Definition at line 2050 of file cif_conv.c.
References Cif_use::cpos, Cif_use::fid, Cif_use::line, and ret.
Referenced by merge_usages().
| static char* concat | ( | char * | str1, | |
| char * | str2 | |||
| ) | [static] |
Definition at line 645 of file cif_conv.c.
References buf, malloc, sprintf(), and strlen().
Referenced by add_standard_paths(), add_sysrooted_prefix(), affix_data_type(), alter_test_for_insn(), assertCanWriteDir(), build_common_builtin_nodes(), build_gcov_info(), close_dump_file(), collect_expansion(), cp_parser_require(), darwin_emit_unwind_label(), darwin_register_frameworks(), darwin_register_objc_includes(), dump_all_macros(), dump_begin(), ffecom_subscript_check_(), finalize(), for_each_path(), gen_aux_info_file(), gen_datalabel_ref(), gen_decl(), gen_formal_list_for_func_def(), gen_formal_list_for_type(), gen_type(), get_dump_file_name(), get_frame_type(), get_key_value(), host_detect_local_cpu(), is_directory(), join_c_conditions(), lang_specific_driver(), lang_specific_pre_link(), ldfile_add_library_path(), ldfile_open_file_search(), main(), mf_file_function_line_tree(), name_as_c_string(), new_afile(), objc_init(), open_dump_file(), output_func_start_profiler(), override_options(), PARAMS(), pex_msdos_exec_child(), pex_run_in_environment(), pop_type_0(), preprocess_args(), process_command(), process_include(), process_rtx(), read_name_map(), register_one_dump_file(), set_spec(), temp_file(), translate_name(), translate_options(), update_path(), vect_get_new_vect_var(), write_c_file_stat(), and write_classfile().
| static int copy_units | ( | void | ) | [static] |
Definition at line 1950 of file cif_conv.c.
References addstruct(), canpos, Cif_Close(), CIF_ENDUNIT, CIF_EOF, Cif_Errstring(), CIF_FILEDIR, Cif_Getrecord(), CIF_MAXRECORD, CIF_MEM_KEEP, CIF_MEM_MANAGED, Cif_Memmode(), Cif_Open, Cif_Release(), CIF_UNIT, CIF_UNITDIR, CIF_VERSION, CIFFDIR, CIFUDIR, False, fprintf(), get_max_sid(), i, NULL, OUT_ERROR, outfd, patbl, Remap_id, remap_symbols(), sid, tfile, tmpfd, True, unit_record, unlink, void, and write_unit().
Referenced by sortfile().
| static void free_copied_blocks | ( | ) | [static] |
Definition at line 1049 of file cif_conv.c.
References Cif_Free(), and i.
Referenced by Cif_Make_Cifconv().
Definition at line 2551 of file cif_conv.c.
References Id_tbl::cur, fprintf(), global_error_report, global_outfile, Id_tbl::tbl, True, and void.
Referenced by comp_scope(), and remap_symbols().
Definition at line 3481 of file cif_conv.c.
References CIF_FILE, CIFFILE, and patbl.
Referenced by sortfile().
Definition at line 3293 of file cif_conv.c.
References CIF_C_CONST, CIF_C_ENTRY, CIF_C_OBJECT, CIF_C_TAG, CIF_COMBLK, CIF_CONST, CIF_ENTRY, CIF_LABEL, CIF_NAMELIST, CIF_OBJECT, CIFCB, CIFCCON, CIFCENTRY, CIFCOBJ, CIFCON, CIFCTAG, CIFENTRY, CIFLABEL, CIFNL, CIFOBJ, patbl, and sid.
Referenced by copy_units(), and sortfile().
| static int get_srcfid | ( | void | ) | [static] |
Definition at line 2261 of file cif_conv.c.
References CIF_SRCFILE, CIFSRC, patbl, and sp.
Referenced by write_header().
Definition at line 2507 of file cif_conv.c.
References Id_tbl::cur, and Id_tbl::tbl.
Referenced by remap_symbols().
| static int later_date | ( | char * | file_1, | |
| char * | file_2 | |||
| ) | [static] |
Definition at line 394 of file cif_conv.c.
References stat::st_mtime, stat, and void.
Referenced by cif_convert_to_cifconv(), and cif_convert_to_lines().
Definition at line 2013 of file cif_conv.c.
References addstruct(), CIF_MAXRECORD, CIF_UNITDIR, CIFGEN, i, malloc, MEM_ERROR, memset, n, Cif_unitdir::nsections, NULL, Cif_unitdir::rectype, Cif_urectbl::rectype, unit_record, Cif_unitdir::ur, and void.
Referenced by sortfile().
| static int merge_usages | ( | void | ) | [static] |
Definition at line 2064 of file cif_conv.c.
References aptr, CIF_UNITDIR, CIF_USAGE, CIFUDIR, comp_use(), global_nuses, global_nuses_allocated, i, int, malloc, MEM_ERROR, memset, n, Cif_urectbl::nrecords, NULL, Cif_usage::nuses, patbl, qsort(), realloc, si, Cif_usage::symid, ti, up, Cif_usage::use, use2, and void.
Referenced by write_unit().
Referenced by sortfile().
Definition at line 2605 of file cif_conv.c.
References add_id(), CIF_C_CONST, CIF_C_ENTRY, CIF_C_MESSAGE, CIF_C_OBJECT, CIF_C_TAG, CIF_CALLSITE, CIF_COMBLK, CIF_CONST, CIF_ENDUNIT, CIF_ENTRY, CIF_LABEL, CIF_LOOP, CIF_MESSAGE, CIF_NAMELIST, CIF_OBJECT, CIF_SC_COMMON, CIF_SC_EQUIV, CIF_STMT_TYPE, CIF_UNIT, CIF_USAGE, CIFCB, CIFCCON, CIFCENTRY, CIFCMSG, CIFCOBJ, CIFCON, CIFCS, CIFCTAG, CIFENDU, CIFENTRY, CIFLABEL, CIFLOOP, CIFMSG, CIFNL, CIFOBJ, CIFSTMT, CIFUNIT, CIFUSAGE, comp_ids(), Id_tbl::cur, Cif_use::fid, get_id(), init_id(), int, long, mem, patbl, qsort(), sid, sp, storage, Id_tbl::tbl, and void.
Referenced by copy_units(), and sortfile().
| static int sortfile | ( | struct Cif_generic * | cifp | ) | [static] |
Definition at line 1067 of file cif_conv.c.
References addstruct(), addunit(), aptr, canpos, cif_copy_record(), CIF_ENDUNIT, CIF_EOF, Cif_Errstring(), CIF_FILE, CIF_FILEDIR, CIF_FORM_CIFCONV, CIF_FORM_SORTED, Cif_Getpos(), Cif_Getrecord(), CIF_INCLUDE, CIF_MAXRECORD, CIF_MEM_KEEP, Cif_Open, Cif_Putrecord(), Cif_Release(), Cif_Setpos(), CIF_UNIT, CIF_UNITDIR, CIF_VERSION, CIFFDIR, CIFHDR, CIFUDIR, copy_units(), False, fdirpos, fprintf(), free(), get_max_fid(), get_max_sid(), i, infd, makeudir(), malloc, MEM_ERROR, memset, Cif_urectbl::nrecords, NULL, OUT_ERROR, outfd, patbl, remap_files(), Remap_id, remap_symbols(), sid, tempnam, tfile, tmpfd, True, unit_record, void, write_header(), and write_unit().
Referenced by Cif_Make_Cifconv().
| static int write_header | ( | void | ) | [static] |
Definition at line 2217 of file cif_conv.c.
References canpos, CIF_CIFHDR, CIF_FILE, CIF_FILEDIR, CIF_FORM_CIFCONV, Cif_Getpos(), Cif_Putrecord(), CIFHDR, fdirpos, get_srcfid(), HRECORDS, i, next, OUT_ERROR, outfd, patbl, qcompare, qsort(), sp, True, and void.
Definition at line 2341 of file cif_conv.c.
References aptr, CIF_FILEDIR, Cif_Getpos(), CIF_LG_C, CIF_MAXRECORD, Cif_Putrecord(), Cif_Setpos(), CIF_STMT_TYPE, CIF_UNIT, CIF_UNITDIR, CIF_USAGE, CIFFDIR, CIFSTMT, CIFUDIR, CIFUNIT, free(), global_nuses, i, merge_usages(), next, NULL, OUT_ERROR, patbl, qcompare, qsort(), Cif_urectbl::recpos, si, sp, strcmp(), unit_record, up, URECORDS, and void.
Referenced by copy_units(), and sortfile().
Definition at line 145 of file cif_conv.c.
Referenced by $ssdfree(), addstruct(), addunit(), llist(), merge_usages(), mri_draw_tree(), sortfile(), strlist(), WFE_Address_Of(), WGEN_Address_Of(), and write_unit().
Definition at line 112 of file cif_conv.c.
Referenced by copy_units(), sortfile(), and write_header().
char* cif_tt_dir = (char *) NULL [static] |
Definition at line 626 of file cif_conv.c.
int cifconv_return_code = 0 [static] |
int current_store_record = 0 [static] |
Definition at line 1024 of file cif_conv.c.
enum Boolean first_time = True [static] |
Definition at line 136 of file cif_conv.c.
enum Boolean global_error_report = False [static] |
int* global_nuses = (int *) NULL [static] |
int global_nuses_allocated = 0 [static] |
char* global_outfile [static] |
const int horder[HRECORDS] [static] |
Initial value:
{
CIF_CIFHDR,
CIF_FILEDIR,
CIF_SRCFILE,
CIF_FILE,
CIF_INCLUDE,
CIF_SRC_POS,
CIF_ORIG_CMD,
CIF_EDOPTS,
CIF_MACH_CHAR,
CIF_MISC_OPTS,
CIF_F90_MISC_OPTS,
CIF_OPT_OPTS,
CIF_F90_OPT_OPTS,
CIF_C_OPTS,
CIF_SUMMARY
}
Definition at line 2199 of file cif_conv.c.
int infd [static] |
int lang [static] |
Definition at line 81 of file cif_conv.c.
int max_store_record = 0 [static] |
Definition at line 1025 of file cif_conv.c.
| int next |
Definition at line 147 of file cif_conv.c.
Referenced by __pow(), __powf(), _cpp_free_buff(), ANL_PRAGMA_ATTRIBUTE::_Write_Pragma(), ANL_PRAGMA_ATTRIBUTE::_Write_Pragma_Arguments(), add_dependence(), add_dependence_list_and_free(), Add_Float_Stores(), EXEC_PATH::Add_Hash(), add_insn_after(), add_next_to_vliw(), add_tlist(), alpha_align_insns(), alphaev4_next_group(), alphaev5_next_group(), ANNOT_Add(), ANNOT_Unlink(), Append_Pragma_Clauses(), apply_opt_in_copies(), apply_return_prediction(), apuinfo_list_finish(), arm_barrier_cost(), at_endline_loc_p(), CG_LOOP::Attach_Prolog_And_Epilog(), attrs_list_clear(), avr_reorg(), barrier_align(), BB_Copy_All_Preds(), BB_Copy_All_Succs(), BB_Disconnect_All_Preds(), BB_Disconnect_All_Succs(), BB_Take_Over_All_Preds(), BB_Take_Over_All_Succs(), BBlist_Fall_Thru_Succ(), bfd_boolean(), bitmap_and_compl_into(), bitmap_and_into(), bitmap_clear(), bitmap_compl_and_into(), bitmap_element_free(), bitmap_elt_clear_from(), bitmap_xor_into(), block_move_sequence(), blocks_nreverse(), Branches_Around(), bsi_after_labels(), c_split_parallel_clauses(), calc_wider_mode(), calculate_needs_all_insns(), cfg_layout_can_duplicate_bb_p(), cfg_layout_delete_block(), cgraph_decide_inlining(), cgraph_decide_inlining_of_small_functions(), cgraph_decide_recursive_inlining(), cgraph_finalize_compilation_unit(), cgraph_mark_inline(), cgraph_remove_unreachable_nodes(), cgraph_reset_node(), cgraph_varpool_remove_unreferenced_decls(), CGTARG_Dependence_Required(), check_field_decls(), check_format_info_main(), check_operand_nalternatives(), Check_Undefined_Results(), clean(), clean_aux_registers(), cleanup_barriers(), cleanup_unconditional_jumps(), clear_edges(), clobber_variable_part(), coff_print_symbol(), collect_one_action_chain(), combine_btr_defs(), combine_instructions(), combine_stack_adjustments_for_block(), combine_temp_slots(), commit_edge_insertions(), commit_edge_insertions_watch_calls(), commit_one_edge_insertion(), compact_distree(), compare_condition(), compute_antic_aux(), compute_buffer_net_size(), compute_estimated_nb_iterations(), OPT_STAB::Compute_FFA(), compute_forward_dependences(), compute_phi_arg_on_exit(), convert_from_eh_region_ranges_1(), Convert_Regs(), Convert_Section_To_Pdo(), copy_insn_notes(), copy_list(), copy_loop_headers(), copy_src_to_dest(), Count_Loop_Size(), count_or_remove_death_notes(), count_or_remove_death_notes_bb(), cover_insn(), cp_finish_file(), cp_parser_objc_superclass_or_category(), Create_Common_Block(), cse_end_of_basic_block(), cselib_invalidate_mem(), cselib_lookup(), cwh_stab_free_list(), DEBUG_Init_Config(), decDensePackCoeff(), decide_unrolling_and_peeling(), decShiftToMost(), delete_address_reloads(), delete_caller_save_insns(), delete_computation(), delete_dead_jumptables(), Delete_Def_Use(), Delete_Dist_Reshape_Pragmas(), delete_for_peephole(), delete_insn(), delete_insn_chain(), UNRESOLVED_DEP_LST::Delete_Item(), BOOKEEPING_LST::Delete_Item(), delete_noop_moves(), delete_related_insns(), Delete_Unreachable_Blocks(), Delete_Unwanted_Prefetches(), delete_variable_part(), demangle_type(), demangling_delete(), df_chain_unlink(), df_kill_notes(), df_reg_chain_unlink(), Divide_BB(), draw_bb_dependence_graph(), draw_bb_op(), draw_global_cfg(), draw_regional_dependence_graph(), DST_get_ordinal_num(), CFG_NODE_MAP::Dump(), dump_constants(), dump_expr(), dwarf_get_relocation_info(), EBO_Remove_Unused_Ops(), EC_Array_Portion_Calls(), edge_to_cases_cleanup(), elf64_alpha_merge_gots(), elfNN_ia64_relax_section(), Eliminate_Dead_SCF_rec(), eliminate_degenerate_phis_1(), eliminate_virtual_phis(), emit_call_insn_before(), emit_call_insn_before_noloc(), emit_class_narrowest_mode(), emit_insn(), emit_insn_before(), emit_insn_before_noloc(), emit_jump_insn(), emit_jump_insn_before(), emit_jump_insn_before_noloc(), emit_libcall_block(), emit_no_conflict_block(), emit_output_reload_insns(), end_template_parm_list(), exit(), expand_builtin_expect_jump(), expand_call_inline(), expr_last(), factor_tests(), ffedata_advance_(), ffeexpr_cb_close_paren_ambig_1_(), ffeexpr_cb_comma_i_5_(), ffeexpr_finished_(), ffeexpr_token_first_lhs_1_(), ffeexpr_token_first_rhs_1_(), ffeexpr_token_first_rhs_2_(), ffeexpr_token_first_rhs_3_(), ffeexpr_token_first_rhs_4_(), ffeexpr_token_first_rhs_5_(), ffeexpr_token_first_rhs_6_(), ffeexpr_token_namelist_(), ffesta_save_(), ffesta_second_(), ffesta_two(), ffestb_decl_kindparam_1_(), ffestb_decl_typeparams_1_(), ffestb_do(), ffestb_do3_(), ffestb_dowhile(), ffestb_goto(), ffestb_halt(), ffestb_if3_(), ffestc_subr_binsrch_(), ffestd_R1001dump_(), ffestt_caselist_kill(), ffestt_dimlist_as_expr(), ffestt_dimlist_kill(), ffestt_dimlist_type(), ffestt_exprlist_drive(), ffestt_exprlist_kill(), ffestt_formatlist_kill(), ffestt_implist_drive(), ffestt_implist_kill(), final_scan_insn(), Finalize_All_BBs(), find_basic_blocks_1(), find_dead_or_set_registers(), Find_DST_From_ST(), find_if_block(), find_label_refs(), find_next_ref(), find_sub_basic_blocks(), find_temp_slot_from_address(), finish_builtin_struct(), finish_file(), fix_basic_block_boundaries(), fixup_abnormal_edges(), fixup_fallthru_exit_predecessor(), fixup_reorder_chain(), fixup_var_refs_insn(), fixup_var_refs_insns(), flush_quick_stack(), fold_rtx(), follow_jumps(), fray_yield(), free_bb(), free_buffer_list(), free_csa_memlist(), free_ddg(), free_def_dec(), free_eh_ranges(), free_insn_expr_list_list(), free_label_states(), free_lim_aux_data(), free_mem_refs(), free_nesting_tree(), free_numbers_of_iterations_estimates_loop(), free_reg_ref_chain(), free_resource_info(), free_state_stack(), free_temp_slots(), free_use_list(), frv_read_argument(), Fully_Unroll_Short_Loops(), Gather_Invar(), gen_block_redirect(), gen_expand(), gen_split(), generate_bytecode_insns(), Generate_Runtime_Stuff(), get_base_for(), get_biv_step_1(), get_effective_char(), get_parm_info(), ANL_FUNC_ENTRY::Get_Pragma_Srcpos_Range(), Get_ResultEqVarIdx(), Get_Resultidx_Intrncall(), Get_Struct_Parameter_Location(), Get_Vararg_Parameter_Location(), grokdeclarator(), GTY(), Guard_A_Do(), Guard_Dos_Rec(), handle_nested_ranges(), Hoist_Conditionals(), i960_va_arg(), ia64_dependencies_evaluation_hook(), ia64_sched_reorder2(), init_label_info(), init_line_info(), init_ready_list(), init_spec(), Initialize_BB_Info(), insert(), insert_bit_table_ent(), DAG_OPS_INFO::Insert_op_info(), GROUP_ASSEMBLE::InsertAfter(), integrate_decl_tree(), Inter_Iteration_Cses_R(), invalidate(), invalidate_for_call(), invalidate_memory(), invalidate_mems_from_set(), IPA_WN_DELETE_Tree(), ir_b_write_tree(), is_costly_group(), Is_Empty_BB(), Is_TN_Last_Use(), ISA_Hazards_End(), iv_ca_delta_free(), iv_ca_delta_reverse(), iv_get_reaching_def(), java_demangle_v3(), java_is_eol(), java_lang_expand_expr(), kill_value_one_regno(), kill_value_regno(), lang_add_wild(), lang_finalize_version_expr_head(), lang_leave_overlay(), layout_superblocks(), ldctor_build_sets(), listify(), LNO_Init_Config(), lookup_conversions(), loop_ivs_free(), loop_niter_by_eval(), lower_bit_field_id(), LWN_Create_Block_From_Stmts_Below(), m32c_compare_redundant(), m32r_elf_lo16_reloc(), machine_dependent_reorg(), GRA_LOOP::Make_Loop_Nest(), make_regs_eqv(), make_reorder_chain(), make_reorder_chain_1(), Mark_Dos(), Mark_Invar(), mark_used_regs(), Max_Arg_Area_Bytes(), maybe_apply_pending_pragma_weaks(), maybe_duplicate_computed_goto_succ(), maybe_encapsulate_block(), MDparseline(), MEM_POOL_FREE(), MEM_POOL_Pop_P(), SLIST_RECYCLE< ALIAS_CLASS_MEMBER * >::Merge(), IF_CONVERTOR::Merge_Blocks(), merge_blocks_move(), merge_equiv_classes(), merge_tlist(), merge_trees(), mf_xform_derefs(), mips16_optimize_gp(), mips_output_function_epilogue(), mips_reflo_reloc(), Modify_Asm_String(), move_movables(), mt_reorg_hazard(), New_Fld_Path_Info(), EXP_ALL_OCCURS_ITER::Next(), EXP_ALL_REAL_ITER::Next(), next_dom_son(), next_insn_no_annul(), next_insn_tests_no_unsigned(), Next_PLOC_Reg(), ANL_PRAGMA_ATTRIBUTE::Next_Stmt(), ANL_PRAGMA_CONSTRUCT::Next_Stmt(), nreverse(), objalloc_free(), objalloc_free_block(), OPT_FEEDBACK::OPT_FEEDBACK(), optimize_attrs(), Optimize_Cyclic_Chain(), or32_elf_const_reloc(), output_after_function_constants(), output_data(), output_deferred_addressed_constants(), output_pending_init_elements(), output_predicate_decls(), PARAMS(), peel_loops_completely(), perform(), pex_unix_cleanup(), phi_reverse(), pool_copy_list(), pop_temp_slots(), pop_to_parent_deferring_access_checks(), ppc_elf_relax_section(), preserve_temp_slots(), VN::print(), print_insn_h8500(), process_assert_insertions(), process_phi_nodes(), product_cheap_p(), propagate_block_delete_insn(), purge_dead_edges(), SLIST_RECYCLE_HOME< ALIAS_CLASS_MEMBER * >::Receive(), redirect_edges(), REGION_Entry_PREG_Whirl(), REGION_Exit_PREG_Whirl(), regmove_optimize(), rehash_using_reg(), release_pages(), reload_as_needed(), reload_cse_move2add(), remove_all_phi_nodes_for(), Remove_Annotations(), Remove_Chain(), remove_dead_phis(), remove_dependence(), remove_eh_handler(), Remove_Explicit_Branch(), remove_from_table(), Remove_if(), remove_insn(), remove_invalid_refs(), remove_invalid_subreg_refs(), remove_phi_nodes_and_edges_for_unreachable_block(), remove_ssa_form(), remove_unnecessary_notes(), remove_useless_addtr_insns(), rename_block(), rename_equivalent_regs(), SNL_BOUNDS_INFO::Reset_Varcount_To(), rest_of_clean_state(), Restore_Skips(), reverse_arcs(), reverse_def_dec_list(), rtl_value_profile_transformations(), s390_chunkify_cancel(), s390_chunkify_finish(), s390_chunkify_pool(), s390_free_pool(), save_call_clobbered_regs(), save_def_or_dec(), scan_rtx_reg(), sched_analyze_insn(), schedule_stop(), scope_to_insns_initialize(), IF_CONVERTOR::Set_Fall_Thru(), ANL_VAR::Set_Name_Alias(), set_spec(), Set_Up_Equivalence_Classes(), set_variable_part(), sh_loop_align(), shorten_branches(), skip_escaped_newlines(), SNL_Distribute(), solaris_insert_attributes(), Sort_Clone_Cands(), Sort_Invar_Expressions_Rec(), Special_Sequence(), splay_tree_splay_helper(), split_branches(), split_complex_types(), split_complex_values(), Split_Region(), split_specs_attrs(), squeeze_notes(), ssa_ccp_df_delete_unreachable_insns(), ssa_redirect_edge(), store_parm_decls(), string_list_delete(), sunos_scan_dynamic_symbol(), sweep_pages(), test_is_replaced(), TN_CORRESPOND_Free(), AGGINIT::Traverse_Aggregate_Array(), Traverse_Aggregate_Array(), tree_last(), tree_optimize_tail_calls_1(), tree_unroll_loop(), try_combine(), try_forward_edges(), try_optimize_cfg(), try_simplify_condjump(), tsi_delink(), tsi_split_statement_list_after(), TY2F_List_Common_Flds(), ultra_find_type(), undo_all(), undo_commit(), unreverse_member_declarations(), unroll_and_peel_loops(), unroll_multi_bb(), unroll_multi_make_remainder_loop(), unroll_remove_notations(), var_reg_delete(), var_reg_delete_and_set(), var_regno_delete(), variable_htab_free(), VEC(), verify_function_arguments(), vr4130_align_insns(), WN2C_pragma(), WN2F_pragma(), WN_DELETE_Tree(), WN_next(), WN_Simplify_Tree(), write_header(), write_node(), write_tree_1(), write_unit(), xcoff64_reloc_type_br(), xcoff_reloc_type_br(), xtensa_expand_block_move(), and RG_LIST::~RG_LIST().
int outfd [static] |
Definition at line 108 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), Cif_Make_Lines(), copy_units(), print_header_records(), print_include_records(), print_records(), sortfile(), and write_header().
const int pabump[CIF_MAXRECORD] [static] |
struct { ... } patbl[CIF_MAXRECORD] [static] |
Referenced by addstruct(), addunit(), copy_units(), get_max_fid(), get_max_sid(), get_srcfid(), merge_usages(), remap_symbols(), sortfile(), write_header(), and write_unit().
| int psize |
Definition at line 146 of file cif_conv.c.
Referenced by addstruct(), Get_Parameter_Location(), and vect_create_cond_for_align_checks().
int(* qcompare[CIF_MAXRECORD])() [static] |
Referenced by write_header(), and write_unit().
struct Cif_generic** record_store = (struct Cif_generic **) NULL [static] |
Definition at line 1023 of file cif_conv.c.
Definition at line 125 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), copy_units(), and sortfile().
Definition at line 131 of file cif_conv.c.
Referenced by Cif_Cifconv(), Cif_Make_Cifconv(), copy_units(), get_max_sid(), remap_symbols(), CSE::Save_hoisted_occurrence(), CSE::Save_real_occurrence(), CSE::Save_shrunk_lr_def(), separate_loop_and_scalar_expand(), and sortfile().
char* tfile = NULL [static] |
Definition at line 110 of file cif_conv.c.
int tmpfd = -1 [static] |
Definition at line 109 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), copy_units(), and sortfile().
const int uorder[URECORDS] [static] |
Definition at line 2284 of file cif_conv.c.
char USMID[] = "@(#) libcif/cif_conv.c 30.22 12/08/96 14:42:46" [static] |
Definition at line 41 of file cif_conv.c.
1.5.6