-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Coverage][WebAssembly] Add initial support for WebAssembly/WASI #111332
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
kateinoigakukun
merged 9 commits into
llvm:main
from
kateinoigakukun:yt/wasm-coverage-upstream
Oct 14, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
605e1ad
[compiler-rt][profile] Add initial support for WebAssembly/WASI
kateinoigakukun 5939422
[compiler-rt][profile] Use encapsulation symbols for Wasm format
kateinoigakukun 141f533
[WebAssembly] Emit `__llvm_covmap` and `__llvm_covfun` as custom sect…
kateinoigakukun 29cc14f
[wasm-ld][Coverage] Align `__llvm_{covfun,covmap}` sections to 8 bytes
kateinoigakukun f2ad45c
[llvm-cov][WebAssembly] Align coverage mapping section to 8 bytes
kateinoigakukun efc9dd4
[llvm-cov][WebAssembly] Read `__llvm_prf_names` from data segments
kateinoigakukun 07bb6c2
[clang][WebAssembly] Link with profile runtime libraries if requested
kateinoigakukun a68edc1
fixup! [compiler-rt][profile] Add initial support for WebAssembly/WASI
kateinoigakukun dc7043e
fixup! [wasm-ld][Coverage] Align `__llvm_{covfun,covmap}` sections to…
kateinoigakukun 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
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
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
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
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,31 @@ | ||
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s | ||
# RUN: wasm-ld --no-entry %t.o -o %t.wasm | ||
# RUN: obj2yaml %t.wasm | FileCheck %s | ||
|
||
# Check that "__llvm_covfun" custom section is aligned to 8 bytes. | ||
|
||
.section .custom_section.__llvm_covfun,"GR",@,__covrec_A | ||
.int32 1 | ||
.int8 2 | ||
# pad .int8 0 | ||
# .int8 0 | ||
# .int8 0 | ||
|
||
.section .custom_section.__llvm_covfun,"GR",@,__covrec_B | ||
.int32 3 | ||
|
||
# CHECK: - Type: CUSTOM | ||
# CHECK-NEXT: Name: __llvm_covfun | ||
# CHECK-NEXT: Payload: '010000000200000003000000' | ||
|
||
# Check that regular custom sections are not aligned. | ||
.section .custom_section.foo,"GR",@,foo_A | ||
.int32 1 | ||
.int8 2 | ||
|
||
.section .custom_section.foo,"GR",@,foo_B | ||
.int32 3 | ||
|
||
# CHECK: - Type: CUSTOM | ||
# CHECK-NEXT: Name: foo | ||
# CHECK-NEXT: Payload: '010000000203000000' |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.