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