<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/IfConversion.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>[ADT] Modernize SparseSet to use llvm::identity_cxx20 (NFC) (#164362)</title>
<updated>2025-10-21T14:22:23+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-10-21T14:22:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4098e263ff77122f321562c7e66b2da96f03f604'/>
<id>4098e263ff77122f321562c7e66b2da96f03f604</id>
<content type='text'>
The legacy llvm::identity is not quite the same as std::identity from
C++20.  llvm::identity is a template struct with an ::argument_type
member.  In contrast, llvm::identity_cxx20 (and std::identity) is a
non-template struct with a templated call operator and no
::argument_type.

This patch modernizes llvm::SparseSet by updating its default
key-extraction functor to llvm::identity_cxx20.  A new template
parameter KeyT takes over the role of ::argument_type.

Existing uses of SparseSet are updated for the new template signature.
Most use sites are of the form SparseSet&lt;T&gt;, requiring no update.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The legacy llvm::identity is not quite the same as std::identity from
C++20.  llvm::identity is a template struct with an ::argument_type
member.  In contrast, llvm::identity_cxx20 (and std::identity) is a
non-template struct with a templated call operator and no
::argument_type.

This patch modernizes llvm::SparseSet by updating its default
key-extraction functor to llvm::identity_cxx20.  A new template
parameter KeyT takes over the role of ::argument_type.

Existing uses of SparseSet are updated for the new template signature.
Most use sites are of the form SparseSet&lt;T&gt;, requiring no update.</pre>
</div>
</content>
</entry>
<entry>
<title>[IfConversion] Fix bug related to !HasFallThrough (#145471)</title>
<updated>2025-06-25T07:30:26+00:00</updated>
<author>
<name>Björn Pettersson</name>
<email>bjorn.a.pettersson@ericsson.com</email>
</author>
<published>2025-06-25T07:30:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=237b8de2c0d9ee50c6a744e95c0706c8cdea70e1'/>
<id>237b8de2c0d9ee50c6a744e95c0706c8cdea70e1</id>
<content type='text'>
We can not trust that !HasFallThrough implies that there is not
fallthrough exit in cases when analyzeBranch failed.

Adding a new blockNeverFallThrough helper to make the tests on
!HasFallThrough safe by also checking IsBrAnalyzable. We also
try to prove no-fallthrough by inspecting the successor list. If
the textual successor isn't in the successor list we know that
there is no fallthrough.

The bug has probably been around for years. Found it when
working on an out-of-tree target.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can not trust that !HasFallThrough implies that there is not
fallthrough exit in cases when analyzeBranch failed.

Adding a new blockNeverFallThrough helper to make the tests on
!HasFallThrough safe by also checking IsBrAnalyzable. We also
try to prove no-fallthrough by inspecting the successor list. If
the textual successor isn't in the successor list we know that
there is no fallthrough.

The bug has probably been around for years. Found it when
working on an out-of-tree target.</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM][CodeGen] Add convenience accessors for MachineFunctionProperties (#140002)</title>
<updated>2025-05-22T15:07:52+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-22T15:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1fdf02ad5a4ca155017eea22688365a20aab077c'/>
<id>1fdf02ad5a4ca155017eea22688365a20aab077c</id>
<content type='text'>
Add per-property has&lt;Prop&gt;/set&lt;Prop&gt;/reset&lt;Prop&gt; functions to
MachineFunctionProperties.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add per-property has&lt;Prop&gt;/set&lt;Prop&gt;/reset&lt;Prop&gt; functions to
MachineFunctionProperties.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Use *Set::insert_range (NFC) (#132651)</title>
<updated>2025-03-24T04:20:44+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-03-24T04:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1019457891fda0b2f32f50ba99d6a261df12ec08'/>
<id>1019457891fda0b2f32f50ba99d6a261df12ec08</id>
<content type='text'>
We can use *Set::insert_range to collapse:

  for (auto Elem : Range)
    Set.insert(E);

down to:

  Set.insert_range(Range);</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use *Set::insert_range to collapse:

  for (auto Elem : Range)
    Set.insert(E);

down to:

  Set.insert_range(Range);</pre>
</div>
</content>
</entry>
<entry>
<title>[IfConversion] Use MCRegister. NFC</title>
<updated>2025-03-03T07:46:16+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-03-03T06:43:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=49ba565913e189f45e0822f475b0f61f50670c55'/>
<id>49ba565913e189f45e0822f475b0f61f50670c55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[aarch64][win] Update Called Globals info when updating Call Site info (#122762)</title>
<updated>2025-01-13T22:00:31+00:00</updated>
<author>
<name>Daniel Paoliello</name>
<email>danpao@microsoft.com</email>
</author>
<published>2025-01-13T22:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19032bfe87fa0f4a3a7b3e68daafc93331b71e0d'/>
<id>19032bfe87fa0f4a3a7b3e68daafc93331b71e0d</id>
<content type='text'>
Fixes the "use after poison" issue introduced by #121516 (see
&lt;https://github.com/llvm/llvm-project/pull/121516#issuecomment-2585912395&gt;).

The root cause of this issue is that #121516 introduced "Called Global"
information for call instructions modeling how "Call Site" info is
stored in the machine function, HOWEVER it didn't copy the
copy/move/erase operations for call site information.

The fix is to rename and update the existing copy/move/erase functions
so they also take care of Called Global info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the "use after poison" issue introduced by #121516 (see
&lt;https://github.com/llvm/llvm-project/pull/121516#issuecomment-2585912395&gt;).

The root cause of this issue is that #121516 introduced "Called Global"
information for call instructions modeling how "Call Site" info is
stored in the machine function, HOWEVER it didn't copy the
copy/move/erase operations for call site information.

The fix is to rename and update the existing copy/move/erase functions
so they also take care of Called Global info.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove unused includes (NFC) (#115996)</title>
<updated>2024-11-13T07:15:06+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-13T07:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=735ab61ac828bd61398e6847d60e308fdf2b54ec'/>
<id>735ab61ac828bd61398e6847d60e308fdf2b54ec</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove AA parameter of isSafeToMove (#100691)</title>
<updated>2024-07-26T07:47:47+00:00</updated>
<author>
<name>Pengcheng Wang</name>
<email>wangpengcheng.pp@bytedance.com</email>
</author>
<published>2024-07-26T07:47:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed4e75d5e5ada30c37c57df032378a77e6dd598e'/>
<id>ed4e75d5e5ada30c37c57df032378a77e6dd598e</id>
<content type='text'>
This `AA` parameter is not used and for most uses they just pass
a nullptr.

The use of `AA` was removed since 8d0383e.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This `AA` parameter is not used and for most uses they just pass
a nullptr.

The use of `AA` was removed since 8d0383e.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][NewPM] Port `machine-block-freq` to new pass manager (#98317)</title>
<updated>2024-07-12T07:45:01+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-07-12T07:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=099899961c1e89a1789f534579d35a74a2ef1dda'/>
<id>099899961c1e89a1789f534579d35a74a2ef1dda</id>
<content type='text'>
- Add `MachineBlockFrequencyAnalysis`.
- Add `MachineBlockFrequencyPrinterPass`.
- Use `MachineBlockFrequencyInfoWrapperPass` in legacy pass manager.
- `LazyMachineBlockFrequencyInfo::print` is empty, drop it due to new
pass manager migration.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add `MachineBlockFrequencyAnalysis`.
- Add `MachineBlockFrequencyPrinterPass`.
- Use `MachineBlockFrequencyInfoWrapperPass` in legacy pass manager.
- `LazyMachineBlockFrequencyInfo::print` is empty, drop it due to new
pass manager migration.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[CodeGen][NewPM] Port machine-branch-prob to new pass manager" (#96858) (#96869)</title>
<updated>2024-06-28T02:59:23+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2024-06-28T02:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d38b518e0444b42123ac05ac5cce267baecec294'/>
<id>d38b518e0444b42123ac05ac5cce267baecec294</id>
<content type='text'>
This reverts commit ab58b6d58edf6a7c8881044fc716ca435d7a0156.
In `CodeGen/Generic/MachineBranchProb.ll`, `llc` crashed with dumped MIR
when targeting PowerPC. Move test to `llc/new-pm`, which is X86
specific.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ab58b6d58edf6a7c8881044fc716ca435d7a0156.
In `CodeGen/Generic/MachineBranchProb.ll`, `llc` crashed with dumped MIR
when targeting PowerPC. Move test to `llc/new-pm`, which is X86
specific.</pre>
</div>
</content>
</entry>
</feed>
