Skip to content

Support generating checks for multiple modules - #3962

Merged
tlively merged 1 commit into
WebAssembly:mainfrom
tlively:update-lit-multi-module
Jul 2, 2021
Merged

Support generating checks for multiple modules#3962
tlively merged 1 commit into
WebAssembly:mainfrom
tlively:update-lit-multi-module

Conversation

@tlively

@tlively tlively commented Jul 2, 2021

Copy link
Copy Markdown
Member

In conjunction with the foreach tool, allows autogenerating checks for lit
tests containing multiple modules. Supporting this will help automatically port
existing bespoke wast tests to be lit tests, since many of those tests contain
multiple modules per file.

@tlively
tlively requested review from aheejin and kripken July 2, 2021 16:33
@tlively

tlively commented Jul 2, 2021

Copy link
Copy Markdown
Member Author

@kripken, If you'd like, I can try to split this into separate commits (or PRs) to separate the NFC refactoring and code movement and the functional part. Let me know if you think that's worth it.

@aheejin

aheejin commented Jul 2, 2021

Copy link
Copy Markdown
Member

Yeah it'd be nice to split this so seeing diff will be easier.

tlively added a commit to tlively/binaryen that referenced this pull request Jul 2, 2021
Decompose the code into more functions and make other simplifying changes to
prepare for multi-module support introduced in WebAssembly#3962.
@tlively

tlively commented Jul 2, 2021

Copy link
Copy Markdown
Member Author

The NFC components of this change are in #3964.

@tlively
tlively force-pushed the update-lit-multi-module branch from a35ca26 to b24fadb Compare July 2, 2021 21:18
@tlively

tlively commented Jul 2, 2021

Copy link
Copy Markdown
Member Author

Here's the diff from #3964 without whitespace changes: b24fadb?w=1

tlively added a commit that referenced this pull request Jul 2, 2021
Decompose the code into more functions and make other simplifying changes to
prepare for multi-module support introduced in #3962.
In conjunction with the `foreach` tool, allows autogenerating checks for lit
tests containing multiple modules. Supporting this will help automatically port
existing bespoke wast tests to be lit tests, since many of those tests contain
multiple modules per file.
@tlively
tlively force-pushed the update-lit-multi-module branch from b24fadb to f86c7d7 Compare July 2, 2021 21:36
@tlively

tlively commented Jul 2, 2021

Copy link
Copy Markdown
Member Author

Rebased so this can be reviewed normally now. I recommend viewing the diff without whitespace changes.

@aheejin aheejin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just started looking at this but will be OOO for an hour or two for some errands so only one question..

;; RUN: foreach %s %t wasm-opt --extract-function-index=0 -S -o - | filecheck %s
;; RUN: foreach %s %t wasm-opt --extract-function-index --pass-arg=extract-function-index@0 -S -o - | filecheck %s

;; CHECK: (module

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were we already supporting multiple modules within a file in lit tests? I thought that splitting and splicing was supported in our old tests but not here, but I might have missed a few PRs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this is the only test that uses it so far. This test was introduced along with the foreach tool in #3939.

@tlively
tlively merged commit 643b967 into WebAssembly:main Jul 2, 2021
@tlively
tlively deleted the update-lit-multi-module branch July 2, 2021 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants