CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
204 lines
6.7 KiB
YAML
204 lines
6.7 KiB
YAML
## Test that in the presence of SHT_LLVM_BB_ADDR_MAP sections which also
|
|
## contain PGO data, --symbolize-operands is able to label the basic blocks
|
|
## correctly.
|
|
|
|
## Check the case where we only have entry counts.
|
|
|
|
# RUN: yaml2obj --docnum=1 %s -o %t1
|
|
# RUN: llvm-objdump %t1 -d --symbolize-operands --no-show-raw-insn --no-leading-addr | \
|
|
# RUN: FileCheck %s --check-prefix=ENTRYCOUNT
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .text.foo
|
|
Type: SHT_PROGBITS
|
|
Address: 0x0
|
|
Flags: [SHF_ALLOC, SHF_EXECINSTR]
|
|
Content: '50'
|
|
- Name: .llvm_bb_addr_map.foo
|
|
Type: SHT_LLVM_BB_ADDR_MAP
|
|
Link: .text.foo
|
|
Entries:
|
|
- Version: 2
|
|
Feature: 0x1
|
|
BBRanges:
|
|
- BaseAddress: 0x0
|
|
BBEntries:
|
|
- ID: 3
|
|
AddressOffset: 0x0
|
|
Size: 0x1
|
|
Metadata: 0x1
|
|
PGOAnalyses:
|
|
- FuncEntryCount: 1000
|
|
Symbols:
|
|
- Name: foo
|
|
Section: .text.foo
|
|
Value: 0x0
|
|
|
|
# ENTRYCOUNT: <foo>:
|
|
# ENTRYCOUNT: <BB3> (Entry count: 1000):
|
|
|
|
## Check the case where we have entry points and block frequency information
|
|
|
|
# RUN: yaml2obj %s --docnum=2 -o %t2
|
|
# RUN: llvm-objdump %t2 -d --symbolize-operands --no-show-raw-insn --no-leading-addr | \
|
|
# RUN: FileCheck --match-full-lines --strict-whitespace %s --check-prefix=ENTRYCOUNT-BLOCKFREQ
|
|
# RUN: llvm-objdump %t2 -d --symbolize-operands --pretty-pgo-analysis-map --no-show-raw-insn --no-leading-addr | \
|
|
# RUN: FileCheck --match-full-lines --strict-whitespace %s --check-prefix=ENTRYCOUNT-BLOCKFREQ-PRETTY
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .text.foo
|
|
Type: SHT_PROGBITS
|
|
Address: 0x0
|
|
Flags: [SHF_ALLOC, SHF_EXECINSTR]
|
|
Content: '503b0505200000907d02ebf5c3'
|
|
- Name: .llvm_bb_addr_map.foo
|
|
Type: SHT_LLVM_BB_ADDR_MAP
|
|
Link: .text.foo
|
|
Entries:
|
|
- Version: 2
|
|
Feature: 0x3
|
|
BBRanges:
|
|
- BaseAddress: 0x0
|
|
BBEntries:
|
|
- ID: 3
|
|
AddressOffset: 0x0
|
|
Size: 0x1
|
|
Metadata: 0x1
|
|
- ID: 1
|
|
AddressOffset: 0x0
|
|
Size: 0x6
|
|
Metadata: 0x0
|
|
- ID: 2
|
|
AddressOffset: 0x1
|
|
Size: 0x4
|
|
Metadata: 0x0
|
|
- ID: 5
|
|
AddressOffset: 0x0
|
|
Size: 0x1
|
|
Metadata: 0x2
|
|
PGOAnalyses:
|
|
- FuncEntryCount: 1000
|
|
PGOBBEntries:
|
|
- BBFreq: 1000
|
|
- BBFreq: 133
|
|
- BBFreq: 18
|
|
- BBFreq: 1000
|
|
Symbols:
|
|
- Name: foo
|
|
Section: .text.foo
|
|
Value: 0x0
|
|
|
|
# ENTRYCOUNT-BLOCKFREQ:<foo>:
|
|
# ENTRYCOUNT-BLOCKFREQ:<BB3> (Entry count: 1000, Frequency: 1000):
|
|
# ENTRYCOUNT-BLOCKFREQ:<BB1> (Frequency: 133):
|
|
# ENTRYCOUNT-BLOCKFREQ:<BB2> (Frequency: 18):
|
|
# ENTRYCOUNT-BLOCKFREQ:<BB5> (Frequency: 1000):
|
|
|
|
# ENTRYCOUNT-BLOCKFREQ-PRETTY:<foo>:
|
|
# ENTRYCOUNT-BLOCKFREQ-PRETTY:<BB3> (Entry count: 1000, Frequency: 1.0):
|
|
# ENTRYCOUNT-BLOCKFREQ-PRETTY:<BB1> (Frequency: 0.133):
|
|
# ENTRYCOUNT-BLOCKFREQ-PRETTY:<BB2> (Frequency: 0.018):
|
|
# ENTRYCOUNT-BLOCKFREQ-PRETTY:<BB5> (Frequency: 1.0):
|
|
|
|
## Check the case where we have entry points, block frequency, and branch
|
|
## proabability information.
|
|
|
|
# RUN: yaml2obj %s --docnum=3 -o %t3
|
|
# RUN: llvm-objdump %t3 -d --symbolize-operands --no-show-raw-insn --no-leading-addr | \
|
|
# RUN: FileCheck --match-full-lines --strict-whitespace %s --check-prefix=ENTRY-FREQ-PROB
|
|
# RUN: llvm-objdump %t3 -d --symbolize-operands --pretty-pgo-analysis-map --no-show-raw-insn --no-leading-addr | \
|
|
# RUN: FileCheck --match-full-lines --strict-whitespace %s --check-prefix=ENTRY-FREQ-PROB-PRETTY
|
|
# RUN: llvm-objdump %t3 -d --pretty-pgo-analysis-map --no-show-raw-insn --no-leading-addr 2>&1 | \
|
|
# RUN: FileCheck %s --check-prefix=MISSING-SYMBOLIZE-OPERANDS
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .text.foo
|
|
Type: SHT_PROGBITS
|
|
Address: 0x0
|
|
Flags: [SHF_ALLOC, SHF_EXECINSTR]
|
|
Content: '503b0505200000907d02ebf5c3'
|
|
- Name: .llvm_bb_addr_map.foo
|
|
Type: SHT_LLVM_BB_ADDR_MAP
|
|
Link: .text.foo
|
|
Entries:
|
|
- Version: 2
|
|
Feature: 0x7
|
|
BBRanges:
|
|
- BaseAddress: 0x0
|
|
BBEntries:
|
|
- ID: 3
|
|
AddressOffset: 0x0
|
|
Size: 0x1
|
|
Metadata: 0x1
|
|
- ID: 1
|
|
AddressOffset: 0x0
|
|
Size: 0x6
|
|
Metadata: 0x0
|
|
- ID: 2
|
|
AddressOffset: 0x1
|
|
Size: 0x4
|
|
Metadata: 0x0
|
|
- ID: 5
|
|
AddressOffset: 0x0
|
|
Size: 0x1
|
|
Metadata: 0x2
|
|
PGOAnalyses:
|
|
- FuncEntryCount: 1000
|
|
PGOBBEntries:
|
|
- BBFreq: 1000
|
|
Successors:
|
|
- ID: 1
|
|
BrProb: 0x10000000
|
|
- ID: 2
|
|
BrProb: 0x15000000
|
|
- ID: 3
|
|
BrProb: 0x50000000
|
|
- BBFreq: 133
|
|
Successors:
|
|
- ID: 2
|
|
BrProb: 0x10000000
|
|
- ID: 3
|
|
BrProb: 0x70000000
|
|
- BBFreq: 18
|
|
Successors:
|
|
- ID: 3
|
|
BrProb: 0x80000000
|
|
- BBFreq: 1000
|
|
Successors: []
|
|
Symbols:
|
|
- Name: foo
|
|
Section: .text.foo
|
|
Value: 0x0
|
|
|
|
# ENTRY-FREQ-PROB:<foo>:
|
|
# ENTRY-FREQ-PROB:<BB3> (Entry count: 1000, Frequency: 1000, Successors: BB1:10000000, BB2:15000000, BB3:50000000):
|
|
# ENTRY-FREQ-PROB:<BB1> (Frequency: 133, Successors: BB2:10000000, BB3:70000000):
|
|
# ENTRY-FREQ-PROB:<BB2> (Frequency: 18, Successors: BB3:80000000):
|
|
# ENTRY-FREQ-PROB:<BB5> (Frequency: 1000):
|
|
|
|
# ENTRY-FREQ-PROB-PRETTY:<foo>:
|
|
# ENTRY-FREQ-PROB-PRETTY:<BB3> (Entry count: 1000, Frequency: 1.0, Successors: BB1:[0x10000000 / 0x80000000 = 12.50%], BB2:[0x15000000 / 0x80000000 = 16.41%], BB3:[0x50000000 / 0x80000000 = 62.50%]):
|
|
# ENTRY-FREQ-PROB-PRETTY:<BB1> (Frequency: 0.133, Successors: BB2:[0x10000000 / 0x80000000 = 12.50%], BB3:[0x70000000 / 0x80000000 = 87.50%]):
|
|
# ENTRY-FREQ-PROB-PRETTY:<BB2> (Frequency: 0.018, Successors: BB3:[0x80000000 / 0x80000000 = 100.00%]):
|
|
# ENTRY-FREQ-PROB-PRETTY:<BB5> (Frequency: 1.0):
|
|
|
|
# MISSING-SYMBOLIZE-OPERANDS: warning: --symbolize-operands must be enabled for --pretty-pgo-analysis-map to have an effect
|