brintos

brintos / llvm-project-archived public Read only

0
0
Text · 974 B · 0b21b24 Raw
36 lines · plain
1; Check that '__attribute__((always_inline)) inline' functions are inlined.2 3; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes='instrprof,inline' -S | FileCheck %s4 5target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"6target triple = "x86_64-apple-macosx10.13.0"7 8;; Don't record the address of an available_externally alwaysinline function.9; CHECK:      @__profd_foo = linkonce_odr hidden global10; CHECK-NOT:  @foo11; CHECK-SAME: , align 812 13@__profn_foo = linkonce_odr hidden constant [3 x i8] c"foo"14 15; CHECK-LABEL: @main16; CHECK-NOT: call17define i32 @main() {18entry:19  %call = call i32 @foo()20  ret i32 %call21}22 23declare void @llvm.instrprof.increment(ptr, i64, i32, i32) #024 25define available_externally i32 @foo() #1 {26entry:27  call void @llvm.instrprof.increment(ptr @__profn_foo, i64 0, i32 1, i32 0)28  ret i32 029}30 31attributes #0 = { nounwind }32attributes #1 = { alwaysinline }33 34!llvm.module.flags = !{!0}35!0 = !{i32 2, !"EnableValueProfiling", i32 1}36