[llvm] r181207 - [SystemZ] Set up JIT/MCJIT test cases
Ulrich Weigand
ulrich.weigand at de.ibm.com
Mon May 6 09:21:51 PDT 2013
Author: uweigand
Date: Mon May 6 11:21:50 2013
New Revision: 181207
URL: http://llvm.org/viewvc/llvm-project?rev=181207&view=rev
Log:
[SystemZ] Set up JIT/MCJIT test cases
This patch adds the necessary configuration bits and #ifdef's to set up
the JIT/MCJIT test cases for SystemZ. Like other recent targets, we do
fully support MCJIT, but do not support the old JIT at all. Set up the
lit config files accordingly, and disable old-JIT unit tests.
Patch by Richard Sandiford.
Modified:
llvm/trunk/test/ExecutionEngine/MCJIT/lit.local.cfg
llvm/trunk/test/ExecutionEngine/lit.local.cfg
llvm/trunk/test/lit.cfg
llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
llvm/trunk/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/lit.local.cfg?rev=181207&r1=181206&r2=181207&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/lit.local.cfg (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/lit.local.cfg Mon May 6 11:21:50 2013
@@ -9,13 +9,13 @@ root = getRoot(config)
targets = set(root.targets_to_build.split())
if ('X86' in targets) | ('AArch64' in targets) | ('ARM' in targets) | \
- ('Mips' in targets) | ('PowerPC' in targets):
+ ('Mips' in targets) | ('PowerPC' in targets) | ('SystemZ' in targets):
config.unsupported = False
else:
config.unsupported = True
if root.host_arch not in ['i386', 'x86', 'x86_64',
- 'AArch64', 'ARM', 'Mips', 'PowerPC']:
+ 'AArch64', 'ARM', 'Mips', 'PowerPC', 'SystemZ']:
config.unsupported = True
if 'i386-apple-darwin' in root.target_triple:
Modified: llvm/trunk/test/ExecutionEngine/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/lit.local.cfg?rev=181207&r1=181206&r2=181207&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/lit.local.cfg (original)
+++ llvm/trunk/test/ExecutionEngine/lit.local.cfg Mon May 6 11:21:50 2013
@@ -7,7 +7,7 @@ def getRoot(config):
root = getRoot(config)
-if root.host_arch in ['PowerPC', 'AArch64']:
+if root.host_arch in ['PowerPC', 'AArch64', 'SystemZ']:
config.unsupported = True
if 'hexagon' in root.target_triple:
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=181207&r1=181206&r2=181207&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Mon May 6 11:21:50 2013
@@ -160,7 +160,8 @@ config.substitutions.append( ('%lli_mcji
# but simply want use the currently considered most reliable jit for platform
# FIXME: ppc32 is not ready for mcjit.
if 'arm' in config.target_triple \
- or 'powerpc64' in config.target_triple:
+ or 'powerpc64' in config.target_triple \
+ or 's390x' in config.target_triple:
defaultIsMCJIT = 'true'
else:
defaultIsMCJIT = 'false'
Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp?rev=181207&r1=181206&r2=181207&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp Mon May 6 11:21:50 2013
@@ -74,6 +74,8 @@ class JITEventListenerTest : public test
const OwningPtr<ExecutionEngine> EE;
};
+// Tests on SystemZ disabled as we're running the old JIT
+#if !defined(__s390__)
Function *buildFunction(Module *M) {
Function *Result = Function::Create(
TypeBuilder<int32_t(int32_t), false>::get(getGlobalContext()),
@@ -224,6 +226,7 @@ TEST_F(JITEventListenerTest, MatchesMach
EXPECT_EQ(1U, Listener.FreedEvents[0].Index);
EXPECT_EQ(F_addr, Listener.FreedEvents[0].Code);
}
+#endif
class JITEnvironment : public testing::Environment {
virtual void SetUp() {
Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=181207&r1=181206&r2=181207&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Mon May 6 11:21:50 2013
@@ -35,8 +35,8 @@ using namespace llvm;
namespace {
-// Tests on ARM and PowerPC disabled as we're running the old jit
-#if !defined(__arm__) && !defined(__powerpc__)
+// Tests on ARM, PowerPC and SystemZ disabled as we're running the old jit
+#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
std::vector<Type*> params;
@@ -826,7 +826,7 @@ TEST(LazyLoadedJITTest, EagerCompiledRec
(intptr_t)TheJIT->getPointerToFunction(recur1IR));
EXPECT_EQ(3, recur1(4));
}
-#endif // !defined(__arm__) && !defined(__powerpc__)
+#endif // !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
// This code is copied from JITEventListenerTest, but it only runs once for all
// the tests in this directory. Everything seems fine, but that's strange
Modified: llvm/trunk/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/MultiJITTest.cpp?rev=181207&r1=181206&r2=181207&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/MultiJITTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/MultiJITTest.cpp Mon May 6 11:21:50 2013
@@ -20,8 +20,8 @@ using namespace llvm;
namespace {
-// ARM and PowerPC tests disabled pending fix for PR10783.
-#if !defined(__arm__) && !defined(__powerpc__)
+// ARM, PowerPC and SystemZ tests disabled pending fix for PR10783.
+#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
bool LoadAssemblyInto(Module *M, const char *assembly) {
SMDiagnostic Error;
@@ -176,6 +176,6 @@ TEST(MultiJitTest, JitPool) {
#endif
EXPECT_TRUE(sa == fa);
}
-#endif // !defined(__arm__) && !defined(__powerpc__)
+#endif // !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
} // anonymous namespace
More information about the llvm-commits
mailing list