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