summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/instructionssoa.h
diff options
context:
space:
mode:
authorZack Rusin <zack@pixel.(none)>2008-03-01 08:04:21 -0500
committerZack Rusin <[email protected]>2008-03-01 15:28:00 -0500
commite884c7ed9a14aabaa86f6710c594d20812ed11d9 (patch)
treeadc183000e92d518f6db34fe18dc41e54363c8ac /src/gallium/auxiliary/gallivm/instructionssoa.h
parent07d6347e8a51fc7bbd5c586a5739f17c68c5eafd (diff)
start implementing start of bultins
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructionssoa.h')
-rw-r--r--src/gallium/auxiliary/gallivm/instructionssoa.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructionssoa.h b/src/gallium/auxiliary/gallivm/instructionssoa.h
index 4169dcbb2eb..5c26687150e 100644
--- a/src/gallium/auxiliary/gallivm/instructionssoa.h
+++ b/src/gallium/auxiliary/gallivm/instructionssoa.h
@@ -30,6 +30,7 @@
#include <llvm/Support/LLVMBuilder.h>
+#include <map>
#include <vector>
namespace llvm {
@@ -47,9 +48,10 @@ public:
llvm::BasicBlock *block, StorageSoa *storage);
std::vector<llvm::Value*> arl(const std::vector<llvm::Value*> in);
-
std::vector<llvm::Value*> add(const std::vector<llvm::Value*> in1,
const std::vector<llvm::Value*> in2);
+ std::vector<llvm::Value*> dp3(const std::vector<llvm::Value*> in1,
+ const std::vector<llvm::Value*> in2);
std::vector<llvm::Value*> madd(const std::vector<llvm::Value*> in1,
const std::vector<llvm::Value*> in2,
const std::vector<llvm::Value*> in3);
@@ -62,9 +64,19 @@ private:
const char * name(const char *prefix) const;
llvm::Value *vectorFromVals(llvm::Value *x, llvm::Value *y,
llvm::Value *z, llvm::Value *w);
+ void createFunctionMap();
+ void createBuiltins();
+ llvm::Function *function(int);
+ llvm::Module *currentModule() const;
+ llvm::Value *allocaTemp();
private:
llvm::LLVMFoldingBuilder m_builder;
StorageSoa *m_storage;
+
+ std::map<int, std::string> m_functionsMap;
+ std::map<int, llvm::Function*> m_functions;
+ llvm::Module *m_builtins;
+
private:
mutable int m_idx;
mutable char m_name[32];