summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_jit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index 927e472ff2..2f804bb11c 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -166,8 +166,6 @@ lp_jit_screen_cleanup(struct llvmpipe_screen *screen)
void
lp_jit_screen_init(struct llvmpipe_screen *screen)
{
- char *error = NULL;
-
util_cpu_detect();
#if 0
@@ -179,17 +177,10 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
lp_build_init();
- screen->module = LLVMModuleCreateWithName("llvmpipe");
-
- screen->provider = LLVMCreateModuleProviderForExistingModule(screen->module);
-
- if (LLVMCreateJITCompiler(&screen->engine, screen->provider, 1, &error)) {
- _debug_printf("%s\n", error);
- LLVMDisposeMessage(error);
- assert(0);
- }
-
- screen->target = LLVMGetExecutionEngineTargetData(screen->engine);
+ screen->module = lp_build_module;
+ screen->provider = lp_build_provider;
+ screen->engine = lp_build_engine;
+ screen->target = lp_build_target;
screen->pass = LLVMCreateFunctionPassManager(screen->provider);
LLVMAddTargetData(screen->target, screen->pass);