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