<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/GlobalMerge.cpp, branch main</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>[GlobalMerge]Prefer use global-merge-max-offset instead of the target-specific constant offset. (#165591)</title>
<updated>2025-11-17T07:37:51+00:00</updated>
<author>
<name>hstk30-hw</name>
<email>hanwei62@huawei.com</email>
</author>
<published>2025-11-17T07:37:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=51c81805153bcf56eda22d984d7234bf314de9e7'/>
<id>51c81805153bcf56eda22d984d7234bf314de9e7</id>
<content type='text'>
In the Dhrystone benchmark, I find some adjacent global not be merged,
on the contrary the GCC's anchor optimize is work. Use
global-merge-max-offset to set the max offset can yield similar results
(still slightly different, at least we can control the offset).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the Dhrystone benchmark, I find some adjacent global not be merged,
on the contrary the GCC's anchor optimize is work. Use
global-merge-max-offset to set the max offset can yield similar results
(still slightly different, at least we can control the offset).</pre>
</div>
</content>
</entry>
<entry>
<title>[revert][CodeGen] add a command to force global merge (#168230)</title>
<updated>2025-11-15T19:40:07+00:00</updated>
<author>
<name>Austin</name>
<email>zhenhangwang@huawei.com</email>
</author>
<published>2025-11-15T19:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=700aa5e376af26b76bf76bf8f4e1e1dca22a2a6e'/>
<id>700aa5e376af26b76bf76bf8f4e1e1dca22a2a6e</id>
<content type='text'>
sorry, this was my mistake</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sorry, this was my mistake</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] add a command to force global merge</title>
<updated>2025-11-15T19:20:27+00:00</updated>
<author>
<name>Austin</name>
<email>zhenhangwang@huawei.com</email>
</author>
<published>2025-11-15T19:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3705921f60914df3cfb59e088cf9e476fe7992b7'/>
<id>3705921f60914df3cfb59e088cf9e476fe7992b7</id>
<content type='text'>
I found that in some performance scenarios, such as under O2, this pr can be helpful for a series of loading global variables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I found that in some performance scenarios, such as under O2, this pr can be helpful for a series of loading global variables.
</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalMerge][PPC] Don't merge globals in llvm.metadata section (#131801)</title>
<updated>2025-04-02T08:40:53+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-04-02T08:40:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9356091a98c24718572f99b51553838ed664b67a'/>
<id>9356091a98c24718572f99b51553838ed664b67a</id>
<content type='text'>
The llvm.metadata section is not emitted and has special semantics. We
should not merge globals in it, similarly to how we already skip merging
of `llvm.xyz` globals.

Fixes https://github.com/llvm/llvm-project/issues/131394.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The llvm.metadata section is not emitted and has special semantics. We
should not merge globals in it, similarly to how we already skip merging
of `llvm.xyz` globals.

Fixes https://github.com/llvm/llvm-project/issues/131394.</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalMerge] Fix handling of const options</title>
<updated>2025-03-18T14:06:39+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-03-18T14:04:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8f66fb784291c897a965a9ee4c280e314dc8cee4'/>
<id>8f66fb784291c897a965a9ee4c280e314dc8cee4</id>
<content type='text'>
For the NewPM, the merge-const option was assigned to an unused
option field. Assign it to the correct one. The merge-const-aggressive
option was not supported -- and invalid options were silently ignored.
Accept it and error on invalid options.

For the LegacyPM, the corresponding cl::opt options were ignored when
called via opt rather than llc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the NewPM, the merge-const option was assigned to an unused
option field. Assign it to the correct one. The merge-const-aggressive
option was not supported -- and invalid options were silently ignored.
Accept it and error on invalid options.

