2016-05-22 06:55:45 +08:00
|
|
|
// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -o %t %S/Inputs/instrprof-value-prof-real.c
|
|
|
|
// RUN: env LLVM_PROFILE_FILE=%t.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t
|
2016-01-26 06:09:30 +08:00
|
|
|
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
|
|
|
|
// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c
|
2016-01-26 06:33:29 +08:00
|
|
|
|
2016-05-12 02:37:08 +08:00
|
|
|
// IR level instrumentation
|
2016-07-20 06:12:00 +08:00
|
|
|
// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -mllvm -vp-counters-per-site=256 -o %t.ir %S/Inputs/instrprof-value-prof-real.c
|
2016-05-22 06:55:45 +08:00
|
|
|
// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir
|
2016-01-26 06:33:29 +08:00
|
|
|
// RUN: llvm-profdata merge -o %t.ir.profdata %t.ir.profraw
|
|
|
|
// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c
|
2016-05-12 02:37:08 +08:00
|
|
|
// RUN: llvm-profdata merge -text %t.ir.profdata -o %t.ir.proftxt
|
|
|
|
// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.proftxt
|
2016-05-22 06:55:45 +08:00
|
|
|
|
|
|
|
// IR level instrumentation with dynamic memory allocation
|
2016-07-20 06:12:00 +08:00
|
|
|
// RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -o %t.ir.dyn %S/Inputs/instrprof-value-prof-real.c
|
2016-05-22 06:55:45 +08:00
|
|
|
// RUN: env LLVM_PROFILE_FILE=%t.ir.dyn.profraw %run %t.ir.dyn
|
|
|
|
// RUN: llvm-profdata merge -o %t.ir.dyn.profdata %t.ir.dyn.profraw
|
|
|
|
// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.dyn.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c
|
|
|
|
// RUN: llvm-profdata merge -text %t.ir.dyn.profdata -o %t.ir.dyn.proftxt
|
|
|
|
// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.dyn.proftxt
|
2016-05-26 05:27:02 +08:00
|
|
|
|