LLVM  14.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::ValueSimplifyStateType Struct Reference

#include "llvm/Transforms/IPO/Attributor.h"

Inheritance diagram for llvm::ValueSimplifyStateType:
Inheritance graph
[legend]
Collaboration diagram for llvm::ValueSimplifyStateType:
Collaboration graph
[legend]

Public Member Functions

 ValueSimplifyStateType (Type *Ty)
 
bool isValidState () const override
 See AbstractState::isValidState(...) More...
 
bool isAtFixpoint () const override
 See AbstractState::isAtFixpoint(...) More...
 
ValueSimplifyStateType getAssumed ()
 Return the assumed state encoding. More...
 
const ValueSimplifyStateTypegetAssumed () const
 
ChangeStatus indicatePessimisticFixpoint () override
 See AbstractState::indicatePessimisticFixpoint(...) More...
 
ChangeStatus indicateOptimisticFixpoint () override
 See AbstractState::indicateOptimisticFixpoint(...) More...
 
ValueSimplifyStateType operator^= (const ValueSimplifyStateType &VS)
 "Clamp" this state with PVS. More...
 
bool operator== (const ValueSimplifyStateType &RHS) const
 
- Public Member Functions inherited from llvm::AbstractState
virtual ~AbstractState ()
 

Static Public Member Functions

static ValueSimplifyStateType getBestState (Type *Ty)
 
static ValueSimplifyStateType getBestState (const ValueSimplifyStateType &VS)
 
static ValueSimplifyStateType getWorstState (Type *Ty)
 Return the worst possible representable state. More...
 
static ValueSimplifyStateType getWorstState (const ValueSimplifyStateType &VS)
 

Protected Member Functions

bool unionAssumed (Optional< Value * > Other)
 Merge Other into the currently assumed simplified value. More...
 

Protected Attributes

TypeTy
 The type of the original value. More...
 
BooleanState BS
 Helper to track validity and fixpoint. More...
 
Optional< Value * > SimplifiedAssociatedValue
 An assumed simplified value. More...
 

Detailed Description

Definition at line 3650 of file Attributor.h.

Constructor & Destructor Documentation

◆ ValueSimplifyStateType()

llvm::ValueSimplifyStateType::ValueSimplifyStateType ( Type Ty)
inline

Definition at line 3652 of file Attributor.h.

Referenced by getBestState().

Member Function Documentation

◆ getAssumed() [1/2]

ValueSimplifyStateType llvm::ValueSimplifyStateType::getAssumed ( )
inline

Return the assumed state encoding.

Definition at line 3679 of file Attributor.h.

◆ getAssumed() [2/2]

const ValueSimplifyStateType& llvm::ValueSimplifyStateType::getAssumed ( ) const
inline

Definition at line 3680 of file Attributor.h.

◆ getBestState() [1/2]

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

Definition at line 3657 of file Attributor.h.

References getBestState(), and llvm::AArch64CC::VS.

◆ getBestState() [2/2]

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

Definition at line 3654 of file Attributor.h.

References Ty, and ValueSimplifyStateType().

Referenced by getBestState().

◆ getWorstState() [1/2]

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

Definition at line 3668 of file Attributor.h.

References getWorstState(), and llvm::AArch64CC::VS.

◆ getWorstState() [2/2]

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

Return the worst possible representable state.

Definition at line 3662 of file Attributor.h.

References llvm::SIInstrFlags::DS, and Ty.

Referenced by getWorstState().

◆ indicateOptimisticFixpoint()

ChangeStatus llvm::ValueSimplifyStateType::indicateOptimisticFixpoint ( )
inlineoverridevirtual

See AbstractState::indicateOptimisticFixpoint(...)

Implements llvm::AbstractState.

Definition at line 3688 of file Attributor.h.

References BS, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicateOptimisticFixpoint().

◆ indicatePessimisticFixpoint()

ChangeStatus llvm::ValueSimplifyStateType::indicatePessimisticFixpoint ( )
inlineoverridevirtual

See AbstractState::indicatePessimisticFixpoint(...)

Implements llvm::AbstractState.

Definition at line 3683 of file Attributor.h.

References BS, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicatePessimisticFixpoint().

◆ isAtFixpoint()

bool llvm::ValueSimplifyStateType::isAtFixpoint ( ) const
inlineoverridevirtual

See AbstractState::isAtFixpoint(...)

Implements llvm::AbstractState.

Definition at line 3676 of file Attributor.h.

References BS, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::isAtFixpoint().

◆ isValidState()

bool llvm::ValueSimplifyStateType::isValidState ( ) const
inlineoverridevirtual

See AbstractState::isValidState(...)

Implements llvm::AbstractState.

Definition at line 3673 of file Attributor.h.

References BS, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::isValidState().

Referenced by operator==().

◆ operator==()

bool llvm::ValueSimplifyStateType::operator== ( const ValueSimplifyStateType RHS) const
inline

Definition at line 3699 of file Attributor.h.

References isValidState(), RHS, and SimplifiedAssociatedValue.

◆ operator^=()

ValueSimplifyStateType llvm::ValueSimplifyStateType::operator^= ( const ValueSimplifyStateType VS)
inline

"Clamp" this state with PVS.

Definition at line 3693 of file Attributor.h.

References BS, unionAssumed(), and llvm::AArch64CC::VS.

◆ unionAssumed()

bool ValueSimplifyStateType::unionAssumed ( Optional< Value * >  Other)
protected

Merge Other into the currently assumed simplified value.

---------------— Value Simplify Attribute -------------------------—

Definition at line 5113 of file AttributorAttributes.cpp.

References llvm::AA::combineOptionalValuesInAAValueLatice(), llvm::dbgs(), LLVM_DEBUG, and Other.

Referenced by operator^=().

Member Data Documentation

◆ BS

BooleanState llvm::ValueSimplifyStateType::BS
protected

Helper to track validity and fixpoint.

Definition at line 3715 of file Attributor.h.

Referenced by indicateOptimisticFixpoint(), indicatePessimisticFixpoint(), isAtFixpoint(), isValidState(), and operator^=().

◆ SimplifiedAssociatedValue

Optional<Value *> llvm::ValueSimplifyStateType::SimplifiedAssociatedValue
protected

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.

Definition at line 3721 of file Attributor.h.

Referenced by operator==().

◆ Ty

Type* llvm::ValueSimplifyStateType::Ty
protected

The type of the original value.

Definition at line 3709 of file Attributor.h.

Referenced by getBestState(), and getWorstState().


The documentation for this struct was generated from the following files: