LLVM
17.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(...) More... | |
bool | isAtFixpoint () const override |
See AbstractState::isAtFixpoint(...) More... | |
ChangeStatus | indicatePessimisticFixpoint () override |
See AbstractState::indicatePessimisticFixpoint(...) More... | |
ChangeStatus | indicateOptimisticFixpoint () override |
See AbstractState::indicateOptimisticFixpoint(...) More... | |
PotentialValuesState & | getAssumed () |
Return the assumed state. More... | |
const PotentialValuesState & | getAssumed () const |
const SetTy & | getAssumedSet () const |
Return this set. More... | |
bool | undefIsContained () const |
Returns whether this state contains an undef value or not. More... | |
bool | operator== (const PotentialValuesState &RHS) const |
void | unionAssumed (const MemberTy &C) |
Union assumed set with the passed value. More... | |
void | unionAssumed (const PotentialValuesState &PVS) |
Union assumed set with assumed set of the passed state PVS . More... | |
void | unionAssumedWithUndef () |
Union assumed set with an undef value. More... | |
PotentialValuesState | operator^= (const PotentialValuesState &PVS) |
"Clamp" this state with PVS . More... | |
PotentialValuesState | operator&= (const PotentialValuesState &PVS) |
bool | contains (const MemberTy &V) const |
![]() | |
virtual | ~AbstractState ()=default |
Static Public Member Functions | |
static PotentialValuesState | getBestState () |
Return empty set as the best state of potential values. More... | |
static PotentialValuesState | getBestState (const PotentialValuesState &PVS) |
static PotentialValuesState | getWorstState () |
Return full set as the worst state of potential values. More... | |
Static Public Attributes | |
static unsigned | MaxPotentialValues = 0 |
Maximum number of potential values to be tracked. More... | |
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 4520 of file Attributor.h.
using llvm::PotentialValuesState< MemberTy >::SetTy = SmallSetVector<MemberTy, 8> |
Definition at line 4521 of file Attributor.h.
|
inline |
Definition at line 4523 of file Attributor.h.
Referenced by llvm::PotentialValuesState< MemberTy >::getBestState(), and llvm::PotentialValuesState< MemberTy >::getWorstState().
|
inline |
Definition at line 4525 of file Attributor.h.
|
inline |
Definition at line 4611 of file Attributor.h.
References llvm::SetVector< T, Vector, Set >::contains(), llvm::PotentialValuesState< MemberTy >::isValidState(), and true.
|
inline |
Return the assumed state.
Definition at line 4545 of file Attributor.h.
|
inline |
Definition at line 4546 of file Attributor.h.
|
inlineprotected |
Definition at line 4616 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 4550 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstant().
|
inlinestatic |
Return empty set as the best state of potential values.
Definition at line 4576 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::PotentialValuesState().
Referenced by llvm::PotentialValuesState< MemberTy >::getBestState().
|
inlinestatic |
Definition at line 4580 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::getBestState().
|
inlinestatic |
Return full set as the worst state of potential values.
Definition at line 4585 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::PotentialValuesState().
|
inlineoverridevirtual |
See AbstractState::indicateOptimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4540 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicateOptimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::indicatePessimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4535 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicatePessimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::isAtFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4532 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isAtFixpoint().
|
inlineoverridevirtual |
See AbstractState::isValidState(...)
Implements llvm::AbstractState.
Definition at line 4529 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::PotentialValuesState< MemberTy >::operator==(), and llvm::PotentialValuesState< MemberTy >::undefIsContained().
|
inline |
Definition at line 4605 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::unionAssumed().
|
inline |
Definition at line 4561 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::isValidState(), RHS, and llvm::PotentialValuesState< MemberTy >::undefIsContained().
|
inline |
"Clamp" this state with PVS
.
Definition at line 4599 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::unionAssumed().
|
inline |
Returns whether this state contains an undef value or not.
Definition at line 4556 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstant(), and llvm::PotentialValuesState< MemberTy >::operator==().
|
inline |
Union assumed set with the passed value.
Definition at line 4590 of file Attributor.h.
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 4593 of file Attributor.h.
|
inline |
Union assumed set with an undef value.
Definition at line 4596 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 4573 of file Attributor.h.