diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-10-25 12:14:07 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-10-26 14:59:38 -0400 |
commit | 61d998c966d10e7a44b06d378c54b5f21ad69b53 (patch) | |
tree | 443b8b5b299fa567fb8dd42941b2ef4fc5a52c95 | |
parent | e4f6f0ec02133e9297c3f2db787dee14bf0ae6e1 (diff) | |
download | external_mesa3d-61d998c966d10e7a44b06d378c54b5f21ad69b53.zip external_mesa3d-61d998c966d10e7a44b06d378c54b5f21ad69b53.tar.gz external_mesa3d-61d998c966d10e7a44b06d378c54b5f21ad69b53.tar.bz2 |
Make ret part of the instruction block instead of implicitely
closing at the end of parsing.
-rw-r--r-- | src/mesa/pipe/llvm/instructions.cpp | 5 | ||||
-rw-r--r-- | src/mesa/pipe/llvm/instructions.h | 1 | ||||
-rw-r--r-- | src/mesa/pipe/llvm/llvmtgsi.cpp | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/pipe/llvm/instructions.cpp b/src/mesa/pipe/llvm/instructions.cpp index 5b54af8..3fca522 100644 --- a/src/mesa/pipe/llvm/instructions.cpp +++ b/src/mesa/pipe/llvm/instructions.cpp @@ -1080,3 +1080,8 @@ llvm::Value * Instructions::trunc(llvm::Value *in) return vectorFromVals(fx, fy, fz, fw); } +void Instructions::end() +{ + new ReturnInst(m_block); +} + diff --git a/src/mesa/pipe/llvm/instructions.h b/src/mesa/pipe/llvm/instructions.h index 29ae168..82d871d 100644 --- a/src/mesa/pipe/llvm/instructions.h +++ b/src/mesa/pipe/llvm/instructions.h @@ -64,6 +64,7 @@ public: void elseop(); void endif(); void endLoop(); + void end(); llvm::Value *ex2(llvm::Value *in); llvm::Value *floor(llvm::Value *in); llvm::Value *frc(llvm::Value *in); diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/llvmtgsi.cpp index 6eae46d..b1175d7 100644 --- a/src/mesa/pipe/llvm/llvmtgsi.cpp +++ b/src/mesa/pipe/llvm/llvmtgsi.cpp @@ -595,6 +595,7 @@ translate_instruction(llvm::Module *module, case TGSI_OPCODE_KIL: break; case TGSI_OPCODE_END: + instr->end(); return; break; default: @@ -696,8 +697,6 @@ tgsi_to_llvm(struct gallivm_prog *prog, const struct tgsi_token *tokens) } } - new ReturnInst(instr.currentBlock()); - tgsi_parse_free(&parse); prog->num_consts = storage.numConsts(); |