LLVM: llvm::AbstractLatticeFunction< LatticeKey, LatticeVal > Class Template Reference (original) (raw)
AbstractLatticeFunction - This class is implemented by the dataflow instance to specify what the lattice values are and how they handle merges etc. More...
#include "[llvm/Analysis/SparsePropagation.h](SparsePropagation%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| AbstractLatticeFunction (LatticeVal undefVal, LatticeVal overdefinedVal, LatticeVal untrackedVal) | |
| virtual | ~AbstractLatticeFunction ()=default |
| LatticeVal | getUndefVal () const |
| LatticeVal | getOverdefinedVal () const |
| LatticeVal | getUntrackedVal () const |
| virtual bool | IsUntrackedValue (LatticeKey Key) |
| IsUntrackedValue - If the specified LatticeKey is obviously uninteresting to the analysis (i.e., it would always return UntrackedVal), this function can return true to avoid pointless work. | |
| virtual LatticeVal | ComputeLatticeVal (LatticeKey Key) |
| ComputeLatticeVal - Compute and return a LatticeVal corresponding to the given LatticeKey. | |
| virtual bool | IsSpecialCasedPHI (PHINode *PN) |
| IsSpecialCasedPHI - Given a PHI node, determine whether this PHI node is one that the we want to handle through ComputeInstructionState. | |
| virtual LatticeVal | MergeValues (LatticeVal X, LatticeVal Y) |
| MergeValues - Compute and return the merge of the two specified lattice values. | |
| virtual void | ComputeInstructionState (Instruction &I, SmallDenseMap< LatticeKey, LatticeVal, 16 > &ChangedValues, SparseSolver< LatticeKey, LatticeVal > &SS)=0 |
| ComputeInstructionState - Compute the LatticeKeys that change as a result of executing instruction I. | |
| virtual void | PrintLatticeVal (LatticeVal LV, raw_ostream &OS) |
| PrintLatticeVal - Render the given LatticeVal to the specified stream. | |
| virtual void | PrintLatticeKey (LatticeKey Key, raw_ostream &OS) |
| PrintLatticeKey - Render the given LatticeKey to the specified stream. | |
| virtual Value * | GetValueFromLatticeVal (LatticeVal LV, Type *Ty=nullptr) |
| GetValueFromLatticeVal - If the given LatticeVal is representable as an LLVM value, return it; otherwise, return nullptr. |
template<class LatticeKey, class LatticeVal>
class llvm::AbstractLatticeFunction< LatticeKey, LatticeVal >
AbstractLatticeFunction - This class is implemented by the dataflow instance to specify what the lattice values are and how they handle merges etc.
This gives the client the power to compute lattice values from instructions, constants, etc. The current requirement is that lattice values must be copyable. At the moment, nothing tries to avoid copying. Additionally, lattice keys must be able to be used as keys of a mapping data structure. Internally, the generic solver currently uses a DenseMap to map lattice keys to lattice values. If the lattice key is a non-standard type, a specialization of DenseMapInfo must be provided.
Definition at line 47 of file SparsePropagation.h.
template<class LatticeKey, class LatticeVal>
| llvm::AbstractLatticeFunction< LatticeKey, LatticeVal >::AbstractLatticeFunction ( LatticeVal undefVal, LatticeVal overdefinedVal, LatticeVal untrackedVal ) | inline |
|---|
◆ ~AbstractLatticeFunction()
template<class LatticeKey, class LatticeVal>
◆ ComputeInstructionState()
template<class LatticeKey, class LatticeVal>
◆ ComputeLatticeVal()
template<class LatticeKey, class LatticeVal>
◆ getOverdefinedVal()
template<class LatticeKey, class LatticeVal>
◆ getUndefVal()
template<class LatticeKey, class LatticeVal>
◆ getUntrackedVal()
template<class LatticeKey, class LatticeVal>
◆ GetValueFromLatticeVal()
template<class LatticeKey, class LatticeVal>
GetValueFromLatticeVal - If the given LatticeVal is representable as an LLVM value, return it; otherwise, return nullptr.
If a type is given, the returned value must have the same type. This function is used by the generic solver in attempting to resolve branch and switch conditions.
Definition at line 104 of file SparsePropagation.h.
◆ IsSpecialCasedPHI()
template<class LatticeKey, class LatticeVal>
IsSpecialCasedPHI - Given a PHI node, determine whether this PHI node is one that the we want to handle through ComputeInstructionState.
Definition at line 78 of file SparsePropagation.h.
◆ IsUntrackedValue()
template<class LatticeKey, class LatticeVal>
◆ MergeValues()
template<class LatticeKey, class LatticeVal>
MergeValues - Compute and return the merge of the two specified lattice values.
Merging should only move one direction down the lattice to guarantee convergence (toward overdefined).
Definition at line 83 of file SparsePropagation.h.
References getOverdefinedVal(), X, and Y.
◆ PrintLatticeKey()
template<class LatticeKey, class LatticeVal>
◆ PrintLatticeVal()
template<class LatticeKey, class LatticeVal>
PrintLatticeVal - Render the given LatticeVal to the specified stream.
Definition at line 205 of file SparsePropagation.h.
The documentation for this class was generated from the following file:
- include/llvm/Analysis/SparsePropagation.h