summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-10-25 07:52:59 -0400
committerZack Rusin <[email protected]>2007-10-25 09:04:41 -0400
commit1d26e9c447fd9746b2219edbf65b1991521bcfe7 (patch)
treeb590bb2bbbe9ce240c55981a9ed559d407cc4055 /src
parente842b5e5ba738cd214137cca95c6da64492f9f92 (diff)
Fix nested conditionals
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/llvm/storage.cpp9
-rw-r--r--src/mesa/pipe/llvm/storage.h5
2 files changed, 2 insertions, 12 deletions
diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp
index 603053c0e8f..10729171989 100644
--- a/src/mesa/pipe/llvm/storage.cpp
+++ b/src/mesa/pipe/llvm/storage.cpp
@@ -123,9 +123,6 @@ llvm::ConstantInt *Storage::constantInt(int idx)
llvm::Value *Storage::inputElement(int idx, llvm::Value *indIdx)
{
- if (!indIdx && m_inputs.find(idx) != m_inputs.end()) {
- return m_inputs[idx];
- }
GetElementPtrInst *getElem = 0;
if (indIdx) {
@@ -147,7 +144,6 @@ llvm::Value *Storage::inputElement(int idx, llvm::Value *indIdx)
LoadInst *load = new LoadInst(getElem, name("input"),
false, m_block);
load->setAlignment(8);
- m_inputs[idx] = load;
return load;
}
@@ -155,9 +151,6 @@ llvm::Value *Storage::inputElement(int idx, llvm::Value *indIdx)
llvm::Value *Storage::constElement(int idx, llvm::Value *indIdx)
{
m_numConsts = ((idx + 1) > m_numConsts) ? (idx + 1) : m_numConsts;
- if (!indIdx && m_consts.find(idx) != m_consts.end()) {
- return m_consts[idx];
- }
GetElementPtrInst *getElem = 0;
@@ -178,7 +171,6 @@ llvm::Value *Storage::constElement(int idx, llvm::Value *indIdx)
LoadInst *load = new LoadInst(getElem, name("const"),
false, m_block);
load->setAlignment(8);
- m_consts[idx] = load;
return load;
}
@@ -334,7 +326,6 @@ llvm::Value * Storage::outputElement(int idx, llvm::Value *indIdx )
LoadInst *load = new LoadInst(getElem, name("output"),
false, m_block);
load->setAlignment(8);
- m_inputs[idx] = load;
return load;
}
diff --git a/src/mesa/pipe/llvm/storage.h b/src/mesa/pipe/llvm/storage.h
index dd5de35073c..a844d1c30f6 100644
--- a/src/mesa/pipe/llvm/storage.h
+++ b/src/mesa/pipe/llvm/storage.h
@@ -47,7 +47,6 @@ namespace llvm {
class Storage
{
- typedef std::map<int, llvm::LoadInst*> LoadMap;
public:
Storage(llvm::BasicBlock *block,
llvm::Value *out,
@@ -75,9 +74,11 @@ public:
void store(int dstIdx, llvm::Value *val, int mask);
int numConsts() const;
+
private:
llvm::Value *maskWrite(llvm::Value *src, int mask, llvm::Value *templ);
const char *name(const char *prefix);
+
private:
llvm::BasicBlock *m_block;
llvm::Value *m_OUT;
@@ -89,8 +90,6 @@ private:
std::vector<llvm::Value*> m_temps;
std::vector<llvm::Value*> m_addrs;
std::vector<llvm::Value*> m_dstCache;
- LoadMap m_inputs;
- LoadMap m_consts;
llvm::VectorType *m_floatVecType;
llvm::VectorType *m_intVecType;