c1_globals.hpp revision 8569:5bbf25472731
1176357Sdas/* 2176357Sdas * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 3176357Sdas * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4176357Sdas * 5176357Sdas * This code is free software; you can redistribute it and/or modify it 6176357Sdas * under the terms of the GNU General Public License version 2 only, as 7176357Sdas * published by the Free Software Foundation. 8176357Sdas * 9176357Sdas * This code is distributed in the hope that it will be useful, but WITHOUT 10176357Sdas * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11176357Sdas * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12176357Sdas * version 2 for more details (a copy is included in the LICENSE file that 13176357Sdas * accompanied this code). 14176357Sdas * 15176357Sdas * You should have received a copy of the GNU General Public License version 16176357Sdas * 2 along with this work; if not, write to the Free Software Foundation, 17176357Sdas * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18176357Sdas * 19176357Sdas * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20176357Sdas * or visit www.oracle.com if you need additional information or have any 21176357Sdas * questions. 22176357Sdas * 23176357Sdas */ 24176357Sdas 25176357Sdas#ifndef SHARE_VM_C1_C1_GLOBALS_HPP 26176357Sdas#define SHARE_VM_C1_C1_GLOBALS_HPP 27176357Sdas 28176357Sdas#include "runtime/globals.hpp" 29176357Sdas#ifdef TARGET_ARCH_x86 30176357Sdas# include "c1_globals_x86.hpp" 31176357Sdas#endif 32176357Sdas#ifdef TARGET_ARCH_sparc 33176357Sdas# include "c1_globals_sparc.hpp" 34176357Sdas#endif 35176357Sdas#ifdef TARGET_ARCH_arm 36176357Sdas# include "c1_globals_arm.hpp" 37176357Sdas#endif 38176357Sdas#ifdef TARGET_ARCH_ppc 39176357Sdas# include "c1_globals_ppc.hpp" 40176357Sdas#endif 41176357Sdas#ifdef TARGET_ARCH_aarch64 42176357Sdas# include "c1_globals_aarch64.hpp" 43176357Sdas#endif 44176357Sdas#ifdef TARGET_OS_FAMILY_linux 45176357Sdas# include "c1_globals_linux.hpp" 46176357Sdas#endif 47176357Sdas#ifdef TARGET_OS_FAMILY_solaris 48176357Sdas# include "c1_globals_solaris.hpp" 49176357Sdas#endif 50176357Sdas#ifdef TARGET_OS_FAMILY_windows 51176357Sdas# include "c1_globals_windows.hpp" 52176386Sbde#endif 53176387Sbde#ifdef TARGET_OS_FAMILY_aix 54176387Sbde# include "c1_globals_aix.hpp" 55176357Sdas#endif 56176357Sdas#ifdef TARGET_OS_FAMILY_bsd 57176357Sdas# include "c1_globals_bsd.hpp" 58176357Sdas#endif 59176357Sdas 60176357Sdas// 61176357Sdas// Defines all global flags used by the client compiler. 62176357Sdas// 63176357Sdas#define C1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct, range, constraint) \ 64176357Sdas \ 65176357Sdas /* Printing */ \ 66176357Sdas notproduct(bool, PrintC1Statistics, false, \ 67176357Sdas "Print Compiler1 statistics" ) \ 68176357Sdas \ 69176357Sdas notproduct(bool, PrintInitialBlockList, false, \ 70176357Sdas "Print block list of BlockListBuilder") \ 71176357Sdas \ 72176357Sdas notproduct(bool, PrintCFG, false, \ 73176357Sdas "Print control flow graph after each change") \ 74176357Sdas \ 75176357Sdas notproduct(bool, PrintCFG0, false, \ 76176357Sdas "Print control flow graph after construction") \ 77176357Sdas \ 78176357Sdas notproduct(bool, PrintCFG1, false, \ 79176357Sdas "Print control flow graph after optimizations") \ 80176357Sdas \ 81176357Sdas notproduct(bool, PrintCFG2, false, \ 82176357Sdas "Print control flow graph before code generation") \ 83176357Sdas \ 84176357Sdas notproduct(bool, PrintIRDuringConstruction, false, \ 85176357Sdas "Print IR as it's being constructed (helpful for debugging frontend)")\ 86176357Sdas \ 87176357Sdas notproduct(bool, PrintPhiFunctions, false, \ 88176357Sdas "Print phi functions when they are created and simplified") \ 89176357Sdas \ 90176357Sdas notproduct(bool, PrintIR, false, \ 91176357Sdas "Print full intermediate representation after each change") \ 92176357Sdas \ 93176357Sdas notproduct(bool, PrintIR0, false, \ 94176357Sdas "Print full intermediate representation after construction") \ 95176357Sdas \ 96176357Sdas notproduct(bool, PrintIR1, false, \ 97176357Sdas "Print full intermediate representation after optimizations") \ 98176357Sdas \ 99176357Sdas notproduct(bool, PrintIR2, false, \ 100176357Sdas "Print full intermediate representation before code generation") \ 101176357Sdas \ 102176357Sdas notproduct(bool, PrintSimpleStubs, false, \ 103176357Sdas "Print SimpleStubs") \ 104176357Sdas \ 105176357Sdas /* C1 optimizations */ \ 106176357Sdas \ 107176357Sdas develop(bool, UseC1Optimizations, true, \ 108176357Sdas "Turn on C1 optimizations") \ 109176357Sdas \ 110176357Sdas develop(bool, SelectivePhiFunctions, true, \ 111176357Sdas "create phi functions at loop headers only when necessary") \ 112176357Sdas \ 113176357Sdas develop(bool, OptimizeIfOps, true, \ 114176357Sdas "Optimize multiple IfOps") \ 115176357Sdas \ 116176357Sdas develop(bool, DoCEE, true, \ 117176357Sdas "Do Conditional Expression Elimination to simplify CFG") \ 118176357Sdas \ 119176357Sdas develop(bool, PrintCEE, false, \ 120176357Sdas "Print Conditional Expression Elimination") \ 121176357Sdas \ 122176357Sdas develop(bool, UseLocalValueNumbering, true, \ 123176357Sdas "Use Local Value Numbering (embedded in GraphBuilder)") \ 124176357Sdas \ 125 develop(bool, UseGlobalValueNumbering, true, \ 126 "Use Global Value Numbering (separate phase)") \ 127 \ 128 product(bool, UseLoopInvariantCodeMotion, true, \ 129 "Simple loop invariant code motion for short loops during GVN") \ 130 \ 131 develop(bool, TracePredicateFailedTraps, false, \ 132 "trace runtime traps caused by predicate failure") \ 133 \ 134 develop(bool, StressLoopInvariantCodeMotion, false, \ 135 "stress loop invariant code motion") \ 136 \ 137 develop(bool, TraceRangeCheckElimination, false, \ 138 "Trace Range Check Elimination") \ 139 \ 140 develop(bool, AssertRangeCheckElimination, false, \ 141 "Assert Range Check Elimination") \ 142 \ 143 develop(bool, StressRangeCheckElimination, false, \ 144 "stress Range Check Elimination") \ 145 \ 146 develop(bool, PrintValueNumbering, false, \ 147 "Print Value Numbering") \ 148 \ 149 product(intx, ValueMapInitialSize, 11, \ 150 "Initial size of a value map") \ 151 range(1, NOT_LP64(1*K) LP64_ONLY(32*K)) \ 152 \ 153 product(intx, ValueMapMaxLoopSize, 8, \ 154 "maximum size of a loop optimized by global value numbering") \ 155 \ 156 develop(bool, EliminateBlocks, true, \ 157 "Eliminate unneccessary basic blocks") \ 158 \ 159 develop(bool, PrintBlockElimination, false, \ 160 "Print basic block elimination") \ 161 \ 162 develop(bool, EliminateNullChecks, true, \ 163 "Eliminate unneccessary null checks") \ 164 \ 165 develop(bool, PrintNullCheckElimination, false, \ 166 "Print null check elimination") \ 167 \ 168 develop(bool, EliminateFieldAccess, true, \ 169 "Optimize field loads and stores") \ 170 \ 171 develop(bool, InlineMethodsWithExceptionHandlers, true, \ 172 "Inline methods containing exception handlers " \ 173 "(NOTE: does not work with current backend)") \ 174 \ 175 product(bool, InlineSynchronizedMethods, true, \ 176 "Inline synchronized methods") \ 177 \ 178 develop(bool, InlineNIOCheckIndex, true, \ 179 "Intrinsify java.nio.Buffer.checkIndex") \ 180 \ 181 develop(bool, CanonicalizeNodes, true, \ 182 "Canonicalize graph nodes") \ 183 \ 184 develop(bool, PrintCanonicalization, false, \ 185 "Print graph node canonicalization") \ 186 \ 187 develop(bool, UseTableRanges, true, \ 188 "Faster versions of lookup table using ranges") \ 189 \ 190 develop_pd(bool, RoundFPResults, \ 191 "Indicates whether rounding is needed for floating point results")\ 192 \ 193 develop(intx, NestedInliningSizeRatio, 90, \ 194 "Percentage of prev. allowed inline size in recursive inlining") \ 195 range(0, 100) \ 196 \ 197 notproduct(bool, PrintIRWithLIR, false, \ 198 "Print IR instructions with generated LIR") \ 199 \ 200 notproduct(bool, PrintLIRWithAssembly, false, \ 201 "Show LIR instruction with generated assembly") \ 202 \ 203 develop(bool, CommentedAssembly, trueInDebug, \ 204 "Show extra info in PrintNMethods output") \ 205 \ 206 develop(bool, LIRTracePeephole, false, \ 207 "Trace peephole optimizer") \ 208 \ 209 develop(bool, LIRTraceExecution, false, \ 210 "add LIR code which logs the execution of blocks") \ 211 \ 212 product_pd(bool, LIRFillDelaySlots, \ 213 "fill delays on on SPARC with LIR") \ 214 \ 215 develop_pd(bool, CSEArrayLength, \ 216 "Create separate nodes for length in array accesses") \ 217 \ 218 develop_pd(bool, TwoOperandLIRForm, \ 219 "true if LIR requires src1 and dst to match in binary LIR ops") \ 220 \ 221 develop(intx, TraceLinearScanLevel, 0, \ 222 "Debug levels for the linear scan allocator") \ 223 \ 224 develop(bool, StressLinearScan, false, \ 225 "scramble block order used by LinearScan (stress test)") \ 226 \ 227 product(bool, TimeLinearScan, false, \ 228 "detailed timing of LinearScan phases") \ 229 \ 230 develop(bool, TimeEachLinearScan, false, \ 231 "print detailed timing of each LinearScan run") \ 232 \ 233 develop(bool, CountLinearScan, false, \ 234 "collect statistic counters during LinearScan") \ 235 \ 236 /* C1 variable */ \ 237 \ 238 develop(bool, C1Breakpoint, false, \ 239 "Sets a breakpoint at entry of each compiled method") \ 240 \ 241 develop(bool, ImplicitDiv0Checks, true, \ 242 "Use implicit division by zero checks") \ 243 \ 244 develop(bool, PinAllInstructions, false, \ 245 "All instructions are pinned") \ 246 \ 247 develop(bool, UseFastNewInstance, true, \ 248 "Use fast inlined instance allocation") \ 249 \ 250 develop(bool, UseFastNewTypeArray, true, \ 251 "Use fast inlined type array allocation") \ 252 \ 253 develop(bool, UseFastNewObjectArray, true, \ 254 "Use fast inlined object array allocation") \ 255 \ 256 develop(bool, UseFastLocking, true, \ 257 "Use fast inlined locking code") \ 258 \ 259 develop(bool, UseSlowPath, false, \ 260 "For debugging: test slow cases by always using them") \ 261 \ 262 develop(bool, GenerateArrayStoreCheck, true, \ 263 "Generates code for array store checks") \ 264 \ 265 develop(bool, DeoptC1, true, \ 266 "Use deoptimization in C1") \ 267 \ 268 develop(bool, PrintBailouts, false, \ 269 "Print bailout and its reason") \ 270 \ 271 develop(bool, TracePatching, false, \ 272 "Trace patching of field access on uninitialized classes") \ 273 \ 274 develop(bool, PatchALot, false, \ 275 "Marks all fields as having unloaded classes") \ 276 \ 277 develop(bool, PrintNotLoaded, false, \ 278 "Prints where classes are not loaded during code generation") \ 279 \ 280 develop(bool, PrintLIR, false, \ 281 "print low-level IR") \ 282 \ 283 develop(bool, BailoutAfterHIR, false, \ 284 "bailout of compilation after building of HIR") \ 285 \ 286 develop(bool, BailoutAfterLIR, false, \ 287 "bailout of compilation after building of LIR") \ 288 \ 289 develop(bool, BailoutOnExceptionHandlers, false, \ 290 "bailout of compilation for methods with exception handlers") \ 291 \ 292 develop(bool, InstallMethods, true, \ 293 "Install methods at the end of successful compilations") \ 294 \ 295 develop(intx, NMethodSizeLimit, (64*K)*wordSize, \ 296 "Maximum size of a compiled method.") \ 297 \ 298 develop(bool, TraceFPUStack, false, \ 299 "Trace emulation of the FPU stack (intel only)") \ 300 \ 301 develop(bool, TraceFPURegisterUsage, false, \ 302 "Trace usage of FPU registers at start of blocks (intel only)") \ 303 \ 304 develop(bool, OptimizeUnsafes, true, \ 305 "Optimize raw unsafe ops") \ 306 \ 307 develop(bool, PrintUnsafeOptimization, false, \ 308 "Print optimization of raw unsafe ops") \ 309 \ 310 develop(intx, InstructionCountCutoff, 37000, \ 311 "If GraphBuilder adds this many instructions, bails out") \ 312 \ 313 develop(bool, ComputeExactFPURegisterUsage, true, \ 314 "Compute additional live set for fpu registers to simplify fpu stack merge (Intel only)") \ 315 \ 316 product(bool, C1ProfileCalls, true, \ 317 "Profile calls when generating code for updating MDOs") \ 318 \ 319 product(bool, C1ProfileVirtualCalls, true, \ 320 "Profile virtual calls when generating code for updating MDOs") \ 321 \ 322 product(bool, C1ProfileInlinedCalls, true, \ 323 "Profile inlined calls when generating code for updating MDOs") \ 324 \ 325 product(bool, C1ProfileBranches, true, \ 326 "Profile branches when generating code for updating MDOs") \ 327 \ 328 product(bool, C1ProfileCheckcasts, true, \ 329 "Profile checkcasts when generating code for updating MDOs") \ 330 \ 331 product(bool, C1OptimizeVirtualCallProfiling, true, \ 332 "Use CHA and exact type results at call sites when updating MDOs")\ 333 \ 334 product(bool, C1UpdateMethodData, trueInTiered, \ 335 "Update MethodData*s in Tier1-generated code") \ 336 \ 337 develop(bool, PrintCFGToFile, false, \ 338 "print control flow graph to a separate file during compilation") \ 339 \ 340 diagnostic(bool, C1PatchInvokeDynamic, true, \ 341 "Patch invokedynamic appendix not known at compile time") \ 342 \ 343// Read default values for c1 globals 344 345C1_FLAGS(DECLARE_DEVELOPER_FLAG, \ 346 DECLARE_PD_DEVELOPER_FLAG, \ 347 DECLARE_PRODUCT_FLAG, \ 348 DECLARE_PD_PRODUCT_FLAG, \ 349 DECLARE_DIAGNOSTIC_FLAG, \ 350 DECLARE_NOTPRODUCT_FLAG, \ 351 IGNORE_RANGE, \ 352 IGNORE_CONSTRAINT) 353 354#endif // SHARE_VM_C1_C1_GLOBALS_HPP 355