summaryrefslogtreecommitdiff
path: root/src/passes/stringify-walker.h
Commit message (Collapse)AuthorAgeFilesLines
* [Outlining] Fix outlining control flowAshley Nelson2023-12-061-6/+8
| | | | | | | | | | 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
* [Outlining] Adds Outlining pass (#6110)Ashley Nelson2023-11-131-34/+60
| | | Adds an outlining pass that performs outlining on a module end to end, and two tests.
* [Outlining] Filter branches & returns (#6024)Ashley Nelson2023-10-181-2/+11
| | | Adds a function to filter branch and return instructions from being included in potential outlining candidates.
* [Outlining] Filter Local Set (#6018)Ashley Nelson2023-10-181-2/+6
| | | | | Adds a general purpose walker named FilterStringifyWalker, intended to walk control flow and take note of whether any of the expressions satisfy the condition. Also includes an << overload for SuffixTree::RepeatedSubstring to make debugging easier.
* [Outlining] Adds separator context (#5977)Ashley Nelson2023-10-041-2/+99
| | | Adds a std::variant to represent the context of why a unique symbol was inserted in the stringified module. This allows us to pass necessary contextual data to subclasses of StringifyWalker in a structured manner.
* [Outlining] Adds SuffixTree::RepeatSubstring dedupe test (#5972)Ashley Nelson2023-10-041-0/+7
| | | This PR adds a StringProcessor struct intended to hold functions that filter vectors of SuffixTree::RepeatedSubstring, and a test of its first functionality, removing overlapping repeated substrings.
* [Outlining] Changing stringify values to 32-bit (#5832)Ashley Nelson2023-07-211-4/+7
| | | | | The LLVM suffix tree expects to be provided with a vector of 32-bit unsigned integers. This PR makes it easier to integrate our wasm program string with the suffix tree. Because the range of possible values is reduced from 2^64 to 2^32, a signed integer was added to manage the next separator value and ensure we're using every possible negative number.
* Adding license header to new files (#5819)Ashley Nelson2023-07-131-0/+16
|
* [Outlining] HashStringifyWalker (#5810)Ashley Nelson2023-07-131-1/+42
| | | | | This PR is part of the effort to bring Outlining to Binaryen. HashStringifyWalker is a subclass of StringifyWalker #5772, and used to encode a wasm module as a "string". Our "string" is a vector and each symbol is a uint64_t, providing us with a capacity of 2^64 symbols.
* [Outlining] StringifyWalker (#5772)Ashley Nelson2023-06-301-0/+78
StringifyWalker is a new Walker with UnifiedExpressionVisitor. This walker performs a shallow visit of control-flow (try, if, block, loop) expressions and their simple expression siblings before then visiting the children of each control-flow expression in postorder. As a result, this walker un-nests nested control flow structures, so the expression visit order does not correspond to a normal postorder traversal of the function.