llvmpipe: code to dump bytecode to file (disabled)
authorBrian Paul <brianp@vmware.com>
Thu, 14 Oct 2010 22:31:54 +0000 (16:31 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 14 Oct 2010 23:28:24 +0000 (17:28 -0600)
src/gallium/drivers/llvmpipe/lp_state_fs.c

index 6e3c27e78e95170781fbf4781e86e7255d7d668c..d2fbe27708347502f515fd1bbc20b3cf20e406bf 100644 (file)
@@ -99,6 +99,7 @@
 
 
 #include <llvm-c/Analysis.h>
+#include <llvm-c/BitWriter.h>
 
 
 static unsigned fs_no = 0;
@@ -778,6 +779,11 @@ generate_fragment(struct llvmpipe_context *lp,
       debug_printf("\n");
    }
 
+   /* Dump byte code to a file */
+   if (0) {
+      LLVMWriteBitcodeToFile(lp_build_module, "llvmpipe.bc");
+   }
+
    /*
     * Translate the LLVM IR into machine code.
     */