NFC: Fix typo in comment
[oota-llvm.git] / include / llvm / IR / Attributes.td
1 /// Attribute base class.
2 class Attr<string S> {
3   // String representation of this attribute in the IR.
4   string AttrString = S;
5 }
6
7 /// Enum attribute.
8 class EnumAttr<string S> : Attr<S>;
9
10 /// StringBool attribute.
11 class StrBoolAttr<string S> : Attr<S>;
12
13 /// Target-independent enum attributes.
14
15 /// Alignment of parameter (5 bits) stored as log2 of alignment with +1 bias.
16 /// 0 means unaligned (different from align(1)).
17 def Alignment : EnumAttr<"align">;
18
19 /// inline=always.
20 def AlwaysInline : EnumAttr<"alwaysinline">;
21
22 /// Function can access memory only using pointers based on its arguments.
23 def ArgMemOnly : EnumAttr<"argmemonly">;
24
25 /// Callee is recognized as a builtin, despite nobuiltin attribute on its
26 /// declaration.
27 def Builtin : EnumAttr<"builtin">;
28
29 /// Pass structure by value.
30 def ByVal : EnumAttr<"byval">;
31
32 /// Marks function as being in a cold path.
33 def Cold : EnumAttr<"cold">;
34
35 /// Can only be moved to control-equivalent blocks.
36 def Convergent : EnumAttr<"convergent">;
37
38 /// Pointer is known to be dereferenceable.
39 def Dereferenceable : EnumAttr<"dereferenceable">;
40
41 /// Pointer is either null or dereferenceable.
42 def DereferenceableOrNull : EnumAttr<"dereferenceable_or_null">;
43
44 /// Pass structure in an alloca.
45 def InAlloca : EnumAttr<"inalloca">;
46
47 /// Source said inlining was desirable.
48 def InlineHint : EnumAttr<"inlinehint">;
49
50 /// Force argument to be passed in register.
51 def InReg : EnumAttr<"inreg">;
52
53 /// Build jump-instruction tables and replace refs.
54 def JumpTable : EnumAttr<"jumptable">;
55
56 /// Function must be optimized for size first.
57 def MinSize : EnumAttr<"minsize">;
58
59 /// Naked function.
60 def Naked : EnumAttr<"naked">;
61
62 /// Nested function static chain.
63 def Nest : EnumAttr<"nest">;
64
65 /// Considered to not alias after call.
66 def NoAlias : EnumAttr<"noalias">;
67
68 /// Callee isn't recognized as a builtin.
69 def NoBuiltin : EnumAttr<"nobuiltin">;
70
71 /// Function creates no aliases of pointer.
72 def NoCapture : EnumAttr<"nocapture">;
73
74 /// Call cannot be duplicated.
75 def NoDuplicate : EnumAttr<"noduplicate">;
76
77 /// Disable implicit floating point insts.
78 def NoImplicitFloat : EnumAttr<"noimplicitfloat">;
79
80 /// inline=never.
81 def NoInline : EnumAttr<"noinline">;
82
83 /// Function is called early and/or often, so lazy binding isn't worthwhile.
84 def NonLazyBind : EnumAttr<"nonlazybind">;
85
86 /// Pointer is known to be not null.
87 def NonNull : EnumAttr<"nonnull">;
88
89 /// The function does not recurse.
90 def NoRecurse : EnumAttr<"norecurse">;
91
92 /// Disable redzone.
93 def NoRedZone : EnumAttr<"noredzone">;
94
95 /// Mark the function as not returning.
96 def NoReturn : EnumAttr<"noreturn">;
97
98 /// Function doesn't unwind stack.
99 def NoUnwind : EnumAttr<"nounwind">;
100
101 /// opt_size.
102 def OptimizeForSize : EnumAttr<"optsize">;
103
104 /// Function must not be optimized.
105 def OptimizeNone : EnumAttr<"optnone">;
106
107 /// Function does not access memory.
108 def ReadNone : EnumAttr<"readnone">;
109
110 /// Function only reads from memory.
111 def ReadOnly : EnumAttr<"readonly">;
112
113 /// Return value is always equal to this argument.
114 def Returned : EnumAttr<"returned">;
115
116 /// Function can return twice.
117 def ReturnsTwice : EnumAttr<"returns_twice">;
118
119 /// Safe Stack protection.
120 def SafeStack : EnumAttr<"safestack">;
121
122 /// Sign extended before/after call.
123 def SExt : EnumAttr<"signext">;
124
125 /// Alignment of stack for function (3 bits)  stored as log2 of alignment with
126 /// +1 bias 0 means unaligned (different from alignstack=(1)).
127 def StackAlignment : EnumAttr<"alignstack">;
128
129 /// Stack protection.
130 def StackProtect : EnumAttr<"ssp">;
131
132 /// Stack protection required.
133 def StackProtectReq : EnumAttr<"sspreq">;
134
135 /// Strong Stack protection.
136 def StackProtectStrong : EnumAttr<"sspstrong">;
137
138 /// Hidden pointer to structure to return.
139 def StructRet : EnumAttr<"sret">;
140
141 /// AddressSanitizer is on.
142 def SanitizeAddress : EnumAttr<"sanitize_address">;
143
144 /// ThreadSanitizer is on.
145 def SanitizeThread : EnumAttr<"sanitize_thread">;
146
147 /// MemorySanitizer is on.
148 def SanitizeMemory : EnumAttr<"sanitize_memory">;
149
150 /// Function must be in a unwind table.
151 def UWTable : EnumAttr<"uwtable">;
152
153 /// Zero extended before/after call.
154 def ZExt : EnumAttr<"zeroext">;
155
156 /// Target-independent string attributes.
157 def LessPreciseFPMAD : StrBoolAttr<"less-precise-fpmad">;
158 def NoInfsFPMath : StrBoolAttr<"no-infs-fp-math">;
159 def NoNansFPMath : StrBoolAttr<"no-nans-fp-math">;
160 def UnsafeFPMath : StrBoolAttr<"unsafe-fp-math">;