For the LegacyPM, the corresponding cl::opt options were ignored when
called via opt rather than llc.
</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Store Triple in Module (NFC) (#129868)</title>
<updated>2025-03-06T09:27:47+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-03-06T09:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=979c275097a642e9b96c6b0a12f013c831af3a6e'/>
<id>979c275097a642e9b96c6b0a12f013c831af3a6e</id>
<content type='text'>
The module currently stores the target triple as a string. This means
that any code that wants to actually use the triple first has to
instantiate a Triple, which is somewhat expensive. The change in #121652
caused a moderate compile-time regression due to this. While it would be
easy enough to work around, I think that architecturally, it makes more
sense to store the parsed Triple in the module, so that it can always be
directly queried.

For this change, I've opted not to add any magic conversions between
std::string and Triple for backwards-compatibilty purses, and instead
write out needed Triple()s or str()s explicitly. This is because I think
a decent number of them should be changed to work on Triple as well, to
avoid unnecessary conversions back and forth.

The only interesting part in this patch is that the default triple is
Triple("") instead of Triple() to preserve existing behavior. The former
defaults to using the ELF object format instead of unknown object
format. We should fix that as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The module currently stores the target triple as a string. This means
that any code that wants to actually use the triple first has to
instantiate a Triple, which is somewhat expensive. The change in #121652
caused a moderate compile-time regression due to this. While it would be
easy enough to work around, I think that architecturally, it makes more
sense to store the parsed Triple in the module, so that it can always be
directly queried.

For this change, I've opted not to add any magic conversions between
std::string and Triple for backwards-compatibilty purses, and instead
write out needed Triple()s or str()s explicitly. This is because I think
a decent number of them should be changed to work on Triple as well, to
avoid unnecessary conversions back and forth.

The only interesting part in this patch is that the default triple is
Triple("") instead of Triple() to preserve existing behavior. The former
defaults to using the ELF object format instead of unknown object
format. We should fix that as well.</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalMerge] Fix inaccurate debug print. (#124377)</title>
<updated>2025-01-27T20:45:41+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-01-27T20:45:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c24e5f982e2791768aeea8b1fb55e951f80aad75'/>
<id>c24e5f982e2791768aeea8b1fb55e951f80aad75</id>
<content type='text'>
This message was not updated when MinSize was added.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This message was not updated when MinSize was added.</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalMerge] Use constructor to set all bits in BitVector. NFC (#124375)</title>
<updated>2025-01-27T20:44:44+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-01-27T20:44:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0cbb1d5673dd76112460a109c8c2af6c32c5a16d'/>
<id>0cbb1d5673dd76112460a109c8c2af6c32c5a16d</id>
<content type='text'>
The constructor has an optional bool for the starting value for each
bit. Use that instead of calling set().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The constructor has an optional bool for the starting value for each
bit. Use that instead of calling set().</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalMerge][NFC] Reland "Skip sorting by profitability when it is not needed"</title>
<updated>2025-01-27T15:28:47+00:00</updated>
<author>
<name>Michael Maitland</name>
<email>michaeltmaitland@gmail.com</email>
</author>
<published>2025-01-27T15:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=559287575b5b747cfc01652adb647ee5516aa626'/>
<id>559287575b5b747cfc01652adb647ee5516aa626</id>
<content type='text'>
Relands #124146 but without changes to the sorting algorithm and the following
reverse.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Relands #124146 but without changes to the sorting algorithm and the following
reverse.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[GlobalMerge][NFC] Skip sorting by profitability when it is not needed" (#124411)</title>
<updated>2025-01-25T15:16:37+00:00</updated>
<author>
<name>James Y Knight</name>
<email>jyknight@google.com</email>
</author>
<published>2025-01-25T15:16:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9325a61aa0960595c22867799ebd157c8160fd86'/>
<id>9325a61aa0960595c22867799ebd157c8160fd86</id>
<content type='text'>
Reverts llvm/llvm-project#124146 -- new comparator is not a strict-weak
as required by stable_sort.

Co-authored-by: Michael Maitland &lt;michaeltmaitland@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#124146 -- new comparator is not a strict-weak
as required by stable_sort.

Co-authored-by: Michael Maitland &lt;michaeltmaitland@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
