<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lld/ELF/CallGraphSort.cpp, branch users/chapuni/cov/single/switch</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>[ELF] Allow --symbol-ordering-file and call graph profile to be used together</title>
<updated>2025-01-06T01:13:23+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-01-06T01:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bcc1e584483c8246b651290b0c2d696bd57006a9'/>
<id>bcc1e584483c8246b651290b0c2d696bd57006a9</id>
<content type='text'>
Port https://reviews.llvm.org/D117354 from the MachO port.

If both --symbol-ordering-file and call graph profile are present, the
--symbol-ordering-file takes precedence, but the call graph profile is
still used for symbols that don't appear in the order file.

In addition, call graph profile described sections are now ordered
before other sections.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Port https://reviews.llvm.org/D117354 from the MachO port.

If both --symbol-ordering-file and call graph profile are present, the
--symbol-ordering-file takes precedence, but the call graph profile is
still used for symbols that don't appear in the order file.

In addition, call graph profile described sections are now ordered
before other sections.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Internalize computeCacheDirectedSortOrder. NFC</title>
<updated>2025-01-06T00:19:09+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-01-06T00:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8d2b070f07969f8358c93b9cf56834806fdc3efa'/>
<id>8d2b070f07969f8358c93b9cf56834806fdc3efa</id>
<content type='text'>
and delete an incorremtn comment about ctx.arg.callGraphProfile
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and delete an incorremtn comment about ctx.arg.callGraphProfile
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Replace error(...) with ErrAlways or Err</title>
<updated>2024-11-07T06:04:52+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-07T06:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=09c2c5e1e9f3b3bb17f777f153407430f3cef15e'/>
<id>09c2c5e1e9f3b3bb17f777f153407430f3cef15e</id>
<content type='text'>
Most are migrated to ErrAlways mechanically.
In the future we should change most to Err.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most are migrated to ErrAlways mechanically.
In the future we should change most to Err.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Pass Ctx &amp;</title>
<updated>2024-10-12T01:35:02+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-10-12T01:35:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1c28f3113377da218d67dc76aa0876b6250ceb6a'/>
<id>1c28f3113377da218d67dc76aa0876b6250ceb6a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Replace remnant config-&gt; with ctx.arg.</title>
<updated>2024-09-23T01:03:33+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-09-23T01:03:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b8248dacade77ea5abc49bd8c58d0b1656957492'/>
<id>b8248dacade77ea5abc49bd8c58d0b1656957492</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Replace config-&gt; with ctx.arg.</title>
<updated>2024-09-22T05:46:13+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-09-22T05:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6f482010aeb921437193ef5c8884f743ec7cb360'/>
<id>6f482010aeb921437193ef5c8884f743ec7cb360</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Fix assertion in cdsort (#71708)</title>
<updated>2023-11-08T20:34:36+00:00</updated>
<author>
<name>spupyrev</name>
<email>spupyrev@users.noreply.github.com</email>
</author>
<published>2023-11-08T20:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ef6d187115a28c745108f2b26a5d5a62cedf9b3c'/>
<id>ef6d187115a28c745108f2b26a5d5a62cedf9b3c</id>
<content type='text'>
It seems that some functions (.text.unlikely.xxx) may have zero size,
which
makes some builds with enabled assertions fail. Removing the assertion
and
extending one test to fix the build.
The sorting can process such zero-sized functions so no changes there
are needed</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems that some functions (.text.unlikely.xxx) may have zero size,
which
makes some builds with enabled assertions fail. Removing the assertion
and
extending one test to fix the build.
The sorting can process such zero-sized functions so no changes there
are needed</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] A new code layout algorithm for function reordering [3a/3]</title>
<updated>2023-09-26T13:24:34+00:00</updated>
<author>
<name>spupyrev</name>
<email>spupyrev@fb.com</email>
</author>
<published>2023-06-13T17:08:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=904b3f66f59e490e8b6d0c8cc8cacb7a91add544'/>
<id>904b3f66f59e490e8b6d0c8cc8cacb7a91add544</id>
<content type='text'>
We are brining a new algorithm for function layout (reordering) based on the
call graph (extracted from a profile data). The algorithm is an improvement of
top of a known heuristic, C^3. It tries to co-locate hot and frequently executed
together functions in the resulting ordering. Unlike C^3, it explores a larger
search space and have an objective closely tied to the performance of
instruction and i-TLB caches. Hence, the name CDS = Cache-Directed Sort.
The algorithm can be used at the linking or post-linking (e.g., BOLT) stage.
Refer to https://reviews.llvm.org/D152834 for the actual implementation of the
reordering algorithm.

This diff adds a linker option to replace the existing C^3 heuristic with CDS.
The new behavior can be turned on by passing "--use-cache-directed-sort".
(the plan is to make it default in a next diff)

**Perf-impact**
clang-10 binary (built with LTO+AutoFDO/CSSPGO): wins on top of C^3 in [0.3%..0.8%]
rocksDB-8 binary (built with LTO+CSSPGO): wins on top of C^3 in [0.8%..1.5%]

Note that function layout affects the perf the most on older machines (with
smaller instruction/iTLB caches) and when huge pages are not enabled. The impact
on newer processors with huge pages enabled is likely neutral/minor.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D152840
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are brining a new algorithm for function layout (reordering) based on the
call graph (extracted from a profile data). The algorithm is an improvement of
top of a known heuristic, C^3. It tries to co-locate hot and frequently executed
together functions in the resulting ordering. Unlike C^3, it explores a larger
search space and have an objective closely tied to the performance of
instruction and i-TLB caches. Hence, the name CDS = Cache-Directed Sort.
The algorithm can be used at the linking or post-linking (e.g., BOLT) stage.
Refer to https://reviews.llvm.org/D152834 for the actual implementation of the
reordering algorithm.

This diff adds a linker option to replace the existing C^3 heuristic with CDS.
The new behavior can be turned on by passing "--use-cache-directed-sort".
(the plan is to make it default in a next diff)

**Perf-impact**
clang-10 binary (built with LTO+AutoFDO/CSSPGO): wins on top of C^3 in [0.3%..0.8%]
rocksDB-8 binary (built with LTO+CSSPGO): wins on top of C^3 in [0.8%..1.5%]

Note that function layout affects the perf the most on older machines (with
smaller instruction/iTLB caches) and when huge pages are not enabled. The impact
on newer processors with huge pages enabled is likely neutral/minor.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D152840
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] CallGraphSort: replace vector&lt;int&gt; with unique_ptr&lt;int[]&gt;. NFC</title>
<updated>2022-07-29T07:59:48+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-07-29T07:59:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a041ce3eb1721c6e3252a452fe1d0c286fd40d9e'/>
<id>a041ce3eb1721c6e3252a452fe1d0c286fd40d9e</id>
<content type='text'>
We can't use C++20 make_unique_for_overwrite yet.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can't use C++20 make_unique_for_overwrite yet.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC</title>
<updated>2022-02-24T04:44:34+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-02-24T04:44:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38fbedab3277401749457351c956333cce753eeb'/>
<id>38fbedab3277401749457351c956333cce753eeb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
