LLVM API Documentation

llvm::Attribute Namespace Reference


Functions

Attributes typeIncompatible (const Type *Ty)
 Which attributes cannot be applied to a type.
Attributes constructAlignmentFromInt (unsigned i)
std::string getAsString (Attributes Attrs)
 Convert attribute bits to text.

Variables

const Attributes None = 0
 Function attributes.
const Attributes ZExt = 1<<0
 Zero extended before/after call.
const Attributes SExt = 1<<1
 Sign extended before/after call.
const Attributes NoReturn = 1<<2
 Mark the function as not returning.
const Attributes InReg = 1<<3
 Force argument to be passed in register.
const Attributes StructRet = 1<<4
 Hidden pointer to structure to return.
const Attributes NoUnwind = 1<<5
 Function doesn't unwind stack.
const Attributes NoAlias = 1<<6
 Considered to not alias after call.
const Attributes ByVal = 1<<7
 Pass structure by value.
const Attributes Nest = 1<<8
 Nested function static chain.
const Attributes ReadNone = 1<<9
 Function does not access memory.
const Attributes ReadOnly = 1<<10
 Function only reads from memory.
const Attributes NoInline = 1<<11
const Attributes AlwaysInline = 1<<12
const Attributes OptimizeForSize = 1<<13
const Attributes StackProtect = 1<<14
const Attributes StackProtectReq = 1<<15
const Attributes Alignment = 0xffff<<16
 Alignment of parameter (16 bits).
const Attributes ParameterOnly = ByVal | Nest | StructRet
 Attributes that only apply to function parameters.
const Attributes FunctionOnly
 Attributes that only apply to function.
const Attributes VarArgsIncompatible = StructRet
 Parameter attributes that do not apply to vararg call arguments.
const Attributes MutuallyIncompatible [4]
 Attributes that are mutually incompatible.


Function Documentation

Attributes llvm::Attribute::constructAlignmentFromInt ( unsigned  i  )  [inline]

This turns an int alignment (a power of 2, normally) into the form used internally in Attributes.

Definition at line 78 of file Attributes.h.

Referenced by LLVMSetInstrParamAlignment(), and LLVMSetParamAlignment().

std::string llvm::Attribute::getAsString ( Attributes  Attrs  ) 

Convert attribute bits to text.

The set of Attributes set in Attributes is converted to a string of equivalent mnemonics. This is, presumably, for writing out the mnemonics for the assembly writer.

Definition at line 26 of file Attributes.cpp.

References Alignment, AlwaysInline, ByVal, InReg, Nest, NoAlias, NoInline, NoReturn, NoUnwind, OptimizeForSize, ReadNone, ReadOnly, SExt, StackProtect, StackProtectReq, StructRet, llvm::utostr(), and ZExt.

Attributes llvm::Attribute::typeIncompatible ( const Type Ty  ) 

Which attributes cannot be applied to a type.

Definition at line 70 of file Attributes.cpp.

References ByVal, llvm::Type::isInteger(), Nest, NoAlias, None, SExt, StructRet, and ZExt.


Variable Documentation

Alignment of parameter (16 bits).

Definition at line 52 of file Attributes.h.

Referenced by llvm::AttrListPtr::addAttr(), getAsString(), llvm::AttrListPtr::getParamAlignment(), and llvm::AttrListPtr::removeAttr().

Definition at line 48 of file Attributes.h.

Referenced by getAsString(), and llvm::InlineCostAnalyzer::getInlineCost().

Initial value:

Attributes that only apply to function.

Definition at line 59 of file Attributes.h.

Initial value:

Attributes that are mutually incompatible.

Definition at line 66 of file Attributes.h.

Considered to not alias after call.

Definition at line 42 of file Attributes.h.

Referenced by getAsString(), llvm::Argument::hasNoAliasAttr(), and typeIncompatible().

Definition at line 47 of file Attributes.h.

Referenced by getAsString(), and llvm::InlineCostAnalyzer::getInlineCost().

Function attributes.

Function parameters and results can have attributes to indicate how they should be treated by optimizations and code generation. This enumeration lists the attributes that can be associated with parameters, function results or the function itself. No attributes have been set

Definition at line 35 of file Attributes.h.

Referenced by llvm::AttrListPtr::get(), llvm::Intrinsic::getAttributes(), and typeIncompatible().

Attributes that only apply to function parameters.

Definition at line 56 of file Attributes.h.

Definition at line 50 of file Attributes.h.

Referenced by getAsString(), and InlineCallIfPossible().

Definition at line 51 of file Attributes.h.

Referenced by getAsString(), and InlineCallIfPossible().

Parameter attributes that do not apply to vararg call arguments.

Definition at line 63 of file Attributes.h.




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.