c1_globals.hpp revision 1879:f95d63e2154a
124269Speter/* 224269Speter * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 324269Speter * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 424269Speter * 528345Sdyson * This code is free software; you can redistribute it and/or modify it 628345Sdyson * under the terms of the GNU General Public License version 2 only, as 728345Sdyson * published by the Free Software Foundation. 824269Speter * 924269Speter * This code is distributed in the hope that it will be useful, but WITHOUT 1024269Speter * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1124269Speter * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1224269Speter * version 2 for more details (a copy is included in the LICENSE file that 1324269Speter * accompanied this code). 1424269Speter * 1524269Speter * You should have received a copy of the GNU General Public License version 1624269Speter * 2 along with this work; if not, write to the Free Software Foundation, 1724269Speter * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1824269Speter * 1924269Speter * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2024269Speter * or visit www.oracle.com if you need additional information or have any 2124269Speter * questions. 2224269Speter * 2324269Speter */ 2424269Speter 2524269Speter#ifndef SHARE_VM_C1_C1_GLOBALS_HPP 2624269Speter#define SHARE_VM_C1_C1_GLOBALS_HPP 2724269Speter 2824269Speter#include "runtime/globals.hpp" 2924269Speter#ifdef TARGET_ARCH_x86 3024269Speter# include "c1_globals_x86.hpp" 3124269Speter#endif 3224269Speter#ifdef TARGET_ARCH_sparc 3324269Speter# include "c1_globals_sparc.hpp" 3424269Speter#endif 3524269Speter#ifdef TARGET_OS_FAMILY_linux 3624269Speter# include "c1_globals_linux.hpp" 3724269Speter#endif 3824269Speter#ifdef TARGET_OS_FAMILY_solaris 3924269Speter# include "c1_globals_solaris.hpp" 4024269Speter#endif 4150477Speter#ifdef TARGET_OS_FAMILY_windows 4224269Speter# include "c1_globals_windows.hpp" 4324269Speter#endif 4424269Speter 4567046Sjasone// 4684812Sjhb// Defines all global flags used by the client compiler. 4724269Speter// 48102477Sbde#define C1_FLAGS(develop, develop_pd, product, product_pd, notproduct) \ 4967353Sjhb \ 50102477Sbde /* Printing */ \ 5124273Speter notproduct(bool, PrintC1Statistics, false, \ 5224269Speter "Print Compiler1 statistics" ) \ 5324269Speter \ 5424269Speter notproduct(bool, PrintInitialBlockList, false, \ 5524269Speter "Print block list of BlockListBuilder") \ 5624269Speter \ 5724269Speter notproduct(bool, PrintCFG, false, \ 5828345Sdyson "Print control flow graph after each change") \ 5928345Sdyson \ 6024269Speter notproduct(bool, PrintCFG0, false, \ 6128345Sdyson "Print control flow graph after construction") \ 6228345Sdyson \ 6328345Sdyson notproduct(bool, PrintCFG1, false, \ 6435242Sbde "Print control flow graph after optimizations") \ 6528345Sdyson \ 6624269Speter notproduct(bool, PrintCFG2, false, \ 6729653Sdyson "Print control flow graph before code generation") \ 6829653Sdyson \ 6929653Sdyson notproduct(bool, PrintIRDuringConstruction, false, \ 7067046Sjasone "Print IR as it's being constructed (helpful for debugging frontend)")\ 7167046Sjasone \ 7267046Sjasone notproduct(bool, PrintPhiFunctions, false, \ 7367046Sjasone "Print phi functions when they are created and simplified") \ 7467046Sjasone \ 7586333Sdillon notproduct(bool, PrintIR, false, \ 7671320Sjasone "Print full intermediate representation after each change") \ 7767046Sjasone \ 7828345Sdyson notproduct(bool, PrintIR0, false, \ 7929653Sdyson "Print full intermediate representation after construction") \ 8029653Sdyson \ 8124269Speter notproduct(bool, PrintIR1, false, \ 8267046Sjasone "Print full intermediate representation after optimizations") \ 8367046Sjasone \ 8467046Sjasone notproduct(bool, PrintIR2, false, \ 8567046Sjasone "Print full intermediate representation before code generation") \ 8667046Sjasone \ 8767046Sjasone notproduct(bool, PrintSimpleStubs, false, \ 8867046Sjasone "Print SimpleStubs") \ 8967046Sjasone \ 9067046Sjasone /* C1 optimizations */ \ 9186333Sdillon \ 9293818Sjhb develop(bool, UseC1Optimizations, true, \ 9386333Sdillon "Turn on C1 optimizations") \ 9467046Sjasone \ 9567046Sjasone develop(bool, SelectivePhiFunctions, true, \ 9667046Sjasone "create phi functions at loop headers only when necessary") \ 9767046Sjasone \ 9828345Sdyson develop(bool, OptimizeIfOps, true, \ 9928345Sdyson "Optimize multiple IfOps") \ 10028345Sdyson \ 10128345Sdyson develop(bool, DoCEE, true, \ 10228345Sdyson "Do Conditional Expression Elimination to simplify CFG") \ 10324269Speter \ 10428345Sdyson develop(bool, PrintCEE, false, \ 10528345Sdyson "Print Conditional Expression Elimination") \ 10642453Seivind \ 10742408Seivind develop(bool, UseLocalValueNumbering, true, \ 10824269Speter "Use Local Value Numbering (embedded in GraphBuilder)") \ 10934194Sdyson \ 11028345Sdyson develop(bool, UseGlobalValueNumbering, true, \ 11134194Sdyson "Use Global Value Numbering (separate phase)") \ 11234194Sdyson \ 11334194Sdyson develop(bool, PrintValueNumbering, false, \ 11434194Sdyson "Print Value Numbering") \ 11534194Sdyson \ 11634194Sdyson product(intx, ValueMapInitialSize, 11, \ 11734194Sdyson "Initial size of a value map") \ 11828345Sdyson \ 11928345Sdyson product(intx, ValueMapMaxLoopSize, 8, \ 12029653Sdyson "maximum size of a loop optimized by global value numbering") \ 12171576Sjasone \ 12229653Sdyson develop(bool, EliminateBlocks, true, \ 12328345Sdyson "Eliminate unneccessary basic blocks") \ 12453090Salc \ 12553090Salc develop(bool, PrintBlockElimination, false, \ 12653090Salc "Print basic block elimination") \ 12753090Salc \ 12853090Salc develop(bool, EliminateNullChecks, true, \ 12953090Salc "Eliminate unneccessary null checks") \ 13053090Salc \ 13153090Salc develop(bool, PrintNullCheckElimination, false, \ 13253090Salc "Print null check elimination") \ 13353090Salc \ 13472200Sbmilekic develop(bool, EliminateFieldAccess, true, \ 13553090Salc "Optimize field loads and stores") \ 13653090Salc \ 13753090Salc develop(bool, InlineMethodsWithExceptionHandlers, true, \ 13872200Sbmilekic "Inline methods containing exception handlers " \ 13928345Sdyson "(NOTE: does not work with current backend)") \ 14028345Sdyson \ 14124269Speter develop(bool, InlineSynchronizedMethods, true, \ 14253090Salc "Inline synchronized methods") \ 14328345Sdyson \ 14428345Sdyson develop(bool, InlineNIOCheckIndex, true, \ 14524269Speter "Intrinsify java.nio.Buffer.checkIndex") \ 14628345Sdyson \ 14728345Sdyson develop(bool, CanonicalizeNodes, true, \ 14834194Sdyson "Canonicalize graph nodes") \ 14928345Sdyson \ 15066615Sjasone develop(bool, CanonicalizeExperimental, false, \ 15166615Sjasone "Canonicalize graph nodes, experimental code") \ 15266615Sjasone \ 15366615Sjasone develop(bool, PrintCanonicalization, false, \ 15428345Sdyson "Print graph node canonicalization") \ 15528345Sdyson \ 15628345Sdyson develop(bool, UseTableRanges, true, \ 15728345Sdyson "Faster versions of lookup table using ranges") \ 15829653Sdyson \ 15929653Sdyson develop(bool, UseFastExceptionHandling, true, \ 16029653Sdyson "Faster handling of exceptions") \ 16129653Sdyson \ 16229653Sdyson develop_pd(bool, RoundFPResults, \ 16328345Sdyson "Indicates whether rounding is needed for floating point results")\ 16434194Sdyson \ 16528345Sdyson develop(intx, NestedInliningSizeRatio, 90, \ 16628345Sdyson "Percentage of prev. allowed inline size in recursive inlining") \ 16728345Sdyson \ 16869432Sjake notproduct(bool, PrintIRWithLIR, false, \ 16988318Sdillon "Print IR instructions with generated LIR") \ 17088318Sdillon \ 17134194Sdyson notproduct(bool, PrintLIRWithAssembly, false, \ 17228345Sdyson "Show LIR instruction with generated assembly") \ 17334194Sdyson \ 17434194Sdyson develop(bool, CommentedAssembly, trueInDebug, \ 17534194Sdyson "Show extra info in PrintNMethods output") \ 17634194Sdyson \ 17734194Sdyson develop(bool, LIRTracePeephole, false, \ 17834194Sdyson "Trace peephole optimizer") \ 17928345Sdyson \ 18034194Sdyson develop(bool, LIRTraceExecution, false, \ 18128345Sdyson "add LIR code which logs the execution of blocks") \ 18234194Sdyson \ 18328345Sdyson product_pd(bool, LIRFillDelaySlots, \ 18428345Sdyson "fill delays on on SPARC with LIR") \ 18528345Sdyson \ 18634194Sdyson develop_pd(bool, CSEArrayLength, \ 18728345Sdyson "Create separate nodes for length in array accesses") \ 18828345Sdyson \ 18928345Sdyson develop_pd(bool, TwoOperandLIRForm, \ 19024269Speter "true if LIR requires src1 and dst to match in binary LIR ops") \ 19124269Speter \ 19224269Speter develop(intx, TraceLinearScanLevel, 0, \ 19324269Speter "Debug levels for the linear scan allocator") \ 19424269Speter \ 19524269Speter develop(bool, StressLinearScan, false, \ 19624269Speter "scramble block order used by LinearScan (stress test)") \ 19724269Speter \ 19842900Seivind product(bool, TimeLinearScan, false, \ 19983366Sjulian "detailed timing of LinearScan phases") \ 20042900Seivind \ 20183366Sjulian develop(bool, TimeEachLinearScan, false, \ 20242900Seivind "print detailed timing of each LinearScan run") \ 20327894Sfsmp \ 20424269Speter develop(bool, CountLinearScan, false, \ 20566615Sjasone "collect statistic counters during LinearScan") \ 20683366Sjulian \ 20742900Seivind /* C1 variable */ \ 20842900Seivind \ 20942900Seivind develop(bool, C1Breakpoint, false, \ 21042900Seivind "Sets a breakpoint at entry of each compiled method") \ 21142900Seivind \ 21224269Speter develop(bool, ImplicitDiv0Checks, true, \ 21324269Speter "Use implicit division by zero checks") \ 21424269Speter \ 21572227Sjhb develop(bool, PinAllInstructions, false, \ 21624269Speter "All instructions are pinned") \ 21766615Sjasone \ 21866615Sjasone develop(bool, ValueStackPinStackAll, true, \ 21983366Sjulian "Pinning in ValueStack pin everything") \ 22066615Sjasone \ 22124269Speter develop(bool, UseFastNewInstance, true, \ 22283366Sjulian "Use fast inlined instance allocation") \ 22328393Sdyson \ 22428393Sdyson develop(bool, UseFastNewTypeArray, true, \ 22583366Sjulian "Use fast inlined type array allocation") \ 22628345Sdyson \ 22772200Sbmilekic develop(bool, UseFastNewObjectArray, true, \ 22875740Salfred "Use fast inlined object array allocation") \ 22976100Salfred \ 23072200Sbmilekic develop(bool, UseFastLocking, true, \ 23175740Salfred "Use fast inlined locking code") \ 23228345Sdyson \ 23381506Sjhb develop(bool, UseSlowPath, false, \ 23481506Sjhb "For debugging: test slow cases by always using them") \ 23581506Sjhb \ 23681506Sjhb develop(bool, GenerateArrayStoreCheck, true, \ 23781506Sjhb "Generates code for array store checks") \ 23824269Speter \ 23924269Speter develop(bool, DeoptC1, true, \ 24024269Speter "Use deoptimization in C1") \ 24124269Speter \ 24224269Speter develop(bool, PrintBailouts, false, \ 24344681Sjulian "Print bailout and its reason") \ 24444681Sjulian \ 24544681Sjulian develop(bool, TracePatching, false, \ 24644681Sjulian "Trace patching of field access on uninitialized classes") \ 24744681Sjulian \ 24883366Sjulian develop(bool, PatchALot, false, \ 24944681Sjulian "Marks all fields as having unloaded classes") \ 25044681Sjulian \ 25144681Sjulian develop(bool, PrintNotLoaded, false, \ 25224269Speter "Prints where classes are not loaded during code generation") \ 25372227Sjhb \ 25483420Sjhb notproduct(bool, VerifyOopMaps, false, \ 25583420Sjhb "Adds oopmap verification code to the generated code") \ 25683420Sjhb \ 25783420Sjhb develop(bool, PrintLIR, false, \ 25872227Sjhb "print low-level IR") \ 25924269Speter \ 26024269Speter develop(bool, BailoutAfterHIR, false, \ 26128345Sdyson "bailout of compilation after building of HIR") \ 26297540Sjeff \ 26397540Sjeff develop(bool, BailoutAfterLIR, false, \ 26497540Sjeff "bailout of compilation after building of LIR") \ 26597540Sjeff \ 26697540Sjeff develop(bool, BailoutOnExceptionHandlers, false, \ 26797540Sjeff "bailout of compilation for methods with exception handlers") \ 26824269Speter \ 26924269Speter develop(bool, InstallMethods, true, \ 27024269Speter "Install methods at the end of successful compilations") \ 27124269Speter \ 27224269Speter product(intx, CompilationRepeat, 0, \ 27324269Speter "Number of times to recompile method before returning result") \ 27428345Sdyson \ 275102412Scharnier develop(intx, NMethodSizeLimit, (32*K)*wordSize, \ 27624269Speter "Maximum size of a compiled method.") \ 27724269Speter \ 27875472Salfred develop(bool, TraceFPUStack, false, \ 27975472Salfred "Trace emulation of the FPU stack (intel only)") \ 28075472Salfred \ 28175472Salfred develop(bool, TraceFPURegisterUsage, false, \ 28228345Sdyson "Trace usage of FPU registers at start of blocks (intel only)") \ 28324269Speter \ 28424269Speter develop(bool, OptimizeUnsafes, true, \ 28524269Speter "Optimize raw unsafe ops") \ 28624269Speter \ 28724269Speter develop(bool, PrintUnsafeOptimization, false, \ 28824269Speter "Print optimization of raw unsafe ops") \ 28924269Speter \ 29024269Speter develop(intx, InstructionCountCutoff, 37000, \ 29124269Speter "If GraphBuilder adds this many instructions, bails out") \ 29224269Speter \ 29324269Speter product_pd(intx, SafepointPollOffset, \ 29424269Speter "Offset added to polling address (Intel only)") \ 29524269Speter \ 29624269Speter develop(bool, ComputeExactFPURegisterUsage, true, \ 29728345Sdyson "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \ 29824269Speter \ 29924269Speter product(bool, C1ProfileCalls, true, \ 30024269Speter "Profile calls when generating code for updating MDOs") \ 301102412Scharnier \ 30224269Speter product(bool, C1ProfileVirtualCalls, true, \ 30324269Speter "Profile virtual calls when generating code for updating MDOs") \ 30424269Speter \ 30524269Speter product(bool, C1ProfileInlinedCalls, true, \ 30624269Speter "Profile inlined calls when generating code for updating MDOs") \ 30724269Speter \ 30824269Speter product(bool, C1ProfileBranches, true, \ 30924269Speter "Profile branches when generating code for updating MDOs") \ 31024269Speter \ 31124269Speter product(bool, C1ProfileCheckcasts, true, \ 31228345Sdyson "Profile checkcasts when generating code for updating MDOs") \ 31324269Speter \ 31428345Sdyson product(bool, C1OptimizeVirtualCallProfiling, true, \ 31524269Speter "Use CHA and exact type results at call sites when updating MDOs")\ 31624269Speter \ 31724269Speter product(bool, C1UpdateMethodData, trueInTiered, \ 31824269Speter "Update methodDataOops in Tier1-generated code") \ 31924269Speter \ 32024269Speter develop(bool, PrintCFGToFile, false, \ 32124269Speter "print control flow graph to a separate file during compilation") \ 32224269Speter \ 32324269Speter 32424269Speter 32524269Speter// Read default values for c1 globals 32624269Speter 32724269SpeterC1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_NOTPRODUCT_FLAG) 32824269Speter 32924269Speter#endif // SHARE_VM_C1_C1_GLOBALS_HPP 33024269Speter