From 1f30efb7365075de0ae119a40ab70a16bc547670 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 6 Nov 2007 06:06:04 -0500 Subject: Implement kilp and make it work --- src/mesa/pipe/llvm/storage.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mesa/pipe/llvm/storage.cpp') diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp index 71045fa37f..c33b9bf45d 100644 --- a/src/mesa/pipe/llvm/storage.cpp +++ b/src/mesa/pipe/llvm/storage.cpp @@ -343,6 +343,20 @@ llvm::Value * Storage::element(Args arg, int idx, llvm::Value *indIdx ) return elemIdx(val, idx, indIdx); } +void Storage::setKilElement(llvm::Value *val) +{ + std::vector indices; + indices.push_back(constantInt(0)); + indices.push_back(constantInt(static_cast(KilArg))); + GetElementPtrInst *elem = new GetElementPtrInst(m_INPUT, + indices.begin(), + indices.end(), + name("kil_ptr"), + m_block); + StoreInst *st = new StoreInst(val, elem, false, m_block); + st->setAlignment(8); +} + #endif //MESA_LLVM -- cgit v1.2.3