[LLVMdev] NVPTX: why ret instruction is not translated to exit in kernel function?
Justin Holewinski
jholewinski at nvidia.com
Tue May 15 07:02:56 PDT 2012
> -----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.
-----------------------------------------------------------------------------------
More information about the llvm-dev
mailing list