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 */ 23package org.graalvm.compiler.java; 24 25import org.graalvm.compiler.options.Option; 26import org.graalvm.compiler.options.OptionType; 27import org.graalvm.compiler.options.OptionKey; 28 29/** 30 * Options related to {@link BytecodeParser}. 31 * 32 * Note: This must be a top level class to work around for 33 * <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>. 34 */ 35public class BytecodeParserOptions { 36 // @formatter:off 37 @Option(help = "The trace level for the bytecode parser used when building a graph from bytecode", type = OptionType.Debug) 38 public static final OptionKey<Integer> TraceBytecodeParserLevel = new OptionKey<>(0); 39 40 @Option(help = "Inlines trivial methods during bytecode parsing.", type = OptionType.Expert) 41 public static final OptionKey<Boolean> InlineDuringParsing = new OptionKey<>(true); 42 43 @Option(help = "Inlines partial intrinsic exits during bytecode parsing when possible. " + 44 "A partial intrinsic exit is a call within an intrinsic to the method " + 45 "being intrinsified and denotes semantics of the original method that " + 46 "the intrinsic does not support.", type = OptionType.Expert) 47 public static final OptionKey<Boolean> InlinePartialIntrinsicExitDuringParsing = new OptionKey<>(true); 48 49 @Option(help = "Inlines intrinsic methods during bytecode parsing.", type = OptionType.Expert) 50 public static final OptionKey<Boolean> InlineIntrinsicsDuringParsing = new OptionKey<>(true); 51 52 @Option(help = "Traces inlining performed during bytecode parsing.", type = OptionType.Debug) 53 public static final OptionKey<Boolean> TraceInlineDuringParsing = new OptionKey<>(false); 54 55 @Option(help = "Traces use of plugins during bytecode parsing.", type = OptionType.Debug) 56 public static final OptionKey<Boolean> TraceParserPlugins = new OptionKey<>(false); 57 58 @Option(help = "Maximum depth when inlining during bytecode parsing.", type = OptionType.Debug) 59 public static final OptionKey<Integer> InlineDuringParsingMaxDepth = new OptionKey<>(10); 60 61 @Option(help = "When creating info points hide the methods of the substitutions.", type = OptionType.Debug) 62 public static final OptionKey<Boolean> HideSubstitutionStates = new OptionKey<>(false); 63 64 @Option(help = "Use intrinsics guarded by a virtual dispatch test at indirect call sites.", type = OptionType.Debug) 65 public static final OptionKey<Boolean> UseGuardedIntrinsics = new OptionKey<>(true); 66 // @formatter:on 67} 68