[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes

Chris Lattner clattner at apple.com
Tue Nov 13 10:40:18 PST 2012


On Nov 13, 2012, at 7:43 AM, Justin Holewinski <justin.holewinski at gmail.com> wrote:

> Couple of quick questions:
> 
> First, what are the valid types for <value>?  Are they always strings which the target must interpret, or will numeric literals and booleans also be supported?  Also, in the proposal, attributes are sometimes quoted and sometimes they are not.  I know this is nit-picking, but what is the preferred syntax?
> 
> Second, would it make sense to fold the calling convention into this set of attributes?  For correctness, attributes cannot be stripped from the IR anyway (as I understand it).  The existing calling convention API could be implemented using the new attributes.  The old way of specifying calling conventions (before the function name instead of after) would need to be supported until the next break in IR compatibility, but this doesn't seem like a big issue.  Perhaps throw an error if both are present and conflict.  This may also mean the calling convention specifier at the call site needs to go away, but is this really needed?

That's a very interesting idea, and might be a great extension after the basic pieces Bill is proposing goes in and settles!

-Chris




More information about the llvm-dev mailing list