Debian Codegraph @

llvm/test/CodeGen/PowerPC/mcount-insertion.ll

raw
1 ; RUN: opt -S -passes='function(ee-instrument),cgscc(inline),function(ee-instrument<post-inline>)' %s | llc -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
2
3 ; The run-line mimics how Clang might run the instrumentation passes.
4
5 target datalayout = "E-m:e-i64:64-n32:64"
6
7
8 define void @leaf_function() #0 {
9 entry:
10 ret void
11
12 ; CHECK-LABEL: leaf_function:
13 ; CHECK: bl mcount
14 ; CHECK-NOT: bl
15 ; CHECK: bl __cyg_profile_func_enter
16 ; CHECK-NOT: bl
17 ; CHECK: bl __cyg_profile_func_exit
18 ; CHECK-NOT: bl
19 ; CHECK: blr
20 }
21
22
23 define void @root_function() #0 {
24 entry:
25 call void @leaf_function()
26 ret void
27
28 ; CHECK-LABEL: root_function:
29 ; CHECK: bl mcount
30 ; CHECK-NOT: bl
31 ; CHECK: bl __cyg_profile_func_enter
32 ; CHECK-NOT: bl
33
34 ; Entry and exit calls, inlined from @leaf_function()
35 ; CHECK: bl __cyg_profile_func_enter
36 ; CHECK-NOT: bl
37 ; CHECK: bl __cyg_profile_func_exit
38 ; CHECK-NOT: bl
39
40 ; CHECK: bl __cyg_profile_func_exit
41 ; CHECK-NOT: bl
42 ; CHECK: blr
43 }
44
45 attributes #0 = { "instrument-function-entry-inlined"="mcount" "instrument-function-entry"="__cyg_profile_func_enter" "instrument-function-exit"="__cyg_profile_func_exit" }