You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
574 B
20 lines
574 B
// Test that function entry counts are set correctly.
|
|
|
|
// RUN: llvm-profdata merge %S/Inputs/func-entry.proftext -o %t.profdata
|
|
// RUN: %clang_cc1 %s -o - -disable-llvm-optzns -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck %s
|
|
|
|
void foo(void);
|
|
|
|
// CHECK: @foo() #{{[0-9]}} !prof [[FOO:![0-9]+]]
|
|
void foo() { return; }
|
|
|
|
// CHECK: @main() #{{[0-9]}} !prof [[MAIN:![0-9]+]]
|
|
int main() {
|
|
int i;
|
|
for (i = 0; i < 10000; i++) foo();
|
|
return 0;
|
|
}
|
|
|
|
// CHECK: [[FOO]] = !{!"function_entry_count", i64 1000}
|
|
// CHECK: [[MAIN]] = !{!"function_entry_count", i64 1}
|