diff options
author | José Fonseca <[email protected]> | 2010-04-06 22:37:08 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-04-06 22:52:33 +0100 |
commit | 306835cc0fbdd7bf46b8c703f6659d1431f86ff9 (patch) | |
tree | a2126aac3f8cb6de2ae9a7a924c1909fe7c1902f /src/gallium/drivers/llvmpipe/lp_jit.c | |
parent | 859642c655b149a1321f214e6a731eb1ea991dc7 (diff) |
gallivm: Move the global LLVM objects (module, engine, provider, target) into here.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_jit.c | 17 |
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 927e472ff26..2f804bb11c2 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); |