LLVM 20.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/ConstantRange.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/CheckedArithmetic.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 Value * | getAISize (LLVMContext &Context, Value *Amt) |
static Align | computeAllocaDefaultAlign (Type *Ty, InsertPosition Pos) |
static Align | computeLoadStoreDefaultAlign (Type *Ty, InsertPosition Pos) |
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) |
static int | matchShuffleAsBitRotate (ArrayRef< int > Mask, int NumSubElts) |
Try to lower a vector shuffle as a bit rotation. | |
Variables | |
static cl::opt< bool > | DisableI2pP2iOpt ("disable-i2p-p2i-opt", cl::init(false), cl::desc("Disables inttoptr/ptrtoint roundtrip optimization")) |
|
static |
Definition at line 1196 of file Instructions.cpp.
References assert(), DL, llvm::InsertPosition::getBasicBlock(), llvm::BasicBlock::getDataLayout(), llvm::BasicBlock::getParent(), and llvm::InsertPosition::isValid().
|
static |
Definition at line 1254 of file Instructions.cpp.
References assert(), DL, llvm::InsertPosition::getBasicBlock(), llvm::BasicBlock::getDataLayout(), llvm::BasicBlock::getParent(), and llvm::InsertPosition::isValid().
Definition at line 1656 of file Instructions.cpp.
References assert(), and llvm::PoisonValue::get().
|
static |
Definition at line 1184 of file Instructions.cpp.
References assert(), llvm::Type::getInt32Ty(), llvm::Value::getType(), and llvm::Type::isIntegerTy().
|
static |
Definition at line 1505 of file Instructions.cpp.
References llvm::ArrayRef< T >::empty(), llvm::GetElementPtrInst::getTypeAtIndex(), and llvm::ArrayRef< T >::slice().
Referenced by llvm::GetElementPtrInst::getIndexedType().
Definition at line 1870 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 2171 of file Instructions.cpp.
References llvm::all_of(), assert(), llvm::PoisonMaskElem, llvm::seq(), and llvm::ArrayRef< T >::size().
Referenced by llvm::ShuffleVectorInst::isReplicationMask().
Definition at line 1846 of file Instructions.cpp.
Referenced by llvm::ShuffleVectorInst::isExtractSubvectorMask(), isIdentityMaskImpl(), llvm::ShuffleVectorInst::isInsertSubvectorMask(), and llvm::ShuffleVectorInst::isSingleSourceMask().
|
static |
Try to lower a vector shuffle as a bit rotation.
Look for a repeated rotation pattern in each sub group. Returns an element-wise left bit rotation amount or -1 if failed.
Definition at line 2404 of file Instructions.cpp.
References assert(), and llvm::Offset.
Referenced by llvm::ShuffleVectorInst::isBitRotateMask(), lowerShuffleAsBitRotate(), and matchUnaryPermuteShuffle().
|
static |
Referenced by llvm::CastInst::isEliminableCastPair().