struct ValueSimplifyStateType

Declaration

struct ValueSimplifyStateType : public AbstractState { /* full declaration omitted */ };

Description

An interface to query the internal state of an abstract attribute. The abstract state is a minimal interface that allows the Attributor to communicate with the abstract attributes about their internal state without enforcing or exposing implementation details, e.g., the (existence of an) underlying lattice. It is sufficient to be able to query if a state is (1) valid or invalid, (2) at a fixpoint, and to indicate to the state that (3) an optimistic fixpoint was reached or (4) a pessimistic fixpoint was enforced. All methods need to be implemented by the subclass. For the common use case, a single boolean state or a bit-encoded state, the BooleanState and {Inc,Dec,Bit}IntegerState classes are already provided. An abstract attribute can inherit from them to get the abstract state interface and additional methods to directly modify the state based if needed. See the class comments for help.

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

Inherits from: AbstractState

Member Variables

protected llvm::Type* Ty
The type of the original value.
protected llvm::BooleanState BS
Helper to track validity and fixpoint
protected Optional<llvm::Value*> SimplifiedAssociatedValue
An assumed simplified value. Initially, it is set to Optional::None, which means that the value is not clear under current assumption. If in the pessimistic state, getAssumedSimplifiedValue doesn't return this value but returns orignal associated value.

Method Overview

Inherited from AbstractState:

Methods

ValueSimplifyStateType(llvm::Type* Ty)

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

Parameters

llvm::Type* Ty

llvm::ValueSimplifyStateType getAssumed()

Description

Return the assumed state encoding.

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

const llvm::ValueSimplifyStateType& getAssumed()
    const

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

static llvm::ValueSimplifyStateType getBestState(
    llvm::Type* Ty)

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

Parameters

llvm::Type* Ty

static llvm::ValueSimplifyStateType getBestState(
    const llvm::ValueSimplifyStateType& VS)

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

Parameters

const llvm::ValueSimplifyStateType& VS

static llvm::ValueSimplifyStateType getWorstState(
    llvm::Type* Ty)

Description

Return the worst possible representable state.

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

Parameters

llvm::Type* Ty

static llvm::ValueSimplifyStateType getWorstState(
    const llvm::ValueSimplifyStateType& VS)

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

Parameters

const llvm::ValueSimplifyStateType& VS

llvm::ChangeStatus indicateOptimisticFixpoint()

Description

See AbstractState::indicateOptimisticFixpoint(...)

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

llvm::ChangeStatus indicatePessimisticFixpoint()

Description

See AbstractState::indicatePessimisticFixpoint(...)

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

bool isAtFixpoint() const

Description

See AbstractState::isAtFixpoint(...)

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

bool isValidState() const

Description

See AbstractState::isValidState(...)

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

bool unionAssumed(Optional<llvm::Value*> Other)

Description

Merge \p Other into the currently assumed simplified value

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

Parameters

Optional<llvm::Value*> Other