LLVM API Documentation
Functions | |
| Attributes | typeIncompatible (const Type *Ty) |
| Which attributes cannot be applied to a type. | |
| Attributes | constructAlignmentFromInt (unsigned i) |
| unsigned | getAlignmentFromAttrs (Attributes A) |
| This returns the alignment field of an attribute as a byte alignment value. | |
| 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 |
| inline=never | |
| const Attributes | AlwaysInline = 1<<12 |
| inline=always | |
| const Attributes | OptimizeForSize = 1<<13 |
| opt_size | |
| const Attributes | StackProtect = 1<<14 |
| Stack protection. | |
| const Attributes | StackProtectReq = 1<<15 |
| Stack protection required. | |
| const Attributes | Alignment = 31<<16 |
| Alignment of parameter (5 bits). | |
| const Attributes | NoCapture = 1<<21 |
| Function creates no aliases of pointer. | |
| const Attributes | ParameterOnly = ByVal | Nest | StructRet | NoCapture |
| 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. | |
| 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 81 of file Attributes.h.
References llvm::isPowerOf2_32(), and llvm::Log2_32().
Referenced by LLVMSetInstrParamAlignment(), and LLVMSetParamAlignment().
| unsigned llvm::Attribute::getAlignmentFromAttrs | ( | Attributes | A | ) | [inline] |
This returns the alignment field of an attribute as a byte alignment value.
Definition at line 92 of file Attributes.h.
References Align, and Alignment.
Referenced by getAsString(), and llvm::AttrListPtr::getParamAlignment().
| 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, getAlignmentFromAttrs(), InReg, Nest, NoAlias, NoCapture, NoInline, NoReturn, NoUnwind, OptimizeForSize, ReadNone, ReadOnly, SExt, StackProtect, StackProtectReq, StructRet, llvm::utostr(), and ZExt.
| Attributes llvm::Attribute::typeIncompatible | ( | const Type * | Ty | ) |
| const Attributes llvm::Attribute::Alignment = 31<<16 |
Alignment of parameter (5 bits).
Definition at line 53 of file Attributes.h.
Referenced by llvm::AttrListPtr::addAttr(), getAlignmentFromAttrs(), getAsString(), and llvm::AttrListPtr::removeAttr().
| const Attributes llvm::Attribute::AlwaysInline = 1<<12 |
inline=always
Definition at line 49 of file Attributes.h.
Referenced by getAsString(), and llvm::InlineCostAnalyzer::getInlineCost().
| const Attributes llvm::Attribute::ByVal = 1<<7 |
Pass structure by value.
Definition at line 44 of file Attributes.h.
Referenced by calculateFunctionInfo(), getAsString(), llvm::InvokeInst::hasByValArgument(), llvm::CallInst::hasByValArgument(), llvm::Argument::hasByValAttr(), llvm::InlineFunction(), llvm::ISD::ArgFlagsTy::isByVal(), isSafeToEliminateVarargsCast(), llvm::TargetLowering::LowerArguments(), llvm::SelectionDAGLowering::LowerCallTo(), and typeIncompatible().
Initial value:
NoReturn | NoUnwind | ReadNone | ReadOnly | NoInline | AlwaysInline | OptimizeForSize | StackProtect | StackProtectReq
Definition at line 62 of file Attributes.h.
| const Attributes llvm::Attribute::InReg = 1<<3 |
Force argument to be passed in register.
Definition at line 40 of file Attributes.h.
Referenced by llvm::SPUInstrInfo::foldMemoryOperandImpl(), llvm::PPCInstrInfo::foldMemoryOperandImpl(), llvm::AlphaInstrInfo::foldMemoryOperandImpl(), getAsString(), llvm::SelectionDAGLowering::getValue(), llvm::ISD::ArgFlagsTy::isInReg(), llvm::TargetLowering::LowerArguments(), and llvm::SelectionDAGLowering::LowerCallTo().
| const Attributes llvm::Attribute::Nest = 1<<8 |
Nested function static chain.
Definition at line 45 of file Attributes.h.
Referenced by getAsString(), llvm::ISD::ArgFlagsTy::isNest(), llvm::TargetLowering::LowerArguments(), llvm::SelectionDAGLowering::LowerCallTo(), StripNest(), and typeIncompatible().
| const Attributes llvm::Attribute::NoAlias = 1<<6 |
Considered to not alias after call.
Definition at line 43 of file Attributes.h.
Referenced by llvm::Function::doesNotAlias(), getAsString(), llvm::Argument::hasNoAliasAttr(), llvm::isNoAliasCall(), llvm::Function::setDoesNotAlias(), and typeIncompatible().
| const Attributes llvm::Attribute::NoCapture = 1<<21 |
Function creates no aliases of pointer.
Definition at line 56 of file Attributes.h.
Referenced by llvm::Function::doesNotCapture(), getAsString(), llvm::Argument::hasNoCaptureAttr(), llvm::PointerMayBeCaptured(), llvm::Function::setDoesNotCapture(), and typeIncompatible().
| const Attributes llvm::Attribute::NoInline = 1<<11 |
inline=never
Definition at line 48 of file Attributes.h.
Referenced by getAsString(), and llvm::InlineCostAnalyzer::getInlineCost().
| const Attributes llvm::Attribute::None = 0 |
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 36 of file Attributes.h.
Referenced by llvm::AttrListPtr::get(), and typeIncompatible().
| const Attributes llvm::Attribute::NoReturn = 1<<2 |
Mark the function as not returning.
Definition at line 39 of file Attributes.h.
Referenced by llvm::InvokeInst::doesNotReturn(), llvm::CallInst::doesNotReturn(), llvm::Function::doesNotReturn(), getAsString(), llvm::InvokeInst::setDoesNotReturn(), llvm::CallInst::setDoesNotReturn(), and llvm::Function::setDoesNotReturn().
| const Attributes llvm::Attribute::NoUnwind = 1<<5 |
Function doesn't unwind stack.
Definition at line 42 of file Attributes.h.
Referenced by llvm::InvokeInst::doesNotThrow(), llvm::CallInst::doesNotThrow(), llvm::Function::doesNotThrow(), getAsString(), llvm::InvokeInst::setDoesNotThrow(), llvm::CallInst::setDoesNotThrow(), and llvm::Function::setDoesNotThrow().
| const Attributes llvm::Attribute::OptimizeForSize = 1<<13 |
opt_size
Definition at line 50 of file Attributes.h.
Referenced by llvm::X86ATTAsmPrinter::emitFunctionHeader(), getAsString(), and llvm::X86IntelAsmPrinter::runOnMachineFunction().
| const Attributes llvm::Attribute::ParameterOnly = ByVal | Nest | StructRet | NoCapture |
| const Attributes llvm::Attribute::ReadNone = 1<<9 |
Function does not access memory.
Definition at line 46 of file Attributes.h.
Referenced by llvm::InvokeInst::doesNotAccessMemory(), llvm::CallInst::doesNotAccessMemory(), llvm::Function::doesNotAccessMemory(), getAsString(), llvm::InvokeInst::setDoesNotAccessMemory(), llvm::CallInst::setDoesNotAccessMemory(), llvm::Function::setDoesNotAccessMemory(), llvm::InvokeInst::setOnlyReadsMemory(), llvm::CallInst::setOnlyReadsMemory(), and llvm::Function::setOnlyReadsMemory().
| const Attributes llvm::Attribute::ReadOnly = 1<<10 |
Function only reads from memory.
Definition at line 47 of file Attributes.h.
Referenced by getAsString(), llvm::InvokeInst::onlyReadsMemory(), llvm::CallInst::onlyReadsMemory(), llvm::Function::onlyReadsMemory(), llvm::InvokeInst::setOnlyReadsMemory(), llvm::CallInst::setOnlyReadsMemory(), and llvm::Function::setOnlyReadsMemory().
| const Attributes llvm::Attribute::SExt = 1<<1 |
Sign extended before/after call.
Definition at line 38 of file Attributes.h.
Referenced by llvm::CastInst::castIsValid(), llvm::SExtInst::classof(), llvm::ComputeMaskedBits(), llvm::ComputeNumSignBits(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldInstOperands(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), llvm::CastInst::Create(), llvm::CastInst::CreateIntegerCast(), llvm::IRBuilder< preserveNames, T >::CreateSExt(), llvm::CastInst::CreateSExtOrBitCast(), llvm::AsmPrinter::EmitConstantValueOnly(), evaluateICmpRelation(), getAsString(), llvm::ConstantExpr::getCast(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), GetDecodedCastOpcode(), GetEncodedCastOpcode(), llvm::ConstantExpr::getIntegerCast(), llvm::Instruction::getOpcodeName(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSExtOrBitCast(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), InsertCastToIntPtrTy(), llvm::CastInst::isIntegerCast(), llvm::CastInst::isNoopCast(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::TargetLowering::LowerArguments(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::FastISel::SelectOperator(), typeIncompatible(), llvm::UpgradeIntrinsicCall(), and llvm::Interpreter::visitCallSite().
| const Attributes llvm::Attribute::StackProtect = 1<<14 |
Stack protection.
Definition at line 51 of file Attributes.h.
Referenced by getAsString(), and InlineCallIfPossible().
| const Attributes llvm::Attribute::StackProtectReq = 1<<15 |
Stack protection required.
Definition at line 52 of file Attributes.h.
Referenced by getAsString(), and InlineCallIfPossible().
| const Attributes llvm::Attribute::StructRet = 1<<4 |
Hidden pointer to structure to return.
Definition at line 41 of file Attributes.h.
Referenced by getAsString(), llvm::InvokeInst::hasStructRetAttr(), llvm::CallInst::hasStructRetAttr(), llvm::Function::hasStructRetAttr(), llvm::Argument::hasStructRetAttr(), llvm::TargetLowering::LowerArguments(), llvm::SelectionDAGLowering::LowerCallTo(), and typeIncompatible().
Parameter attributes that do not apply to vararg call arguments.
Definition at line 66 of file Attributes.h.
| const Attributes llvm::Attribute::ZExt = 1<<0 |
Zero extended before/after call.
Definition at line 37 of file Attributes.h.
Referenced by getAsString(), llvm::TargetLowering::LowerArguments(), llvm::SelectionDAGLowering::LowerCallTo(), typeIncompatible(), and llvm::Interpreter::visitCallSite().