<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Utils/PredicateInfo.cpp, 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>[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>
<entry>
<title>[PredicateInfo] Cache ssa.copy declarations (NFC) (#145020)</title>
<updated>2025-06-23T07:16:45+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-23T07:16:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=86beba9301112c6092cbfa3e53bdacc0d68337df'/>
<id>86beba9301112c6092cbfa3e53bdacc0d68337df</id>
<content type='text'>
This pass creates a lot of ssa.copy intrinsics, typically for a small
set of types. Determining the function type, performing intrinsic name
mangling and looking up the declaration has noticeable overhead in this
case.

Improve this by caching the declarations by type. I've made this a
separate map from CreatedDeclarations, which only tracks the
declarations that were newly inserted (but not pre-existing ones).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pass creates a lot of ssa.copy intrinsics, typically for a small
set of types. Determining the function type, performing intrinsic name
mangling and looking up the declaration has noticeable overhead in this
case.

Improve this by caching the declarations by type. I've made this a
separate map from CreatedDeclarations, which only tracks the
declarations that were newly inserted (but not pre-existing ones).</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Don't store Def in ValueDFS (NFC) (#145022)</title>
<updated>2025-06-23T07:10:33+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-23T07:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1e58e9c4b27351c5f7482ce01daabfaad6cbe5fb'/>
<id>1e58e9c4b27351c5f7482ce01daabfaad6cbe5fb</id>
<content type='text'>
Def is only actually used during renaming, and having it in ValueDFS
causes unnecessary confusion. Remove it from ValueDFS and instead use a
separate StackEntry structure for renaming, which holds the ValueDFS and
the Def.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Def is only actually used during renaming, and having it in ValueDFS
causes unnecessary confusion. Remove it from ValueDFS and instead use a
separate StackEntry structure for renaming, which holds the ValueDFS and
the Def.</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Don't use depth first walk (NFCI) (#145016)</title>
<updated>2025-06-23T07:09:19+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-23T07:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c6be4ff0c8966c4dbe1cbac9a071762982a70651'/>
<id>c6be4ff0c8966c4dbe1cbac9a071762982a70651</id>
<content type='text'>
The order in which we collect the predicates does not matter, as they
will be sorted anyway. As such, avoid the expensive depth first walk
over the dominator tree and instead use plain iteration over the
function.

(To be a bit more precise, the predicates and uses for a specific value
are sorted, so this change has no impact on that. It can change the
order in which values are processed in the first place, but that order
is not semantically relevant.)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The order in which we collect the predicates does not matter, as they
will be sorted anyway. As such, avoid the expensive depth first walk
over the dominator tree and instead use plain iteration over the
function.

(To be a bit more precise, the predicates and uses for a specific value
are sorted, so this change has no impact on that. It can change the
order in which values are processed in the first place, but that order
is not semantically relevant.)</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Clean up DFS sorting (NFC) (#144943)</title>
<updated>2025-06-20T11:02:22+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-20T11:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3e99aa6c0a36ec4d6f126882b1a06436767cbf73'/>
<id>3e99aa6c0a36ec4d6f126882b1a06436767cbf73</id>
<content type='text'>
The comparison function for ValueDFS was confused in a number of ways.
Most significantly, it had a bunch of logic based on Def -- however, Def
is always null during sorting, it only gets set later. At this point
defs only have PInfo set.

Clean up the implementation to remove various dead code.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The comparison function for ValueDFS was confused in a number of ways.
Most significantly, it had a bunch of logic based on Def -- however, Def
is always null during sorting, it only gets set later. At this point
defs only have PInfo set.

Clean up the implementation to remove various dead code.</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Avoid duplicate stack in scope check (NFC)</title>
<updated>2025-06-20T07:47:29+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-20T07:46:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8973be462c49a7b0a24c61f41e07a721706b1ad8'/>
<id>8973be462c49a7b0a24c61f41e07a721706b1ad8</id>
<content type='text'>
popStackUntilDFSScope() is going to check this itself, there is
no need to do it in advance as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
popStackUntilDFSScope() is going to check this itself, there is
no need to do it in advance as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Remove redundant EdgeOnly member (NFC)</title>
<updated>2025-06-20T07:35:11+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-20T07:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cbb5e244f7564091f9169f525fd8456e68bc028a'/>
<id>cbb5e244f7564091f9169f525fd8456e68bc028a</id>
<content type='text'>
EdgeOnly indicates a phi def, which can already be identified by
LN_Last with non-null PInfo. Most of the code already reasons in
terms of LN_Last instead of EdgeOnly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
EdgeOnly indicates a phi def, which can already be identified by
LN_Last with non-null PInfo. Most of the code already reasons in
terms of LN_Last instead of EdgeOnly.
</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Remove unnecessary EdgeUsesOnly set (NFC) (#144912)</title>
<updated>2025-06-20T07:16:39+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-20T07:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d196124dd22391f6c967ed569b34632840536c45'/>
<id>d196124dd22391f6c967ed569b34632840536c45</id>
<content type='text'>
As far as I can tell, this set is pointless: It just represents whether
the target block has multiple predecessors, and the way it is
constructed and queried, we're not even reducing the number of
getSinglePredecessor() calls or something like that.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As far as I can tell, this set is pointless: It just represents whether
the target block has multiple predecessors, and the way it is
constructed and queried, we're not even reducing the number of
getSinglePredecessor() calls or something like that.</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Avoid duplicate hash lookup (NFC)</title>
<updated>2025-06-19T14:18:29+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-19T14:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=802fa92aee3565768887615108aa3e924d4e0fc7'/>
<id>802fa92aee3565768887615108aa3e924d4e0fc7</id>
<content type='text'>
Use try_emplace to either look up the existing entry or insert it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use try_emplace to either look up the existing entry or insert it.
</pre>
</div>
</content>
</entry>
<entry>
<title>[PredicateInfo] Update comments for PredicateAssume (NFC) (#139269)</title>
<updated>2025-05-24T20:22:43+00:00</updated>
<author>
<name>GnSight</name>
<email>ftyg@live.com</email>
</author>
<published>2025-05-24T20:22:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2f3bc37cd20bace8ca5aff681369676bff9b1bca'/>
<id>2f3bc37cd20bace8ca5aff681369676bff9b1bca</id>
<content type='text'>
Previously, PredicateAssume was modified to materialize after the assume
statement rather than before it (See 353fa44). Update relevant comments
to match this.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, PredicateAssume was modified to materialize after the assume
statement rather than before it (See 353fa44). Update relevant comments
to match this.</pre>
</div>
</content>
</entry>
</feed>
