LLVM API Documentation
#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/Function.h"#include "llvm/Instructions.h"#include "llvm/Operator.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/CallSite.h"#include "llvm/Support/ConstantRange.h"#include "llvm/Support/MathExtras.h"
Go to the source code of this file.
Defines | |
| #define | CALLSITE_DELEGATE_GETTER(METHOD) |
| #define | CALLSITE_DELEGATE_SETTER(METHOD) |
Functions | |
| static Value * | getAISize (LLVMContext &Context, Value *Amt) |
| static unsigned | retrieveAddrSpace (const Value *Val) |
| template<typename IndexTy> | |
| static const Type * | getIndexedTypeInternal (const Type *Ptr, IndexTy const *Idxs, unsigned NumIdx) |
| static BinaryOperator::BinaryOps | AdjustIType (BinaryOperator::BinaryOps iType, const Type *Ty) |
| static bool | isConstantAllOnes (const Value *V) |
| #define CALLSITE_DELEGATE_GETTER | ( | METHOD | ) |
Value:
Instruction *II(getInstruction()); \ return isCall() \ ? cast<CallInst>(II)->METHOD \ : cast<InvokeInst>(II)->METHOD
Definition at line 30 of file Instructions.cpp.
Referenced by llvm::CallSite::doesNotAccessMemory(), llvm::CallSite::doesNotReturn(), llvm::CallSite::doesNotThrow(), llvm::CallSite::getAttributes(), llvm::CallSite::getCallingConv(), llvm::CallSite::getParamAlignment(), llvm::CallSite::onlyReadsMemory(), and llvm::CallSite::paramHasAttr().
| #define CALLSITE_DELEGATE_SETTER | ( | METHOD | ) |
Value:
Instruction *II(getInstruction()); \ if (isCall()) \ cast<CallInst>(II)->METHOD; \ else \ cast<InvokeInst>(II)->METHOD
Definition at line 36 of file Instructions.cpp.
Referenced by llvm::CallSite::setAttributes(), llvm::CallSite::setCallingConv(), llvm::CallSite::setDoesNotAccessMemory(), llvm::CallSite::setDoesNotReturn(), llvm::CallSite::setDoesNotThrow(), and llvm::CallSite::setOnlyReadsMemory().
| static BinaryOperator::BinaryOps AdjustIType | ( | BinaryOperator::BinaryOps | iType, | |
| const Type * | Ty | |||
| ) | [static] |
AdjustIType - Map Add, Sub, and Mul to FAdd, FSub, and FMul when the type is floating-point, to help provide compatibility with an older API.
Definition at line 1434 of file Instructions.cpp.
References llvm::Type::isFPOrFPVector().
Referenced by llvm::BinaryOperator::BinaryOperator().
| static Value* getAISize | ( | LLVMContext & | Context, | |
| Value * | Amt | |||
| ) | [static] |
Definition at line 713 of file Instructions.cpp.
References llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), and llvm::Value::getType().
| static const Type* getIndexedTypeInternal | ( | const Type * | Ptr, | |
| IndexTy const * | Idxs, | |||
| unsigned | NumIdx | |||
| ) | [inline, static] |
getIndexedType - Returns the type of the element that would be accessed with a gep instruction with the specified parameters.
The Idxs pointer should point to a continuous piece of memory containing the indices, either as Value* or uint64_t.
A null type is returned if the indices are invalid for the specified pointer type.
Definition at line 1078 of file Instructions.cpp.
References llvm::dyn_cast(), llvm::SequentialType::getElementType(), llvm::Type::getForwardedType(), llvm::CompositeType::getTypeAtIndex(), Index, llvm::CompositeType::indexValid(), llvm::Type::isAbstract(), llvm::Type::isSized(), and Ty.
Referenced by llvm::GetElementPtrInst::getIndexedType().
Definition at line 1628 of file Instructions.cpp.
Referenced by llvm::BinaryOperator::getNotArgument(), and llvm::BinaryOperator::isNot().