Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
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 /* USMID: "\n@(#)5.0_pl/headers/cmd_line.h 5.6 09/27/99 15:43:51\n" */ 00038 00039 extern char *orig_cmd_line; 00040 00041 extern boolean enter_cmd_line_cc_define(char *, char *, boolean); 00042 extern token_values_type get_dir_token_from_str(char *); 00043 00044 00045 /****************************************\ 00046 |* Static data used within cmd_line.c. *| 00047 \****************************************/ 00048 static boolean accept_stream = FALSE; 00049 00050 static boolean set_debug_option = FALSE; 00051 static boolean set_aggress_option = FALSE; 00052 static boolean set_bottom_load_option = FALSE; 00053 static boolean set_eu_option = FALSE; 00054 static boolean set_ieeeconform_option = FALSE; 00055 static boolean set_i_option = FALSE; 00056 static boolean set_inlinefrom_option = FALSE; 00057 static boolean set_loop_align_option = FALSE; 00058 static boolean set_pattern_option = FALSE; 00059 static boolean set_pipeline_option = FALSE; 00060 static boolean set_recurrence_option = FALSE; 00061 static boolean set_round_option = FALSE; 00062 static boolean set_scalar_option = FALSE; 00063 static boolean set_source_form_option = FALSE; 00064 static boolean set_stream_option = FALSE; 00065 static boolean set_support_lvl_option = FALSE; 00066 static boolean set_task_option = FALSE; 00067 static boolean set_taskinner_option = FALSE; 00068 static boolean set_trunc_option = FALSE; 00069 static boolean set_vector_option = FALSE; 00070 static boolean set_vsearch_option = FALSE; 00071 static boolean set_zeroinc_option = FALSE; 00072 00073 # if defined(_ACCEPT_CMD_X) 00074 static boolean set_MPP_num_pes = FALSE; 00075 # endif 00076 00077 static boolean no_preprocessing = FALSE; 00078 00079 00080 /******************************************************************\ 00081 * The following are needed for validate_O_option. * 00082 \******************************************************************/ 00083 00084 char *scalar_lvl_str[] = { 00085 "scalar0", 00086 "scalar1", 00087 "scalar2", 00088 "scalar3" 00089 }; 00090 00091 char *stream_lvl_str[] = { 00092 "stream0", 00093 "stream1", 00094 "stream2", 00095 "stream3" 00096 }; 00097 00098 char *task_lvl_str[] = { 00099 "task0", 00100 "task1", 00101 "task2", 00102 "task3" 00103 }; 00104 00105 char *vector_lvl_str[] = { 00106 "vector0", 00107 "vector1", 00108 "vector2", 00109 "vector3" 00110 }; 00111 00112 00113 /******************************************************************************\ 00114 |* Default option values for install tool segldr "set" commands. *| 00115 |* This is to set default cmd line option values during the install. *| 00116 \******************************************************************************/ 00117 00118 /* for the -e options, 0 => -d, 1 => -e */ 00119 int cft90_dash_e_a_option = 0; /* -da */ 00120 int cft90_dash_e_i_option = 0; /* -di */ 00121 int cft90_dash_e_n_option = 0; /* -dn */ 00122 00123 int cft90_dash_e_p_option = 1; /* -ep */ 00124 int cft90_dash_e_r_option = 1; /* -er */ 00125 int cft90_dash_e_v_option = 0; /* -dv */ 00126 00127 00128 /* for -i option, value is 32 or 64 */ 00129 00130 /* eu is strong round (rounded integer divide) on non IEEE machines */ 00131 /* du is reciprical divide on IEEE machines. */ 00132 00133 # if defined(_TARGET_SV2) 00134 int cft90_dash_i_option = 32; /* -i 64 */ 00135 int cft90_dash_e_m_option = 1; /* -dm */ 00136 int cft90_dash_e_t_option = 0; /* -et */ 00137 int cft90_dash_e_u_option = 1; /* -du */ 00138 int cft90_dash_X_option = 1; /* -X1 */ 00139 int cft90_dash_a_dalign_option = 1; /* -a dalign */ 00140 # elif defined(_TARGET_OS_UNICOS) 00141 int cft90_dash_i_option = 64; /* -i 64 */ 00142 int cft90_dash_e_m_option = 0; /* -dm */ 00143 int cft90_dash_e_t_option = 1; /* -et */ 00144 int cft90_dash_e_u_option = 0; /* -du */ 00145 int cft90_dash_X_option = 1; /* -X1 */ 00146 int cft90_dash_a_dalign_option = 0; /* -a dalign */ 00147 # elif defined(_TARGET_OS_MAX) 00148 int cft90_dash_i_option = 64; /* -i 64 */ 00149 int cft90_dash_e_m_option = 0; /* -dm */ 00150 int cft90_dash_e_t_option = 0; /* -dt */ 00151 int cft90_dash_e_u_option = 0; /* -du */ 00152 int cft90_dash_X_option = 0; /* -Xn */ 00153 int cft90_dash_a_dalign_option = 0; /* -a dalign */ 00154 # elif (defined(_TARGET_OS_IRIX) || defined(_TARGET_OS_LINUX)) 00155 int cft90_dash_i_option = 32; /* -i 32 */ 00156 int cft90_dash_e_m_option = 1; /* -em */ 00157 int cft90_dash_e_t_option = 0; /* -dt */ 00158 int cft90_dash_e_u_option = 1; /* -eu */ 00159 int cft90_dash_X_option = 1; /* -X1 */ 00160 int cft90_dash_a_dalign_option = 0; /* -a dalign */ 00161 # else 00162 int cft90_dash_i_option = 32; /* -i 32 */ 00163 int cft90_dash_e_m_option = 0; /* -dm */ 00164 int cft90_dash_e_t_option = 0; /* -dt */ 00165 int cft90_dash_e_u_option = 1; /* -eu */ 00166 int cft90_dash_X_option = 1; /* -X1 */ 00167 int cft90_dash_a_dalign_option = 0; /* -a dalign */ 00168 # endif 00169 00170 /* for -m, value is -m value .... 0,1,2,3,4 */ 00171 int cft90_dash_m_option = 3; /* -m 3 */ 00172 00173 /* for -N option, value is 72 or 80 */ 00174 int cft90_dash_N_option = 72; /* -N 72 */ 00175 00176 /* the next four ... levels 0,1,2,3 */ 00177 00178 # if (defined(_TARGET_OS_IRIX) || defined(_TARGET_OS_LINUX)) 00179 int cft90_dash_O_bl_option = 0; 00180 int cft90_dash_O_fastint_option = 0; /* -O fastint */ 00181 int cft90_dash_O_fusion_option = 1; /* -O fusion */ 00182 int cft90_dash_O_ieeeconform_option = 0; 00183 int cft90_dash_O_jump_option = 0; 00184 int cft90_dash_O_loopalign_option = 0; 00185 int cft90_dash_O_scalar_option = 1; /* -O scalar1 */ 00186 int cft90_dash_O_split_option = 0; /* -O split */ 00187 int cft90_dash_O_support_option = 1; /* -O 1 */ 00188 int cft90_dash_O_task_option = 0; /* -O task0 */ 00189 int cft90_dash_O_taskinner_option = 1; /* -O taskinner */ 00190 int cft90_dash_O_threshold_option = 1; /* -O threshold */ 00191 int cft90_dash_O_unroll_option = 1; /* -O unroll0 */ 00192 int cft90_dash_O_vector_option = 0; /* -O vector0 */ 00193 int cft90_dash_O_vsearch_option = 0; /* -O vsearch */ 00194 # elif defined(_TARGET_OS_SOLARIS) 00195 int cft90_dash_O_bl_option = 0; 00196 int cft90_dash_O_fastint_option = 0; /* -O fastint */ 00197 int cft90_dash_O_ieeeconform_option = 0; 00198 int cft90_dash_O_fusion_option = 0; /* -O fusion */ 00199 int cft90_dash_O_jump_option = 0; 00200 int cft90_dash_O_loopalign_option = 0; 00201 int cft90_dash_O_scalar_option = 1; /* -O scalar1 */ 00202 int cft90_dash_O_split_option = 0; /* -O split */ 00203 int cft90_dash_O_support_option = 1; /* -O 1 */ 00204 int cft90_dash_O_task_option = 1; /* -O task1 */ 00205 int cft90_dash_O_taskinner_option = 1; /* -O taskinner */ 00206 int cft90_dash_O_threshold_option = 1; /* -O threshold */ 00207 int cft90_dash_O_unroll_option = 0; /* -O unroll0 */ 00208 int cft90_dash_O_vector_option = 0; /* -O vector0 */ 00209 int cft90_dash_O_vsearch_option = 0; /* -O vsearch */ 00210 # elif defined(_TARGET_OS_MAX) 00211 int cft90_dash_O_bl_option = 0; 00212 int cft90_dash_O_fastint_option = 0; /* -O fastint */ 00213 int cft90_dash_O_fusion_option = 0; /* -O fusion */ 00214 int cft90_dash_O_ieeeconform_option = 0; 00215 int cft90_dash_O_jump_option = 1; 00216 int cft90_dash_O_loopalign_option = 0; 00217 int cft90_dash_O_scalar_option = 2; /* -O scalar2 */ 00218 int cft90_dash_O_split_option = 1; /* -O split1 */ 00219 int cft90_dash_O_support_option = 2; /* -O 2 */ 00220 int cft90_dash_O_task_option = 0; /* -O task0 */ 00221 int cft90_dash_O_taskinner_option = 0; /* -O taskinner */ 00222 int cft90_dash_O_threshold_option = 0; /* -O threshold */ 00223 int cft90_dash_O_unroll_option = 0; /* -O unroll0 */ 00224 int cft90_dash_O_vector_option = 2; /* -O vector2 */ 00225 int cft90_dash_O_vsearch_option = 0; /* -O vsearch */ 00226 # elif defined(_TARGET_SV2) 00227 int cft90_dash_O_bl_option = 0; 00228 int cft90_dash_O_fastint_option = 1; /* -O fastint */ 00229 int cft90_dash_O_fusion_option = 0; /* -O fusion */ 00230 int cft90_dash_O_ieeeconform_option = 0; 00231 int cft90_dash_O_jump_option = 0; 00232 int cft90_dash_O_loopalign_option = 0; 00233 int cft90_dash_O_scalar_option = 2; /* -O scalar2 */ 00234 int cft90_dash_O_split_option = 0; /* -O split */ 00235 int cft90_dash_O_support_option = 2; /* -O 2 */ 00236 int cft90_dash_O_task_option = 0; /* -O task0 */ 00237 int cft90_dash_O_taskinner_option = 0; /* -O taskinner */ 00238 int cft90_dash_O_threshold_option = 1; /* -O threshold */ 00239 int cft90_dash_O_vector_option = 2; /* -O vector2 */ 00240 int cft90_dash_O_vsearch_option = 1; /* -O vsearch */ 00241 00242 /* Unroll level 2 is always on for PVP. It cannot be changed */ 00243 /* at the commandline. Directives are recognized. */ 00244 00245 int cft90_dash_O_unroll_option = 2; /* -O unroll2 */ 00246 00247 # elif defined(_TARGET_OS_UNICOS) 00248 int cft90_dash_O_bl_option = 0; 00249 int cft90_dash_O_fastint_option = 1; /* -O fastint */ 00250 int cft90_dash_O_fusion_option = 0; /* -O fusion */ 00251 int cft90_dash_O_ieeeconform_option = 0; 00252 int cft90_dash_O_jump_option = 0; 00253 int cft90_dash_O_loopalign_option = 0; 00254 int cft90_dash_O_scalar_option = 2; /* -O scalar2 */ 00255 int cft90_dash_O_split_option = 0; /* -O split */ 00256 int cft90_dash_O_support_option = 2; /* -O 2 */ 00257 int cft90_dash_O_task_option = 1; /* -O task1 */ 00258 int cft90_dash_O_taskinner_option = 0; /* -O taskinner */ 00259 int cft90_dash_O_threshold_option = 1; /* -O threshold */ 00260 int cft90_dash_O_vector_option = 2; /* -O vector2 */ 00261 int cft90_dash_O_vsearch_option = 1; /* -O vsearch */ 00262 00263 /* Unroll level 2 is always on for PVP. It cannot be changed */ 00264 /* at the commandline. Directives are recognized. */ 00265 00266 int cft90_dash_O_unroll_option = 2; /* -O unroll2 */ 00267 00268 # else 00269 int cft90_dash_O_bl_option = 0; 00270 int cft90_dash_O_fastint_option = 0; /* -O fastint */ 00271 int cft90_dash_O_ieeeconform_option = 0; 00272 int cft90_dash_O_fusion_option = 0; /* -O fusion */ 00273 int cft90_dash_O_jump_option = 0; 00274 int cft90_dash_O_loopalign_option = 0; 00275 int cft90_dash_O_scalar_option = 2; /* -O scalar2 */ 00276 int cft90_dash_O_split_option = 0; /* -O split1 */ 00277 int cft90_dash_O_support_option = 1; /* -O 2 */ 00278 int cft90_dash_O_task_option = 0; /* -O task0 */ 00279 int cft90_dash_O_taskinner_option = 0; /* -O taskinner */ 00280 int cft90_dash_O_threshold_option = 0; /* -O threshold */ 00281 int cft90_dash_O_unroll_option = 0; /* -O unroll0 */ 00282 int cft90_dash_O_vector_option = 0; /* -O vector0 */ 00283 int cft90_dash_O_vsearch_option = 0; /* -O vsearch */ 00284 # endif 00285 00286 00287 /* These are available on all platforms. */ 00288 00289 /* the rest are 0 => off, 1 => on */ 00290 int cft90_dash_O_aggress_option = 0; 00291 int cft90_dash_O_overindex_option = 0; 00292 int cft90_dash_O_pattern_option = 1; /* -O pattern */ 00293 int cft90_dash_O_recurrence_option = 1; 00294 int cft90_dash_O_zeroinc_option = 0; 00295 00296 int cft90_dash_G_debug_option = 4; /* No_Debugging */