class LinearPolySize

Declaration

template <typename LeafTy>
class LinearPolySize { /* full declaration omitted */ };

Description

LinearPolySize is a base class to represent sizes. It is either fixed-sized or it is scalable-sized, but it cannot be both.

Declared at: llvm/include/llvm/Support/TypeSize.h:264

Templates

LeafTy

Method Overview

  • protected LinearPolySize<LeafTy>(const UnivariateLinearPolyBase<LeafTy> & V)
  • protected LinearPolySize<LeafTy>(llvm::LinearPolySize::ScalarTy MinVal, llvm::LinearPolySize::Dims D)
  • public LeafTy coefficientNextPowerOf2() const
  • public LeafTy divideCoefficientBy(llvm::LinearPolySize::ScalarTy RHS) const
  • public static LeafTy get(llvm::LinearPolySize::ScalarTy MinVal, bool Scalable)
  • public static LeafTy getFixed(llvm::LinearPolySize::ScalarTy MinVal)
  • public llvm::LinearPolySize::ScalarTy getFixedValue() const
  • public llvm::LinearPolySize::ScalarTy getKnownMinValue() const
  • public llvm::LinearPolySize::ScalarTy getKnownScalarFactor(const LinearPolySize<LeafTy> & RHS) const
  • public static LeafTy getNull()
  • public static LeafTy getScalable(llvm::LinearPolySize::ScalarTy MinVal)
  • public bool hasKnownScalarFactor(const LinearPolySize<LeafTy> & RHS) const
  • public bool isKnownEven() const
  • public static bool isKnownGE(const LinearPolySize<LeafTy> & LHS, const LinearPolySize<LeafTy> & RHS)
  • public static bool isKnownGT(const LinearPolySize<LeafTy> & LHS, const LinearPolySize<LeafTy> & RHS)
  • public static bool isKnownLE(const LinearPolySize<LeafTy> & LHS, const LinearPolySize<LeafTy> & RHS)
  • public static bool isKnownLT(const LinearPolySize<LeafTy> & LHS, const LinearPolySize<LeafTy> & RHS)
  • public bool isKnownMultipleOf(llvm::LinearPolySize::ScalarTy RHS) const
  • public bool isScalable() const
  • public LeafTy multiplyCoefficientBy(llvm::LinearPolySize::ScalarTy RHS) const
  • public void print(llvm::raw_ostream & OS) const

Methods

LinearPolySize<LeafTy>(
    const UnivariateLinearPolyBase<LeafTy>& V)

Declared at: llvm/include/llvm/Support/TypeSize.h:278

Parameters

const UnivariateLinearPolyBase<LeafTy>& V

LinearPolySize<LeafTy>(
    llvm::LinearPolySize::ScalarTy MinVal,
    llvm::LinearPolySize::Dims D)

Declared at: llvm/include/llvm/Support/TypeSize.h:275

Parameters

llvm::LinearPolySize::ScalarTy MinVal
llvm::LinearPolySize::Dims D

LeafTy coefficientNextPowerOf2() const

Declared at: llvm/include/llvm/Support/TypeSize.h:370

LeafTy divideCoefficientBy(
    llvm::LinearPolySize::ScalarTy RHS) const

Description

We do not provide the '/' operator here because division for polynomial types does not work in the same way as for normal integer types. We can only divide the minimum value (or coefficient) by RHS, which is not the same as (Min * Vscale) / RHS The caller is recommended to use this function in combination with isKnownMultipleOf(RHS), which lets the caller know if it's possible to perform a lossless divide by RHS.

Declared at: llvm/include/llvm/Support/TypeSize.h:360

Parameters

llvm::LinearPolySize::ScalarTy RHS

static LeafTy get(
    llvm::LinearPolySize::ScalarTy MinVal,
    bool Scalable)

Declared at: llvm/include/llvm/Support/TypeSize.h:289

Parameters

llvm::LinearPolySize::ScalarTy MinVal
bool Scalable

static LeafTy getFixed(
    llvm::LinearPolySize::ScalarTy MinVal)

