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   diagnostic_pd(bool, IdealizeClearArrayNode,                               \
 124           "Replace ClearArrayNode by subgraph of basic operations.")        \
 125                                                                             \
 126   develop(bool, OptoBreakpoint, false,                                      \
 127           "insert breakpoint at method entry")                              \
 128                                                                             \
 129   notproduct(bool, OptoBreakpointOSR, false,                                \
 130           "insert breakpoint at osr method entry")                          \
 131                                                                             \
 132   notproduct(intx, BreakAtNode, 0,                                          \
 133           "Break at construction of this Node (either _idx or _debug_idx)") \
 134                                                                             \
 135   notproduct(bool, OptoBreakpointC2R, false,                                \
 136           "insert breakpoint at runtime stub entry")                        \
 137                                                                             \
 138   notproduct(bool, OptoNoExecute, false,                                    \
 139           "Attempt to parse and compile but do not execute generated code") \
 140                                                                             \
 141   notproduct(bool, PrintOptoStatistics, false,                              \
 142           "Print New compiler statistics")                                  \
 143                                                                             \
 144   diagnostic(bool, PrintOptoAssembly, false,                                \
 145           "Print New compiler assembly output")                             \
 146                                                                             \
 147   develop_pd(bool, OptoPeephole,                                            \
 148           "Apply peephole optimizations after register allocation")         \
 149                                                                             \
 150   develop(bool, OptoRemoveUseless, true,                                    \
 151           "Remove useless nodes after parsing")                             \
 152                                                                             \
 153   notproduct(bool, PrintFrameConverterAssembly, false,                      \
 154           "Print New compiler assembly output for frame converters")        \
 155                                                                             \
 156   notproduct(bool, PrintParseStatistics, false,                             \
 157           "Print nodes, transforms and new values made per bytecode parsed")\
 158                                                                             \
 159   notproduct(bool, PrintOptoPeephole, false,                                \
 160           "Print New compiler peephole replacements")                       \
 161                                                                             \
 162   develop(bool, PrintCFGBlockFreq, false,                                   \
 163           "Print CFG block freqencies")                                     \
 164                                                                             \
 165   develop(bool, TraceOptoParse, false,                                      \
 166           "Trace bytecode parse and control-flow merge")                    \
 167                                                                             \
 168   product_pd(intx,  LoopUnrollLimit,                                        \
 169           "Unroll loop bodies with node count less than this")              \
 170           range(0, max_jint / 4)                                            \
 171                                                                             \
 172   product_pd(intx, LoopPercentProfileLimit,                                 \
 173              "Unroll loop bodies with % node count of profile limit")       \
 174              range(10, 100)                                                 \
 175                                                                             \
 176   product(intx,  LoopMaxUnroll, 16,                                         \
 177           "Maximum number of unrolls for main loop")                        \
 178           range(0, max_jint)                                                \
 179                                                                             \
 180   product_pd(bool,  SuperWordLoopUnrollAnalysis,                            \
 181            "Map number of unrolls for main loop via "                       \
 182            "Superword Level Parallelism analysis")                          \
 183                                                                             \
 184   diagnostic_pd(bool, PostLoopMultiversioning,                              \
 185            "Multi versioned post loops to eliminate range checks")          \
 186                                                                             \
 187   notproduct(bool, TraceSuperWordLoopUnrollAnalysis, false,                 \
 188           "Trace what Superword Level Parallelism analysis applies")        \
 189                                                                             \
 190   product(intx,  LoopUnrollMin, 4,                                          \
 191           "Minimum number of unroll loop bodies before checking progress"   \
 192           "of rounds of unroll,optimize,..")                                \
 193           range(0, max_jint)                                                \
 194                                                                             \
 195   develop(intx, UnrollLimitForProfileCheck, 1,                              \
 196           "Don't use profile_trip_cnt() to restrict unrolling until "       \
 197           "unrolling would push the number of unrolled iterations above "   \
 198           "UnrollLimitForProfileCheck. A higher value allows more "         \
 199           "unrolling. Zero acts as a very large value." )                   \
 200           range(0, max_intx)                                                \
 201                                                                             \
 202   product(intx, MultiArrayExpandLimit, 6,                                   \
 203           "Maximum number of individual allocations in an inline-expanded " \
 204           "multianewarray instruction")                                     \
 205           range(0, max_jint)                                                \
 206                                                                             \
 207   notproduct(bool, TraceProfileTripCount, false,                            \
 208           "Trace profile loop trip count information")                      \
 209                                                                             \
 210   product(bool, UseCountedLoopSafepoints, false,                            \
 211           "Force counted loops to keep a safepoint")                        \
 212                                                                             \
 213   product(bool, UseLoopPredicate, true,                                     \
 214           "Generate a predicate to select fast/slow loop versions")         \
 215                                                                             \
 216   develop(bool, TraceLoopPredicate, false,                                  \
 217           "Trace generation of loop predicates")                            \
 218                                                                             \
 219   develop(bool, TraceLoopOpts, false,                                       \
 220           "Trace executed loop optimizations")                              \
 221                                                                             \
 222   develop(bool, TraceLoopLimitCheck, false,                                 \
 223           "Trace generation of loop limits checks")                         \
 224                                                                             \
 225   develop(bool, TraceRangeLimitCheck, false,                                \
 226           "Trace additional overflow checks in RCE")                        \
 227                                                                             \
 228   /* OptimizeFill not yet supported on PowerPC. */                          \
 229   product(bool, OptimizeFill, true PPC64_ONLY(&& false),                    \
 230           "convert fill/copy loops into intrinsic")                         \
 231                                                                             \
 232   develop(bool, TraceOptimizeFill, false,                                   \
 233           "print detailed information about fill conversion")               \
 234                                                                             \
 235   develop(bool, OptoCoalesce, true,                                         \
 236           "Use Conservative Copy Coalescing in the Register Allocator")     \
 237                                                                             \
 238   develop(bool, UseUniqueSubclasses, true,                                  \
 239           "Narrow an abstract reference to the unique concrete subclass")   \
 240                                                                             \
 241   develop(bool, UseExactTypes, true,                                        \
 242           "Use exact types to eliminate array store checks and v-calls")    \
 243                                                                             \
 244   product(intx, TrackedInitializationLimit, 50,                             \
 245           "When initializing fields, track up to this many words")          \
 246           range(0, 65535)                                                   \
 247                                                                             \
 248   product(bool, ReduceFieldZeroing, true,                                   \
 249           "When initializing fields, try to avoid needless zeroing")        \
 250                                                                             \
 251   product(bool, ReduceInitialCardMarks, true,                               \
 252           "When initializing fields, try to avoid needless card marks")     \
 253                                                                             \
 254   product(bool, ReduceBulkZeroing, true,                                    \
 255           "When bulk-initializing, try to avoid needless zeroing")          \
 256                                                                             \
 257   product(bool, UseFPUForSpilling, false,                                   \
 258           "Spill integer registers to FPU instead of stack when possible")  \
 259                                                                             \
 260   develop_pd(intx, RegisterCostAreaRatio,                                   \
 261           "Spill selection in reg allocator: scale area by (X/64K) before " \
 262           "adding cost")                                                    \
 263                                                                             \
 264   develop_pd(bool, UseCISCSpill,                                            \
 265           "Use ADLC supplied cisc instructions during allocation")          \
 266                                                                             \
 267   notproduct(bool, VerifyGraphEdges , false,                                \
 268           "Verify Bi-directional Edges")                                    \
 269                                                                             \
 270   notproduct(bool, VerifyDUIterators, true,                                 \
 271           "Verify the safety of all iterations of Bi-directional Edges")    \
 272                                                                             \
 273   notproduct(bool, VerifyHashTableKeys, true,                               \
 274           "Verify the immutability of keys in the VN hash tables")          \
 275                                                                             \
 276   notproduct(bool, VerifyRegisterAllocator , false,                         \
 277           "Verify Register Allocator")                                      \
 278                                                                             \
 279   develop_pd(intx, FLOATPRESSURE,                                           \
 280           "Number of float LRG's that constitute high register pressure")   \
 281           range(0, max_jint)                                                \
 282                                                                             \
 283   develop_pd(intx, INTPRESSURE,                                             \
 284           "Number of integer LRG's that constitute high register pressure") \
 285           range(0, max_jint)                                                \
 286                                                                             \
 287   notproduct(bool, TraceOptoPipelining, false,                              \
 288           "Trace pipelining information")                                   \
 289                                                                             \
 290   notproduct(bool, TraceOptoOutput, false,                                  \
 291           "Trace pipelining information")                                   \
 292                                                                             \
 293   product_pd(bool, OptoScheduling,                                          \
 294           "Instruction Scheduling after register allocation")               \
 295                                                                             \
 296   product_pd(bool, OptoRegScheduling,                                       \
 297           "Instruction Scheduling before register allocation for pressure") \
 298                                                                             \
 299   product(bool, PartialPeelLoop, true,                                      \
 300           "Partial peel (rotate) loops")                                    \
 301                                                                             \
 302   product(intx, PartialPeelNewPhiDelta, 0,                                  \
 303           "Additional phis that can be created by partial peeling")         \
 304           range(0, max_jint)                                                \
 305                                                                             \
 306   notproduct(bool, TracePartialPeeling, false,                              \
 307           "Trace partial peeling (loop rotation) information")              \
 308                                                                             \
 309   product(bool, PartialPeelAtUnsignedTests, true,                           \
 310           "Partial peel at unsigned tests if no signed test exists")        \
 311                                                                             \
 312   product(bool, ReassociateInvariants, true,                                \
 313           "Enable reassociation of expressions with loop invariants.")      \
 314                                                                             \
 315   product(bool, LoopUnswitching, true,                                      \
 316           "Enable loop unswitching (a form of invariant test hoisting)")    \
 317                                                                             \
 318   notproduct(bool, TraceLoopUnswitching, false,                             \
 319           "Trace loop unswitching")                                         \
 320                                                                             \
 321   product(bool, AllowVectorizeOnDemand, true,                               \
 322           "Globally supress vectorization set in VectorizeMethod")          \
 323                                                                             \
 324   product(bool, UseSuperWord, true,                                         \
 325           "Transform scalar operations into superword operations")          \
 326                                                                             \
 327   develop(bool, SuperWordRTDepCheck, false,                                 \
 328           "Enable runtime dependency checks.")                              \
 329                                                                             \
 330   product(bool, SuperWordReductions, true,                                  \
 331           "Enable reductions support in superword.")                        \
 332                                                                             \
 333   product(bool, UseCMoveUnconditionally, false,                             \
 334           "Use CMove (scalar and vector) ignoring profitability test.")     \
 335                                                                             \
 336   product(bool, DoReserveCopyInSuperWord, true,                             \
 337           "Create reserve copy of graph in SuperWord.")                     \
 338                                                                             \
 339   notproduct(bool, TraceSuperWord, false,                                   \
 340           "Trace superword transforms")                                     \
 341                                                                             \
 342   notproduct(bool, TraceNewVectors, false,                                  \
 343           "Trace creation of Vector nodes")                                 \
 344                                                                             \
 345   product_pd(bool, OptoBundling,                                            \
 346           "Generate nops to fill i-cache lines")                            \
 347                                                                             \
 348   product_pd(intx, ConditionalMoveLimit,                                    \
 349           "Limit of ops to make speculative when using CMOVE")              \
 350           range(0, max_jint)                                                \
 351                                                                             \
 352   /* Set BranchOnRegister == false. See 4965987. */                         \
 353   product(bool, BranchOnRegister, false,                                    \
 354           "Use Sparc V9 branch-on-register opcodes")                        \
 355                                                                             \
 356   develop(bool, SparcV9RegsHiBitsZero, true,                                \
 357           "Assume Sparc V9 I&L registers on V8+ systems are zero-extended") \
 358                                                                             \
 359   product(bool, UseRDPCForConstantTableBase, false,                         \
 360           "Use Sparc RDPC instruction for the constant table base.")        \
 361                                                                             \
 362   notproduct(bool, PrintIdealGraph, false,                                  \
 363           "Print ideal graph to XML file / network interface. "             \
 364           "By default attempts to connect to the visualizer on a socket.")  \
 365                                                                             \
 366   notproduct(intx, PrintIdealGraphLevel, 0,                                 \
 367           "Level of detail of the ideal graph printout. "                   \
 368           "System-wide value, 0=nothing is printed, 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(0, 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           "Print per-lock-site statistics of biased locking in JVM")        \
 493                                                                             \
 494   diagnostic(bool, PrintPreciseRTMLockingStatistics, false,                 \
 495           "Print per-lock-site statistics of rtm locking in JVM")           \
 496                                                                             \
 497   notproduct(bool, PrintEliminateLocks, false,                              \
 498           "Print out when locks are eliminated")                            \
 499                                                                             \
 500   product(bool, EliminateAutoBox, true,                                     \
 501           "Control optimizations for autobox elimination")                  \
 502                                                                             \
 503   diagnostic(bool, UseImplicitStableValues, true,                           \
 504           "Mark well-known stable fields as such (e.g. String.value)")      \
 505                                                                             \
 506   product(intx, AutoBoxCacheMax, 128,                                       \
 507           "Sets max value cached by the java.lang.Integer autobox cache")   \
 508           range(0, max_jint)                                                \
 509                                                                             \
 510   experimental(bool, AggressiveUnboxing, false,                             \
 511           "Control optimizations for aggressive boxing elimination")        \
 512                                                                             \
 513   develop(bool, TracePostallocExpand, false, "Trace expanding nodes after"  \
 514           " register allocation.")                                          \
 515                                                                             \
 516   product(bool, DoEscapeAnalysis, true,                                     \
 517           "Perform escape analysis")                                        \
 518                                                                             \
 519   product(double, EscapeAnalysisTimeout, 20. DEBUG_ONLY(+40.),              \
 520           "Abort EA when it reaches time limit (in sec)")                   \
 521           range(0, DBL_MAX)                                                 \
 522                                                                             \
 523   develop(bool, ExitEscapeAnalysisOnTimeout, true,                          \
 524           "Exit or throw assert in EA when it reaches time limit")          \
 525                                                                             \
 526   notproduct(bool, PrintEscapeAnalysis, false,                              \
 527           "Print the results of escape analysis")                           \
 528                                                                             \
 529   product(bool, EliminateAllocations, true,                                 \
 530           "Use escape analysis to eliminate allocations")                   \
 531                                                                             \
 532   notproduct(bool, PrintEliminateAllocations, false,                        \
 533           "Print out when allocations are eliminated")                      \
 534                                                                             \
 535   product(intx, EliminateAllocationArraySizeLimit, 64,                      \
 536           "Array size (number of elements) limit for scalar replacement")   \
 537           range(0, max_jint)                                                \
 538                                                                             \
 539   product(bool, OptimizePtrCompare, true,                                   \
 540           "Use escape analysis to optimize pointers compare")               \
 541                                                                             \
 542   notproduct(bool, PrintOptimizePtrCompare, false,                          \
 543           "Print information about optimized pointers compare")             \
 544                                                                             \
 545   notproduct(bool, VerifyConnectionGraph , true,                            \
 546           "Verify Connection Graph construction in Escape Analysis")        \
 547                                                                             \
 548   product(bool, UseOptoBiasInlining, true,                                  \
 549           "Generate biased locking code in C2 ideal graph")                 \
 550                                                                             \
 551   product(bool, OptimizeStringConcat, true,                                 \
 552           "Optimize the construction of Strings by StringBuilder")          \
 553                                                                             \
 554   notproduct(bool, PrintOptimizeStringConcat, false,                        \
 555           "Print information about transformations performed on Strings")   \
 556                                                                             \
 557   product(intx, ValueSearchLimit, 1000,                                     \
 558           "Recursion limit in PhaseMacroExpand::value_from_mem_phi")        \
 559           range(0, max_jint)                                                \
 560                                                                             \
 561   product(intx, MaxLabelRootDepth, 1100,                                    \
 562           "Maximum times call Label_Root to prevent stack overflow")        \
 563           range(100, max_jint)                                              \
 564                                                                             \
 565   diagnostic(intx, DominatorSearchLimit, 1000,                              \
 566           "Iterations limit in Node::dominates")                            \
 567           range(0, max_jint)                                                \
 568                                                                             \
 569   product(bool, BlockLayoutByFrequency, true,                               \
 570           "Use edge frequencies to drive block ordering")                   \
 571                                                                             \
 572   product(intx, BlockLayoutMinDiamondPercentage, 20,                        \
 573           "Miniumum %% of a successor (predecessor) for which block "       \
 574           "layout a will allow a fork (join) in a single chain")            \
 575           range(0, 100)                                                     \
 576                                                                             \
 577   product(bool, BlockLayoutRotateLoops, true,                               \
 578           "Allow back branches to be fall throughs in the block layout")    \
 579                                                                             \
 580   diagnostic(bool, InlineReflectionGetCallerClass, true,                    \
 581           "inline sun.reflect.Reflection.getCallerClass(), known to be "    \
 582           "part of base library DLL")                                       \
 583                                                                             \
 584   diagnostic(bool, InlineObjectCopy, true,                                  \
 585           "inline Object.clone and Arrays.copyOf[Range] intrinsics")        \
 586                                                                             \
 587   diagnostic(bool, SpecialStringCompareTo, true,                            \
 588           "special version of string compareTo")                            \
 589                                                                             \
 590   diagnostic(bool, SpecialStringIndexOf, true,                              \
 591           "special version of string indexOf")                              \
 592                                                                             \
 593   diagnostic(bool, SpecialStringEquals, true,                               \
 594           "special version of string equals")                               \
 595                                                                             \
 596   diagnostic(bool, SpecialArraysEquals, true,                               \
 597           "special version of Arrays.equals(char[],char[])")                \
 598                                                                             \
 599   diagnostic(bool, SpecialEncodeISOArray, true,                             \
 600           "special version of ISO_8859_1$Encoder.encodeISOArray")           \
 601                                                                             \
 602   develop(bool, BailoutToInterpreterForThrows, false,                       \
 603           "Compiled methods which throws/catches exceptions will be "       \
 604           "deopt and intp.")                                                \
 605                                                                             \
 606   develop(bool, ConvertCmpD2CmpF, true,                                     \
 607           "Convert cmpD to cmpF when one input is constant in float range") \
 608                                                                             \
 609   develop(bool, ConvertFloat2IntClipping, true,                             \
 610           "Convert float2int clipping idiom to integer clipping")           \
 611                                                                             \
 612   develop(bool, Use24BitFPMode, true,                                       \
 613           "Set 24-bit FPU mode on a per-compile basis ")                    \
 614                                                                             \
 615   develop(bool, Use24BitFP, true,                                           \
 616           "use FP instructions that produce 24-bit precise results")        \
 617                                                                             \
 618   develop(bool, MonomorphicArrayCheck, true,                                \
 619           "Uncommon-trap array store checks that require full type check")  \
 620                                                                             \
 621   notproduct(bool, TracePhaseCCP, false,                                    \
 622           "Print progress during Conditional Constant Propagation")         \
 623                                                                             \
 624   develop(bool, PrintDominators, false,                                     \
 625           "Print out dominator trees for GVN")                              \
 626                                                                             \
 627   diagnostic(bool, TraceSpilling, false,                                    \
 628           "Trace spilling")                                                 \
 629                                                                             \
 630   diagnostic(bool, TraceTypeProfile, false,                                 \
 631           "Trace type profile")                                             \
 632                                                                             \
 633   develop(bool, PoisonOSREntry, true,                                       \
 634            "Detect abnormal calls to OSR code")                             \
 635                                                                             \
 636   develop(bool, SoftMatchFailure, trueInProduct,                            \
 637           "If the DFA fails to match a node, print a message and bail out") \
 638                                                                             \
 639   develop(bool, InlineAccessors, true,                                      \
 640           "inline accessor methods (get/set)")                              \
 641                                                                             \
 642   product(intx, TypeProfileMajorReceiverPercent, 90,                        \
 643           "% of major receiver type to all profiled receivers")             \
 644           range(0, 100)                                                     \
 645                                                                             \
 646   diagnostic(bool, PrintIntrinsics, false,                                  \
 647           "prints attempted and successful inlining of intrinsics")         \
 648                                                                             \
 649   develop(bool, StressReflectiveCode, false,                                \
 650           "Use inexact types at allocations, etc., to test reflection")     \
 651                                                                             \
 652   diagnostic(bool, DebugInlinedCalls, true,                                 \
 653          "If false, restricts profiled locations to the root method only")  \
 654                                                                             \
 655   notproduct(bool, VerifyLoopOptimizations, false,                          \
 656           "verify major loop optimizations")                                \
 657                                                                             \
 658   diagnostic(bool, ProfileDynamicTypes, true,                               \
 659           "do extra type profiling and use it more aggressively")           \
 660                                                                             \
 661   develop(bool, TraceIterativeGVN, false,                                   \
 662           "Print progress during Iterative Global Value Numbering")         \
 663                                                                             \
 664   develop(bool, VerifyIterativeGVN, false,                                  \
 665           "Verify Def-Use modifications during sparse Iterative Global "    \
 666           "Value Numbering")                                                \
 667                                                                             \
 668   notproduct(bool, TraceCISCSpill, false,                                   \
 669           "Trace allocators use of cisc spillable instructions")            \
 670                                                                             \
 671   product(bool, SplitIfBlocks, true,                                        \
 672           "Clone compares and control flow through merge points to fold "   \
 673           "some branches")                                                  \
 674                                                                             \
 675   develop(intx, FreqCountInvocations,  1,                                   \
 676           "Scaling factor for branch frequencies (deprecated)")             \
 677           range(1, max_intx)                                                \
 678                                                                             \
 679   product(intx, AliasLevel,     3,                                          \
 680           "0 for no aliasing, 1 for oop/field/static/array split, "         \
 681           "2 for class split, 3 for unique instances")                      \
 682           range(0, 3)                                                       \
 683           constraint(AliasLevelConstraintFunc,AfterErgo)                    \
 684                                                                             \
 685   develop(bool, VerifyAliases, false,                                       \
 686           "perform extra checks on the results of alias analysis")          \
 687                                                                             \
 688   product(bool, IncrementalInline, true,                                    \
 689           "do post parse inlining")                                         \
 690                                                                             \
 691   develop(bool, AlwaysIncrementalInline, false,                             \
 692           "do all inlining incrementally")                                  \
 693                                                                             \
 694   product(intx, LiveNodeCountInliningCutoff, 40000,                         \
 695           "max number of live nodes in a method")                           \
 696           range(0, max_juint / 8)                                           \
 697                                                                             \
 698   diagnostic(bool, OptimizeExpensiveOps, true,                              \
 699           "Find best control for expensive operations")                     \
 700                                                                             \
 701   diagnostic(bool, UseMathExactIntrinsics, true,                            \
 702           "Enables intrinsification of various java.lang.Math functions")   \
 703                                                                             \
 704   diagnostic(bool, UseMultiplyToLenIntrinsic, false,                        \
 705           "Enables intrinsification of BigInteger.multiplyToLen()")         \
 706                                                                             \
 707   diagnostic(bool, UseSquareToLenIntrinsic, false,                          \
 708           "Enables intrinsification of BigInteger.squareToLen()")           \
 709                                                                             \
 710   diagnostic(bool, UseMulAddIntrinsic, false,                               \
 711           "Enables intrinsification of BigInteger.mulAdd()")                \
 712                                                                             \
 713   diagnostic(bool, UseMontgomeryMultiplyIntrinsic, false,                   \
 714           "Enables intrinsification of BigInteger.montgomeryMultiply()")    \
 715                                                                             \
 716   diagnostic(bool, UseMontgomerySquareIntrinsic, false,                     \
 717           "Enables intrinsification of BigInteger.montgomerySquare()")      \
 718                                                                             \
 719   product(bool, UseTypeSpeculation, true,                                   \
 720           "Speculatively propagate types from profiles")                    \
 721                                                                             \
 722   diagnostic(bool, UseInlineDepthForSpeculativeTypes, true,                 \
 723           "Carry inline depth of profile point with speculative type "      \
 724           "and give priority to profiling from lower inline depth")         \
 725                                                                             \
 726   product_pd(bool, TrapBasedRangeChecks,                                    \
 727           "Generate code for range checks that uses a cmp and trap "        \
 728           "instruction raising SIGTRAP. Used on PPC64.")                    \
 729                                                                             \
 730   product(intx, ArrayCopyLoadStoreMaxElem, 8,                               \
 731           "Maximum number of arraycopy elements inlined as a sequence of"   \
 732           "loads/stores")                                                   \
 733           range(0, max_intx)                                                \
 734                                                                             \
 735   develop(bool, StressArrayCopyMacroNode, false,                            \
 736           "Perform ArrayCopy load/store replacement during IGVN only")      \
 737                                                                             \
 738   develop(bool, RenumberLiveNodes, true,                                    \
 739           "Renumber live nodes")                                            \
 740 
 741 C2_FLAGS(DECLARE_DEVELOPER_FLAG, \
 742          DECLARE_PD_DEVELOPER_FLAG, \
 743          DECLARE_PRODUCT_FLAG, \
 744          DECLARE_PD_PRODUCT_FLAG, \
 745          DECLARE_DIAGNOSTIC_FLAG, \
 746          DECLARE_PD_DIAGNOSTIC_FLAG, \
 747          DECLARE_EXPERIMENTAL_FLAG, \
 748          DECLARE_NOTPRODUCT_FLAG, \
 749          IGNORE_RANGE, \
 750          IGNORE_CONSTRAINT, \
 751          IGNORE_WRITEABLE)
 752 
 753 #endif // SHARE_VM_OPTO_C2_GLOBALS_HPP