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 * ==================================================================== 00038 * 00039 * 00040 * Revision history: 00041 * 08-Sep-94 - Original Version (wodriver.c) 00042 * 15-Aug-96 - config_opt.c extracted from config.c 00043 * 00044 * Description: 00045 * 00046 * Configure the -OPT group (included in config.cxx). 00047 * Used from front ends, ipl, inline, ipa (ld), and be. 00048 * 00049 * ==================================================================== 00050 * ==================================================================== 00051 */ 00052 00053 #ifdef _KEEP_RCS_ID 00054 /*REFERENCED*/ 00055 #endif /* _KEEP_RCS_ID */ 00056 00057 /* This file is included in config.c, so it doesn't need its own set of 00058 * standard includes -- only the following: 00059 */ 00060 #include "config_opt.h" 00061 extern BOOL WOPT_Enable_Goto; /* In case config_wopt.h is later */ 00062 00063 /* ==================================================================== 00064 * 00065 * Global flag variables which reflect the -OPT group options. 00066 * 00067 * ==================================================================== 00068 */ 00069 00070 /***** Optimization Warning Messages *****/ 00071 BOOL Show_OPT_Warnings = FALSE; /* Display OPT warning messages */ 00072 00073 /***** Aliasing control *****/ 00074 OPTION_LIST *Alias_Option = NULL; 00075 BOOL Alias_Pointer_Parms = TRUE; /* Parms ptr indep? */ 00076 BOOL Alias_Pointer_Cray = FALSE; /* Cray pointer semantics? */ 00077 BOOL Alias_Pointer_Types = FALSE; /* Ptrs to distinct basic types indep? */ 00078 BOOL Alias_Not_In_Union = FALSE; /* Ptrs point to non-union types */ 00079 BOOL Alias_Pointer_Strongly_Typed = FALSE; /* Ptrs to distinct types indep? */ 00080 BOOL Alias_Pointer_Named_Data = FALSE; /* No pointers to named data? */ 00081 BOOL Alias_Pointer_Restricted = FALSE; /* *p and *q not aliased? */ 00082 BOOL Alias_Pointer_Disjoint = FALSE; /* **p and **q not aliased? */ 00083 BOOL Alias_Common_Scalar = FALSE; /* Distinguish scalar from array */ 00084 /* We will normally default Alias_Pointer_Types to TRUE, but can't 00085 * for K&R C. This option is set by the driver for K&R C compilations 00086 * for use in overriding the default -- not intended for user use. 00087 */ 00088 static BOOL Alias_Pointer_Cckr = FALSE; /* -cckr default rules? */ 00089 static BOOL Alias_Pointer_Types_Set = FALSE; /* alias=typed set? */ 00090 static BOOL Alias_Not_In_Union_Set = FALSE; /* alias=nounion set? */ 00091 BOOL Alias_F90_Pointer_Unaliased = FALSE; /* Are F90 pointers unaliased? */ 00092 00093 /***** Alignment control *****/ 00094 BOOL Align_Object = TRUE; /* Try to improve alignment of objects */ 00095 BOOL Align_Padding = FALSE; /* Pad objects to natural alignment */ 00096 00097 /* These alignment options are only relevant in the back end: */ 00098 #ifdef BACK_END 00099 # define ALIGN_INSTS &Align_Instructions 00100 #else 00101 # define ALIGN_INSTS &Ignore_Int 00102 #endif 00103 00104 /***** Constant folding (simplifier) options *****/ 00105 BOOL Enable_Cfold_Aggressive = FALSE; /* Complex constant folding? */ 00106 static BOOL Cfold_Aggr_Set = FALSE; /* ... option seen? */ 00107 BOOL Enable_Cfold_Reassociate = FALSE; /* Re-association allowed? */ 00108 static BOOL Cfold_Reassoc_Set = FALSE; /* ... option seen? */ 00109 BOOL Enable_Cfold_Intrinsics = FALSE; /* Intrinsic constant folding? */ 00110 BOOL Cfold_Intrinsics_Set = FALSE; /* ... option seen? */ 00111 BOOL CIS_Allowed = TRUE; /* combine sin(x) and cos(x) to cis(x) */ 00112 static BOOL CIS_Set = FALSE; /* ... option seen? */ 00113 BOOL Enable_CVT_Opt= FALSE; /* Remove useless convert operators */ 00114 BOOL Enable_CVT_Opt_Set= FALSE; /* ... option seen? */ 00115 BOOL Optimize_CVTL_Exp = FALSE; /* Optimize expansion of CVTL operators */ 00116 BOOL Div_Split_Allowed = FALSE; /* change a/b --> a*1/b ? */ 00117 static BOOL Div_Split_Set = FALSE; /* ... option seen? */ 00118 BOOL Fast_Exp_Allowed = FALSE; /* Avoid exp() calls? */ 00119 static BOOL Fast_Exp_Set = FALSE; /* ... option seen? */ 00120 BOOL Fast_IO_Allowed = FALSE; /* Fast printf/scanf/printw ? */ 00121 static BOOL Fast_IO_Set = FALSE; /* ... option seen? */ 00122 BOOL Fast_Sqrt_Allowed = FALSE; /* sqrt(x) --> x * rsqrt(x) ? */ 00123 static BOOL Fast_Sqrt_Set = FALSE; /* ... option seen? */ 00124 BOOL Rsqrt_Allowed = FALSE; /* generate RSQRT instruction? */ 00125 static BOOL Rsqrt_Set = FALSE; /* ... option seen? */ 00126 BOOL Recip_Allowed; /* generate RECIP instruction? */ 00127 static BOOL Recip_Set = FALSE; /* ... option seen? */ 00128 BOOL Simp_Fold_Unsigned_Relops = FALSE; /* Constant fold unsigned relops */ 00129 static BOOL Simp_Fold_Unsigned_Relops_Set = FALSE; 00130 /* Allow folding which might cause error if overflow occurs? */ 00131 BOOL Simp_Unsafe_Relops = FALSE; 00132 static BOOL Simp_Unsafe_Relops_Set = FALSE; 00133 BOOL Simp_Canonicalize = TRUE; /* Simplifier canonicalization */ 00134 BOOL Enable_WN_Simp = TRUE; /* Use the WHIRL simplifier */ 00135 static BOOL Enable_WN_Simp_Set=FALSE; /* ... option seen? */ 00136 BOOL GCM_Eager_Null_Ptr_Deref = FALSE; /* allow speculation past NULL ptr 00137 test. assumes page zero as 00138 readable */ 00139 BOOL GCM_Eager_Null_Ptr_Deref_Set=FALSE; /* ... option seen? */ 00140 BOOL GCM_Speculative_Ptr_Deref= TRUE; /* allow load speculation of a memory 00141 reference that differs by a small 00142 offset from some reference location */ 00143 BOOL GCM_Speculative_Ptr_Deref_Set=FALSE; /* ... option seen? */ 00144 00145 /***** Limits on optimization *****/ 00146 #define DEFAULT_OLIMIT 3000 00147 #define DEFAULT_O3_OLIMIT 4000 /* allow more time for -O3 compiles */ 00148 #define MAX_OLIMIT INT32_MAX 00149 INT32 Olimit = DEFAULT_OLIMIT; 00150 static BOOL Olimit_Set = FALSE; 00151 BOOL Olimit_opt = FALSE; /* use regions? */ 00152 static BOOL Olimit_opt_Set = FALSE; 00153 00154 /* Debugging Flags for All Optimizations */ 00155 static OPTION_LIST *Opt_Skip = NULL; /* Raw list */ 00156 SKIPLIST *Optimization_Skip_List = NULL; /* Processed list */ 00157 static OPTION_LIST *Region_Skip = NULL; /* Raw list */ 00158 SKIPLIST *Region_Skip_List = NULL; /* Processed list */ 00159 00160 /***** Miscellaneous -OPT: group options *****/ 00161 char *Ofast = NULL; /* -OPT:Ofast platform name */ 00162 BOOL OPT_Pad_Common = FALSE; /* Do internal common block padding? */ 00163 BOOL OPT_Reorg_Common = FALSE; /* Do common block reorganization (split)? */ 00164 BOOL OPT_Reorg_Common_Set = FALSE; /* ... option seen? */ 00165 BOOL OPT_Unroll_Analysis = TRUE; /* Enable unroll limitations? */ 00166 BOOL OPT_Unroll_Analysis_Set = FALSE; /* ... option seen? */ 00167 BOOL OPT_Lower_Speculate = FALSE; /* speculate CAND/CIOR */ 00168 BOOL OPT_Lower_Treeheight = FALSE; /* reassociate commutative ops */ 00169 static BOOL OPT_Lower_Treeheight_Set = FALSE; 00170 BOOL OPT_Inline_Divide = TRUE; /* inline divide sequences */ 00171 static BOOL OPT_Inline_Divide_Set = FALSE; 00172 BOOL OPT_Space = FALSE; /* various text space optimizations */ 00173 BOOL Early_MP_Processing = FALSE; /* Do mp lowerering before lno/preopt */ 00174 BOOL Implied_Do_Io_Opt = TRUE; /* Do implied-do loop opt for I/O */ 00175 BOOL Cray_Ivdep=FALSE; /* Use Cray meaning for Ivdep */ 00176 BOOL Liberal_Ivdep=FALSE; /* Use liberal meaning for Ivdep */ 00177 BOOL Inhibit_EH_opt=FALSE; /* Don't remove EH regions without calls */ 00178 BOOL Allow_wrap_around_opt = TRUE; 00179 static BOOL Allow_wrap_around_opt_Set = FALSE; /* ... option seen? */ 00180 BOOL Enable_GOT_Call_Conversion = FALSE; /* %call16 -> %got_disp */ 00181 static BOOL Enable_GOT_Call_overridden = FALSE; /* ... option seen? */ 00182 BOOL OPT_recompute_addr_flags = FALSE; /* recompute addr saved */ 00183 BOOL OPT_IPA_addr_analysis = TRUE; /* enable the use of IPA addr analysis result */ 00184 BOOL Delay_U64_Lowering = TRUE;/* Delay unsigned 64-bit lowering to after wopt */ 00185 BOOL OPT_shared_memory = TRUE; // assume use of shared memory 00186 /* Put each function in its own text section */ 00187 BOOL Section_For_Each_Function = FALSE; 00188 BOOL Inline_Intrinsics_Early=FALSE; /* Inline intrinsics just after VHO */ 00189 BOOL Enable_extract_compose=TRUE; /* This is also forced off for MIPS and IA32 in 00190 config_targ.cxx */ 00191 #ifdef __linux__ 00192 BOOL Enable_WFE_DFE = FALSE; 00193 #endif /* __linux __ */ 00194 00195 00196 /***** Instrummentation Related Options *****/ 00197 INT32 Instrumentation_Phase_Num = 0; 00198 BOOL Instrumentation_Enabled = FALSE; 00199 UINT32 Instrumentation_Actions = 0; 00200 BOOL Instrumentation_Unique_Output = FALSE; // always create unique output 00201 OPTION_LIST *Feedback_Option = NULL; 00202 00203 /***** Obsolete options *****/ 00204 static BOOL Fprop_Limit_Set = FALSE; 00205 00206 /* ==================================================================== 00207 * 00208 * Descriptor for the -OPT option group. 00209 * 00210 * ==================================================================== 00211 */ 00212 00213 /* Optimization options: */ 00214 static OPTION_DESC Options_OPT[] = { 00215 { OVK_BOOL, OV_VISIBLE, TRUE, "warning", "warn", 00216 0, 0, 0, &Show_OPT_Warnings, NULL, 00217 "Control interpretation of possible variable aliasing" }, 00218 00219 { OVK_LIST, OV_VISIBLE, TRUE, "alias", "alia", 00220 0, 0, 0, &Alias_Option, NULL, 00221 "Control interpretation of possible variable aliasing" }, 00222 00223 { OVK_INT32, OV_SHY, TRUE, "align_instructions", "align_i", 00224 16, 0, 1024, ALIGN_INSTS, NULL, 00225 "Align subprogram entries and loops by given byte count" }, 00226 00227 { OVK_BOOL, OV_INTERNAL, TRUE, "align_object", "align_o", 00228 0, 0, 0, &Align_Object, NULL, 00229 "Allow realignment of objects to improve memory accesses" }, 00230 00231 { OVK_BOOL, OV_INTERNAL, TRUE, "align_padding", "align_p", 00232 0, 0, 0, &Align_Padding, NULL, 00233 "Allow padding of objects to improve memory alignment" }, 00234 00235 { OVK_INT32, OV_INTERNAL, TRUE, "bblength", "bb", 00236 DEF_BBLENGTH, MIN_BBLENGTH, MAX_BBLENGTH, &Split_BB_Length, NULL, 00237 "Restrict BB length by splitting longer BBs" }, 00238 00239 { OVK_BOOL, OV_VISIBLE, TRUE, "cis", "cis", 00240 0, 0, 0, &CIS_Allowed, &CIS_Set, 00241 "Convert sin/cos pairs into a single call" }, 00242 00243 { OVK_INT32, OV_VISIBLE, TRUE, "const_copy_limit", "const", 00244 DEF_CONST_COPY_TN_CNT, 0, INT32_MAX,&Const_Copy_TN_CNT, NULL, 00245 "Avoid constant/copy propagation if there are more than n expressions" }, 00246 00247 { OVK_BOOL, OV_VISIBLE, TRUE, "cray_ivdep", "cray_ivdep", 00248 0, 0, 0, &Cray_Ivdep, NULL, 00249 "IVDEP pragma/directive break parallelism-inhibiting dependencies" }, 00250 00251 { OVK_BOOL, OV_INTERNAL, TRUE, "cvt", "cvt", 00252 0, 0, 0, &Enable_CVT_Opt, &Enable_CVT_Opt_Set, 00253 "Optimize conversion operators" }, 00254 00255 { OVK_BOOL, OV_VISIBLE, TRUE, "div_split", "div_split", 00256 0, 0, 0, &Div_Split_Allowed, &Div_Split_Set , 00257 "Allow splitting of a/b into a*recip(b)" }, 00258 00259 { OVK_BOOL, OV_INTERNAL, TRUE, "early_mp", "early_mp", 00260 0, 0, 0, &Early_MP_Processing, NULL, 00261 "Lower before LNO" }, 00262 00263 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_bit_intrinsics", "fast_bit", 00264 0, 0, 0, &Fast_Bit_Allowed, &Fast_Bit_Set, 00265 "Don't check bit count range for Fortran bit intrinsics" }, 00266 00267 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_complex", "fast_co", 00268 0, 0, 0, &Fast_Complex_Allowed, &Fast_Complex_Set, 00269 "Use fast algorithms with limited domains for complex norm and divide" }, 00270 00271 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_exp", "fast_ex", 00272 0, 0, 0, &Fast_Exp_Allowed, &Fast_Exp_Set, 00273 "Use multiplication and square root for exp() where faster" }, 00274 00275 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_io", "fast_io", 00276 0, 0, 0, &Fast_IO_Allowed, &Fast_IO_Set, 00277 "Inline some C I/O routines if __INLINE_INTRINSICS is defined" }, 00278 00279 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_nint", "fast_nint", 00280 0, 0, 0, &Fast_NINT_Allowed, &Fast_NINT_Set, 00281 "Use IEEE rounding instead of Fortran rounding for NINT intrinsics" }, 00282 00283 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_sqrt", "fast_sq", 00284 0, 0, 0, &Fast_Sqrt_Allowed, &Fast_Sqrt_Set, 00285 "May use x*rsqrt(x) for sqrt(x) on machines where faster" }, 00286 00287 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_trunc", "fast_trunc", 00288 0, 0, 0, &Fast_trunc_Allowed, &Fast_trunc_Set, 00289 "Inline NINT and related intrinsics with limited-domain algorithm" }, 00290 00291 { OVK_BOOL, OV_SHY, TRUE, "fold_aggressive", "fold_ag", 00292 0, 0, 0, &Enable_Cfold_Aggressive, &Cfold_Aggr_Set, 00293 "Allow aggressive expression folding optimizations" }, 00294 00295 { OVK_BOOL, OV_SHY, TRUE, "fold_intrinsics", "fold_i", 00296 0, 0, 0, &Enable_Cfold_Intrinsics, &Cfold_Intrinsics_Set, 00297 "Allow expression folding of Fortran intrinsic calls" }, 00298 00299 { OVK_BOOL, OV_VISIBLE, TRUE, "fold_reassociate", "fold_r", 00300 0, 0, 0, &Enable_Cfold_Reassociate, &Cfold_Reassoc_Set, 00301 "Allow optimizations which reassociate floating point operators" }, 00302 00303 { OVK_BOOL, OV_VISIBLE, TRUE, "fold_unsafe_relops", "fold_unsafe_relops", 00304 0, 0, 0, &Simp_Unsafe_Relops, &Simp_Unsafe_Relops_Set, 00305 "Allow relational operator folding which may cause integer overflow" }, 00306 00307 { OVK_BOOL, OV_VISIBLE, TRUE, "fold_unsigned_relops", "fold_unsigned", 00308 0, 0, 0, &Simp_Fold_Unsigned_Relops, &Simp_Fold_Unsigned_Relops_Set, 00309 "Allow relop folding which may cause unsigned integer overflow" }, 00310 00311 { OVK_BOOL, OV_VISIBLE, TRUE, "got_call_conversion", "got_call", 00312 0, 0, 0, &Enable_GOT_Call_Conversion, &Enable_GOT_Call_overridden, 00313 "Allow function address loads to be moved out of loops" }, 00314 00315 { OVK_BOOL, OV_INTERNAL, TRUE, "goto_conversion", "goto", 00316 0, 0, 0, &WOPT_Enable_Goto, NULL, 00317 "Enable conversion of GOTO to more structured constructs" }, 00318 00319 { OVK_INT32, OV_VISIBLE, TRUE, "IEEE_arithmetic", "IEEE_a", 00320 1, 1, 3, &IEEE_Arithmetic, &IEEE_Arith_Set, 00321 "Level of conformance to IEEE-754 arithmetic rules" }, 00322 00323 { OVK_BOOL, OV_SHY, TRUE, "IEEE_comparisons", "IEEE_c", 00324 0, 0, 0, &Force_IEEE_Comparisons, NULL, 00325 "Force conforming operations on IEEE-754 NaN and Inf values" }, 00326 00327 { OVK_BOOL, OV_VISIBLE, TRUE, "IEEE_NaN_Inf", "IEEE_N", 00328 0, 0, 0, &Force_IEEE_Comparisons, NULL, 00329 "Force conforming operations on IEEE-754 NaN and Inf values" }, 00330 00331 { OVK_BOOL, OV_SHY, TRUE, "implied_do_io_opt", NULL, 00332 1, 0, 0, &Implied_Do_Io_Opt, NULL, 00333 "Optimize implied DO I/O to minimize calls in Fortran" }, 00334 00335 { OVK_BOOL, OV_VISIBLE, TRUE, "inline_intrinsics", "inline_intr", 00336 0, 0, 0, &Inline_Intrinsics_Allowed, &Inline_Intrinsics_Set, 00337 "Allow inlining of Fortran intrinsic functions" }, 00338 00339 { OVK_BOOL, OV_SHY, TRUE, "ldx", "ldx", 00340 0, 0, 0, &Indexed_Loads_Allowed, NULL, 00341 "Allow generation of indexed load/store operations" }, 00342 00343 { OVK_BOOL, OV_VISIBLE, TRUE, "liberal_ivdep", "liberal_ivdep", 00344 0, 0, 0, &Liberal_Ivdep, NULL, 00345 "IVDEP pragmas/directives break all dependencies within an array" }, 00346 00347 { OVK_BOOL, OV_VISIBLE, TRUE, "Inhibit_EH_opt", "Inhibit_EH_opt", 00348 0, 0, 0, &Inhibit_EH_opt, NULL, 00349 "Don't remove EH regions without calls" }, 00350 00351 { OVK_BOOL, OV_INTERNAL, TRUE, "nary", "nary", 00352 0, 0, 0, &Enable_NaryExpr, &Enable_NaryExpr_Set, 00353 "Allow N-ary tree height reduction of MADDs" }, 00354 00355 { OVK_NAME, OV_SHY, FALSE, "Ofast", "Ofast", 00356 0, 0, 0, &Ofast, NULL, 00357 "Tailor options for performance on current target" }, 00358 00359 { OVK_INT32, OV_VISIBLE, FALSE, "Olimit", "Ol", 00360 DEFAULT_OLIMIT, 0, MAX_OLIMIT, &Olimit, &Olimit_Set, 00361 "Limit size of subprograms which will be optimized" }, 00362 00363 { OVK_BOOL, OV_INTERNAL, FALSE, "Olimit_opt", "Olimit_o", 00364 0, 0, 0, &Olimit_opt, &Olimit_opt_Set, 00365 "Use regions if Olimit exceeded" }, 00366 00367 { OVK_BOOL, OV_VISIBLE, TRUE, "pad_common", "pad", 00368 0, 0, 0, &OPT_Pad_Common, NULL, 00369 "Force padding of COMMON blocks to improve cache behavior" }, 00370 00371 { OVK_BOOL, OV_INTERNAL, TRUE, "ptr_opt", "ptr_o", 00372 0, 0, 0, &Ptr_Opt_Allowed, NULL, 00373 "Allow treatment of pointers as arrays when possible in C" }, 00374 00375 { OVK_BOOL, OV_INTERNAL, FALSE, "rail", "rail", 00376 0, 0, 0, &Regions_Around_Inner_Loops, NULL, 00377 "Insert regions around inner loops" }, 00378 00379 { OVK_BOOL, OV_INTERNAL, FALSE, "rbi", "rbi", 00380 0, 0, 0, &Region_Boundary_Info, NULL, 00381 "Create region boundary information" }, 00382 00383 { OVK_BOOL, OV_VISIBLE, TRUE, "recip", "recip", 00384 0, 0, 0, &Recip_Allowed, &Recip_Set, 00385 "Allow use of recip instruction" }, 00386 00387 { OVK_LIST, OV_SHY, FALSE, "region_skip_equal", "region_skip_e", 00388 0, 0, 4096, &Region_Skip, NULL, 00389 "Skip optimization of this region" }, 00390 00391 { OVK_LIST, OV_SHY, FALSE, "region_skip_before", "region_skip_b", 00392 0, 0, 4096, &Region_Skip, NULL, 00393 "Skip optimization of regions before this one" }, 00394 00395 { OVK_LIST, OV_SHY, FALSE, "region_skip_after", "region_skip_a", 00396 0, 0, 4096, &Region_Skip, NULL, 00397 "Skip optimization of regions after this one" }, 00398 00399 { OVK_BOOL, OV_VISIBLE, TRUE, "reorg_common", "reorg", 00400 0, 0, 0, &OPT_Reorg_Common, &OPT_Reorg_Common_Set, 00401 "Allow splitting of COMMON blocks to improve cache behavior" }, 00402 00403 { OVK_BOOL, OV_VISIBLE, FALSE, "procedure_reorder", "procedure_reorder", 00404 0, 0, 0, &Section_For_Each_Function, NULL, 00405 "Place each function in its own .text section" }, 00406 00407 { OVK_INT32, OV_VISIBLE, TRUE, "roundoff", "ro", 00408 2, 0, 3, &Roundoff_Level, &Roundoff_Set, 00409 "Level of acceptable departure from source roundoff semantics" }, 00410 00411 { OVK_BOOL, OV_VISIBLE, TRUE, "rsqrt", "rsqrt", 00412 0, 0, 0, &Rsqrt_Allowed, &Rsqrt_Set, 00413 "Allow use of rsqrt instruction" }, 00414 00415 { OVK_BOOL, OV_VISIBLE, TRUE, "shared_memory", "shared_mem", 00416 0, 0, 0, &OPT_shared_memory, NULL, 00417 "Assume use of shared memory" }, 00418 00419 { OVK_LIST, OV_SHY, FALSE, "skip_equal", "skip_e", 00420 0, 0, 4096, &Opt_Skip, NULL, 00421 "Skip optimization of this subprogram" }, 00422 00423 { OVK_LIST, OV_SHY, FALSE, "skip_before", "skip_b", 00424 0, 0, 4096, &Opt_Skip, NULL, 00425 "Skip optimization of subprograms before this one" }, 00426 00427 { OVK_LIST, OV_SHY, FALSE, "skip_after", "skip_a", 00428 0, 0, 4096, &Opt_Skip, NULL, 00429 "Skip optimization of subprograms after this one" }, 00430 00431 { OVK_BOOL, OV_VISIBLE, FALSE, "space", "sp", 00432 0, 0, 0, &OPT_Space, NULL, 00433 "Bias optimizations to minimize code space" }, 00434 00435 { OVK_BOOL, OV_INTERNAL, TRUE, "speculate", "", 00436 0, 0, 0, &OPT_Lower_Speculate, NULL, 00437 "Allow speculation for CAND/COR operators" }, 00438 00439 { OVK_BOOL, OV_INTERNAL, TRUE, "speculative_null_ptr_deref","", 00440 0, 0, 0, &GCM_Eager_Null_Ptr_Deref, &GCM_Eager_Null_Ptr_Deref_Set, 00441 "Allow speculation of loads above NULL pointer tests" }, 00442 00443 { OVK_BOOL, OV_INTERNAL, TRUE, "speculative_ptr_deref","", 00444 0, 0, 0, &GCM_Speculative_Ptr_Deref, &GCM_Speculative_Ptr_Deref_Set, 00445 "Allow speculative loads of memory locations that differ by a small offset from some referenced memory location" }, 00446 00447 { OVK_BOOL, OV_VISIBLE, TRUE, "swp", "swp", 00448 0, 0, 0, &Enable_SWP, &Enable_SWP_overridden, 00449 "Enable software pipelining" }, 00450 00451 { OVK_BOOL, OV_INTERNAL, TRUE, "treeheight", "", 00452 0, 0, 0, &OPT_Lower_Treeheight, &OPT_Lower_Treeheight_Set, 00453 "Allow tree height reduction" }, 00454 00455 { OVK_BOOL, OV_INTERNAL, TRUE, "inline_divide", "", 00456 0, 0, 0, &OPT_Inline_Divide, &OPT_Inline_Divide_Set, 00457 "Inline divide and remainder operations if possible" }, 00458 00459 { OVK_BOOL, OV_VISIBLE, TRUE, "unroll_analysis", "unroll_analysis", 00460 0, 0, 0, &OPT_Unroll_Analysis, &OPT_Unroll_Analysis_Set, 00461 "Analyze inner loop requirements before unrolling" }, 00462 00463 { OVK_INT32, OV_VISIBLE, TRUE, "unroll_size", "unroll_s", 00464 0, 0, INT32_MAX, &OPT_unroll_size, &OPT_unroll_size_overridden, 00465 "Maximum size of loops to be unrolled" }, 00466 00467 { OVK_INT32, OV_VISIBLE, TRUE, "unroll_times_max", "unroll", 00468 0, 0, INT32_MAX, &OPT_unroll_times, &OPT_unroll_times_overridden, 00469 "Maximum number of times to unroll loops" }, 00470 00471 { OVK_BOOL, OV_INTERNAL, TRUE, "wn_simplify", "wn_simp", 00472 0, 0, 0, &Enable_WN_Simp, &Enable_WN_Simp_Set, 00473 "Enable simplifier" }, 00474 00475 { OVK_BOOL, OV_VISIBLE, TRUE, "wrap_around_unsafe_opt", "wrap_around_unsafe", 00476 0, 0, 0, &Allow_wrap_around_opt, &Allow_wrap_around_opt_Set, 00477 "Allow LFTR which may wrap around MAX_INT" }, 00478 00479 /* intrinsic expansion for bzero/blkclr/bcopy/memset/memcpy/memmove */ 00480 {OVK_BOOL, OV_VISIBLE, TRUE, "mem_intrinsics", "", 00481 0, 0, 0, &CG_mem_intrinsics, NULL, 00482 "Enable inline expansion of memory intrinsics (bzero, blkclr, bcopy, memset, memcpy, memmove)" }, 00483 {OVK_INT32, OV_VISIBLE, TRUE, "memmove_count", "memmove", 00484 16, 0, INT32_MAX, &CG_memmove_inst_count,&CG_memmove_inst_count_overridden, 00485 "Maximum size of inline expansion of memory intrinsics" }, 00486 {OVK_BOOL, OV_VISIBLE, TRUE, "bcopy_cannot_overlap", "", 00487 0, 0, 0, &CG_bcopy_cannot_overlap, NULL, 00488 "Assume that source and target of bcopy cannot overlap" }, 00489 {OVK_BOOL, OV_VISIBLE, TRUE, "memcpy_cannot_overlap", "", 00490 0, 0, 0, &CG_memcpy_cannot_overlap, NULL, 00491 "Assume that source and target of memcpy cannot overlap" }, 00492 {OVK_BOOL, OV_VISIBLE, TRUE, "memmove_cannot_overlap", "", 00493 0, 0, 0, &CG_memmove_cannot_overlap, NULL, 00494 "Assume that source and target of memmove cannot overlap" }, 00495 {OVK_BOOL, OV_VISIBLE, TRUE, "memmove_nonconst", "", 00496 0, 0, 0, &CG_memmove_nonconst, NULL, 00497 "Enable inline expansion of memory intrinsics (bzero, blkclr, bcopy, memset, memcpy, memmove) whose size is not a constant" }, 00498 00499 { OVK_BOOL, OV_INTERNAL, TRUE, "ipa_addr_analysis", "ipa_addr", 00500 0, 0, 0, &OPT_IPA_addr_analysis, NULL, 00501 "Enable the use of IPA address analysis result in the backend"}, 00502 00503 { OVK_BOOL, OV_INTERNAL, TRUE, "recompute_addr_flags", "", 00504 0, 0, 0, &OPT_recompute_addr_flags, NULL, 00505 "Recompute address flags in the backend (for debugging)"}, 00506 00507 { OVK_INT32, OV_VISIBLE, TRUE, "instrument", "instr", 00508 0, 0, 3, &Instrumentation_Phase_Num, &Instrumentation_Enabled, 00509 "Phases in the compiler where instrumentation needs to be done" }, 00510 00511 { OVK_UINT32, OV_INTERNAL, TRUE, "instrument_action", "", 00512 0, 0, UINT32_MAX, &Instrumentation_Actions, &Instrumentation_Enabled, 00513 "Phases in the compiler where instrumentation needs to be done" }, 00514 00515 { OVK_BOOL, OV_INTERNAL, FALSE, "instr_unique_output", "", 00516 0, 0, 0, &Instrumentation_Unique_Output, NULL, 00517 "Always create a unique name for the profile data file" }, 00518 00519 { OVK_LIST, OV_VISIBLE, TRUE, "feedback", "feed", 00520 0, 0, 0, &Feedback_Option, NULL, 00521 "Phases in the compiler where feedback needs to be done" }, 00522 00523 { OVK_BOOL, OV_INTERNAL, TRUE, "early_intrinsics", "", 00524 0, 0, 0, &Inline_Intrinsics_Early, NULL, 00525 "Lower intrinsics early" }, 00526 00527 { OVK_BOOL, OV_INTERNAL, TRUE, "delay_u64_lowering", "delay_u64", 00528 0, 0, 0, &Delay_U64_Lowering, NULL, 00529 "Delay unsigned 64-bit lowering to after wopt" }, 00530 00531 { OVK_BOOL, OV_INTERNAL, TRUE, "extract_deposit", "extr", 00532 0, 0, 0, &Enable_extract_compose, NULL, 00533 "Enable use of extract/compose opcodes" }, 00534 00535 { OVK_BOOL, OV_VISIBLE, FALSE, "ansi_setjmp", "ansi_setjmp", 00536 0, 0, 0, &LANG_Ansi_Setjmp_On, &LANG_Ansi_Setjmp_Set, 00537 "C/C++: enable optimization of functions with calls to setjmp" }, 00538 00539 #ifdef __linux__ 00540 { OVK_BOOL, OV_INTERNAL, TRUE, "wfe_dfe", "wfe_dfe", 00541 0, 0, 0, &Enable_WFE_DFE, NULL, 00542 "Enable dead function elimination in the frontend" }, 00543 #endif /* __linux__ */ 00544 00545 /* Obsolete options: */ 00546 00547 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "global_limit", NULL, 00548 0, 0, 0, NULL, NULL, "" }, 00549 00550 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "feopt", NULL, 00551 0, 0, 0, NULL, NULL, 00552 "Enable special optimizations in front ends" }, 00553 00554 { OVK_OBSOLETE, OV_VISIBLE, FALSE, "fold_arith_limit", NULL, 00555 0, 0, 0, NULL, NULL, 00556 "Limit size of subexpressions to be folded" }, 00557 00558 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "fold_float", NULL, 00559 0, 0, 0, NULL, NULL, 00560 "Allow expression folding optimizations of floating point" }, 00561 00562 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "fprop_limit", NULL, 00563 0, 0, INT32_MAX, NULL, NULL, "" }, 00564 00565 { OVK_COUNT } /* List terminator -- must be last */ 00566 };