summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/instructionssoa.h
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2008-03-12 22:51:57 -0400
committerZack Rusin <[email protected]>2008-03-12 22:57:52 -0400
commitcac037d36d451e8cafbb4a759d0edf9fa8b1ca81 (patch)
tree5f4aa06ba9f1fa8c6091d9c164d217a245d06430 /src/gallium/auxiliary/gallivm/instructionssoa.h
parent2366bb1baf2e9ae5b6ecf19f66ae9e0a4b0d2f36 (diff)
add code handling dependencies between generated code
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructionssoa.h')
-rw-r--r--src/gallium/auxiliary/gallivm/instructionssoa.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructionssoa.h b/src/gallium/auxiliary/gallivm/instructionssoa.h
index 3ef51dcaff7..b9104ea286d 100644
--- a/src/gallium/auxiliary/gallivm/instructionssoa.h
+++ b/src/gallium/auxiliary/gallivm/instructionssoa.h
@@ -28,6 +28,7 @@
#ifndef INSTRUCTIONSSOA_H
#define INSTRUCTIONSSOA_H
+#include <pipe/p_shader_tokens.h>
#include <llvm/Support/LLVMBuilder.h>
#include <map>
@@ -59,6 +60,8 @@ public:
const std::vector<llvm::Value*> in3);
std::vector<llvm::Value*> mul(const std::vector<llvm::Value*> in1,
const std::vector<llvm::Value*> in2);
+ std::vector<llvm::Value*> pow(const std::vector<llvm::Value*> in1,
+ const std::vector<llvm::Value*> in2);
void end();
std::vector<llvm::Value*> extractVector(llvm::Value *vector);
@@ -68,6 +71,7 @@ private:
llvm::Value *z, llvm::Value *w);
void createFunctionMap();
void createBuiltins();
+ void createDependencies();
llvm::Function *function(int);
llvm::Module *currentModule() const;
llvm::Value *allocaTemp();
@@ -81,6 +85,7 @@ private:
const std::vector<llvm::Value*> in1,
const std::vector<llvm::Value*> in2,
const std::vector<llvm::Value*> in3);
+ void injectFunction(llvm::Function *originalFunc, int op = TGSI_OPCODE_LAST);
private:
llvm::LLVMFoldingBuilder m_builder;
StorageSoa *m_storage;
@@ -88,6 +93,7 @@ private:
std::map<int, std::string> m_functionsMap;
std::map<int, llvm::Function*> m_functions;
llvm::Module *m_builtins;
+ std::map<std::string, std::vector<std::string> > m_builtinDependencies;
private:
mutable int m_idx;