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

Chris Lattner clattner at apple.com
Thu Nov 22 08:24:21 PST 2012


On Nov 19, 2012, at 1:49 PM, Eric Christopher <echristo at gmail.com> wrote:

> 
> 
> Querying
> --------
> 
> The attributes are attached to the function. It's therefore trivial to access
> the attributes within the middle- and the back-ends. Here's an example of how
> attributes are queried:
> 
> 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).

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.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121122/0e481f89/attachment.html>


More information about the llvm-dev mailing list