Files
clang-p2996/llvm/test/CodeGen/X86/basic-block-sections-labels-empty-function.ll
Rahman Lavaee 90c401cab6 [Propeller] Do not generate the BB address map for empty functions.
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
2021-03-29 20:15:01 -07:00

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