On Thu, Nov 22, 2012 at 11:24 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On Nov 19, 2012, at 1:49 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br><blockquote type="cite">
<br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Querying<br>
--------<br>
<br>
The attributes are attached to the function. It's therefore trivial to access<br>
the attributes within the middle- and the back-ends. Here's an example of how<br>
attributes are queried:<br></blockquote><div><br></div><div>Just had a thought, what about compile options that change alignment/layout/section placement of globals etc? For example the -G <num> option in gcc that the mips guys will want to support some day (there are probably better options but this was the first the came to mind).</div>
</div></div></blockquote><div><br></div></div><div>All of those can be directly represented in LLVM IR today, but if there were a good reason to, I can see extending attributes to work on globals someday.</div></div></div>
</blockquote><div><br></div><div>I'm a bit worried about this creating an arbitrary line between annotations that are defined as attributes and annotations that are first-class keywords in the IR language.  It may become a source of confusion for people.  If attributes are only applied to functions, the obvious questions for users is "why do I need to do things differently for functions vs. globals?"  I'm not saying it's a big issue, but it does seem a bit inconsistent.  If we're implementing these attributes anyway, why not unify the handling of annotations on functions and global variables?</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class="HOEnZb"><font color="#888888"><div><br></div>
<div>-Chris</div><div><br></div></font></span></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">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><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>
</div>