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 /* ==================================================================== 00037 * ==================================================================== 00038 * 00039 * Module: config_clist.h 00040 * $Revision: 1.1.1.1 $ 00041 * $Date: 2005/10/21 19:00:00 $ 00042 * $Author: marcel $ 00043 * $Source: /proj/osprey/CVS/open64/osprey1.0/common/com/config_clist.h,v $ 00044 * 00045 * Revision history: 00046 * 25-Mar-97 - Original Version 00047 * 00048 * Description: 00049 * 00050 * Define the external interface to the internal flags representing the 00051 * -CLIST group options. It is a single struct, so that addition of 00052 * flags for new options does not require additions to the be Exported 00053 * file. Since these options do not change on a per region basis, 00054 * there is no need for push/pop operations like other groups (such 00055 * as -LNO) support. 00056 * 00057 * NOTE: Only the standard group option reader, and routines in the 00058 * associated file config_clist.c, should modify the structs declared 00059 * here. By following this discipline, leaving a few undefined flags 00060 * at the end of the struct, and adding new flags there, we can avoid 00061 * serious version incompatibilities between be.so and its clients. 00062 * 00063 * ==================================================================== 00064 * 00065 * To add a new option: 00066 * 00067 * (On conversion from the old CLIST implementation, I tried to use 00068 * naming which was mostly like what had been used before, but 00069 * consistent. The instructions below reflect the results.) 00070 * 00071 * 1) In the CLIST_FLAGS options struct defined below, add a field to 00072 * receive the new option value. If you need a flag indicating 00073 * whether the option was set explicitly on the command line, add 00074 * a BOOL for that as well, with an appended "_set" in its name. 00075 * (You might also need another field if the option will be used 00076 * in a different form after configuration, i.e. the option value 00077 * is a string that is converted to a number. If so, add another 00078 * field.) 00079 * 00080 * The fields are starting out in alphabetical order by option 00081 * name. When adding new ones, keep in mind that adding them in 00082 * the middle will create a required correspondence between the 00083 * new be.so and lno.so (for purposes of using the later options). 00084 * That may be alright, but if you want to avoid it, add the new 00085 * fields just before the buffer at the end (and you can move 00086 * them into place later when it doesn't matter, if you care). 00087 * 00088 * 2) Below the CLIST_FLAGS definition are #defines for the 00089 * "CLIST_Option_Name" pseudo-variables that everyone will use to 00090 * reference them. Add #defines for your new ones. Note that 00091 * they all have CLIST_ prefixes. 00092 * 00093 * 3) There is only one instances of CLIST_FLAGS in config_clist.c. 00094 * We do not support pushing/popping of flag values based on 00095 * region boundaries (will we ever want to?). 00096 * 00097 * 4) The option group descriptor is also in config_clist.c. Add your 00098 * new option there. 00099 * 00100 * ==================================================================== 00101 * ==================================================================== 00102 */ 00103 00104 #ifndef config_clist_INCLUDED 00105 #define config_clist_INCLUDED 00106 00107 #ifdef _KEEP_RCS_ID 00108 /*REFERENCED*/ 00109 static char *config_clist_h_rcs_id = "$Source: /proj/osprey/CVS/open64/osprey1.0/common/com/config_clist.h,v $ $Revision: 1.1.1.1 $"; 00110 #endif /* _KEEP_RCS_ID */ 00111 00112 #ifdef __cplusplus 00113 extern "C" { 00114 #endif /* __cplusplus */ 00115 00116 /* ==================================================================== 00117 * 00118 * -CLIST: option group 00119 * 00120 * Define the global structure containing -CLIST option group flags. 00121 * 00122 * WARNING: Most of the fields in this struct must be addressable by 00123 * an option group descriptor -- hence BOOL instead of mBOOL. 00124 * 00125 * ==================================================================== 00126 */ 00127 00128 00129 typedef struct clist_flags { 00130 const char *orig_filename; /* Input (original source) file */ 00131 const char *doth_filename; /* C output (transformed) header file */ 00132 const char *dotc_filename; /* C output (transformed) body file */ 00133 const char *loc_filename; /* source-to-source location mapping file */ 00134 BOOL enabled; /* Invoke whirl2f.so */ 00135 BOOL verbose; /* Show translation information */ 00136 BOOL no_pragmas; /* By default, emit pragmas */ 00137 BOOL emit_adims; /* Emit comments array dimensions */ 00138 BOOL emit_prefetch; /* Emit comments for prefetches */ 00139 BOOL emit_all_regions;/* Emit cmplr-generated regions */ 00140 BOOL emit_linedirs; /* Emit preproc line-directives */ 00141 BOOL emit_nested_pus; /* Emit code for nested PUs */ 00142 BOOL emit_frequency; /* Emit feedback frequency info */ 00143 BOOL emit_cgtag; /* Tag loops with loop_info address */ 00144 BOOL lower_ftn; /* Lower fortran intermediate */ 00145 BOOL emit_omp; /* force OMP spellings for pragmas */ 00146 INT32 line_length; /* 'zero' means: use the default */ 00147 00148 /* This buffer area allows references to new fields to be added in 00149 * later revisions, from other DSOs, without requiring a new be.so 00150 * or running the risk of referencing illegal data. Assuming that 00151 * the buffer is initialized to zeroes, any such references will 00152 * simply pick up FALSE values (for the Booleans): 00153 */ 00154 INT32 buffer[16]; /* Buffer space -- initialize to FALSE */ 00155 } CLIST_FLAGS; 00156 00157 00158 /* ==================================================================== 00159 * 00160 * -CLIST: option group 00161 * 00162 * Global data "objects" and manipulation functions. 00163 * 00164 * ==================================================================== 00165 */ 00166 00167 /* This is always the current set of option values: */ 00168 extern CLIST_FLAGS *Current_CLIST; 00169 00170 /* Define pseudo-variables for general usage: */ 00171 #define CLIST_orig_filename Current_CLIST->orig_filename 00172 #define CLIST_doth_filename Current_CLIST->doth_filename 00173 #define CLIST_dotc_filename Current_CLIST->dotc_filename 00174 #define CLIST_loc_filename Current_CLIST->loc_filename 00175 #define CLIST_enabled Current_CLIST->enabled 00176 #define CLIST_verbose Current_CLIST->verbose 00177 #define CLIST_no_pragmas Current_CLIST->no_pragmas 00178 #define CLIST_emit_adims Current_CLIST->emit_adims 00179 #define CLIST_emit_prefetch Current_CLIST->emit_prefetch 00180 #define CLIST_emit_all_regions Current_CLIST->emit_all_regions 00181 #define CLIST_emit_linedirs Current_CLIST->emit_linedirs 00182 #define CLIST_emit_nested_pus Current_CLIST->emit_nested_pus 00183 #define CLIST_emit_frequency Current_CLIST->emit_frequency 00184 #define CLIST_emit_cgtag Current_CLIST->emit_cgtag 00185 #define CLIST_lower_ftn Current_CLIST->lower_ftn 00186 #define CLIST_emit_omp Current_CLIST->emit_omp 00187 #define CLIST_line_length Current_CLIST->line_length 00188 00189 00190 #ifdef __cplusplus 00191 } 00192 #endif /* __cplusplus */ 00193 00194 #endif /* config_clist_INCLUDED */
1.5.6