summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-05-12 20:04:11 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-12 20:18:32 +0100
commit5326e1846dbe0a37dff7f411a3d76ba91dc8d37c (patch)
treedd62ad1ca9ea37ea28f08eabc99bc009716a5b5f
parent53cbb81576671d6d39e6a353e79ebda2c512d735 (diff)
llvmpipe: Enable mem2reg pass even with LP_DEBUG=nopt.
Otherwise things start crashing.
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index b10ee7a463..243aea6c3a 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -195,6 +195,11 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
LLVMAddInstructionCombiningPass(screen->pass);
}
LLVMAddGVNPass(screen->pass);
+ } else {
+ /* We need at least this pass to prevent the backends to fail in
+ * unexpected ways.
+ */
+ LLVMAddPromoteMemoryToRegisterPass(screen->pass);
}
lp_jit_init_globals(screen);