Llvm Function Attributes.
Function attributes are set to communicate additional information about a
function. Function attributes are considered to be part of the function,
not of the function type, so functions with different parameter attributes
can have the same function type. Functions can have multiple attributes.
Descriptions taken from http://llvm.org/docs/LangRef.html#fnattrs
Constructors
AlwaysInlineThis attribute indicates that the inliner should attempt to inline this
function into callers whenever possible, ignoring any active inlining
size threshold for this caller.
InlineHintThis 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.
NoInlineThis attribute indicates that the inliner should never inline this
function in any situation. This attribute may not be used together
with the alwaysinline attribute.
OptSizeThis attribute suggests that optimization passes and code generator
passes make choices that keep the code size of this function low, and
otherwise do optimizations specifically to reduce code size.
NoReturnThis function attribute indicates that the function never returns
normally. This produces undefined behavior at runtime if the function
ever does dynamically return.
NoUnwindThis function attribute indicates that the function never returns with
an unwind or exceptional control flow. If the function does unwind, its
runtime behavior is undefined.
ReadNoneThis 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 (e.g. memory, control registers, etc) visible to caller functions.
It does not write through any pointer arguments (including byval
arguments) and never changes any state visible to callers. This means
that it cannot unwind exceptions by calling the C++ exception throwing
methods, but could use the unwind instruction.
ReadOnlyThis 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.
It may dereference pointer arguments and read state that may be set in
the caller. A readonly function always returns the same value (or unwinds
an exception identically) when called with the same set of arguments and
global state. It cannot unwind an exception by calling the C++ exception
throwing methods, but may use the unwind instruction.
SspThis attribute indicates that the function should emit a stack smashing
protector. It is in the form of a "canary"—a random value placed on the
stack before the local variables that's checked upon return from the
function to see if it has been overwritten. A heuristic is used to
determine if a function needs stack protectors or not.
If a function that has an ssp attribute is inlined into a function that
doesn't have an ssp attribute, then the resulting function will have an
ssp attribute.
SspReqThis attribute indicates that the function should always emit a stack
smashing protector. This overrides the ssp function attribute.
If a function that has an sspreq attribute is inlined into a function
that doesn't have an sspreq attribute or which has an ssp attribute,
then the resulting function will have an sspreq attribute.
NoRedZoneThis attribute indicates that the code generator should not use a red
zone, even if the target-specific ABI normally permits it.
NoImplicitFloatThis attributes disables implicit floating point instructions.
NakedThis attribute disables prologue / epilogue emission for the function.
This can have very system-specific consequences.