31 lines · c
1/// Without PIE function addresses are the same across runs and their value2/// sites can be merged, matching the test.3// RUN: %clang_pgogen -o %t -O3 %S/Inputs/instrprof-value-merge.c -no-pie4// RUN: rm -rf %t.profdir5// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t6// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t7// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t8// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 19// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 110// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c11 12/// -z start-stop-gc requires binutils 2.37. Don't test the option for now.13/// TODO: Add -Wl,--gc-sections.14// RUN: %clang_pgogen -o %t -O3 %S/Inputs/instrprof-value-merge.c -no-pie -fuse-ld=bfd -ffunction-sections -fdata-sections15// RUN: rm -rf %t.profdir16// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t17// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t18// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t19// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 120// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 121// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c22 23// RUN: %clang_pgogen -o %t -O3 %S/Inputs/instrprof-value-merge.c -no-pie -fuse-ld=gold -ffunction-sections -fdata-sections24// RUN: rm -rf %t.profdir25// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t26// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t27// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t28// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 129// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 130// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c31