<div dir="ltr"><div><div>Thanks Mark,<br></div><br>I'm giving annotation attributes a shot right now: __attribute__((annotate("my_annotation"))) gets lowered to llvm.___annotation intrinsics and seems good for what I'm trying to do. I'll definitely look into the loop pragma as a backup though.<br>
<br></div>David<br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 2:31 PM, Mark Heffernan <span dir="ltr"><<a href="mailto:meheff@google.com" target="_blank">meheff@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">A number of new pragmas were added recently to clang to support loop optimization hints. The syntax is "#pragma clang loop ..." where "..." is a sequence of hints such as "unroll(4)". These hints result in llvm.loop metadata being added to the IR to annotate the loop. Depending upon what you're doing this may be a good model to follow.<div>
<br></div><div>Mark</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Jul 23, 2014 at 1:38 PM, David Glanzman <span dir="ltr"><<a href="mailto:gland@seas.upenn.edu" target="_blank">gland@seas.upenn.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>I'd like to add a custom #pragma directive in clang for research purposes. I'm familiar with the LLVM pass-writing interface but new to the rest of LLVM and clang. I've looked into Simone Pellegrini's work on a #pragma interface (<a href="https://github.com/motonacciu/clomp" target="_blank">https://github.com/motonacciu/clomp</a> and <a href="http://llvm.org/devmtg/2013-04/pellegrini-slides.pdf" target="_blank">http://llvm.org/devmtg/2013-04/pellegrini-slides.pdf</a>), but I'm in no position to determine if this approach is applicable for the latest version of clang, or how to go about updating things. Any advice would be greatly appreciated.<br>
<br></div><div>Thanks,<br></div><div>David<br></div></div>
<br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>