xref: /aosp_15_r20/external/compiler-rt/test/profile/instrprof-value-prof-evict.test (revision 7c3d14c8b49c529e04be81a3ce6f5cc23712e4c6)
1*7c3d14c8STreehugger Robot// 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*7c3d14c8STreehugger Robot// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
3*7c3d14c8STreehugger Robot// RUN: llvm-profdata merge -o %t.profdata %t.profraw
4*7c3d14c8STreehugger Robot// RUN: llvm-profdata show --all-functions -ic-targets  %t.profdata | FileCheck  %S/Inputs/instrprof-value-prof-evict.c
5*7c3d14c8STreehugger Robot
6*7c3d14c8STreehugger Robot// IR level instrumentation
7*7c3d14c8STreehugger Robot// 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*7c3d14c8STreehugger Robot// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw %run %t.ir
9*7c3d14c8STreehugger Robot// RUN: llvm-profdata merge -o %t.ir.profdata %t.ir.profraw
10*7c3d14c8STreehugger Robot// RUN: llvm-profdata show --all-functions -ic-targets  %t.ir.profdata | FileCheck  %S/Inputs/instrprof-value-prof-evict.c
11*7c3d14c8STreehugger Robot
12*7c3d14c8STreehugger Robot// IR level instrumentation, dynamic allocation
13*7c3d14c8STreehugger Robot// 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*7c3d14c8STreehugger Robot// RUN: env LLVM_PROFILE_FILE=%t.ir.dyn.profraw %run %t.ir.dyn
15*7c3d14c8STreehugger Robot// RUN: llvm-profdata merge -o %t.ir.dyn.profdata %t.ir.dyn.profraw
16*7c3d14c8STreehugger Robot// RUN: llvm-profdata show --all-functions -ic-targets  %t.ir.dyn.profdata | FileCheck  %S/Inputs/instrprof-value-prof-evict.c
17