00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #ifdef _KEEP_RCS_ID
00067
00068 static char *config_opt_rcs_id = "$Source: common/com/SCCS/s.config_opt.cxx $ $Revision: 1.35 $";
00069 #endif
00070
00071
00072
00073
00074 #include "config_opt.h"
00075 extern BOOL WOPT_Enable_Goto;
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 BOOL Show_OPT_Warnings = TRUE;
00086
00087
00088 OPTION_LIST *Alias_Option = NULL;
00089 BOOL Alias_Pointer_Parms = TRUE;
00090 BOOL Alias_Pointer_Cray = FALSE;
00091 #if defined(TARG_SL)
00092 BOOL Alias_Pointer_Types = TRUE;
00093 #else
00094 BOOL Alias_Pointer_Types = FALSE;
00095 #endif
00096 BOOL Alias_Not_In_Union = FALSE;
00097 BOOL Alias_Pointer_Strongly_Typed = FALSE;
00098 BOOL Alias_Pointer_Named_Data = FALSE;
00099 BOOL Alias_Pointer_Restricted = FALSE;
00100 BOOL Alias_Pointer_Disjoint = FALSE;
00101 BOOL Alias_Common_Scalar = FALSE;
00102
00103
00104
00105
00106 static BOOL Alias_Pointer_Cckr = FALSE;
00107 #if defined(TARG_SL)
00108 static BOOL Alias_Pointer_Types_Set = TRUE;
00109 #else
00110 static BOOL Alias_Pointer_Types_Set = FALSE;
00111 #endif
00112 static BOOL Alias_Not_In_Union_Set = FALSE;
00113 BOOL Alias_F90_Pointer_Unaliased = FALSE;
00114
00115
00116 BOOL Align_Object = TRUE;
00117 BOOL Align_Padding = FALSE;
00118
00119
00120 #ifdef BACK_END
00121 # define ALIGN_INSTS &Align_Instructions
00122 #else
00123 # define ALIGN_INSTS &Ignore_Int
00124 #endif
00125
00126
00127 BOOL Enable_Cfold_Aggressive = FALSE;
00128 static BOOL Cfold_Aggr_Set = FALSE;
00129 BOOL Enable_Cfold_Reassociate = FALSE;
00130 static BOOL Cfold_Reassoc_Set = FALSE;
00131 BOOL Enable_Cfold_Intrinsics = FALSE;
00132 BOOL Cfold_Intrinsics_Set = FALSE;
00133 #ifdef TARG_X8664
00134 BOOL CIS_Allowed = TRUE;
00135 #else
00136 BOOL CIS_Allowed = FALSE;
00137 #endif
00138 static BOOL CIS_Set = FALSE;
00139 BOOL Enable_CVT_Opt= FALSE;
00140 BOOL Enable_CVT_Opt_Set= FALSE;
00141 BOOL Optimize_CVTL_Exp = FALSE;
00142 BOOL Div_Split_Allowed = FALSE;
00143 static BOOL Div_Split_Set = FALSE;
00144 BOOL Fast_Exp_Allowed = FALSE;
00145 static BOOL Fast_Exp_Set = FALSE;
00146 BOOL Fast_IO_Allowed = FALSE;
00147 static BOOL Fast_IO_Set = FALSE;
00148 BOOL Fast_Sqrt_Allowed = FALSE;
00149 static BOOL Fast_Sqrt_Set = FALSE;
00150 #ifdef TARG_X8664
00151 UINT32 Rsqrt_Allowed = 0;
00152
00153
00154 #else
00155 BOOL Rsqrt_Allowed = FALSE;
00156 #endif
00157 static BOOL Rsqrt_Set = FALSE;
00158 BOOL Recip_Allowed = FALSE;
00159 static BOOL Recip_Set = FALSE;
00160 BOOL Simp_Fold_Unsigned_Relops = FALSE;
00161 static BOOL Simp_Fold_Unsigned_Relops_Set = FALSE;
00162
00163 BOOL Simp_Unsafe_Relops = FALSE;
00164 static BOOL Simp_Unsafe_Relops_Set = FALSE;
00165 BOOL Simp_Canonicalize = TRUE;
00166 BOOL Enable_WN_Simp = TRUE;
00167 static BOOL Enable_WN_Simp_Set=FALSE;
00168 # ifdef KEY
00169 INT32 Enable_WN_Simp_Expr_Limit = -1;
00170 #if defined(TARG_SL)
00171 INT32 OPT_Madd_Height = 0;
00172 #else
00173 INT32 OPT_Madd_Height = 4;
00174 #endif
00175 # endif
00176 BOOL GCM_Eager_Null_Ptr_Deref = FALSE;
00177
00178
00179 BOOL GCM_Eager_Null_Ptr_Deref_Set=FALSE;
00180 BOOL GCM_Speculative_Ptr_Deref= TRUE;
00181
00182
00183 BOOL GCM_Speculative_Ptr_Deref_Set=FALSE;
00184
00185
00186 #ifdef TARG_IA64
00187 #define DEFAULT_OLIMIT 24000
00188 #define DEFAULT_O3_OLIMIT 30000
00189 #else
00190 #define DEFAULT_OLIMIT 6000
00191 #define DEFAULT_O3_OLIMIT 9000
00192 #endif
00193
00194 #define MAX_OLIMIT INT32_MAX
00195 INT32 Olimit = DEFAULT_OLIMIT;
00196 static BOOL Olimit_Set = FALSE;
00197 BOOL Olimit_opt = FALSE;
00198 static BOOL Olimit_opt_Set = FALSE;
00199
00200
00201 static OPTION_LIST *Opt_Skip = NULL;
00202 SKIPLIST *Optimization_Skip_List = NULL;
00203 static OPTION_LIST *Region_Skip = NULL;
00204 SKIPLIST *Region_Skip_List = NULL;
00205 #ifdef KEY
00206 static OPTION_LIST *Goto_Skip = NULL;
00207 SKIPLIST *Goto_Skip_List = NULL;
00208 #if defined(TARG_SL)
00209 static OPTION_LIST *DDB_Skip = NULL;
00210 SKIPLIST *DDB_Skip_List = NULL;
00211 #endif // TARG_SL
00212 #endif
00213
00214
00215 char *Ofast = NULL;
00216 BOOL OPT_Pad_Common = FALSE;
00217 BOOL OPT_Reorg_Common = FALSE;
00218 BOOL OPT_Reorg_Common_Set = FALSE;
00219 BOOL OPT_Unroll_Analysis = TRUE;
00220 BOOL OPT_Unroll_Analysis_Set = FALSE;
00221 #if defined(TARG_NVISA)
00222 BOOL OPT_Lower_Speculate = TRUE;
00223 #else
00224 BOOL OPT_Lower_Speculate = FALSE;
00225 #endif
00226 BOOL OPT_Lower_Speculate_Set = FALSE;
00227 BOOL OPT_Lower_Treeheight = FALSE;
00228 static BOOL OPT_Lower_Treeheight_Set = FALSE;
00229 BOOL OPT_Inline_Divide = TRUE;
00230 static BOOL OPT_Inline_Divide_Set = FALSE;
00231 BOOL OPT_Space = FALSE;
00232 BOOL Early_MP_Processing = FALSE;
00233 BOOL Implied_Do_Io_Opt = TRUE;
00234 BOOL Cray_Ivdep=FALSE;
00235 BOOL Liberal_Ivdep=FALSE;
00236 BOOL Inhibit_EH_opt=FALSE;
00237 BOOL Allow_wrap_around_opt = TRUE;
00238 static BOOL Allow_wrap_around_opt_Set = FALSE;
00239 BOOL Enable_GOT_Call_Conversion = FALSE;
00240 static BOOL Enable_GOT_Call_overridden = FALSE;
00241 BOOL OPT_recompute_addr_flags = FALSE;
00242 BOOL OPT_IPA_addr_analysis = TRUE;
00243 BOOL Delay_U64_Lowering = TRUE;
00244 BOOL OPT_shared_memory = TRUE;
00245
00246 BOOL Section_For_Each_Function = FALSE;
00247 BOOL Inline_Intrinsics_Early=FALSE;
00248 BOOL Enable_extract_bits=TRUE;
00249
00250 #if defined(TARG_SL)
00251 BOOL Enable_compose_bits=TRUE;
00252 #else
00253 BOOL Enable_compose_bits=FALSE;
00254 #endif
00255
00256 #if defined(__linux__) || defined(BUILD_OS_DARWIN)
00257 BOOL Enable_WFE_DFE = FALSE;
00258 #endif
00259
00260
00261
00262 #include "profile_type.h"
00263 INT32 Instrumentation_Phase_Num = PROFILE_PHASE_BEFORE_VHO;
00264 INT32 Instrumentation_Type_Num = WHIRL_PROFILE;
00265 BOOL Instrumentation_Enabled = FALSE;
00266 UINT32 Instrumentation_Actions = 0;
00267 BOOL Instrumentation_Unique_Output = FALSE;
00268 OPTION_LIST *Feedback_Option = NULL;
00269 BOOL Outlining_Enabled = FALSE;
00270 BOOL Instrumentation_Enabled_Before = FALSE;
00271
00272 #ifdef KEY
00273 INT32 OPT_Cyg_Instrument = 0;
00274 BOOL Asm_Memory = FALSE;
00275 BOOL Align_Unsafe = FALSE;
00276 UINT32 Div_Exe_Counter = 40000;
00277 UINT32 Div_Exe_Ratio = 50;
00278 UINT32 Div_Exe_Candidates = 2;
00279 UINT32 Mpy_Exe_Counter = 90000000;
00280 UINT32 Mpy_Exe_Ratio = 100;
00281 BOOL profile_arcs = FALSE;
00282 BOOL OPT_Lower_To_Memlib = TRUE;
00283 INT32 OPT_Threshold_To_Memlib = 256;
00284 INT32 OPT_Enable_Lower_To_Memlib_Limit = -1;
00285 BOOL OPT_Enable_Simp_Fold = TRUE;
00286
00287
00288
00289 BOOL OPT_Fast_Math = FALSE;
00290 static BOOL OPT_Fast_Math_Set = FALSE;
00291
00292
00293 BOOL OPT_Fast_Stdlib = TRUE;
00294
00295
00296 BOOL OPT_MP_Barrier_Opt = FALSE;
00297
00298 BOOL OPT_Icall_Instr = TRUE;
00299 BOOL OPT_Int_Value_Instr = TRUE;
00300 BOOL OPT_FP_Value_Instr = TRUE;
00301
00302
00303
00304 BOOL OPT_Ffast_Math = FALSE;
00305 static BOOL OPT_Ffast_Math_Set = FALSE;
00306 BOOL OPT_Funsafe_Math_Optimizations = FALSE;
00307 static BOOL OPT_Funsafe_Math_Optimizations_Set = FALSE;
00308 BOOL OPT_Float_Via_Int = FALSE;
00309
00310 UINT32 OPT_Malloc_Alg = 0;
00311 BOOL OPT_Malloc_Alg_Set = FALSE;
00312 BOOL Early_Goto_Conversion = TRUE;
00313 BOOL Early_Goto_Conversion_Set = FALSE;
00314 #endif // KEY
00315
00316
00317 static BOOL Fprop_Limit_Set = FALSE;
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327 static OPTION_DESC Options_OPT[] = {
00328 { OVK_BOOL, OV_VISIBLE, TRUE, "warning", "warn",
00329 0, 0, 0, &Show_OPT_Warnings, NULL,
00330 "Control interpretation of possible variable aliasing" },
00331
00332 #ifdef KEY
00333 { OVK_BOOL, OV_INTERNAL, FALSE, "asm_memory", "",
00334 0, 0, 0, &Asm_Memory, NULL,
00335 "Assumes each asm has memory flag specified even if it is not there"},
00336 { OVK_BOOL, OV_INTERNAL, FALSE, "align_unsafe", "",
00337 0, 0, 0, &Align_Unsafe, NULL,
00338 "Generate aligned load/store even though it may be unsafe"},
00339 #endif
00340
00341 { OVK_LIST, OV_VISIBLE, TRUE, "alias", "alia",
00342 0, 0, 0, &Alias_Option, NULL,
00343 "Control interpretation of possible variable aliasing" },
00344
00345 { OVK_INT32, OV_SHY, TRUE, "align_instructions", "align_i",
00346 16, 0, 1024, ALIGN_INSTS, NULL,
00347 "Align subprogram entries and loops by given byte count" },
00348
00349 { OVK_BOOL, OV_INTERNAL, TRUE, "align_object", "align_o",
00350 0, 0, 0, &Align_Object, NULL,
00351 "Allow realignment of objects to improve memory accesses" },
00352
00353 { OVK_BOOL, OV_INTERNAL, TRUE, "align_padding", "align_p",
00354 0, 0, 0, &Align_Padding, NULL,
00355 "Allow padding of objects to improve memory alignment" },
00356
00357 { OVK_INT32, OV_INTERNAL, TRUE, "bblength", "bb",
00358 DEF_BBLENGTH, MIN_BBLENGTH, MAX_BBLENGTH, &Split_BB_Length, NULL,
00359 "Restrict BB length by splitting longer BBs" },
00360
00361 { OVK_BOOL, OV_VISIBLE, TRUE, "cis", "cis",
00362 0, 0, 0, &CIS_Allowed, &CIS_Set,
00363 "Convert sin/cos pairs into a single call" },
00364
00365 { OVK_INT32, OV_VISIBLE, TRUE, "const_copy_limit", "const",
00366 DEF_CONST_COPY_TN_CNT, 0, INT32_MAX,&Const_Copy_TN_CNT, NULL,
00367 "Avoid constant/copy propagation if there are more than n expressions" },
00368
00369 { OVK_BOOL, OV_VISIBLE, TRUE, "cray_ivdep", "cray_ivdep",
00370 0, 0, 0, &Cray_Ivdep, NULL,
00371 "IVDEP pragma/directive break parallelism-inhibiting dependencies" },
00372
00373 { OVK_BOOL, OV_INTERNAL, TRUE, "cvt", "cvt",
00374 0, 0, 0, &Enable_CVT_Opt, &Enable_CVT_Opt_Set,
00375 "Optimize conversion operators" },
00376
00377 { OVK_BOOL, OV_VISIBLE, TRUE, "div_split", "div_split",
00378 0, 0, 0, &Div_Split_Allowed, &Div_Split_Set ,
00379 "Allow splitting of a/b into a*recip(b)" },
00380
00381 #ifdef KEY
00382 { OVK_UINT32, OV_INTERNAL, TRUE, "div_exe_counter", "",
00383 0, 0, UINT32_MAX, &Div_Exe_Counter, NULL ,
00384 "Restrict div/rem/mod optimization via value profiling" },
00385 { OVK_UINT32, OV_INTERNAL, TRUE, "div_exe_ratio", "",
00386 0, 0, 100, &Div_Exe_Ratio, NULL ,
00387 "Restrict div/rem/mod optimization via value profiling" },
00388 { OVK_UINT32, OV_INTERNAL, TRUE, "div_exe_candidates", "",
00389 0, 0, 10, &Div_Exe_Candidates, NULL ,
00390 "Restrict div/rem/mod optimization via value profiling" },
00391 { OVK_UINT32, OV_INTERNAL, TRUE, "mpy_exe_counter", "",
00392 0, 0, UINT32_MAX, &Mpy_Exe_Counter, NULL ,
00393 "Restrict mpy optimization via value profiling" },
00394 { OVK_UINT32, OV_INTERNAL, TRUE, "mpy_exe_ratio", "",
00395 0, 0, 100, &Mpy_Exe_Ratio, NULL ,
00396 "Restrict mpy optimization via value profiling" },
00397 { OVK_BOOL, OV_INTERNAL, TRUE, "simp_debug", "simp_debug",
00398 0, 0, 0, &OPT_Enable_Simp_Fold, NULL,
00399 "New foldings in simplifier" },
00400
00401 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_math", "",
00402 #ifdef TARG_IA64
00403 0, 0, 0, &OPT_Fast_Math, NULL,
00404 #else
00405 0, 0, 0, &OPT_Fast_Math, &OPT_Fast_Math_Set,
00406 #endif
00407 "Use Fast Math Library functions from ACML 2.0" },
00408
00409 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_stdlib", "",
00410 0, 0, 0, &OPT_Fast_Stdlib, NULL,
00411 "Use fast versions of some standard library functions" },
00412
00413 { OVK_BOOL, OV_INTERNAL, TRUE, "mp_barrier_opt", "",
00414 0, 0, 0, &OPT_MP_Barrier_Opt, NULL,
00415 "Optimize generation of barrier calls for OpenMP" },
00416
00417 { OVK_INT32, OV_VISIBLE, TRUE, "cyg_instr", "",
00418 4, 0, 4, &OPT_Cyg_Instrument, NULL,
00419 "Insert calls to __cyg_profile_func_enter/exit" },
00420
00421 { OVK_BOOL, OV_INTERNAL, TRUE, "icall_instr", "",
00422 0, 0, 0, &OPT_Icall_Instr, NULL,
00423 "perform profiling of indirect calls to get their called functions" },
00424
00425 { OVK_BOOL, OV_INTERNAL, TRUE, "int_value_instr", "",
00426 0, 0, 0, &OPT_Int_Value_Instr, NULL,
00427 "perform profiling of integer values" },
00428
00429 { OVK_BOOL, OV_INTERNAL, TRUE, "fp_value_instr", "",
00430 0, 0, 0, &OPT_FP_Value_Instr, NULL,
00431 "perform profiling of floating-point values" },
00432
00433 { OVK_BOOL, OV_INTERNAL, TRUE, "ffast_math", "",
00434 0, 0, 0, &OPT_Ffast_Math, &OPT_Ffast_Math_Set,
00435 "Determines conformance to IEEE-754 arithmetic rules" },
00436
00437 { OVK_BOOL, OV_INTERNAL, TRUE, "funsafe_math_optimizations", "",
00438 0, 0, 0, &OPT_Funsafe_Math_Optimizations,
00439 &OPT_Funsafe_Math_Optimizations_Set,
00440 "Determines conformance to IEEE-754 arithmetic rules" },
00441 { OVK_BOOL, OV_INTERNAL, TRUE, "float_via_int", "",
00442 0, 0, 0, &OPT_Float_Via_Int, NULL,
00443 "perform floating-point memory copies using integer registers" },
00444
00445 { OVK_UINT32, OV_VISIBLE, TRUE, "malloc_algorithm", "malloc_alg",
00446 0, 0, 3, &OPT_Malloc_Alg, &OPT_Malloc_Alg_Set,
00447 "Use alternate malloc algorithm" },
00448
00449 { OVK_BOOL, OV_INTERNAL, TRUE, "early_goto_conv", "",
00450 0, 0, 0, &Early_Goto_Conversion, &Early_Goto_Conversion_Set,
00451 "Do GOTO conversion before VHO" },
00452 #endif
00453
00454 { OVK_BOOL, OV_INTERNAL, TRUE, "early_mp", "early_mp",
00455 0, 0, 0, &Early_MP_Processing, NULL,
00456 "Lower before LNO" },
00457
00458 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_bit_intrinsics", "fast_bit",
00459 0, 0, 0, &Fast_Bit_Allowed, &Fast_Bit_Set,
00460 "Don't check bit count range for Fortran bit intrinsics" },
00461
00462 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_complex", "fast_co",
00463 0, 0, 0, &Fast_Complex_Allowed, &Fast_Complex_Set,
00464 "Use fast algorithms with limited domains for complex norm and divide" },
00465
00466 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_exp", "fast_ex",
00467 0, 0, 0, &Fast_Exp_Allowed, &Fast_Exp_Set,
00468 "Use multiplication and square root for exp() where faster" },
00469
00470 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_io", "fast_io",
00471 0, 0, 0, &Fast_IO_Allowed, &Fast_IO_Set,
00472 "Inline some C I/O routines if __INLINE_INTRINSICS is defined" },
00473
00474 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_nint", "fast_nint",
00475 0, 0, 0, &Fast_NINT_Allowed, &Fast_NINT_Set,
00476 "Use IEEE rounding instead of Fortran rounding for NINT intrinsics" },
00477
00478 #ifdef TARG_X8664
00479 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_anint", "fast_anint",
00480 0, 0, 0, &Fast_ANINT_Allowed, &Fast_ANINT_Set,
00481 "Use IEEE rounding instead of Fortran rounding for ANINT intrinsics" },
00482
00483 { OVK_BOOL, OV_VISIBLE, TRUE, "vcast_complex", "vcast_complex",
00484 0, 0, 0, &Vcast_Complex, &Vcast_Complex_Set,
00485 "Convert MTYPE_C8 to MTYPE_V16C8 in the lowerer" },
00486 #endif
00487
00488 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_sqrt", "fast_sq",
00489 0, 0, 0, &Fast_Sqrt_Allowed, &Fast_Sqrt_Set,
00490 "May use x*rsqrt(x) for sqrt(x) on machines where faster" },
00491
00492 { OVK_BOOL, OV_VISIBLE, TRUE, "fast_trunc", "fast_trunc",
00493 0, 0, 0, &Fast_trunc_Allowed, &Fast_trunc_Set,
00494 "Inline NINT and related intrinsics with limited-domain algorithm" },
00495
00496 { OVK_BOOL, OV_SHY, TRUE, "fold_aggressive", "fold_ag",
00497 0, 0, 0, &Enable_Cfold_Aggressive, &Cfold_Aggr_Set,
00498 "Allow aggressive expression folding optimizations" },
00499
00500 { OVK_BOOL, OV_SHY, TRUE, "fold_intrinsics", "fold_i",
00501 0, 0, 0, &Enable_Cfold_Intrinsics, &Cfold_Intrinsics_Set,
00502 "Allow expression folding of Fortran intrinsic calls" },
00503
00504 { OVK_BOOL, OV_VISIBLE, TRUE, "fold_reassociate", "fold_r",
00505 0, 0, 0, &Enable_Cfold_Reassociate, &Cfold_Reassoc_Set,
00506 "Allow optimizations which reassociate floating point operators" },
00507
00508 { OVK_BOOL, OV_VISIBLE, TRUE, "fold_unsafe_relops", "fold_unsafe_relops",
00509 0, 0, 0, &Simp_Unsafe_Relops, &Simp_Unsafe_Relops_Set,
00510 "Allow relational operator folding which may cause integer overflow" },
00511
00512 { OVK_BOOL, OV_VISIBLE, TRUE, "fold_unsigned_relops", "fold_unsigned",
00513 0, 0, 0, &Simp_Fold_Unsigned_Relops, &Simp_Fold_Unsigned_Relops_Set,
00514 "Allow relop folding which may cause unsigned integer overflow" },
00515
00516 { OVK_BOOL, OV_VISIBLE, TRUE, "got_call_conversion", "got_call",
00517 0, 0, 0, &Enable_GOT_Call_Conversion, &Enable_GOT_Call_overridden,
00518 "Allow function address loads to be moved out of loops" },
00519
00520 { OVK_BOOL, OV_INTERNAL, TRUE, "goto_conversion", "goto",
00521 0, 0, 0, &WOPT_Enable_Goto, NULL,
00522 "Enable conversion of GOTO to more structured constructs" },
00523
00524 { OVK_INT32, OV_VISIBLE, TRUE, "IEEE_arithmetic", "IEEE_a",
00525 1, 1, 3, &IEEE_Arithmetic, &IEEE_Arith_Set,
00526 "Level of conformance to IEEE-754 arithmetic rules" },
00527
00528 { OVK_BOOL, OV_SHY, TRUE, "IEEE_comparisons", "IEEE_c",
00529 0, 0, 0, &Force_IEEE_Comparisons, NULL,
00530 "Force conforming operations on IEEE-754 NaN and Inf values" },
00531
00532 { OVK_BOOL, OV_VISIBLE, TRUE, "IEEE_NaN_Inf", "IEEE_N",
00533 0, 0, 0, &Force_IEEE_Comparisons, NULL,
00534 "Force conforming operations on IEEE-754 NaN and Inf values" },
00535
00536 { OVK_BOOL, OV_SHY, TRUE, "implied_do_io_opt", NULL,
00537 1, 0, 0, &Implied_Do_Io_Opt, NULL,
00538 "Optimize implied DO I/O to minimize calls in Fortran" },
00539
00540 { OVK_BOOL, OV_VISIBLE, TRUE, "inline_intrinsics", "inline_intr",
00541 0, 0, 0, &Inline_Intrinsics_Allowed, &Inline_Intrinsics_Set,
00542 "Allow inlining of Fortran intrinsic functions" },
00543
00544 { OVK_BOOL, OV_SHY, TRUE, "ldx", "ldx",
00545 0, 0, 0, &Indexed_Loads_Allowed, NULL,
00546 "Allow generation of indexed load/store operations" },
00547
00548 { OVK_BOOL, OV_VISIBLE, TRUE, "liberal_ivdep", "liberal_ivdep",
00549 0, 0, 0, &Liberal_Ivdep, NULL,
00550 "IVDEP pragmas/directives break all dependencies within an array" },
00551
00552 { OVK_BOOL, OV_VISIBLE, TRUE, "Inhibit_EH_opt", "Inhibit_EH_opt",
00553 0, 0, 0, &Inhibit_EH_opt, NULL,
00554 "Don't remove EH regions without calls" },
00555
00556 { OVK_BOOL, OV_INTERNAL, TRUE, "nary", "nary",
00557 0, 0, 0, &Enable_NaryExpr, &Enable_NaryExpr_Set,
00558 "Allow N-ary tree height reduction of MADDs" },
00559
00560 { OVK_NAME, OV_SHY, FALSE, "Ofast", "Ofast",
00561 0, 0, 0, &Ofast, NULL,
00562 "Tailor options for performance on current target" },
00563
00564 { OVK_INT32, OV_VISIBLE, FALSE, "Olimit", "Ol",
00565 DEFAULT_OLIMIT, 0, MAX_OLIMIT, &Olimit, &Olimit_Set,
00566 "Limit size of subprograms which will be optimized" },
00567
00568 { OVK_BOOL, OV_INTERNAL, FALSE, "Olimit_opt", "Olimit_o",
00569 0, 0, 0, &Olimit_opt, &Olimit_opt_Set,
00570 "Use regions if Olimit exceeded" },
00571
00572 { OVK_BOOL, OV_VISIBLE, TRUE, "pad_common", "pad",
00573 0, 0, 0, &OPT_Pad_Common, NULL,
00574 "Force padding of COMMON blocks to improve cache behavior" },
00575
00576 #ifdef KEY
00577 { OVK_BOOL, OV_INTERNAL, FALSE, "profile_arcs", "",
00578 0, 0, 0, &profile_arcs, NULL,
00579 "arc profiling used by GCC"},
00580 #endif
00581
00582 { OVK_BOOL, OV_INTERNAL, TRUE, "ptr_opt", "ptr_o",
00583 0, 0, 0, &Ptr_Opt_Allowed, NULL,
00584 "Allow treatment of pointers as arrays when possible in C" },
00585
00586 { OVK_BOOL, OV_INTERNAL, FALSE, "rail", "rail",
00587 0, 0, 0, &Regions_Around_Inner_Loops, NULL,
00588 "Insert regions around inner loops" },
00589
00590 { OVK_BOOL, OV_INTERNAL, FALSE, "rbi", "rbi",
00591 0, 0, 0, &Region_Boundary_Info, NULL,
00592 "Create region boundary information" },
00593
00594 { OVK_BOOL, OV_VISIBLE, TRUE, "recip", "recip",
00595 0, 0, 0, &Recip_Allowed, &Recip_Set,
00596 "Allow use of recip instruction" },
00597
00598 { OVK_LIST, OV_SHY, FALSE, "region_skip_equal", "region_skip_e",
00599 0, 0, 4096, &Region_Skip, NULL,
00600 "Skip optimization of this region" },
00601
00602 { OVK_LIST, OV_SHY, FALSE, "region_skip_before", "region_skip_b",
00603 0, 0, 4096, &Region_Skip, NULL,
00604 "Skip optimization of regions before this one" },
00605
00606 { OVK_LIST, OV_SHY, FALSE, "region_skip_after", "region_skip_a",
00607 0, 0, 4096, &Region_Skip, NULL,
00608 "Skip optimization of regions after this one" },
00609
00610 { OVK_BOOL, OV_VISIBLE, TRUE, "reorg_common", "reorg",
00611 0, 0, 0, &OPT_Reorg_Common, &OPT_Reorg_Common_Set,
00612 "Allow splitting of COMMON blocks to improve cache behavior" },
00613
00614 { OVK_BOOL, OV_VISIBLE, FALSE, "procedure_reorder", "procedure_reorder",
00615 0, 0, 0, &Section_For_Each_Function, NULL,
00616 "Place each function in its own .text section" },
00617
00618 { OVK_INT32, OV_VISIBLE, TRUE, "roundoff", "ro",
00619 2, 0, 3, &Roundoff_Level, &Roundoff_Set,
00620 "Level of acceptable departure from source roundoff semantics" },
00621
00622 #ifdef TARG_X8664
00623 { OVK_UINT32, OV_VISIBLE, TRUE, "rsqrt", "rsqrt",
00624 0, 0, 2, &Rsqrt_Allowed, &Rsqrt_Set,
00625 "How to use rsqrt instructions" },
00626 #else
00627 { OVK_BOOL, OV_VISIBLE, TRUE, "rsqrt", "rsqrt",
00628 0, 0, 0, &Rsqrt_Allowed, &Rsqrt_Set,
00629 "Allow use of rsqrt instruction" },
00630 #endif
00631
00632 { OVK_BOOL, OV_VISIBLE, TRUE, "shared_memory", "shared_mem",
00633 0, 0, 0, &OPT_shared_memory, NULL,
00634 "Assume use of shared memory" },
00635
00636 { OVK_LIST, OV_SHY, FALSE, "skip_equal", "skip_e",
00637 0, 0, 4096, &Opt_Skip, NULL,
00638 "Skip optimization of this subprogram" },
00639
00640 { OVK_LIST, OV_SHY, FALSE, "skip_before", "skip_b",
00641 0, 0, 4096, &Opt_Skip, NULL,
00642 "Skip optimization of subprograms before this one" },
00643
00644 { OVK_LIST, OV_SHY, FALSE, "skip_after", "skip_a",
00645 0, 0, 4096, &Opt_Skip, NULL,
00646 "Skip optimization of subprograms after this one" },
00647
00648 { OVK_BOOL, OV_VISIBLE, FALSE, "space", "sp",
00649 0, 0, 0, &OPT_Space, NULL,
00650 "Bias optimizations to minimize code space" },
00651
00652 { OVK_BOOL, OV_INTERNAL, TRUE, "speculate", "",
00653 0, 0, 0, &OPT_Lower_Speculate, &OPT_Lower_Speculate_Set,
00654 "Allow speculation for CAND/COR operators" },
00655
00656 { OVK_BOOL, OV_INTERNAL, TRUE, "speculative_null_ptr_deref","",
00657 0, 0, 0, &GCM_Eager_Null_Ptr_Deref, &GCM_Eager_Null_Ptr_Deref_Set,
00658 "Allow speculation of loads above NULL pointer tests" },
00659
00660 { OVK_BOOL, OV_INTERNAL, TRUE, "speculative_ptr_deref","",
00661 0, 0, 0, &GCM_Speculative_Ptr_Deref, &GCM_Speculative_Ptr_Deref_Set,
00662 "Allow speculative loads of memory locations that differ by a small offset from some referenced memory location" },
00663
00664 { OVK_BOOL, OV_VISIBLE, TRUE, "swp", "swp",
00665 0, 0, 0, &Enable_SWP, &Enable_SWP_overridden,
00666 "Enable software pipelining" },
00667
00668 { OVK_BOOL, OV_INTERNAL, FALSE, "transform_to_memlib", "transform",
00669 0, 0, 0, &OPT_Lower_To_Memlib, NULL,
00670 "Allow loop or struct memory copy/set to be library calls" },
00671
00672 { OVK_INT32, OV_INTERNAL, TRUE, "threshold_to_memlib", "",
00673 256, 0, INT32_MAX, &OPT_Threshold_To_Memlib, NULL,
00674 "Threshold to transform loop copy/set to be memory library calls" },
00675
00676 { OVK_INT32, OV_INTERNAL, TRUE, "memlib_limit", "memlib_limit",
00677 INT32_MAX, 0, INT32_MAX, &OPT_Enable_Lower_To_Memlib_Limit, NULL },
00678
00679 { OVK_BOOL, OV_INTERNAL, TRUE, "treeheight", "",
00680 0, 0, 0, &OPT_Lower_Treeheight, &OPT_Lower_Treeheight_Set,
00681 "Allow tree height reduction" },
00682
00683 { OVK_BOOL, OV_INTERNAL, TRUE, "inline_divide", "",
00684 0, 0, 0, &OPT_Inline_Divide, &OPT_Inline_Divide_Set,
00685 "Inline divide and remainder operations if possible" },
00686
00687 { OVK_BOOL, OV_VISIBLE, TRUE, "unroll_analysis", "unroll_analysis",
00688 0, 0, 0, &OPT_Unroll_Analysis, &OPT_Unroll_Analysis_Set,
00689 "Analyze inner loop requirements before unrolling" },
00690
00691 { OVK_INT32, OV_VISIBLE, TRUE, "unroll_size", "unroll_s",
00692 0, 0, INT32_MAX, &OPT_unroll_size, &OPT_unroll_size_overridden,
00693 "Maximum size of loops to be unrolled" },
00694
00695 { OVK_INT32, OV_VISIBLE, TRUE, "unroll_times_max", "unroll_times",
00696 0, 0, INT32_MAX, &OPT_unroll_times, &OPT_unroll_times_overridden,
00697 "Maximum number of times to unroll loops" },
00698
00699 { OVK_BOOL, OV_INTERNAL, TRUE, "wn_simplify", "wn_simp",
00700 0, 0, 0, &Enable_WN_Simp, &Enable_WN_Simp_Set,
00701 "Enable simplifier" },
00702 #ifdef KEY
00703 { OVK_INT32, OV_INTERNAL, TRUE, "simp_limit", "",
00704 INT32_MAX, 0, INT32_MAX, &Enable_WN_Simp_Expr_Limit, NULL },
00705
00706 { OVK_LIST, OV_SHY, FALSE, "goto_skip_equal", "goto_skip_e",
00707 0, 0, 4096, &Goto_Skip, NULL,
00708 "Skip goto conversion of this subprogram" },
00709
00710 { OVK_LIST, OV_SHY, FALSE, "goto_skip_before", "goto_skip_b",
00711 0, 0, 4096, &Goto_Skip, NULL,
00712 "Skip goto conversion of subprograms before this one" },
00713
00714 { OVK_LIST, OV_SHY, FALSE, "goto_skip_after", "goto_skip_a",
00715 0, 0, 4096, &Goto_Skip, NULL,
00716 "Skip goto conversion of subprograms after this one" },
00717 #if defined(TARG_SL)
00718
00719 { OVK_LIST, OV_SHY, FALSE, "ddb_skip_equal", "ddb_skip_e",
00720 0, 0, 4096, &DDB_Skip, NULL,
00721 "Skip ddb of this branch" },
00722
00723 { OVK_LIST, OV_SHY, FALSE, "ddb_skip_before", "ddb_skip_b",
00724 0, 0, 4096, &DDB_Skip, NULL,
00725 "Skip ddb of branch before this one" },
00726
00727 { OVK_LIST, OV_SHY, FALSE, "ddb_skip_after", "ddb_skip_a",
00728 0, 0, 4096, &DDB_Skip, NULL,
00729 "Skip ddb of branch after this one" },
00730 #endif
00731 #ifdef TARG_MIPS
00732 { OVK_INT32, OV_VISIBLE, TRUE, "madd_height", "",
00733 4, 1, INT32_MAX, &OPT_Madd_Height, NULL,
00734 "Maximum length of MADD chain allowed before transforming it to sum of shorter MADD chains"},
00735 #endif
00736 #endif
00737 { OVK_BOOL, OV_VISIBLE, TRUE, "wrap_around_unsafe_opt", "wrap_around_unsafe",
00738 0, 0, 0, &Allow_wrap_around_opt, &Allow_wrap_around_opt_Set,
00739 "Allow LFTR which may wrap around MAX_INT" },
00740
00741
00742 {OVK_BOOL, OV_VISIBLE, TRUE, "mem_intrinsics", "",
00743 0, 0, 0, &CG_mem_intrinsics, NULL,
00744 "Enable inline expansion of memory intrinsics (bzero, blkclr, bcopy, memset, memcpy, memmove)" },
00745 {OVK_INT32, OV_VISIBLE, TRUE, "memmove_count", "memmove",
00746 16, 0, INT32_MAX, &CG_memmove_inst_count,&CG_memmove_inst_count_overridden,
00747 "Maximum size of inline expansion of memory intrinsics" },
00748 {OVK_BOOL, OV_VISIBLE, TRUE, "bcopy_cannot_overlap", "",
00749 0, 0, 0, &CG_bcopy_cannot_overlap, NULL,
00750 "Assume that source and target of bcopy cannot overlap" },
00751 {OVK_BOOL, OV_VISIBLE, TRUE, "memcpy_cannot_overlap", "",
00752 0, 0, 0, &CG_memcpy_cannot_overlap, NULL,
00753 "Assume that source and target of memcpy cannot overlap" },
00754 {OVK_BOOL, OV_VISIBLE, TRUE, "memmove_cannot_overlap", "",
00755 0, 0, 0, &CG_memmove_cannot_overlap, NULL,
00756 "Assume that source and target of memmove cannot overlap" },
00757 {OVK_BOOL, OV_VISIBLE, TRUE, "memmove_nonconst", "",
00758 0, 0, 0, &CG_memmove_nonconst, NULL,
00759 "Enable inline expansion of memory intrinsics (bzero, blkclr, bcopy, memset, memcpy, memmove) whose size is not a constant" },
00760
00761 { OVK_BOOL, OV_INTERNAL, TRUE, "ipa_addr_analysis", "ipa_addr",
00762 0, 0, 0, &OPT_IPA_addr_analysis, NULL,
00763 "Enable the use of IPA address analysis result in the backend"},
00764
00765 { OVK_BOOL, OV_INTERNAL, TRUE, "recompute_addr_flags", "",
00766 0, 0, 0, &OPT_recompute_addr_flags, NULL,
00767 "Recompute address flags in the backend (for debugging)"},
00768
00769 { OVK_BOOL, OV_VISIBLE, TRUE, "instrumentation", "instr",
00770 0, 0, 0, &Instrumentation_Enabled, NULL,
00771 "Allow adding instrumentation instructions for feedback profiling" },
00772
00773 { OVK_INT32, OV_VISIBLE, TRUE, "fb_phase", "",
00774 0, 0, 5, &Instrumentation_Phase_Num, NULL,
00775 "Phases in the compiler where instrumentation or feedback needs to be done" },
00776
00777 { OVK_INT32, OV_VISIBLE, TRUE, "fb_type", "",
00778 0, 0, 14, &Instrumentation_Type_Num, NULL,
00779 "Types in the compiler where instrumentation needs to be done" },
00780
00781 { OVK_UINT32, OV_INTERNAL, TRUE, "instrument_action", "",
00782 0, 0, UINT32_MAX, &Instrumentation_Actions, NULL,
00783 "Phases in the compiler where instrumentation needs to be done" },
00784
00785 { OVK_BOOL, OV_INTERNAL, FALSE, "instr_unique_output", "",
00786 0, 0, 0, &Instrumentation_Unique_Output, NULL,
00787 "Always create a unique name for the profile data file" },
00788
00789 { OVK_LIST, OV_VISIBLE, TRUE, "feedback", "feed",
00790 0, 0, 0, &Feedback_Option, NULL,
00791 "Phases in the compiler where feedback needs to be done" },
00792
00793 { OVK_BOOL, OV_INTERNAL, TRUE, "early_intrinsics", "",
00794 0, 0, 0, &Inline_Intrinsics_Early, NULL,
00795 "Lower intrinsics early" },
00796
00797 { OVK_BOOL, OV_INTERNAL, TRUE, "delay_u64_lowering", "delay_u64",
00798 0, 0, 0, &Delay_U64_Lowering, NULL,
00799 "Delay unsigned 64-bit lowering to after wopt" },
00800
00801 { OVK_BOOL, OV_INTERNAL, TRUE, "extract_bits", "extr",
00802 0, 0, 0, &Enable_extract_bits, NULL,
00803 "Enable use of extract opcode" },
00804
00805 { OVK_BOOL, OV_INTERNAL, TRUE, "compose_bits", "",
00806 0, 0, 0, &Enable_compose_bits, NULL,
00807 "Enable use of compose opcode" },
00808
00809 { OVK_BOOL, OV_VISIBLE, FALSE, "ansi_setjmp", "ansi_setjmp",
00810 0, 0, 0, &LANG_Ansi_Setjmp_On, &LANG_Ansi_Setjmp_Set,
00811 "C/C++: enable optimization of functions with calls to setjmp" },
00812
00813 #if defined(__linux__) || defined(BUILD_OS_DARWIN)
00814 { OVK_BOOL, OV_INTERNAL, TRUE, "wfe_dfe", "wfe_dfe",
00815 0, 0, 0, &Enable_WFE_DFE, NULL,
00816 "Enable dead function elimination in the frontend" },
00817 #endif
00818
00819
00820
00821 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "global_limit", NULL,
00822 0, 0, 0, NULL, NULL, "" },
00823
00824 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "feopt", NULL,
00825 0, 0, 0, NULL, NULL,
00826 "Enable special optimizations in front ends" },
00827
00828 { OVK_OBSOLETE, OV_VISIBLE, FALSE, "fold_arith_limit", NULL,
00829 0, 0, 0, NULL, NULL,
00830 "Limit size of subexpressions to be folded" },
00831
00832 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "fold_float", NULL,
00833 0, 0, 0, NULL, NULL,
00834 "Allow expression folding optimizations of floating point" },
00835
00836 { OVK_OBSOLETE, OV_INTERNAL, FALSE, "fprop_limit", NULL,
00837 0, 0, INT32_MAX, NULL, NULL, "" },
00838
00839 { OVK_COUNT }
00840 };