-
Notifications
You must be signed in to change notification settings - Fork 858
[wasm-split] Do not split out the start function #8711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+154
−14
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
306e134
fix
kripken 969ba9b
try to fix multi-split
kripken ac36874
fix
kripken 6aabdf3
fix tests
kripken ff9cfab
sort lines in existing test
kripken 6c411ab
Merge remote-tracking branch 'origin/main' into split.start
kripken 0fa4078
undo
kripken 14b08c6
undo
kripken 1c017c3
undo
kripken 4eb7dc3
feedback
kripken 784f513
format
kripken 97ab311
fix
kripken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||
|
|
||
| ;; RUN: wasm-split %s --split-funcs=start_func,other -o1 %t.1.wasm -o2 %t.2.wasm -g 2>&1 | filecheck %s | ||
| ;; RUN: wasm-dis -all %t.1.wasm | filecheck %s --check-prefix PRIMARY | ||
| ;; RUN: wasm-dis -all %t.2.wasm | filecheck %s --check-prefix SECONDARY | ||
|
|
||
| ;; Do not error on trying to split out the start function. It cannot be | ||
| ;; split out, keep it in the primary module. | ||
|
|
||
| (module | ||
| ;; PRIMARY: (type $0 (func)) | ||
|
|
||
| ;; PRIMARY: (start $start_func) | ||
|
|
||
| ;; PRIMARY: (func $start_func (type $0) | ||
| ;; PRIMARY-NEXT: ) | ||
| (func $start_func) | ||
|
|
||
| (start $start_func) | ||
|
|
||
| ;; SECONDARY: (type $0 (func)) | ||
|
|
||
| ;; SECONDARY: (func $other (type $0) | ||
| ;; SECONDARY-NEXT: ) | ||
| (func $other) | ||
| ) | ||
|
|
||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you do the same thing in
multiSplitModuleafter this line?binaryen/src/tools/wasm-split/wasm-split.cpp
Line 437 in b5b9ebd
Then we don't need to do anything in
module-splitting.cpp.Also while you're at it you can add this there too, to be consistent with
splitModule:binaryen/src/tools/wasm-split/wasm-split.cpp
Lines 286 to 298 in b5b9ebd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or even better, we can factor these three checks out to a function use it in both places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.