Yabin Hu
2012-May-15 06:40 UTC
[LLVMdev] NVPTX: why ret instruction is not translated to exit in kernel function?
Hi Justin, In the PTX backend, "ret" instruction at the end of a ptx_kernel function is translated to "exit" instruction. A test case named exit.ll demos this. But in the NVPTX backend, it seems that you didn't do such a translation. Why do you choose this? Is this due to the changes of the NVIDA PTX itself? Thanks, Yabin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120515/505f679b/attachment.html>
Justin Holewinski
2012-May-15 14:02 UTC
[LLVMdev] NVPTX: why ret instruction is not translated to exit in kernel function?
> -----Original Message----- > From: Yabin Hu [mailto:yabin.hwu at gmail.com] > Sent: Monday, May 14, 2012 11:40 PM > To: LLVM Developers Mailing List; Justin Holewinski > Subject: NVPTX: why ret instruction is not translated to exit in kernel > function? > > Hi Justin, > > In the PTX backend, "ret" instruction at the end of a ptx_kernel function is > translated to "exit" instruction. A test case named exit.ll demos this. > But in the NVPTX backend, it seems that you didn't do such a translation. > Why do you choose this? Is this due to the changes of the NVIDA PTX itself?Either way is valid. From the PTX spec: A return instruction executed in a top-level entry routine will terminate thread execution.> > Thanks, > > Yabin----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
Possibly Parallel Threads
- [LLVMdev] GSoC 2012 Proposal: Automatic GPGPU code generation for llvm
- [LLVMdev] GSoC 2012 Proposal: Automatic GPGPU code generation for llvm
- [LLVMdev] PTX backend do not support sitofp instruction?
- [LLVMdev] [PATCH][RFC] Add llvm.codegen Intrinsic To Support Embedded LLVM IR Code Generation
- [LLVMdev] NVPTX annotation metadata emission