Adding Matching and Inference Functionality to Propeller. For detailed information, please refer to the following RFC: https://discourse.llvm.org/t/rfc-adding-matching-and-inference-functionality-to-propeller/86238. This is the second PR, which includes the calculation of basic block hashes and their emission to the ELF file. It is associated with the previous PR at https://github.com/llvm/llvm-project/pull/160706. co-authors: lifengxiang1025 [lifengxiang@kuaishou.com](mailto:lifengxiang@kuaishou.com); zcfh [wuminghui03@kuaishou.com](mailto:wuminghui03@kuaishou.com) Co-authored-by: lifengxiang1025 <lifengxiang@kuaishou.com> Co-authored-by: zcfh <wuminghui03@kuaishou.com> Co-authored-by: Rahman Lavaee <rahmanl@google.com>
26 lines
788 B
LLVM
26 lines
788 B
LLVM
;; Verify that the BB address map is not emitted for empty functions.
|
|
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,BASIC
|
|
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map -pgo-analysis-map=func-entry-count,bb-freq | FileCheck %s --check-prefixes=CHECK,PGO
|
|
|
|
define void @empty_func() {
|
|
entry:
|
|
unreachable
|
|
}
|
|
; CHECK: {{^ *}}.text{{$}}
|
|
; CHECK: empty_func:
|
|
; CHECK: .Lfunc_begin0:
|
|
; CHECK-NOT: .section .llvm_bb_addr_map
|
|
|
|
define void @func() {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: func:
|
|
; CHECK: .Lfunc_begin1:
|
|
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text{{$}}
|
|
; CHECK-NEXT: .byte 4 # version
|
|
; BASIC-NEXT: .byte 0 # feature
|
|
; PGO-NEXT: .byte 3 # feature
|
|
; CHECK-NEXT: .quad .Lfunc_begin1 # function address
|