-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[SHT_LLVM_BB_ADDR_MAP] Add an option to skip emitting bb entries #114447
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
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
81242ce
add an option to skip bb entries
wlei-llvm 6f8d1bd
keep one blank line in test
wlei-llvm 61e1b71
Merge branch 'main' into skip-bb
wlei-llvm 703eecd
Merge branch 'main' into skip-bb
wlei-llvm 21953cb
Merge branch 'main' into skip-bb
wlei-llvm aa0c8d4
try fix test on windows
wlei-llvm e41238a
debug windows test
wlei-llvm 51f24bf
debug windows bitfield
wlei-llvm 0646a8c
debug windows bitfield
wlei-llvm 8ff4422
fix test on windows
wlei-llvm c9de675
addressing comments
wlei-llvm 4b8bd96
Merge branch 'main' into skip-bb
wlei-llvm 339f727
fix lint
wlei-llvm 37c2c3d
addressing comment, fix test
wlei-llvm 8f2f434
addressing comments
wlei-llvm 58c0d30
addressing comments
wlei-llvm 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
91 changes: 91 additions & 0 deletions
91
llvm/test/tools/llvm-readobj/ELF/bb-addr-map-skip-bb-entries.test
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,91 @@ | ||
| ## This test checks how llvm-readobj prints for skipped BB entries(-basic-block-address-map-skip-emit-bb-entries) file. | ||
wlei-llvm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Check 64-bit: | ||
| # RUN: yaml2obj %s -DBITS=64 -o %t1.x64.o | ||
| # RUN: llvm-readobj %t1.x64.o --bb-addr-map 2>&1 | FileCheck --match-full-lines %s -DFILE=%t1.x64.o | ||
|
|
||
| ## Check 32-bit: | ||
| # RUN: yaml2obj %s -DBITS=32 -o %t1.x32.o | ||
| # RUN: llvm-readobj %t1.x32.o --bb-addr-map 2>&1 | FileCheck --match-full-lines %s -DFILE=%t1.x32.o | ||
|
|
||
| # CHECK: BBAddrMap [ | ||
| # CHECK-NEXT: Function { | ||
| # CHECK-NEXT: At: 0x11111 | ||
| # CHECK-NEXT: Name: foo | ||
| # CHECK-NEXT: BB Ranges [ | ||
| # CHECK-NEXT: { | ||
| # CHECK-NEXT: Base Address: 0x11111 | ||
| # CHECK-NEXT: BB Entries [ | ||
| # CHECK-NEXT: ] | ||
| # CHECK-NEXT: } | ||
| # CHECK-NEXT: ] | ||
| # CHECK-NEXT: PGO analyses { | ||
| # CHECK-NEXT: FuncEntryCount: 100 | ||
| # CHECK-NEXT: PGO BB entries [ | ||
| # CHECK-NEXT: ] | ||
| # CHECK-NEXT: } | ||
| # CHECK-NEXT: } | ||
| # CHECK-NEXT:] | ||
| # CHECK-NEXT:BBAddrMap [ | ||
| # CHECK-NEXT: Function { | ||
| # CHECK-NEXT: At: 0x33333 | ||
| # CHECK-NEXT: Name: bar | ||
| # CHECK-NEXT: BB Ranges [ | ||
| # CHECK-NEXT: { | ||
| # CHECK-NEXT: Base Address: 0x33333 | ||
| # CHECK-NEXT: BB Entries [ | ||
| # CHECK-NEXT: ] | ||
| # CHECK-NEXT: } | ||
| # CHECK-NEXT: ] | ||
| # CHECK-NEXT: PGO analyses { | ||
| # CHECK-NEXT: FuncEntryCount: 89 | ||
| # CHECK-NEXT: PGO BB entries [ | ||
| # CHECK-NEXT: ] | ||
| # CHECK-NEXT: } | ||
| # CHECK-NEXT: } | ||
| # CHECK-NEXT:] | ||
|
|
||
| --- !ELF | ||
| FileHeader: | ||
| Class: ELFCLASS[[BITS]] | ||
| Data: ELFDATA2LSB | ||
| Type: ET_EXEC | ||
| Sections: | ||
| - Name: .text | ||
| Type: SHT_PROGBITS | ||
| Flags: [SHF_ALLOC] | ||
| - Name: .text.bar | ||
| Type: SHT_PROGBITS | ||
| Flags: [SHF_ALLOC] | ||
| - Name: .llvm_bb_addr_map | ||
| Type: SHT_LLVM_BB_ADDR_MAP | ||
| ShSize: [[SIZE=<none>]] | ||
| Link: .text | ||
| Entries: | ||
| - Version: 2 | ||
| Feature: 0x17 | ||
| BBRanges: | ||
| - BaseAddress: 0x11111 | ||
| BBEntries: | ||
wlei-llvm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| PGOAnalyses: | ||
| - FuncEntryCount: 100 | ||
| - Name: '.llvm_bb_addr_map (1)' | ||
wlei-llvm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Type: SHT_LLVM_BB_ADDR_MAP | ||
| Link: .text.bar | ||
| Entries: | ||
| - Version: 2 | ||
| Feature: 0x17 | ||
| BBRanges: | ||
| - BaseAddress: 0x33333 | ||
| BBEntries: | ||
| PGOAnalyses: | ||
| - FuncEntryCount: 89 | ||
| Symbols: | ||
| - Name: foo | ||
| Section: .text | ||
| Type: STT_FUNC | ||
| Value: 0x11111 | ||
| - Name: bar | ||
| Section: .text.bar | ||
| Type: STT_FUNC | ||
| Value: 0x33333 | ||
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.
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.