1 /*
   2  * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_OPTO_C2_GLOBALS_HPP
  26 #define SHARE_OPTO_C2_GLOBALS_HPP
  27 
  28 #include "runtime/globals_shared.hpp"
  29 #include "utilities/macros.hpp"
  30 
  31 #include CPU_HEADER(c2_globals)
  32 #include OS_HEADER(c2_globals)
  33 
  34 //
  35 // Defines all globals flags used by the server compiler.
  36 //
  37 
  38 #define C2_FLAGS(develop, \
  39                  develop_pd, \
  40                  product, \
  41                  product_pd, \
  42                  diagnostic, \
  43                  diagnostic_pd, \
  44                  experimental, \
  45                  notproduct, \
  46                  range, \
  47                  constraint) \
  48                                                                             \
  49   diagnostic(bool, StressLCM, false,                                        \
  50           "Randomize instruction scheduling in LCM")                        \
  51                                                                             \
  52   diagnostic(bool, StressGCM, false,                                        \
  53           "Randomize instruction scheduling in GCM")                        \
  54                                                                             \
  55   develop(bool, StressMethodHandleLinkerInlining, false,                    \
  56           "Stress inlining through method handle linkers")                  \
  57                                                                             \
  58   develop(intx, OptoPrologueNops, 0,                                        \
  59           "Insert this many extra nop instructions "                        \
  60           "in the prologue of every nmethod")                               \
  61           range(0, 128)                                                     \
  62                                                                             \
  63   product_pd(intx, InteriorEntryAlignment,                                  \
  64           "Code alignment for interior entry points "                       \
  65           "in generated code (in bytes)")                                   \
  66           constraint(InteriorEntryAlignmentConstraintFunc, AfterErgo)       \
  67                                                                             \
  68   product(intx, MaxLoopPad, (OptoLoopAlignment-1),                          \
  69           "Align a loop if padding size in bytes is less or equal to this " \
  70           "value")                                                          \
  71           range(0, max_jint)                                                \
  72                                                                             \
  73   product(intx, MaxVectorSize, 64,                                          \
  74           "Max vector size in bytes, "                                      \
  75           "actual size could be less depending on elements type")           \
  76           range(0, max_jint)                                                \
  77                                                                             \
  78   product(bool, AlignVector, true,                                          \
  79           "Perform vector store/load alignment in loop")                    \
  80                                                                             \
  81   product(intx, NumberOfLoopInstrToAlign, 4,                                \
  82           "Number of first instructions in a loop to align")                \
  83           range(0, max_jint)                                                \
  84                                                                             \
  85   notproduct(intx, IndexSetWatch, 0,                                        \
  86           "Trace all operations on this IndexSet (-1 means all, 0 none)")   \
  87           range(-1, 0)                                                      \
  88                                                                             \
  89   develop(intx, OptoNodeListSize, 4,                                        \
  90           "Starting allocation size of Node_List data structures")          \
  91           range(0, max_jint)                                                \
  92                                                                             \
  93   develop(intx, OptoBlockListSize, 8,                                       \
  94           "Starting allocation size of Block_List data structures")         \
  95           range(0, max_jint)                                                \
  96                                                                             \
  97   develop(intx, OptoPeepholeAt, -1,                                         \
  98           "Apply peephole optimizations to this peephole rule")             \
  99                                                                             \
 100   notproduct(bool, PrintIdeal, false,                                       \
 101           "Print ideal graph before code generation")                       \
 102                                                                             \
 103   notproduct(bool, PrintOpto, false,                                        \
 104           "Print compiler2 attempts")                                       \
 105                                                                             \
 106   notproduct(bool, PrintOptoInlining, false,                                \
 107           "Print compiler2 inlining decisions")                             \
 108                                                                             \
 109   notproduct(bool, VerifyIdealNodeCount, false,                             \
 110           "Verify that tracked dead ideal node count is accurate")          \
 111                                                                             \
 112   notproduct(bool, PrintIdealNodeCount, false,                              \
 113           "Print liveness counts of ideal nodes")                           \
 114                                                                             \
 115   notproduct(bool, VerifyOptoOopOffsets, false,                             \
 116           "Check types of base addresses in field references")              \
 117                                                                             \
 118   develop(bool, IdealizedNumerics, false,                                   \
 119           "Check performance difference allowing FP "                       \
 120           "associativity and commutativity...")                             \
 121                                                                             \
 122   diagnostic_pd(bool, IdealizeClearArrayNode,                               \
 123           "Replace ClearArrayNode by subgraph of basic operations.")        \
 124                                                                             \
 125   develop(bool, OptoBreakpoint, false,                                      \
 126           "insert breakpoint at method entry")                              \
 127                                                                             \
 128   notproduct(bool, OptoBreakpointOSR, false,                                \
 129           "insert breakpoint at osr method entry")                          \
 130                                                                             \
 131   notproduct(intx, BreakAtNode, 0,                                          \
 132           "Break at construction of this Node (either _idx or _debug_idx)") \
 133                                                                             \
 134   notproduct(bool, OptoBreakpointC2R, false,                                \
 135           "insert breakpoint at runtime stub entry")                        \
 136                                                                             \
 137   notproduct(bool, OptoNoExecute, false,                                    \
 138           "Attempt to parse and compile but do not execute generated code") \
 139                                                                             \
 140   notproduct(bool, PrintOptoStatistics, false,                              \
 141           "Print New compiler statistics")                                  \
 142                                                                             \
 143   diagnostic(bool, PrintOptoAssembly, false,                                \
 144           "Print New compiler assembly output")                             \
 145                                                                             \
 146   develop_pd(bool, OptoPeephole,                                            \
 147           "Apply peephole optimizations after register allocation")         \
 148                                                                             \
 149   develop(bool, OptoRemoveUseless, true,                                    \
 150           "Remove useless nodes after parsing")                             \
 151                                                                             \
 152   notproduct(bool, PrintFrameConverterAssembly, false,                      \
 153           "Print New compiler assembly output for frame converters")        \
 154                                                                             \
 155   notproduct(bool, PrintParseStatistics, false,                             \
 156           "Print nodes, transforms and new values made per bytecode parsed")\
 157                                                                             \
 158   notproduct(bool, PrintOptoPeephole, false,                                \
 159           "Print New compiler peephole replacements")                       \
 160                                                                             \
 161   develop(bool, PrintCFGBlockFreq, false,                                   \
 162           "Print CFG block freqencies")                                     \
 163                                                                             \
 164   develop(bool, TraceOptoParse, false,                                      \
 165           "Trace bytecode parse and control-flow merge")                    \
 166                                                                             \
 167   product_pd(intx,  LoopUnrollLimit,                                        \
 168           "Unroll loop bodies with node count less than this")              \
 169           range(0, max_jint / 4)                                            \
 170                                                                             \
 171   product_pd(intx, LoopPercentProfileLimit,                                 \
 172              "Unroll loop bodies with % node count of profile limit")       \
 173              range(10, 100)                                                 \
 174                                                                             \
 175   product(intx,  LoopMaxUnroll, 16,                                         \
 176           "Maximum number of unrolls for main loop")                        \
 177           range(0, max_jint)                                                \
 178                                                                             \
 179   product_pd(bool,  SuperWordLoopUnrollAnalysis,                            \
 180            "Map number of unrolls for main loop via "                       \
 181            "Superword Level Parallelism analysis")                          \
 182                                                                             \
 183   experimental(bool, PostLoopMultiversioning, false,                        \
 184            "Multi versioned post loops to eliminate range checks")          \
 185                                                                             \
 186   notproduct(bool, TraceSuperWordLoopUnrollAnalysis, false,                 \
 187           "Trace what Superword Level Parallelism analysis applies")        \
 188                                                                             \
 189   diagnostic(bool, UseVectorMacroLogic, true,                               \
 190           "Use ternary macro logic instructions")                           \
 191                                                                             \
 192   product(intx,  LoopUnrollMin, 4,                                          \
 193           "Minimum number of unroll loop bodies before checking progress"   \
 194           "of rounds of unroll,optimize,..")                                \
 195           range(0, max_jint)                                                \
 196                                                                             \
 197   product(bool, UseSubwordForMaxVector, true,                               \
 198           "Use Subword Analysis to set maximum vector size")                \
 199                                                                             \
 200   product(bool, UseVectorCmov, false,                                       \
 201           "Use Vectorized Cmov")                                            \
 202                                                                             \
 203   develop(intx, UnrollLimitForProfileCheck, 1,                              \
 204           "Don't use profile_trip_cnt() to restrict unrolling until "       \
 205           "unrolling would push the number of unrolled iterations above "   \
 206           "UnrollLimitForProfileCheck. A higher value allows more "         \
 207           "unrolling. Zero acts as a very large value." )                   \
 208           range(0, max_intx)                                                \
 209                                                                             \
 210   product(intx, MultiArrayExpandLimit, 6,                                   \
 211           "Maximum number of individual allocations in an inline-expanded " \
 212           "multianewarray instruction")                                     \
 213           range(0, max_jint)                                                \
 214                                                                             \
 215   notproduct(bool, TraceProfileTripCount, false,                            \
 216           "Trace profile loop trip count information")                      \
 217                                                                             \
 218   product(bool, UseCountedLoopSafepoints, false,                            \
 219           "Force counted loops to keep a safepoint")                        \
 220                                                                             \
 221   product(bool, UseLoopPredicate, true,                                     \
 222           "Generate a predicate to select fast/slow loop versions")         \
 223                                                                             \
 224   develop(bool, TraceLoopPredicate, false,                                  \
 225           "Trace generation of loop predicates")                            \
 226                                                                             \
 227   develop(bool, TraceLoopOpts, false,                                       \
 228           "Trace executed loop optimizations")                              \
 229                                                                             \
 230   develop(bool, TraceLoopLimitCheck, false,                                 \
 231           "Trace generation of loop limits checks")                         \
 232                                                                             \
 233   develop(bool, TraceRangeLimitCheck, false,                                \
 234           "Trace additional overflow checks in RCE")                        \
 235                                                                             \
 236   /* OptimizeFill not yet supported on PowerPC. */                          \
 237   product(bool, OptimizeFill, true PPC64_ONLY(&& false),                    \
 238           "convert fill/copy loops into intrinsic")                         \
 239                                                                             \
 240   develop(bool, TraceOptimizeFill, false,                                   \
 241           "print detailed information about fill conversion")               \
 242                                                                             \
 243   develop(bool, OptoCoalesce, true,                                         \
 244           "Use Conservative Copy Coalescing in the Register Allocator")     \
 245                                                                             \
 246   develop(bool, UseUniqueSubclasses, true,                                  \
 247           "Narrow an abstract reference to the unique concrete subclass")   \
 248                                                                             \
 249   product(intx, TrackedInitializationLimit, 50,                             \
 250           "When initializing fields, track up to this many words")          \
 251           range(0, 65535)                                                   \
 252                                                                             \
 253   product(bool, ReduceFieldZeroing, true,                                   \
 254           "When initializing fields, try to avoid needless zeroing")        \
 255                                                                             \
 256   product(bool, ReduceInitialCardMarks, true,                               \
 257           "When initializing fields, try to avoid needless card marks")     \
 258                                                                             \
 259   product(bool, ReduceBulkZeroing, true,                                    \
 260           "When bulk-initializing, try to avoid needless zeroing")          \
 261                                                                             \
 262   product(bool, UseFPUForSpilling, false,                                   \
 263           "Spill integer registers to FPU instead of stack when possible")  \
 264                                                                             \
 265   develop_pd(intx, RegisterCostAreaRatio,                                   \
 266           "Spill selection in reg allocator: scale area by (X/64K) before " \
 267           "adding cost")                                                    \
 268                                                                             \
 269   develop_pd(bool, UseCISCSpill,                                            \
 270           "Use ADLC supplied cisc instructions during allocation")          \
 271                                                                             \
 272   notproduct(bool, VerifyGraphEdges , false,                                \
 273           "Verify Bi-directional Edges")                                    \
 274                                                                             \
 275   notproduct(bool, VerifyDUIterators, true,                                 \
 276           "Verify the safety of all iterations of Bi-directional Edges")    \
 277                                                                             \
 278   notproduct(bool, VerifyHashTableKeys, true,                               \
 279           "Verify the immutability of keys in the VN hash tables")          \
 280                                                                             \
 281   notproduct(bool, VerifyRegisterAllocator , false,                         \
 282           "Verify Register Allocator")                                      \
 283                                                                             \
 284   develop_pd(intx, FLOATPRESSURE,                                           \
 285           "Number of float LRG's that constitute high register pressure")   \
 286           range(0, max_jint)                                                \
 287                                                                             \
 288   develop_pd(intx, INTPRESSURE,                                             \
 289           "Number of integer LRG's that constitute high register pressure") \
 290           range(0, max_jint)                                                \
 291                                                                             \
 292   notproduct(bool, TraceOptoPipelining, false,                              \
 293           "Trace pipelining information")                                   \
 294                                                                             \
 295   notproduct(bool, TraceOptoOutput, false,                                  \
 296           "Trace pipelining information")                                   \
 297                                                                             \
 298   product_pd(bool, OptoScheduling,                                          \
 299           "Instruction Scheduling after register allocation")               \
 300                                                                             \
 301   product_pd(bool, OptoRegScheduling,                                       \
 302           "Instruction Scheduling before register allocation for pressure") \
 303                                                                             \
 304   product(bool, PartialPeelLoop, true,                                      \
 305           "Partial peel (rotate) loops")                                    \
 306                                                                             \
 307   product(intx, PartialPeelNewPhiDelta, 0,                                  \
 308           "Additional phis that can be created by partial peeling")         \
 309           range(0, max_jint)                                                \
 310                                                                             \
 311   notproduct(bool, TracePartialPeeling, false,                              \
 312           "Trace partial peeling (loop rotation) information")              \
 313                                                                             \
 314   product(bool, PartialPeelAtUnsignedTests, true,                           \
 315           "Partial peel at unsigned tests if no signed test exists")        \
 316                                                                             \
 317   product(bool, ReassociateInvariants, true,                                \
 318           "Enable reassociation of expressions with loop invariants.")      \
 319                                                                             \
 320   product(bool, LoopUnswitching, true,                                      \
 321           "Enable loop unswitching (a form of invariant test hoisting)")    \
 322                                                                             \
 323   notproduct(bool, TraceLoopUnswitching, false,                             \
 324           "Trace loop unswitching")                                         \
 325                                                                             \
 326   product(bool, AllowVectorizeOnDemand, true,                               \
 327           "Globally supress vectorization set in VectorizeMethod")          \
 328                                                                             \
 329   product(bool, UseSuperWord, true,                                         \
 330           "Transform scalar operations into superword operations")          \
 331                                                                             \
 332   develop(bool, SuperWordRTDepCheck, false,                                 \
 333           "Enable runtime dependency checks.")                              \
 334                                                                             \
 335   product(bool, SuperWordReductions, true,                                  \
 336           "Enable reductions support in superword.")                        \
 337                                                                             \
 338   product(bool, UseCMoveUnconditionally, false,                             \
 339           "Use CMove (scalar and vector) ignoring profitability test.")     \
 340                                                                             \
 341   product(bool, DoReserveCopyInSuperWord, true,                             \
 342           "Create reserve copy of graph in SuperWord.")                     \
 343                                                                             \
 344   notproduct(bool, TraceSuperWord, false,                                   \
 345           "Trace superword transforms")                                     \
 346                                                                             \
 347   notproduct(bool, TraceNewVectors, false,                                  \
 348           "Trace creation of Vector nodes")                                 \
 349                                                                             \
 350   product_pd(bool, OptoBundling,                                            \
 351           "Generate nops to fill i-cache lines")                            \
 352                                                                             \
 353   product_pd(intx, ConditionalMoveLimit,                                    \
 354           "Limit of ops to make speculative when using CMOVE")              \
 355           range(0, max_jint)                                                \
 356                                                                             \
 357   product(bool, UseRDPCForConstantTableBase, false,                         \
 358           "Use Sparc RDPC instruction for the constant table base.")        \
 359                                                                             \
 360   notproduct(bool, PrintIdealGraph, false,                                  \
 361           "Print ideal graph to XML file / network interface. "             \
 362           "By default attempts to connect to the visualizer on a socket.")  \
 363                                                                             \
 364   notproduct(intx, PrintIdealGraphLevel, 0,                                 \
 365           "Level of detail of the ideal graph printout. "                   \
 366           "System-wide value, -1=printing is disabled, "                    \
 367           "0=print nothing except IGVPrintLevel directives, "               \
 368           "4=all details printed. "                                         \
 369           "Level of detail of printouts can be set on a per-method level "  \
 370           "as well by using CompileCommand=option.")                        \
 371           range(-1, 4)                                                      \
 372                                                                             \
 373   notproduct(intx, PrintIdealGraphPort, 4444,                               \
 374           "Ideal graph printer to network port")                            \
 375           range(0, SHRT_MAX)                                                \
 376                                                                             \
 377   notproduct(ccstr, PrintIdealGraphAddress, "127.0.0.1",                    \
 378           "IP address to connect to visualizer")                            \
 379                                                                             \
 380   notproduct(ccstr, PrintIdealGraphFile, NULL,                              \
 381           "File to dump ideal graph to.  If set overrides the "             \
 382           "use of the network")                                             \
 383                                                                             \
 384   product(bool, UseBimorphicInlining, true,                                 \
 385           "Profiling based inlining for two receivers")                     \
 386                                                                             \
 387   product(bool, UseOnlyInlinedBimorphic, true,                              \
 388           "Don't use BimorphicInlining if can't inline a second method")    \
 389                                                                             \
 390   product(bool, InsertMemBarAfterArraycopy, true,                           \
 391           "Insert memory barrier after arraycopy call")                     \
 392                                                                             \
 393   develop(bool, SubsumeLoads, true,                                         \
 394           "Attempt to compile while subsuming loads into machine "          \
 395           "instructions.")                                                  \
 396                                                                             \
 397   develop(bool, StressRecompilation, false,                                 \
 398           "Recompile each compiled method without subsuming loads "         \
 399           "or escape analysis.")                                            \
 400                                                                             \
 401   develop(intx, ImplicitNullCheckThreshold, 3,                              \
 402           "Don't do implicit null checks if NPE's in a method exceeds "     \
 403           "limit")                                                          \
 404           range(0, max_jint)                                                \
 405                                                                             \
 406   product(intx, LoopOptsCount, 43,                                          \
 407           "Set level of loop optimization for tier 1 compiles")             \
 408           range(5, 43)                                                      \
 409                                                                             \
 410   /* controls for heat-based inlining */                                    \
 411                                                                             \
 412   develop(intx, NodeCountInliningCutoff, 18000,                             \
 413           "If parser node generation exceeds limit stop inlining")          \
 414           range(0, max_jint)                                                \
 415                                                                             \
 416   develop(intx, NodeCountInliningStep, 1000,                                \
 417           "Target size of warm calls inlined between optimization passes")  \
 418           range(0, max_jint)                                                \
 419                                                                             \
 420   develop(bool, InlineWarmCalls, false,                                     \
 421           "Use a heat-based priority queue to govern inlining")             \
 422                                                                             \
 423   /* Max values must not exceed WarmCallInfo::MAX_VALUE(). */               \
 424   develop(intx, HotCallCountThreshold, 999999,                              \
 425           "large numbers of calls (per method invocation) force hotness")   \
 426           range(0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))      \
 427                                                                             \
 428   develop(intx, HotCallProfitThreshold, 999999,                             \
 429           "highly profitable inlining opportunities force hotness")         \
 430           range(0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))      \
 431                                                                             \
 432   develop(intx, HotCallTrivialWork, -1,                                     \
 433           "trivial execution time (no larger than this) forces hotness")    \
 434           range(-1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))     \
 435                                                                             \
 436   develop(intx, HotCallTrivialSize, -1,                                     \
 437           "trivial methods (no larger than this) force calls to be hot")    \
 438           range(-1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))     \
 439                                                                             \
 440   develop(intx, WarmCallMinCount, -1,                                       \
 441           "number of calls (per method invocation) to enable inlining")     \
 442           range(-1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))     \
 443                                                                             \
 444   develop(intx, WarmCallMinProfit, -1,                                      \
 445           "number of calls (per method invocation) to enable inlining")     \
 446           range(-1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))     \
 447                                                                             \
 448   develop(intx, WarmCallMaxWork, 999999,                                    \
 449           "execution time of the largest inlinable method")                 \
 450           range(0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))      \
 451                                                                             \
 452   develop(intx, WarmCallMaxSize, 999999,                                    \
 453           "size of the largest inlinable method")                           \
 454           range(0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10))))      \
 455                                                                             \
 456   product(intx, MaxNodeLimit, 80000,                                        \
 457           "Maximum number of nodes")                                        \
 458           range(1000, max_jint / 3)                                         \
 459                                                                             \
 460   product(intx, NodeLimitFudgeFactor, 2000,                                 \
 461           "Fudge Factor for certain optimizations")                         \
 462           constraint(NodeLimitFudgeFactorConstraintFunc, AfterErgo)         \
 463                                                                             \
 464   product(bool, UseJumpTables, true,                                        \
 465           "Use JumpTables instead of a binary search tree for switches")    \
 466                                                                             \
 467   product(bool, UseDivMod, true,                                            \
 468           "Use combined DivMod instruction if available")                   \
 469                                                                             \
 470   product_pd(intx, MinJumpTableSize,                                        \
 471           "Minimum number of targets in a generated jump table")            \
 472           range(0, max_intx)                                                \
 473                                                                             \
 474   product(intx, MaxJumpTableSize, 65000,                                    \
 475           "Maximum number of targets in a generated jump table")            \
 476           range(0, max_intx)                                                \
 477                                                                             \
 478   product(intx, MaxJumpTableSparseness, 5,                                  \
 479           "Maximum sparseness for jumptables")                              \
 480           range(0, max_intx / 4)                                            \
 481                                                                             \
 482   product(bool, EliminateLocks, true,                                       \
 483           "Coarsen locks when possible")                                    \
 484                                                                             \
 485   product(bool, EliminateNestedLocks, true,                                 \
 486           "Eliminate nested locks of the same object when possible")        \
 487                                                                             \
 488   notproduct(bool, PrintLockStatistics, false,                              \
 489           "Print precise statistics on the dynamic lock usage")             \
 490                                                                             \
 491   diagnostic(bool, PrintPreciseBiasedLockingStatistics, false,              \
 492           "(Deprecated) Print per-lock-site statistics of biased locking "  \
 493           "in JVM")                                                         \
 494                                                                             \
 495   diagnostic(bool, PrintPreciseRTMLockingStatistics, false,                 \
 496           "Print per-lock-site statistics of rtm locking in JVM")           \
 497                                                                             \
 498   notproduct(bool, PrintEliminateLocks, false,                              \
 499           "Print out when locks are eliminated")                            \
 500                                                                             \
 501   product(bool, EliminateAutoBox, true,                                     \
 502           "Control optimizations for autobox elimination")                  \
 503                                                                             \
 504   product(intx, AutoBoxCacheMax, 128,                                       \
 505           "Sets max value cached by the java.lang.Integer autobox cache")   \
 506           range(0, max_jint)                                                \
 507                                                                             \
 508   diagnostic(bool, AggressiveUnboxing, true,                                \
 509           "Control optimizations for aggressive boxing elimination")        \
 510                                                                             \
 511   develop(bool, TracePostallocExpand, false, "Trace expanding nodes after"  \
 512           " register allocation.")                                          \
 513                                                                             \
 514   product(bool, DoEscapeAnalysis, true,                                     \
 515           "Perform escape analysis")                                        \
 516                                                                             \
 517   product(double, EscapeAnalysisTimeout, 20. DEBUG_ONLY(+40.),              \
 518           "Abort EA when it reaches time limit (in sec)")                   \
 519           range(0, DBL_MAX)                                                 \
 520                                                                             \
 521   develop(bool, ExitEscapeAnalysisOnTimeout, true,                          \
 522           "Exit or throw assert in EA when it reaches time limit")          \
 523                                                                             \
 524   notproduct(bool, PrintEscapeAnalysis, false,                              \
 525           "Print the results of escape analysis")                           \
 526                                                                             \
 527   product(bool, EliminateAllocations, true,                                 \
 528           "Use escape analysis to eliminate allocations")                   \
 529                                                                             \
 530   notproduct(bool, PrintEliminateAllocations, false,                        \
 531           "Print out when allocations are eliminated")                      \
 532                                                                             \
 533   product(intx, EliminateAllocationArraySizeLimit, 64,                      \
 534           "Array size (number of elements) limit for scalar replacement")   \
 535           range(0, max_jint)                                                \
 536                                                                             \
 537   product(bool, OptimizePtrCompare, true,                                   \
 538           "Use escape analysis to optimize pointers compare")               \
 539                                                                             \
 540   notproduct(bool, PrintOptimizePtrCompare, false,                          \
 541           "Print information about optimized pointers compare")             \
 542                                                                             \
 543   notproduct(bool, VerifyConnectionGraph , true,                            \
 544           "Verify Connection Graph construction in Escape Analysis")        \
 545                                                                             \
 546   product(bool, UseOptoBiasInlining, true,                                  \
 547           "(Deprecated) Generate biased locking code in C2 ideal graph")    \
 548                                                                             \
 549   product(bool, OptimizeStringConcat, true,                                 \
 550           "Optimize the construction of Strings by StringBuilder")          \
 551                                                                             \
 552   notproduct(bool, PrintOptimizeStringConcat, false,                        \
 553           "Print information about transformations performed on Strings")   \
 554                                                                             \
 555   product(intx, ValueSearchLimit, 1000,                                     \
 556           "Recursion limit in PhaseMacroExpand::value_from_mem_phi")        \
 557           range(0, max_jint)                                                \
 558                                                                             \
 559   product(intx, MaxLabelRootDepth, 1100,                                    \
 560           "Maximum times call Label_Root to prevent stack overflow")        \
 561           range(100, max_jint)                                              \
 562                                                                             \
 563   diagnostic(intx, DominatorSearchLimit, 1000,                              \
 564           "Iterations limit in Node::dominates")                            \
 565           range(0, max_jint)                                                \
 566                                                                             \
 567   product(bool, BlockLayoutByFrequency, true,                               \
 568           "Use edge frequencies to drive block ordering")                   \
 569                                                                             \
 570   product(intx, BlockLayoutMinDiamondPercentage, 20,                        \
 571           "Miniumum %% of a successor (predecessor) for which block "       \
 572           "layout a will allow a fork (join) in a single chain")            \
 573           range(0, 100)                                                     \
 574                                                                             \
 575   product(bool, BlockLayoutRotateLoops, true,                               \
 576           "Allow back branches to be fall throughs in the block layout")    \
 577                                                                             \
 578   diagnostic(bool, InlineReflectionGetCallerClass, true,                    \
 579           "inline sun.reflect.Reflection.getCallerClass(), known to be "    \
 580           "part of base library DLL")                                       \
 581                                                                             \
 582   diagnostic(bool, InlineObjectCopy, true,                                  \
 583           "inline Object.clone and Arrays.copyOf[Range] intrinsics")        \
 584                                                                             \
 585   diagnostic(bool, SpecialStringCompareTo, true,                            \
 586           "special version of string compareTo")                            \
 587                                                                             \
 588   diagnostic(bool, SpecialStringIndexOf, true,                              \
 589           "special version of string indexOf")                              \
 590                                                                             \
 591   diagnostic(bool, SpecialStringEquals, true,                               \
 592           "special version of string equals")                               \
 593                                                                             \
 594   diagnostic(bool, SpecialArraysEquals, true,                               \
 595           "special version of Arrays.equals(char[],char[])")                \
 596                                                                             \
 597   diagnostic(bool, SpecialEncodeISOArray, true,                             \
 598           "special version of ISO_8859_1$Encoder.encodeISOArray")           \
 599                                                                             \
 600   develop(bool, BailoutToInterpreterForThrows, false,                       \
 601           "Compiled methods which throws/catches exceptions will be "       \
 602           "deopt and intp.")                                                \
 603                                                                             \
 604   develop(bool, ConvertCmpD2CmpF, true,                                     \
 605           "Convert cmpD to cmpF when one input is constant in float range") \
 606                                                                             \
 607   develop(bool, ConvertFloat2IntClipping, true,                             \
 608           "Convert float2int clipping idiom to integer clipping")           \
 609                                                                             \
 610   develop(bool, MonomorphicArrayCheck, true,                                \
 611           "Uncommon-trap array store checks that require full type check")  \
 612                                                                             \
 613   notproduct(bool, TracePhaseCCP, false,                                    \
 614           "Print progress during Conditional Constant Propagation")         \
 615                                                                             \
 616   develop(bool, PrintDominators, false,                                     \
 617           "Print out dominator trees for GVN")                              \
 618                                                                             \
 619   diagnostic(bool, TraceSpilling, false,                                    \
 620           "Trace spilling")                                                 \
 621                                                                             \
 622   diagnostic(bool, TraceTypeProfile, false,                                 \
 623           "Trace type profile")                                             \
 624                                                                             \
 625   develop(bool, PoisonOSREntry, true,                                       \
 626            "Detect abnormal calls to OSR code")                             \
 627                                                                             \
 628   develop(bool, SoftMatchFailure, trueInProduct,                            \
 629           "If the DFA fails to match a node, print a message and bail out") \
 630                                                                             \
 631   develop(bool, InlineAccessors, true,                                      \
 632           "inline accessor methods (get/set)")                              \
 633                                                                             \
 634   product(intx, TypeProfileMajorReceiverPercent, 90,                        \
 635           "% of major receiver type to all profiled receivers")             \
 636           range(0, 100)                                                     \
 637                                                                             \
 638   diagnostic(bool, PrintIntrinsics, false,                                  \
 639           "prints attempted and successful inlining of intrinsics")         \
 640                                                                             \
 641   develop(bool, StressReflectiveCode, false,                                \
 642           "Use inexact types at allocations, etc., to test reflection")     \
 643                                                                             \
 644   diagnostic(bool, DebugInlinedCalls, true,                                 \
 645          "If false, restricts profiled locations to the root method only")  \
 646                                                                             \
 647   notproduct(bool, VerifyLoopOptimizations, false,                          \
 648           "verify major loop optimizations")                                \
 649                                                                             \
 650   diagnostic(bool, ProfileDynamicTypes, true,                               \
 651           "do extra type profiling and use it more aggressively")           \
 652                                                                             \
 653   develop(bool, TraceIterativeGVN, false,                                   \
 654           "Print progress during Iterative Global Value Numbering")         \
 655                                                                             \
 656   develop(bool, VerifyIterativeGVN, false,                                  \
 657           "Verify Def-Use modifications during sparse Iterative Global "    \
 658           "Value Numbering")                                                \
 659                                                                             \
 660   notproduct(bool, TraceCISCSpill, false,                                   \
 661           "Trace allocators use of cisc spillable instructions")            \
 662                                                                             \
 663   product(bool, SplitIfBlocks, true,                                        \
 664           "Clone compares and control flow through merge points to fold "   \
 665           "some branches")                                                  \
 666                                                                             \
 667   develop(intx, FreqCountInvocations,  1,                                   \
 668           "Scaling factor for branch frequencies (deprecated)")             \
 669           range(1, max_intx)                                                \
 670                                                                             \
 671   product(intx, AliasLevel,     3,                                          \
 672           "0 for no aliasing, 1 for oop/field/static/array split, "         \
 673           "2 for class split, 3 for unique instances")                      \
 674           range(0, 3)                                                       \
 675           constraint(AliasLevelConstraintFunc,AfterErgo)                    \
 676                                                                             \
 677   develop(bool, VerifyAliases, false,                                       \
 678           "perform extra checks on the results of alias analysis")          \
 679                                                                             \
 680   product(intx, MaxInlineLevel, 15,                                         \
 681           "maximum number of nested calls that are inlined by high tier "   \
 682           "compiler")                                                       \
 683           range(0, max_jint)                                                \
 684                                                                             \
 685   product(intx, MaxRecursiveInlineLevel, 1,                                 \
 686           "maximum number of nested recursive calls that are inlined by "   \
 687           "high tier compiler")                                             \
 688           range(0, max_jint)                                                \
 689                                                                             \
 690   product_pd(intx, InlineSmallCode,                                         \
 691           "Only inline already compiled methods if their code size is "     \
 692           "less than this")                                                 \
 693           range(0, max_jint)                                                \
 694                                                                             \
 695   product(intx, MaxInlineSize, 35,                                          \
 696           "The maximum bytecode size of a method to be inlined by high "    \
 697           "tier compiler")                                                  \
 698           range(0, max_jint)                                                \
 699                                                                             \
 700   product_pd(intx, FreqInlineSize,                                          \
 701           "The maximum bytecode size of a frequent method to be inlined")   \
 702           range(0, max_jint)                                                \
 703                                                                             \
 704   product(intx, MaxTrivialSize, 6,                                          \
 705           "The maximum bytecode size of a trivial method to be inlined by " \
 706           "high tier compiler")                                             \
 707           range(0, max_jint)                                                \
 708                                                                             \
 709   product(bool, IncrementalInline, true,                                    \
 710           "do post parse inlining")                                         \
 711                                                                             \
 712   develop(bool, AlwaysIncrementalInline, false,                             \
 713           "do all inlining incrementally")                                  \
 714                                                                             \
 715   product(intx, LiveNodeCountInliningCutoff, 40000,                         \
 716           "max number of live nodes in a method")                           \
 717           range(0, max_juint / 8)                                           \
 718                                                                             \
 719   diagnostic(bool, OptimizeExpensiveOps, true,                              \
 720           "Find best control for expensive operations")                     \
 721                                                                             \
 722   diagnostic(bool, UseMathExactIntrinsics, true,                            \
 723           "Enables intrinsification of various java.lang.Math functions")   \
 724                                                                             \
 725   diagnostic(bool, UseCharacterCompareIntrinsics, false,                    \
 726           "Enables intrinsification of java.lang.Character functions")      \
 727                                                                             \
 728   diagnostic(bool, UseMultiplyToLenIntrinsic, false,                        \
 729           "Enables intrinsification of BigInteger.multiplyToLen()")         \
 730                                                                             \
 731   diagnostic(bool, UseSquareToLenIntrinsic, false,                          \
 732           "Enables intrinsification of BigInteger.squareToLen()")           \
 733                                                                             \
 734   diagnostic(bool, UseMulAddIntrinsic, false,                               \
 735           "Enables intrinsification of BigInteger.mulAdd()")                \
 736                                                                             \
 737   diagnostic(bool, UseMontgomeryMultiplyIntrinsic, false,                   \
 738           "Enables intrinsification of BigInteger.montgomeryMultiply()")    \
 739                                                                             \
 740   diagnostic(bool, UseMontgomerySquareIntrinsic, false,                     \
 741           "Enables intrinsification of BigInteger.montgomerySquare()")      \
 742                                                                             \
 743   product(bool, UseTypeSpeculation, true,                                   \
 744           "Speculatively propagate types from profiles")                    \
 745                                                                             \
 746   diagnostic(bool, UseInlineDepthForSpeculativeTypes, true,                 \
 747           "Carry inline depth of profile point with speculative type "      \
 748           "and give priority to profiling from lower inline depth")         \
 749                                                                             \
 750   product_pd(bool, TrapBasedRangeChecks,                                    \
 751           "Generate code for range checks that uses a cmp and trap "        \
 752           "instruction raising SIGTRAP. Used on PPC64.")                    \
 753                                                                             \
 754   product(intx, ArrayCopyLoadStoreMaxElem, 8,                               \
 755           "Maximum number of arraycopy elements inlined as a sequence of"   \
 756           "loads/stores")                                                   \
 757           range(0, max_intx)                                                \
 758                                                                             \
 759   develop(bool, StressArrayCopyMacroNode, false,                            \
 760           "Perform ArrayCopy load/store replacement during IGVN only")      \
 761                                                                             \
 762   develop(bool, RenumberLiveNodes, true,                                    \
 763           "Renumber live nodes")                                            \
 764                                                                             \
 765   product(uintx, LoopStripMiningIter, 0,                                    \
 766           "Number of iterations in strip mined loop")                       \
 767           range(0, max_juint)                                               \
 768                                                                             \
 769   product(uintx, LoopStripMiningIterShortLoop, 0,                           \
 770           "Loop with fewer iterations are not strip mined")                 \
 771           range(0, max_juint)                                               \
 772                                                                             \
 773   product(bool, UseProfiledLoopPredicate, true,                             \
 774           "Move predicates out of loops based on profiling data")           \
 775                                                                             \
 776   diagnostic(bool, ExpandSubTypeCheckAtParseTime, false,                    \
 777           "Do not use subtype check macro node")                            \
 778 
 779 #endif // SHARE_OPTO_C2_GLOBALS_HPP