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