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
24 lines
698 B
LLVM
24 lines
698 B
LLVM
; RUN: opt < %s -skip-partial-inlining-cost-analysis -partial-inliner -S | FileCheck %s
|
|
; RUN: opt < %s -skip-partial-inlining-cost-analysis -passes=partial-inliner -S | FileCheck %s
|
|
|
|
define internal i32 @inlinedFunc(i1 %cond, i32* align 4 %align.val) {
|
|
entry:
|
|
br i1 %cond, label %if.then, label %return
|
|
if.then:
|
|
; Dummy store to have more than 0 uses
|
|
store i32 10, i32* %align.val, align 4
|
|
br label %return
|
|
return: ; preds = %entry
|
|
ret i32 0
|
|
}
|
|
|
|
define internal i32 @dummyCaller(i1 %cond, i32* align 2 %align.val) {
|
|
entry:
|
|
; CHECK-LABEL: @dummyCaller
|
|
; CHECK: br
|
|
; CHECK: call void @inlinedFunc.1.
|
|
%val = call i32 @inlinedFunc(i1 %cond, i32* %align.val)
|
|
ret i32 %val
|
|
}
|
|
|