Antony Yu
2013-Jun-25 15:09 UTC
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Oops! No need of Call Graph! In fact, what I want to do is to find which function is the kernel function and which function is called by that kernel. Since OpenCL will make all functions called by kernels inline, I can use function attribute: Noinline to distinguish them. Sorry for bothering you. Antony Yu -- View this message in context: http://llvm.1065342.n5.nabble.com/About-writing-a-modulePass-in-addPreEmitPass-for-NVPTX-tp58701p58839.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Justin Holewinski
2013-Jun-25 18:17 UTC
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
You shouldn't rely on that, its an implementation detail. Instead, you can trace back to the original Function object and check for kernel metadata. See http://llvm.org/docs/NVPTXUsage.html#marking-functions-as-kernels On Tue, Jun 25, 2013 at 11:09 AM, Antony Yu <swpenim at gmail.com> wrote:> Oops! No need of Call Graph! > In fact, what I want to do is to find which function is the kernel function > and which function is called by that kernel. Since OpenCL will make all > functions called by kernels inline, I can use function attribute: Noinline > to distinguish them. > > Sorry for bothering you. > > Antony Yu > > > > -- > View this message in context: > http://llvm.1065342.n5.nabble.com/About-writing-a-modulePass-in-addPreEmitPass-for-NVPTX-tp58701p58839.html > Sent from the LLVM - Dev mailing list archive at Nabble.com. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Thanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130625/515a0812/attachment.html>
Antony Yu
2013-Jun-26 12:18 UTC
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Nice! It's really helpful. I will study on that. Thanks. Antony Yu -- View this message in context: http://llvm.1065342.n5.nabble.com/About-writing-a-modulePass-in-addPreEmitPass-for-NVPTX-tp58701p58874.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Reasonably Related Threads
- [LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
- [LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
- [LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
- [LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
- [LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX