LLVM 17.0.0git
Functions | Variables
Instructions.cpp File Reference
#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>
Include dependency graph for Instructions.cpp:

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 InstructioncreateMalloc (Instruction *InsertBefore, BasicBlock *InsertAtEnd, Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, ArrayRef< OperandBundleDef > OpB, Function *MallocF, const Twine &Name)
 
static InstructioncreateFree (Value *Source, ArrayRef< OperandBundleDef > Bundles, Instruction *InsertBefore, BasicBlock *InsertAtEnd)
 
static ValuegetAISize (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 TypegetIndexedTypeInternal (Type *Ty, ArrayRef< IndexTy > IdxList)
 
static ValuecreatePlaceholderForShuffleVector (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< boolDisableI2pP2iOpt ("disable-i2p-p2i-opt", cl::init(false), cl::desc("Disables inttoptr/ptrtoint roundtrip optimization"))
 

Function Documentation

◆ computeAllocaDefaultAlign() [1/2]

static Align computeAllocaDefaultAlign ( Type Ty,
BasicBlock BB 
)
static

◆ computeAllocaDefaultAlign() [2/2]

static Align computeAllocaDefaultAlign ( Type Ty,
Instruction I 
)
static

Definition at line 1477 of file Instructions.cpp.

References assert(), computeAllocaDefaultAlign(), and I.

◆ computeLoadStoreDefaultAlign() [1/2]

static Align computeLoadStoreDefaultAlign ( Type Ty,
BasicBlock BB 
)
static

◆ computeLoadStoreDefaultAlign() [2/2]

static Align computeLoadStoreDefaultAlign ( Type Ty,
Instruction I 
)
static

Definition at line 1559 of file Instructions.cpp.

References assert(), computeLoadStoreDefaultAlign(), and I.

◆ createFree()

static Instruction * createFree ( Value Source,
ArrayRef< OperandBundleDef Bundles,
Instruction InsertBefore,
BasicBlock InsertAtEnd 
)
static

◆ createMalloc()

static Instruction * createMalloc ( Instruction InsertBefore,
BasicBlock InsertAtEnd,
Type IntPtrTy,
Type AllocTy,
Value AllocSize,
Value ArraySize,
ArrayRef< OperandBundleDef OpB,
Function MallocF,
const Twine Name 
)
static

◆ createPlaceholderForShuffleVector()

static Value * createPlaceholderForShuffleVector ( Value V)
static

Definition at line 2066 of file Instructions.cpp.

References assert(), and llvm::PoisonValue::get().

◆ getAISize()

static Value * getAISize ( LLVMContext Context,
Value Amt 
)
static

◆ getIndexedTypeInternal()

template<typename IndexTy >
static Type * getIndexedTypeInternal ( Type Ty,
ArrayRef< IndexTy >  IdxList 
)
static

◆ IsConstantOne()

static bool IsConstantOne ( Value val)
static

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().

◆ isIdentityMaskImpl()

static bool isIdentityMaskImpl ( ArrayRef< int >  Mask,
int  NumOpElts 
)
static

◆ isReplicationMaskWithParams()

static bool isReplicationMaskWithParams ( ArrayRef< int >  Mask,
int  ReplicationFactor,
int  VF 
)
static

◆ isSingleSourceMaskImpl()

static bool isSingleSourceMaskImpl ( ArrayRef< int >  Mask,
int  NumOpElts 
)
static

Variable Documentation

◆ DisableI2pP2iOpt

cl::opt< bool > DisableI2pP2iOpt("disable-i2p-p2i-opt", cl::init(false), cl::desc("Disables inttoptr/ptrtoint roundtrip optimization")) ( "disable-i2p-p2i-opt"  ,
cl::init(false)  ,
cl::desc("Disables inttoptr/ptrtoint roundtrip optimization")   
)
static