mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
ba3eb3f3a0
Summary: If a function is hot, put it in text.hot section. Reviewers: davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17532 llvm-svn: 261607
32 lines
1.1 KiB
LLVM
32 lines
1.1 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-pc-linux -group-functions-by-hotness=true | FileCheck %s -check-prefix=PARTITION
|
|
; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -group-functions-by-hotness=false | FileCheck %s -check-prefix=NO-PARTITION-FUNCTION-SECTION
|
|
; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -group-functions-by-hotness=true | FileCheck %s -check-prefix=PARTITION-FUNCTION-SECTION
|
|
|
|
; PARTITION: .text.unlikely
|
|
; PARTITION: .globl _Z3foov
|
|
; NO-PARTITION-FUNCTION-SECTION: .text._Z3foov
|
|
; PARTITION-FUNCTION-SECTION: .text.unlikely._Z3foov
|
|
define i32 @_Z3foov() #0 {
|
|
ret i32 0
|
|
}
|
|
|
|
; PARTITION: .globl _Z3barv
|
|
; NO-PARTITION-FUNCTION-SECTION: .text._Z3barv
|
|
; PARTITION-FUNCTION-SECTION: .text.unlikely._Z3barv
|
|
define i32 @_Z3barv() #1 !prof !0 {
|
|
ret i32 1
|
|
}
|
|
|
|
; PARTITION: .text
|
|
; PARTITION: .globl _Z3bazv
|
|
; NO-PARTITION-FUNCTION-SECTION: .text._Z3bazv
|
|
; PARTITION-FUNCTION-SECTION: .text._Z3bazv
|
|
define i32 @_Z3bazv() #1 {
|
|
ret i32 2
|
|
}
|
|
|
|
attributes #0 = { nounwind uwtable cold }
|
|
attributes #1 = { nounwind uwtable }
|
|
|
|
!0 = !{!"function_entry_count", i64 0}
|