Wed, 27 Nov 2013 16:16:21 -0800
8029015: PPC64 (part 216): opto: trap based null and range checks
Summary: On PPC64 use tdi instruction that does a compare and raises SIGTRAP for NULL and range checks.
Reviewed-by: kvn
duke@435 | 1 | /* |
drchase@5285 | 2 | * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | * |
duke@435 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | * under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | * published by the Free Software Foundation. |
duke@435 | 8 | * |
duke@435 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | * accompanied this code). |
duke@435 | 14 | * |
duke@435 | 15 | * You should have received a copy of the GNU General Public License version |
duke@435 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
duke@435 | 22 | * |
duke@435 | 23 | */ |
duke@435 | 24 | |
stefank@2314 | 25 | #ifndef SHARE_VM_OPTO_C2_GLOBALS_HPP |
stefank@2314 | 26 | #define SHARE_VM_OPTO_C2_GLOBALS_HPP |
stefank@2314 | 27 | |
stefank@2314 | 28 | #include "runtime/globals.hpp" |
stefank@2314 | 29 | #ifdef TARGET_ARCH_x86 |
stefank@2314 | 30 | # include "c2_globals_x86.hpp" |
stefank@2314 | 31 | #endif |
stefank@2314 | 32 | #ifdef TARGET_ARCH_sparc |
stefank@2314 | 33 | # include "c2_globals_sparc.hpp" |
stefank@2314 | 34 | #endif |
bobv@2508 | 35 | #ifdef TARGET_ARCH_arm |
bobv@2508 | 36 | # include "c2_globals_arm.hpp" |
bobv@2508 | 37 | #endif |
goetz@6441 | 38 | #ifdef TARGET_ARCH_ppc |
goetz@6441 | 39 | # include "c2_globals_ppc.hpp" |
goetz@6441 | 40 | #endif |
stefank@2314 | 41 | #ifdef TARGET_OS_FAMILY_linux |
stefank@2314 | 42 | # include "c2_globals_linux.hpp" |
stefank@2314 | 43 | #endif |
stefank@2314 | 44 | #ifdef TARGET_OS_FAMILY_solaris |
stefank@2314 | 45 | # include "c2_globals_solaris.hpp" |
stefank@2314 | 46 | #endif |
stefank@2314 | 47 | #ifdef TARGET_OS_FAMILY_windows |
stefank@2314 | 48 | # include "c2_globals_windows.hpp" |
stefank@2314 | 49 | #endif |
goetz@6461 | 50 | #ifdef TARGET_OS_FAMILY_aix |
goetz@6461 | 51 | # include "c2_globals_aix.hpp" |
goetz@6461 | 52 | #endif |
never@3156 | 53 | #ifdef TARGET_OS_FAMILY_bsd |
never@3156 | 54 | # include "c2_globals_bsd.hpp" |
never@3156 | 55 | #endif |
stefank@2314 | 56 | |
duke@435 | 57 | // |
duke@435 | 58 | // Defines all globals flags used by the server compiler. |
duke@435 | 59 | // |
duke@435 | 60 | |
never@1515 | 61 | #define C2_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct) \ |
duke@435 | 62 | \ |
shade@4691 | 63 | develop(bool, StressLCM, false, \ |
shade@4691 | 64 | "Randomize instruction scheduling in LCM") \ |
shade@4691 | 65 | \ |
shade@4691 | 66 | develop(bool, StressGCM, false, \ |
shade@4691 | 67 | "Randomize instruction scheduling in GCM") \ |
shade@4691 | 68 | \ |
duke@435 | 69 | notproduct(intx, CompileZapFirst, 0, \ |
duke@435 | 70 | "If +ZapDeadCompiledLocals, " \ |
duke@435 | 71 | "skip this many before compiling in zap calls") \ |
duke@435 | 72 | \ |
duke@435 | 73 | notproduct(intx, CompileZapLast, -1, \ |
duke@435 | 74 | "If +ZapDeadCompiledLocals, " \ |
duke@435 | 75 | "compile this many after skipping (incl. skip count, -1 = all)") \ |
duke@435 | 76 | \ |
duke@435 | 77 | notproduct(intx, ZapDeadCompiledLocalsFirst, 0, \ |
duke@435 | 78 | "If +ZapDeadCompiledLocals, " \ |
duke@435 | 79 | "skip this many before really doing it") \ |
duke@435 | 80 | \ |
duke@435 | 81 | notproduct(intx, ZapDeadCompiledLocalsLast, -1, \ |
duke@435 | 82 | "If +ZapDeadCompiledLocals, " \ |
duke@435 | 83 | "do this many after skipping (incl. skip count, -1 = all)") \ |
duke@435 | 84 | \ |
duke@435 | 85 | develop(intx, OptoPrologueNops, 0, \ |
duke@435 | 86 | "Insert this many extra nop instructions " \ |
duke@435 | 87 | "in the prologue of every nmethod") \ |
duke@435 | 88 | \ |
duke@435 | 89 | product_pd(intx, InteriorEntryAlignment, \ |
duke@435 | 90 | "Code alignment for interior entry points " \ |
duke@435 | 91 | "in generated code (in bytes)") \ |
duke@435 | 92 | \ |
duke@435 | 93 | product(intx, MaxLoopPad, (OptoLoopAlignment-1), \ |
duke@435 | 94 | "Align a loop if padding size in bytes is less or equal to this value") \ |
duke@435 | 95 | \ |
kvn@3882 | 96 | product(intx, MaxVectorSize, 32, \ |
kvn@3882 | 97 | "Max vector size in bytes, " \ |
kvn@3882 | 98 | "actual size could be less depending on elements type") \ |
kvn@3882 | 99 | \ |
kvn@4105 | 100 | product(bool, AlignVector, true, \ |
kvn@3882 | 101 | "Perform vector store/load alignment in loop") \ |
kvn@3882 | 102 | \ |
duke@435 | 103 | product(intx, NumberOfLoopInstrToAlign, 4, \ |
duke@435 | 104 | "Number of first instructions in a loop to align") \ |
duke@435 | 105 | \ |
duke@435 | 106 | notproduct(intx, IndexSetWatch, 0, \ |
duke@435 | 107 | "Trace all operations on this IndexSet (-1 means all, 0 none)") \ |
duke@435 | 108 | \ |
duke@435 | 109 | develop(intx, OptoNodeListSize, 4, \ |
duke@435 | 110 | "Starting allocation size of Node_List data structures") \ |
duke@435 | 111 | \ |
duke@435 | 112 | develop(intx, OptoBlockListSize, 8, \ |
duke@435 | 113 | "Starting allocation size of Block_List data structures") \ |
duke@435 | 114 | \ |
duke@435 | 115 | develop(intx, OptoPeepholeAt, -1, \ |
duke@435 | 116 | "Apply peephole optimizations to this peephole rule") \ |
duke@435 | 117 | \ |
duke@435 | 118 | notproduct(bool, PrintIdeal, false, \ |
duke@435 | 119 | "Print ideal graph before code generation") \ |
duke@435 | 120 | \ |
duke@435 | 121 | notproduct(bool, PrintOpto, false, \ |
duke@435 | 122 | "Print compiler2 attempts") \ |
duke@435 | 123 | \ |
duke@435 | 124 | notproduct(bool, PrintOptoInlining, false, \ |
duke@435 | 125 | "Print compiler2 inlining decisions") \ |
duke@435 | 126 | \ |
duke@435 | 127 | notproduct(bool, VerifyOpto, false, \ |
duke@435 | 128 | "Apply more time consuming verification during compilation") \ |
duke@435 | 129 | \ |
bharadwaj@4315 | 130 | notproduct(bool, VerifyIdealNodeCount, false, \ |
bharadwaj@4315 | 131 | "Verify that tracked dead ideal node count is accurate") \ |
bharadwaj@4315 | 132 | \ |
bharadwaj@4315 | 133 | notproduct(bool, PrintIdealNodeCount, false, \ |
bharadwaj@4315 | 134 | "Print liveness counts of ideal nodes") \ |
bharadwaj@4315 | 135 | \ |
duke@435 | 136 | notproduct(bool, VerifyOptoOopOffsets, false, \ |
duke@435 | 137 | "Check types of base addresses in field references") \ |
duke@435 | 138 | \ |
duke@435 | 139 | develop(bool, IdealizedNumerics, false, \ |
duke@435 | 140 | "Check performance difference allowing FP " \ |
duke@435 | 141 | "associativity and commutativity...") \ |
duke@435 | 142 | \ |
duke@435 | 143 | develop(bool, OptoBreakpoint, false, \ |
duke@435 | 144 | "insert breakpoint at method entry") \ |
duke@435 | 145 | \ |
duke@435 | 146 | notproduct(bool, OptoBreakpointOSR, false, \ |
duke@435 | 147 | "insert breakpoint at osr method entry") \ |
duke@435 | 148 | \ |
duke@435 | 149 | notproduct(intx, BreakAtNode, 0, \ |
duke@435 | 150 | "Break at construction of this Node (either _idx or _debug_idx)") \ |
duke@435 | 151 | \ |
duke@435 | 152 | notproduct(bool, OptoBreakpointC2R, false, \ |
duke@435 | 153 | "insert breakpoint at runtime stub entry") \ |
duke@435 | 154 | \ |
duke@435 | 155 | notproduct(bool, OptoNoExecute, false, \ |
duke@435 | 156 | "Attempt to parse and compile but do not execute generated code") \ |
duke@435 | 157 | \ |
duke@435 | 158 | notproduct(bool, PrintOptoStatistics, false, \ |
duke@435 | 159 | "Print New compiler statistics") \ |
duke@435 | 160 | \ |
duke@435 | 161 | notproduct(bool, PrintOptoAssembly, false, \ |
duke@435 | 162 | "Print New compiler assembly output") \ |
duke@435 | 163 | \ |
duke@435 | 164 | develop_pd(bool, OptoPeephole, \ |
duke@435 | 165 | "Apply peephole optimizations after register allocation") \ |
duke@435 | 166 | \ |
duke@435 | 167 | develop(bool, OptoRemoveUseless, true, \ |
duke@435 | 168 | "Remove useless nodes after parsing") \ |
duke@435 | 169 | \ |
duke@435 | 170 | notproduct(bool, PrintFrameConverterAssembly, false, \ |
duke@435 | 171 | "Print New compiler assembly output for frame converters") \ |
duke@435 | 172 | \ |
duke@435 | 173 | notproduct(bool, PrintParseStatistics, false, \ |
duke@435 | 174 | "Print nodes, transforms and new values made per bytecode parsed")\ |
duke@435 | 175 | \ |
duke@435 | 176 | notproduct(bool, PrintOptoPeephole, false, \ |
duke@435 | 177 | "Print New compiler peephole replacements") \ |
duke@435 | 178 | \ |
duke@435 | 179 | develop(bool, PrintCFGBlockFreq, false, \ |
duke@435 | 180 | "Print CFG block freqencies") \ |
duke@435 | 181 | \ |
duke@435 | 182 | develop(bool, TraceOptoParse, false, \ |
duke@435 | 183 | "Trace bytecode parse and control-flow merge") \ |
duke@435 | 184 | \ |
duke@435 | 185 | product_pd(intx, LoopUnrollLimit, \ |
duke@435 | 186 | "Unroll loop bodies with node count less than this") \ |
duke@435 | 187 | \ |
kvn@5513 | 188 | product(intx, LoopMaxUnroll, 16, \ |
kvn@5513 | 189 | "Maximum number of unrolls for main loop") \ |
kvn@5513 | 190 | \ |
duke@435 | 191 | product(intx, LoopUnrollMin, 4, \ |
duke@435 | 192 | "Minimum number of unroll loop bodies before checking progress" \ |
duke@435 | 193 | "of rounds of unroll,optimize,..") \ |
duke@435 | 194 | \ |
duke@435 | 195 | develop(intx, UnrollLimitForProfileCheck, 1, \ |
duke@435 | 196 | "Don't use profile_trip_cnt() to restrict unrolling until " \ |
duke@435 | 197 | "unrolling would push the number of unrolled iterations above " \ |
duke@435 | 198 | "UnrollLimitForProfileCheck. A higher value allows more " \ |
duke@435 | 199 | "unrolling. Zero acts as a very large value." ) \ |
duke@435 | 200 | \ |
duke@435 | 201 | product(intx, MultiArrayExpandLimit, 6, \ |
duke@435 | 202 | "Maximum number of individual allocations in an inline-expanded " \ |
duke@435 | 203 | "multianewarray instruction") \ |
duke@435 | 204 | \ |
duke@435 | 205 | notproduct(bool, TraceProfileTripCount, false, \ |
duke@435 | 206 | "Trace profile loop trip count information") \ |
duke@435 | 207 | \ |
cfang@1607 | 208 | product(bool, UseLoopPredicate, true, \ |
cfang@1607 | 209 | "Generate a predicate to select fast/slow loop versions") \ |
cfang@1607 | 210 | \ |
cfang@1607 | 211 | develop(bool, TraceLoopPredicate, false, \ |
cfang@1607 | 212 | "Trace generation of loop predicates") \ |
cfang@1607 | 213 | \ |
kvn@2665 | 214 | develop(bool, TraceLoopOpts, false, \ |
kvn@2665 | 215 | "Trace executed loop optimizations") \ |
kvn@2665 | 216 | \ |
kvn@2877 | 217 | diagnostic(bool, LoopLimitCheck, true, \ |
kvn@2877 | 218 | "Generate a loop limits check for overflow") \ |
kvn@2877 | 219 | \ |
kvn@2877 | 220 | develop(bool, TraceLoopLimitCheck, false, \ |
kvn@2877 | 221 | "Trace generation of loop limits checks") \ |
kvn@2877 | 222 | \ |
kvn@2877 | 223 | diagnostic(bool, RangeLimitCheck, true, \ |
kvn@2877 | 224 | "Additional overflow checks during range check elimination") \ |
kvn@2877 | 225 | \ |
kvn@2877 | 226 | develop(bool, TraceRangeLimitCheck, false, \ |
kvn@2877 | 227 | "Trace additional overflow checks in RCE") \ |
kvn@2877 | 228 | \ |
kvn@2877 | 229 | diagnostic(bool, UnrollLimitCheck, true, \ |
kvn@2877 | 230 | "Additional overflow checks during loop unroll") \ |
kvn@2877 | 231 | \ |
goetz@6487 | 232 | /* OptimizeFill not yet supported on PowerPC. */ \ |
goetz@6487 | 233 | product(bool, OptimizeFill, true PPC64_ONLY(&& false), \ |
never@2118 | 234 | "convert fill/copy loops into intrinsic") \ |
never@2118 | 235 | \ |
never@2118 | 236 | develop(bool, TraceOptimizeFill, false, \ |
never@2118 | 237 | "print detailed information about fill conversion") \ |
never@2118 | 238 | \ |
duke@435 | 239 | develop(bool, OptoCoalesce, true, \ |
duke@435 | 240 | "Use Conservative Copy Coalescing in the Register Allocator") \ |
duke@435 | 241 | \ |
duke@435 | 242 | develop(bool, UseUniqueSubclasses, true, \ |
duke@435 | 243 | "Narrow an abstract reference to the unique concrete subclass") \ |
duke@435 | 244 | \ |
duke@435 | 245 | develop(bool, UseExactTypes, true, \ |
duke@435 | 246 | "Use exact types to eliminate array store checks and v-calls") \ |
duke@435 | 247 | \ |
duke@435 | 248 | product(intx, TrackedInitializationLimit, 50, \ |
duke@435 | 249 | "When initializing fields, track up to this many words") \ |
duke@435 | 250 | \ |
duke@435 | 251 | product(bool, ReduceFieldZeroing, true, \ |
duke@435 | 252 | "When initializing fields, try to avoid needless zeroing") \ |
duke@435 | 253 | \ |
duke@435 | 254 | product(bool, ReduceInitialCardMarks, true, \ |
duke@435 | 255 | "When initializing fields, try to avoid needless card marks") \ |
duke@435 | 256 | \ |
duke@435 | 257 | product(bool, ReduceBulkZeroing, true, \ |
duke@435 | 258 | "When bulk-initializing, try to avoid needless zeroing") \ |
duke@435 | 259 | \ |
never@2085 | 260 | product(bool, UseFPUForSpilling, false, \ |
never@2085 | 261 | "Spill integer registers to FPU instead of stack when possible") \ |
never@2085 | 262 | \ |
duke@435 | 263 | develop_pd(intx, RegisterCostAreaRatio, \ |
duke@435 | 264 | "Spill selection in reg allocator: scale area by (X/64K) before " \ |
duke@435 | 265 | "adding cost") \ |
duke@435 | 266 | \ |
duke@435 | 267 | develop_pd(bool, UseCISCSpill, \ |
duke@435 | 268 | "Use ADLC supplied cisc instructions during allocation") \ |
duke@435 | 269 | \ |
duke@435 | 270 | notproduct(bool, VerifyGraphEdges , false, \ |
duke@435 | 271 | "Verify Bi-directional Edges") \ |
duke@435 | 272 | \ |
duke@435 | 273 | notproduct(bool, VerifyDUIterators, true, \ |
duke@435 | 274 | "Verify the safety of all iterations of Bi-directional Edges") \ |
duke@435 | 275 | \ |
duke@435 | 276 | notproduct(bool, VerifyHashTableKeys, true, \ |
duke@435 | 277 | "Verify the immutability of keys in the VN hash tables") \ |
duke@435 | 278 | \ |
kvn@985 | 279 | notproduct(bool, VerifyRegisterAllocator , false, \ |
kvn@985 | 280 | "Verify Register Allocator") \ |
kvn@985 | 281 | \ |
duke@435 | 282 | develop_pd(intx, FLOATPRESSURE, \ |
duke@435 | 283 | "Number of float LRG's that constitute high register pressure") \ |
duke@435 | 284 | \ |
duke@435 | 285 | develop_pd(intx, INTPRESSURE, \ |
duke@435 | 286 | "Number of integer LRG's that constitute high register pressure") \ |
duke@435 | 287 | \ |
duke@435 | 288 | notproduct(bool, TraceOptoPipelining, false, \ |
duke@435 | 289 | "Trace pipelining information") \ |
duke@435 | 290 | \ |
duke@435 | 291 | notproduct(bool, TraceOptoOutput, false, \ |
duke@435 | 292 | "Trace pipelining information") \ |
duke@435 | 293 | \ |
duke@435 | 294 | product_pd(bool, OptoScheduling, \ |
duke@435 | 295 | "Instruction Scheduling after register allocation") \ |
duke@435 | 296 | \ |
duke@435 | 297 | product(bool, PartialPeelLoop, true, \ |
duke@435 | 298 | "Partial peel (rotate) loops") \ |
duke@435 | 299 | \ |
duke@435 | 300 | product(intx, PartialPeelNewPhiDelta, 0, \ |
duke@435 | 301 | "Additional phis that can be created by partial peeling") \ |
duke@435 | 302 | \ |
duke@435 | 303 | notproduct(bool, TracePartialPeeling, false, \ |
duke@435 | 304 | "Trace partial peeling (loop rotation) information") \ |
duke@435 | 305 | \ |
duke@435 | 306 | product(bool, PartialPeelAtUnsignedTests, true, \ |
duke@435 | 307 | "Partial peel at unsigned tests if no signed test exists") \ |
duke@435 | 308 | \ |
duke@435 | 309 | product(bool, ReassociateInvariants, true, \ |
duke@435 | 310 | "Enable reassociation of expressions with loop invariants.") \ |
duke@435 | 311 | \ |
duke@435 | 312 | product(bool, LoopUnswitching, true, \ |
duke@435 | 313 | "Enable loop unswitching (a form of invariant test hoisting)") \ |
duke@435 | 314 | \ |
duke@435 | 315 | notproduct(bool, TraceLoopUnswitching, false, \ |
duke@435 | 316 | "Trace loop unswitching") \ |
duke@435 | 317 | \ |
duke@435 | 318 | product(bool, UseSuperWord, true, \ |
duke@435 | 319 | "Transform scalar operations into superword operations") \ |
duke@435 | 320 | \ |
duke@435 | 321 | develop(bool, SuperWordRTDepCheck, false, \ |
duke@435 | 322 | "Enable runtime dependency checks.") \ |
duke@435 | 323 | \ |
kvn@3886 | 324 | notproduct(bool, TraceSuperWord, false, \ |
duke@435 | 325 | "Trace superword transforms") \ |
duke@435 | 326 | \ |
kvn@3886 | 327 | notproduct(bool, TraceNewVectors, false, \ |
kvn@3886 | 328 | "Trace creation of Vector nodes") \ |
kvn@3886 | 329 | \ |
duke@435 | 330 | product_pd(bool, OptoBundling, \ |
duke@435 | 331 | "Generate nops to fill i-cache lines") \ |
duke@435 | 332 | \ |
duke@435 | 333 | product_pd(intx, ConditionalMoveLimit, \ |
duke@435 | 334 | "Limit of ops to make speculative when using CMOVE") \ |
duke@435 | 335 | \ |
duke@435 | 336 | /* Set BranchOnRegister == false. See 4965987. */ \ |
duke@435 | 337 | product(bool, BranchOnRegister, false, \ |
duke@435 | 338 | "Use Sparc V9 branch-on-register opcodes") \ |
duke@435 | 339 | \ |
duke@435 | 340 | develop(bool, SparcV9RegsHiBitsZero, true, \ |
duke@435 | 341 | "Assume Sparc V9 I&L registers on V8+ systems are zero-extended") \ |
duke@435 | 342 | \ |
twisti@2350 | 343 | product(bool, UseRDPCForConstantTableBase, false, \ |
twisti@2350 | 344 | "Use Sparc RDPC instruction for the constant table base.") \ |
twisti@2350 | 345 | \ |
duke@435 | 346 | develop(intx, PrintIdealGraphLevel, 0, \ |
duke@435 | 347 | "Print ideal graph to XML file / network interface. " \ |
duke@435 | 348 | "By default attempts to connect to the visualizer on a socket.") \ |
duke@435 | 349 | \ |
duke@435 | 350 | develop(intx, PrintIdealGraphPort, 4444, \ |
duke@435 | 351 | "Ideal graph printer to network port") \ |
duke@435 | 352 | \ |
kvn@869 | 353 | notproduct(ccstr, PrintIdealGraphAddress, "127.0.0.1", \ |
duke@435 | 354 | "IP address to connect to visualizer") \ |
duke@435 | 355 | \ |
kvn@869 | 356 | notproduct(ccstr, PrintIdealGraphFile, NULL, \ |
duke@435 | 357 | "File to dump ideal graph to. If set overrides the " \ |
duke@435 | 358 | "use of the network") \ |
duke@435 | 359 | \ |
duke@435 | 360 | product(bool, UseOldInlining, true, \ |
duke@435 | 361 | "Enable the 1.3 inlining strategy") \ |
duke@435 | 362 | \ |
duke@435 | 363 | product(bool, UseBimorphicInlining, true, \ |
duke@435 | 364 | "Profiling based inlining for two receivers") \ |
duke@435 | 365 | \ |
duke@435 | 366 | product(bool, UseOnlyInlinedBimorphic, true, \ |
duke@435 | 367 | "Don't use BimorphicInlining if can't inline a second method") \ |
duke@435 | 368 | \ |
duke@435 | 369 | product(bool, InsertMemBarAfterArraycopy, true, \ |
duke@435 | 370 | "Insert memory barrier after arraycopy call") \ |
duke@435 | 371 | \ |
kvn@2040 | 372 | develop(bool, SubsumeLoads, true, \ |
kvn@2040 | 373 | "Attempt to compile while subsuming loads into machine instructions.") \ |
kvn@2040 | 374 | \ |
kvn@2040 | 375 | develop(bool, StressRecompilation, false, \ |
kvn@2040 | 376 | "Recompile each compiled method without subsuming loads or escape analysis.") \ |
kvn@2040 | 377 | \ |
duke@435 | 378 | develop(intx, ImplicitNullCheckThreshold, 3, \ |
duke@435 | 379 | "Don't do implicit null checks if NPE's in a method exceeds limit") \ |
duke@435 | 380 | \ |
duke@435 | 381 | product(intx, LoopOptsCount, 43, \ |
duke@435 | 382 | "Set level of loop optimization for tier 1 compiles") \ |
duke@435 | 383 | \ |
duke@435 | 384 | /* controls for heat-based inlining */ \ |
duke@435 | 385 | \ |
duke@435 | 386 | develop(intx, NodeCountInliningCutoff, 18000, \ |
duke@435 | 387 | "If parser node generation exceeds limit stop inlining") \ |
duke@435 | 388 | \ |
duke@435 | 389 | develop(intx, NodeCountInliningStep, 1000, \ |
duke@435 | 390 | "Target size of warm calls inlined between optimization passes") \ |
duke@435 | 391 | \ |
duke@435 | 392 | develop(bool, InlineWarmCalls, false, \ |
duke@435 | 393 | "Use a heat-based priority queue to govern inlining") \ |
duke@435 | 394 | \ |
duke@435 | 395 | develop(intx, HotCallCountThreshold, 999999, \ |
duke@435 | 396 | "large numbers of calls (per method invocation) force hotness") \ |
duke@435 | 397 | \ |
duke@435 | 398 | develop(intx, HotCallProfitThreshold, 999999, \ |
duke@435 | 399 | "highly profitable inlining opportunities force hotness") \ |
duke@435 | 400 | \ |
duke@435 | 401 | develop(intx, HotCallTrivialWork, -1, \ |
duke@435 | 402 | "trivial execution time (no larger than this) forces hotness") \ |
duke@435 | 403 | \ |
duke@435 | 404 | develop(intx, HotCallTrivialSize, -1, \ |
duke@435 | 405 | "trivial methods (no larger than this) force calls to be hot") \ |
duke@435 | 406 | \ |
duke@435 | 407 | develop(intx, WarmCallMinCount, -1, \ |
duke@435 | 408 | "number of calls (per method invocation) to enable inlining") \ |
duke@435 | 409 | \ |
duke@435 | 410 | develop(intx, WarmCallMinProfit, -1, \ |
duke@435 | 411 | "number of calls (per method invocation) to enable inlining") \ |
duke@435 | 412 | \ |
duke@435 | 413 | develop(intx, WarmCallMaxWork, 999999, \ |
duke@435 | 414 | "execution time of the largest inlinable method") \ |
duke@435 | 415 | \ |
duke@435 | 416 | develop(intx, WarmCallMaxSize, 999999, \ |
duke@435 | 417 | "size of the largest inlinable method") \ |
duke@435 | 418 | \ |
drchase@5285 | 419 | product(intx, MaxNodeLimit, 80000, \ |
duke@435 | 420 | "Maximum number of nodes") \ |
duke@435 | 421 | \ |
drchase@5285 | 422 | product(intx, NodeLimitFudgeFactor, 2000, \ |
duke@435 | 423 | "Fudge Factor for certain optimizations") \ |
duke@435 | 424 | \ |
duke@435 | 425 | product(bool, UseJumpTables, true, \ |
duke@435 | 426 | "Use JumpTables instead of a binary search tree for switches") \ |
duke@435 | 427 | \ |
duke@435 | 428 | product(bool, UseDivMod, true, \ |
duke@435 | 429 | "Use combined DivMod instruction if available") \ |
duke@435 | 430 | \ |
adlertz@5660 | 431 | product_pd(intx, MinJumpTableSize, \ |
duke@435 | 432 | "Minimum number of targets in a generated jump table") \ |
duke@435 | 433 | \ |
duke@435 | 434 | product(intx, MaxJumpTableSize, 65000, \ |
duke@435 | 435 | "Maximum number of targets in a generated jump table") \ |
duke@435 | 436 | \ |
duke@435 | 437 | product(intx, MaxJumpTableSparseness, 5, \ |
duke@435 | 438 | "Maximum sparseness for jumptables") \ |
duke@435 | 439 | \ |
duke@435 | 440 | product(bool, EliminateLocks, true, \ |
duke@435 | 441 | "Coarsen locks when possible") \ |
duke@435 | 442 | \ |
kvn@3406 | 443 | product(bool, EliminateNestedLocks, true, \ |
kvn@3406 | 444 | "Eliminate nested locks of the same object when possible") \ |
kvn@3406 | 445 | \ |
duke@435 | 446 | notproduct(bool, PrintLockStatistics, false, \ |
duke@435 | 447 | "Print precise statistics on the dynamic lock usage") \ |
duke@435 | 448 | \ |
duke@435 | 449 | diagnostic(bool, PrintPreciseBiasedLockingStatistics, false, \ |
duke@435 | 450 | "Print per-lock-site statistics of biased locking in JVM") \ |
duke@435 | 451 | \ |
duke@435 | 452 | notproduct(bool, PrintEliminateLocks, false, \ |
duke@435 | 453 | "Print out when locks are eliminated") \ |
duke@435 | 454 | \ |
kvn@5110 | 455 | product(bool, EliminateAutoBox, true, \ |
kvn@5110 | 456 | "Control optimizations for autobox elimination") \ |
never@452 | 457 | \ |
vlivanov@5658 | 458 | experimental(bool, UseImplicitStableValues, false, \ |
vlivanov@5658 | 459 | "Mark well-known stable fields as such (e.g. String.value)") \ |
vlivanov@5658 | 460 | \ |
never@452 | 461 | product(intx, AutoBoxCacheMax, 128, \ |
never@452 | 462 | "Sets max value cached by the java.lang.Integer autobox cache") \ |
never@452 | 463 | \ |
kvn@5110 | 464 | experimental(bool, AggressiveUnboxing, false, \ |
kvn@5110 | 465 | "Control optimizations for aggressive boxing elimination") \ |
kvn@5110 | 466 | \ |
goetz@6478 | 467 | develop(bool, TracePostallocExpand, false, "Trace expanding nodes after" \ |
goetz@6478 | 468 | " register allocation.") \ |
goetz@6478 | 469 | \ |
kvn@1365 | 470 | product(bool, DoEscapeAnalysis, true, \ |
duke@435 | 471 | "Perform escape analysis") \ |
duke@435 | 472 | \ |
kvn@4206 | 473 | develop(bool, ExitEscapeAnalysisOnTimeout, true, \ |
kvn@4206 | 474 | "Exit or throw assert in EA when it reaches time limit") \ |
kvn@4206 | 475 | \ |
duke@435 | 476 | notproduct(bool, PrintEscapeAnalysis, false, \ |
duke@435 | 477 | "Print the results of escape analysis") \ |
duke@435 | 478 | \ |
duke@435 | 479 | product(bool, EliminateAllocations, true, \ |
duke@435 | 480 | "Use escape analysis to eliminate allocations") \ |
duke@435 | 481 | \ |
kvn@500 | 482 | notproduct(bool, PrintEliminateAllocations, false, \ |
kvn@500 | 483 | "Print out when allocations are eliminated") \ |
kvn@500 | 484 | \ |
kvn@500 | 485 | product(intx, EliminateAllocationArraySizeLimit, 64, \ |
kvn@500 | 486 | "Array size (number of elements) limit for scalar replacement") \ |
kvn@500 | 487 | \ |
kvn@3309 | 488 | product(bool, OptimizePtrCompare, true, \ |
kvn@3309 | 489 | "Use escape analysis to optimize pointers compare") \ |
kvn@3309 | 490 | \ |
kvn@3309 | 491 | notproduct(bool, PrintOptimizePtrCompare, false, \ |
kvn@3309 | 492 | "Print information about optimized pointers compare") \ |
kvn@3309 | 493 | \ |
kvn@3651 | 494 | notproduct(bool, VerifyConnectionGraph , true, \ |
kvn@3651 | 495 | "Verify Connection Graph construction in Escape Analysis") \ |
kvn@3651 | 496 | \ |
kvn@1108 | 497 | product(bool, UseOptoBiasInlining, true, \ |
kvn@855 | 498 | "Generate biased locking code in C2 ideal graph") \ |
kvn@855 | 499 | \ |
never@3235 | 500 | product(bool, OptimizeStringConcat, true, \ |
never@1515 | 501 | "Optimize the construction of Strings by StringBuilder") \ |
never@1515 | 502 | \ |
never@1515 | 503 | notproduct(bool, PrintOptimizeStringConcat, false, \ |
never@1515 | 504 | "Print information about transformations performed on Strings") \ |
never@1515 | 505 | \ |
kvn@688 | 506 | product(intx, ValueSearchLimit, 1000, \ |
kvn@688 | 507 | "Recursion limit in PhaseMacroExpand::value_from_mem_phi") \ |
kvn@688 | 508 | \ |
duke@435 | 509 | product(intx, MaxLabelRootDepth, 1100, \ |
duke@435 | 510 | "Maximum times call Label_Root to prevent stack overflow") \ |
kvn@590 | 511 | \ |
kvn@590 | 512 | diagnostic(intx, DominatorSearchLimit, 1000, \ |
kvn@590 | 513 | "Iterations limit in Node::dominates") \ |
rasbold@853 | 514 | \ |
rasbold@853 | 515 | product(bool, BlockLayoutByFrequency, true, \ |
rasbold@853 | 516 | "Use edge frequencies to drive block ordering") \ |
rasbold@853 | 517 | \ |
rasbold@853 | 518 | product(intx, BlockLayoutMinDiamondPercentage, 20, \ |
rasbold@853 | 519 | "Miniumum %% of a successor (predecessor) for which block layout "\ |
rasbold@853 | 520 | "a will allow a fork (join) in a single chain") \ |
rasbold@853 | 521 | \ |
kvn@1108 | 522 | product(bool, BlockLayoutRotateLoops, true, \ |
rasbold@853 | 523 | "Allow back branches to be fall throughs in the block layour") \ |
twisti@4020 | 524 | \ |
twisti@4020 | 525 | develop(bool, InlineReflectionGetCallerClass, true, \ |
twisti@4020 | 526 | "inline sun.reflect.Reflection.getCallerClass(), known to be part "\ |
twisti@4020 | 527 | "of base library DLL") \ |
twisti@4020 | 528 | \ |
twisti@4020 | 529 | develop(bool, InlineObjectCopy, true, \ |
twisti@4020 | 530 | "inline Object.clone and Arrays.copyOf[Range] intrinsics") \ |
twisti@4020 | 531 | \ |
twisti@4020 | 532 | develop(bool, SpecialStringCompareTo, true, \ |
twisti@4020 | 533 | "special version of string compareTo") \ |
twisti@4020 | 534 | \ |
twisti@4020 | 535 | develop(bool, SpecialStringIndexOf, true, \ |
twisti@4020 | 536 | "special version of string indexOf") \ |
twisti@4020 | 537 | \ |
twisti@4020 | 538 | develop(bool, SpecialStringEquals, true, \ |
twisti@4020 | 539 | "special version of string equals") \ |
twisti@4020 | 540 | \ |
twisti@4020 | 541 | develop(bool, SpecialArraysEquals, true, \ |
twisti@4020 | 542 | "special version of Arrays.equals(char[],char[])") \ |
twisti@4020 | 543 | \ |
kvn@4479 | 544 | product(bool, SpecialEncodeISOArray, true, \ |
kvn@4479 | 545 | "special version of ISO_8859_1$Encoder.encodeISOArray") \ |
kvn@4479 | 546 | \ |
twisti@4020 | 547 | develop(bool, BailoutToInterpreterForThrows, false, \ |
twisti@4020 | 548 | "Compiled methods which throws/catches exceptions will be " \ |
twisti@4020 | 549 | "deopt and intp.") \ |
twisti@4020 | 550 | \ |
twisti@4020 | 551 | develop(bool, ConvertCmpD2CmpF, true, \ |
twisti@4020 | 552 | "Convert cmpD to cmpF when one input is constant in float range") \ |
twisti@4020 | 553 | \ |
twisti@4020 | 554 | develop(bool, ConvertFloat2IntClipping, true, \ |
twisti@4020 | 555 | "Convert float2int clipping idiom to integer clipping") \ |
twisti@4020 | 556 | \ |
twisti@4020 | 557 | develop(bool, Use24BitFPMode, true, \ |
twisti@4020 | 558 | "Set 24-bit FPU mode on a per-compile basis ") \ |
twisti@4020 | 559 | \ |
twisti@4020 | 560 | develop(bool, Use24BitFP, true, \ |
twisti@4020 | 561 | "use FP instructions that produce 24-bit precise results") \ |
twisti@4020 | 562 | \ |
twisti@4020 | 563 | develop(bool, MonomorphicArrayCheck, true, \ |
twisti@4020 | 564 | "Uncommon-trap array store checks that require full type check") \ |
twisti@4020 | 565 | \ |
twisti@4020 | 566 | notproduct(bool, TracePhaseCCP, false, \ |
twisti@4020 | 567 | "Print progress during Conditional Constant Propagation") \ |
twisti@4020 | 568 | \ |
twisti@4020 | 569 | develop(bool, PrintDominators, false, \ |
twisti@4020 | 570 | "Print out dominator trees for GVN") \ |
twisti@4020 | 571 | \ |
twisti@4020 | 572 | notproduct(bool, TraceSpilling, false, \ |
twisti@4020 | 573 | "Trace spilling") \ |
twisti@4020 | 574 | \ |
twisti@4104 | 575 | diagnostic(bool, TraceTypeProfile, false, \ |
twisti@4020 | 576 | "Trace type profile") \ |
twisti@4020 | 577 | \ |
twisti@4020 | 578 | develop(bool, PoisonOSREntry, true, \ |
twisti@4020 | 579 | "Detect abnormal calls to OSR code") \ |
twisti@4020 | 580 | \ |
twisti@4020 | 581 | product(bool, UseCondCardMark, false, \ |
twisti@4020 | 582 | "Check for already marked card before updating card table") \ |
twisti@4020 | 583 | \ |
twisti@4020 | 584 | develop(bool, SoftMatchFailure, trueInProduct, \ |
twisti@4020 | 585 | "If the DFA fails to match a node, print a message and bail out") \ |
twisti@4020 | 586 | \ |
twisti@4020 | 587 | develop(bool, InlineAccessors, true, \ |
twisti@4020 | 588 | "inline accessor methods (get/set)") \ |
twisti@4020 | 589 | \ |
twisti@4020 | 590 | product(intx, TypeProfileMajorReceiverPercent, 90, \ |
twisti@4020 | 591 | "% of major receiver type to all profiled receivers") \ |
twisti@4020 | 592 | \ |
twisti@4020 | 593 | notproduct(bool, TimeCompiler2, false, \ |
twisti@4020 | 594 | "detailed time the compiler (requires +TimeCompiler)") \ |
twisti@4020 | 595 | \ |
twisti@4020 | 596 | diagnostic(bool, PrintIntrinsics, false, \ |
twisti@4020 | 597 | "prints attempted and successful inlining of intrinsics") \ |
twisti@4020 | 598 | \ |
twisti@4020 | 599 | diagnostic(ccstrlist, DisableIntrinsic, "", \ |
twisti@4020 | 600 | "do not expand intrinsics whose (internal) names appear here") \ |
twisti@4020 | 601 | \ |
twisti@4020 | 602 | develop(bool, StressReflectiveCode, false, \ |
twisti@4020 | 603 | "Use inexact types at allocations, etc., to test reflection") \ |
twisti@4020 | 604 | \ |
twisti@4020 | 605 | diagnostic(bool, DebugInlinedCalls, true, \ |
twisti@4020 | 606 | "If false, restricts profiled locations to the root method only") \ |
twisti@4020 | 607 | \ |
twisti@4020 | 608 | notproduct(bool, VerifyLoopOptimizations, false, \ |
twisti@4020 | 609 | "verify major loop optimizations") \ |
twisti@4020 | 610 | \ |
twisti@4020 | 611 | diagnostic(bool, ProfileDynamicTypes, true, \ |
twisti@4020 | 612 | "do extra type profiling and use it more aggressively") \ |
twisti@4020 | 613 | \ |
twisti@4020 | 614 | develop(bool, TraceIterativeGVN, false, \ |
twisti@4020 | 615 | "Print progress during Iterative Global Value Numbering") \ |
twisti@4020 | 616 | \ |
twisti@4020 | 617 | develop(bool, VerifyIterativeGVN, false, \ |
twisti@4020 | 618 | "Verify Def-Use modifications during sparse Iterative Global " \ |
twisti@4020 | 619 | "Value Numbering") \ |
twisti@4020 | 620 | \ |
twisti@4020 | 621 | notproduct(bool, TraceCISCSpill, false, \ |
twisti@4020 | 622 | "Trace allocators use of cisc spillable instructions") \ |
twisti@4020 | 623 | \ |
twisti@4020 | 624 | product(bool, SplitIfBlocks, true, \ |
twisti@4020 | 625 | "Clone compares and control flow through merge points to fold " \ |
twisti@4020 | 626 | "some branches") \ |
twisti@4020 | 627 | \ |
twisti@4020 | 628 | develop(intx, FreqCountInvocations, 1, \ |
twisti@4020 | 629 | "Scaling factor for branch frequencies (deprecated)") \ |
twisti@4020 | 630 | \ |
twisti@4020 | 631 | product(intx, AliasLevel, 3, \ |
twisti@4020 | 632 | "0 for no aliasing, 1 for oop/field/static/array split, " \ |
twisti@4020 | 633 | "2 for class split, 3 for unique instances") \ |
twisti@4020 | 634 | \ |
twisti@4020 | 635 | develop(bool, VerifyAliases, false, \ |
twisti@4020 | 636 | "perform extra checks on the results of alias analysis") \ |
roland@4409 | 637 | \ |
roland@4409 | 638 | product(bool, IncrementalInline, true, \ |
roland@4409 | 639 | "do post parse inlining") \ |
roland@4409 | 640 | \ |
roland@4409 | 641 | develop(bool, AlwaysIncrementalInline, false, \ |
roland@4409 | 642 | "do all inlining incrementally") \ |
roland@4409 | 643 | \ |
roland@4409 | 644 | product(intx, LiveNodeCountInliningCutoff, 20000, \ |
roland@4409 | 645 | "max number of live nodes in a method") \ |
roland@4589 | 646 | \ |
roland@4589 | 647 | diagnostic(bool, OptimizeExpensiveOps, true, \ |
roland@4589 | 648 | "Find best control for expensive operations") \ |
rbackman@5791 | 649 | \ |
rbackman@5791 | 650 | product(bool, UseMathExactIntrinsics, true, \ |
roland@5981 | 651 | "Enables intrinsification of various java.lang.Math functions") \ |
roland@5981 | 652 | \ |
roland@5981 | 653 | experimental(bool, ReplaceInParentMaps, false, \ |
roland@5991 | 654 | "Propagate type improvements in callers of inlinee if possible") \ |
roland@5991 | 655 | \ |
roland@5991 | 656 | experimental(bool, UseTypeSpeculation, false, \ |
goetz@6490 | 657 | "Speculatively propagate types from profiles") \ |
goetz@6490 | 658 | \ |
goetz@6490 | 659 | product_pd(bool, TrapBasedRangeChecks, \ |
goetz@6490 | 660 | "Generate code for range checks that uses a cmp and trap " \ |
goetz@6490 | 661 | "instruction raising SIGTRAP. Used on PPC64.") \ |
duke@435 | 662 | |
never@1515 | 663 | C2_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG) |
stefank@2314 | 664 | |
stefank@2314 | 665 | #endif // SHARE_VM_OPTO_C2_GLOBALS_HPP |