Enum AttributeKind
Enumeration for the known LLVM attributes
Namespace: Llvm.NET.Values
Assembly: Llvm.NET.dll
Syntax
public enum AttributeKind
Remarks
It is important to note that the integer values of this enum do NOT necessarily correlate to the LLVM attribute IDs. LLVM has moved away from using an enum Flags model as the number of attributes reached the limit of available bits. Thus, the enum was dropped. Instead, strings are used to identify attributes. However, for maximum compatibility and ease of use for this library the enum is retained and the provided attribute manipulation classes will map the enum to the associated string.
warning
As a result of the changes in LLVM this set of attributes is fluid and subject to change from version to version. Thus, code using any attributes that have changed or were removed will produce compile time errors. That is useful and by design so that any changes in LLVM naming will break at compile time instead of at runtime.
Fields
Alignment | This indicates that the pointer value may be assumed by the optimizer to have the specified alignment. |
AllocSize | This attribute indicates that the annotated function will always return at least a given number of bytes (or null). |
AlwaysInline | is attribute indicates that the inliner should attempt to inline this function into callers whenever possible, ignoring any active inlining size threshold for this caller. |
ArgMemOnly | indicates that the only memory accesses inside function are loads and stores from objects pointed to by its pointer-typed arguments, with arbitrary offsets |
Builtin | This indicates that the callee function at a call site should be recognized as a built-in function, even though the function’s declaration uses the nobuiltin attribute. |
ByVal | This indicates that the pointer parameter should really be passed by value to the function. |
Cold | This attribute indicates that this function is rarely called. |
Convergent | This attribute marks a function as convergent |
Dereferenceable | This indicates that the parameter or return pointer is dereferenceable |
DereferenceableOrNull | This indicates that the parameter or return value isn’t both non-null and non-dereferenceable (up to 'n' bytes) at the same time. |
InaccessibleMemOnly | This attribute indicates that the function may only access memory that is not accessible by the module being compiled. |
InaccessibleMemOrArgMemOnly | This attribute indicates that the function may only access memory that is either not accessible by the module being compiled, or is pointed to by its pointer arguments. |
InAlloca | The inalloca argument attribute allows the caller to take the address of outgoing stack arguments. |
InlineHint | This attribute indicates that the source code contained a hint that inlining this function is desirable (such as the “inline” keyword in C/C++). It is just a hint; it imposes no requirements on the inliner. |
InReg | This indicates that this parameter or return value should be treated in a special target-dependent fashion while emitting code for a function call or return (usually, by putting it in a register as opposed to memory, though some targets use it to distinguish between two different kinds of registers). Use of this attribute is target-specific. |
JumpTable | This attribute indicates that the function should be added to a jump-instruction table at code-generation time, |
MinSize | This attribute suggests that optimization passes and code generator passes make choices that keep the code size of this function as small as possible |
Naked | This attribute disables prologue / epilogue emission for the function. This can have very system-specific consequences. |
Nest | This indicates that the pointer parameter can be excised using the trampoline intrinsics. |
NoAlias | This indicates that objects accessed via pointer values based on the argument or return value are not also accessed, during the execution of the function, via pointer values not based on the argument or return value. |
NoBuiltin | This indicates that the callee function at a call site is not recognized as a built-in function. |
NoCapture | This indicates that the callee does not make any copies of the pointer that outlive the callee itself. |
NoDuplicate | This attribute indicates that calls to the function cannot be duplicated. |
NoImplicitFloat | This attributes disables implicit floating point instructions. |
NoInline | This attribute indicates that the inliner should never inline this function in any situation. |
None | No attributes |
NonLazyBind | This attribute suppresses lazy symbol binding for the function. |
NonNull | This indicates that the parameter or return pointer is not null. |
NoRecurse | This function attribute indicates that the function does not call itself either directly or indirectly down any possible call path |
NoRedZone | This attribute indicates that the code generator should not use a red zone, even if the target-specific ABI normally permits it |
NoReturn | This function attribute indicates that the function never returns normally. |
NoUnwind | This function attribute indicates that the function never raises an exception. |
OptimizeForSize | Optimize for size |
OptimizeNone | Do not optimize |
ReadNone | On a function, this attribute indicates that the function computes its result (or decides to unwind an exception) based strictly on its arguments, without dereferencing any pointer arguments or otherwise accessing any mutable state |
ReadOnly | On a function, this attribute indicates that the function does not write through any pointer arguments (including byval arguments) or otherwise modify any state (e.g. memory, control registers, etc) visible to caller functions |
Returned | This indicates that the function always returns the argument as its return value. |
ReturnsTwice | This attribute indicates that this function can return twice. |
SafeStack | This attribute indicates that SafeStack protection is enabled for this function. |
SanitizeAddress | This attribute indicates that AddressSanitizer checks (dynamic address safety analysis) are enabled for this function. |
SanitizeMemory | This attribute indicates that MemorySanitizer checks (dynamic detection of accesses to uninitialized memory) are enabled for this function. |
SanitizeThread | This attribute indicates that ThreadSanitizer checks (dynamic thread safety analysis) are enabled for this function. |
SExt | This indicates to the code generator that the parameter or return value should be sign-extended to the extent required by the target’s ABI (which is usually 32-bits) by the caller (for a parameter) or the callee (for a return value). |
Speculatable | This function attribute indicates that the function does not have any effects besides calculating its result and does not have undefined behavior. |
StackAlignment | This attribute indicates that, when emitting the prologue and epilogue, the back-end should forcibly align the stack pointer. |
StackProtect | This attribute indicates that the function should emit a stack smashing protector. |
StackProtectReq | This attribute indicates that the function should always emit a stack smashing protector. |
StackProtectStrong | This attribute indicates that the function should emit a stack smashing protector. |
StructRet | This indicates that the pointer parameter specifies the address of a structure that is the return value of the function in the source program. |
SwiftError | This attribute is motivated to model and optimize Swift error handling. |
SwiftSelf | This indicates that the parameter is the self/context parameter. |
UWTable | This attribute indicates that the ABI being targeted requires that an unwind table entry be produced for this function even if we can show that no exceptions passes by it. |
WriteOnly | This attribute indicates the item is write only |
ZExt | This indicates to the code generator that the parameter or return value should be zero-extended to the extent required by the target’s ABI by the caller (for a parameter) or the callee (for a return value). |