Mercurial > hg > graal-compiler
changeset 15737:291f0e9875c4
[inlining-2] reduced verbosity in checkTargetConditions()
author | Miguel Garcia <miguel.m.garcia@oracle.com> |
---|---|
date | Sun, 18 May 2014 14:17:38 +0200 |
parents | 3464575dbe2b |
children | c204f1ba66b9 |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java |
diffstat | 1 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Sun May 18 14:15:19 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Sun May 18 14:17:38 2014 +0200 @@ -483,22 +483,27 @@ } private static boolean checkTargetConditions(InliningData data, Replacements replacements, Invoke invoke, ResolvedJavaMethod method, OptimisticOptimizations optimisticOpts) { + String failureMessage = null; if (method == null) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "the method is not resolved"); + failureMessage = "the method is not resolved"; } else if (method.isNative() && (!Intrinsify.getValue() || !InliningUtil.canIntrinsify(replacements, method))) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it is a non-intrinsic native method"); + failureMessage = "it is a non-intrinsic native method"; } else if (method.isAbstract()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it is an abstract method"); + failureMessage = "it is an abstract method"; } else if (!method.getDeclaringClass().isInitialized()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "the method's class is not initialized"); + failureMessage = "the method's class is not initialized"; } else if (!method.canBeInlined()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it is marked non-inlinable"); + failureMessage = "it is marked non-inlinable"; } else if (data.countRecursiveInlining(method) > MaximumRecursiveInlining.getValue()) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "it exceeds the maximum recursive inlining depth"); + failureMessage = "it exceeds the maximum recursive inlining depth"; } else if (new OptimisticOptimizations(method.getProfilingInfo()).lessOptimisticThan(optimisticOpts)) { - return logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, "the callee uses less optimistic optimizations than caller"); + failureMessage = "the callee uses less optimistic optimizations than caller"; + } + if (failureMessage == null) { + return true; } else { - return true; + logNotInlinedMethodAndReturnFalse(invoke, data.inliningDepth(), method, failureMessage); + return false; } }