1// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=10 -o %t %S/Inputs/instrprof-value-prof-evict.c 2// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t 3// RUN: llvm-profdata merge -o %t.profdata %t.profraw 4// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/Inputs/instrprof-value-prof-evict.c 5 6// IR level instrumentation 7// RUN: %clang_profgen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=10 -Xclang -fprofile-instrument=llvm -o %t.ir %S/Inputs/instrprof-value-prof-evict.c 8// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw %run %t.ir 9// RUN: llvm-profdata merge -o %t.ir.profdata %t.ir.profraw 10// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/Inputs/instrprof-value-prof-evict.c 11 12// IR level instrumentation, dynamic allocation 13// RUN: %clang_profgen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -Xclang -fprofile-instrument=llvm -o %t.ir.dyn %S/Inputs/instrprof-value-prof-evict.c 14// RUN: env LLVM_PROFILE_FILE=%t.ir.dyn.profraw %run %t.ir.dyn 15// RUN: llvm-profdata merge -o %t.ir.dyn.profdata %t.ir.dyn.profraw 16// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.dyn.profdata | FileCheck %S/Inputs/instrprof-value-prof-evict.c 17