<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Object/ELF.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>clang-format ELF.cpp</title>
<updated>2025-07-02T20:12:06+00:00</updated>
<author>
<name>Rahman Lavaee</name>
<email>rahmanl@google.com</email>
</author>
<published>2025-07-02T20:10:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=734d31a464e204db699c1cf9433494926deb2aa2'/>
<id>734d31a464e204db699c1cf9433494926deb2aa2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[SHT_LLVM_BB_ADDR_MAP] Cleanup old version support code from ELF.cpp.</title>
<updated>2025-07-02T20:01:43+00:00</updated>
<author>
<name>Rahman Lavaee</name>
<email>rahmanl@google.com</email>
</author>
<published>2025-07-02T20:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8eb61d9154c5379c1a74f65aa850cac5060c8b0a'/>
<id>8eb61d9154c5379c1a74f65aa850cac5060c8b0a</id>
<content type='text'>
This change was mistakenly dropped from the prior commit 6b623a6622707ea47d84ab0069f766215a6fec44</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change was mistakenly dropped from the prior commit 6b623a6622707ea47d84ab0069f766215a6fec44</pre>
</div>
</content>
</entry>
<entry>
<title>[SHT_LLVM_BB_ADDR_MAP] Remove support for versions 1 and 0 (SHT_LLVM_BB_ADDR_MAP_V0). (#146186)</title>
<updated>2025-07-02T17:31:52+00:00</updated>
<author>
<name>Rahman Lavaee</name>
<email>rahmanl@google.com</email>
</author>
<published>2025-07-02T17:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b623a6622707ea47d84ab0069f766215a6fec44'/>
<id>6b623a6622707ea47d84ab0069f766215a6fec44</id>
<content type='text'>
Version 2 was added more than two years ago
(https://github.com/llvm/llvm-project/commit/6015a045d768feab3bae9ad9c0c81e118df8b04a).
So it should be safe to deprecate older versions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Version 2 was added more than two years ago
(https://github.com/llvm/llvm-project/commit/6015a045d768feab3bae9ad9c0c81e118df8b04a).
So it should be safe to deprecate older versions.</pre>
</div>
</content>
</entry>
<entry>
<title>[SHT_LLVM_BB_ADDR_MAP] Encode and decode callsite offsets in a newly-introduced SHT_LLVM_BB_ADDR_MAP version. (#144426)</title>
<updated>2025-06-23T16:25:14+00:00</updated>
<author>
<name>Rahman Lavaee</name>
<email>rahmanl@google.com</email>
</author>
<published>2025-06-23T16:25:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8d7a8fcc3ab9f6d4c4a7e4312876fe94ed3d6c4f'/>
<id>8d7a8fcc3ab9f6d4c4a7e4312876fe94ed3d6c4f</id>
<content type='text'>
Recently, we have been looking at some optimizations targeting
individual calls. In particular, we plan to extend the address mapping
technique to map to individual callsites. For example, in this piece of
code for a basic blocks:

```
&lt;BB&gt;:
1200:    lea 0x1(%rcx), %rdx
1204:    callq foo
1209:    cmpq 0x10, %rdx
120d:    ja  L1
```

We want to emit 0x9 as the call site offset for `callq foo` (the offset
from the block entry to right after the call), so that we know if a
sampled address is before the call or after.

This PR implements the decode/encode/emit capability. The Codegen change
will be implemented in a later PR.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently, we have been looking at some optimizations targeting
individual calls. In particular, we plan to extend the address mapping
technique to map to individual callsites. For example, in this piece of
code for a basic blocks:

```
&lt;BB&gt;:
1200:    lea 0x1(%rcx), %rdx
1204:    callq foo
1209:    cmpq 0x10, %rdx
120d:    ja  L1
```

We want to emit 0x9 as the call site offset for `callq foo` (the offset
from the block entry to right after the call), so that we know if a
sampled address is before the call or after.

This PR implements the decode/encode/emit capability. The Codegen change
will be implemented in a later PR.</pre>
</div>
</content>
</entry>
<entry>
<title>[SHT_LLVM_BB_ADDR_MAP] Support decompressing the SHT_LLVM_BB_ADDR_MAP section. (#142825)</title>
<updated>2025-06-05T02:55:01+00:00</updated>
<author>
<name>Rahman Lavaee</name>
<email>rahmanl@google.com</email>
</author>
<published>2025-06-05T02:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f6260daf30fdd0eca9b6f5447433da4386bd0e54'/>
<id>f6260daf30fdd0eca9b6f5447433da4386bd0e54</id>
<content type='text'>
Compression of SHT_LLVM_BB_ADDR_MAP with zstd can give 3X compression
ratio, which is especially beneficial with PGO_analysis_map. To read the
data back, we must decompress it. Though we can use llvm-objcopy to do
this, it's much better to do this decompression internally in the
library API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compression of SHT_LLVM_BB_ADDR_MAP with zstd can give 3X compression
ratio, which is especially beneficial with PGO_analysis_map. To read the
data back, we must decompress it. Though we can use llvm-objcopy to do
this, it's much better to do this decompression internally in the
library API.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Value-initialize values with *Map::try_emplace (NFC) (#141522)</title>
<updated>2025-05-26T22:13:02+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-26T22:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=89308de4b0f4f20c685c6d9cecd6dabe117080b4'/>
<id>89308de4b0f4f20c685c6d9cecd6dabe117080b4</id>
<content type='text'>
try_emplace value-initializes values, so we do not need to pass
nullptr to try_emplace when the value types are raw pointers or
std::unique_ptr&lt;T&gt;.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
try_emplace value-initializes values, so we do not need to pass
nullptr to try_emplace when the value types are raw pointers or
std::unique_ptr&lt;T&gt;.</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Add support for CREL locations for SHT_LLVM_BB_ADDR_MAP</title>
<updated>2025-02-10T18:58:56+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2025-02-10T18:58:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=56b760cc472fd2e919e5046575b6c537cb7f3d0b'/>
<id>56b760cc472fd2e919e5046575b6c537cb7f3d0b</id>
<content type='text'>
This patch adds support for properly decoding SHT_LLVM_BB_ADDR_MAP
sections in relocatable object files when the relocation format is CREL.

Reviewers: rlavaee, jh7370, red1bluelost, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/126446
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for properly decoding SHT_LLVM_BB_ADDR_MAP
sections in relocatable object files when the relocation format is CREL.

Reviewers: rlavaee, jh7370, red1bluelost, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/126446
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Add support for CREL to getSectionAndRelocations</title>
<updated>2025-02-10T18:57:19+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2025-02-10T18:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=808b1c11a26ba986a4148e10f30a5ba995766f83'/>
<id>808b1c11a26ba986a4148e10f30a5ba995766f83</id>
<content type='text'>
This patch updates the getSectionAndRelocations function to also support
CREL relocation sections. Unit tests have been added. This patch also
updates consumers to say they explicitly do not support CREL format
relocations. Subsequent patches will make the consumers work with CREL
format relocations and also add in testing support.

Reviewers: red1bluelost, MaskRay, rlavaee

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/126445
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates the getSectionAndRelocations function to also support
CREL relocation sections. Unit tests have been added. This patch also
updates consumers to say they explicitly do not support CREL format
relocations. Subsequent patches will make the consumers work with CREL
format relocations and also add in testing support.

Reviewers: red1bluelost, MaskRay, rlavaee

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/126445
</pre>
</div>
</content>
</entry>
<entry>
<title>[SHT_LLVM_BB_ADDR_MAP] Add an option to skip emitting bb entries (#114447)</title>
<updated>2024-11-22T19:51:34+00:00</updated>
<author>
<name>Lei Wang</name>
<email>wlei@fb.com</email>
</author>
<published>2024-11-22T19:51:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cf83a7fdc2dfac8220d9923a831181dccb9f7277'/>
<id>cf83a7fdc2dfac8220d9923a831181dccb9f7277</id>
<content type='text'>
Sometimes we want to use a `PgoAnalysisMap` feature that doesn't require
the BB entries info, e.g. only the `FuncEntryCount`, but the BB entries
is emitted by default, so I'm adding an option to skip the info for this
case to save the binary size(can save ~90% size of the section). For
implementation, it extends a new field(`OmitBBEntries`) in
`BBAddrMap::Features` for this and it's controlled by a switch
`--basic-block-address-map-skip-bb-entries`.

Note that this naturally supports backwards compatibility as the field
is zero for the old version, matches the decoding in the new version
llvm.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes we want to use a `PgoAnalysisMap` feature that doesn't require
the BB entries info, e.g. only the `FuncEntryCount`, but the BB entries
is emitted by default, so I'm adding an option to skip the info for this
case to save the binary size(can save ~90% size of the section). For
implementation, it extends a new field(`OmitBBEntries`) in
`BBAddrMap::Features` for this and it's controlled by a switch
`--basic-block-address-map-skip-bb-entries`.

Note that this naturally supports backwards compatibility as the field
is zero for the old version, matches the decoding in the new version
llvm.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC,SHT_LLVM_BB_ADDR_MAP] Fix undefined behaviour in ELF.cpp. (#115830)</title>
<updated>2024-11-12T17:49:56+00:00</updated>
<author>
<name>Rahman Lavaee</name>
<email>rahmanl@google.com</email>
</author>
<published>2024-11-12T17:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=789de766b5fc9c8ffa6e808a8baf0e585ac2e818'/>
<id>789de766b5fc9c8ffa6e808a8baf0e585ac2e818</id>
<content type='text'>
`BBEntries` is defined outside of the loop and is used after move which
is undefined behavior.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`BBEntries` is defined outside of the loop and is used after move which
is undefined behavior.</pre>
</div>
</content>
</entry>
</feed>
