LLVM API Documentation
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. | |
| 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.
| const Attributes llvm::Attribute::Alignment = 0xffff<<16 |
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().
| const Attributes llvm::Attribute::AlwaysInline = 1<<12 |
Definition at line 48 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 43 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 59 of file Attributes.h.
| const Attributes llvm::Attribute::InReg = 1<<3 |
Force argument to be passed in register.
Definition at line 39 of file Attributes.h.
Referenced by llvm::SPUInstrInfo::foldMemoryOperand(), llvm::PPCInstrInfo::foldMemoryOperand(), llvm::AlphaInstrInfo::foldMemoryOperand(), 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 44 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 42 of file Attributes.h.
Referenced by getAsString(), llvm::Argument::hasNoAliasAttr(), and typeIncompatible().
| const Attributes llvm::Attribute::NoInline = 1<<11 |
Definition at line 47 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 35 of file Attributes.h.
Referenced by llvm::AttrListPtr::get(), llvm::Intrinsic::getAttributes(), and typeIncompatible().
| const Attributes llvm::Attribute::NoReturn = 1<<2 |
Mark the function as not returning.
Definition at line 38 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 41 of file Attributes.h.
Referenced by llvm::InvokeInst::doesNotThrow(), llvm::CallInst::doesNotThrow(), llvm::Function::doesNotThrow(), getAsString(), llvm::Intrinsic::getAttributes(), llvm::InvokeInst::setDoesNotThrow(), llvm::CallInst::setDoesNotThrow(), and llvm::Function::setDoesNotThrow().
| const Attributes llvm::Attribute::OptimizeForSize = 1<<13 |
Definition at line 49 of file Attributes.h.
Referenced by llvm::X86ATTAsmPrinter::emitFunctionHeader(), getAsString(), and llvm::X86IntelAsmPrinter::runOnMachineFunction().
| const Attributes llvm::Attribute::ParameterOnly = ByVal | Nest | StructRet |
| const Attributes llvm::Attribute::ReadNone = 1<<9 |
Function does not access memory.
Definition at line 45 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 46 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 37 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 |
Definition at line 50 of file Attributes.h.
Referenced by getAsString(), and InlineCallIfPossible().
| const Attributes llvm::Attribute::StackProtectReq = 1<<15 |
Definition at line 51 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 40 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 63 of file Attributes.h.
| const Attributes llvm::Attribute::ZExt = 1<<0 |
Zero extended before/after call.
Definition at line 36 of file Attributes.h.
Referenced by getAsString(), llvm::TargetLowering::LowerArguments(), llvm::SelectionDAGLowering::LowerCallTo(), typeIncompatible(), and llvm::Interpreter::visitCallSite().