summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/storagesoa.h
diff options
context:
space:
mode:
authorStephane Marchesin <[email protected]>2008-10-30 23:52:59 +0100
committerStephane Marchesin <[email protected]>2008-10-30 23:52:59 +0100
commitb81a7dc2d8ba09b48d5022cf9ff65f2fad890e11 (patch)
tree444d58c24409b214f2048458a84e62e88360090e /src/gallium/auxiliary/gallivm/storagesoa.h
parent443e102fdc8084dd2c73549c83de10524eb94b31 (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.h10
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];