class ConstantVector

Declaration

class ConstantVector : public ConstantAggregate { /* full declaration omitted */ };

Description

Constant Vector Declarations

Declared at: llvm/include/llvm/IR/Constants.h:494

Inherits from: ConstantAggregate

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • private ConstantVector(llvm::VectorType * T, ArrayRef<llvm::Constant *> Val)
  • public static bool classof(const llvm::Value * V)
  • private void destroyConstantImpl()
  • public static llvm::Constant * get(ArrayRef<llvm::Constant *> V)
  • private static llvm::Constant * getImpl(ArrayRef<llvm::Constant *> V)
  • public static llvm::Constant * getSplat(llvm::ElementCount EC, llvm::Constant * Elt)
  • public llvm::Constant * getSplatValue(bool AllowUndefs = false) const
  • public inline llvm::FixedVectorType * getType() const
  • private llvm::Value * handleOperandChangeImpl(llvm::Value * From, llvm::Value * To)

Inherited from ConstantAggregate:

Inherited from Constant:

Inherited from User:

Inherited from Value:

Methods

ConstantVector(llvm::VectorType* T,
               ArrayRef<llvm::Constant*> Val)

Declared at: llvm/include/llvm/IR/Constants.h:498

Parameters

llvm::VectorType* T
ArrayRef<llvm::Constant*> Val

static bool classof(const llvm::Value* V)

Description

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

Declared at: llvm/include/llvm/IR/Constants.h:527

Parameters

const llvm::Value* V

void destroyConstantImpl()

Declared at: llvm/include/llvm/IR/Constants.h:500

static llvm::Constant* get(
    ArrayRef<llvm::Constant*> V)

Declared at: llvm/include/llvm/IR/Constants.h:505

Parameters

ArrayRef<llvm::Constant*> V

static llvm::Constant* getImpl(
    ArrayRef<llvm::Constant*> V)

Declared at: llvm/include/llvm/IR/Constants.h:508

Parameters

ArrayRef<llvm::Constant*> V

static llvm::Constant* getSplat(
    llvm::ElementCount EC,
    llvm::Constant* Elt)

Description

Return a ConstantVector with the specified constant in each element. Note that this might not return an instance of ConstantVector

Declared at: llvm/include/llvm/IR/Constants.h:513

Parameters

llvm::ElementCount EC
llvm::Constant* Elt

llvm::Constant* getSplatValue(
    bool AllowUndefs = false) const

Description

If all elements of the vector constant have the same value, return that value. Otherwise, return nullptr. Ignore undefined elements by setting AllowUndefs to true.

Declared at: llvm/include/llvm/IR/Constants.h:524

Parameters

bool AllowUndefs = false

inline llvm::FixedVectorType* getType() const

Description

Specialize the getType() method to always return a FixedVectorType, which reduces the amount of casting needed in parts of the compiler.

Declared at: llvm/include/llvm/IR/Constants.h:517

llvm::Value* handleOperandChangeImpl(
    llvm::Value* From,
    llvm::Value* To)

Declared at: llvm/include/llvm/IR/Constants.h:501

Parameters

llvm::Value* From
llvm::Value* To