LLVM
8.0.1
|
#include "llvm/IR/Instructions.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <vector>
Go to the source code of this file.
Functions | |
static bool | IsConstantOne (Value *val) |
IsConstantOne - Return true only if val is constant int 1. More... | |
static Instruction * | createMalloc (Instruction *InsertBefore, BasicBlock *InsertAtEnd, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, ArrayRef< OperandBundleDef > OpB, Function *MallocF, const Twine &Name) |
static Instruction * | createFree (Value *Source, ArrayRef< OperandBundleDef > Bundles, Instruction *InsertBefore, BasicBlock *InsertAtEnd) |
static Value * | getAISize (LLVMContext &Context, Value *Amt) |
template<typename IndexTy > | |
static Type * | getIndexedTypeInternal (Type *Agg, ArrayRef< IndexTy > IdxList) |
getIndexedType - Returns the type of the element that would be accessed with a gep instruction with the specified parameters. More... | |
static bool | isSingleSourceMaskImpl (ArrayRef< int > Mask, int NumOpElts) |
static bool | isIdentityMaskImpl (ArrayRef< int > Mask, int NumOpElts) |
|
static |
Definition at line 588 of file Instructions.cpp.
References assert(), llvm::CallInst::Create(), F(), llvm::Module::getContext(), llvm::Type::getInt8PtrTy(), llvm::Module::getOrInsertFunction(), llvm::Instruction::getParent(), llvm::Value::getType(), llvm::Type::getVoidTy(), llvm::Type::isPointerTy(), llvm::CallBase::setCallingConv(), llvm::CallInst::setTailCall(), and llvm::Sched::Source.
Referenced by llvm::CallInst::CreateFree().
|
static |
Definition at line 458 of file Instructions.cpp.
References assert(), llvm::CallInst::Create(), llvm::CastInst::CreateIntegerCast(), CreateMul(), F(), llvm::ConstantInt::get(), llvm::BasicBlock::getInstList(), llvm::Type::getInt8PtrTy(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getMul(), llvm::Module::getOrInsertFunction(), llvm::Instruction::getParent(), llvm::Value::getType(), llvm::PointerType::getUnqual(), IsConstantOne(), llvm::Type::isVoidTy(), llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back(), llvm::CallBase::setCallingConv(), and llvm::CallInst::setTailCall().
Referenced by llvm::CallInst::CreateMalloc().
|
static |
Definition at line 1053 of file Instructions.cpp.
References assert(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), llvm::Value::getType(), and llvm::Type::isIntegerTy().
|
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 1472 of file Instructions.cpp.
References llvm::dyn_cast(), llvm::ArrayRef< T >::empty(), llvm::CompositeType::getTypeAtIndex(), llvm::CompositeType::indexValid(), llvm::Type::isPointerTy(), llvm::Type::isSized(), and llvm::ArrayRef< T >::size().
Referenced by llvm::GetElementPtrInst::getIndexedType().
IsConstantOne - Return true only if val is constant int 1.
Definition at line 452 of file Instructions.cpp.
References assert(), llvm::dyn_cast(), and llvm::ConstantInt::isOne().
Referenced by createMalloc().
Definition at line 1766 of file Instructions.cpp.
References isSingleSourceMaskImpl(), and llvm::ArrayRef< T >::size().
Referenced by llvm::ShuffleVectorInst::isConcat(), llvm::ShuffleVectorInst::isIdentityMask(), llvm::ShuffleVectorInst::isIdentityWithExtract(), and llvm::ShuffleVectorInst::isIdentityWithPadding().
Definition at line 1742 of file Instructions.cpp.
References assert(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
Referenced by llvm::ShuffleVectorInst::isExtractSubvectorMask(), isIdentityMaskImpl(), and llvm::ShuffleVectorInst::isSingleSourceMask().