summaryrefslogtreecommitdiff
path: root/src/passes/SimplifyLocals.cpp
diff options
context:
space:
mode:
authorBruce He <44327446+zm2he@users.noreply.github.com>2023-08-03 17:45:27 +0000
committerGitHub <noreply@github.com>2023-08-03 13:45:27 -0400
commitbcdfa72afe41746ac13d27e6d02866c7d11e7fb5 (patch)
tree0df76ff435ce39e291bd93914eb9afdaccba6a38 /src/passes/SimplifyLocals.cpp
parent8bd418cc44705f1c272bbbe1ad65186dcd5b0fa9 (diff)
downloadbinaryen-bcdfa72afe41746ac13d27e6d02866c7d11e7fb5.tar.gz
binaryen-bcdfa72afe41746ac13d27e6d02866c7d11e7fb5.tar.bz2
binaryen-bcdfa72afe41746ac13d27e6d02866c7d11e7fb5.zip
Lattice to model Stack (#5849)
This change introduces StackLattice, a lattice to model stack-related behavior. It is templated on a separate lattice whose elements model some property of individual values on the stack. The StackLattice allows users to access the top of the stack, push abstract values, and pop them. Comparisons and least upper bound operations are done on a value by value basis starting from the top of the stack and moving toward the bottom. This is because it allows stacks from different scopes to be joined easily. An application of StackLattice is to model the wasm value stack. The goal is to organize lattice elements representing individual stack values in a natural way which mirrors the wasm value stack. Transfer functions operate on each stack value individually. The stack lattice is an intermediate structure which is not intended to be directly operated on. Rather, it simulates the push and pop behavior of instructions.
Diffstat (limited to 'src/passes/SimplifyLocals.cpp')
0 files changed, 0 insertions, 0 deletions