Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java @ 2509:16b9a8b5ad39
Renamings Runtime=>GraalRuntime and Compiler=>GraalCompiler
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 11:50:44 +0200 |
parents | graal/Compiler/src/com/sun/c1x/C1XOptions.java@9ec15d6914ca |
children | f6125fb5bfbc |
comparison
equal
deleted
inserted
replaced
2508:fea94949e0a2 | 2509:16b9a8b5ad39 |
---|---|
1 /* | |
2 * Copyright (c) 2009, 2011, 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 package com.sun.c1x; | |
24 | |
25 import com.sun.c1x.debug.TTY.*; | |
26 | |
27 /** | |
28 * This class encapsulates options that control the behavior of the C1X compiler. | |
29 * The help message for each option is specified by a {@linkplain #helpMap help map}. | |
30 * | |
31 * (tw) WARNING: Fields of this class are treated as final by Graal. | |
32 * | |
33 * @author Ben L. Titzer | |
34 */ | |
35 public final class C1XOptions { | |
36 | |
37 // Checkstyle: stop | |
38 private static final boolean ____ = false; | |
39 // Checkstyle: resume | |
40 | |
41 // inlining settings | |
42 public static boolean OptInline = ____; | |
43 public static boolean OptInlineExcept = ____; | |
44 public static boolean OptInlineSynchronized = ____; | |
45 | |
46 public static int MaximumInstructionCount = 37000; | |
47 public static float MaximumInlineRatio = 0.90f; | |
48 public static int MaximumInlineSize = 35; | |
49 public static int MaximumTrivialSize = 6; | |
50 public static int MaximumInlineLevel = 9; | |
51 public static int MaximumRecursiveInlineLevel = 1; | |
52 public static int MaximumDesiredSize = 8000; | |
53 public static int MaximumShortLoopSize = 5; | |
54 | |
55 // intrinsification settings | |
56 public static boolean OptIntrinsify = ____; | |
57 | |
58 // debugging settings | |
59 public static boolean VerifyPointerMaps = ____; | |
60 public static boolean PinAllInstructions = ____; | |
61 public static boolean TestPatching = ____; | |
62 public static boolean FatalUnimplemented = ____; | |
63 public static int MethodEndBreakpointGuards = 0; | |
64 public static boolean ZapStackOnMethodEntry = ____; | |
65 public static boolean StressLinearScan = ____; | |
66 | |
67 /** | |
68 * See {@link Filter#Filter(String, Object)}. | |
69 */ | |
70 public static String PrintFilter = null; | |
71 | |
72 // printing settings | |
73 public static boolean PrintHIR = ____; | |
74 public static boolean PrintInliningFailures = ____; | |
75 public static boolean PrintLIR = ____; | |
76 public static boolean PrintCFGToFile = ____; | |
77 public static boolean PrintMetrics = ____; | |
78 public static boolean PrintTimers = ____; | |
79 public static boolean PrintCompilation = ____; | |
80 public static boolean PrintXirTemplates = ____; | |
81 public static boolean PrintIRWithLIR = ____; | |
82 public static boolean PrintAssembly = ____; | |
83 public static boolean PrintCodeBytes = ____; | |
84 public static int PrintAssemblyBytesPerLine = 16; | |
85 public static int TraceLinearScanLevel = 0; | |
86 public static boolean TraceRelocation = ____; | |
87 public static boolean TraceLIRVisit = ____; | |
88 public static boolean TraceAssembler = ____; | |
89 public static int TraceBytecodeParserLevel = 0; | |
90 public static boolean PrintAssumptions = ____; | |
91 public static boolean PrintInlinedIntrinsics = ____; | |
92 | |
93 // IR checking | |
94 public static boolean InterpretInvokedMethods = ____; | |
95 public static boolean PrintStateInInterpreter = ____; | |
96 | |
97 // canonicalizer settings | |
98 public static boolean CanonicalizeIntrinsics = true; | |
99 public static boolean CanonicalizeFloatingPoint = true; | |
100 public static boolean CanonicalizeNarrowingInStores = true; | |
101 public static boolean CanonicalizeConstantFields = true; | |
102 public static boolean CanonicalizeUnsafes = true; | |
103 public static boolean CanonicalizeMultipliesToShifts = true; | |
104 public static boolean CanonicalizeObjectCheckCast = true; | |
105 public static boolean CanonicalizeObjectInstanceOf = true; | |
106 public static boolean CanonicalizeFoldableMethods = true; | |
107 public static boolean CanonicalizeArrayStoreChecks = true; | |
108 | |
109 // all optimization settings | |
110 public static boolean OptCanonicalize; | |
111 public static boolean OptLocalValueNumbering; | |
112 public static boolean OptLocalLoadElimination; | |
113 public static boolean OptCSEArrayLength; | |
114 public static boolean OptGlobalValueNumbering; | |
115 public static boolean OptCEElimination; | |
116 public static boolean OptBlockMerging; | |
117 public static boolean OptBlockSkipping; | |
118 public static boolean OptNullCheckElimination; | |
119 public static boolean OptIterativeNCE; | |
120 public static boolean OptFlowSensitiveNCE; | |
121 public static boolean OptDeadCodeElimination1; | |
122 public static boolean OptDeadCodeElimination2; | |
123 public static boolean OptControlFlow; | |
124 public static boolean OptMoveElimination; | |
125 | |
126 // optimistic optimization settings | |
127 public static boolean UseAssumptions = true; | |
128 | |
129 // state merging settings | |
130 public static boolean AssumeVerifiedBytecode = ____; | |
131 public static boolean PhiSimplify = true; | |
132 public static boolean PhiLoopStores = true; | |
133 | |
134 // miscellaneous settings | |
135 public static boolean SupportObjectConstants = true; | |
136 | |
137 // Linear scan settings | |
138 public static boolean CopyPointerStackArguments = true; | |
139 | |
140 // Code generator settings | |
141 public static boolean GenLIR = true; | |
142 public static boolean GenCode = true; | |
143 | |
144 public static boolean UseConstDirectCall = false; | |
145 | |
146 public static boolean GenSpecialDivChecks = ____; | |
147 public static boolean GenAssertionCode = ____; | |
148 public static boolean AlignCallsForPatching = true; | |
149 public static boolean NullCheckUniquePc = ____; | |
150 public static boolean InvokeSnippetAfterArguments = ____; | |
151 public static boolean ResolveClassBeforeStaticInvoke = true; | |
152 | |
153 // Translating tableswitch instructions | |
154 public static int SequentialSwitchLimit = 4; | |
155 public static int RangeTestsSwitchDensity = 5; | |
156 | |
157 public static int InitialCodeBufferSize = 232; | |
158 public static boolean DetailedAsserts = true; | |
159 | |
160 // Runtime settings | |
161 public static int ReadPrefetchInstr = 0; | |
162 public static boolean UseStackMapTableLiveness = ____; | |
163 public static int StackShadowPages = 2; | |
164 | |
165 // Assembler settings | |
166 public static boolean CommentedAssembly = ____; | |
167 public static boolean PrintLIRWithAssembly = ____; | |
168 public static int Atomics = 0; | |
169 public static boolean UseNormalNop = true; | |
170 public static boolean UseAddressNop = true; | |
171 public static boolean UseIncDec = ____; | |
172 public static boolean UseXmmLoadAndClearUpper = ____; | |
173 public static boolean UseXmmRegToRegMoveAll = ____; | |
174 | |
175 static { | |
176 setOptimizationLevel(1); | |
177 } | |
178 | |
179 public static void setOptimizationLevel(int level) { | |
180 final boolean l = (level >= 1); | |
181 final boolean ll = (level >= 2); | |
182 final boolean lll = (level >= 3); | |
183 | |
184 // Level 1 optimizations | |
185 OptCanonicalize = l; | |
186 OptLocalValueNumbering = l; | |
187 OptLocalLoadElimination = l; | |
188 PhiLoopStores = l; | |
189 OptControlFlow = l; | |
190 OptMoveElimination = l; | |
191 OptNullCheckElimination = l; | |
192 | |
193 // Level 2 optimizations | |
194 OptInline = ll; | |
195 OptBlockMerging = ll; | |
196 | |
197 // Level 3 optimizations | |
198 OptCSEArrayLength = lll; | |
199 OptIntrinsify = lll; | |
200 OptInlineExcept = lll; | |
201 OptInlineSynchronized = lll; | |
202 UseStackMapTableLiveness = lll; | |
203 UseAssumptions = lll; | |
204 OptIterativeNCE = lll; | |
205 OptFlowSensitiveNCE = lll; | |
206 OptDeadCodeElimination1 = lll; | |
207 OptDeadCodeElimination2 = lll; | |
208 OptGlobalValueNumbering = lll; | |
209 OptCEElimination = lll; | |
210 OptBlockSkipping = lll; | |
211 } | |
212 } |