diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-02-09 14:41:49 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 14:41:49 -0800 |
commit | 9752196fd1357fbc129d1e4f53e8eb22cd6219f9 (patch) | |
tree | fe22a97b4d536687f6567448b45485e4fe24b75d /src/ir/stack-utils.cpp | |
parent | 3da8b08ecd57f5662bebc69ea73bf59e1928341e (diff) | |
download | binaryen-9752196fd1357fbc129d1e4f53e8eb22cd6219f9.tar.gz binaryen-9752196fd1357fbc129d1e4f53e8eb22cd6219f9.tar.bz2 binaryen-9752196fd1357fbc129d1e4f53e8eb22cd6219f9.zip |
Poppify pass (#3541)
Adds a Poppify ("--poppify") pass for converting normal Binaryen IR to Poppy IR.
Like the existing construction of Stacky IR, Poppify depends on the
BinaryenIRWriter to drive the emitting of instructions in correct stack machine
order. As instructions are "emitted," Poppify replaces their children with pops
and collects them in a list. At the end of each scope, Poppify creates a block
containing all the collected instructions for that scope and injects that block
into the enclosing scope. All tuple globals and instructions dealing with tuples
are also expanded to remove all tuples from the program.
The validator currently fails to validate many valid Poppy IR patterns produced
in the tests, but fixing that is left as follow-on work to keep this PR focused
on the Poppify pass itself. For now the tests simply skip validation.
Diffstat (limited to 'src/ir/stack-utils.cpp')
0 files changed, 0 insertions, 0 deletions