<div dir="ltr"><img width="0" height="0" class="mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/a8480ed7451e0a2947f334ffdd0594b7bf18f1d4.png?u=407906">I have attached all the files that I have changed. Along with that, there is matrix-mul.c in which I am using a pragma, but that metadata for that pragma is getting applied to all the loops in the loop nest (as can be seen from .ll file). <div><br></div><div>Any help would be great!</div><div><br></div><div>Thanks a lot in advance,</div><div><br></div><div>Best Regards,</div><div>Nitish</div><div><br><br><br>‌</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 13, 2017 at 2:23 PM, Nitish Srivastava <span dir="ltr"><<a href="mailto:nks45@cornell.edu" target="_blank">nks45@cornell.edu</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"><img width="0" height="0" class="m_1846683078927922599mailtrack-img" alt="" style="display:flex" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">Hi everyone,<div><br></div><div>  I wanted to assign a new pragma for loops in clang. Let's call it "#pragma XXX" which can be applied to any loop in the entire loop hierarchy. I added the support for my pragma by following the same steps as were being used in the default implementation of "unroll" pragma. </div><div><br></div><div>  But now, when I compile any program using clang to llvm IR it attaches the pragma related metadata to the loop as well as to all the loops nested inside it. I just want to add the metadata to that particular loop and not all the loops nested inside it. Can someone suggest what would be the right way of doing this? or rather what files should I look into. </div><div><br></div><div>  So far I have made changes in the following files:</div><div><br></div>1) include/clang/Basic/Attr.td<br>2) include/clang/Parse/Parser.h<br>3) lib/CodeGen/CGLoopInfo.cpp<br>4) lib/CodeGen/CGLoopInfo.h<br>5) lib/Parse/ParsePragma.cpp<br>6) lib/Sema/SemaStmtAttr.cpp<div><br></div><div>  Any help would be appreciated.</div><div><br></div><div>  Thanks,</div><div><br></div><div>Best Regards,</div><div>Nitish<br><div><br><br><br>‌</div></div></div>
</blockquote></div><br></div>