Declared at: llvm/include/llvm/Support/TypeSize.h:283

Parameters

llvm::LinearPolySize::ScalarTy MinVal

llvm::LinearPolySize::ScalarTy getFixedValue()
    const

Declared at: llvm/include/llvm/Support/TypeSize.h:312

llvm::LinearPolySize::ScalarTy getKnownMinValue()
    const

Description

Returns the minimum value this size can represent.

Declared at: llvm/include/llvm/Support/TypeSize.h:296

llvm::LinearPolySize::ScalarTy
getKnownScalarFactor(
    const LinearPolySize<LeafTy>& RHS) const

Description

Returns a value X where RHS.multiplyCoefficientBy(X) will result in a value whose size matches our own.

Declared at: llvm/include/llvm/Support/TypeSize.h:385

Parameters

const LinearPolySize<LeafTy>& RHS

static LeafTy getNull()

Declared at: llvm/include/llvm/Support/TypeSize.h:293

static LeafTy getScalable(
    llvm::LinearPolySize::ScalarTy MinVal)

Declared at: llvm/include/llvm/Support/TypeSize.h:286

Parameters

llvm::LinearPolySize::ScalarTy MinVal

bool hasKnownScalarFactor(
    const LinearPolySize<LeafTy>& RHS) const

Description

Returns true if there exists a value X where RHS.multiplyCoefficientBy(X) will result in a value whose size matches our own.

Declared at: llvm/include/llvm/Support/TypeSize.h:378

Parameters

const LinearPolySize<LeafTy>& RHS

bool isKnownEven() const

Description

A return value of true indicates we know at compile time that the number of elements (vscale * Min) is definitely even. However, returning false does not guarantee that the total number of elements is odd.

Declared at: llvm/include/llvm/Support/TypeSize.h:302

static bool isKnownGE(
    const LinearPolySize<LeafTy>& LHS,
    const LinearPolySize<LeafTy>& RHS)

Declared at: llvm/include/llvm/Support/TypeSize.h:346

Parameters

const LinearPolySize<LeafTy>& LHS
const LinearPolySize<LeafTy>& RHS

static bool isKnownGT(
    const LinearPolySize<LeafTy>& LHS,
    const LinearPolySize<LeafTy>& RHS)

Declared at: llvm/include/llvm/Support/TypeSize.h:334

Parameters

const LinearPolySize<LeafTy>& LHS
const LinearPolySize<LeafTy>& RHS

static bool isKnownLE(
    const LinearPolySize<LeafTy>& LHS,
    const LinearPolySize<LeafTy>& RHS)

Declared at: llvm/include/llvm/Support/TypeSize.h:340

Parameters

const LinearPolySize<LeafTy>& LHS
const LinearPolySize<LeafTy>& RHS

static bool isKnownLT(
    const LinearPolySize<LeafTy>& LHS,
    const LinearPolySize<LeafTy>& RHS)

Declared at: llvm/include/llvm/Support/TypeSize.h:328

Parameters

const LinearPolySize<LeafTy>& LHS
const LinearPolySize<LeafTy>& RHS

bool isKnownMultipleOf(
    llvm::LinearPolySize::ScalarTy RHS) const

Description

This function tells the caller whether the element count is known at compile time to be a multiple of the scalar value RHS.

Declared at: llvm/include/llvm/Support/TypeSize.h:305

Parameters

llvm::LinearPolySize::ScalarTy RHS

bool isScalable() const

Description

Returns whether the size is scaled by a runtime quantity (vscale).

Declared at: llvm/include/llvm/Support/TypeSize.h:298

LeafTy multiplyCoefficientBy(
    llvm::LinearPolySize::ScalarTy RHS) const

Declared at: llvm/include/llvm/Support/TypeSize.h:365

Parameters

llvm::LinearPolySize::ScalarTy RHS

void print(llvm::raw_ostream& OS) const

Description

Printing function.

Declared at: llvm/include/llvm/Support/TypeSize.h:391

Parameters

llvm::raw_ostream& OS