[llvm] [compiler-rt] [docs][IRPGO]Document two binary formats for IRPGO profiles (PR #76105)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 10:31:15 PST 2023


================
@@ -0,0 +1,395 @@
+===================================
+Instrumentation PGO Profile Format
+===================================
+
+.. contents::
+   :local:
+
+
+Overview
+=========
+
+Instrumentation PGO inserts `llvm.instrprof.*` `code generator intrinsics`_
+in the code to generate profiles. This document describes two binary profile
+formats (raw and indexed) used by instrumentation.
+
+.. _`code generator intrinsics`: https://llvm.org/docs/LangRef.html#code-generator-intrinsics
+
+.. note::
+  The instrumentation profile format supports non-PGO use cases (e.g., temporal
+  profiling). This document will focus on PGO. Source coverage uses both
+  frontend instrumentation profiles and coverage mapping. The format for
+  coverage mapping has its own `documentation`_.
+
+.. _`documentation`: https://llvm.org/docs/CoverageMappingFormat.html
+
+Raw Profile Format
+===================
+
+The raw profile is generated by running the instrumented binary. It is a memory
+dump of the profile data.
----------------
snehasish wrote:

nit: s/profile counters/profile data/

https://github.com/llvm/llvm-project/pull/76105


More information about the llvm-commits mailing list