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