Mercurial > hg > graal-compiler
view graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java @ 13753:785b2be9c85a
added work-around to handle CUDA context management in PTX C++ code
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 24 Jan 2014 18:03:09 +0100 |
parents | 16d99e9d77ad |
children | ebd2dfc2b780 |
line wrap: on
line source
/* * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.oracle.graal.phases; import com.oracle.graal.options.*; /** * This class encapsulates options that control the behavior of the Graal compiler. */ // @formatter:off public final class GraalOptions { @Option(help = "Enable use of compiler intrinsics") public static final OptionValue<Boolean> Intrinsify = new OptionValue<>(true); @Option(help = "Enable inlining of monomorphic calls") static final OptionValue<Boolean> InlineMonomorphicCalls = new OptionValue<>(true); @Option(help = "Enable inlining of polymorphic calls") static final OptionValue<Boolean> InlinePolymorphicCalls = new OptionValue<>(true); @Option(help = "Enable inlining of megamorphic calls") static final OptionValue<Boolean> InlineMegamorphicCalls = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Double> MegamorphicInliningMinMethodProbability = new OptionValue<>(0.33D); @Option(help = "") public static final OptionValue<Integer> MaximumDesiredSize = new OptionValue<>(20000); @Option(help = "") public static final OptionValue<Integer> MaximumRecursiveInlining = new OptionValue<>(5); // inlining settings @Option(help = "") public static final OptionValue<Float> BoostInliningForEscapeAnalysis = new OptionValue<>(2f); @Option(help = "") public static final OptionValue<Float> RelevanceCapForInlining = new OptionValue<>(1f); @Option(help = "") public static final OptionValue<Float> CapInheritedRelevance = new OptionValue<>(1f); @Option(help = "") public static final OptionValue<Boolean> IterativeInlining = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Integer> TrivialInliningSize = new OptionValue<>(10); @Option(help = "") public static final OptionValue<Integer> MaximumInliningSize = new OptionValue<>(300); @Option(help = "") public static final OptionValue<Integer> SmallCompiledLowLevelGraphSize = new OptionValue<>(300); @Option(help = "") public static final OptionValue<Double> LimitInlinedInvokes = new OptionValue<>(5.0); @Option(help = "") public static final OptionValue<Boolean> InlineEverything = new OptionValue<>(false); // escape analysis settings @Option(help = "") public static final OptionValue<Boolean> PartialEscapeAnalysis = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Integer> EscapeAnalysisIterations = new OptionValue<>(2); @Option(help = "") public static final OptionValue<String> EscapeAnalyzeOnly = new OptionValue<>(null); @Option(help = "") public static final OptionValue<Integer> MaximumEscapeAnalysisArrayLength = new OptionValue<>(32); @Option(help = "") public static final OptionValue<Boolean> PEAInliningHints = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Double> TailDuplicationProbability = new OptionValue<>(0.5); @Option(help = "") public static final OptionValue<Integer> TailDuplicationTrivialSize = new OptionValue<>(1); // profiling information @Option(help = "") public static final OptionValue<Integer> DeoptsToDisableOptimisticOptimization = new OptionValue<>(40); // graph caching @Option(help = "") public static final OptionValue<Boolean> CacheGraphs = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Integer> GraphCacheSize = new OptionValue<>(1000); @Option(help = "") public static final OptionValue<Boolean> PrintGraphCache = new OptionValue<>(false); //loop transform settings TODO (gd) tune @Option(help = "") public static final OptionValue<Boolean> LoopPeeling = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> ReassociateInvariants = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> FullUnroll = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> LoopUnswitch = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Integer> FullUnrollMaxNodes = new OptionValue<>(300); @Option(help = "") public static final OptionValue<Integer> ExactFullUnrollMaxNodes = new OptionValue<>(1200); @Option(help = "") public static final OptionValue<Float> MinimumPeelProbability = new OptionValue<>(0.35f); @Option(help = "") public static final OptionValue<Integer> LoopMaxUnswitch = new OptionValue<>(3); @Option(help = "") public static final OptionValue<Integer> LoopUnswitchMaxIncrease = new OptionValue<>(50); @Option(help = "") public static final OptionValue<Integer> LoopUnswitchUncertaintyBoost = new OptionValue<>(5); @Option(help = "") public static final OptionValue<Boolean> UseLoopLimitChecks = new OptionValue<>(true); // debugging settings @Option(help = "") public static final OptionValue<Boolean> ZapStackOnMethodEntry = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> DeoptALot = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> VerifyPhases = new OptionValue<>(false); @Option(help = "") public static final OptionValue<String> PrintFilter = new OptionValue<>(null); // Debug settings: @Option(help = "") public static final OptionValue<Boolean> BootstrapReplacements = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Integer> GCDebugStartCycle = new OptionValue<>(-1); // Ideal graph visualizer output settings @Option(help = "Dump IdealGraphVisualizer output in binary format") public static final OptionValue<Boolean> PrintBinaryGraphs = new OptionValue<>(true); @Option(help = "Output probabilities for fixed nodes during binary graph dumping") public static final OptionValue<Boolean> PrintGraphProbabilities = new OptionValue<>(false); @Option(help = "Enable dumping to the C1Visualizer. Enabling this option implies PrintBackendCFG.") public static final OptionValue<Boolean> PrintCFG = new OptionValue<>(false); @Option(help = "Enable dumping LIR, register allocation and code generation info to the C1Visualizer.") public static final OptionValue<Boolean> PrintBackendCFG = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> PrintIdealGraphFile = new OptionValue<>(false); @Option(help = "") public static final OptionValue<String> PrintIdealGraphAddress = new OptionValue<>("127.0.0.1"); @Option(help = "") public static final OptionValue<Integer> PrintIdealGraphPort = new OptionValue<>(4444); @Option(help = "") public static final OptionValue<Integer> PrintBinaryGraphPort = new OptionValue<>(4445); // Other printing settings @Option(help = "") public static final OptionValue<Boolean> PrintCompilation = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> PrintAfterCompilation = new OptionValue<>(false); @Option(help = "Print profiling information when parsing a method's bytecode") public static final OptionValue<Boolean> PrintProfilingInformation = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> PrintCodeBytes = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> PrintBailout = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> TraceEscapeAnalysis = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> ExitVMOnBailout = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> ExitVMOnException = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> PrintStackTraceOnException = new OptionValue<>(false); @Option(help = "Set a phase after which the decompiler dumps the graph, -G:Dump= required") public static final OptionValue<String> DecompileAfterPhase = new OptionValue<>(null); // HotSpot command line options @Option(help = "") public static final OptionValue<Boolean> HotSpotPrintCompilation = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> HotSpotPrintInlining = new OptionValue<>(false); // Register allocator debugging @Option(help = "") public static final OptionValue<String> RegisterPressure = new OptionValue<>(null); // Code generator settings @Option(help = "") public static final OptionValue<Boolean> ConditionalElimination = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> UseProfilingInformation = new OptionValue<>(true); @Option(help = "") static final OptionValue<Boolean> RemoveNeverExecutedCode = new OptionValue<>(true); @Option(help = "") static final OptionValue<Boolean> UseExceptionProbability = new OptionValue<>(true); @Option(help = "") static final OptionValue<Boolean> UseExceptionProbabilityForOperations = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OmitHotExceptionStacktrace = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> GenSafepoints = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> GenLoopSafepoints = new OptionValue<>(true); @Option(help = "") static final OptionValue<Boolean> UseTypeCheckHints = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> InlineVTableStubs = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> AlwaysInlineVTableStubs = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> GenAssertionCode = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> AlignCallsForPatching = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> ResolveClassBeforeStaticInvoke = new OptionValue<>(false); @Option(help = "") public static final OptionValue<Boolean> CanOmitFrame = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> MemoryAwareScheduling = new OptionValue<>(true); // Translating tableswitch instructions @Option(help = "") public static final OptionValue<Integer> MinimumJumpTableSize = new OptionValue<>(5); @Option(help = "") public static final OptionValue<Integer> RangeTestsSwitchDensity = new OptionValue<>(5); @Option(help = "") public static final OptionValue<Double> MinTableSwitchDensity = new OptionValue<>(0.5); // Ahead of time compilation @Option(help = "Try to avoid emitting code where patching is required") public static final OptionValue<Boolean> ImmutableCode = new OptionValue<>(false); // Runtime settings @Option(help = "") public static final OptionValue<Boolean> SupportJsrBytecodes = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptAssumptions = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptConvertDeoptsToGuards = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptReadElimination = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptCanonicalizer = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptDeoptimizationGrouping = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptScheduleOutOfLoops = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptEliminateGuards = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptEliminateSafepoints = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptImplicitNullChecks = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptLivenessAnalysis = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptLoopTransform = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptFloatingReads = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptTailDuplication = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptEliminatePartiallyRedundantGuards = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptFilterProfiledTypes = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptDevirtualizeInvokesOptimistically = new OptionValue<>(true); @Option(help = "") public static final OptionValue<Boolean> OptPushThroughPi = new OptionValue<>(true); /** * Counts the various paths taken through snippets. */ @Option(help = "") public static final OptionValue<Boolean> SnippetCounters = new OptionValue<>(false); }