LLVM 24.0.0git
llvm::IncIntegerState< base_ty, BestState, WorstState > Struct Template Reference

Specialization of the integer state for an increasing value, hence ~0u is the best state and 0 the worst. More...

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

Inheritance diagram for llvm::IncIntegerState< base_ty, BestState, WorstState >:
[legend]

Public Types

using super = IntegerStateBase<base_ty, BestState, WorstState>
using base_t = base_ty
Public Types inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >
using base_t

Public Member Functions

 IncIntegerState ()
 IncIntegerState (base_t Assumed)
IncIntegerState & takeAssumedMinimum (base_t Value)
 Take minimum of assumed and Value.
IncIntegerState & takeKnownMaximum (base_t Value)
 Take maximum of known and Value.
Public Member Functions inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >
 IntegerStateBase ()=default
bool isValidState () const override
 NOTE: For now we simply pretend that the worst possible state is invalid.
bool isAtFixpoint () const override
 Return if this abstract state is fixed, thus does not need to be updated if information changes as it cannot change itself.
ChangeStatus indicateOptimisticFixpoint () override
 Indicate that the abstract state should converge to the optimistic state.
ChangeStatus indicatePessimisticFixpoint () override
 Indicate that the abstract state should converge to the pessimistic state.
base_t getKnown () const
 Return the known state encoding.
base_t getAssumed () const
 Return the assumed state encoding.
bool operator== (const IntegerStateBase< base_t, BestState, WorstState > &R) const
 Equality for IntegerStateBase.
bool operator!= (const IntegerStateBase< base_t, BestState, WorstState > &R) const
 Inequality for IntegerStateBase.
void operator^= (const IntegerStateBase< base_t, BestState, WorstState > &R)
 "Clamp" this state with R.
void operator+= (const IntegerStateBase< base_t, BestState, WorstState > &R)
 "Clamp" this state with R.
void operator|= (const IntegerStateBase< base_t, BestState, WorstState > &R)
void operator&= (const IntegerStateBase< base_t, BestState, WorstState > &R)
Public Member Functions inherited from llvm::AbstractState
virtual ~AbstractState ()=default

Static Public Member Functions

static constexpr base_t getBestState ()
 Return the best possible representable state.
static constexpr base_t getBestState (const IncIntegerState< base_ty, BestState, WorstState > &)
Static Public Member Functions inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >
static constexpr base_t getBestState ()
 Return the best possible representable state.
static constexpr base_t getWorstState ()
 Return the worst possible representable state.

Additional Inherited Members

Protected Member Functions inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >
virtual void handleNewAssumedValue (base_t Value)=0
 Handle a new assumed value Value. Subtype dependent.
virtual void handleNewKnownValue (base_t Value)=0
 Handle a new known value Value. Subtype dependent.
virtual void joinOR (base_t AssumedValue, base_t KnownValue)=0
 Handle a value Value. Subtype dependent.
virtual void joinAND (base_t AssumedValue, base_t KnownValue)=0
 Handle a new assumed value Value. Subtype dependent.
Protected Attributes inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >
base_t Known
 The known state encoding in an integer of type base_t.
base_t Assumed
 The assumed state encoding in an integer of type base_t.

Detailed Description

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
struct llvm::IncIntegerState< base_ty, BestState, WorstState >

Specialization of the integer state for an increasing value, hence ~0u is the best state and 0 the worst.

Definition at line 2790 of file Attributor.h.

Member Typedef Documentation

◆ base_t

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
using llvm::IncIntegerState< base_ty, BestState, WorstState >::base_t = base_ty

Definition at line 2793 of file Attributor.h.

◆ super

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
using llvm::IncIntegerState< base_ty, BestState, WorstState >::super = IntegerStateBase<base_ty, BestState, WorstState>

Definition at line 2792 of file Attributor.h.

Constructor & Destructor Documentation

◆ IncIntegerState() [1/2]

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
llvm::IncIntegerState< base_ty, BestState, WorstState >::IncIntegerState ( )
inline

Definition at line 2795 of file Attributor.h.

◆ IncIntegerState() [2/2]

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
llvm::IncIntegerState< base_ty, BestState, WorstState >::IncIntegerState ( base_t Assumed)
inline

Definition at line 2796 of file Attributor.h.

Member Function Documentation

◆ getBestState() [1/2]

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
constexpr base_t llvm::IncIntegerState< base_ty, BestState, WorstState >::getBestState ( )
inlinestaticconstexpr

Return the best possible representable state.

Definition at line 2799 of file Attributor.h.

Referenced by llvm::IncIntegerState< uint64_t, Value::MaximumAlignment, 1 >::getBestState().

◆ getBestState() [2/2]

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
constexpr base_t llvm::IncIntegerState< base_ty, BestState, WorstState >::getBestState ( const IncIntegerState< base_ty, BestState, WorstState > & )
inlinestaticconstexpr

Definition at line 2801 of file Attributor.h.

◆ takeAssumedMinimum()

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
IncIntegerState & llvm::IncIntegerState< base_ty, BestState, WorstState >::takeAssumedMinimum ( base_t Value)
inline

Take minimum of assumed and Value.

Definition at line 2806 of file Attributor.h.

◆ takeKnownMaximum()

template<typename base_ty = uint32_t, base_ty BestState = ~base_ty(0), base_ty WorstState = 0>
IncIntegerState & llvm::IncIntegerState< base_ty, BestState, WorstState >::takeKnownMaximum ( base_t Value)
inline

Take maximum of known and Value.

Definition at line 2813 of file Attributor.h.


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