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