diff options
author | Stephane Marchesin <[email protected]> | 2008-10-30 23:52:59 +0100 |
---|---|---|
committer | Stephane Marchesin <[email protected]> | 2008-10-30 23:52:59 +0100 |
commit | b81a7dc2d8ba09b48d5022cf9ff65f2fad890e11 (patch) | |
tree | 444d58c24409b214f2048458a84e62e88360090e /src/gallium/auxiliary/gallivm/storagesoa.h | |
parent | 443e102fdc8084dd2c73549c83de10524eb94b31 (diff) |
gallivm: replace the temp parameters of the JIT function with alloca'ed temps. This avoids useless writes of temporary results.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/storagesoa.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/storagesoa.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/storagesoa.h b/src/gallium/auxiliary/gallivm/storagesoa.h index f21ca6ec433..56886f85e7a 100644 --- a/src/gallium/auxiliary/gallivm/storagesoa.h +++ b/src/gallium/auxiliary/gallivm/storagesoa.h @@ -52,14 +52,13 @@ public: StorageSoa(llvm::BasicBlock *block, llvm::Value *input, llvm::Value *output, - llvm::Value *consts, - llvm::Value *temps); + llvm::Value *consts); std::vector<llvm::Value*> load(enum tgsi_file_type type, int idx, int swizzle, llvm::IRBuilder<>* m_builder, llvm::Value *indIdx =0); void store(enum tgsi_file_type type, int idx, const std::vector<llvm::Value*> &val, - int mask); + int mask, llvm::IRBuilder<>* m_builder); void addImmediate(float *vec); void declareImmediates(); @@ -84,7 +83,7 @@ private: llvm::Value* unpackConstElement(llvm::IRBuilder<>* m_builder, llvm::Value *indIdx, int cc); std::vector<llvm::Value*> constElement(llvm::IRBuilder<>* m_builder, llvm::Value *indIdx); std::vector<llvm::Value*> outputElement(llvm::Value *indIdx); - std::vector<llvm::Value*> tempElement(llvm::Value *indIdx); + std::vector<llvm::Value*> tempElement(llvm::IRBuilder<>* m_builder, int idx); std::vector<llvm::Value*> immediateElement(llvm::Value *indIdx); private: llvm::BasicBlock *m_block; @@ -92,12 +91,13 @@ private: llvm::Value *m_input; llvm::Value *m_output; llvm::Value *m_consts; - llvm::Value *m_temps; + std::map<int, llvm::Value*> m_temps; llvm::GlobalVariable *m_immediates; std::map<int, llvm::Value*> m_addresses; std::vector<std::vector<float> > m_immediatesToFlush; + llvm::Value * allocaTemp(llvm::IRBuilder<>* m_builder); mutable std::map<int, llvm::ConstantInt*> m_constInts; mutable char m_name[32]; |