# HG changeset patch # User Doug Simon # Date 1427889541 -7200 # Node ID 674a81af799251be029802cf8d2030c4fc72dbd7 # Parent 67507ee4e8d6ef68127f69f6113ee8e16a0b8cfe removed IntrinsificationsEnabled and IntrinsificationsDisabled options diff -r 67507ee4e8d6 -r 674a81af7992 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Wed Apr 01 13:55:59 2015 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Wed Apr 01 13:59:01 2015 +0200 @@ -23,7 +23,6 @@ package com.oracle.graal.compiler; import static com.oracle.graal.compiler.GraalCompiler.Options.*; -import static com.oracle.graal.compiler.MethodFilter.*; import static com.oracle.graal.phases.common.DeadCodeEliminationPhase.Optionality.*; import java.util.*; @@ -66,71 +65,15 @@ private static final DebugTimer EmitLIR = Debug.timer("EmitLIR"); private static final DebugTimer EmitCode = Debug.timer("EmitCode"); - /** - * The set of positive filters specified by the {@code -G:IntrinsificationsEnabled} option. To - * enable a fast path in {@link #shouldIntrinsify(JavaMethod)}, this field is {@code null} when - * no enabling/disabling filters are specified. - */ - private static final MethodFilter[] positiveIntrinsificationFilter; - - /** - * The set of negative filters specified by the {@code -G:IntrinsificationsDisabled} option. - */ - private static final MethodFilter[] negativeIntrinsificationFilter; - static class Options { // @formatter:off - /** - * @see MethodFilter - */ - @Option(help = "Pattern for method(s) to which intrinsification (if available) will be applied. " + - "By default, all available intrinsifications are applied except for methods matched " + - "by IntrinsificationsDisabled. See MethodFilter class for pattern syntax.", type = OptionType.Debug) - public static final OptionValue IntrinsificationsEnabled = new OptionValue<>(null); - /** - * @see MethodFilter - */ - @Option(help = "Pattern for method(s) to which intrinsification will not be applied. " + - "See MethodFilter class for pattern syntax.", type = OptionType.Debug) - public static final OptionValue IntrinsificationsDisabled = new OptionValue<>(null); - @Option(help = "Repeatedly run the LIR code generation pass to improve statistical profiling results.", type = OptionType.Debug) public static final OptionValue EmitLIRRepeatCount = new OptionValue<>(0); // @formatter:on } - static { - if (IntrinsificationsDisabled.getValue() != null) { - negativeIntrinsificationFilter = parse(IntrinsificationsDisabled.getValue()); - } else { - negativeIntrinsificationFilter = null; - } - - if (Options.IntrinsificationsEnabled.getValue() != null) { - positiveIntrinsificationFilter = parse(IntrinsificationsEnabled.getValue()); - } else if (negativeIntrinsificationFilter != null) { - positiveIntrinsificationFilter = new MethodFilter[0]; - } else { - positiveIntrinsificationFilter = null; - } - } - - /** - * Determines if a given method should be intrinsified based on the values of - * {@link Options#IntrinsificationsEnabled} and {@link Options#IntrinsificationsDisabled}. - */ - public static boolean shouldIntrinsify(JavaMethod method) { - if (positiveIntrinsificationFilter == null) { - return true; - } - if (positiveIntrinsificationFilter.length == 0 || matches(positiveIntrinsificationFilter, method)) { - return negativeIntrinsificationFilter == null || !matches(negativeIntrinsificationFilter, method); - } - return false; - } - /** * Encapsulates all the inputs to a {@linkplain GraalCompiler#compile(Request) compilation}. */ diff -r 67507ee4e8d6 -r 674a81af7992 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectCloneNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectCloneNode.java Wed Apr 01 13:55:59 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectCloneNode.java Wed Apr 01 13:59:01 2015 +0200 @@ -22,8 +22,6 @@ */ package com.oracle.graal.hotspot.replacements; -import static com.oracle.graal.compiler.GraalCompiler.*; - import java.lang.reflect.*; import com.oracle.graal.api.meta.*; @@ -50,10 +48,6 @@ @Override protected StructuredGraph getLoweredSnippetGraph(LoweringTool tool) { - if (!shouldIntrinsify(getTargetMethod())) { - return null; - } - ResolvedJavaType type = StampTool.typeOrNull(getObject()); if (type != null) { if (type.isArray()) { diff -r 67507ee4e8d6 -r 674a81af7992 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ReflectionGetCallerClassNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ReflectionGetCallerClassNode.java Wed Apr 01 13:55:59 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ReflectionGetCallerClassNode.java Wed Apr 01 13:59:01 2015 +0200 @@ -22,16 +22,14 @@ */ package com.oracle.graal.hotspot.replacements; -import static com.oracle.graal.compiler.GraalCompiler.*; - import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.nodeinfo.*; +import com.oracle.graal.nodes.CallTargetNode.InvokeKind; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.CallTargetNode.InvokeKind; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; @@ -74,10 +72,6 @@ * @return ConstantNode of the caller class, or null */ private ConstantNode getCallerClassNode(MetaAccessProvider metaAccess) { - if (!shouldIntrinsify(getTargetMethod())) { - return null; - } - // Walk back up the frame states to find the caller at the required depth. FrameState state = stateAfter(); diff -r 67507ee4e8d6 -r 674a81af7992 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/ArrayCopyNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/ArrayCopyNode.java Wed Apr 01 13:55:59 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/arraycopy/ArrayCopyNode.java Wed Apr 01 13:59:01 2015 +0200 @@ -22,8 +22,6 @@ */ package com.oracle.graal.hotspot.replacements.arraycopy; -import static com.oracle.graal.compiler.GraalCompiler.*; - import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.debug.*; @@ -31,8 +29,8 @@ import com.oracle.graal.graph.*; import com.oracle.graal.loop.phases.*; import com.oracle.graal.nodeinfo.*; +import com.oracle.graal.nodes.CallTargetNode.InvokeKind; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.CallTargetNode.InvokeKind; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; import com.oracle.graal.phases.common.*; @@ -85,10 +83,6 @@ @Override protected StructuredGraph getLoweredSnippetGraph(final LoweringTool tool) { - if (!shouldIntrinsify(getTargetMethod())) { - return null; - } - final Replacements replacements = tool.getReplacements(); StructuredGraph snippetGraph = selectSnippet(tool, replacements); if (snippetGraph == null) { diff -r 67507ee4e8d6 -r 674a81af7992 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Wed Apr 01 13:55:59 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Wed Apr 01 13:59:01 2015 +0200 @@ -23,7 +23,6 @@ package com.oracle.graal.replacements; import static com.oracle.graal.api.meta.MetaUtil.*; -import static com.oracle.graal.compiler.GraalCompiler.*; import static com.oracle.graal.compiler.common.GraalOptions.*; import static com.oracle.graal.java.AbstractBytecodeParser.Options.*; import static com.oracle.graal.phases.common.DeadCodeEliminationPhase.Optionality.*; @@ -173,7 +172,7 @@ for (Executable originalMethod : originalMethods) { if (originalMethod != null && (guard == null || guard.execute())) { ResolvedJavaMethod original = registerMethodSubstitution(this, originalMethod, substituteMethod); - if (original != null && methodSubstitution.forced() && shouldIntrinsify(original)) { + if (original != null && methodSubstitution.forced()) { forcedSubstitutions.add(original); } }