Mercurial > hg > graal-jvmci-8
changeset 7387:64f4195d0ecf
Merge.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Wed, 19 Dec 2012 10:01:08 +0100 |
parents | 707e9cca11de (diff) 346336325337 (current diff) |
children | 599ea4fcdb6d |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java |
diffstat | 5 files changed, 55 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/inlining/InliningTest.java Wed Dec 19 00:12:32 2012 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/inlining/InliningTest.java Wed Dec 19 10:01:08 2012 +0100 @@ -93,6 +93,8 @@ assertInlined(getGraph("invokeSingleImplementorInterfaceSnippet")); // assertInlined(getGraph("invokeConcreteInterfaceMethodSnippet")); + assertNotInlined(getGraph("invokeOverriddenPublicMethodSnippet")); + assertNotInlined(getGraph("invokeOverriddenProtectedMethodSnippet")); assertNotInlined(getGraph("invokeOverriddenInterfaceMethodSnippet")); } @@ -120,6 +122,14 @@ public static int invokeOverriddenInterfaceMethodSnippet(MultipleImplementorsInterface testInterface) { return testInterface.publicOverriddenMethod(); } + @SuppressWarnings("all") + public static int invokeOverriddenPublicMethodSnippet(SuperClass superClass) { + return superClass.publicOverriddenMethod(); + } + @SuppressWarnings("all") + public static int invokeOverriddenProtectedMethodSnippet(SuperClass superClass) { + return superClass.protectedOverriddenMethod(); + } private StructuredGraph getGraph(final String snippet) { return Debug.scope("InliningTest", new DebugDumpScope(snippet), new Callable<StructuredGraph>() {
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Wed Dec 19 00:12:32 2012 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Wed Dec 19 10:01:08 2012 +0100 @@ -799,7 +799,7 @@ ProfiledType ptype = types[i]; ResolvedJavaType type = ptype.getType(); assert !type.isInterface() && (type.isArray() || !Modifier.isAbstract(type.getModifiers())) : type; - if (holder.isAssignableFrom(type)) { + if (!GraalOptions.OptFilterProfiledTypes || holder.isAssignableFrom(type)) { result.add(ptype); } }
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java Wed Dec 19 00:12:32 2012 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java Wed Dec 19 10:01:08 2012 +0100 @@ -198,6 +198,7 @@ public static boolean OptFloatingReads = true; public static boolean OptTailDuplication = true; public static boolean OptEliminatePartiallyRedundantGuards = true; + public static boolean OptFilterProfiledTypes = true; // Intrinsification settings public static boolean IntrinsifyArrayCopy = true;
--- a/src/cpu/x86/vm/graalRuntime_x86.cpp Wed Dec 19 00:12:32 2012 +0100 +++ b/src/cpu/x86/vm/graalRuntime_x86.cpp Wed Dec 19 10:01:08 2012 +0100 @@ -188,25 +188,46 @@ int GraalStubAssembler::call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3, Register arg4) { #ifdef _LP64 - // if there is any conflict use the stack - if (arg1 == c_rarg2 || arg1 == c_rarg3 || arg1 == c_rarg4 || - arg2 == c_rarg1 || arg2 == c_rarg3 || arg2 == c_rarg4 || - arg3 == c_rarg1 || arg3 == c_rarg2 || arg3 == c_rarg4 || - arg4 == c_rarg1 || arg4 == c_rarg2 || arg4 == c_rarg3) { - push(arg4); - push(arg3); - push(arg2); - push(arg1); - pop(c_rarg1); - pop(c_rarg2); - pop(c_rarg3); - pop(c_rarg4); - } else { - mov(c_rarg1, arg1); - mov(c_rarg2, arg2); - mov(c_rarg3, arg3); - mov(c_rarg4, arg4); - } + #ifdef _WIN64 + // on windows we only have the registers c_rarg0 to c_rarg3 for transferring parameters -> remaining parameters are on the stack + if (arg1 == c_rarg2 || arg1 == c_rarg3 || + arg2 == c_rarg1 || arg2 == c_rarg3 || + arg3 == c_rarg1 || arg3 == c_rarg2 || + arg4 == c_rarg1 || arg4 == c_rarg2) { + push(arg4); + push(arg3); + push(arg2); + push(arg1); + pop(c_rarg1); + pop(c_rarg2); + pop(c_rarg3); + } else { + mov(c_rarg1, arg1); + mov(c_rarg2, arg2); + mov(c_rarg3, arg3); + push(arg4); + } + #else + // if there is any conflict use the stack + if (arg1 == c_rarg2 || arg1 == c_rarg3 || arg1 == c_rarg4 || + arg2 == c_rarg1 || arg2 == c_rarg3 || arg2 == c_rarg4 || + arg3 == c_rarg1 || arg3 == c_rarg2 || arg3 == c_rarg4 || + arg4 == c_rarg1 || arg4 == c_rarg2 || arg4 == c_rarg3) { + push(arg4); + push(arg3); + push(arg2); + push(arg1); + pop(c_rarg1); + pop(c_rarg2); + pop(c_rarg3); + pop(c_rarg4); + } else { + mov(c_rarg1, arg1); + mov(c_rarg2, arg2); + mov(c_rarg3, arg3); + mov(c_rarg4, arg4); + } + #endif #else push(arg4); push(arg3);
--- a/src/share/vm/graal/graalRuntime.cpp Wed Dec 19 00:12:32 2012 +0100 +++ b/src/share/vm/graal/graalRuntime.cpp Wed Dec 19 10:01:08 2012 +0100 @@ -588,11 +588,9 @@ JRT_ENTRY(jboolean, GraalRuntime::graal_thread_is_interrupted(JavaThread* thread, oop receiver, jboolean clear_interrupted)) // Ensure that the C++ Thread and OSThread structures aren't freed before we operate Handle receiverHandle(thread, receiver); - JRT_BLOCK - MutexLockerEx ml(thread->threadObj() == receiver ? NULL : Threads_lock); - JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle()); - return (jint) Thread::is_interrupted(receiverThread, clear_interrupted != 0); - JRT_BLOCK_END + MutexLockerEx ml(thread->threadObj() == receiver ? NULL : Threads_lock); + JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle()); + return (jint) Thread::is_interrupted(receiverThread, clear_interrupted != 0); JRT_END // JVM_InitializeGraalRuntime