diff options
author | Zack Rusin <zack@pixel.(none)> | 2008-03-01 08:04:21 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2008-03-01 15:28:00 -0500 |
commit | e884c7ed9a14aabaa86f6710c594d20812ed11d9 (patch) | |
tree | adc183000e92d518f6db34fe18dc41e54363c8ac /src/gallium/auxiliary/gallivm/instructionssoa.h | |
parent | 07d6347e8a51fc7bbd5c586a5739f17c68c5eafd (diff) |
start implementing start of bultins
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructionssoa.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/instructionssoa.h | 14 |
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]; |