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