2014-12-09 02:02:35 +08:00
|
|
|
;; Check that we don't emit the runtime hooks if the user provided them.
|
|
|
|
|
|
|
|
; RUN: opt < %s -instrprof -S | FileCheck %s
|
|
|
|
; CHECK-NOT: define {{.*}} @__llvm_profile_runtime_user()
|
2015-02-28 05:17:42 +08:00
|
|
|
; CHECK-NOT: load i32, i32* @__llvm_profile_runtime
|
2014-12-09 02:02:35 +08:00
|
|
|
|
|
|
|
@__llvm_profile_runtime = global i32 0, align 4
|
|
|
|
|
2015-12-15 07:26:27 +08:00
|
|
|
@__prf_nm_foo = hidden constant [3 x i8] c"foo"
|
2014-12-09 02:02:35 +08:00
|
|
|
|
|
|
|
define void @foo() {
|
2015-12-15 07:26:27 +08:00
|
|
|
call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__prf_nm_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
|
2014-12-09 02:02:35 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.instrprof.increment(i8*, i64, i32, i32)
|