diff options
author | Ashley Nelson <nashley@google.com> | 2023-12-07 02:15:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 02:15:40 -0800 |
commit | 2049ee82d56f8cb1bb0107c9e260663e97bc4c17 (patch) | |
tree | 4069c52ae93affaba34ba9a49ef1d8bc74a18dc6 /src/passes/Outlining.cpp | |
parent | e28efb09c2b90b163cc2d251d0cd503b6f424af2 (diff) | |
download | binaryen-2049ee82d56f8cb1bb0107c9e260663e97bc4c17.tar.gz binaryen-2049ee82d56f8cb1bb0107c9e260663e97bc4c17.tar.bz2 binaryen-2049ee82d56f8cb1bb0107c9e260663e97bc4c17.zip |
[Outlining] Add loop instruction support
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
Diffstat (limited to 'src/passes/Outlining.cpp')
-rw-r--r-- | src/passes/Outlining.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/Outlining.cpp b/src/passes/Outlining.cpp index 433889d37..345b3f9a2 100644 --- a/src/passes/Outlining.cpp +++ b/src/passes/Outlining.cpp @@ -103,6 +103,9 @@ struct ReconstructStringifyWalker } else if (reason.getElseStart()) { ASSERT_OK(existingBuilder.visitElse()); DBG(desc = "Else Start at "); + } else if (auto curr = reason.getLoopStart()) { + ASSERT_OK(existingBuilder.visitLoopStart(curr->loop)); + DBG(desc = "Loop Start at "); } else if (reason.getEnd()) { ASSERT_OK(existingBuilder.visitEnd()); // Outlining performs an unnested walk of the Wasm module, visiting |