1 /* 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 package org.graalvm.compiler.java; 24 25 import org.graalvm.compiler.options.Option; 26 import org.graalvm.compiler.options.OptionType; 27 import org.graalvm.compiler.options.OptionValue; 28 import org.graalvm.compiler.options.StableOptionValue; 29 30 /** 31 * Options related to {@link BytecodeParser}. 32 * 33 * Note: This must be a top level class to work around for 34 * <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>. 35 */ 36 public class BytecodeParserOptions { 37 // @formatter:off 38 @Option(help = "The trace level for the bytecode parser used when building a graph from bytecode", type = OptionType.Debug) 39 public static final OptionValue<Integer> TraceBytecodeParserLevel = new OptionValue<>(0); 40 41 @Option(help = "Inlines trivial methods during bytecode parsing.", type = OptionType.Expert) 42 public static final StableOptionValue<Boolean> InlineDuringParsing = new StableOptionValue<>(true); 43 44 @Option(help = "Inlines intrinsic methods during bytecode parsing.", type = OptionType.Expert) 45 public static final StableOptionValue<Boolean> InlineIntrinsicsDuringParsing = new StableOptionValue<>(true); 46 47 @Option(help = "Traces inlining performed during bytecode parsing.", type = OptionType.Debug) 48 public static final StableOptionValue<Boolean> TraceInlineDuringParsing = new StableOptionValue<>(false); 49 50 @Option(help = "Traces use of plugins during bytecode parsing.", type = OptionType.Debug) 51 public static final StableOptionValue<Boolean> TraceParserPlugins = new StableOptionValue<>(false); 52 53 @Option(help = "Maximum depth when inlining during bytecode parsing.", type = OptionType.Debug) 54 public static final StableOptionValue<Integer> InlineDuringParsingMaxDepth = new StableOptionValue<>(10); 55 56 @Option(help = "Dump graphs after non-trivial changes during bytecode parsing.", type = OptionType.Debug) 57 public static final StableOptionValue<Boolean> DumpDuringGraphBuilding = new StableOptionValue<>(false); 58 59 @Option(help = "When creating info points hide the methods of the substitutions.", type = OptionType.Debug) 60 public static final OptionValue<Boolean> HideSubstitutionStates = new OptionValue<>(false); 61 62 @Option(help = "Use intrinsics guarded by a virtual dispatch test at indirect call sites.", type = OptionType.Debug) 63 public static final OptionValue<Boolean> UseGuardedIntrinsics = new OptionValue<>(true); 64 // @formatter:on 65 }