class ConstantVector

Declaration

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

Description

Constant Vector Declarations

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

Inherits from: ConstantAggregate

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 29
public static MaximumAlignment = 1U << MaxAlignmentExponent

Method Overview

  • public static bool classof(const llvm::Value * V)
  • public static llvm::Constant * get(ArrayRef<llvm::Constant *> V)
  • public static llvm::Constant * getSplat(unsigned int NumElts, llvm::Constant * Elt)
  • public llvm::Constant * getSplatValue(bool AllowUndefs = false) const
  • public inline llvm::VectorType * getType() const

Inherited from ConstantAggregate:

Inherited from Constant:

Inherited from User:

Inherited from Value:

Methods

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:531

Parameters

const llvm::Value* V

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

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

Parameters

ArrayRef<llvm::Constant*> V

static llvm::Constant* getSplat(
    unsigned int NumElts,
    llvm::Constant* Elt)

Description

Return a ConstantVector with the specified constant in each element.

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

Parameters

unsigned int NumElts
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:528

Parameters

bool AllowUndefs = false

inline llvm::VectorType* getType() const

Description

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

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