[LLVMdev] Proposal : Function Notes

Devang Patel dpatel at apple.com
Mon Aug 25 10:54:42 PDT 2008


On Aug 22, 2008, at 8:30 PM, Andrew Lenharth wrote:

> On Fri, Aug 22, 2008 at 6:40 PM, Devang Patel <dpatel at apple.com>  
> wrote:
>> Here is a proposal that I mentioned sometime ago. Any  
>> thoughts,comments or
>> suggestions on this proposal would be appreciated.
>
>> The proposed solution to this problem to encode Function Notes in  
>> the IR.
>> define void @f()  notes("opt-size,pic,noinline") { ... }
>> Here, the notes include a comma separated list of strings. Note,  
>> the notes
>> are
>> only attached to functions definitions. They are not attached to  
>> call or
>> invoke
>> instructions. All supported notes must be documented in LLVM language
>> reference.
>
> Would this subsume calling convention and linkage and const/pure
> specification?

No, that is not the goal.

> (as well as "used" (or more appropriately
> "do-not-internalize")).

yes, "used" could be handled by notes. I am not so sure about "do-not- 
internalize".
-
Devang




More information about the llvm-dev mailing list