LLVM  14.0.0git
Classes | Public Member Functions | List of all members
llvm::SetState< BaseTy > Struct Template Reference

Simple state for a set. More...

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

Inheritance diagram for llvm::SetState< BaseTy >:
Inheritance graph
[legend]
Collaboration diagram for llvm::SetState< BaseTy >:
Collaboration graph
[legend]

Classes

struct  SetContents
 A wrapper around a set that has semantics for handling unions and intersections with a "universal" set that contains all elements. More...
 

Public Member Functions

 SetState ()
 
 SetState (const DenseSet< BaseTy > &Known)
 Initializes the known state with an initial set and initializes the assumed state as universal. More...
 
bool isValidState () const override
 See AbstractState::isValidState() More...
 
bool isAtFixpoint () const override
 See AbstractState::isAtFixpoint() More...
 
ChangeStatus indicateOptimisticFixpoint () override
 See AbstractState::indicateOptimisticFixpoint(...) More...
 
ChangeStatus indicatePessimisticFixpoint () override
 See AbstractState::indicatePessimisticFixpoint(...) More...
 
const SetContentsgetKnown () const
 Return the known state encoding. More...
 
const SetContentsgetAssumed () const
 Return the assumed state encoding. More...
 
bool setContains (const BaseTy &Elem) const
 Returns if the set state contains the element. More...
 
bool getIntersection (const SetContents &RHS)
 Performs the set intersection between this set and RHS. More...
 
bool getUnion (const SetContents &RHS)
 Performs the set union between this set and RHS. More...
 
- Public Member Functions inherited from llvm::AbstractState
virtual ~AbstractState ()
 

Detailed Description

template<typename BaseTy>
struct llvm::SetState< BaseTy >

Simple state for a set.

This represents a state containing a set of values. The interface supports modelling sets that contain all possible elements. The state's internal value is modified using union or intersection operations.

Definition at line 2528 of file Attributor.h.

Constructor & Destructor Documentation

◆ SetState() [1/2]

template<typename BaseTy >
llvm::SetState< BaseTy >::SetState ( )
inline

Definition at line 2590 of file Attributor.h.

◆ SetState() [2/2]

template<typename BaseTy >
llvm::SetState< BaseTy >::SetState ( const DenseSet< BaseTy > &  Known)
inline

Initializes the known state with an initial set and initializes the assumed state as universal.

Definition at line 2594 of file Attributor.h.

Member Function Documentation

◆ getAssumed()

template<typename BaseTy >
const SetContents& llvm::SetState< BaseTy >::getAssumed ( ) const
inline

Return the assumed state encoding.

Definition at line 2621 of file Attributor.h.

◆ getIntersection()

template<typename BaseTy >
bool llvm::SetState< BaseTy >::getIntersection ( const SetContents RHS)
inline

Performs the set intersection between this set and RHS.

Returns true if changes were made.

Definition at line 2630 of file Attributor.h.

◆ getKnown()

template<typename BaseTy >
const SetContents& llvm::SetState< BaseTy >::getKnown ( ) const
inline

Return the known state encoding.

Definition at line 2618 of file Attributor.h.

◆ getUnion()

template<typename BaseTy >
bool llvm::SetState< BaseTy >::getUnion ( const SetContents RHS)
inline

Performs the set union between this set and RHS.

Returns true if changes were made.

Definition at line 2643 of file Attributor.h.

◆ indicateOptimisticFixpoint()

template<typename BaseTy >
ChangeStatus llvm::SetState< BaseTy >::indicateOptimisticFixpoint ( )
inlineoverridevirtual

See AbstractState::indicateOptimisticFixpoint(...)

Implements llvm::AbstractState.

Definition at line 2604 of file Attributor.h.

◆ indicatePessimisticFixpoint()

template<typename BaseTy >
ChangeStatus llvm::SetState< BaseTy >::indicatePessimisticFixpoint ( )
inlineoverridevirtual

See AbstractState::indicatePessimisticFixpoint(...)

Implements llvm::AbstractState.

Definition at line 2611 of file Attributor.h.

◆ isAtFixpoint()

template<typename BaseTy >
bool llvm::SetState< BaseTy >::isAtFixpoint ( ) const
inlineoverridevirtual

See AbstractState::isAtFixpoint()

Implements llvm::AbstractState.

Definition at line 2601 of file Attributor.h.

◆ isValidState()

template<typename BaseTy >
bool llvm::SetState< BaseTy >::isValidState ( ) const
inlineoverridevirtual

See AbstractState::isValidState()

Implements llvm::AbstractState.

Definition at line 2598 of file Attributor.h.

◆ setContains()

template<typename BaseTy >
bool llvm::SetState< BaseTy >::setContains ( const BaseTy &  Elem) const
inline

Returns if the set state contains the element.

Definition at line 2624 of file Attributor.h.


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