LLVM 20.0.0git
|
A class for a set state. More...
#include "llvm/Transforms/IPO/Attributor.h"
Public Types | |
using | SetTy = SmallSetVector< MemberTy, 8 > |
Public Member Functions | |
PotentialValuesState () | |
PotentialValuesState (bool IsValid) | |
bool | isValidState () const override |
See AbstractState::isValidState(...) | |
bool | isAtFixpoint () const override |
See AbstractState::isAtFixpoint(...) | |
ChangeStatus | indicatePessimisticFixpoint () override |
See AbstractState::indicatePessimisticFixpoint(...) | |
ChangeStatus | indicateOptimisticFixpoint () override |
See AbstractState::indicateOptimisticFixpoint(...) | |
PotentialValuesState & | getAssumed () |
Return the assumed state. | |
const PotentialValuesState & | getAssumed () const |
const SetTy & | getAssumedSet () const |
Return this set. | |
bool | undefIsContained () const |
Returns whether this state contains an undef value or not. | |
bool | operator== (const PotentialValuesState &RHS) const |
void | unionAssumed (const MemberTy &C) |
Union assumed set with the passed value. | |
void | unionAssumed (const PotentialValuesState &PVS) |
Union assumed set with assumed set of the passed state PVS . | |
void | unionAssumedWithUndef () |
Union assumed set with an undef value. | |
PotentialValuesState | operator^= (const PotentialValuesState &PVS) |
"Clamp" this state with PVS . | |
PotentialValuesState | operator&= (const PotentialValuesState &PVS) |
bool | contains (const MemberTy &V) const |
Public Member Functions inherited from llvm::AbstractState | |
virtual | ~AbstractState ()=default |
virtual bool | isValidState () const =0 |
Return if this abstract state is in a valid state. | |
virtual bool | isAtFixpoint () const =0 |
Return if this abstract state is fixed, thus does not need to be updated if information changes as it cannot change itself. | |
virtual ChangeStatus | indicateOptimisticFixpoint ()=0 |
Indicate that the abstract state should converge to the optimistic state. | |
virtual ChangeStatus | indicatePessimisticFixpoint ()=0 |
Indicate that the abstract state should converge to the pessimistic state. | |
Static Public Member Functions | |
static PotentialValuesState | getBestState () |
Return empty set as the best state of potential values. | |
static PotentialValuesState | getBestState (const PotentialValuesState &PVS) |
static PotentialValuesState | getWorstState () |
Return full set as the worst state of potential values. | |
Static Public Attributes | |
static unsigned | MaxPotentialValues = 0 |
Maximum number of potential values to be tracked. | |
Protected Member Functions | |
SetTy & | getAssumedSet () |
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.
Definition at line 4959 of file Attributor.h.
using llvm::PotentialValuesState< MemberTy >::SetTy = SmallSetVector<MemberTy, 8> |
Definition at line 4960 of file Attributor.h.
|
inline |
Definition at line 4962 of file Attributor.h.
Referenced by llvm::PotentialValuesState< MemberTy >::getBestState(), and llvm::PotentialValuesState< MemberTy >::getWorstState().
|
inline |
Definition at line 4964 of file Attributor.h.
|
inline |
Definition at line 5050 of file Attributor.h.
References llvm::SetVector< T, Vector, Set, N >::contains(), llvm::PotentialValuesState< MemberTy >::isValidState(), and true.
|
inline |
Return the assumed state.
Definition at line 4984 of file Attributor.h.
|
inline |
Definition at line 4985 of file Attributor.h.
|
inlineprotected |
Definition at line 5055 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
|
inline |
Return this set.
We should check whether this set is valid or not by isValidState() before calling this function.
Definition at line 4989 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstant(), and llvm::operator<<().
|
inlinestatic |
Return empty set as the best state of potential values.
Definition at line 5015 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::PotentialValuesState().
Referenced by llvm::PotentialValuesState< MemberTy >::getBestState().
|
inlinestatic |
Definition at line 5019 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::getBestState().
|
inlinestatic |
Return full set as the worst state of potential values.
Definition at line 5024 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::PotentialValuesState().
|
inlineoverridevirtual |
See AbstractState::indicateOptimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4979 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicateOptimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::indicatePessimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4974 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicatePessimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::isAtFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4971 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isAtFixpoint().
|
inlineoverridevirtual |
See AbstractState::isValidState(...)
Implements llvm::AbstractState.
Definition at line 4968 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isValidState().
Referenced by llvm::PotentialValuesState< MemberTy >::contains(), llvm::AAPotentialConstantValues::getAssumedConstant(), llvm::PotentialValuesState< MemberTy >::getAssumedSet(), llvm::operator<<(), llvm::PotentialValuesState< MemberTy >::operator==(), and llvm::PotentialValuesState< MemberTy >::undefIsContained().
|
inline |
Definition at line 5044 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::unionAssumed().
|
inline |
Definition at line 5000 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::isValidState(), RHS, and llvm::PotentialValuesState< MemberTy >::undefIsContained().
|
inline |
"Clamp" this state with PVS
.
Definition at line 5038 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::unionAssumed().
|
inline |
Returns whether this state contains an undef value or not.
Definition at line 4995 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstant(), llvm::operator<<(), and llvm::PotentialValuesState< MemberTy >::operator==().
|
inline |
Union assumed set with the passed value.
Definition at line 5029 of file Attributor.h.
References llvm::CallingConv::C.
Referenced by llvm::PotentialValuesState< MemberTy >::operator&=(), and llvm::PotentialValuesState< MemberTy >::operator^=().
|
inline |
Union assumed set with assumed set of the passed state PVS
.
Definition at line 5032 of file Attributor.h.
|
inline |
Union assumed set with an undef value.
Definition at line 5035 of file Attributor.h.
|
static |
Maximum number of potential values to be tracked.
This is set by -attributor-max-potential-values command line option
Definition at line 5012 of file Attributor.h.