[llvm] [SHT_LLVM_BB_ADDR_MAP] Emit callsite offsets in the `SHT_LLVM_BB_ADDR_MAP` section. (PR #146563)
Rahman Lavaee via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 10:16:20 PDT 2025
================
@@ -405,31 +405,73 @@ This section is emitted with ``-basic-block-address-map`` and will contain
a BB address map table for every function.
The ``SHT_LLVM_BB_ADDR_MAP`` type provides backward compatibility to allow
-reading older versions of the BB address map generated by older compilers. Each
-function entry starts with a version byte which specifies the encoding version
-to use. The following versioning schemes are currently supported.
+reading older versions of the BB address map generated by older compilers (up to
+two years old). Each function entry starts with a version byte which specifies
+the encoding version to use. This is followed by a feature byte which specifies
+the features specific to this particular entry. The function base address is
+stored as a full address. Other addresses in the entry (block begin and end
+addresses and callsite addresses) are stored in a running-offset fashion, as
+offsets relative to prior addresses.
-Version 1 (newest): basic block address offsets are computed relative to the end
-of previous blocks.
+The following versioning schemes are currently supported (newer versions support
+features of the older versions).
+
+Version 3 (newest): Capable of encoding callsite offsets. Enabled by the 6th bit
----------------
rlavaee wrote:
The last one is for OmitBBEntries that was added a while back.
https://github.com/llvm/llvm-project/pull/146563
More information about the llvm-commits
mailing list