Empty functions (functions with no real code) are irrelevant for propeller optimizations and their addresses sometimes conflict with other functions which obfuscates the analysis. This simple change skips the BB address map emission for such functions. Reviewed By: tmsriram Differential Revision: https://reviews.llvm.org/D99395
22 lines
494 B
LLVM
22 lines
494 B
LLVM
;; Verify that the BB address map is not emitted for empty functions.
|
|
; RUN: llc < %s -mtriple=x86_64 -basic-block-sections=labels | FileCheck %s
|
|
|
|
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: .quad .Lfunc_begin1
|