summaryrefslogtreecommitdiff
path: root/src/passes/Outlining.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Outlining] Fixes break reconstruction (#6352)Ashley Nelson2024-02-271-1/+13
| | | Adds new visitBreakWithType and visitSwitchWithType functions to the IRBuilder API. These functions work around an assumption in IRBuilder that the module is being traversed in the fully nested format, i.e., that the destination scope of a break or switch has been visited before visiting the break or switch. Instead, the type of the destination scope is passed to IRBuilder.
* [Outlining] Add loop instruction supportAshley Nelson2023-12-071-0/+3
| | | | | | | | | | Adds support for the loop instruction to be outlined and a test showing a repeat loop being outlined. Reviewers: tlively Reviewed By: tlively Pull Request: https://github.com/WebAssembly/binaryen/pull/6141
* [Outlining] Improve debug loggingAshley Nelson2023-12-071-20/+22
| | | | | | | | | | | | - Change outlining debug logs to use std::cerr - Add controlFlowQueue push log - Fix build error with wasm-ir-builder log's use of ShallowExpression Reviewers: tlively Reviewed By: tlively Pull Request: https://github.com/WebAssembly/binaryen/pull/6140
* [Outlining] Fix outlining control flowAshley Nelson2023-12-061-0/+12
| | | | | | | | | | Changes the controlFlowQueue used in stringify-walker to push values of Expression*, This ensures that we walk the Wasm module in the same order, regardless of whether the control flow expression is outlined. Reviewers: tlively Reviewed By: tlively Pull Request: https://github.com/WebAssembly/binaryen/pull/6139
* Update IRBuilder to visit control flow correctly (#6124)Thomas Lively2023-11-161-0/+5
| | | | | | | | | | | Besides If, no control flow structure consumes values from the stack. Fix a bug in IRBuilder that was causing it to pop control flow children. Also fix a follow on bug in outlining where it did not make the If condition available on the stack when starting to visit an If. This required making push() part of the public API of IRBuilder. As a drive-by, also add helpful debug logging to IRBuilder. Co-authored-by: Ashley Nelson <nashley@google.com>
* [Outlining] Adding more tests (#6117)Ashley Nelson2023-11-151-9/+43
| | | | | | Checking a couple of testing TODOs off and adding more tests of the outlining pass for outlining: - a sequence at the beginning of an existing function - a sequence that is outlined into a function that takes no arguments - multiple sequences from the same source function into different outlined functions
* [Outlining] Adds Outlining pass (#6110)Ashley Nelson2023-11-131-0/+329
Adds an outlining pass that performs outlining on a module end to end, and two tests.