duke@435: /* mikael@6198: * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. duke@435: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: * duke@435: * This code is free software; you can redistribute it and/or modify it duke@435: * under the terms of the GNU General Public License version 2 only, as duke@435: * published by the Free Software Foundation. duke@435: * duke@435: * This code is distributed in the hope that it will be useful, but WITHOUT duke@435: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: * version 2 for more details (a copy is included in the LICENSE file that duke@435: * accompanied this code). duke@435: * duke@435: * You should have received a copy of the GNU General Public License version duke@435: * 2 along with this work; if not, write to the Free Software Foundation, duke@435: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: * trims@1907: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: * or visit www.oracle.com if you need additional information or have any trims@1907: * questions. duke@435: * duke@435: */ duke@435: stefank@2314: #ifndef SHARE_VM_C1_C1_GLOBALS_HPP stefank@2314: #define SHARE_VM_C1_C1_GLOBALS_HPP stefank@2314: stefank@2314: #include "runtime/globals.hpp" stefank@2314: #ifdef TARGET_ARCH_x86 stefank@2314: # include "c1_globals_x86.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_sparc stefank@2314: # include "c1_globals_sparc.hpp" stefank@2314: #endif bobv@2508: #ifdef TARGET_ARCH_arm bobv@2508: # include "c1_globals_arm.hpp" bobv@2508: #endif bobv@2508: #ifdef TARGET_ARCH_ppc bobv@2508: # include "c1_globals_ppc.hpp" bobv@2508: #endif stefank@2314: #ifdef TARGET_OS_FAMILY_linux stefank@2314: # include "c1_globals_linux.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_FAMILY_solaris stefank@2314: # include "c1_globals_solaris.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_FAMILY_windows stefank@2314: # include "c1_globals_windows.hpp" stefank@2314: #endif never@3156: #ifdef TARGET_OS_FAMILY_bsd never@3156: # include "c1_globals_bsd.hpp" never@3156: #endif stefank@2314: duke@435: // duke@435: // Defines all global flags used by the client compiler. duke@435: // roland@5628: #define C1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct) \ duke@435: \ duke@435: /* Printing */ \ duke@435: notproduct(bool, PrintC1Statistics, false, \ duke@435: "Print Compiler1 statistics" ) \ duke@435: \ duke@435: notproduct(bool, PrintInitialBlockList, false, \ duke@435: "Print block list of BlockListBuilder") \ duke@435: \ duke@435: notproduct(bool, PrintCFG, false, \ duke@435: "Print control flow graph after each change") \ duke@435: \ duke@435: notproduct(bool, PrintCFG0, false, \ duke@435: "Print control flow graph after construction") \ duke@435: \ duke@435: notproduct(bool, PrintCFG1, false, \ duke@435: "Print control flow graph after optimizations") \ duke@435: \ duke@435: notproduct(bool, PrintCFG2, false, \ duke@435: "Print control flow graph before code generation") \ duke@435: \ duke@435: notproduct(bool, PrintIRDuringConstruction, false, \ duke@435: "Print IR as it's being constructed (helpful for debugging frontend)")\ duke@435: \ iveresov@2138: notproduct(bool, PrintPhiFunctions, false, \ duke@435: "Print phi functions when they are created and simplified") \ duke@435: \ duke@435: notproduct(bool, PrintIR, false, \ duke@435: "Print full intermediate representation after each change") \ duke@435: \ duke@435: notproduct(bool, PrintIR0, false, \ duke@435: "Print full intermediate representation after construction") \ duke@435: \ duke@435: notproduct(bool, PrintIR1, false, \ duke@435: "Print full intermediate representation after optimizations") \ duke@435: \ duke@435: notproduct(bool, PrintIR2, false, \ duke@435: "Print full intermediate representation before code generation") \ duke@435: \ duke@435: notproduct(bool, PrintSimpleStubs, false, \ duke@435: "Print SimpleStubs") \ duke@435: \ duke@435: /* C1 optimizations */ \ duke@435: \ duke@435: develop(bool, UseC1Optimizations, true, \ duke@435: "Turn on C1 optimizations") \ duke@435: \ duke@435: develop(bool, SelectivePhiFunctions, true, \ duke@435: "create phi functions at loop headers only when necessary") \ duke@435: \ roland@2254: develop(bool, OptimizeIfOps, true, \ roland@2254: "Optimize multiple IfOps") \ roland@2254: \ duke@435: develop(bool, DoCEE, true, \ duke@435: "Do Conditional Expression Elimination to simplify CFG") \ duke@435: \ duke@435: develop(bool, PrintCEE, false, \ duke@435: "Print Conditional Expression Elimination") \ duke@435: \ duke@435: develop(bool, UseLocalValueNumbering, true, \ duke@435: "Use Local Value Numbering (embedded in GraphBuilder)") \ duke@435: \ duke@435: develop(bool, UseGlobalValueNumbering, true, \ duke@435: "Use Global Value Numbering (separate phase)") \ duke@435: \ roland@4860: product(bool, UseLoopInvariantCodeMotion, true, \ roland@4860: "Simple loop invariant code motion for short loops during GVN") \ roland@4860: \ roland@4860: develop(bool, TracePredicateFailedTraps, false, \ roland@4860: "trace runtime traps caused by predicate failure") \ roland@4860: \ roland@4860: develop(bool, StressLoopInvariantCodeMotion, false, \ roland@4860: "stress loop invariant code motion") \ roland@4860: \ roland@4860: develop(bool, TraceRangeCheckElimination, false, \ roland@4860: "Trace Range Check Elimination") \ roland@4860: \ roland@4860: develop(bool, AssertRangeCheckElimination, false, \ roland@4860: "Assert Range Check Elimination") \ roland@4860: \ roland@4860: develop(bool, StressRangeCheckElimination, false, \ roland@4860: "stress Range Check Elimination") \ roland@4860: \ duke@435: develop(bool, PrintValueNumbering, false, \ duke@435: "Print Value Numbering") \ duke@435: \ duke@435: product(intx, ValueMapInitialSize, 11, \ duke@435: "Initial size of a value map") \ duke@435: \ duke@435: product(intx, ValueMapMaxLoopSize, 8, \ duke@435: "maximum size of a loop optimized by global value numbering") \ duke@435: \ duke@435: develop(bool, EliminateBlocks, true, \ duke@435: "Eliminate unneccessary basic blocks") \ duke@435: \ duke@435: develop(bool, PrintBlockElimination, false, \ duke@435: "Print basic block elimination") \ duke@435: \ duke@435: develop(bool, EliminateNullChecks, true, \ duke@435: "Eliminate unneccessary null checks") \ duke@435: \ duke@435: develop(bool, PrintNullCheckElimination, false, \ duke@435: "Print null check elimination") \ duke@435: \ duke@435: develop(bool, EliminateFieldAccess, true, \ duke@435: "Optimize field loads and stores") \ duke@435: \ duke@435: develop(bool, InlineMethodsWithExceptionHandlers, true, \ duke@435: "Inline methods containing exception handlers " \ duke@435: "(NOTE: does not work with current backend)") \ duke@435: \ vladidan@4437: product(bool, InlineSynchronizedMethods, true, \ duke@435: "Inline synchronized methods") \ duke@435: \ duke@435: develop(bool, InlineNIOCheckIndex, true, \ duke@435: "Intrinsify java.nio.Buffer.checkIndex") \ duke@435: \ duke@435: develop(bool, CanonicalizeNodes, true, \ duke@435: "Canonicalize graph nodes") \ duke@435: \ duke@435: develop(bool, PrintCanonicalization, false, \ duke@435: "Print graph node canonicalization") \ duke@435: \ duke@435: develop(bool, UseTableRanges, true, \ duke@435: "Faster versions of lookup table using ranges") \ duke@435: \ duke@435: develop_pd(bool, RoundFPResults, \ duke@435: "Indicates whether rounding is needed for floating point results")\ duke@435: \ duke@435: develop(intx, NestedInliningSizeRatio, 90, \ duke@435: "Percentage of prev. allowed inline size in recursive inlining") \ duke@435: \ duke@435: notproduct(bool, PrintIRWithLIR, false, \ duke@435: "Print IR instructions with generated LIR") \ duke@435: \ duke@435: notproduct(bool, PrintLIRWithAssembly, false, \ duke@435: "Show LIR instruction with generated assembly") \ duke@435: \ duke@435: develop(bool, CommentedAssembly, trueInDebug, \ duke@435: "Show extra info in PrintNMethods output") \ duke@435: \ duke@435: develop(bool, LIRTracePeephole, false, \ duke@435: "Trace peephole optimizer") \ duke@435: \ duke@435: develop(bool, LIRTraceExecution, false, \ duke@435: "add LIR code which logs the execution of blocks") \ duke@435: \ duke@435: product_pd(bool, LIRFillDelaySlots, \ duke@435: "fill delays on on SPARC with LIR") \ duke@435: \ duke@435: develop_pd(bool, CSEArrayLength, \ duke@435: "Create separate nodes for length in array accesses") \ duke@435: \ duke@435: develop_pd(bool, TwoOperandLIRForm, \ duke@435: "true if LIR requires src1 and dst to match in binary LIR ops") \ duke@435: \ duke@435: develop(intx, TraceLinearScanLevel, 0, \ duke@435: "Debug levels for the linear scan allocator") \ duke@435: \ duke@435: develop(bool, StressLinearScan, false, \ duke@435: "scramble block order used by LinearScan (stress test)") \ duke@435: \ duke@435: product(bool, TimeLinearScan, false, \ duke@435: "detailed timing of LinearScan phases") \ duke@435: \ duke@435: develop(bool, TimeEachLinearScan, false, \ duke@435: "print detailed timing of each LinearScan run") \ duke@435: \ duke@435: develop(bool, CountLinearScan, false, \ duke@435: "collect statistic counters during LinearScan") \ duke@435: \ duke@435: /* C1 variable */ \ duke@435: \ duke@435: develop(bool, C1Breakpoint, false, \ duke@435: "Sets a breakpoint at entry of each compiled method") \ duke@435: \ duke@435: develop(bool, ImplicitDiv0Checks, true, \ duke@435: "Use implicit division by zero checks") \ duke@435: \ duke@435: develop(bool, PinAllInstructions, false, \ duke@435: "All instructions are pinned") \ duke@435: \ duke@435: develop(bool, UseFastNewInstance, true, \ duke@435: "Use fast inlined instance allocation") \ duke@435: \ duke@435: develop(bool, UseFastNewTypeArray, true, \ duke@435: "Use fast inlined type array allocation") \ duke@435: \ duke@435: develop(bool, UseFastNewObjectArray, true, \ duke@435: "Use fast inlined object array allocation") \ duke@435: \ duke@435: develop(bool, UseFastLocking, true, \ duke@435: "Use fast inlined locking code") \ duke@435: \ duke@435: develop(bool, UseSlowPath, false, \ duke@435: "For debugging: test slow cases by always using them") \ duke@435: \ duke@435: develop(bool, GenerateArrayStoreCheck, true, \ duke@435: "Generates code for array store checks") \ duke@435: \ duke@435: develop(bool, DeoptC1, true, \ duke@435: "Use deoptimization in C1") \ duke@435: \ duke@435: develop(bool, PrintBailouts, false, \ duke@435: "Print bailout and its reason") \ duke@435: \ duke@435: develop(bool, TracePatching, false, \ duke@435: "Trace patching of field access on uninitialized classes") \ duke@435: \ duke@435: develop(bool, PatchALot, false, \ duke@435: "Marks all fields as having unloaded classes") \ duke@435: \ duke@435: develop(bool, PrintNotLoaded, false, \ duke@435: "Prints where classes are not loaded during code generation") \ duke@435: \ duke@435: develop(bool, PrintLIR, false, \ duke@435: "print low-level IR") \ duke@435: \ duke@435: develop(bool, BailoutAfterHIR, false, \ duke@435: "bailout of compilation after building of HIR") \ duke@435: \ duke@435: develop(bool, BailoutAfterLIR, false, \ duke@435: "bailout of compilation after building of LIR") \ duke@435: \ duke@435: develop(bool, BailoutOnExceptionHandlers, false, \ duke@435: "bailout of compilation for methods with exception handlers") \ duke@435: \ duke@435: develop(bool, InstallMethods, true, \ duke@435: "Install methods at the end of successful compilations") \ duke@435: \ duke@435: product(intx, CompilationRepeat, 0, \ duke@435: "Number of times to recompile method before returning result") \ duke@435: \ iveresov@3096: develop(intx, NMethodSizeLimit, (64*K)*wordSize, \ duke@435: "Maximum size of a compiled method.") \ duke@435: \ duke@435: develop(bool, TraceFPUStack, false, \ duke@435: "Trace emulation of the FPU stack (intel only)") \ duke@435: \ duke@435: develop(bool, TraceFPURegisterUsage, false, \ duke@435: "Trace usage of FPU registers at start of blocks (intel only)") \ duke@435: \ duke@435: develop(bool, OptimizeUnsafes, true, \ duke@435: "Optimize raw unsafe ops") \ duke@435: \ duke@435: develop(bool, PrintUnsafeOptimization, false, \ duke@435: "Print optimization of raw unsafe ops") \ duke@435: \ duke@435: develop(intx, InstructionCountCutoff, 37000, \ duke@435: "If GraphBuilder adds this many instructions, bails out") \ duke@435: \ duke@435: product_pd(intx, SafepointPollOffset, \ duke@435: "Offset added to polling address (Intel only)") \ duke@435: \ duke@435: develop(bool, ComputeExactFPURegisterUsage, true, \ duke@435: "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \ duke@435: \ iveresov@2138: product(bool, C1ProfileCalls, true, \ duke@435: "Profile calls when generating code for updating MDOs") \ duke@435: \ iveresov@2138: product(bool, C1ProfileVirtualCalls, true, \ duke@435: "Profile virtual calls when generating code for updating MDOs") \ duke@435: \ iveresov@2138: product(bool, C1ProfileInlinedCalls, true, \ duke@435: "Profile inlined calls when generating code for updating MDOs") \ duke@435: \ iveresov@2138: product(bool, C1ProfileBranches, true, \ duke@435: "Profile branches when generating code for updating MDOs") \ duke@435: \ iveresov@2138: product(bool, C1ProfileCheckcasts, true, \ duke@435: "Profile checkcasts when generating code for updating MDOs") \ duke@435: \ iveresov@2138: product(bool, C1OptimizeVirtualCallProfiling, true, \ iveresov@2138: "Use CHA and exact type results at call sites when updating MDOs")\ duke@435: \ iveresov@2138: product(bool, C1UpdateMethodData, trueInTiered, \ roland@5628: "Update MethodData*s in Tier1-generated code") \ duke@435: \ duke@435: develop(bool, PrintCFGToFile, false, \ duke@435: "print control flow graph to a separate file during compilation") \ duke@435: \ roland@5628: diagnostic(bool, C1PatchInvokeDynamic, true, \ roland@5628: "Patch invokedynamic appendix not known at compile time") \ roland@5628: \ duke@435: duke@435: duke@435: // Read default values for c1 globals duke@435: roland@5628: C1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG) stefank@2314: stefank@2314: #endif // SHARE_VM_C1_C1_GLOBALS_HPP