Wed, 03 Jul 2019 20:42:37 +0800
Merge
1 /*
2 * Copyright (c) 2000, 2013, 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 */
25 /*
26 * This file has been modified by Loongson Technology in 2015. These
27 * modifications are Copyright (c) 2015 Loongson Technology, and are made
28 * available on the same license terms set forth above.
29 */
31 #ifndef SHARE_VM_C1_C1_GLOBALS_HPP
32 #define SHARE_VM_C1_C1_GLOBALS_HPP
34 #include "runtime/globals.hpp"
35 #ifdef TARGET_ARCH_x86
36 # include "c1_globals_x86.hpp"
37 #endif
38 #ifdef TARGET_ARCH_mips
39 # include "c1_globals_mips.hpp"
40 #endif
41 #ifdef TARGET_ARCH_sparc
42 # include "c1_globals_sparc.hpp"
43 #endif
44 #ifdef TARGET_ARCH_arm
45 # include "c1_globals_arm.hpp"
46 #endif
47 #ifdef TARGET_ARCH_ppc
48 # include "c1_globals_ppc.hpp"
49 #endif
50 #ifdef TARGET_OS_FAMILY_linux
51 # include "c1_globals_linux.hpp"
52 #endif
53 #ifdef TARGET_OS_FAMILY_solaris
54 # include "c1_globals_solaris.hpp"
55 #endif
56 #ifdef TARGET_OS_FAMILY_windows
57 # include "c1_globals_windows.hpp"
58 #endif
59 #ifdef TARGET_OS_FAMILY_aix
60 # include "c1_globals_aix.hpp"
61 #endif
62 #ifdef TARGET_OS_FAMILY_bsd
63 # include "c1_globals_bsd.hpp"
64 #endif
66 //
67 // Defines all global flags used by the client compiler.
68 //
69 #define C1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct) \
70 \
71 /* Printing */ \
72 notproduct(bool, PrintC1Statistics, false, \
73 "Print Compiler1 statistics" ) \
74 \
75 notproduct(bool, PrintInitialBlockList, false, \
76 "Print block list of BlockListBuilder") \
77 \
78 notproduct(bool, PrintCFG, false, \
79 "Print control flow graph after each change") \
80 \
81 notproduct(bool, PrintCFG0, false, \
82 "Print control flow graph after construction") \
83 \
84 notproduct(bool, PrintCFG1, false, \
85 "Print control flow graph after optimizations") \
86 \
87 notproduct(bool, PrintCFG2, false, \
88 "Print control flow graph before code generation") \
89 \
90 notproduct(bool, PrintIRDuringConstruction, false, \
91 "Print IR as it's being constructed (helpful for debugging frontend)")\
92 \
93 notproduct(bool, PrintPhiFunctions, false, \
94 "Print phi functions when they are created and simplified") \
95 \
96 notproduct(bool, PrintIR, false, \
97 "Print full intermediate representation after each change") \
98 \
99 notproduct(bool, PrintIR0, false, \
100 "Print full intermediate representation after construction") \
101 \
102 notproduct(bool, PrintIR1, false, \
103 "Print full intermediate representation after optimizations") \
104 \
105 notproduct(bool, PrintIR2, false, \
106 "Print full intermediate representation before code generation") \
107 \
108 notproduct(bool, PrintSimpleStubs, false, \
109 "Print SimpleStubs") \
110 \
111 /* C1 optimizations */ \
112 \
113 develop(bool, UseC1Optimizations, true, \
114 "Turn on C1 optimizations") \
115 \
116 develop(bool, SelectivePhiFunctions, true, \
117 "create phi functions at loop headers only when necessary") \
118 \
119 develop(bool, OptimizeIfOps, true, \
120 "Optimize multiple IfOps") \
121 \
122 develop(bool, DoCEE, true, \
123 "Do Conditional Expression Elimination to simplify CFG") \
124 \
125 develop(bool, PrintCEE, false, \
126 "Print Conditional Expression Elimination") \
127 \
128 develop(bool, UseLocalValueNumbering, true, \
129 "Use Local Value Numbering (embedded in GraphBuilder)") \
130 \
131 develop(bool, UseGlobalValueNumbering, true, \
132 "Use Global Value Numbering (separate phase)") \
133 \
134 product(bool, UseLoopInvariantCodeMotion, true, \
135 "Simple loop invariant code motion for short loops during GVN") \
136 \
137 develop(bool, TracePredicateFailedTraps, false, \
138 "trace runtime traps caused by predicate failure") \
139 \
140 develop(bool, StressLoopInvariantCodeMotion, false, \
141 "stress loop invariant code motion") \
142 \
143 develop(bool, TraceRangeCheckElimination, false, \
144 "Trace Range Check Elimination") \
145 \
146 develop(bool, AssertRangeCheckElimination, false, \
147 "Assert Range Check Elimination") \
148 \
149 develop(bool, StressRangeCheckElimination, false, \
150 "stress Range Check Elimination") \
151 \
152 develop(bool, PrintValueNumbering, false, \
153 "Print Value Numbering") \
154 \
155 product(intx, ValueMapInitialSize, 11, \
156 "Initial size of a value map") \
157 \
158 product(intx, ValueMapMaxLoopSize, 8, \
159 "maximum size of a loop optimized by global value numbering") \
160 \
161 develop(bool, EliminateBlocks, true, \
162 "Eliminate unneccessary basic blocks") \
163 \
164 develop(bool, PrintBlockElimination, false, \
165 "Print basic block elimination") \
166 \
167 develop(bool, EliminateNullChecks, true, \
168 "Eliminate unneccessary null checks") \
169 \
170 develop(bool, PrintNullCheckElimination, false, \
171 "Print null check elimination") \
172 \
173 develop(bool, EliminateFieldAccess, true, \
174 "Optimize field loads and stores") \
175 \
176 develop(bool, InlineMethodsWithExceptionHandlers, true, \
177 "Inline methods containing exception handlers " \
178 "(NOTE: does not work with current backend)") \
179 \
180 product(bool, InlineSynchronizedMethods, true, \
181 "Inline synchronized methods") \
182 \
183 develop(bool, InlineNIOCheckIndex, true, \
184 "Intrinsify java.nio.Buffer.checkIndex") \
185 \
186 develop(bool, CanonicalizeNodes, true, \
187 "Canonicalize graph nodes") \
188 \
189 develop(bool, PrintCanonicalization, false, \
190 "Print graph node canonicalization") \
191 \
192 develop(bool, UseTableRanges, true, \
193 "Faster versions of lookup table using ranges") \
194 \
195 develop_pd(bool, RoundFPResults, \
196 "Indicates whether rounding is needed for floating point results")\
197 \
198 develop(intx, NestedInliningSizeRatio, 90, \
199 "Percentage of prev. allowed inline size in recursive inlining") \
200 \
201 notproduct(bool, PrintIRWithLIR, false, \
202 "Print IR instructions with generated LIR") \
203 \
204 notproduct(bool, PrintLIRWithAssembly, false, \
205 "Show LIR instruction with generated assembly") \
206 \
207 develop(bool, CommentedAssembly, trueInDebug, \
208 "Show extra info in PrintNMethods output") \
209 \
210 develop(bool, LIRTracePeephole, false, \
211 "Trace peephole optimizer") \
212 \
213 develop(bool, LIRTraceExecution, false, \
214 "add LIR code which logs the execution of blocks") \
215 \
216 product_pd(bool, LIRFillDelaySlots, \
217 "fill delays on on SPARC with LIR") \
218 \
219 develop_pd(bool, CSEArrayLength, \
220 "Create separate nodes for length in array accesses") \
221 \
222 develop_pd(bool, TwoOperandLIRForm, \
223 "true if LIR requires src1 and dst to match in binary LIR ops") \
224 \
225 develop(intx, TraceLinearScanLevel, 0, \
226 "Debug levels for the linear scan allocator") \
227 \
228 develop(bool, StressLinearScan, false, \
229 "scramble block order used by LinearScan (stress test)") \
230 \
231 product(bool, TimeLinearScan, false, \
232 "detailed timing of LinearScan phases") \
233 \
234 develop(bool, TimeEachLinearScan, false, \
235 "print detailed timing of each LinearScan run") \
236 \
237 develop(bool, CountLinearScan, false, \
238 "collect statistic counters during LinearScan") \
239 \
240 /* C1 variable */ \
241 \
242 develop(bool, C1Breakpoint, false, \
243 "Sets a breakpoint at entry of each compiled method") \
244 \
245 develop(bool, ImplicitDiv0Checks, true, \
246 "Use implicit division by zero checks") \
247 \
248 develop(bool, PinAllInstructions, false, \
249 "All instructions are pinned") \
250 \
251 develop(bool, UseFastNewInstance, true, \
252 "Use fast inlined instance allocation") \
253 \
254 develop(bool, UseFastNewTypeArray, true, \
255 "Use fast inlined type array allocation") \
256 \
257 develop(bool, UseFastNewObjectArray, true, \
258 "Use fast inlined object array allocation") \
259 \
260 develop(bool, UseFastLocking, true, \
261 "Use fast inlined locking code") \
262 \
263 develop(bool, UseSlowPath, false, \
264 "For debugging: test slow cases by always using them") \
265 \
266 develop(bool, GenerateArrayStoreCheck, true, \
267 "Generates code for array store checks") \
268 \
269 develop(bool, DeoptC1, true, \
270 "Use deoptimization in C1") \
271 \
272 develop(bool, PrintBailouts, false, \
273 "Print bailout and its reason") \
274 \
275 develop(bool, TracePatching, false, \
276 "Trace patching of field access on uninitialized classes") \
277 \
278 develop(bool, PatchALot, false, \
279 "Marks all fields as having unloaded classes") \
280 \
281 develop(bool, PrintNotLoaded, false, \
282 "Prints where classes are not loaded during code generation") \
283 \
284 develop(bool, PrintLIR, false, \
285 "print low-level IR") \
286 \
287 develop(bool, BailoutAfterHIR, false, \
288 "bailout of compilation after building of HIR") \
289 \
290 develop(bool, BailoutAfterLIR, false, \
291 "bailout of compilation after building of LIR") \
292 \
293 develop(bool, BailoutOnExceptionHandlers, false, \
294 "bailout of compilation for methods with exception handlers") \
295 \
296 develop(bool, InstallMethods, true, \
297 "Install methods at the end of successful compilations") \
298 \
299 develop(intx, NMethodSizeLimit, (64*K)*wordSize, \
300 "Maximum size of a compiled method.") \
301 \
302 develop(bool, TraceFPUStack, false, \
303 "Trace emulation of the FPU stack (intel only)") \
304 \
305 develop(bool, TraceFPURegisterUsage, false, \
306 "Trace usage of FPU registers at start of blocks (intel only)") \
307 \
308 develop(bool, OptimizeUnsafes, true, \
309 "Optimize raw unsafe ops") \
310 \
311 develop(bool, PrintUnsafeOptimization, false, \
312 "Print optimization of raw unsafe ops") \
313 \
314 develop(intx, InstructionCountCutoff, 37000, \
315 "If GraphBuilder adds this many instructions, bails out") \
316 \
317 product_pd(intx, SafepointPollOffset, \
318 "Offset added to polling address (Intel only)") \
319 \
320 develop(bool, ComputeExactFPURegisterUsage, true, \
321 "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \
322 \
323 product(bool, C1ProfileCalls, true, \
324 "Profile calls when generating code for updating MDOs") \
325 \
326 product(bool, C1ProfileVirtualCalls, true, \
327 "Profile virtual calls when generating code for updating MDOs") \
328 \
329 product(bool, C1ProfileInlinedCalls, true, \
330 "Profile inlined calls when generating code for updating MDOs") \
331 \
332 product(bool, C1ProfileBranches, true, \
333 "Profile branches when generating code for updating MDOs") \
334 \
335 product(bool, C1ProfileCheckcasts, true, \
336 "Profile checkcasts when generating code for updating MDOs") \
337 \
338 product(bool, C1OptimizeVirtualCallProfiling, true, \
339 "Use CHA and exact type results at call sites when updating MDOs")\
340 \
341 product(bool, C1UpdateMethodData, trueInTiered, \
342 "Update MethodData*s in Tier1-generated code") \
343 \
344 develop(bool, PrintCFGToFile, false, \
345 "print control flow graph to a separate file during compilation") \
346 \
347 diagnostic(bool, C1PatchInvokeDynamic, true, \
348 "Patch invokedynamic appendix not known at compile time") \
349 \
352 // Read default values for c1 globals
354 C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG)
356 #endif // SHARE_VM_C1_C1_GLOBALS_HPP