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