[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)
Ellis Hoag via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 1 16:13:02 PDT 2024
================
@@ -0,0 +1,24 @@
+; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -S | FileCheck --check-prefixes=COLD %s
+; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -cold-function-coverage-max-entry-count=1 -S | FileCheck --check-prefixes=ENTRY-COUNT %s
+
+; COLD: call void @llvm.instrprof.increment(ptr @__profn_foo, i64 [[#]], i32 1, i32 0)
----------------
ellishg wrote:
Do you plan to support `-instrument-cold-function-coverage` without `-pgo-function-entry-coverage`? If not, I think we should add the flag here so we get the `llvm.instrprof.cover` intrinsic to more closely align with expected behavior.
https://github.com/llvm/llvm-project/pull/109837
More information about the cfe-commits
mailing list