Commit: 09385dcda0e198d4f2e264065c345ae8b5388207
Author: Lukas Tönne
Date:   Wed May 25 11:58:09 2016 +0200
Branches: object_nodes
https://developer.blender.org/rB09385dcda0e198d4f2e264065c345ae8b5388207

Fix for uninitialized variable and removed some unused code.

===================================================================

M       source/blender/blenvm/llvm/llvm_compiler_dual.cc
M       source/blender/blenvm/llvm/llvm_engine.cc

===================================================================

diff --git a/source/blender/blenvm/llvm/llvm_compiler_dual.cc 
b/source/blender/blenvm/llvm/llvm_compiler_dual.cc
index 340f979..36eba7a 100644
--- a/source/blender/blenvm/llvm/llvm_compiler_dual.cc
+++ b/source/blender/blenvm/llvm/llvm_compiler_dual.cc
@@ -133,7 +133,7 @@ llvm::Function 
*LLVMTextureCompiler::declare_elementary_node_function(
 {
        using namespace llvm;
        
-       bool error;
+       bool error = false;
        
        std::vector<Type *> input_types, output_types;
        for (int i = 0; i < nodetype->num_inputs(); ++i) {
@@ -349,7 +349,7 @@ void 
LLVMTextureCompiler::define_dual_function_wrapper(llvm::Module *mod, const
                builder.CreateCall(deriv_func, call_args_dy);
        }
        else {
-               
+               /* TODO zero the derivatives */
        }
        
        builder.CreateRetVoid();
@@ -368,9 +368,6 @@ void LLVMTextureCompiler::define_nodes_module()
        
 #undef DEF_OPCODE
        
-       /* link base functions into the module */
-//     std::string error;
-//     Linker::LinkModules(mod, mod_basefuncs, 
Linker::LinkerMode::PreserveSource, &error);
        
 #define DEF_OPCODE(op) \
        define_dual_function_wrapper(mod, STRINGIFY(op));
@@ -379,9 +376,6 @@ void LLVMTextureCompiler::define_nodes_module()
        
 #undef DEF_OPCODE
        
-//     llvm_execution_engine()->addModule(mod_basefuncs);
-//     llvm_execution_engine()->addModule(mod);
-       
        m_nodes_module = mod;
 }
 
diff --git a/source/blender/blenvm/llvm/llvm_engine.cc 
b/source/blender/blenvm/llvm/llvm_engine.cc
index 7223f0c..ef275f0 100644
--- a/source/blender/blenvm/llvm/llvm_engine.cc
+++ b/source/blender/blenvm/llvm/llvm_engine.cc
@@ -122,7 +122,6 @@ static llvm::ExecutionEngine *create_execution_engine()
        builder.setEngineKind(EngineKind::JIT);
        builder.setUseMCJIT(true);
        builder.setErrorStr(&error);
-       builder.setCodeModel(CodeModel::Large);
        builder.setMCJITMemoryManager(new MemoryManager());
        
        ExecutionEngine *engine = builder.create();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to