diff options
author | Bruce He <44327446+zm2he@users.noreply.github.com> | 2023-07-06 21:39:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-06 17:39:17 -0400 |
commit | cdb7aeab40b4c522de20b242019f7e88641445d5 (patch) | |
tree | a9609ec7537cb3b758dd592b03efc4c0183915de /src/analysis/liveness-transfer-function.h | |
parent | eb185f5d0706927db5917bf111afa73c6989b249 (diff) | |
download | binaryen-cdb7aeab40b4c522de20b242019f7e88641445d5.tar.gz binaryen-cdb7aeab40b4c522de20b242019f7e88641445d5.tar.bz2 binaryen-cdb7aeab40b4c522de20b242019f7e88641445d5.zip |
Generalize Finite Powerset Lattice to Any Given Type (#5800)
This change creates a lattice, FinitePowersetLattice, to represent finite
powerset lattices constructed from sets containing members of arbitrary type
The bitvector finite powerset lattice class is renamed FiniteIntPowersetLattice.
The templated FinitePowersetLattice class contains a FiniteIntPowersetLattice
object, and over that provides functionality to map lattice element members
to bitvector indices. Methods are also provided by the lattice to add or
remove members of the given type from lattice members as an abstraction
over flipping bits in the bitvector.
Diffstat (limited to 'src/analysis/liveness-transfer-function.h')
-rw-r--r-- | src/analysis/liveness-transfer-function.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/analysis/liveness-transfer-function.h b/src/analysis/liveness-transfer-function.h index 69473743f..c24e67eab 100644 --- a/src/analysis/liveness-transfer-function.h +++ b/src/analysis/liveness-transfer-function.h @@ -7,7 +7,7 @@ namespace wasm::analysis { class LivenessTransferFunction : public Visitor<LivenessTransferFunction> { - FinitePowersetLattice::Element* currState = nullptr; + FiniteIntPowersetLattice::Element* currState = nullptr; public: // Transfer function implementation. A local becomes live before a get @@ -25,7 +25,7 @@ public: // CFG node, starting with the node's input state, and changes the input state // to the final output state of the node in place. void transfer(const BasicBlock* cfgBlock, - FinitePowersetLattice::Element& inputState) { + FiniteIntPowersetLattice::Element& inputState) { // If the block is empty, we propagate the state by inputState = // outputState. @@ -65,7 +65,7 @@ public: // in place to produce the intermediate states. void print(std::ostream& os, const BasicBlock* cfgBlock, - FinitePowersetLattice::Element& inputState) { + FiniteIntPowersetLattice::Element& inputState) { os << "Intermediate States (reverse order): " << std::endl; currState = &inputState; currState->print(os); |