Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
glob.h
Go to the documentation of this file.
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 
00036 #ifndef glob_INCLUDED
00037 #define glob_INCLUDED
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 /* ====================================================================
00043  * ====================================================================
00044  *
00045  *
00046  * Revision history:
00047  *  15-Sep-89 - Original Version
00048  *  14-Mar-91 - Copied for TP/Muse
00049  *
00050  * Description:
00051  *
00052  * External interface to routines in the main Muse/TP compiler driver
00053  * module, basically very general purpose control and trace routines
00054  * which don't belong anywhere else.
00055  *
00056  * Also, external interface to global compiler data which doesn't
00057  * belong anywhere else.  See com/config.h for a general discussion
00058  * of where global configuration and option data declarations are
00059  * placed.
00060  *
00061  * All of this data is currently located in the process driver,
00062  * bedriver.c for the back end.
00063  *
00064  * NOTE:  This file is intended ultimately to be included in multiple
00065  * compiler processes.  We therefore attempt to distinguish between
00066  * items which are not process-specific and those which are, placing
00067  * the latter under the appropriate #ifdefs.
00068  *
00069  * ====================================================================
00070  * ====================================================================
00071  */
00072 
00073 /* Dummy struct definitions to keep prototypes happy: */
00074 struct bb;
00075 struct symtab;
00076 
00077 #ifdef __cplusplus
00078 struct ST;
00079 #else
00080 struct st;
00081 #endif
00082 
00083 /* ====================================================================
00084  *
00085  * Non-process-specific data (intended for both front ends and back
00086  * end).
00087  *
00088  * ====================================================================
00089  */
00090 
00091 extern char *Cur_PU_Name;       /* The current program unit name */
00092 extern char *Orig_PU_Name;      /* The original program unit name in source */
00093 
00094 /* Kind of the current program unit -- set similarly to Cur_PU_Name */
00095 typedef enum {
00096   PU_UNKNOWN,
00097   PU_FUNCTION,
00098   PU_SUBROUTINE,
00099   PU_PROGRAM,
00100   PU_BLOCKDATA,
00101   PU_MAX_KIND           /* used for bounds checking */
00102 } PU_KIND;
00103 extern PU_KIND Cur_PU_Kind;
00104 
00105 /* Current file names: */
00106 extern char *Src_File_Name;     /* Source file */
00107 extern char *Orig_Src_File_Name; /* Original source file passed to driver */
00108 extern char *Cpp_File_Name;     /* cpp-preprocessed file */
00109 extern char *Lst_File_Name;     /* Listing file */
00110 extern char *Err_File_Name;     /* Error file */
00111 extern char *Trc_File_Name;     /* Trace file */
00112 extern char *Tlog_File_Name;    /* Transformation log file */
00113 extern char *Irb_File_Name;     /* ACIR intermediate file */
00114 extern char *IR_File_Name;      /* SGIR intermediate file */
00115 extern char *Ipa_File_Name;     /* IPA file */
00116 extern char *Asm_File_Name;     /* Assembly file */
00117 extern char *Obj_File_Name;     /* Relocatable object file */
00118 extern char *Feedback_File_Name;/* feedback file produced from prof */
00119 #ifndef MONGOOSE_BE
00120 extern char *Lib_File_Name;     /* Program library file */
00121 #endif
00122 extern char *Lib_Lock_Name;     /* Program library lock file */
00123 extern char *DSTdump_File_Name; /* Dwarf intermediate (i.e. DST) dump file */
00124 extern char *Global_File_Name;  /* Global symbol table file */
00125 
00126 /* Current file handles if open, NULL otherwise: */
00127 extern FILE *Src_File;          /* Source file */
00128 extern FILE *Cpp_File;          /* cpp-preprocessed file */
00129 extern FILE *Lst_File;          /* Listing file */
00130 extern FILE *Err_File;          /* Error file */
00131 extern FILE *Trc_File;          /* Trace file */
00132 extern FILE *Tlog_File;         /* Transformation log file */
00133 extern FILE *Irb_File;          /* ACIR intermediate file */
00134 extern FILE *IR_File;           /* SGIR intermediate file */
00135 extern FILE *Ipa_File;          /* IPA file */
00136 extern FILE *Asm_File;          /* Assembly file */
00137 extern FILE *Obj_File;          /* Relocatable object file */
00138 extern FILE *Lib_File;          /* Program library file */
00139 extern FILE *Tim_File;          /* Timing info file (usually trace) */
00140 #ifdef MONGOOSE_BE
00141 #define MMAPPED_FILE (1)        /* some components use mmap instead of
00142                                    stream i/o, in those cases the *_File
00143                                    will be set to MMAPPED_FILE to show that
00144                                    the file is active  */
00145 #endif /* MONGOOSE_BE */
00146 
00147 extern INT32 Num_Source_Files;
00148 
00149 /* Output requested: */
00150 extern BOOL Assembly;           /* Assembly code */
00151 extern BOOL Object_Code;        /* Object code */
00152 extern BOOL Symbol_Table_Out;   /* Symbol table output (list or trace) */
00153 extern BOOL Show_Progress;      /* Report progress to stdout */
00154 
00155 /* Clean up files after failure: */
00156 extern void Cleanup_Files (
00157   BOOL report   /* Report errors which occur during file cleanup? */
00158                 /* This should generally be FALSE for failures.   */
00159   ,BOOL delete_doto /*delete the .o if created */
00160 );
00161 
00162 /* Clean up and terminate program with given exit status: */
00163 extern void Terminate ( INT status );
00164 
00165 /* ====================================================================
00166  *
00167  * Back end process-specific data.
00168  *
00169  * ====================================================================
00170  */
00171 
00172 #ifdef BACK_END
00173 
00174 /* Front End process info: for consistency checking */
00175 /* 
00176  * The first two are set in the front end, and examined in the back end.
00177  * They are also put out to the ipa file.  The third is only used in the 
00178  * back end to store the Version number of the front end.  (In the front
00179  * end, this information is stored in "Version".  In the back end, 
00180  * "Version" contains the version number of the *back* end.  Those
00181  * variables are initialized in <machine>/<process>/version.c
00182  */
00183 extern INT32 Fe_Process_Id;
00184 extern INT32 Fe_Process_Time;
00185 extern char *Fe_Version;
00186 extern BOOL Fe_Josie;   /* Did .B come from a Josie front end? */
00187 
00188 /* Set FE process info -- defined in flags.c: */
00189 extern void Set_Fe_Info ( INT32 pid, INT32 ptime, char *fe_version );
00190 
00191 /* Set source file name: */
00192 extern void Set_File_Name ( char *name );
00193 
00194 /* Have the OP_REGCOPY operations been translated? */
00195 extern BOOL Regcopies_Translated;
00196 
00197 #else /* ! BACK_END */
00198 
00199 /* Our front ends are never Josie front ends: */
00200 # define Fe_Josie       FALSE
00201 
00202 #endif /* BACK_END */
00203 
00204 #ifdef __cplusplus
00205 }
00206 #endif
00207 
00208 extern BOOL Compile_Upc;
00209 
00210 #endif /* glob_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines