LLVM
15.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) |
![]() | |
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 4293 of file Attributor.h.
using llvm::PotentialValuesState< MemberTy >::SetTy = SmallSetVector<MemberTy, 8> |
Definition at line 4294 of file Attributor.h.
|
inline |
Definition at line 4296 of file Attributor.h.
Referenced by llvm::PotentialValuesState< MemberTy >::getBestState(), and llvm::PotentialValuesState< MemberTy >::getWorstState().
|
inline |
Definition at line 4298 of file Attributor.h.
|
inline |
Return the assumed state.
Definition at line 4318 of file Attributor.h.
|
inline |
Definition at line 4319 of file Attributor.h.
|
inlineprotected |
Definition at line 4385 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 4323 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstantInt().
|
inlinestatic |
Return empty set as the best state of potential values.
Definition at line 4349 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::PotentialValuesState().
Referenced by llvm::PotentialValuesState< MemberTy >::getBestState().
|
inlinestatic |
Definition at line 4353 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::getBestState().
|
inlinestatic |
Return full set as the worst state of potential values.
Definition at line 4358 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::PotentialValuesState().
|
inlineoverridevirtual |
See AbstractState::indicateOptimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4313 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicateOptimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::indicatePessimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4308 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicatePessimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::isAtFixpoint(...)
Implements llvm::AbstractState.
Definition at line 4305 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isAtFixpoint().
|
inlineoverridevirtual |
See AbstractState::isValidState(...)
Implements llvm::AbstractState.
Definition at line 4302 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstantInt(), llvm::PotentialValuesState< MemberTy >::getAssumedSet(), llvm::PotentialValuesState< MemberTy >::operator==(), and llvm::PotentialValuesState< MemberTy >::undefIsContained().
|
inline |
Definition at line 4378 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::unionAssumed().
|
inline |
Definition at line 4334 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::isValidState(), RHS, and llvm::PotentialValuesState< MemberTy >::undefIsContained().
|
inline |
"Clamp" this state with PVS
.
Definition at line 4372 of file Attributor.h.
References llvm::PotentialValuesState< MemberTy >::unionAssumed().
|
inline |
Returns whether this state contains an undef value or not.
Definition at line 4329 of file Attributor.h.
References assert(), and llvm::PotentialValuesState< MemberTy >::isValidState().
Referenced by llvm::AAPotentialConstantValues::getAssumedConstantInt(), and llvm::PotentialValuesState< MemberTy >::operator==().
|
inline |
Union assumed set with the passed value.
Definition at line 4363 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 4366 of file Attributor.h.
|
inline |
Union assumed set with an undef value.
Definition at line 4369 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 4346 of file Attributor.h.