diff options
author | Zack Rusin <[email protected]> | 2007-11-05 13:41:56 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2007-12-11 09:48:13 -0500 |
commit | 8681deddd7a7e749adaf43c7df4313ea54922e62 (patch) | |
tree | 8b67c83fd0819b73c8c4842929a833292a8ceefd /src/mesa/pipe/llvm/instructions.cpp | |
parent | c3af68dc5022715cc8f126b7df12f3f5248aefe7 (diff) |
Rewrite argument passing to prepare for handling of the kil instruction.
Pass the inputs/outputs pointer in the structure instead of infinitely
expanding arguments to the functions.
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/instructions.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/mesa/pipe/llvm/instructions.cpp b/src/mesa/pipe/llvm/instructions.cpp index 232dd9cd5de..7a70aec8781 100644 --- a/src/mesa/pipe/llvm/instructions.cpp +++ b/src/mesa/pipe/llvm/instructions.cpp @@ -732,14 +732,10 @@ void Instructions::end() m_builder.CreateRetVoid(); } -void Instructions::cal(int label, llvm::Value *out, llvm::Value *in, - llvm::Value *cst, llvm::Value *temp) +void Instructions::cal(int label, llvm::Value *input) { std::vector<Value*> params; - params.push_back(out); - params.push_back(in); - params.push_back(cst); - params.push_back(temp); + params.push_back(input); llvm::Function *func = findFunction(label); m_builder.CreateCall(func, params.begin(), params.end()); @@ -773,15 +769,9 @@ void Instructions::bgnSub(unsigned label) llvm::Function *func = findFunction(label); Function::arg_iterator args = func->arg_begin(); - Value *ptr_OUT = args++; - ptr_OUT->setName("OUT"); - Value *ptr_IN = args++; - ptr_IN->setName("IN"); - Value *ptr_CONST = args++; - ptr_CONST->setName("CONST"); - Value *ptr_TEMP = args++; - ptr_TEMP->setName("TEMP"); - m_storage->pushArguments(ptr_OUT, ptr_IN, ptr_CONST, ptr_TEMP); + Value *ptr_INPUT = args++; + ptr_INPUT->setName("INPUT"); + m_storage->pushArguments(ptr_INPUT); llvm::BasicBlock *entry = new BasicBlock("entry", func, 0); |