<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Utils, 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>[SimplifyCFG] Transform switch to select when common bits uniquely identify one case (#145233)</title>
<updated>2025-07-02T16:16:12+00:00</updated>
<author>
<name>Gábor Spaits</name>
<email>gaborspaits1@gmail.com</email>
</author>
<published>2025-07-02T16:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=338fd8b12ce67eff73ed0a5c2174bee077fcbcbe'/>
<id>338fd8b12ce67eff73ed0a5c2174bee077fcbcbe</id>
<content type='text'>
Fix #141753 .

This patch introduces a new check, that tries to decide if the
conjunction of all the values uniquely identify the accepted values by
the switch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix #141753 .

This patch introduces a new check, that tries to decide if the
conjunction of all the values uniquely identify the accepted values by
the switch.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Introduce `dead_on_return` attribute</title>
<updated>2025-07-02T07:29:36+00:00</updated>
<author>
<name>Antonio Frighetto</name>
<email>me@antoniofrighetto.com</email>
</author>
<published>2025-07-02T07:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f1cc0b607b03548028db3ca57bb057b2599b1711'/>
<id>f1cc0b607b03548028db3ca57bb057b2599b1711</id>
<content type='text'>
Add `dead_on_return` attribute, which is meant to be taken advantage
by the frontend, and states that the memory pointed to by the argument
is dead upon function return. As with `byval`, it is supposed to be
used for passing aggregates by value. The difference lies in the ABI:
`byval` implies that the pointer is explicitly passed as argument to
the callee (during codegen the copy is emitted as per byval contract),
whereas a `dead_on_return`-marked argument implies that the copy
already exists in the IR, is located at a specific stack offset within
the caller, and this memory will not be read further by the caller upon
callee return – or otherwise poison, if read before being written.

RFC: https://discourse.llvm.org/t/rfc-add-dead-on-return-attribute/86871.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `dead_on_return` attribute, which is meant to be taken advantage
by the frontend, and states that the memory pointed to by the argument
is dead upon function return. As with `byval`, it is supposed to be
used for passing aggregates by value. The difference lies in the ABI:
`byval` implies that the pointer is explicitly passed as argument to
the callee (during codegen the copy is emitted as per byval contract),
whereas a `dead_on_return`-marked argument implies that the copy
already exists in the IR, is located at a specific stack offset within
the caller, and this memory will not be read further by the caller upon
callee return – or otherwise poison, if read before being written.

RFC: https://discourse.llvm.org/t/rfc-add-dead-on-return-attribute/86871.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCCP] Improve worklist management (#146321)</title>
<updated>2025-06-30T15:17:30+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-30T15:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=545cdca4883552b147a0f1adfac713f76fc22305'/>
<id>545cdca4883552b147a0f1adfac713f76fc22305</id>
<content type='text'>
SCCP currently stores instructions whose lattice value has changed in a
worklist, and then updates their users in the main loop. This may result
in instructions unnecessarily being visited multiple times (as an
instruction will often use multiple other instructions). Additionally,
we'd often redundantly visit instructions that were already visited when
the containing block first became executable.

Instead, change the worklist to directly store the instructions that
need to be revisited. Additionally, do not add instructions to the
worklist that will already be covered by the main basic block walk.

This change is conceptually NFC, but is expected to produce minor
differences in practice, because the visitation order interacts with the
range widening limit.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SCCP currently stores instructions whose lattice value has changed in a
worklist, and then updates their users in the main loop. This may result
in instructions unnecessarily being visited multiple times (as an
instruction will often use multiple other instructions). Additionally,
we'd often redundantly visit instructions that were already visited when
the containing block first became executable.

Instead, change the worklist to directly store the instructions that
need to be revisited. Additionally, do not add instructions to the
worklist that will already be covered by the main basic block walk.

This change is conceptually NFC, but is expected to produce minor
differences in practice, because the visitation order interacts with the
range widening limit.</pre>
</div>
</content>
</entry>
<entry>
<title>[KeyInstr] Add DISubprogram::keyInstructions bit (#144107)</title>
<updated>2025-06-30T07:01:55+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2025-06-30T07:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=140e1894f245896752d06a7f5c405a465b492e73'/>
<id>140e1894f245896752d06a7f5c405a465b492e73</id>
<content type='text'>
Patch 1/4 adding bitcode support.

Store whether or not a function is using Key Instructions in its DISubprogram so
that we don't need to rely on the -mllvm flag -dwarf-use-key-instructions to
determine whether or not to interpret Key Instructions metadata to decide
is_stmt placement at DWARF emission time. This makes bitcode support simple and
enables well defined mixing of non-key-instructions and key-instructions
functions in an LTO context.

This patch adds the bit (using DISubprogram::SubclassData1).

PR 144104 and 144103 use it during DWARF emission.
PR 44102 adds bitcode
support.

See pull request for overview of alternative attempts.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch 1/4 adding bitcode support.

Store whether or not a function is using Key Instructions in its DISubprogram so
that we don't need to rely on the -mllvm flag -dwarf-use-key-instructions to
determine whether or not to interpret Key Instructions metadata to decide
is_stmt placement at DWARF emission time. This makes bitcode support simple and
enables well defined mixing of non-key-instructions and key-instructions
functions in an LTO context.

This patch adds the bit (using DISubprogram::SubclassData1).

PR 144104 and 144103 use it during DWARF emission.
PR 44102 adds bitcode
support.

See pull request for overview of alternative attempts.</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Add support for cmp reductions with decreasing IVs. (#140451)</title>
<updated>2025-06-29T10:17:03+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-29T10:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=20fbbd76755c2ddee515f09e96c59d519aef13e5'/>
<id>20fbbd76755c2ddee515f09e96c59d519aef13e5</id>
<content type='text'>
Similar to FindLastIV, add FindFirstIVSMin to support select (icmp(), x, y)
reductions where one of x or y is a decreasing induction, producing a SMin
 reduction. It uses signed max as sentinel value.

PR: https://github.com/llvm/llvm-project/pull/140451</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to FindLastIV, add FindFirstIVSMin to support select (icmp(), x, y)
reductions where one of x or y is a decreasing induction, producing a SMin
 reduction. It uses signed max as sentinel value.

PR: https://github.com/llvm/llvm-project/pull/140451</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Use indexType from data layout in switch to table conversion (#146207)</title>
<updated>2025-06-28T19:00:34+00:00</updated>
<author>
<name>Andreas Jonson</name>
<email>andjo403@hotmail.com</email>
</author>
<published>2025-06-28T19:00:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=33c265ddf7f37815d38d742ea27c161aaff8931e'/>
<id>33c265ddf7f37815d38d742ea27c161aaff8931e</id>
<content type='text'>
Generate the GEP with the index type that InstCombine will cast it to but use the knowledge that the index is unsigned.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generate the GEP with the index type that InstCombine will cast it to but use the knowledge that the index is unsigned.</pre>
</div>
</content>
</entry>
<entry>
<title>[RelLookupTableConverter] Drop unnamed_addr for GVs in entries to avoid generating GOTPCREL relocations (#146068)</title>
<updated>2025-06-27T22:42:42+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-06-27T22:42:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c43282ab69d7ff1b64f8ef5c84eab46e57553075'/>
<id>c43282ab69d7ff1b64f8ef5c84eab46e57553075</id>
<content type='text'>
The entry in a relative lookup table is a global variable with a
constant offset, such as `@gv`, `GEP @gv, 1`, and so on.

We cannot only consider the case of a trivial global variable. This PR
handles all cases using the existing `IsConstantOffsetFromGlobal`
function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The entry in a relative lookup table is a global variable with a
constant offset, such as `@gv`, `GEP @gv, 1`, and so on.

We cannot only consider the case of a trivial global variable. This PR
handles all cases using the existing `IsConstantOffsetFromGlobal`
function.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use llvm::is_contained (NFC) (#145844)</title>
<updated>2025-06-26T15:41:18+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-26T15:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d5903c4d8a698aac1ff82b4ce3fbba264902d6c'/>
<id>3d5903c4d8a698aac1ff82b4ce3fbba264902d6c</id>
<content type='text'>
llvm::is_contained is shorter than llvm::all_of plus a lambda.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm::is_contained is shorter than llvm::all_of plus a lambda.</pre>
</div>
</content>
</entry>
<entry>
<title>[Utils] Drop const from a return type (NFC) (#145838)</title>
<updated>2025-06-26T10:57:34+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-26T10:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=21def215b53e6e73f5025fc71cf486694e5c9a53'/>
<id>21def215b53e6e73f5025fc71cf486694e5c9a53</id>
<content type='text'>
We don't need const on the return type.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need const on the return type.</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Use BumpPtrAllocator for predicates (NFC) (#145692)</title>
<updated>2025-06-26T07:04:41+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-26T07:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d46a69cab4e371a6dad38db637dde0c1d245f0ea'/>
<id>d46a69cab4e371a6dad38db637dde0c1d245f0ea</id>
<content type='text'>
Currently predicates are allocated on the heap and tracked with an
intrusive list. Use a bump pointer allocator instead, which is more
efficient. The list is no longer needed, as we don't have to track
predicates for freeing.

The bump pointer allocator is provided as a parameter for PredicateInfo
to allow reusing the same allocator for all functions during IPSCCP.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently predicates are allocated on the heap and tracked with an
intrusive list. Use a bump pointer allocator instead, which is more
efficient. The list is no longer needed, as we don't have to track
predicates for freeing.

The bump pointer allocator is provided as a parameter for PredicateInfo
to allow reusing the same allocator for all functions during IPSCCP.</pre>
</div>
</content>
</entry>
</feed>
