c1_globals.hpp revision 2273:1d1603768966
1178354Ssam/* 2178354Ssam * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 3178354Ssam * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4178354Ssam * 5178354Ssam * This code is free software; you can redistribute it and/or modify it 6178354Ssam * under the terms of the GNU General Public License version 2 only, as 7178354Ssam * published by the Free Software Foundation. 8178354Ssam * 9178354Ssam * This code is distributed in the hope that it will be useful, but WITHOUT 10178354Ssam * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11178354Ssam * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12178354Ssam * version 2 for more details (a copy is included in the LICENSE file that 13178354Ssam * accompanied this code). 14178354Ssam * 15178354Ssam * You should have received a copy of the GNU General Public License version 16178354Ssam * 2 along with this work; if not, write to the Free Software Foundation, 17178354Ssam * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18178354Ssam * 19178354Ssam * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20178354Ssam * or visit www.oracle.com if you need additional information or have any 21178354Ssam * questions. 22178354Ssam * 23178354Ssam */ 24178354Ssam 25178354Ssam#ifndef SHARE_VM_C1_C1_GLOBALS_HPP 26178354Ssam#define SHARE_VM_C1_C1_GLOBALS_HPP 27178354Ssam 28178354Ssam#include "runtime/globals.hpp" 29178354Ssam#ifdef TARGET_ARCH_x86 30178354Ssam# include "c1_globals_x86.hpp" 31178354Ssam#endif 32178354Ssam#ifdef TARGET_ARCH_sparc 33178354Ssam# include "c1_globals_sparc.hpp" 34178354Ssam#endif 35178354Ssam#ifdef TARGET_ARCH_arm 36178354Ssam# include "c1_globals_arm.hpp" 37178354Ssam#endif 38178354Ssam#ifdef TARGET_ARCH_ppc 39178354Ssam# include "c1_globals_ppc.hpp" 40178354Ssam#endif 41178354Ssam#ifdef TARGET_OS_FAMILY_linux 42178354Ssam# include "c1_globals_linux.hpp" 43178354Ssam#endif 44178354Ssam#ifdef TARGET_OS_FAMILY_solaris 45178354Ssam# include "c1_globals_solaris.hpp" 46178354Ssam#endif 47178354Ssam#ifdef TARGET_OS_FAMILY_windows 48178354Ssam# include "c1_globals_windows.hpp" 49178354Ssam#endif 50178354Ssam 51178354Ssam// 52178354Ssam// Defines all global flags used by the client compiler. 53178354Ssam// 54178354Ssam#define C1_FLAGS(develop, develop_pd, product, product_pd, notproduct) \ 55178354Ssam \ 56178354Ssam /* Printing */ \ 57178354Ssam notproduct(bool, PrintC1Statistics, false, \ 58178354Ssam "Print Compiler1 statistics" ) \ 59178354Ssam \ 60178354Ssam notproduct(bool, PrintInitialBlockList, false, \ 61178354Ssam "Print block list of BlockListBuilder") \ 62178354Ssam \ 63178354Ssam notproduct(bool, PrintCFG, false, \ 64178354Ssam "Print control flow graph after each change") \ 65178354Ssam \ 66178354Ssam notproduct(bool, PrintCFG0, false, \ 67178354Ssam "Print control flow graph after construction") \ 68178354Ssam \ 69178354Ssam notproduct(bool, PrintCFG1, false, \ 70178354Ssam "Print control flow graph after optimizations") \ 71178354Ssam \ 72178354Ssam notproduct(bool, PrintCFG2, false, \ 73178354Ssam "Print control flow graph before code generation") \ 74178354Ssam \ 75178354Ssam notproduct(bool, PrintIRDuringConstruction, false, \ 76178354Ssam "Print IR as it's being constructed (helpful for debugging frontend)")\ 77178354Ssam \ 78178354Ssam notproduct(bool, PrintPhiFunctions, false, \ 79178354Ssam "Print phi functions when they are created and simplified") \ 80178354Ssam \ 81178354Ssam notproduct(bool, PrintIR, false, \ 82178354Ssam "Print full intermediate representation after each change") \ 83178354Ssam \ 84178354Ssam notproduct(bool, PrintIR0, false, \ 85178354Ssam "Print full intermediate representation after construction") \ 86178354Ssam \ 87178354Ssam notproduct(bool, PrintIR1, false, \ 88178354Ssam "Print full intermediate representation after optimizations") \ 89178354Ssam \ 90178354Ssam notproduct(bool, PrintIR2, false, \ 91178354Ssam "Print full intermediate representation before code generation") \ 92178354Ssam \ 93178354Ssam notproduct(bool, PrintSimpleStubs, false, \ 94178354Ssam "Print SimpleStubs") \ 95178354Ssam \ 96178354Ssam /* C1 optimizations */ \ 97178354Ssam \ 98178354Ssam develop(bool, UseC1Optimizations, true, \ 99178354Ssam "Turn on C1 optimizations") \ 100178354Ssam \ 101178354Ssam develop(bool, SelectivePhiFunctions, true, \ 102178354Ssam "create phi functions at loop headers only when necessary") \ 103178354Ssam \ 104178354Ssam develop(bool, OptimizeIfOps, true, \ 105178354Ssam "Optimize multiple IfOps") \ 106178354Ssam \ 107178354Ssam develop(bool, DoCEE, true, \ 108178354Ssam "Do Conditional Expression Elimination to simplify CFG") \ 109178354Ssam \ 110178354Ssam develop(bool, PrintCEE, false, \ 111178354Ssam "Print Conditional Expression Elimination") \ 112178354Ssam \ 113178354Ssam develop(bool, UseLocalValueNumbering, true, \ 114178354Ssam "Use Local Value Numbering (embedded in GraphBuilder)") \ 115178354Ssam \ 116178354Ssam develop(bool, UseGlobalValueNumbering, true, \ 117178354Ssam "Use Global Value Numbering (separate phase)") \ 118178354Ssam \ 119178354Ssam develop(bool, PrintValueNumbering, false, \ 120178354Ssam "Print Value Numbering") \ 121178354Ssam \ 122178354Ssam product(intx, ValueMapInitialSize, 11, \ 123178354Ssam "Initial size of a value map") \ 124178354Ssam \ 125178354Ssam product(intx, ValueMapMaxLoopSize, 8, \ 126178354Ssam "maximum size of a loop optimized by global value numbering") \ 127178354Ssam \ 128178354Ssam develop(bool, EliminateBlocks, true, \ 129178354Ssam "Eliminate unneccessary basic blocks") \ 130178354Ssam \ 131178354Ssam develop(bool, PrintBlockElimination, false, \ 132178354Ssam "Print basic block elimination") \ 133178354Ssam \ 134178354Ssam develop(bool, EliminateNullChecks, true, \ 135178354Ssam "Eliminate unneccessary null checks") \ 136178354Ssam \ 137178354Ssam develop(bool, PrintNullCheckElimination, false, \ 138178354Ssam "Print null check elimination") \ 139178354Ssam \ 140178354Ssam develop(bool, EliminateFieldAccess, true, \ 141178354Ssam "Optimize field loads and stores") \ 142178354Ssam \ 143178354Ssam develop(bool, InlineMethodsWithExceptionHandlers, true, \ 144178354Ssam "Inline methods containing exception handlers " \ 145178354Ssam "(NOTE: does not work with current backend)") \ 146178354Ssam \ 147178354Ssam develop(bool, InlineSynchronizedMethods, true, \ 148178354Ssam "Inline synchronized methods") \ 149178354Ssam \ 150178354Ssam develop(bool, InlineNIOCheckIndex, true, \ 151178354Ssam "Intrinsify java.nio.Buffer.checkIndex") \ 152178354Ssam \ 153178354Ssam develop(bool, CanonicalizeNodes, true, \ 154178354Ssam "Canonicalize graph nodes") \ 155178354Ssam \ 156178354Ssam develop(bool, CanonicalizeExperimental, false, \ 157178354Ssam "Canonicalize graph nodes, experimental code") \ 158178354Ssam \ 159178354Ssam develop(bool, PrintCanonicalization, false, \ 160178354Ssam "Print graph node canonicalization") \ 161178354Ssam \ 162178354Ssam develop(bool, UseTableRanges, true, \ 163178354Ssam "Faster versions of lookup table using ranges") \ 164178354Ssam \ 165178354Ssam develop(bool, UseFastExceptionHandling, true, \ 166178354Ssam "Faster handling of exceptions") \ 167178354Ssam \ 168178354Ssam develop_pd(bool, RoundFPResults, \ 169178354Ssam "Indicates whether rounding is needed for floating point results")\ 170178354Ssam \ 171178354Ssam develop(intx, NestedInliningSizeRatio, 90, \ 172178354Ssam "Percentage of prev. allowed inline size in recursive inlining") \ 173178354Ssam \ 174178354Ssam notproduct(bool, PrintIRWithLIR, false, \ 175178354Ssam "Print IR instructions with generated LIR") \ 176178354Ssam \ 177178354Ssam notproduct(bool, PrintLIRWithAssembly, false, \ 178178354Ssam "Show LIR instruction with generated assembly") \ 179178354Ssam \ 180178354Ssam develop(bool, CommentedAssembly, trueInDebug, \ 181178354Ssam "Show extra info in PrintNMethods output") \ 182178354Ssam \ 183178354Ssam develop(bool, LIRTracePeephole, false, \ 184178354Ssam "Trace peephole optimizer") \ 185178354Ssam \ 186178354Ssam develop(bool, LIRTraceExecution, false, \ 187178354Ssam "add LIR code which logs the execution of blocks") \ 188178354Ssam \ 189178354Ssam product_pd(bool, LIRFillDelaySlots, \ 190178354Ssam "fill delays on on SPARC with LIR") \ 191178354Ssam \ 192178354Ssam develop_pd(bool, CSEArrayLength, \ 193178354Ssam "Create separate nodes for length in array accesses") \ 194178354Ssam \ 195178354Ssam develop_pd(bool, TwoOperandLIRForm, \ 196178354Ssam "true if LIR requires src1 and dst to match in binary LIR ops") \ 197178354Ssam \ 198178354Ssam develop(intx, TraceLinearScanLevel, 0, \ 199178354Ssam "Debug levels for the linear scan allocator") \ 200178354Ssam \ 201178354Ssam develop(bool, StressLinearScan, false, \ 202178354Ssam "scramble block order used by LinearScan (stress test)") \ 203 \ 204 product(bool, TimeLinearScan, false, \ 205 "detailed timing of LinearScan phases") \ 206 \ 207 develop(bool, TimeEachLinearScan, false, \ 208 "print detailed timing of each LinearScan run") \ 209 \ 210 develop(bool, CountLinearScan, false, \ 211 "collect statistic counters during LinearScan") \ 212 \ 213 /* C1 variable */ \ 214 \ 215 develop(bool, C1Breakpoint, false, \ 216 "Sets a breakpoint at entry of each compiled method") \ 217 \ 218 develop(bool, ImplicitDiv0Checks, true, \ 219 "Use implicit division by zero checks") \ 220 \ 221 develop(bool, PinAllInstructions, false, \ 222 "All instructions are pinned") \ 223 \ 224 develop(bool, ValueStackPinStackAll, true, \ 225 "Pinning in ValueStack pin everything") \ 226 \ 227 develop(bool, UseFastNewInstance, true, \ 228 "Use fast inlined instance allocation") \ 229 \ 230 develop(bool, UseFastNewTypeArray, true, \ 231 "Use fast inlined type array allocation") \ 232 \ 233 develop(bool, UseFastNewObjectArray, true, \ 234 "Use fast inlined object array allocation") \ 235 \ 236 develop(bool, UseFastLocking, true, \ 237 "Use fast inlined locking code") \ 238 \ 239 develop(bool, UseSlowPath, false, \ 240 "For debugging: test slow cases by always using them") \ 241 \ 242 develop(bool, GenerateArrayStoreCheck, true, \ 243 "Generates code for array store checks") \ 244 \ 245 develop(bool, DeoptC1, true, \ 246 "Use deoptimization in C1") \ 247 \ 248 develop(bool, PrintBailouts, false, \ 249 "Print bailout and its reason") \ 250 \ 251 develop(bool, TracePatching, false, \ 252 "Trace patching of field access on uninitialized classes") \ 253 \ 254 develop(bool, PatchALot, false, \ 255 "Marks all fields as having unloaded classes") \ 256 \ 257 develop(bool, PrintNotLoaded, false, \ 258 "Prints where classes are not loaded during code generation") \ 259 \ 260 notproduct(bool, VerifyOopMaps, false, \ 261 "Adds oopmap verification code to the generated code") \ 262 \ 263 develop(bool, PrintLIR, false, \ 264 "print low-level IR") \ 265 \ 266 develop(bool, BailoutAfterHIR, false, \ 267 "bailout of compilation after building of HIR") \ 268 \ 269 develop(bool, BailoutAfterLIR, false, \ 270 "bailout of compilation after building of LIR") \ 271 \ 272 develop(bool, BailoutOnExceptionHandlers, false, \ 273 "bailout of compilation for methods with exception handlers") \ 274 \ 275 develop(bool, InstallMethods, true, \ 276 "Install methods at the end of successful compilations") \ 277 \ 278 product(intx, CompilationRepeat, 0, \ 279 "Number of times to recompile method before returning result") \ 280 \ 281 develop(intx, NMethodSizeLimit, (32*K)*wordSize, \ 282 "Maximum size of a compiled method.") \ 283 \ 284 develop(bool, TraceFPUStack, false, \ 285 "Trace emulation of the FPU stack (intel only)") \ 286 \ 287 develop(bool, TraceFPURegisterUsage, false, \ 288 "Trace usage of FPU registers at start of blocks (intel only)") \ 289 \ 290 develop(bool, OptimizeUnsafes, true, \ 291 "Optimize raw unsafe ops") \ 292 \ 293 develop(bool, PrintUnsafeOptimization, false, \ 294 "Print optimization of raw unsafe ops") \ 295 \ 296 develop(intx, InstructionCountCutoff, 37000, \ 297 "If GraphBuilder adds this many instructions, bails out") \ 298 \ 299 product_pd(intx, SafepointPollOffset, \ 300 "Offset added to polling address (Intel only)") \ 301 \ 302 develop(bool, ComputeExactFPURegisterUsage, true, \ 303 "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \ 304 \ 305 product(bool, C1ProfileCalls, true, \ 306 "Profile calls when generating code for updating MDOs") \ 307 \ 308 product(bool, C1ProfileVirtualCalls, true, \ 309 "Profile virtual calls when generating code for updating MDOs") \ 310 \ 311 product(bool, C1ProfileInlinedCalls, true, \ 312 "Profile inlined calls when generating code for updating MDOs") \ 313 \ 314 product(bool, C1ProfileBranches, true, \ 315 "Profile branches when generating code for updating MDOs") \ 316 \ 317 product(bool, C1ProfileCheckcasts, true, \ 318 "Profile checkcasts when generating code for updating MDOs") \ 319 \ 320 product(bool, C1OptimizeVirtualCallProfiling, true, \ 321 "Use CHA and exact type results at call sites when updating MDOs")\ 322 \ 323 product(bool, C1UpdateMethodData, trueInTiered, \ 324 "Update methodDataOops in Tier1-generated code") \ 325 \ 326 develop(bool, PrintCFGToFile, false, \ 327 "print control flow graph to a separate file during compilation") \ 328 \ 329 330 331// Read default values for c1 globals 332 333C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_NOTPRODUCT_FLAG) 334 335#endif // SHARE_VM_C1_C1_GLOBALS_HPP 336