summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/storage.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-10-21 11:16:01 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-10-24 11:21:04 -0400
commit6815a9af6c98934e3537507ccbf077d69a5d5320 (patch)
tree968a1c3d13c274cfb88c8edd4cf45ffa8ccd2310 /src/mesa/pipe/llvm/storage.cpp
parent3b772a277fe032c94654648d0671ff42fd3fdce6 (diff)
Cleanup some of the debugging output code
Diffstat (limited to 'src/mesa/pipe/llvm/storage.cpp')
-rw-r--r--src/mesa/pipe/llvm/storage.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp
index dc7c1f3928..ba78de8260 100644
--- a/src/mesa/pipe/llvm/storage.cpp
+++ b/src/mesa/pipe/llvm/storage.cpp
@@ -26,7 +26,6 @@ Storage::Storage(llvm::BasicBlock *block, llvm::Value *out,
m_undefFloatVec = UndefValue::get(m_floatVecType);
m_undefIntVec = UndefValue::get(m_intVecType);
- m_shuffleId = 0;
m_numConsts = 0;
}
@@ -88,15 +87,11 @@ llvm::Value *Storage::constElement(int idx)
if (m_consts.find(idx) != m_consts.end()) {
return m_consts[idx];
}
- char ptrName[13];
- char name[9];
- snprintf(ptrName, 13, "const_ptr%d", idx);
- snprintf(name, 9, "const%d", idx);
GetElementPtrInst *getElem = new GetElementPtrInst(m_CONST,
constantInt(idx),
- ptrName,
+ name("const_ptr"),
m_block);
- LoadInst *load = new LoadInst(getElem, name,
+ LoadInst *load = new LoadInst(getElem, name("const"),
false, m_block);
m_consts[idx] = load;
return load;
@@ -105,12 +100,9 @@ llvm::Value *Storage::constElement(int idx)
llvm::Value *Storage::shuffleVector(llvm::Value *vec, int shuffle)
{
Constant *mask = shuffleMask(shuffle);
- ++m_shuffleId;
- char name[11];
- snprintf(name, 11, "shuffle%d", m_shuffleId);
ShuffleVectorInst *res =
new ShuffleVectorInst(vec, m_undefFloatVec, mask,
- name, m_block);
+ name("shuffle"), m_block);
return res;
}