================ @@ -0,0 +1,26 @@ +// RUN: %clang_profgen %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN +// RUN: %clang_profgen -o %t %s +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t +// RUN: llvm-profdata merge -o %t.profdata %t.profraw +// RUN: %clang_profuse=%t.profdata %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFUSE +#include "profile/instr_profiling.h" + +__attribute__((noinline)) int bar() { return 4; } + +int foo() { + __llvm_profile_reset_counters(); ---------------- qiongsiwu wrote:
Yes absolutely! See https://github.com/llvm/llvm-project/pull/76471/files#diff-73a2e60ab2cfe7ec232978d767316cd70af176df9a4d98b12d6d5ed92a63324fR1. https://github.com/llvm/llvm-project/pull/76471 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits