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

Eric Christopher echristo at gmail.com
Mon Nov 19 13:49:17 PST 2012


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).

"-G num
Put definitions of externally-visible data in a small data section if that
data is no bigger than num bytes. GCC can then access the data more
efficiently; see -mgpopt for details."

So we'll probably want to put attributes on all top level entities and not
just functions.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/ed181ffa/attachment.html>


More information about the llvm-dev mailing list