LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::ShuffleVectorInst Class Reference

#include <Instructions.h>

Inheritance diagram for llvm::ShuffleVectorInst:
Inheritance graph
[legend]
Collaboration diagram for llvm::ShuffleVectorInst:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void * operator new (size_t s)
 ShuffleVectorInst (Value *V1, Value *V2, Value *Mask, const Twine &NameStr="", Instruction *InsertBefor=nullptr)
 ShuffleVectorInst (Value *V1, Value *V2, Value *Mask, const Twine &NameStr, BasicBlock *InsertAtEnd)
VectorTypegetType () const
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
ConstantgetMask () const
int getMaskValue (unsigned i) const
void getShuffleMask (SmallVectorImpl< int > &Result) const
SmallVector< int, 16 > getShuffleMask () const

Static Public Member Functions

static bool isValidOperands (const Value *V1, const Value *V2, const Value *Mask)
static int getMaskValue (Constant *Mask, unsigned i)
static void getShuffleMask (Constant *Mask, SmallVectorImpl< int > &Result)
static bool classof (const Instruction *I)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

ShuffleVectorInstclone_impl () const override

Detailed Description

ShuffleVectorInst - This instruction constructs a fixed permutation of two input vectors.

Definition at line 1772 of file Instructions.h.


Constructor & Destructor Documentation

ShuffleVectorInst::ShuffleVectorInst ( Value V1,
Value V2,
Value Mask,
const Twine NameStr = "",
Instruction InsertBefor = nullptr 
)

Definition at line 1542 of file Instructions.cpp.

References isValidOperands(), and llvm::Value::setName().

Referenced by clone_impl().

ShuffleVectorInst::ShuffleVectorInst ( Value V1,
Value V2,
Value Mask,
const Twine NameStr,
BasicBlock InsertAtEnd 
)

Definition at line 1559 of file Instructions.cpp.

References isValidOperands(), and llvm::Value::setName().


Member Function Documentation

static bool llvm::ShuffleVectorInst::classof ( const Instruction I) [inline, static]

Definition at line 1830 of file Instructions.h.

References llvm::Instruction::getOpcode().

static bool llvm::ShuffleVectorInst::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Instruction.

Definition at line 1833 of file Instructions.h.

ShuffleVectorInst * ShuffleVectorInst::clone_impl ( ) const [override, protected, virtual]

Implements llvm::Instruction.

Definition at line 3749 of file Instructions.cpp.

References llvm::User::getOperand(), and ShuffleVectorInst().

Transparently provide more efficient getOperand methods.

Definition at line 1801 of file Instructions.h.

int ShuffleVectorInst::getMaskValue ( Constant Mask,
unsigned  i 
) [static]

getMaskValue - Return the index from the shuffle mask for the specified output result. This is either -1 if the element is undef or a number less than 2*numelements.

Definition at line 1628 of file Instructions.cpp.

References llvm::CallingConv::C, llvm::Constant::getAggregateElement(), and getType().

Referenced by llvm::ConstantFoldShuffleVectorInstruction().

Definition at line 1810 of file Instructions.h.

void ShuffleVectorInst::getShuffleMask ( Constant Mask,
SmallVectorImpl< int > &  Result 
) [static]

getShuffleMask - Return the full mask for this instruction, where each element is the element number and undef's are returned as -1.

Definition at line 1640 of file Instructions.cpp.

References llvm::Constant::getAggregateElement(), llvm::Value::getType(), llvm::Type::getVectorNumElements(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by isBroadcastShuffle(), matchPairwiseShuffleMask(), matchVectorSplittingReduction(), and llvm::InstCombiner::visitShuffleVectorInst().

void llvm::ShuffleVectorInst::getShuffleMask ( SmallVectorImpl< int > &  Result) const [inline]

Definition at line 1818 of file Instructions.h.

Definition at line 1822 of file Instructions.h.

getType - Overload to return most specific vector type.

Reimplemented from llvm::Value.

Definition at line 1794 of file Instructions.h.

References llvm::Value::getType().

Referenced by getMaskValue(), matchPairwiseShuffleMask(), llvm::Interpreter::visitShuffleVectorInst(), and llvm::InstCombiner::visitShuffleVectorInst().

bool ShuffleVectorInst::isValidOperands ( const Value V1,
const Value V2,
const Value Mask 
) [static]

isValidOperands - Return true if a shufflevector instruction can be formed with the specified operands.

Definition at line 1577 of file Instructions.cpp.

References llvm::WinEH::CE, llvm::dyn_cast(), llvm::SequentialType::getElementType(), llvm::VectorType::getNumElements(), llvm::Value::getType(), llvm::Type::isIntegerTy(), llvm::Type::isVectorTy(), llvm::User::Op(), and llvm::UserOp1.

Referenced by llvm::ConstantExpr::getShuffleVector(), and ShuffleVectorInst().

void* llvm::ShuffleVectorInst::operator new ( size_t  s) [inline]

Reimplemented from llvm::User.

Definition at line 1778 of file Instructions.h.


The documentation for this class was generated from the following files: