00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 #ifndef glob_INCLUDED 00036 #define glob_INCLUDED 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 /* ==================================================================== 00042 * ==================================================================== 00043 * 00044 * Module: glob.h 00045 * $Revision: 1.1.1.1 $ 00046 * $Date: 2005/10/21 19:00:00 $ 00047 * $Author: marcel $ 00048 * $Source: /proj/osprey/CVS/open64/osprey1.0/linux/mfef90_includes/glob.h,v $ 00049 * 00050 * Revision history: 00051 * 15-Sep-89 - Original Version 00052 * 14-Mar-91 - Copied for TP/Muse 00053 * 00054 * Description: 00055 * 00056 * External interface to routines in the main Muse/TP compiler driver 00057 * module, basically very general purpose control and trace routines 00058 * which don't belong anywhere else. 00059 * 00060 * Also, external interface to global compiler data which doesn't 00061 * belong anywhere else. See com/config.h for a general discussion 00062 * of where global configuration and option data declarations are 00063 * placed. 00064 * 00065 * All of this data is currently located in the process driver, 00066 * bedriver.c for the back end. 00067 * 00068 * NOTE: This file is intended ultimately to be included in multiple 00069 * compiler processes. We therefore attempt to distinguish between 00070 * items which are not process-specific and those which are, placing 00071 * the latter under the appropriate #ifdefs. 00072 * 00073 * ==================================================================== 00074 * ==================================================================== 00075 */ 00076 00077 /* Dummy struct definitions to keep prototypes happy: */ 00078 struct bb; 00079 struct symtab; 00080 00081 #ifdef __cplusplus 00082 struct ST; 00083 #else 00084 struct st; 00085 #endif 00086 00087 /* ==================================================================== 00088 * 00089 * Non-process-specific data (intended for both front ends and back 00090 * end). 00091 * 00092 * ==================================================================== 00093 */ 00094 00095 extern char *Cur_PU_Name; /* The current program unit name */ 00096 extern char *Orig_PU_Name; /* The original program unit name in source */ 00097 00098 /* Kind of the current program unit -- set similarly to Cur_PU_Name */ 00099 typedef enum { 00100 PU_UNKNOWN, 00101 PU_FUNCTION, 00102 PU_SUBROUTINE, 00103 PU_PROGRAM, 00104 PU_BLOCKDATA, 00105 PU_MAX_KIND /* used for bounds checking */ 00106 } PU_KIND; 00107 extern PU_KIND Cur_PU_Kind; 00108 00109 /* Current file names: */ 00110 extern char *Src_File_Name; /* Source file */ 00111 extern char *Orig_Src_File_Name; /* Original source file passed to driver */ 00112 extern char *Cpp_File_Name; /* cpp-preprocessed file */ 00113 extern char *Lst_File_Name; /* Listing file */ 00114 extern char *Err_File_Name; /* Error file */ 00115 extern char *Trc_File_Name; /* Trace file */ 00116 extern char *Tlog_File_Name; /* Transformation log file */ 00117 extern char *Irb_File_Name; /* ACIR intermediate file */ 00118 extern char *IR_File_Name; /* SGIR intermediate file */ 00119 extern char *Ipa_File_Name; /* IPA file */ 00120 extern char *Asm_File_Name; /* Assembly file */ 00121 extern char *Obj_File_Name; /* Relocatable object file */ 00122 extern char *Feedback_File_Name;/* feedback file produced from prof */ 00123 #ifndef MONGOOSE_BE 00124 extern char *Lib_File_Name; /* Program library file */ 00125 #endif 00126 extern char *Lib_Lock_Name; /* Program library lock file */ 00127 extern char *DSTdump_File_Name; /* Dwarf intermediate (i.e. DST) dump file */ 00128 extern char *Global_File_Name; /* Global symbol table file */ 00129 00130 /* Current file handles if open, NULL otherwise: */ 00131 extern FILE *Src_File; /* Source file */ 00132 extern FILE *Cpp_File; /* cpp-preprocessed file */ 00133 extern FILE *Lst_File; /* Listing file */ 00134 extern FILE *Err_File; /* Error file */ 00135 extern FILE *Trc_File; /* Trace file */ 00136 extern FILE *Tlog_File; /* Transformation log file */ 00137 extern FILE *Irb_File; /* ACIR intermediate file */ 00138 extern FILE *IR_File; /* SGIR intermediate file */ 00139 extern FILE *Ipa_File; /* IPA file */ 00140 extern FILE *Asm_File; /* Assembly file */ 00141 extern FILE *Obj_File; /* Relocatable object file */ 00142 extern FILE *Feedback_File; /* feedback file produced from prof */ 00143 extern FILE *Lib_File; /* Program library file */ 00144 extern FILE *Tim_File; /* Timing info file (usually trace) */ 00145 #ifdef MONGOOSE_BE 00146 #define MMAPPED_FILE (1) /* some components use mmap instead of 00147 stream i/o, in those cases the *_File 00148 will be set to MMAPPED_FILE to show that 00149 the file is active */ 00150 #endif /* MONGOOSE_BE */ 00151 00152 extern INT32 Num_Source_Files; 00153 00154 /* Output requested: */ 00155 extern BOOL Assembly; /* Assembly code */ 00156 extern BOOL Object_Code; /* Object code */ 00157 extern BOOL Symbol_Table_Out; /* Symbol table output (list or trace) */ 00158 extern BOOL Show_Progress; /* Report progress to stdout */ 00159 00160 #ifndef _NEW_SYMTAB 00161 /* Print symbol table for a program unit after a phase, if enabled: */ 00162 extern void Trace_ST ( 00163 INT phase, /* Phase after which to print */ 00164 char *pname, /* Print name of phase */ 00165 struct symtab *stab, /* Symtab to print */ 00166 INT32 bb_id /* basic block to print, or NULL */ 00167 ); 00168 #endif /* _NEW_SYMTAB */ 00169 00170 /* Print memory statistics, if enabled */ 00171 extern void Trace_Memory_Allocation ( 00172 INT phase, /* Phase after which we're printing */ 00173 const char *pname, /* Print name for phase */ 00174 #ifdef __cplusplus 00175 const ST *pu, 00176 #else 00177 const struct st *pu, /* Program unit to print */ 00178 #endif 00179 INT32 bb_id /* basic block to limit traces to */ 00180 ); 00181 00182 /* Clean up files after failure: */ 00183 extern void Cleanup_Files ( 00184 BOOL report /* Report errors which occur during file cleanup? */ 00185 /* This should generally be FALSE for failures. */ 00186 ,BOOL delete_doto /*delete the .o if created */ 00187 ); 00188 00189 /* Clean up and terminate program with given exit status: */ 00190 extern void Terminate ( INT status ); 00191 00192 /* ==================================================================== 00193 * 00194 * Back end process-specific data. 00195 * 00196 * ==================================================================== 00197 */ 00198 00199 #ifdef BACK_END 00200 00201 /* Front End process info: for consistency checking */ 00202 /* 00203 * The first two are set in the front end, and examined in the back end. 00204 * They are also put out to the ipa file. The third is only used in the 00205 * back end to store the Version number of the front end. (In the front 00206 * end, this information is stored in "Version". In the back end, 00207 * "Version" contains the version number of the *back* end. Those 00208 * variables are initialized in <machine>/<process>/version.c 00209 */ 00210 extern INT32 Fe_Process_Id; 00211 extern INT32 Fe_Process_Time; 00212 extern char *Fe_Version; 00213 extern BOOL Fe_Josie; /* Did .B come from a Josie front end? */ 00214 00215 /* Set FE process info -- defined in flags.c: */ 00216 extern void Set_Fe_Info ( INT32 pid, INT32 ptime, char *fe_version ); 00217 00218 /* Set source file name: */ 00219 extern void Set_File_Name ( char *name ); 00220 00221 /* Have the OP_REGCOPY operations been translated? */ 00222 extern BOOL Regcopies_Translated; 00223 00224 #else /* ! BACK_END */ 00225 00226 /* Our front ends are never Josie front ends: */ 00227 # define Fe_Josie FALSE 00228 00229 #endif /* BACK_END */ 00230 00231 #ifdef __cplusplus 00232 } 00233 #endif 00234 #endif /* glob_INCLUDED */
1.5.6