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, EliminateAllocations, true, \ 497 "Use escape analysis to eliminate allocations") \ 498 \ 499 notproduct(bool, PrintEliminateAllocations, false, \ 500 "Print out when allocations are eliminated") \ 501 \ 502 product(intx, EliminateAllocationArraySizeLimit, 64, \ 503 "Array size (number of elements) limit for scalar replacement") \ 504 range(0, max_jint) \ 505 \ 506 product(intx, EliminateAllocationFieldsLimit, 512, DIAGNOSTIC, \ 507 "Number of fields in instance limit for scalar replacement") \ 508 range(0, max_jint) \ 509 \ 510 product(bool, OptimizePtrCompare, true, \ 511 "Use escape analysis to optimize pointers compare") \ 512 \ 513 notproduct(bool, PrintOptimizePtrCompare, false, \ 514 "Print information about optimized pointers compare") \ 515 \ 516 notproduct(bool, VerifyConnectionGraph , true, \ 517 "Verify Connection Graph construction in Escape Analysis") \ 518 \ 519 product(bool, OptimizeStringConcat, true, \ 520 "Optimize the construction of Strings by StringBuilder") \ 521 \ 522 notproduct(bool, PrintOptimizeStringConcat, false, \ 523 "Print information about transformations performed on Strings") \ 524 \ 525 product(intx, ValueSearchLimit, 1000, \ 526 "Recursion limit in PhaseMacroExpand::value_from_mem_phi") \ 527 range(0, max_jint) \ 528 \ 529 product(intx, MaxLabelRootDepth, 1100, \ 530 "Maximum times call Label_Root to prevent stack overflow") \ 531 range(100, max_jint) \ 532 \ 533 product(intx, DominatorSearchLimit, 1000, DIAGNOSTIC, \ 534 "Iterations limit in Node::dominates") \ 535 range(0, max_jint) \ 536 \ 537 product(bool, BlockLayoutByFrequency, true, \ 538 "Use edge frequencies to drive block ordering") \ 539 \ 540 product(intx, BlockLayoutMinDiamondPercentage, 20, \ 541 "Minimum %% of a successor (predecessor) for which block " \ 542 "layout a will allow a fork (join) in a single chain") \ 543 range(0, 100) \ 544 \ 545 product(bool, BlockLayoutRotateLoops, true, \ 546 "Allow back branches to be fall throughs in the block layout") \ 547 \ 548 product(bool, InlineReflectionGetCallerClass, true, DIAGNOSTIC, \ 549 "inline sun.reflect.Reflection.getCallerClass(), known to be " \ 550 "part of base library DLL") \ 551 \ 552 product(bool, InlineObjectCopy, true, DIAGNOSTIC, \ 553 "inline Object.clone and Arrays.copyOf[Range] intrinsics") \ 554 \ 555 product(bool, SpecialStringCompareTo, true, DIAGNOSTIC, \ 556 "special version of string compareTo") \ 557 \ 558 product(bool, SpecialStringIndexOf, true, DIAGNOSTIC, \ 559 "special version of string indexOf") \ 560 \ 561 product(bool, SpecialStringEquals, true, DIAGNOSTIC, \ 562 "special version of string equals") \ 563 \ 564 product(bool, SpecialArraysEquals, true, DIAGNOSTIC, \ 565 "special version of Arrays.equals(char[],char[])") \ 566 \ 567 product(bool, SpecialEncodeISOArray, true, DIAGNOSTIC, \ 568 "special version of ISO_8859_1$Encoder.encodeISOArray") \ 569 \ 570 develop(bool, BailoutToInterpreterForThrows, false, \ 571 "Compiled methods which throws/catches exceptions will be " \ 572 "deopt and intp.") \ 573 \ 574 develop(bool, ConvertCmpD2CmpF, true, \ 575 "Convert cmpD to cmpF when one input is constant in float range") \ 576 \ 577 develop(bool, ConvertFloat2IntClipping, true, \ 578 "Convert float2int clipping idiom to integer clipping") \ 579 \ 580 develop(bool, MonomorphicArrayCheck, true, \ 581 "Uncommon-trap array store checks that require full type check") \ 582 \ 583 notproduct(bool, TracePhaseCCP, false, \ 584 "Print progress during Conditional Constant Propagation") \ 585 \ 586 develop(bool, PrintDominators, false, \ 587 "Print out dominator trees for GVN") \ 588 \ 589 product(bool, TraceSpilling, false, DIAGNOSTIC, \ 590 "Trace spilling") \ 591 \ 592 product(bool, TraceTypeProfile, false, DIAGNOSTIC, \ 593 "Trace type profile") \ 594 \ 595 develop(bool, PoisonOSREntry, true, \ 596 "Detect abnormal calls to OSR code") \ 597 \ 598 develop(bool, SoftMatchFailure, trueInProduct, \ 599 "If the DFA fails to match a node, print a message and bail out") \ 600 \ 601 develop(bool, InlineAccessors, true, \ 602 "inline accessor methods (get/set)") \ 603 \ 604 product(intx, TypeProfileMajorReceiverPercent, 90, \ 605 "% of major receiver type to all profiled receivers") \ 606 range(0, 100) \ 607 \ 608 product(bool, PrintIntrinsics, false, DIAGNOSTIC, \ 609 "prints attempted and successful inlining of intrinsics") \ 610 \ 611 develop(bool, StressReflectiveCode, false, \ 612 "Use inexact types at allocations, etc., to test reflection") \ 613 \ 614 product(bool, DebugInlinedCalls, true, DIAGNOSTIC, \ 615 "If false, restricts profiled locations to the root method only") \ 616 \ 617 notproduct(bool, VerifyLoopOptimizations, false, \ 618 "verify major loop optimizations") \ 619 \ 620 product(bool, ProfileDynamicTypes, true, DIAGNOSTIC, \ 621 "do extra type profiling and use it more aggressively") \ 622 \ 623 develop(bool, TraceIterativeGVN, false, \ 624 "Print progress during Iterative Global Value Numbering") \ 625 \ 626 develop(uint, VerifyIterativeGVN, 0, \ 627 "Verify Iterative Global Value Numbering" \ 628 "=XY, with Y: verify Def-Use modifications during IGVN" \ 629 " X: verify that type(n) == n->Value() after IGVN" \ 630 "X and Y in 0=off; 1=on") \ 631 constraint(VerifyIterativeGVNConstraintFunc, AtParse) \ 632 \ 633 notproduct(bool, TraceCISCSpill, false, \ 634 "Trace allocators use of cisc spillable instructions") \ 635 \ 636 product(bool, SplitIfBlocks, true, \ 637 "Clone compares and control flow through merge points to fold " \ 638 "some branches") \ 639 \ 640 develop(intx, FreqCountInvocations, 1, \ 641 "Scaling factor for branch frequencies (deprecated)") \ 642 range(1, max_intx) \ 643 \ 644 develop(bool, VerifyAliases, false, \ 645 "perform extra checks on the results of alias analysis") \ 646 \ 647 product(intx, MaxInlineLevel, 15, \ 648 "maximum number of nested calls that are inlined by high tier " \ 649 "compiler") \ 650 range(0, max_jint) \ 651 \ 652 product(intx, MaxRecursiveInlineLevel, 1, \ 653 "maximum number of nested recursive calls that are inlined by " \ 654 "high tier compiler") \ 655 range(0, max_jint) \ 656 \ 657 product_pd(intx, InlineSmallCode, \ 658 "Only inline already compiled methods if their code size is " \ 659 "less than this") \ 660 range(0, max_jint) \ 661 \ 662 product(intx, MaxInlineSize, 35, \ 663 "The maximum bytecode size of a method to be inlined by high " \ 664 "tier compiler") \ 665 range(0, max_jint) \ 666 \ 667 product_pd(intx, FreqInlineSize, \ 668 "The maximum bytecode size of a frequent method to be inlined") \ 669 range(0, max_jint) \ 670 \ 671 product(intx, MaxTrivialSize, 6, \ 672 "The maximum bytecode size of a trivial method to be inlined by " \ 673 "high tier compiler") \ 674 range(0, max_jint) \ 675 \ 676 product(bool, IncrementalInline, true, \ 677 "do post parse inlining") \ 678 \ 679 product(bool, IncrementalInlineMH, true, DIAGNOSTIC, \ 680 "do post parse inlining of method handle calls") \ 681 \ 682 product(bool, IncrementalInlineVirtual, true, DIAGNOSTIC, \ 683 "do post parse inlining of virtual calls") \ 684 \ 685 develop(bool, AlwaysIncrementalInline, false, \ 686 "do all inlining incrementally") \ 687 \ 688 product(bool, IncrementalInlineForceCleanup, false, DIAGNOSTIC, \ 689 "do cleanup after every iteration of incremental inlining") \ 690 \ 691 product(intx, LiveNodeCountInliningCutoff, 40000, \ 692 "max number of live nodes in a method") \ 693 range(0, max_juint / 8) \ 694 \ 695 product(bool, OptimizeExpensiveOps, true, DIAGNOSTIC, \ 696 "Find best control for expensive operations") \ 697 \ 698 product(bool, UseMathExactIntrinsics, true, DIAGNOSTIC, \ 699 "Enables intrinsification of various java.lang.Math functions") \ 700 \ 701 product(bool, UseCharacterCompareIntrinsics, false, DIAGNOSTIC, \ 702 "Enables intrinsification of java.lang.Character functions") \ 703 \ 704 product(bool, UseMultiplyToLenIntrinsic, false, DIAGNOSTIC, \ 705 "Enables intrinsification of BigInteger.multiplyToLen()") \ 706 \ 707 product(bool, UseSquareToLenIntrinsic, false, DIAGNOSTIC, \ 708 "Enables intrinsification of BigInteger.squareToLen()") \ 709 \ 710 product(bool, UseMulAddIntrinsic, false, DIAGNOSTIC, \ 711 "Enables intrinsification of BigInteger.mulAdd()") \ 712 \ 713 product(bool, UseMontgomeryMultiplyIntrinsic, false, DIAGNOSTIC, \ 714 "Enables intrinsification of BigInteger.montgomeryMultiply()") \ 715 \ 716 product(bool, UseMontgomerySquareIntrinsic, false, DIAGNOSTIC, \ 717 "Enables intrinsification of BigInteger.montgomerySquare()") \ 718 \ 719 product(bool, EnableVectorSupport, false, EXPERIMENTAL, \ 720 "Enables VectorSupport intrinsics") \ 721 \ 722 product(bool, EnableVectorReboxing, false, EXPERIMENTAL, \ 723 "Enables reboxing of vectors") \ 724 \ 725 product(bool, EnableVectorAggressiveReboxing, false, EXPERIMENTAL, \ 726 "Enables aggressive reboxing of vectors") \ 727 \ 728 product(bool, UseVectorStubs, false, EXPERIMENTAL, \ 729 "Use stubs for vector transcendental operations") \ 730 \ 731 product(bool, UseTypeSpeculation, true, \ 732 "Speculatively propagate types from profiles") \ 733 \ 734 product(bool, UseInlineDepthForSpeculativeTypes, true, DIAGNOSTIC, \ 735 "Carry inline depth of profile point with speculative type " \ 736 "and give priority to profiling from lower inline depth") \ 737 \ 738 product_pd(bool, TrapBasedRangeChecks, \ 739 "Generate code for range checks that uses a cmp and trap " \ 740 "instruction raising SIGTRAP. Used on PPC64.") \ 741 \ 742 product(intx, ArrayCopyLoadStoreMaxElem, 8, \ 743 "Maximum number of arraycopy elements inlined as a sequence of" \ 744 "loads/stores") \ 745 range(0, max_intx) \ 746 \ 747 develop(bool, StressArrayCopyMacroNode, false, \ 748 "Perform ArrayCopy load/store replacement during IGVN only") \ 749 \ 750 develop(bool, RenumberLiveNodes, true, \ 751 "Renumber live nodes") \ 752 \ 753 product(uintx, LoopStripMiningIter, 0, \ 754 "Number of iterations in strip mined loop") \ 755 range(0, max_juint) \ 756 constraint(LoopStripMiningIterConstraintFunc, AfterErgo) \ 757 \ 758 product(uintx, LoopStripMiningIterShortLoop, 0, \ 759 "Loop with fewer iterations are not strip mined") \ 760 range(0, max_juint) \ 761 \ 762 product(bool, UseProfiledLoopPredicate, true, \ 763 "Move predicates out of loops based on profiling data") \ 764 \ 765 product(bool, ExpandSubTypeCheckAtParseTime, false, DIAGNOSTIC, \ 766 "Do not use subtype check macro node") \ 767 \ 768 develop(uintx, StressLongCountedLoop, 0, \ 769 "if > 0, convert int counted loops to long counted loops" \ 770 "to stress handling of long counted loops: run inner loop" \ 771 "for at most jint_max / StressLongCountedLoop") \ 772 range(0, max_juint) \ 773 \ 774 product(bool, DuplicateBackedge, true, DIAGNOSTIC, \ 775 "Transform loop with a merge point into 2 loops if inner loop is" \ 776 "expected to optimize better") \ 777 \ 778 develop(bool, StressDuplicateBackedge, false, \ 779 "Run DuplicateBackedge whenever possible ignoring benefit" \ 780 "analysis") \ 781 \ 782 product(bool, VerifyReceiverTypes, trueInDebug, DIAGNOSTIC, \ 783 "Verify receiver types at runtime") \ 784 \ 785 product(intx, TypeProfileSubTypeCheckCommonThreshold, 50, \ 786 "Use profile data at type check if profiled types account for" \ 787 "more than this threshold") \ 788 range(0, 100) \ 789 \ 790 develop(bool, StressPrunedExceptionHandlers, false, \ 791 "Always prune exception handlers") \ 792 793 // end of C2_FLAGS 794 795 DECLARE_FLAGS(C2_FLAGS) 796 797 #endif // SHARE_OPTO_C2_GLOBALS_HPP