LLVM 17.0.0git
|
#include "llvm/IR/Instructions.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.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/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/ProfDataUtils.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 "llvm/Support/ModRef.h"
#include "llvm/Support/TypeSize.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <optional>
#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. | |
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) |
static Align | computeAllocaDefaultAlign (Type *Ty, BasicBlock *BB) |
static Align | computeAllocaDefaultAlign (Type *Ty, Instruction *I) |
static Align | computeLoadStoreDefaultAlign (Type *Ty, BasicBlock *BB) |
static Align | computeLoadStoreDefaultAlign (Type *Ty, Instruction *I) |
template<typename IndexTy > | |
static Type * | getIndexedTypeInternal (Type *Ty, ArrayRef< IndexTy > IdxList) |
static Value * | createPlaceholderForShuffleVector (Value *V) |
static bool | isSingleSourceMaskImpl (ArrayRef< int > Mask, int NumOpElts) |
static bool | isIdentityMaskImpl (ArrayRef< int > Mask, int NumOpElts) |
static bool | isReplicationMaskWithParams (ArrayRef< int > Mask, int ReplicationFactor, int VF) |
Variables | |
static cl::opt< bool > | DisableI2pP2iOpt ("disable-i2p-p2i-opt", cl::init(false), cl::desc("Disables inttoptr/ptrtoint roundtrip optimization")) |
|
static |
Definition at line 1469 of file Instructions.cpp.
References assert(), DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), and llvm::BasicBlock::getParent().
Referenced by computeAllocaDefaultAlign().
|
static |
Definition at line 1477 of file Instructions.cpp.
References assert(), computeAllocaDefaultAlign(), and I.
|
static |
Definition at line 1551 of file Instructions.cpp.
References assert(), DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), and llvm::BasicBlock::getParent().
Referenced by computeLoadStoreDefaultAlign().
|
static |
Definition at line 1559 of file Instructions.cpp.
References assert(), computeLoadStoreDefaultAlign(), and I.
|
static |
Definition at line 916 of file Instructions.cpp.
References assert(), llvm::CallInst::Create(), F, llvm::FunctionCallee::getCallee(), llvm::Type::getInt8PtrTy(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), and llvm::Type::getVoidTy().
Referenced by llvm::CallInst::CreateFree().
|
static |
Definition at line 786 of file Instructions.cpp.
References assert(), llvm::CallInst::Create(), llvm::CastInst::CreateIntegerCast(), llvm::BasicBlock::end(), F, llvm::ConstantInt::get(), llvm::FunctionCallee::getCallee(), llvm::BasicBlock::getContext(), llvm::Type::getInt8PtrTy(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getMul(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::Value::getType(), llvm::PointerType::getUnqual(), llvm::Instruction::insertInto(), IsConstantOne(), llvm::Type::isVoidTy(), Name, llvm::CallBase::setCallingConv(), and llvm::CallInst::setTailCall().
Referenced by llvm::CallInst::CreateMalloc().
Definition at line 2066 of file Instructions.cpp.
References assert(), and llvm::PoisonValue::get().
|
static |
Definition at line 1457 of file Instructions.cpp.
References assert(), Context, llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), llvm::Value::getType(), and llvm::Type::isIntegerTy().
|
static |
Definition at line 1905 of file Instructions.cpp.
References llvm::ArrayRef< T >::empty(), llvm::GetElementPtrInst::getTypeAtIndex(), and llvm::ArrayRef< T >::slice().
Referenced by llvm::GetElementPtrInst::getIndexedType().
IsConstantOne - Return true only if val is constant int 1.
Definition at line 780 of file Instructions.cpp.
References assert(), and llvm::ConstantInt::isOne().
Referenced by createMalloc().
Definition at line 2324 of file Instructions.cpp.
References isSingleSourceMaskImpl().
Referenced by llvm::ShuffleVectorInst::isConcat(), llvm::ShuffleVectorInst::isIdentityMask(), llvm::ShuffleVectorInst::isIdentityWithExtract(), llvm::ShuffleVectorInst::isIdentityWithPadding(), and llvm::ShuffleVectorInst::isInsertSubvectorMask().
|
static |
Definition at line 2619 of file Instructions.cpp.
References llvm::all_of(), assert(), llvm::seq(), llvm::ArrayRef< T >::size(), and llvm::UndefMaskElem.
Referenced by llvm::ShuffleVectorInst::isReplicationMask().
Definition at line 2300 of file Instructions.cpp.
Referenced by llvm::ShuffleVectorInst::isExtractSubvectorMask(), isIdentityMaskImpl(), llvm::ShuffleVectorInst::isInsertSubvectorMask(), and llvm::ShuffleVectorInst::isSingleSourceMask().
|
static |
Referenced by llvm::CastInst::isEliminableCastPair().