/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ #ifndef SHARE_OPTO_C2_GLOBALS_HPP #define SHARE_OPTO_C2_GLOBALS_HPP #include "runtime/flags/jvmFlagConstraintsCompiler.hpp" #include "runtime/globals_shared.hpp" #include "utilities/macros.hpp" #include CPU_HEADER(c2_globals) #include OS_HEADER(c2_globals) extern "C" intx OptoLoopAlignment; // declared in globals.hpp // // Declare all globals flags used by the server compiler. // #include "utilities/macros.hpp" #if COMPILER2 #include "runtime/flags/jvmFlag.hpp" PRODUCT_FLAG(bool, StressLCM, false, JVMFlag::DIAGNOSTIC, "Randomize instruction scheduling in LCM"); PRODUCT_FLAG(bool, StressGCM, false, JVMFlag::DIAGNOSTIC, "Randomize instruction scheduling in GCM"); DEVELOP_FLAG(bool, StressMethodHandleLinkerInlining, false, JVMFlag::DEFAULT, "Stress inlining through method handle linkers"); DEVELOP_FLAG(intx, OptoPrologueNops, 0, JVMFlag::RANGE, "Insert this many extra nop instructions " "in the prologue of every nmethod"); FLAG_RANGE( OptoPrologueNops, 0, 128); PRODUCT_FLAG_PD(intx, InteriorEntryAlignment, JVMFlag::CONSTRAINT, "Code alignment for interior entry points " "in generated code (in bytes)"); FLAG_CONSTRAINT( InteriorEntryAlignment, (void*)InteriorEntryAlignmentConstraintFunc, JVMFlag::AfterErgo); PRODUCT_FLAG(intx, MaxLoopPad, (OptoLoopAlignment-1), JVMFlag::RANGE, "Align a loop if padding size in bytes is less or equal to this " "value"); FLAG_RANGE( MaxLoopPad, 0, max_jint); PRODUCT_FLAG(intx, MaxVectorSize, 64, JVMFlag::RANGE, "Max vector size in bytes, " "actual size could be less depending on elements type"); FLAG_RANGE( MaxVectorSize, 0, max_jint); PRODUCT_FLAG(bool, AlignVector, true, JVMFlag::DEFAULT, "Perform vector store/load alignment in loop"); PRODUCT_FLAG(intx, NumberOfLoopInstrToAlign, 4, JVMFlag::RANGE, "Number of first instructions in a loop to align"); FLAG_RANGE( NumberOfLoopInstrToAlign, 0, max_jint); NOTPROD_FLAG(intx, IndexSetWatch, 0, JVMFlag::RANGE, "Trace all operations on this IndexSet (-1 means all, 0 none)"); FLAG_RANGE( IndexSetWatch, -1, 0); DEVELOP_FLAG(intx, OptoNodeListSize, 4, JVMFlag::RANGE, "Starting allocation size of Node_List data structures"); FLAG_RANGE( OptoNodeListSize, 0, max_jint); DEVELOP_FLAG(intx, OptoBlockListSize, 8, JVMFlag::RANGE, "Starting allocation size of Block_List data structures"); FLAG_RANGE( OptoBlockListSize, 0, max_jint); DEVELOP_FLAG(intx, OptoPeepholeAt, -1, JVMFlag::DEFAULT, "Apply peephole optimizations to this peephole rule"); NOTPROD_FLAG(bool, PrintIdeal, false, JVMFlag::DEFAULT, "Print ideal graph before code generation"); DEVELOP_FLAG(bool, PrintOpto, false, JVMFlag::DEFAULT, "Print compiler2 attempts"); DEVELOP_FLAG(bool, PrintOptoInlining, false, JVMFlag::DEFAULT, "Print compiler2 inlining decisions"); NOTPROD_FLAG(bool, VerifyIdealNodeCount, false, JVMFlag::DEFAULT, "Verify that tracked dead ideal node count is accurate"); NOTPROD_FLAG(bool, PrintIdealNodeCount, false, JVMFlag::DEFAULT, "Print liveness counts of ideal nodes"); NOTPROD_FLAG(bool, VerifyOptoOopOffsets, false, JVMFlag::DEFAULT, "Check types of base addresses in field references"); DEVELOP_FLAG(bool, IdealizedNumerics, false, JVMFlag::DEFAULT, "Check performance difference allowing FP " "associativity and commutativity..."); PRODUCT_FLAG_PD(bool, IdealizeClearArrayNode, JVMFlag::DIAGNOSTIC, "Replace ClearArrayNode by subgraph of basic operations."); DEVELOP_FLAG(bool, OptoBreakpoint, false, JVMFlag::DEFAULT, "insert breakpoint at method entry"); DEVELOP_FLAG(bool, OptoBreakpointOSR, false, JVMFlag::DEFAULT, "insert breakpoint at osr method entry"); NOTPROD_FLAG(intx, BreakAtNode, 0, JVMFlag::DEFAULT, "Break at construction of this Node (either _idx or _debug_idx)"); DEVELOP_FLAG(bool, OptoBreakpointC2R, false, JVMFlag::DEFAULT, "insert breakpoint at runtime stub entry"); NOTPROD_FLAG(bool, OptoNoExecute, false, JVMFlag::DEFAULT, "Attempt to parse and compile but do not execute generated code"); NOTPROD_FLAG(bool, PrintOptoStatistics, false, JVMFlag::DEFAULT, "Print New compiler statistics"); PRODUCT_FLAG(bool, PrintOptoAssembly, false, JVMFlag::DIAGNOSTIC, "Print New compiler assembly output"); DEVELOP_FLAG_PD(bool, OptoPeephole, JVMFlag::DEFAULT, "Apply peephole optimizations after register allocation"); DEVELOP_FLAG(bool, OptoRemoveUseless, true, JVMFlag::DEFAULT, "Remove useless nodes after parsing"); NOTPROD_FLAG(bool, PrintFrameConverterAssembly, false, JVMFlag::DEFAULT, "Print New compiler assembly output for frame converters"); NOTPROD_FLAG(bool, PrintParseStatistics, false, JVMFlag::DEFAULT, "Print nodes, transforms and new values made per bytecode parsed"); NOTPROD_FLAG(bool, PrintOptoPeephole, false, JVMFlag::DEFAULT, "Print New compiler peephole replacements"); DEVELOP_FLAG(bool, PrintCFGBlockFreq, false, JVMFlag::DEFAULT, "Print CFG block freqencies"); DEVELOP_FLAG(bool, TraceOptoParse, false, JVMFlag::DEFAULT, "Trace bytecode parse and control-flow merge"); PRODUCT_FLAG_PD(intx, LoopUnrollLimit, JVMFlag::RANGE, "Unroll loop bodies with node count less than this"); FLAG_RANGE( LoopUnrollLimit, 0, max_jint / 4); PRODUCT_FLAG_PD(intx, LoopPercentProfileLimit, JVMFlag::RANGE, "Unroll loop bodies with % node count of profile limit"); FLAG_RANGE( LoopPercentProfileLimit, 10, 100); PRODUCT_FLAG(intx, LoopMaxUnroll, 16, JVMFlag::RANGE, "Maximum number of unrolls for main loop"); FLAG_RANGE( LoopMaxUnroll, 0, max_jint); PRODUCT_FLAG_PD(bool, SuperWordLoopUnrollAnalysis, JVMFlag::DEFAULT, "Map number of unrolls for main loop via " "Superword Level Parallelism analysis"); PRODUCT_FLAG(bool, PostLoopMultiversioning, false, JVMFlag::EXPERIMENTAL, "Multi versioned post loops to eliminate range checks"); DEVELOP_FLAG(bool, TraceSuperWordLoopUnrollAnalysis, false, JVMFlag::DEFAULT, "Trace what Superword Level Parallelism analysis applies"); PRODUCT_FLAG(bool, UseVectorMacroLogic, true, JVMFlag::DIAGNOSTIC, "Use ternary macro logic instructions"); PRODUCT_FLAG(intx, LoopUnrollMin, 4, JVMFlag::RANGE, "Minimum number of unroll loop bodies before checking progress" "of rounds of unroll,optimize,.."); FLAG_RANGE( LoopUnrollMin, 0, max_jint); PRODUCT_FLAG(bool, UseSubwordForMaxVector, true, JVMFlag::DEFAULT, "Use Subword Analysis to set maximum vector size"); PRODUCT_FLAG(bool, UseVectorCmov, false, JVMFlag::DEFAULT, "Use Vectorized Cmov"); DEVELOP_FLAG(intx, UnrollLimitForProfileCheck, 1, JVMFlag::RANGE, "Don't use profile_trip_cnt() to restrict unrolling until " "unrolling would push the number of unrolled iterations above " "UnrollLimitForProfileCheck. A higher value allows more " "unrolling. Zero acts as a very large value."); FLAG_RANGE( UnrollLimitForProfileCheck, 0, max_intx); PRODUCT_FLAG(intx, MultiArrayExpandLimit, 6, JVMFlag::RANGE, "Maximum number of individual allocations in an inline-expanded " "multianewarray instruction"); FLAG_RANGE( MultiArrayExpandLimit, 0, max_jint); NOTPROD_FLAG(bool, TraceProfileTripCount, false, JVMFlag::DEFAULT, "Trace profile loop trip count information"); PRODUCT_FLAG(bool, UseCountedLoopSafepoints, false, JVMFlag::DEFAULT, "Force counted loops to keep a safepoint"); PRODUCT_FLAG(bool, UseLoopPredicate, true, JVMFlag::DEFAULT, "Generate a predicate to select fast/slow loop versions"); DEVELOP_FLAG(bool, TraceLoopPredicate, false, JVMFlag::DEFAULT, "Trace generation of loop predicates"); DEVELOP_FLAG(bool, TraceLoopOpts, false, JVMFlag::DEFAULT, "Trace executed loop optimizations"); DEVELOP_FLAG(bool, TraceLoopLimitCheck, false, JVMFlag::DEFAULT, "Trace generation of loop limits checks"); DEVELOP_FLAG(bool, TraceRangeLimitCheck, false, JVMFlag::DEFAULT, "Trace additional overflow checks in RCE"); // OptimizeFill not yet supported on PowerPC. PRODUCT_FLAG(bool, OptimizeFill, true PPC64_ONLY(&& false), JVMFlag::DEFAULT, "convert fill/copy loops into intrinsic"); DEVELOP_FLAG(bool, TraceOptimizeFill, false, JVMFlag::DEFAULT, "print detailed information about fill conversion"); DEVELOP_FLAG(bool, OptoCoalesce, true, JVMFlag::DEFAULT, "Use Conservative Copy Coalescing in the Register Allocator"); DEVELOP_FLAG(bool, UseUniqueSubclasses, true, JVMFlag::DEFAULT, "Narrow an abstract reference to the unique concrete subclass"); DEVELOP_FLAG(bool, UseExactTypes, true, JVMFlag::DEFAULT, "Use exact types to eliminate array store checks and v-calls"); PRODUCT_FLAG(intx, TrackedInitializationLimit, 50, JVMFlag::RANGE, "When initializing fields, track up to this many words"); FLAG_RANGE( TrackedInitializationLimit, 0, 65535); PRODUCT_FLAG(bool, ReduceFieldZeroing, true, JVMFlag::DEFAULT, "When initializing fields, try to avoid needless zeroing"); PRODUCT_FLAG(bool, ReduceInitialCardMarks, true, JVMFlag::DEFAULT, "When initializing fields, try to avoid needless card marks"); PRODUCT_FLAG(bool, ReduceBulkZeroing, true, JVMFlag::DEFAULT, "When bulk-initializing, try to avoid needless zeroing"); PRODUCT_FLAG(bool, UseFPUForSpilling, false, JVMFlag::DEFAULT, "Spill integer registers to FPU instead of stack when possible"); DEVELOP_FLAG_PD(intx, RegisterCostAreaRatio, JVMFlag::DEFAULT, "Spill selection in reg allocator: scale area by (X/64K) before " "adding cost"); DEVELOP_FLAG_PD(bool, UseCISCSpill, JVMFlag::DEFAULT, "Use ADLC supplied cisc instructions during allocation"); NOTPROD_FLAG(bool, VerifyGraphEdges, false, JVMFlag::DEFAULT, "Verify Bi-directional Edges"); NOTPROD_FLAG(bool, VerifyDUIterators, true, JVMFlag::DEFAULT, "Verify the safety of all iterations of Bi-directional Edges"); NOTPROD_FLAG(bool, VerifyHashTableKeys, true, JVMFlag::DEFAULT, "Verify the immutability of keys in the VN hash tables"); NOTPROD_FLAG(bool, VerifyRegisterAllocator, false, JVMFlag::DEFAULT, "Verify Register Allocator"); DEVELOP_FLAG_PD(intx, FLOATPRESSURE, JVMFlag::RANGE, "Number of float LRG's that constitute high register pressure"); FLAG_RANGE( FLOATPRESSURE, 0, max_jint); DEVELOP_FLAG_PD(intx, INTPRESSURE, JVMFlag::RANGE, "Number of integer LRG's that constitute high register pressure"); FLAG_RANGE( INTPRESSURE, 0, max_jint); NOTPROD_FLAG(bool, TraceOptoPipelining, false, JVMFlag::DEFAULT, "Trace pipelining information"); NOTPROD_FLAG(bool, TraceOptoOutput, false, JVMFlag::DEFAULT, "Trace pipelining information"); PRODUCT_FLAG_PD(bool, OptoScheduling, JVMFlag::DEFAULT, "Instruction Scheduling after register allocation"); PRODUCT_FLAG_PD(bool, OptoRegScheduling, JVMFlag::DEFAULT, "Instruction Scheduling before register allocation for pressure"); PRODUCT_FLAG(bool, PartialPeelLoop, true, JVMFlag::DEFAULT, "Partial peel (rotate) loops"); PRODUCT_FLAG(intx, PartialPeelNewPhiDelta, 0, JVMFlag::RANGE, "Additional phis that can be created by partial peeling"); FLAG_RANGE( PartialPeelNewPhiDelta, 0, max_jint); NOTPROD_FLAG(bool, TracePartialPeeling, false, JVMFlag::DEFAULT, "Trace partial peeling (loop rotation) information"); PRODUCT_FLAG(bool, PartialPeelAtUnsignedTests, true, JVMFlag::DEFAULT, "Partial peel at unsigned tests if no signed test exists"); PRODUCT_FLAG(bool, ReassociateInvariants, true, JVMFlag::DEFAULT, "Enable reassociation of expressions with loop invariants."); PRODUCT_FLAG(bool, LoopUnswitching, true, JVMFlag::DEFAULT, "Enable loop unswitching (a form of invariant test hoisting)"); NOTPROD_FLAG(bool, TraceLoopUnswitching, false, JVMFlag::DEFAULT, "Trace loop unswitching"); PRODUCT_FLAG(bool, AllowVectorizeOnDemand, true, JVMFlag::DEFAULT, "Globally supress vectorization set in VectorizeMethod"); PRODUCT_FLAG(bool, UseSuperWord, true, JVMFlag::DEFAULT, "Transform scalar operations into superword operations"); DEVELOP_FLAG(bool, SuperWordRTDepCheck, false, JVMFlag::DEFAULT, "Enable runtime dependency checks."); PRODUCT_FLAG(bool, SuperWordReductions, true, JVMFlag::DEFAULT, "Enable reductions support in superword."); PRODUCT_FLAG(bool, UseCMoveUnconditionally, false, JVMFlag::DEFAULT, "Use CMove (scalar and vector) ignoring profitability test."); PRODUCT_FLAG(bool, DoReserveCopyInSuperWord, true, JVMFlag::DEFAULT, "Create reserve copy of graph in SuperWord."); DEVELOP_FLAG(bool, TraceSuperWord, false, JVMFlag::DEFAULT, "Trace superword transforms"); NOTPROD_FLAG(bool, TraceNewVectors, false, JVMFlag::DEFAULT, "Trace creation of Vector nodes"); PRODUCT_FLAG_PD(bool, OptoBundling, JVMFlag::DEFAULT, "Generate nops to fill i-cache lines"); PRODUCT_FLAG_PD(intx, ConditionalMoveLimit, JVMFlag::RANGE, "Limit of ops to make speculative when using CMOVE"); FLAG_RANGE( ConditionalMoveLimit, 0, max_jint); // Set BranchOnRegister == false. See 4965987. PRODUCT_FLAG(bool, BranchOnRegister, false, JVMFlag::DEFAULT, "Use Sparc V9 branch-on-register opcodes"); DEVELOP_FLAG(bool, SparcV9RegsHiBitsZero, true, JVMFlag::DEFAULT, "Assume Sparc V9 I&L registers on V8+ systems are zero-extended"); PRODUCT_FLAG(bool, UseRDPCForConstantTableBase, false, JVMFlag::DEFAULT, "Use Sparc RDPC instruction for the constant table base."); NOTPROD_FLAG(bool, PrintIdealGraph, false, JVMFlag::DEFAULT, "Print ideal graph to XML file / network interface. " "By default attempts to connect to the visualizer on a socket."); NOTPROD_FLAG(intx, PrintIdealGraphLevel, 0, JVMFlag::RANGE, "Level of detail of the ideal graph printout. " "System-wide value, 0=nothing is printed, 4=all details printed. " "Level of detail of printouts can be set on a per-method level " "as well by using CompileCommand=option."); FLAG_RANGE( PrintIdealGraphLevel, 0, 4); NOTPROD_FLAG(intx, PrintIdealGraphPort, 4444, JVMFlag::RANGE, "Ideal graph printer to network port"); FLAG_RANGE( PrintIdealGraphPort, 0, SHRT_MAX); NOTPROD_FLAG(ccstr, PrintIdealGraphAddress, "127.0.0.1", JVMFlag::DEFAULT, "IP address to connect to visualizer"); NOTPROD_FLAG(ccstr, PrintIdealGraphFile, NULL, JVMFlag::DEFAULT, "File to dump ideal graph to. If set overrides the " "use of the network"); PRODUCT_FLAG(bool, UseBimorphicInlining, true, JVMFlag::DEFAULT, "Profiling based inlining for two receivers"); PRODUCT_FLAG(bool, UseOnlyInlinedBimorphic, true, JVMFlag::DEFAULT, "Don't use BimorphicInlining if can't inline a second method"); PRODUCT_FLAG(bool, InsertMemBarAfterArraycopy, true, JVMFlag::DEFAULT, "Insert memory barrier after arraycopy call"); DEVELOP_FLAG(bool, SubsumeLoads, true, JVMFlag::DEFAULT, "Attempt to compile while subsuming loads into machine " "instructions."); DEVELOP_FLAG(bool, StressRecompilation, false, JVMFlag::DEFAULT, "Recompile each compiled method without subsuming loads " "or escape analysis."); DEVELOP_FLAG(intx, ImplicitNullCheckThreshold, 3, JVMFlag::RANGE, "Don't do implicit null checks if NPE's in a method exceeds " "limit"); FLAG_RANGE( ImplicitNullCheckThreshold, 0, max_jint); PRODUCT_FLAG(intx, LoopOptsCount, 43, JVMFlag::RANGE, "Set level of loop optimization for tier 1 compiles"); FLAG_RANGE( LoopOptsCount, 5, 43); // controls for heat-based inlining DEVELOP_FLAG(intx, NodeCountInliningCutoff, 18000, JVMFlag::RANGE, "If parser node generation exceeds limit stop inlining"); FLAG_RANGE( NodeCountInliningCutoff, 0, max_jint); DEVELOP_FLAG(intx, NodeCountInliningStep, 1000, JVMFlag::RANGE, "Target size of warm calls inlined between optimization passes"); FLAG_RANGE( NodeCountInliningStep, 0, max_jint); DEVELOP_FLAG(bool, InlineWarmCalls, false, JVMFlag::DEFAULT, "Use a heat-based priority queue to govern inlining"); // Max values must not exceed WarmCallInfo::MAX_VALUE(). DEVELOP_FLAG(intx, HotCallCountThreshold, 999999, JVMFlag::RANGE, "large numbers of calls (per method invocation) force hotness"); FLAG_RANGE( HotCallCountThreshold, 0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, HotCallProfitThreshold, 999999, JVMFlag::RANGE, "highly profitable inlining opportunities force hotness"); FLAG_RANGE( HotCallProfitThreshold, 0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, HotCallTrivialWork, -1, JVMFlag::RANGE, "trivial execution time (no larger than this) forces hotness"); FLAG_RANGE( HotCallTrivialWork, -1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, HotCallTrivialSize, -1, JVMFlag::RANGE, "trivial methods (no larger than this) force calls to be hot"); FLAG_RANGE( HotCallTrivialSize, -1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, WarmCallMinCount, -1, JVMFlag::RANGE, "number of calls (per method invocation) to enable inlining"); FLAG_RANGE( WarmCallMinCount, -1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, WarmCallMinProfit, -1, JVMFlag::RANGE, "number of calls (per method invocation) to enable inlining"); FLAG_RANGE( WarmCallMinProfit, -1, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, WarmCallMaxWork, 999999, JVMFlag::RANGE, "execution time of the largest inlinable method"); FLAG_RANGE( WarmCallMaxWork, 0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); DEVELOP_FLAG(intx, WarmCallMaxSize, 999999, JVMFlag::RANGE, "size of the largest inlinable method"); FLAG_RANGE( WarmCallMaxSize, 0, ((intx)MIN2((int64_t)max_intx,(int64_t)(+1.0e10)))); PRODUCT_FLAG(intx, MaxNodeLimit, 80000, JVMFlag::RANGE, "Maximum number of nodes"); FLAG_RANGE( MaxNodeLimit, 1000, max_jint / 3); PRODUCT_FLAG(intx, NodeLimitFudgeFactor, 2000, JVMFlag::CONSTRAINT, "Fudge Factor for certain optimizations"); FLAG_CONSTRAINT( NodeLimitFudgeFactor, (void*)NodeLimitFudgeFactorConstraintFunc, JVMFlag::AfterErgo); PRODUCT_FLAG(bool, UseJumpTables, true, JVMFlag::DEFAULT, "Use JumpTables instead of a binary search tree for switches"); PRODUCT_FLAG(bool, UseDivMod, true, JVMFlag::DEFAULT, "Use combined DivMod instruction if available"); PRODUCT_FLAG_PD(intx, MinJumpTableSize, JVMFlag::RANGE, "Minimum number of targets in a generated jump table"); FLAG_RANGE( MinJumpTableSize, 0, max_intx); PRODUCT_FLAG(intx, MaxJumpTableSize, 65000, JVMFlag::RANGE, "Maximum number of targets in a generated jump table"); FLAG_RANGE( MaxJumpTableSize, 0, max_intx); PRODUCT_FLAG(intx, MaxJumpTableSparseness, 5, JVMFlag::RANGE, "Maximum sparseness for jumptables"); FLAG_RANGE( MaxJumpTableSparseness, 0, max_intx / 4); PRODUCT_FLAG(bool, EliminateLocks, true, JVMFlag::DEFAULT, "Coarsen locks when possible"); PRODUCT_FLAG(bool, EliminateNestedLocks, true, JVMFlag::DEFAULT, "Eliminate nested locks of the same object when possible"); NOTPROD_FLAG(bool, PrintLockStatistics, false, JVMFlag::DEFAULT, "Print precise statistics on the dynamic lock usage"); PRODUCT_FLAG(bool, PrintPreciseBiasedLockingStatistics, false, JVMFlag::DIAGNOSTIC, "Print per-lock-site statistics of biased locking in JVM"); PRODUCT_FLAG(bool, PrintPreciseRTMLockingStatistics, false, JVMFlag::DIAGNOSTIC, "Print per-lock-site statistics of rtm locking in JVM"); NOTPROD_FLAG(bool, PrintEliminateLocks, false, JVMFlag::DEFAULT, "Print out when locks are eliminated"); PRODUCT_FLAG(bool, EliminateAutoBox, true, JVMFlag::DEFAULT, "Control optimizations for autobox elimination"); PRODUCT_FLAG(intx, AutoBoxCacheMax, 128, JVMFlag::RANGE, "Sets max value cached by the java.lang.Integer autobox cache"); FLAG_RANGE( AutoBoxCacheMax, 0, max_jint); PRODUCT_FLAG(bool, AggressiveUnboxing, true, JVMFlag::DIAGNOSTIC, "Control optimizations for aggressive boxing elimination"); DEVELOP_FLAG(bool, TracePostallocExpand, false, JVMFlag::DEFAULT, "Trace expanding nodes after" " register allocation."); PRODUCT_FLAG(bool, DoEscapeAnalysis, true, JVMFlag::DEFAULT, "Perform escape analysis"); PRODUCT_FLAG(double, EscapeAnalysisTimeout, 20. DEBUG_ONLY(+40.), JVMFlag::RANGE, "Abort EA when it reaches time limit (in sec)"); FLAG_RANGE( EscapeAnalysisTimeout, 0, DBL_MAX); DEVELOP_FLAG(bool, ExitEscapeAnalysisOnTimeout, true, JVMFlag::DEFAULT, "Exit or throw assert in EA when it reaches time limit"); NOTPROD_FLAG(bool, PrintEscapeAnalysis, false, JVMFlag::DEFAULT, "Print the results of escape analysis"); PRODUCT_FLAG(bool, EliminateAllocations, true, JVMFlag::DEFAULT, "Use escape analysis to eliminate allocations"); NOTPROD_FLAG(bool, PrintEliminateAllocations, false, JVMFlag::DEFAULT, "Print out when allocations are eliminated"); PRODUCT_FLAG(intx, EliminateAllocationArraySizeLimit, 64, JVMFlag::RANGE, "Array size (number of elements) limit for scalar replacement"); FLAG_RANGE( EliminateAllocationArraySizeLimit, 0, max_jint); PRODUCT_FLAG(bool, OptimizePtrCompare, true, JVMFlag::DEFAULT, "Use escape analysis to optimize pointers compare"); NOTPROD_FLAG(bool, PrintOptimizePtrCompare, false, JVMFlag::DEFAULT, "Print information about optimized pointers compare"); NOTPROD_FLAG(bool, VerifyConnectionGraph, true, JVMFlag::DEFAULT, "Verify Connection Graph construction in Escape Analysis"); PRODUCT_FLAG(bool, UseOptoBiasInlining, true, JVMFlag::DEFAULT, "Generate biased locking code in C2 ideal graph"); PRODUCT_FLAG(bool, OptimizeStringConcat, true, JVMFlag::DEFAULT, "Optimize the construction of Strings by StringBuilder"); NOTPROD_FLAG(bool, PrintOptimizeStringConcat, false, JVMFlag::DEFAULT, "Print information about transformations performed on Strings"); PRODUCT_FLAG(intx, ValueSearchLimit, 1000, JVMFlag::RANGE, "Recursion limit in PhaseMacroExpand::value_from_mem_phi"); FLAG_RANGE( ValueSearchLimit, 0, max_jint); PRODUCT_FLAG(intx, MaxLabelRootDepth, 1100, JVMFlag::RANGE, "Maximum times call Label_Root to prevent stack overflow"); FLAG_RANGE( MaxLabelRootDepth, 100, max_jint); PRODUCT_FLAG(intx, DominatorSearchLimit, 1000, JVMFlag::DIAGNOSTIC | JVMFlag::RANGE, "Iterations limit in Node::dominates"); FLAG_RANGE( DominatorSearchLimit, 0, max_jint); PRODUCT_FLAG(bool, BlockLayoutByFrequency, true, JVMFlag::DEFAULT, "Use edge frequencies to drive block ordering"); PRODUCT_FLAG(intx, BlockLayoutMinDiamondPercentage, 20, JVMFlag::RANGE, "Miniumum %% of a successor (predecessor) for which block " "layout a will allow a fork (join) in a single chain"); FLAG_RANGE( BlockLayoutMinDiamondPercentage, 0, 100); PRODUCT_FLAG(bool, BlockLayoutRotateLoops, true, JVMFlag::DEFAULT, "Allow back branches to be fall throughs in the block layout"); PRODUCT_FLAG(bool, InlineReflectionGetCallerClass, true, JVMFlag::DIAGNOSTIC, "inline sun.reflect.Reflection.getCallerClass(), known to be " "part of base library DLL"); PRODUCT_FLAG(bool, InlineObjectCopy, true, JVMFlag::DIAGNOSTIC, "inline Object.clone and Arrays.copyOf[Range] intrinsics"); PRODUCT_FLAG(bool, SpecialStringCompareTo, true, JVMFlag::DIAGNOSTIC, "special version of string compareTo"); PRODUCT_FLAG(bool, SpecialStringIndexOf, true, JVMFlag::DIAGNOSTIC, "special version of string indexOf"); PRODUCT_FLAG(bool, SpecialStringEquals, true, JVMFlag::DIAGNOSTIC, "special version of string equals"); PRODUCT_FLAG(bool, SpecialArraysEquals, true, JVMFlag::DIAGNOSTIC, "special version of Arrays.equals(char[],char[])"); PRODUCT_FLAG(bool, SpecialEncodeISOArray, true, JVMFlag::DIAGNOSTIC, "special version of ISO_8859_1$Encoder.encodeISOArray"); DEVELOP_FLAG(bool, BailoutToInterpreterForThrows, false, JVMFlag::DEFAULT, "Compiled methods which throws/catches exceptions will be " "deopt and intp."); DEVELOP_FLAG(bool, ConvertCmpD2CmpF, true, JVMFlag::DEFAULT, "Convert cmpD to cmpF when one input is constant in float range"); DEVELOP_FLAG(bool, ConvertFloat2IntClipping, true, JVMFlag::DEFAULT, "Convert float2int clipping idiom to integer clipping"); DEVELOP_FLAG(bool, MonomorphicArrayCheck, true, JVMFlag::DEFAULT, "Uncommon-trap array store checks that require full type check"); NOTPROD_FLAG(bool, TracePhaseCCP, false, JVMFlag::DEFAULT, "Print progress during Conditional Constant Propagation"); DEVELOP_FLAG(bool, PrintDominators, false, JVMFlag::DEFAULT, "Print out dominator trees for GVN"); PRODUCT_FLAG(bool, TraceSpilling, false, JVMFlag::DIAGNOSTIC, "Trace spilling"); PRODUCT_FLAG(bool, TraceTypeProfile, false, JVMFlag::DIAGNOSTIC, "Trace type profile"); DEVELOP_FLAG(bool, PoisonOSREntry, true, JVMFlag::DEFAULT, "Detect abnormal calls to OSR code"); DEVELOP_FLAG(bool, SoftMatchFailure, trueInProduct, JVMFlag::DEFAULT, "If the DFA fails to match a node, print a message and bail out"); DEVELOP_FLAG(bool, InlineAccessors, true, JVMFlag::DEFAULT, "inline accessor methods (get/set)"); PRODUCT_FLAG(intx, TypeProfileMajorReceiverPercent, 90, JVMFlag::RANGE, "% of major receiver type to all profiled receivers"); FLAG_RANGE( TypeProfileMajorReceiverPercent, 0, 100); PRODUCT_FLAG(bool, PrintIntrinsics, false, JVMFlag::DIAGNOSTIC, "prints attempted and successful inlining of intrinsics"); DEVELOP_FLAG(bool, StressReflectiveCode, false, JVMFlag::DEFAULT, "Use inexact types at allocations, etc., to test reflection"); PRODUCT_FLAG(bool, DebugInlinedCalls, true, JVMFlag::DIAGNOSTIC, "If false, restricts profiled locations to the root method only"); DEVELOP_FLAG(bool, VerifyLoopOptimizations, false, JVMFlag::DEFAULT, "verify major loop optimizations"); PRODUCT_FLAG(bool, ProfileDynamicTypes, true, JVMFlag::DIAGNOSTIC, "do extra type profiling and use it more aggressively"); DEVELOP_FLAG(bool, TraceIterativeGVN, false, JVMFlag::DEFAULT, "Print progress during Iterative Global Value Numbering"); DEVELOP_FLAG(bool, VerifyIterativeGVN, false, JVMFlag::DEFAULT, "Verify Def-Use modifications during sparse Iterative Global " "Value Numbering"); NOTPROD_FLAG(bool, TraceCISCSpill, false, JVMFlag::DEFAULT, "Trace allocators use of cisc spillable instructions"); PRODUCT_FLAG(bool, SplitIfBlocks, true, JVMFlag::DEFAULT, "Clone compares and control flow through merge points to fold " "some branches"); DEVELOP_FLAG(intx, FreqCountInvocations, 1, JVMFlag::RANGE, "Scaling factor for branch frequencies (deprecated)"); FLAG_RANGE( FreqCountInvocations, 1, max_intx); PRODUCT_FLAG(intx, AliasLevel, 3, JVMFlag::RANGE | JVMFlag::CONSTRAINT, "0 for no aliasing, 1 for oop/field/static/array split, " "2 for class split, 3 for unique instances"); FLAG_RANGE( AliasLevel, 0, 3); FLAG_CONSTRAINT( AliasLevel, (void*)AliasLevelConstraintFunc, JVMFlag::AfterErgo); DEVELOP_FLAG(bool, VerifyAliases, false, JVMFlag::DEFAULT, "perform extra checks on the results of alias analysis"); PRODUCT_FLAG(bool, IncrementalInline, true, JVMFlag::DEFAULT, "do post parse inlining"); DEVELOP_FLAG(bool, AlwaysIncrementalInline, false, JVMFlag::DEFAULT, "do all inlining incrementally"); PRODUCT_FLAG(intx, LiveNodeCountInliningCutoff, 40000, JVMFlag::RANGE, "max number of live nodes in a method"); FLAG_RANGE( LiveNodeCountInliningCutoff, 0, max_juint / 8); PRODUCT_FLAG(bool, OptimizeExpensiveOps, true, JVMFlag::DIAGNOSTIC, "Find best control for expensive operations"); PRODUCT_FLAG(bool, UseMathExactIntrinsics, true, JVMFlag::DIAGNOSTIC, "Enables intrinsification of various java.lang.Math functions"); PRODUCT_FLAG(bool, UseCharacterCompareIntrinsics, false, JVMFlag::DIAGNOSTIC, "Enables intrinsification of java.lang.Character functions"); PRODUCT_FLAG(bool, UseMultiplyToLenIntrinsic, false, JVMFlag::DIAGNOSTIC, "Enables intrinsification of BigInteger.multiplyToLen()"); PRODUCT_FLAG(bool, UseSquareToLenIntrinsic, false, JVMFlag::DIAGNOSTIC, "Enables intrinsification of BigInteger.squareToLen()"); PRODUCT_FLAG(bool, UseMulAddIntrinsic, false, JVMFlag::DIAGNOSTIC, "Enables intrinsification of BigInteger.mulAdd()"); PRODUCT_FLAG(bool, UseMontgomeryMultiplyIntrinsic, false, JVMFlag::DIAGNOSTIC, "Enables intrinsification of BigInteger.montgomeryMultiply()"); PRODUCT_FLAG(bool, UseMontgomerySquareIntrinsic, false, JVMFlag::DIAGNOSTIC, "Enables intrinsification of BigInteger.montgomerySquare()"); PRODUCT_FLAG(bool, UseTypeSpeculation, true, JVMFlag::DEFAULT, "Speculatively propagate types from profiles"); PRODUCT_FLAG(bool, UseInlineDepthForSpeculativeTypes, true, JVMFlag::DIAGNOSTIC, "Carry inline depth of profile point with speculative type " "and give priority to profiling from lower inline depth"); PRODUCT_FLAG_PD(bool, TrapBasedRangeChecks, JVMFlag::DEFAULT, "Generate code for range checks that uses a cmp and trap " "instruction raising SIGTRAP. Used on PPC64."); PRODUCT_FLAG(intx, ArrayCopyLoadStoreMaxElem, 8, JVMFlag::RANGE, "Maximum number of arraycopy elements inlined as a sequence of" "loads/stores"); FLAG_RANGE( ArrayCopyLoadStoreMaxElem, 0, max_intx); DEVELOP_FLAG(bool, StressArrayCopyMacroNode, false, JVMFlag::DEFAULT, "Perform ArrayCopy load/store replacement during IGVN only"); DEVELOP_FLAG(bool, RenumberLiveNodes, true, JVMFlag::DEFAULT, "Renumber live nodes"); PRODUCT_FLAG(uintx, LoopStripMiningIter, 0, JVMFlag::RANGE, "Number of iterations in strip mined loop"); FLAG_RANGE( LoopStripMiningIter, 0, max_juint); PRODUCT_FLAG(uintx, LoopStripMiningIterShortLoop, 0, JVMFlag::RANGE, "Loop with fewer iterations are not strip mined"); FLAG_RANGE( LoopStripMiningIterShortLoop, 0, max_juint); PRODUCT_FLAG(bool, UseProfiledLoopPredicate, true, JVMFlag::DEFAULT, "Move predicates out of loops based on profiling data"); PRODUCT_FLAG(bool, ExpandSubTypeCheckAtParseTime, false, JVMFlag::DIAGNOSTIC, "Do not use subtype check macro node"); #endif // COMPILER2 #endif // SHARE_OPTO_C2_GLOBALS_HPP