summaryrefslogtreecommitdiff
path: root/src/analysis/liveness-transfer-function.h
Commit message (Collapse)AuthorAgeFilesLines
* [analysis] Simplify core analysis code (#6034)Thomas Lively2023-10-251-7/+5
| | | | | | | | | | | | | | Simplify the monotone analyzer by replacing all the state it used to store in `BlockState` with a simple vector of lattice elements. Use simple indices to refer to both blocks and their associated states in the vector. Remove the ability for transfer functions to control the initial enqueued order of basic blocks since that was a leaky abstraction. Replace the worklist with a UniqueDeferredQueue since that has generally proven to be more efficient in smiilarly contexts, and more importantly, it has a nicer API. Make miscellaneous simplifications to other code as well. Delete a few unit tests that exposed the order in which blocks were analyzed because they printed intermediate results. These tests should be replaced with tests of analyses' public APIs in the future.
* Add missing includes (#6049)Thomas Lively2023-10-251-0/+1
| | | | These missing includes were not a problem in our standard build configuration, but were breaking other build configurations.
* [analysis][NFC] Move powerset lattices to their own header (#6028)Thomas Lively2023-10-201-0/+1
| | | | Move the powerset lattices out of lattice.h, which now only contains the Lattice concept, to their own dedicated header in a new analysis/lattices directory.
* Reaching Definitions Analysis for LocalGraph (#5817)Bruce He2023-07-191-44/+5
| | | | | | | | | | | This change implements a reaching definitions analysis which is intended to be equivalent to the information provided by LocalGraph, specifically the Flower class of LocalGraph. It also introduces a CRTP utility in visitor-transfer-function.h which implements most commonly found visitor-type transfer function functionalities. The MonotoneCFGAnalyzer is also modified to add a phase to collect results after the analysis is solved from the final CFG states.
* Small fixes to lattice and analyzer (#5815)Bruce He2023-07-131-8/+9
| | | Updates comments. Moves wasm-traversal.h to transfer function classes.
* Generalize Finite Powerset Lattice to Any Given Type (#5800)Bruce He2023-07-061-3/+3
| | | | | | | | | | 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.
* Make the Transfer Function a Generic, Interchangeable Type for the Monotone ↵Bruce He2023-07-061-0/+91
Analyzer (#5794) This change makes the transfer function an object separate from the monotone analyzer. The transfer function class type is a generic template of the monotone analyzer, and an instance of the transfer function is instantiated and then passed into the monotone analyzer via its constructor. The API of the transfer function is enforced by a static assertion. This change also introduces LivenessTransferFunction as a transfer function for liveness analysis as an example.