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