brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · afea495 Raw
46 lines · plain
1; RUN: opt -S -passes='function(ee-instrument),cgscc(inline),function(ee-instrument<post-inline>)' %s | llc -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s2 3; The run-line mimics how Clang might run the instrumentation passes.4 5target datalayout = "E-m:e-i64:64-n32:64"6 7 8define void @leaf_function() #0 {9entry:10  ret void11 12; CHECK-LABEL: leaf_function:13; CHECK: bl mcount14; CHECK-NOT: bl15; CHECK: bl __cyg_profile_func_enter16; CHECK-NOT: bl17; CHECK: bl __cyg_profile_func_exit18; CHECK-NOT: bl19; CHECK: blr20}21 22 23define void @root_function() #0 {24entry:25  call void @leaf_function()26  ret void27 28; CHECK-LABEL: root_function:29; CHECK: bl mcount30; CHECK-NOT: bl31; CHECK: bl __cyg_profile_func_enter32; CHECK-NOT: bl33 34; Entry and exit calls, inlined from @leaf_function()35; CHECK: bl __cyg_profile_func_enter36; CHECK-NOT: bl37; CHECK: bl __cyg_profile_func_exit38; CHECK-NOT: bl39 40; CHECK: bl __cyg_profile_func_exit41; CHECK-NOT: bl42; CHECK: blr43}44 45attributes #0 = { "instrument-function-entry-inlined"="mcount" "instrument-function-entry"="__cyg_profile_func_enter" "instrument-function-exit"="__cyg_profile_func_exit" }46