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