struct PotentialValuesState

Declaration

template <typename MemberTy>
struct PotentialValuesState : public AbstractState { /* full declaration omitted */ };

Description

A class for a set state. The assumed boolean state indicates whether the corresponding set is full set or not. If the assumed state is false, this is the worst state. The worst state (invalid state) of set of potential values is when the set contains every possible value (i.e. we cannot in any way limit the value that the target position can take). That never happens naturally, we only force it. As for the conditions under which we force it, see AAPotentialConstantValues.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4351

Inherits from: AbstractState

Templates

MemberTy

Member Variables

private llvm::BooleanState IsValidState
A helper state which indicate whether this state is valid or not.
private llvm::PotentialValuesState::SetTy Set
Container for potential values
private bool UndefIsContained
Flag for undef value
public static unsigned int MaxPotentialValues
Maximum number of potential values to be tracked. This is set by -attributor-max-potential-values command line option

Method Overview

Inherited from AbstractState:

Methods

PotentialValuesState<MemberTy>(bool IsValid)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4356

Parameters

bool IsValid

PotentialValuesState<MemberTy>()

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4354

void checkAndInvalidate()

Description

Check the size of this set, and invalidate when the size is no less than \p MaxPotentialValues threshold.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4455

bool contains(const MemberTy& V) const

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4442

Parameters

const MemberTy& V

PotentialValuesState<MemberTy>& getAssumed()

Description

Return the assumed state

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4376

const PotentialValuesState<MemberTy>& getAssumed()
    const

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4377

llvm::PotentialValuesState::SetTy& getAssumedSet()

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4447

const llvm::PotentialValuesState::SetTy&
getAssumedSet() const

Description

Return this set. We should check whether this set is valid or not by isValidState() before calling this function.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4381

static PotentialValuesState<MemberTy>
getBestState(
    const PotentialValuesState<MemberTy>& PVS)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4411

Parameters

const PotentialValuesState<MemberTy>& PVS

static PotentialValuesState<MemberTy>
getBestState()

Description

Return empty set as the best state of potential values.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4407

static PotentialValuesState<MemberTy>
getWorstState()

Description

Return full set as the worst state of potential values.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4416

llvm::ChangeStatus indicateOptimisticFixpoint()

Description

See AbstractState::indicateOptimisticFixpoint(...)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4371

llvm::ChangeStatus indicatePessimisticFixpoint()

Description

See AbstractState::indicatePessimisticFixpoint(...)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4366

void insert(const MemberTy& C)

Description

Insert an element into this set.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4467

Parameters

const MemberTy& C

void intersectWith(
    const PotentialValuesState<MemberTy>& R)

Description

Take intersection with R.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4497

Parameters

const PotentialValuesState<MemberTy>& R

bool isAtFixpoint() const

Description

See AbstractState::isAtFixpoint(...)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4363

bool isValidState() const

Description

See AbstractState::isValidState(...)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4360

void reduceUndefValue()

Description

If this state contains both undef and not undef, we can reduce undef to the not undef value.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4464

bool undefIsContained() const

Description

Returns whether this state contains an undef value or not.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4387

void unionAssumed(const MemberTy& C)

Description

Union assumed set with the passed value.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4421

Parameters

const MemberTy& C

void unionAssumed(
    const PotentialValuesState<MemberTy>& PVS)

Description

Union assumed set with assumed set of the passed state \p PVS.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4424

Parameters

const PotentialValuesState<MemberTy>& PVS

void unionAssumedWithUndef()

Description

Union assumed set with an undef value.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4427

void unionWith(
    const PotentialValuesState<MemberTy>& R)

Description

Take union with R.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4475

Parameters

const PotentialValuesState<MemberTy>& R

void unionWithUndef()

Description

Take union with an undef value.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4491