Summary: The current default of appending "_"+entry block label to the new extracted cold function breaks demangling. Change the deliminator from "_" to "." to enable demangling. Because the header block label will be empty for release compile code, use "extracted" after the "." when the label is empty. Additionally, add a mechanism for the client to pass in an alternate suffix applied after the ".", and have the hot cold split pass use "cold."+Count, where the Count is currently 1 but can be used to uniquely number multiple cold functions split out from the same function with D53588. Reviewers: sebpop, hiraditya Subscribers: llvm-commits, erik.pilkington Differential Revision: https://reviews.llvm.org/D53534 llvm-svn: 345178
37 lines
823 B
LLVM
37 lines
823 B
LLVM
; RUN: opt -S -partial-inliner %s | FileCheck %s
|
|
|
|
; CHECK-LABEL: define void @dipsy(
|
|
; CHECK-NEXT: call void @tinkywinky.1.ontrue()
|
|
; CHECK-NEXT: call void @patatuccio()
|
|
; CHECK-NEXT: ret void
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-LABEL: define internal void @tinkywinky.1.ontrue() {
|
|
; CHECK-NEXT: newFuncRoot:
|
|
; CHECK-NEXT: br label %ontrue
|
|
; CHECK: onfalse{{.*}}:
|
|
; CHECK-NEXT: ret void
|
|
; CHECK: ontrue:
|
|
; CHECK-NEXT: call void @patatino()
|
|
; CHECK-NEXT: br label %onfalse{{.*}}
|
|
; CHECK-NEXT: }
|
|
|
|
declare void @patatino()
|
|
declare void @patatuccio()
|
|
|
|
define fastcc void @tinkywinky() {
|
|
br i1 true, label %ontrue, label %onfalse
|
|
ontrue:
|
|
call void @patatino()
|
|
br label %onfalse
|
|
onfalse:
|
|
call void @patatuccio()
|
|
ret void
|
|
cantreachme:
|
|
ret void
|
|
}
|
|
define void @dipsy() {
|
|
call fastcc void @tinkywinky()
|
|
ret void
|
|
}
|