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