diff options
author | Ashley Nelson <nashley@google.com> | 2023-10-04 01:58:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 08:58:48 +0000 |
commit | 2abc1a80d42ccd3d8e85543d104b5a6dee127248 (patch) | |
tree | f5b807fdacc07d38db0353ee0becf321f77c2f33 /src/passes/stringify-walker.h | |
parent | 2ed773f3981a6014c55d039ad88b8e9889ce9eca (diff) | |
download | binaryen-2abc1a80d42ccd3d8e85543d104b5a6dee127248.tar.gz binaryen-2abc1a80d42ccd3d8e85543d104b5a6dee127248.tar.bz2 binaryen-2abc1a80d42ccd3d8e85543d104b5a6dee127248.zip |
[Outlining] Adds SuffixTree::RepeatSubstring dedupe test (#5972)
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.
Diffstat (limited to 'src/passes/stringify-walker.h')
-rw-r--r-- | src/passes/stringify-walker.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/passes/stringify-walker.h b/src/passes/stringify-walker.h index 7e18d3d9e..c20d250ec 100644 --- a/src/passes/stringify-walker.h +++ b/src/passes/stringify-walker.h @@ -20,6 +20,7 @@ #include "ir/iteration.h" #include "ir/module-utils.h" #include "ir/utils.h" +#include "support/suffix_tree.h" #include "wasm-traversal.h" #include <queue> @@ -133,6 +134,12 @@ struct HashStringifyWalker : public StringifyWalker<HashStringifyWalker> { void visitExpression(Expression* curr); }; +// Functions that filter vectors of SuffixTree::RepeatedSubstring +struct StringifyProcessor { + static std::vector<SuffixTree::RepeatedSubstring> + dedupe(const std::vector<SuffixTree::RepeatedSubstring>); +}; + } // namespace wasm #endif // wasm_passes_stringify_walker_h |