# HG changeset patch # User Miguel Garcia # Date 1400144990 -7200 # Node ID af9580a11c873be38af02a841aa112220eb2963f # Parent 382009d82874186e0944d19d0cb867af800a315d [inlining] moved InliningPolicy to newly created package inlining.policy diff -r 382009d82874 -r af9580a11c87 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningPhase.java Thu May 15 11:01:51 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningPhase.java Thu May 15 11:09:50 2014 +0200 @@ -44,7 +44,7 @@ import com.oracle.graal.phases.common.inlining.InliningUtil.Inlineable; import com.oracle.graal.phases.common.inlining.InliningUtil.InlineableGraph; import com.oracle.graal.phases.common.inlining.InliningUtil.InlineableMacroNode; -import com.oracle.graal.phases.common.inlining.InliningUtil.InliningPolicy; +import com.oracle.graal.phases.common.inlining.policy.InliningPolicy; import com.oracle.graal.phases.graph.*; import com.oracle.graal.phases.tiers.*; import com.oracle.graal.phases.util.*; diff -r 382009d82874 -r af9580a11c87 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Thu May 15 11:01:51 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Thu May 15 11:09:50 2014 +0200 @@ -63,13 +63,6 @@ */ public static final DebugMetric InlinedBytecodes = Debug.metric("InlinedBytecodes"); - public interface InliningPolicy { - - boolean continueInlining(StructuredGraph graph); - - boolean isWorthInlining(ToDoubleFunction probabilities, Replacements replacements, InlineInfo info, int inliningDepth, double probability, double relevance, boolean fullyProcessed); - } - public interface Inlineable { int getNodeCount(); diff -r 382009d82874 -r af9580a11c87 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/policy/InliningPolicy.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/policy/InliningPolicy.java Thu May 15 11:09:50 2014 +0200 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2011, 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.common.inlining.policy; + +import com.oracle.graal.nodes.FixedNode; +import com.oracle.graal.nodes.StructuredGraph; +import com.oracle.graal.nodes.spi.Replacements; +import com.oracle.graal.phases.common.inlining.info.InlineInfo; + +import java.util.function.ToDoubleFunction; + +public interface InliningPolicy { + + boolean continueInlining(StructuredGraph graph); + + boolean isWorthInlining(ToDoubleFunction probabilities, Replacements replacements, InlineInfo info, int inliningDepth, double probability, double relevance, boolean fullyProcessed); +}