1 /*
  2  * Copyright (c) 2000, 2021, 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, 64)                                                      \
 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, 0)                                                      \
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(uintx, PrintIdealIndentThreshold, 0,                           \
116           "A depth threshold of ideal graph. Indentation is disabled "      \
117           "when users attempt to dump an ideal graph deeper than it.")      \
118                                                                             \
119   notproduct(bool, PrintOpto, false,                                        \
120           "Print compiler2 attempts")                                       \
121                                                                             \
122   notproduct(bool, PrintOptoInlining, false,                                \
123           "Print compiler2 inlining decisions")                             \
124                                                                             \
125   notproduct(bool, VerifyIdealNodeCount, false,                             \
126           "Verify that tracked dead ideal node count is accurate")          \
127                                                                             \
128   notproduct(bool, PrintIdealNodeCount, false,                              \
129           "Print liveness counts of ideal nodes")                           \
130                                                                             \
131   product_pd(bool, IdealizeClearArrayNode, DIAGNOSTIC,                      \
132           "Replace ClearArrayNode by subgraph of basic operations.")        \
133                                                                             \
134   develop(bool, OptoBreakpoint, false,                                      \
135           "insert breakpoint at method entry")                              \
136                                                                             \
137   notproduct(bool, OptoBreakpointOSR, false,                                \
138           "insert breakpoint at osr method entry")                          \
139                                                                             \
140   notproduct(intx, BreakAtNode, 0,                                          \
141           "Break at construction of this Node (either _idx or _debug_idx)") \
142                                                                             \
143   notproduct(bool, OptoBreakpointC2R, false,                                \
144           "insert breakpoint at runtime stub entry")                        \
145                                                                             \
146   notproduct(bool, OptoNoExecute, false,                                    \
147           "Attempt to parse and compile but do not execute generated code") \
148                                                                             \
149   notproduct(bool, PrintOptoStatistics, false,                              \
150           "Print New compiler statistics")                                  \
151                                                                             \
152   product(bool, PrintOptoAssembly, false, DIAGNOSTIC,                       \
153           "Print New compiler assembly output")                             \
154                                                                             \
155   develop_pd(bool, OptoPeephole,                                            \
156           "Apply peephole optimizations after register allocation")         \
157                                                                             \
158   notproduct(bool, PrintFrameConverterAssembly, false,                      \
159           "Print New compiler assembly output for frame converters")        \
160                                                                             \
161   notproduct(bool, PrintParseStatistics, false,                             \
162           "Print nodes, transforms and new values made per bytecode parsed")\
163                                                                             \
164   notproduct(bool, PrintOptoPeephole, false,                                \
165           "Print New compiler peephole replacements")                       \
166                                                                             \
167   develop(bool, PrintCFGBlockFreq, false,                                   \
168           "Print CFG block freqencies")                                     \
169                                                                             \
170   develop(bool, TraceOptoParse, false,                                      \
171           "Trace bytecode parse and control-flow merge")                    \
172                                                                             \
173   product_pd(intx,  LoopUnrollLimit,                                        \
174           "Unroll loop bodies with node count less than this")              \
175           range(0, max_jint / 4)                                            \
176                                                                             \
177   product_pd(intx, LoopPercentProfileLimit,                                 \
178              "Unroll loop bodies with % node count of profile limit")       \
179              range(10, 100)                                                 \
180                                                                             \
181   product(intx,  LoopMaxUnroll, 16,                                         \
182           "Maximum number of unrolls for main loop")                        \
183           range(0, max_jint)                                                \
184                                                                             \
185   product_pd(bool,  SuperWordLoopUnrollAnalysis,                            \
186            "Map number of unrolls for main loop via "                       \
187            "Superword Level Parallelism analysis")                          \
188                                                                             \
189   product(bool, PostLoopMultiversioning, false, EXPERIMENTAL,               \
190            "Multi versioned post loops to eliminate range checks")          \
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 supress 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   product(bool, DoReserveCopyInSuperWord, true,                             \
352           "Create reserve copy of graph in SuperWord.")                     \
353                                                                             \
354   notproduct(bool, TraceSuperWord, false,                                   \
355           "Trace superword transforms")                                     \
356                                                                             \
357   notproduct(bool, TraceNewVectors, false,                                  \
358           "Trace creation of Vector nodes")                                 \
359                                                                             \
360   product_pd(bool, OptoBundling,                                            \
361           "Generate nops to fill i-cache lines")                            \
362                                                                             \
363   product_pd(intx, ConditionalMoveLimit,                                    \
364           "Limit of ops to make speculative when using CMOVE")              \
365           range(0, max_jint)                                                \
366                                                                             \
367   notproduct(bool, PrintIdealGraph, false,                                  \
368           "Print ideal graph to XML file / network interface. "             \
369           "By default attempts to connect to the visualizer on a socket.")  \
370                                                                             \
371   notproduct(intx, PrintIdealGraphLevel, 0,                                 \
372           "Level of detail of the ideal graph printout. "                   \
373           "System-wide value, -1=printing is disabled, "                    \
374           "0=print nothing except IGVPrintLevel directives, "               \
375           "4=all details printed. "                                         \
376           "Level of detail of printouts can be set on a per-method level "  \
377           "as well by using CompileCommand=option.")                        \
378           range(-1, 4)                                                      \
379                                                                             \
380   notproduct(intx, PrintIdealGraphPort, 4444,                               \
381           "Ideal graph printer to network port")                            \
382           range(0, SHRT_MAX)                                                \
383                                                                             \
384   notproduct(ccstr, PrintIdealGraphAddress, "127.0.0.1",                    \
385           "IP address to connect to visualizer")                            \
386                                                                             \
387   notproduct(ccstr, PrintIdealGraphFile, NULL,                              \
388           "File to dump ideal graph to.  If set overrides the "             \
389           "use of the network")                                             \
390                                                                             \
391   product(bool, UseBimorphicInlining, true,                                 \
392           "Profiling based inlining for two receivers")                     \
393                                                                             \
394   product(bool, UseOnlyInlinedBimorphic, true,                              \
395           "Don't use BimorphicInlining if can't inline a second method")    \
396                                                                             \
397   develop(bool, SubsumeLoads, true,                                         \
398           "Attempt to compile while subsuming loads into machine "          \
399           "instructions.")                                                  \
400                                                                             \
401   develop(bool, StressRecompilation, false,                                 \
402           "Recompile each compiled method without subsuming loads "         \
403           "or escape analysis.")                                            \
404                                                                             \
405   develop(intx, ImplicitNullCheckThreshold, 3,                              \
406           "Don't do implicit null checks if NPE's in a method exceeds "     \
407           "limit")                                                          \
408           range(0, max_jint)                                                \
409                                                                             \
410   product(intx, LoopOptsCount, 43,                                          \
411           "Set level of loop optimization for tier 1 compiles")             \
412           range(5, 43)                                                      \
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, DoEscapeAnalysis, true,                                     \
475           "Perform escape analysis")                                        \
476                                                                             \
477   product(double, EscapeAnalysisTimeout, 20. DEBUG_ONLY(+40.),              \
478           "Abort EA when it reaches time limit (in sec)")                   \
479           range(0, DBL_MAX)                                                 \
480                                                                             \
481   develop(bool, ExitEscapeAnalysisOnTimeout, true,                          \
482           "Exit or throw assert in EA when it reaches time limit")          \
483                                                                             \
484   notproduct(bool, PrintEscapeAnalysis, false,                              \
485           "Print the results of escape analysis")                           \
486                                                                             \
487   product(bool, EliminateAllocations, true,                                 \
488           "Use escape analysis to eliminate allocations")                   \
489                                                                             \
490   notproduct(bool, PrintEliminateAllocations, false,                        \
491           "Print out when allocations are eliminated")                      \
492                                                                             \
493   product(intx, EliminateAllocationArraySizeLimit, 64,                      \
494           "Array size (number of elements) limit for scalar replacement")   \
495           range(0, max_jint)                                                \
496                                                                             \
497   product(intx, EliminateAllocationFieldsLimit, 512, DIAGNOSTIC,            \
498           "Number of fields in instance limit for scalar replacement")      \
499           range(0, max_jint)                                                \
500                                                                             \
501   product(bool, OptimizePtrCompare, true,                                   \
502           "Use escape analysis to optimize pointers compare")               \
503                                                                             \
504   notproduct(bool, PrintOptimizePtrCompare, false,                          \
505           "Print information about optimized pointers compare")             \
506                                                                             \
507   notproduct(bool, VerifyConnectionGraph , true,                            \
508           "Verify Connection Graph construction in Escape Analysis")        \
509                                                                             \
510   product(bool, OptimizeStringConcat, true,                                 \
511           "Optimize the construction of Strings by StringBuilder")          \
512                                                                             \
513   notproduct(bool, PrintOptimizeStringConcat, false,                        \
514           "Print information about transformations performed on Strings")   \
515                                                                             \
516   product(intx, ValueSearchLimit, 1000,                                     \
517           "Recursion limit in PhaseMacroExpand::value_from_mem_phi")        \
518           range(0, max_jint)                                                \
519                                                                             \
520   product(intx, MaxLabelRootDepth, 1100,                                    \
521           "Maximum times call Label_Root to prevent stack overflow")        \
522           range(100, max_jint)                                              \
523                                                                             \
524   product(intx, DominatorSearchLimit, 1000, DIAGNOSTIC,                     \
525           "Iterations limit in Node::dominates")                            \
526           range(0, max_jint)                                                \
527                                                                             \
528   product(bool, BlockLayoutByFrequency, true,                               \
529           "Use edge frequencies to drive block ordering")                   \
530                                                                             \
531   product(intx, BlockLayoutMinDiamondPercentage, 20,                        \
532           "Miniumum %% of a successor (predecessor) for which block "       \
533           "layout a will allow a fork (join) in a single chain")            \
534           range(0, 100)                                                     \
535                                                                             \
536   product(bool, BlockLayoutRotateLoops, true,                               \
537           "Allow back branches to be fall throughs in the block layout")    \
538                                                                             \
539   product(bool, InlineReflectionGetCallerClass, true, DIAGNOSTIC,           \
540           "inline sun.reflect.Reflection.getCallerClass(), known to be "    \
541           "part of base library DLL")                                       \
542                                                                             \
543   product(bool, InlineObjectCopy, true, DIAGNOSTIC,                         \
544           "inline Object.clone and Arrays.copyOf[Range] intrinsics")        \
545                                                                             \
546   product(bool, SpecialStringCompareTo, true, DIAGNOSTIC,                   \
547           "special version of string compareTo")                            \
548                                                                             \
549   product(bool, SpecialStringIndexOf, true, DIAGNOSTIC,                     \
550           "special version of string indexOf")                              \
551                                                                             \
552   product(bool, SpecialStringEquals, true, DIAGNOSTIC,                      \
553           "special version of string equals")                               \
554                                                                             \
555   product(bool, SpecialArraysEquals, true, DIAGNOSTIC,                      \
556           "special version of Arrays.equals(char[],char[])")                \
557                                                                             \
558   product(bool, SpecialEncodeISOArray, true, DIAGNOSTIC,                    \
559           "special version of ISO_8859_1$Encoder.encodeISOArray")           \
560                                                                             \
561   develop(bool, BailoutToInterpreterForThrows, false,                       \
562           "Compiled methods which throws/catches exceptions will be "       \
563           "deopt and intp.")                                                \
564                                                                             \
565   develop(bool, ConvertCmpD2CmpF, true,                                     \
566           "Convert cmpD to cmpF when one input is constant in float range") \
567                                                                             \
568   develop(bool, ConvertFloat2IntClipping, true,                             \
569           "Convert float2int clipping idiom to integer clipping")           \
570                                                                             \
571   develop(bool, MonomorphicArrayCheck, true,                                \
572           "Uncommon-trap array store checks that require full type check")  \
573                                                                             \
574   notproduct(bool, TracePhaseCCP, false,                                    \
575           "Print progress during Conditional Constant Propagation")         \
576                                                                             \
577   develop(bool, PrintDominators, false,                                     \
578           "Print out dominator trees for GVN")                              \
579                                                                             \
580   product(bool, TraceSpilling, false, DIAGNOSTIC,                           \
581           "Trace spilling")                                                 \
582                                                                             \
583   product(bool, TraceTypeProfile, false, DIAGNOSTIC,                        \
584           "Trace type profile")                                             \
585                                                                             \
586   develop(bool, PoisonOSREntry, true,                                       \
587            "Detect abnormal calls to OSR code")                             \
588                                                                             \
589   develop(bool, SoftMatchFailure, trueInProduct,                            \
590           "If the DFA fails to match a node, print a message and bail out") \
591                                                                             \
592   develop(bool, InlineAccessors, true,                                      \
593           "inline accessor methods (get/set)")                              \
594                                                                             \
595   product(intx, TypeProfileMajorReceiverPercent, 90,                        \
596           "% of major receiver type to all profiled receivers")             \
597           range(0, 100)                                                     \
598                                                                             \
599   product(bool, PrintIntrinsics, false, DIAGNOSTIC,                         \
600           "prints attempted and successful inlining of intrinsics")         \
601                                                                             \
602   develop(bool, StressReflectiveCode, false,                                \
603           "Use inexact types at allocations, etc., to test reflection")     \
604                                                                             \
605   product(bool, DebugInlinedCalls, true, DIAGNOSTIC,                        \
606          "If false, restricts profiled locations to the root method only")  \
607                                                                             \
608   notproduct(bool, VerifyLoopOptimizations, false,                          \
609           "verify major loop optimizations")                                \
610                                                                             \
611   product(bool, ProfileDynamicTypes, true, DIAGNOSTIC,                      \
612           "do extra type profiling and use it more aggressively")           \
613                                                                             \
614   develop(bool, TraceIterativeGVN, false,                                   \
615           "Print progress during Iterative Global Value Numbering")         \
616                                                                             \
617   develop(bool, VerifyIterativeGVN, false,                                  \
618           "Verify Def-Use modifications during sparse Iterative Global "    \
619           "Value Numbering")                                                \
620                                                                             \
621   notproduct(bool, TraceCISCSpill, false,                                   \
622           "Trace allocators use of cisc spillable instructions")            \
623                                                                             \
624   product(bool, SplitIfBlocks, true,                                        \
625           "Clone compares and control flow through merge points to fold "   \
626           "some branches")                                                  \
627                                                                             \
628   develop(intx, FreqCountInvocations,  1,                                   \
629           "Scaling factor for branch frequencies (deprecated)")             \
630           range(1, max_intx)                                                \
631                                                                             \
632   product(intx, AliasLevel,     3,                                          \
633           "0 for no aliasing, 1 for oop/field/static/array split, "         \
634           "2 for class split, 3 for unique instances")                      \
635           range(0, 3)                                                       \
636           constraint(AliasLevelConstraintFunc,AfterErgo)                    \
637                                                                             \
638   develop(bool, VerifyAliases, false,                                       \
639           "perform extra checks on the results of alias analysis")          \
640                                                                             \
641   product(intx, MaxInlineLevel, 15,                                         \
642           "maximum number of nested calls that are inlined by high tier "   \
643           "compiler")                                                       \
644           range(0, max_jint)                                                \
645                                                                             \
646   product(intx, MaxRecursiveInlineLevel, 1,                                 \
647           "maximum number of nested recursive calls that are inlined by "   \
648           "high tier compiler")                                             \
649           range(0, max_jint)                                                \
650                                                                             \
651   product_pd(intx, InlineSmallCode,                                         \
652           "Only inline already compiled methods if their code size is "     \
653           "less than this")                                                 \
654           range(0, max_jint)                                                \
655                                                                             \
656   product(intx, MaxInlineSize, 35,                                          \
657           "The maximum bytecode size of a method to be inlined by high "    \
658           "tier compiler")                                                  \
659           range(0, max_jint)                                                \
660                                                                             \
661   product_pd(intx, FreqInlineSize,                                          \
662           "The maximum bytecode size of a frequent method to be inlined")   \
663           range(0, max_jint)                                                \
664                                                                             \
665   product(intx, MaxTrivialSize, 6,                                          \
666           "The maximum bytecode size of a trivial method to be inlined by " \
667           "high tier compiler")                                             \
668           range(0, max_jint)                                                \
669                                                                             \
670   product(bool, IncrementalInline, true,                                    \
671           "do post parse inlining")                                         \
672                                                                             \
673   product(bool, IncrementalInlineMH, true, DIAGNOSTIC,                      \
674           "do post parse inlining of method handle calls")                  \
675                                                                             \
676   product(bool, IncrementalInlineVirtual, true, DIAGNOSTIC,                 \
677           "do post parse inlining of virtual calls")                        \
678                                                                             \
679   develop(bool, AlwaysIncrementalInline, false,                             \
680           "do all inlining incrementally")                                  \
681                                                                             \
682   product(bool, IncrementalInlineForceCleanup, false, DIAGNOSTIC,           \
683           "do cleanup after every iteration of incremental inlining")       \
684                                                                             \
685   product(intx, LiveNodeCountInliningCutoff, 40000,                         \
686           "max number of live nodes in a method")                           \
687           range(0, max_juint / 8)                                           \
688                                                                             \
689   product(bool, OptimizeExpensiveOps, true, DIAGNOSTIC,                     \
690           "Find best control for expensive operations")                     \
691                                                                             \
692   product(bool, UseMathExactIntrinsics, true, DIAGNOSTIC,                   \
693           "Enables intrinsification of various java.lang.Math functions")   \
694                                                                             \
695   product(bool, UseCharacterCompareIntrinsics, false, DIAGNOSTIC,           \
696           "Enables intrinsification of java.lang.Character functions")      \
697                                                                             \
698   product(bool, UseMultiplyToLenIntrinsic, false, DIAGNOSTIC,               \
699           "Enables intrinsification of BigInteger.multiplyToLen()")         \
700                                                                             \
701   product(bool, UseSquareToLenIntrinsic, false, DIAGNOSTIC,                 \
702           "Enables intrinsification of BigInteger.squareToLen()")           \
703                                                                             \
704   product(bool, UseMulAddIntrinsic, false, DIAGNOSTIC,                      \
705           "Enables intrinsification of BigInteger.mulAdd()")                \
706                                                                             \
707   product(bool, UseMontgomeryMultiplyIntrinsic, false, DIAGNOSTIC,          \
708           "Enables intrinsification of BigInteger.montgomeryMultiply()")    \
709                                                                             \
710   product(bool, UseMontgomerySquareIntrinsic, false, DIAGNOSTIC,            \
711           "Enables intrinsification of BigInteger.montgomerySquare()")      \
712                                                                             \
713   product(bool, EnableVectorSupport, false, EXPERIMENTAL,                   \
714           "Enables VectorSupport intrinsics")                               \
715                                                                             \
716   product(bool, EnableVectorReboxing, false, EXPERIMENTAL,                  \
717           "Enables reboxing of vectors")                                    \
718                                                                             \
719   product(bool, EnableVectorAggressiveReboxing, false, EXPERIMENTAL,        \
720           "Enables aggressive reboxing of vectors")                         \
721                                                                             \
722   product(bool, UseVectorStubs, false, EXPERIMENTAL,                        \
723           "Use stubs for vector transcendental operations")                 \
724                                                                             \
725   product(bool, UseTypeSpeculation, true,                                   \
726           "Speculatively propagate types from profiles")                    \
727                                                                             \
728   product(bool, UseInlineDepthForSpeculativeTypes, true, DIAGNOSTIC,        \
729           "Carry inline depth of profile point with speculative type "      \
730           "and give priority to profiling from lower inline depth")         \
731                                                                             \
732   product_pd(bool, TrapBasedRangeChecks,                                    \
733           "Generate code for range checks that uses a cmp and trap "        \
734           "instruction raising SIGTRAP. Used on PPC64.")                    \
735                                                                             \
736   product(intx, ArrayCopyLoadStoreMaxElem, 8,                               \
737           "Maximum number of arraycopy elements inlined as a sequence of"   \
738           "loads/stores")                                                   \
739           range(0, max_intx)                                                \
740                                                                             \
741   develop(bool, StressArrayCopyMacroNode, false,                            \
742           "Perform ArrayCopy load/store replacement during IGVN only")      \
743                                                                             \
744   develop(bool, RenumberLiveNodes, true,                                    \
745           "Renumber live nodes")                                            \
746                                                                             \
747   product(uintx, LoopStripMiningIter, 0,                                    \
748           "Number of iterations in strip mined loop")                       \
749           range(0, max_juint)                                               \
750           constraint(LoopStripMiningIterConstraintFunc, AfterErgo)          \
751                                                                             \
752   product(uintx, LoopStripMiningIterShortLoop, 0,                           \
753           "Loop with fewer iterations are not strip mined")                 \
754           range(0, max_juint)                                               \
755                                                                             \
756   product(bool, UseProfiledLoopPredicate, true,                             \
757           "Move predicates out of loops based on profiling data")           \
758                                                                             \
759   product(bool, UseArrayLoadStoreProfile, true,                             \
760           "Take advantage of profiling at array load/store")                \
761                                                                             \
762   product(bool, UseACmpProfile, true,                                       \
763           "Take advantage of profiling at acmp")                            \
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, VerifyReceiverTypes, trueInDebug, DIAGNOSTIC,               \
775           "Verify receiver types at runtime")                               \
776 
777 // end of C2_FLAGS
778 
779 DECLARE_FLAGS(C2_FLAGS)
780 
781 #endif // SHARE_OPTO_C2_GLOBALS_HPP
--- EOF ---