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 product_pd(bool, OptoBundling, \ 371 "Generate nops to fill i-cache lines") \ 372 \ 373 product_pd(intx, ConditionalMoveLimit, \ 374 "Limit of ops to make speculative when using CMOVE") \ 375 range(0, max_jint) \ 376 \ 377 develop(bool, PrintIdealGraph, false, \ 378 "Print ideal graph to XML file / network interface. " \ 379 "By default attempts to connect to the visualizer on a socket.") \ 380 \ 381 develop(intx, PrintIdealGraphLevel, 0, \ 382 "Level of detail of the ideal graph printout. " \ 383 "System-wide value, -1=printing is disabled, " \ 384 "0=print nothing except IGVPrintLevel directives, " \ 385 "6=all details printed. " \ 386 "Level of detail of printouts can be set on a per-method level " \ 387 "as well by using CompileCommand=option.") \ 388 range(-1, 6) \ 389 \ 390 develop(intx, PrintIdealGraphPort, 4444, \ 391 "Ideal graph printer to network port") \ 392 range(0, SHRT_MAX) \ 393 \ 394 develop(ccstr, PrintIdealGraphAddress, "127.0.0.1", \ 395 "IP address to connect to visualizer") \ 396 \ 397 develop(ccstr, PrintIdealGraphFile, nullptr, \ 398 "File to dump ideal graph to. If set overrides the " \ 399 "use of the network") \ 400 \ 401 product(bool, UseBimorphicInlining, true, \ 402 "Profiling based inlining for two receivers") \ 403 \ 404 product(bool, UseOnlyInlinedBimorphic, true, \ 405 "Don't use BimorphicInlining if can't inline a second method") \ 406 \ 407 develop(bool, SubsumeLoads, true, \ 408 "Attempt to compile while subsuming loads into machine " \ 409 "instructions.") \ 410 \ 411 develop(bool, StressRecompilation, false, \ 412 "Recompile each compiled method without subsuming loads " \ 413 "or escape analysis.") \ 414 \ 415 develop(intx, ImplicitNullCheckThreshold, 3, \ 416 "Don't do implicit null checks if NPE's in a method exceeds " \ 417 "limit") \ 418 range(0, max_jint) \ 419 \ 420 product(intx, LoopOptsCount, 43, \ 421 "Set level of loop optimization for tier 1 compiles") \ 422 range(5, 43) \ 423 \ 424 product(bool, OptimizeUnstableIf, true, DIAGNOSTIC, \ 425 "Optimize UnstableIf traps") \ 426 \ 427 /* controls for heat-based inlining */ \ 428 \ 429 develop(intx, NodeCountInliningCutoff, 18000, \ 430 "If parser node generation exceeds limit stop inlining") \ 431 range(0, max_jint) \ 432 \ 433 product(intx, MaxNodeLimit, 80000, \ 434 "Maximum number of nodes") \ 435 range(1000, max_jint / 3) \ 436 \ 437 product(intx, NodeLimitFudgeFactor, 2000, \ 438 "Fudge Factor for certain optimizations") \ 439 constraint(NodeLimitFudgeFactorConstraintFunc, AfterErgo) \ 440 \ 441 product(bool, UseJumpTables, true, \ 442 "Use JumpTables instead of a binary search tree for switches") \ 443 \ 444 product(bool, UseDivMod, true, \ 445 "Use combined DivMod instruction if available") \ 446 \ 447 product_pd(intx, MinJumpTableSize, \ 448 "Minimum number of targets in a generated jump table") \ 449 range(0, max_intx) \ 450 \ 451 product(intx, MaxJumpTableSize, 65000, \ 452 "Maximum number of targets in a generated jump table") \ 453 range(0, max_intx) \ 454 \ 455 product(intx, MaxJumpTableSparseness, 5, \ 456 "Maximum sparseness for jumptables") \ 457 range(0, max_intx / 4) \ 458 \ 459 product(bool, EliminateLocks, true, \ 460 "Coarsen locks when possible") \ 461 \ 462 product(bool, EliminateNestedLocks, true, \ 463 "Eliminate nested locks of the same object when possible") \ 464 \ 465 develop(bool, PrintLockStatistics, false, \ 466 "Print precise statistics on the dynamic lock usage") \ 467 \ 468 develop(bool, PrintEliminateLocks, false, \ 469 "Print out when locks are eliminated") \ 470 \ 471 product(bool, EliminateAutoBox, true, \ 472 "Control optimizations for autobox elimination") \ 473 \ 474 product(intx, AutoBoxCacheMax, 128, \ 475 "Sets max value cached by the java.lang.Integer autobox cache") \ 476 range(0, max_jint) \ 477 \ 478 product(bool, AggressiveUnboxing, true, DIAGNOSTIC, \ 479 "Control optimizations for aggressive boxing elimination") \ 480 \ 481 develop(bool, TracePostallocExpand, false, "Trace expanding nodes after" \ 482 " register allocation.") \ 483 \ 484 product(bool, ReduceAllocationMerges, true, DIAGNOSTIC, \ 485 "Try to simplify allocation merges before Scalar Replacement") \ 486 \ 487 develop(bool, TraceReduceAllocationMerges, false, \ 488 "Trace decision for simplifying allocation merges.") \ 489 \ 490 develop(bool, VerifyReduceAllocationMerges, true, \ 491 "Verify reduce allocation merges in escape analysis") \ 492 \ 493 product(bool, DoEscapeAnalysis, true, \ 494 "Perform escape analysis") \ 495 \ 496 product(double, EscapeAnalysisTimeout, 20. DEBUG_ONLY(+40.), \ 497 "Abort EA when it reaches time limit (in sec)") \ 498 range(0, DBL_MAX) \ 499 \ 500 develop(bool, ExitEscapeAnalysisOnTimeout, true, \ 501 "Exit or throw assert in EA when it reaches time limit") \ 502 \ 503 develop(bool, PrintEscapeAnalysis, false, \ 504 "Print the results of escape analysis") \ 505 \ 506 product(bool, EliminateAllocations, true, \ 507 "Use escape analysis to eliminate allocations") \ 508 \ 509 develop(bool, PrintEliminateAllocations, false, \ 510 "Print out when allocations are eliminated") \ 511 \ 512 product(intx, EliminateAllocationArraySizeLimit, 64, \ 513 "Array size (number of elements) limit for scalar replacement") \ 514 range(0, max_jint) \ 515 \ 516 product(intx, EliminateAllocationFieldsLimit, 512, DIAGNOSTIC, \ 517 "Number of fields in instance limit for scalar replacement") \ 518 range(0, max_jint) \ 519 \ 520 product(bool, OptimizePtrCompare, true, \ 521 "Use escape analysis to optimize pointers compare") \ 522 \ 523 develop(bool, PrintOptimizePtrCompare, false, \ 524 "Print information about optimized pointers compare") \ 525 \ 526 develop(bool, VerifyConnectionGraph , true, \ 527 "Verify Connection Graph construction in Escape Analysis") \ 528 \ 529 product(bool, OptimizeStringConcat, true, \ 530 "Optimize the construction of Strings by StringBuilder") \ 531 \ 532 develop(bool, PrintOptimizeStringConcat, false, \ 533 "Print information about transformations performed on Strings") \ 534 \ 535 product(intx, ValueSearchLimit, 1000, \ 536 "Recursion limit in PhaseMacroExpand::value_from_mem_phi") \ 537 range(0, max_jint) \ 538 \ 539 product(intx, MaxLabelRootDepth, 1100, \ 540 "Maximum times call Label_Root to prevent stack overflow") \ 541 range(100, max_jint) \ 542 \ 543 product(intx, DominatorSearchLimit, 1000, DIAGNOSTIC, \ 544 "Iterations limit in Node::dominates") \ 545 range(0, max_jint) \ 546 \ 547 product(bool, BlockLayoutByFrequency, true, \ 548 "Use edge frequencies to drive block ordering") \ 549 \ 550 product(intx, BlockLayoutMinDiamondPercentage, 20, \ 551 "Minimum %% of a successor (predecessor) for which block " \ 552 "layout a will allow a fork (join) in a single chain") \ 553 range(0, 100) \ 554 \ 555 product(bool, BlockLayoutRotateLoops, true, \ 556 "Allow back branches to be fall throughs in the block layout") \ 557 \ 558 product(bool, InlineReflectionGetCallerClass, true, DIAGNOSTIC, \ 559 "inline sun.reflect.Reflection.getCallerClass(), known to be " \ 560 "part of base library DLL") \ 561 \ 562 product(bool, InlineObjectCopy, true, DIAGNOSTIC, \ 563 "inline Object.clone and Arrays.copyOf[Range] intrinsics") \ 564 \ 565 product(bool, SpecialStringCompareTo, true, DIAGNOSTIC, \ 566 "special version of string compareTo") \ 567 \ 568 product(bool, SpecialStringIndexOf, true, DIAGNOSTIC, \ 569 "special version of string indexOf") \ 570 \ 571 product(bool, SpecialStringEquals, true, DIAGNOSTIC, \ 572 "special version of string equals") \ 573 \ 574 product(bool, SpecialArraysEquals, true, DIAGNOSTIC, \ 575 "special version of Arrays.equals(char[],char[])") \ 576 \ 577 product(bool, SpecialEncodeISOArray, true, DIAGNOSTIC, \ 578 "special version of ISO_8859_1$Encoder.encodeISOArray") \ 579 \ 580 develop(bool, BailoutToInterpreterForThrows, false, \ 581 "Compiled methods which throws/catches exceptions will be " \ 582 "deopt and intp.") \ 583 \ 584 develop(bool, ConvertCmpD2CmpF, true, \ 585 "Convert cmpD to cmpF when one input is constant in float range") \ 586 \ 587 develop(bool, ConvertFloat2IntClipping, true, \ 588 "Convert float2int clipping idiom to integer clipping") \ 589 \ 590 develop(bool, MonomorphicArrayCheck, true, \ 591 "Uncommon-trap array store checks that require full type check") \ 592 \ 593 develop(bool, TracePhaseCCP, false, \ 594 "Print progress during Conditional Constant Propagation") \ 595 \ 596 develop(bool, PrintDominators, false, \ 597 "Print out dominator trees for GVN") \ 598 \ 599 product(bool, TraceSpilling, false, DIAGNOSTIC, \ 600 "Trace spilling") \ 601 \ 602 product(bool, TraceTypeProfile, false, DIAGNOSTIC, \ 603 "Trace type profile") \ 604 \ 605 develop(bool, PoisonOSREntry, true, \ 606 "Detect abnormal calls to OSR code") \ 607 \ 608 develop(bool, SoftMatchFailure, trueInProduct, \ 609 "If the DFA fails to match a node, print a message and bail out") \ 610 \ 611 develop(bool, InlineAccessors, true, \ 612 "inline accessor methods (get/set)") \ 613 \ 614 product(intx, TypeProfileMajorReceiverPercent, 90, \ 615 "% of major receiver type to all profiled receivers") \ 616 range(0, 100) \ 617 \ 618 product(bool, PrintIntrinsics, false, DIAGNOSTIC, \ 619 "prints attempted and successful inlining of intrinsics") \ 620 \ 621 develop(bool, StressReflectiveCode, false, \ 622 "Use inexact types at allocations, etc., to test reflection") \ 623 \ 624 product(bool, DebugInlinedCalls, true, DIAGNOSTIC, \ 625 "If false, restricts profiled locations to the root method only") \ 626 \ 627 develop(bool, VerifyLoopOptimizations, false, \ 628 "verify major loop optimizations") \ 629 \ 630 product(bool, ProfileDynamicTypes, true, DIAGNOSTIC, \ 631 "do extra type profiling and use it more aggressively") \ 632 \ 633 develop(bool, TraceIterativeGVN, false, \ 634 "Print progress during Iterative Global Value Numbering") \ 635 \ 636 develop(uint, VerifyIterativeGVN, 0, \ 637 "Verify Iterative Global Value Numbering" \ 638 "=XY, with Y: verify Def-Use modifications during IGVN" \ 639 " X: verify that type(n) == n->Value() after IGVN" \ 640 "X and Y in 0=off; 1=on") \ 641 constraint(VerifyIterativeGVNConstraintFunc, AtParse) \ 642 \ 643 develop(bool, TraceCISCSpill, false, \ 644 "Trace allocators use of cisc spillable instructions") \ 645 \ 646 product(bool, SplitIfBlocks, true, \ 647 "Clone compares and control flow through merge points to fold " \ 648 "some branches") \ 649 \ 650 develop(intx, FreqCountInvocations, 1, \ 651 "Scaling factor for branch frequencies (deprecated)") \ 652 range(1, max_intx) \ 653 \ 654 develop(bool, VerifyAliases, false, \ 655 "perform extra checks on the results of alias analysis") \ 656 \ 657 product(intx, MaxInlineLevel, 15, \ 658 "maximum number of nested calls that are inlined by high tier " \ 659 "compiler") \ 660 range(0, max_jint) \ 661 \ 662 product(intx, MaxRecursiveInlineLevel, 1, \ 663 "maximum number of nested recursive calls that are inlined by " \ 664 "high tier compiler") \ 665 range(0, max_jint) \ 666 \ 667 product_pd(intx, InlineSmallCode, \ 668 "Only inline already compiled methods if their code size is " \ 669 "less than this") \ 670 range(0, max_jint) \ 671 \ 672 product(intx, MaxInlineSize, 35, \ 673 "The maximum bytecode size of a method to be inlined by high " \ 674 "tier compiler") \ 675 range(0, max_jint) \ 676 \ 677 product_pd(intx, FreqInlineSize, \ 678 "The maximum bytecode size of a frequent method to be inlined") \ 679 range(0, max_jint) \ 680 \ 681 product(intx, MaxTrivialSize, 6, \ 682 "The maximum bytecode size of a trivial method to be inlined by " \ 683 "high tier compiler") \ 684 range(0, max_jint) \ 685 \ 686 product(bool, IncrementalInline, true, \ 687 "do post parse inlining") \ 688 \ 689 product(bool, IncrementalInlineMH, true, DIAGNOSTIC, \ 690 "do post parse inlining of method handle calls") \ 691 \ 692 product(bool, IncrementalInlineVirtual, true, DIAGNOSTIC, \ 693 "do post parse inlining of virtual calls") \ 694 \ 695 develop(bool, AlwaysIncrementalInline, false, \ 696 "do all inlining incrementally") \ 697 \ 698 product(bool, IncrementalInlineForceCleanup, false, DIAGNOSTIC, \ 699 "do cleanup after every iteration of incremental inlining") \ 700 \ 701 product(intx, LiveNodeCountInliningCutoff, 40000, \ 702 "max number of live nodes in a method") \ 703 range(0, max_juint / 8) \ 704 \ 705 product(bool, OptimizeExpensiveOps, true, DIAGNOSTIC, \ 706 "Find best control for expensive operations") \ 707 \ 708 product(bool, UseMathExactIntrinsics, true, DIAGNOSTIC, \ 709 "Enables intrinsification of various java.lang.Math functions") \ 710 \ 711 product(bool, UseCharacterCompareIntrinsics, false, DIAGNOSTIC, \ 712 "Enables intrinsification of java.lang.Character functions") \ 713 \ 714 product(bool, UseMultiplyToLenIntrinsic, false, DIAGNOSTIC, \ 715 "Enables intrinsification of BigInteger.multiplyToLen()") \ 716 \ 717 product(bool, UseSquareToLenIntrinsic, false, DIAGNOSTIC, \ 718 "Enables intrinsification of BigInteger.squareToLen()") \ 719 \ 720 product(bool, UseMulAddIntrinsic, false, DIAGNOSTIC, \ 721 "Enables intrinsification of BigInteger.mulAdd()") \ 722 \ 723 product(bool, UseMontgomeryMultiplyIntrinsic, false, DIAGNOSTIC, \ 724 "Enables intrinsification of BigInteger.montgomeryMultiply()") \ 725 \ 726 product(bool, UseMontgomerySquareIntrinsic, false, DIAGNOSTIC, \ 727 "Enables intrinsification of BigInteger.montgomerySquare()") \ 728 \ 729 product(bool, EnableVectorSupport, false, EXPERIMENTAL, \ 730 "Enables VectorSupport intrinsics") \ 731 \ 732 product(bool, EnableVectorReboxing, false, EXPERIMENTAL, \ 733 "Enables reboxing of vectors") \ 734 \ 735 product(bool, EnableVectorAggressiveReboxing, false, EXPERIMENTAL, \ 736 "Enables aggressive reboxing of vectors") \ 737 \ 738 product(bool, UseVectorStubs, false, EXPERIMENTAL, \ 739 "Use stubs for vector transcendental operations") \ 740 \ 741 product(bool, UseTypeSpeculation, true, \ 742 "Speculatively propagate types from profiles") \ 743 \ 744 product(bool, UseInlineDepthForSpeculativeTypes, true, DIAGNOSTIC, \ 745 "Carry inline depth of profile point with speculative type " \ 746 "and give priority to profiling from lower inline depth") \ 747 \ 748 product_pd(bool, TrapBasedRangeChecks, \ 749 "Generate code for range checks that uses a cmp and trap " \ 750 "instruction raising SIGTRAP. Used on PPC64.") \ 751 \ 752 product(intx, ArrayCopyLoadStoreMaxElem, 8, \ 753 "Maximum number of arraycopy elements inlined as a sequence of" \ 754 "loads/stores") \ 755 range(0, max_intx) \ 756 \ 757 develop(bool, StressArrayCopyMacroNode, false, \ 758 "Perform ArrayCopy load/store replacement during IGVN only") \ 759 \ 760 develop(bool, RenumberLiveNodes, true, \ 761 "Renumber live nodes") \ 762 \ 763 product(uintx, LoopStripMiningIter, 0, \ 764 "Number of iterations in strip mined loop") \ 765 range(0, max_juint) \ 766 constraint(LoopStripMiningIterConstraintFunc, AfterErgo) \ 767 \ 768 product(uintx, LoopStripMiningIterShortLoop, 0, \ 769 "Loop with fewer iterations are not strip mined") \ 770 range(0, max_juint) \ 771 \ 772 product(bool, UseProfiledLoopPredicate, true, \ 773 "Move predicates out of loops based on profiling data") \ 774 \ 775 develop(uintx, StressLongCountedLoop, 0, \ 776 "if > 0, convert int counted loops to long counted loops" \ 777 "to stress handling of long counted loops: run inner loop" \ 778 "for at most jint_max / StressLongCountedLoop") \ 779 range(0, max_juint) \ 780 \ 781 product(bool, DuplicateBackedge, true, DIAGNOSTIC, \ 782 "Transform loop with a merge point into 2 loops if inner loop is" \ 783 "expected to optimize better") \ 784 \ 785 develop(bool, StressDuplicateBackedge, false, \ 786 "Run DuplicateBackedge whenever possible ignoring benefit" \ 787 "analysis") \ 788 \ 789 product(bool, VerifyReceiverTypes, trueInDebug, DIAGNOSTIC, \ 790 "Verify receiver types at runtime") \ 791 \ 792 product(intx, TypeProfileSubTypeCheckCommonThreshold, 50, \ 793 "Use profile data at type check if profiled types account for" \ 794 "more than this threshold") \ 795 range(0, 100) \ 796 \ 797 develop(bool, StressPrunedExceptionHandlers, false, \ 798 "Always prune exception handlers") \ 799 \ 800 product(bool, InlineSecondarySupersTest, true, DIAGNOSTIC, \ 801 "Inline the secondary supers hash lookup.") \ 802 \ 803 product(bool, UseStoreStoreForCtor, true, DIAGNOSTIC, \ 804 "Use StoreStore barrier instead of Release barrier at the end " \ 805 "of constructors") \ 806 807 // end of C2_FLAGS 808 809 DECLARE_FLAGS(C2_FLAGS) 810 811 #endif // SHARE_OPTO_C2_GLOBALS_HPP