Mesa (master): llvmpipe: Enable mem2reg pass even with LP_DEBUG=nopt.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed May 12 19:18:38 UTC 2010


Module: Mesa
Branch: master
Commit: 5326e1846dbe0a37dff7f411a3d76ba91dc8d37c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5326e1846dbe0a37dff7f411a3d76ba91dc8d37c

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed May 12 20:04:11 2010 +0100

llvmpipe: Enable mem2reg pass even with LP_DEBUG=nopt.

Otherwise things start crashing.

---

 src/gallium/drivers/llvmpipe/lp_jit.c |    5 +++++
 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 b10ee7a..243aea6 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);




More information about the mesa-commit mailing list