diff options
author | Amir Ayupov <aaupov@fb.com> | 2024-03-20 16:24:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 16:24:21 -0700 |
commit | ad00e7e5ed5ab050151c115b627e11a8e3960e25 (patch) | |
tree | 6c7cbbd659a8edcc1e47477fd1287c71d9aa3866 /bolt/docs | |
parent | 1918d4bcb21af6a7e4de32073455ac51f2f9673f (diff) | |
download | llvm-ad00e7e5ed5ab050151c115b627e11a8e3960e25.zip llvm-ad00e7e5ed5ab050151c115b627e11a8e3960e25.tar.gz llvm-ad00e7e5ed5ab050151c115b627e11a8e3960e25.tar.bz2 |
[BOLT] Write and parse BF/BB hashes in BAT
This increases BAT section size to:
- large binary: 34832976 bytes (0.90x original),
- medium binary: 3586800 bytes (0.60x original),
- small binary: 816 bytes (0.57x original).
Test Plan: Updated bolt/test/X86/bolt-address-translation.test
Reviewers: rafaelauler, dcci, ayermolo, maksfb
Reviewed By: rafaelauler
Pull Request: https://github.com/llvm/llvm-project/pull/76907
Diffstat (limited to 'bolt/docs')
-rw-r--r-- | bolt/docs/BAT.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bolt/docs/BAT.md b/bolt/docs/BAT.md index d1cab98..060fc63 100644 --- a/bolt/docs/BAT.md +++ b/bolt/docs/BAT.md @@ -79,6 +79,7 @@ Hot indices are delta encoded, implicitly starting at zero. | ------ | ------| ----------- | | `Address` | Continuous, Delta, ULEB128 | Function address in the output binary | | `HotIndex` | Delta, ULEB128 | Cold functions only: index of corresponding hot function in hot functions table | +| `FuncHash` | 8b | Hot functions only: function hash for input function | | `NumEntries` | ULEB128 | Number of address translation entries for a function | | `EqualElems` | ULEB128 | Hot functions only: number of equal offsets in the beginning of a function | | `BranchEntries` | Bitmask, `alignTo(EqualElems, 8)` bits | Hot functions only: if `EqualElems` is non-zero, bitmask denoting entries with `BRANCHENTRY` bit | @@ -94,6 +95,7 @@ entry is encoded. Input offsets implicitly start at zero. | ------ | ------| ----------- | | `OutputOffset` | Continuous, Delta, ULEB128 | Function offset in output binary | | `InputOffset` | Optional, Delta, SLEB128 | Function offset in input binary with `BRANCHENTRY` LSB bit | +| `BBHash` | Optional, 8b | Basic block entries only: basic block hash in input binary | `BRANCHENTRY` bit denotes whether a given offset pair is a control flow source (branch or call instruction). If not set, it signifies a control flow target |