Mercurial > hg > truffle
changeset 13738:b9c5875e3a36
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 24 Jan 2014 00:33:56 +0100 |
parents | 3424bc098ca0 (diff) 64fa70319890 (current diff) |
children | ac1e626432f9 |
files | graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/debug/DebugNodes.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/MethodLocal.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyBreakAfterLineProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyBreakAfterLocalProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyBreakBeforeLineProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyCallProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyDebugManager.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyLineProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyLocalProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyProcAfterLineProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyProcAfterLocalProbe.java graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/debug/RubyProcBeforeLineProbe.java graal/com.oracle.truffle.ruby.test/src/com/oracle/truffle/ruby/test/debug/DebugTests.java |
diffstat | 1 files changed, 1 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILCompilationResult.java Wed Jan 22 21:34:00 2014 -0800 +++ b/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILCompilationResult.java Fri Jan 24 00:33:56 2014 +0100 @@ -96,33 +96,6 @@ return getHSAILCompilationResult(graph); } - /** - * HSAIL doesn't have a calling convention as such. Function arguments are actually passed in - * memory but then loaded into registers in the function body. This routine makes sure that - * arguments to a kernel or function are loaded (by the kernel or function body) into registers - * of the appropriate sizes. For example, int and float parameters should appear in S registers, - * whereas double and long parameters should appear in d registers. - */ - public static CallingConvention getHSAILCallingConvention(CallingConvention.Type type, TargetDescription target, ResolvedJavaMethod method, boolean stackOnly) { - Signature sig = method.getSignature(); - JavaType retType = sig.getReturnType(null); - int sigCount = sig.getParameterCount(false); - JavaType[] argTypes; - int argIndex = 0; - if (!Modifier.isStatic(method.getModifiers())) { - argTypes = new JavaType[sigCount + 1]; - argTypes[argIndex++] = method.getDeclaringClass(); - } else { - argTypes = new JavaType[sigCount]; - } - for (int i = 0; i < sigCount; i++) { - argTypes[argIndex++] = sig.getParameterType(i, null); - } - - RegisterConfig registerConfig = backend.getProviders().getCodeCache().getRegisterConfig(); - return registerConfig.getCallingConvention(type, retType, argTypes, target, stackOnly); - } - public static HSAILCompilationResult getCompiledLambda(Class consumerClass) { /** * Find the accept() method in the IntConsumer, then use Graal API to find the target lambda @@ -168,7 +141,7 @@ PhaseSuite<HighTierContext> graphBuilderSuite = backend.getSuites().getDefaultGraphBuilderSuite().copy(); graphBuilderSuite.appendPhase(new HSAILPhase()); new HSAILPhase().apply(graph); - CallingConvention cc = getHSAILCallingConvention(Type.JavaCallee, target, graph.method(), false); + CallingConvention cc = CodeUtil.getCallingConvention(providers.getCodeCache(), Type.JavaCallee, graph.method(), false); SuitesProvider suitesProvider = backend.getSuites(); try { HSAILCompilationResult compResult = compileGraph(graph, cc, graph.method(), providers, backend, target, null, graphBuilderSuite, OptimisticOptimizations.NONE, getProfilingInfo(graph),