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

Eric Christopher echristo at gmail.com
Thu Nov 22 12:07:33 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).
>
>
> 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.
>
>
Right, I couldn't think of anything that wasn't handled already, but I
wasn't sure if we wanted this to be a single way of encapsulating
information for globals. No opinion either way :)

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


More information about the llvm-dev mailing list