< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java

Print this page
rev 52509 : [mq]: graal

@@ -230,16 +230,12 @@
         }
 
         AssumptionResult<ResolvedJavaType> leafConcreteSubtype = holder.findLeafConcreteSubtype();
         if (leafConcreteSubtype != null) {
             ResolvedJavaMethod resolvedMethod = leafConcreteSubtype.getResult().resolveConcreteMethod(targetMethod, contextType);
-            if (resolvedMethod != null) {
-                if (leafConcreteSubtype.canRecordTo(callTarget.graph().getAssumptions())) {
+            if (resolvedMethod != null && leafConcreteSubtype.canRecordTo(callTarget.graph().getAssumptions())) {
                     return getAssumptionInlineInfo(invoke, resolvedMethod, leafConcreteSubtype);
-                } else {
-                    return getTypeCheckedAssumptionInfo(invoke, resolvedMethod, leafConcreteSubtype.getResult());
-                }
             }
         }
 
         AssumptionResult<ResolvedJavaMethod> concrete = holder.findUniqueConcreteMethod(targetMethod);
         if (concrete != null && concrete.canRecordTo(callTarget.graph().getAssumptions())) {

@@ -248,17 +244,10 @@
 
         // type check based inlining
         return getTypeCheckedInlineInfo(invoke, targetMethod);
     }
 
-    private InlineInfo getTypeCheckedAssumptionInfo(Invoke invoke, ResolvedJavaMethod method, ResolvedJavaType type) {
-        if (!checkTargetConditions(invoke, method)) {
-            return null;
-        }
-        return new TypeGuardInlineInfo(invoke, method, type);
-    }
-
     private InlineInfo getTypeCheckedInlineInfo(Invoke invoke, ResolvedJavaMethod targetMethod) {
         JavaTypeProfile typeProfile = ((MethodCallTargetNode) invoke.callTarget()).getProfile();
         if (typeProfile == null) {
             InliningUtil.traceNotInlinedMethod(invoke, inliningDepth(), targetMethod, "no type profile exists");
             invoke.asNode().graph().getInliningLog().addDecision(invoke, false, "InliningPhase", null, null, "no type profile exists");
< prev index next >