summaryrefslogtreecommitdiff
path: root/llvm/docs/Extensions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/Extensions.rst')
-rw-r--r--llvm/docs/Extensions.rst22
1 files changed, 21 insertions, 1 deletions
diff --git a/llvm/docs/Extensions.rst b/llvm/docs/Extensions.rst
index ea267842cdc3..1ebea4a96eaa 100644
--- a/llvm/docs/Extensions.rst
+++ b/llvm/docs/Extensions.rst
@@ -535,6 +535,27 @@ Example of BBAddrMap with PGO data:
.uleb128 1000 # BB_3 basic block frequency (only when enabled)
.uleb128 0 # BB_3 successors count (only enabled with branch probabilities)
+``SHT_LLVM_FUNC_MAP`` Section (function address map)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+This section stores the mapping from the binary address of function to its
+related metadata features. It is used to emit function-level analysis data and
+can be enabled through ``--func-map`` option. The fields are encoded in the
+following format:
+
+#. A version number byte used for backward compatibility.
+#. The function's entry address.
+#. Dynamic Instruction Count, which is calculated as the total PGO counts for all
+ instructions within the function.
+
+Example:
+
+.. code-block:: gas
+
+ .section ".llvm_func_map","",@llvm_func_map
+ .byte 1 # version number
+ .quad .Lfunc_begin1 # function address
+ .uleb128 1000 # dynamic instruction count
+
``SHT_LLVM_OFFLOADING`` Section (offloading data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This section stores the binary data used to perform offloading device linking
@@ -725,4 +746,3 @@ follows:
add x16, x16, :lo12:__chkstk
blr x16
sub sp, sp, x15, lsl #4
-