<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/LTO/ThinLTOCodeGenerator.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>[nfc][thinlto] remove unnecessary return from `renameModuleForThinLTO` (#121851)</title>
<updated>2025-01-06T23:19:09+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2025-01-06T23:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4312075efa02ad861db0a19a0db8e6003aa06965'/>
<id>4312075efa02ad861db0a19a0db8e6003aa06965</id>
<content type='text'>
Same goes for `FunctionImportGlobalProcessing::run`.

The return value was used, but it was always `false`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Same goes for `FunctionImportGlobalProcessing::run`.

The return value was used, but it was always `false`.</pre>
</div>
</content>
</entry>
<entry>
<title>[Legacy ThinLTO] NFC: Use explicit `static`; shrink anonymous namespace</title>
<updated>2024-10-24T20:19:50+00:00</updated>
<author>
<name>Hubert Tong</name>
<email>hubert.reinterpretcast@gmail.com</email>
</author>
<published>2024-10-24T20:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=76316ec91410bfe4775f828e3ebae5958a9d2a1d'/>
<id>76316ec91410bfe4775f828e3ebae5958a9d2a1d</id>
<content type='text'>
Improve compliance with
https://llvm.org/docs/CodingStandards.html#anonymous-namespaces:
&gt; [Only] use [anonymous namespaces] for class declarations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve compliance with
https://llvm.org/docs/CodingStandards.html#anonymous-namespaces:
&gt; [Only] use [anonymous namespaces] for class declarations.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Legacy ThinLTO] NFC: Move helper class to an "Impl" namespace (#112846)</title>
<updated>2024-10-23T22:28:43+00:00</updated>
<author>
<name>Hubert Tong</name>
<email>hubert.reinterpretcast@gmail.com</email>
</author>
<published>2024-10-23T22:28:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=76bdc608980b307a354580dfbbed844fee0b75a8'/>
<id>76bdc608980b307a354580dfbbed844fee0b75a8</id>
<content type='text'>
`::llvm::TargetMachineBuilder` is only a helper class for
`ThinLTOCodeGenerator` and not a real facility. Move it into an "Impl"
namespace.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`::llvm::TargetMachineBuilder` is only a helper class for
`ThinLTOCodeGenerator` and not a real facility. Move it into an "Impl"
namespace.</pre>
</div>
</content>
</entry>
<entry>
<title>Make WriteIndexesThinBackend multi threaded (#109847)</title>
<updated>2024-10-07T15:16:46+00:00</updated>
<author>
<name>Nuri Amari</name>
<email>nuri.amari99@gmail.com</email>
</author>
<published>2024-10-07T15:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2edd897a4227e481af33e8e43090ab088cd9d953'/>
<id>2edd897a4227e481af33e8e43090ab088cd9d953</id>
<content type='text'>
We've noticed that for large builds executing thin-link can take on the
order of 10s of minutes. We are only using a single thread to write the
sharded indices and import files for each input bitcode file. While we
need to ensure the index file produced lists modules in a deterministic
order, that doesn't prevent us from executing the rest of the work in
parallel.

In this change we use a thread pool to execute as much of the backend's
work as possible in parallel. In local testing on a machine with 80
cores, this change makes a thin-link for ~100,000 input files run in ~2
minutes. Without this change it takes upwards of 10 minutes.

---------

Co-authored-by: Nuri Amari &lt;nuriamari@fb.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've noticed that for large builds executing thin-link can take on the
order of 10s of minutes. We are only using a single thread to write the
sharded indices and import files for each input bitcode file. While we
need to ensure the index file produced lists modules in a deterministic
order, that doesn't prevent us from executing the rest of the work in
parallel.

In this change we use a thread pool to execute as much of the backend's
work as possible in parallel. In local testing on a machine with 80
cores, this change makes a thin-link for ~100,000 input files run in ~2
minutes. Without this change it takes upwards of 10 minutes.

---------

Co-authored-by: Nuri Amari &lt;nuriamari@fb.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (#107471)</title>
<updated>2024-09-06T23:38:17+00:00</updated>
<author>
<name>Mingming Liu</name>
<email>mingmingl@google.com</email>
</author>
<published>2024-09-06T23:38:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0'/>
<id>d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0</id>
<content type='text'>
The primary motivation is to remove `EntryCount` from `FunctionSummary`.
This frees 8 bytes out of `sizeof(FunctionSummary)` (136 bytes as of
https://github.com/llvm/llvm-project/commit/64498c54831bed9cf069e0923b9b73678c6451d8).

While I'm at it, this PR clean up {SummaryBasedOptimizations,
SyntheticCountsPropagation} since they were not used and there are no
plans to further invest on them.

With this patch, bitcode writer writes a placeholder 0 at the byte
offset of `EntryCount` and bitcode reader can parse the function entry
count at the correct byte offset. Added a TODO to stop writing
`EntryCount` and bump bitcode version</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The primary motivation is to remove `EntryCount` from `FunctionSummary`.
This frees 8 bytes out of `sizeof(FunctionSummary)` (136 bytes as of
https://github.com/llvm/llvm-project/commit/64498c54831bed9cf069e0923b9b73678c6451d8).

While I'm at it, this PR clean up {SummaryBasedOptimizations,
SyntheticCountsPropagation} since they were not used and there are no
plans to further invest on them.

With this patch, bitcode writer writes a placeholder 0 at the byte
offset of `EntryCount` and bitcode reader can parse the function entry
count at the correct byte offset. Added a TODO to stop writing
`EntryCount` and bump bitcode version</pre>
</div>
</content>
</entry>
<entry>
<title>[LTO] Introduce new type alias ImportListsTy (NFC) (#106420)</title>
<updated>2024-08-28T17:42:12+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-08-28T17:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f15039cf2d59dbb889903aff8ac32ff266c8c48'/>
<id>4f15039cf2d59dbb889903aff8ac32ff266c8c48</id>
<content type='text'>
The background is as follows.  I'm planning to reduce the memory
footprint of ThinLTO indexing by changing ImportMapTy, the data
structure used for an import list.  Once this patch lands, I'm
planning to change the type slightly.  The new type alias allows us to
update the type without touching many places.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The background is as follows.  I'm planning to reduce the memory
footprint of ThinLTO indexing by changing ImportMapTy, the data
structure used for an import list.  Once this patch lands, I'm
planning to change the type slightly.  The new type alias allows us to
update the type without touching many places.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Inroduce ModuleToSummariesForIndexTy (NFC) (#105906)</title>
<updated>2024-08-24T00:32:52+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-08-24T00:32:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dbd7ce0ccd3a88f2c1d6e47d31da63a48cafdc8f'/>
<id>dbd7ce0ccd3a88f2c1d6e47d31da63a48cafdc8f</id>
<content type='text'>
This patch introduces type alias ModuleToSummariesForIndexTy.

I'm planning to change the type slightly to allow heterogeneous lookup
(that is, std::map&lt;K, V, std::less&lt;&gt;&gt;) in a subsequent patch.  The
problem is that changing the type affects many places.  Using a type
alias reduces the impact.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces type alias ModuleToSummariesForIndexTy.

I'm planning to change the type slightly to allow heterogeneous lookup
(that is, std::map&lt;K, V, std::less&lt;&gt;&gt;) in a subsequent patch.  The
problem is that changing the type affects many places.  Using a type
alias reduces the impact.</pre>
</div>
</content>
</entry>
<entry>
<title>[LTO] Teach computeLTOCacheKey to return std::string (NFC) (#105331)</title>
<updated>2024-08-21T03:56:47+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-08-21T03:56:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0f22d47a7a1f70ec77ea8ccdf08a6487827937db'/>
<id>0f22d47a7a1f70ec77ea8ccdf08a6487827937db</id>
<content type='text'>
Without this patch, computeLTOCacheKey computes SHA1, creates its
hexadecimal representation with toHex, which returns std::string, and
then copies it to an output parameter of type SmallString.

This patch removes the redirection and teaches computeLTOCacheKey to
directly return std::string computed by toHex.  With the move
semantics, no buffer copy should be involved.

While I am at it, this patch adds a Twine to concatenate two strings.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this patch, computeLTOCacheKey computes SHA1, creates its
hexadecimal representation with toHex, which returns std::string, and
then copies it to an output parameter of type SmallString.

This patch removes the redirection and teaches computeLTOCacheKey to
directly return std::string computed by toHex.  With the move
semantics, no buffer copy should be involved.

While I am at it, this patch adds a Twine to concatenate two strings.</pre>
</div>
</content>
</entry>
<entry>
<title>[LTO] enable `ObjCARCContractPass` only on optimized build  (#101114)</title>
<updated>2024-08-09T20:04:25+00:00</updated>
<author>
<name>Peter Rong</name>
<email>peterrong96@gmail.com</email>
</author>
<published>2024-08-09T20:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=74e4694b8cbdb918abd4645e2c5027359904fb92'/>
<id>74e4694b8cbdb918abd4645e2c5027359904fb92</id>
<content type='text'>
\#92331 tried to make `ObjCARCContractPass` by default, but it caused a
regression on O0 builds and was reverted.
This patch trys to bring that back by:

1. reverts the
[revert](https://github.com/llvm/llvm-project/commit/1579e9ca9ce17364963861517fecf13b00fe4d8a).
2. `createObjCARCContractPass` only on optimized builds.

Tests are updated to refelect the changes. Specifically, all `O0` tests
should not include `ObjCARCContractPass`

Signed-off-by: Peter Rong &lt;PeterRong@meta.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
\#92331 tried to make `ObjCARCContractPass` by default, but it caused a
regression on O0 builds and was reverted.
This patch trys to bring that back by:

1. reverts the
[revert](https://github.com/llvm/llvm-project/commit/1579e9ca9ce17364963861517fecf13b00fe4d8a).
2. `createObjCARCContractPass` only on optimized builds.

Tests are updated to refelect the changes. Specifically, all `O0` tests
should not include `ObjCARCContractPass`

Signed-off-by: Peter Rong &lt;PeterRong@meta.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[ThinLTO][Bitcode] Generate import type in bitcode" (#97253)</title>
<updated>2024-07-09T05:20:33+00:00</updated>
<author>
<name>Mingming Liu</name>
<email>mingmingl@google.com</email>
</author>
<published>2024-07-09T05:20:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50fea9943fa59ed1aeb4538e0f715cc01db58a9a'/>
<id>50fea9943fa59ed1aeb4538e0f715cc01db58a9a</id>
<content type='text'>
https://github.com/llvm/llvm-project/pull/87600 was reverted in order to
revert
https://github.com/llvm/llvm-project/commit/6262763341fcd71a2b0708cf7485f9abd1d26ba8.
Now https://github.com/llvm/llvm-project/pull/95482 is fix forward for
https://github.com/llvm/llvm-project/commit/6262763341fcd71a2b0708cf7485f9abd1d26ba8.
This patch is a reland for
https://github.com/llvm/llvm-project/pull/87600

**Changes on top of original patch**
In `llvm/include/llvm/IR/ModuleSummaryIndex.h`, make the type of
`GVSummaryPtrSet` an `unordered_set` which is more memory efficient when
the number of elements is smaller than 128 [1]

**Original commit message**

For distributed ThinLTO, the LTO indexing step generates combined
summary for each module, and postlink pipeline reads the combined
summary which stores the information for link-time optimization.

This patch populates the 'import type' of a summary in bitcode, and
updates bitcode reader to parse the bit correctly.

[1]
https://github.com/llvm/llvm-project/blob/393eff4e02e7ab3d234d246a8d6912c8e745e6f9/llvm/lib/Support/SmallPtrSet.cpp#L43</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/llvm/llvm-project/pull/87600 was reverted in order to
revert
https://github.com/llvm/llvm-project/commit/6262763341fcd71a2b0708cf7485f9abd1d26ba8.
Now https://github.com/llvm/llvm-project/pull/95482 is fix forward for
https://github.com/llvm/llvm-project/commit/6262763341fcd71a2b0708cf7485f9abd1d26ba8.
This patch is a reland for
https://github.com/llvm/llvm-project/pull/87600

**Changes on top of original patch**
In `llvm/include/llvm/IR/ModuleSummaryIndex.h`, make the type of
`GVSummaryPtrSet` an `unordered_set` which is more memory efficient when
the number of elements is smaller than 128 [1]

**Original commit message**

For distributed ThinLTO, the LTO indexing step generates combined
summary for each module, and postlink pipeline reads the combined
summary which stores the information for link-time optimization.

This patch populates the 'import type' of a summary in bitcode, and
updates bitcode reader to parse the bit correctly.

[1]
https://github.com/llvm/llvm-project/blob/393eff4e02e7ab3d234d246a8d6912c8e745e6f9/llvm/lib/Support/SmallPtrSet.cpp#L43</pre>
</div>
</content>
</entry>
</feed>
