[LLVMdev] AttributeSet from Modules

Bill Wendling wendling at apple.com
Tue Sep 3 14:08:07 PDT 2013


On Sep 3, 2013, at 9:04 AM, Raul Fernandes Herbster <raulherbster at gmail.com> wrote:

> Hello!
> 
> clang defines some AttributeSet, for example:
> 
> attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
> 
> I would like to know if there is any way to reuse such pre-defined attribute sets (for example, set the attribute list of my new function using an existing attribute set).
> 
Hi Raul,

Attribute sets are "uniqued". So if you have two functions which both have the same attributes, then they will reference the same AttributeSet object.


-bw





More information about the llvm-dev mailing list