-
Notifications
You must be signed in to change notification settings - Fork 843
[wasm-split] Split globals' transitive global dependencies #8442
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
Changes from 8 commits
0a9f9b3
3d7d1f4
8019f54
fcf42c0
163ebc2
be53645
13d39e0
23789e2
3d29b1f
15a0daf
e8158fc
7433eb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to add another similar test where there is another use of $b or $c that prevents it from being moved.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done: e8158fc |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,26 +3,20 @@ | |
| ;; RUN: wasm-dis %t.2.wasm | filecheck %s --check-prefix SECONDARY | ||
|
|
||
| ;; Check that transitive dependencies in global initializers are correctly | ||
| ;; analyzed and exported from the primary module to the secondary module. | ||
| ;; TODO Move $b and $c to the secondary module | ||
| ;; analyzed and moved to the secondary module. | ||
|
|
||
| (module | ||
| ;; PRIMARY: (global $c i32 (i32.const 42)) | ||
| ;; SECONDARY: (global $c i32 (i32.const 42)) | ||
| (global $c i32 (i32.const 42)) | ||
|
||
|
|
||
| ;; $b depends on $c. | ||
| ;; PRIMARY: (global $b i32 (global.get $c)) | ||
| ;; SECONDARY: (global $b i32 (global.get $c)) | ||
| (global $b i32 (global.get $c)) | ||
|
|
||
| ;; Globals $b is exported to the secondary module | ||
| ;; PRIMARY: (export "global" (global $b)) | ||
|
|
||
| ;; Globals $b is imported from the primary module | ||
| ;; SECONDARY: (import "primary" "global" (global $b i32)) | ||
|
|
||
| ;; $a depends on $b. Since $a is exclusively used by the secondary module, | ||
| ;; it will be moved there. Its dependency $b should be exported from the | ||
| ;; primary module and imported into the secondary module. | ||
| ;; $a depends on $b. since $a is exclusively used by the secondary module, | ||
| ;; it will be moved there. The transitive dependency must ensure that $b (and | ||
| ;; $c) are moved to the secondary module too, because they are not used in the | ||
| ;; primary module. | ||
| ;; SECONDARY: (global $a i32 (global.get $b)) | ||
| (global $a i32 (global.get $b)) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.