From: José Fonseca Date: Wed, 12 May 2010 19:04:11 +0000 (+0100) Subject: llvmpipe: Enable mem2reg pass even with LP_DEBUG=nopt. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5326e1846dbe0a37dff7f411a3d76ba91dc8d37c;p=mesa.git llvmpipe: Enable mem2reg pass even with LP_DEBUG=nopt. Otherwise things start crashing. --- diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c index b10ee7a463a..243aea6c3a3 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);