summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_test_conv.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-07-29 12:49:12 -0600
committerBrian Paul <brianp@vmware.com>2010-07-29 12:51:45 -0600
commitd05cb9f0187984e461b41eb1ba6ca2adf0593c74 (patch)
tree0be1dde26a25e4d9e00ea7836a8ecdcb64fc9374 /src/gallium/drivers/llvmpipe/lp_test_conv.c
parent8f3fe7e2f0a3ce1a5c45fd204b0105f3b501e641 (diff)
llvmpipe: don't call LLVMCreateJITCompiler() twice
Fixes a failed assertion with LLVM 2.6: <unnamed>::JITResolver::JITResolver(llvm::JIT&): Assertion `TheJITResolver == 0&& "Multiple JIT resolvers?"' failed. Though, not everyone seems to experience this problem.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_conv.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_conv.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c
index cf41b40581..3ba42bf11a 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_conv.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c
@@ -35,6 +35,7 @@
#include "util/u_pointer.h"
+#include "gallivm/lp_bld_init.h"
#include "gallivm/lp_bld_type.h"
#include "gallivm/lp_bld_const.h"
#include "gallivm/lp_bld_conv.h"
@@ -152,8 +153,7 @@ test_one(unsigned verbose,
{
LLVMModuleRef module = NULL;
LLVMValueRef func = NULL;
- LLVMExecutionEngineRef engine = NULL;
- LLVMModuleProviderRef provider = NULL;
+ LLVMExecutionEngineRef engine = lp_build_engine;
LLVMPassManagerRef pass = NULL;
char *error = NULL;
conv_test_ptr_t conv_test_ptr;
@@ -203,15 +203,6 @@ test_one(unsigned verbose,
}
LLVMDisposeMessage(error);
- provider = LLVMCreateModuleProviderForExistingModule(module);
- if (LLVMCreateJITCompiler(&engine, provider, 1, &error)) {
- if(verbose < 1)
- dump_conv_types(stderr, src_type, dst_type);
- fprintf(stderr, "%s\n", error);
- LLVMDisposeMessage(error);
- abort();
- }
-
#if 0
pass = LLVMCreatePassManager();
LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), pass);
@@ -351,7 +342,6 @@ test_one(unsigned verbose,
LLVMFreeMachineCodeForFunction(engine, func);
- LLVMDisposeExecutionEngine(engine);
if(pass)
LLVMDisposePassManager(pass);