<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/IR/Metadata.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>[IR] Introduce !captures metadata (#160913)</title>
<updated>2025-10-01T06:58:47+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-10-01T06:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=63ca8483d0efc544c5b8c4484d36a64c3b3ff210'/>
<id>63ca8483d0efc544c5b8c4484d36a64c3b3ff210</id>
<content type='text'>
This introduces `!captures` metadata on stores, which looks like this:

```
store ptr %x, ptr %y, !captures !{!"address", !"read_provenance"}
```

The semantics are the same as replacing the store with a call like this:
```
call void @llvm.store(ptr captures(address, read_provenance) %x, ptr %y)
```

This metadata is intended for annotation by frontends -- it's not
something we can feasibly infer at this point, as it would require
analyzing uses of the pointer stored in memory.

The motivating use case for this is Rust's `println!()` machinery, which
involves storing a reference to the value inside a structure. This means
that printing code (including conditional debugging code), can inhibit
optimizations because the pointer escapes. With the new metadata we can
annotate this as a read-only capture, which has less impact on
optimizations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces `!captures` metadata on stores, which looks like this:

```
store ptr %x, ptr %y, !captures !{!"address", !"read_provenance"}
```

The semantics are the same as replacing the store with a call like this:
```
call void @llvm.store(ptr captures(address, read_provenance) %x, ptr %y)
```

This metadata is intended for annotation by frontends -- it's not
something we can feasibly infer at this point, as it would require
analyzing uses of the pointer stored in memory.

The motivating use case for this is Rust's `println!()` machinery, which
involves storing a reference to the value inside a structure. This means
that printing code (including conditional debugging code), can inhibit
optimizations because the pointer escapes. With the new metadata we can
annotate this as a read-only capture, which has less impact on
optimizations.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Simplify dispatchRecalculateHash and dispatchResetHash (NFC) (#159903)</title>
<updated>2025-09-20T15:15:20+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-09-20T15:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b91de4cbee54cf50f9f92c140a9259bdea81e1d2'/>
<id>b91de4cbee54cf50f9f92c140a9259bdea81e1d2</id>
<content type='text'>
This patch simplifies dispatchRecalculateHash and dispatchResetHash
with "constexpr if".

This patch does not inline dispatchRecalculateHash and
dispatchResetHash into their respective call sites.  Using "constexpr
if" in a non-template context like MDNode::uniquify would still
require the discarded branch to be syntactically valid, causing a
compilation error for node types that do not have
recalculateHash/setHash.  Using template functions ensures that the
"constexpr if" is evaluated in a proper template context, allowing the
compiler to fully discard the inactive branch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch simplifies dispatchRecalculateHash and dispatchResetHash
with "constexpr if".

This patch does not inline dispatchRecalculateHash and
dispatchResetHash into their respective call sites.  Using "constexpr
if" in a non-template context like MDNode::uniquify would still
require the discarded branch to be syntactically valid, causing a
compilation error for node types that do not have
recalculateHash/setHash.  Using template functions ensures that the
"constexpr if" is evaluated in a proper template context, allowing the
compiler to fully discard the inactive branch.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Modernize HasCachedHash  (NFC) (#159902)</title>
<updated>2025-09-20T15:15:12+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-09-20T15:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a04c0f5cebfed58fb54969c0f52ce559c7277025'/>
<id>a04c0f5cebfed58fb54969c0f52ce559c7277025</id>
<content type='text'>
This patch modernizes HasCachedHash.

- "struct SFINAE" is replaced with identically defined SameType.

- The return types Yes and No are replaced with std::true_type and
  std::false_type.

My previous attempt (#159510) to clean up HasCachedHash failed on
clang++-18, but this version works with clang++-18.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch modernizes HasCachedHash.

- "struct SFINAE" is replaced with identically defined SameType.

- The return types Yes and No are replaced with std::true_type and
  std::false_type.

My previous attempt (#159510) to clean up HasCachedHash failed on
clang++-18, but this version works with clang++-18.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[IR] Simplify HasCachedHash with is_detected (NFC) (#159510)" (#159622)</title>
<updated>2025-09-18T19:11:20+00:00</updated>
<author>
<name>Jordan Rupprecht</name>
<email>rupprecht@google.com</email>
</author>
<published>2025-09-18T19:11:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3e0c58be49c81931daf285c0973db5fb763e51e4'/>
<id>3e0c58be49c81931daf285c0973db5fb763e51e4</id>
<content type='text'>
This reverts commit d6b7ac830ab4c1b26a1b2eecd15306eccf9cea90. Build
breakages reported on the PR hint at not working with certain versions
of the host compiler.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d6b7ac830ab4c1b26a1b2eecd15306eccf9cea90. Build
breakages reported on the PR hint at not working with certain versions
of the host compiler.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Simplify HasCachedHash with is_detected (NFC) (#159510)</title>
<updated>2025-09-18T15:55:41+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-09-18T15:55:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d6b7ac830ab4c1b26a1b2eecd15306eccf9cea90'/>
<id>d6b7ac830ab4c1b26a1b2eecd15306eccf9cea90</id>
<content type='text'>
With is_detected, we don't need to implement a SFINAE trick on our own.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With is_detected, we don't need to implement a SFINAE trick on our own.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use std::bool_constant (NFC) (#158520)</title>
<updated>2025-09-15T03:31:55+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-09-15T03:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1e3dd5ef29464b86005705bebec721ac5933bd85'/>
<id>1e3dd5ef29464b86005705bebec721ac5933bd85</id>
<content type='text'>
This patch replaces, std::integral_constant&lt;bool, ...&gt; with
std::bool_constant for brevity.  Note that std::bool_constant was
introduced as part of C++17.

There are cases where we could replace EXPECT_EQ(false, ...) with
EXPECT_FALSE(...), but I'm not doing that in this patch to avoid doing
multiple things in one patch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces, std::integral_constant&lt;bool, ...&gt; with
std::bool_constant for brevity.  Note that std::bool_constant was
introduced as part of C++17.

There are cases where we could replace EXPECT_EQ(false, ...) with
EXPECT_FALSE(...), but I'm not doing that in this patch to avoid doing
multiple things in one patch.</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] Add NoaliasAddrSpace to AAMDnodes (#149247)</title>
<updated>2025-07-29T02:10:06+00:00</updated>
<author>
<name>Shoreshen</name>
<email>372660931@qq.com</email>
</author>
<published>2025-07-29T02:10:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a5deb59dfef13cb5eb8e3defc7e94904ea132a34'/>
<id>a5deb59dfef13cb5eb8e3defc7e94904ea132a34</id>
<content type='text'>
This is the following PR of
https://github.com/llvm/llvm-project/pull/136553 which calculate
NoaliasAddrSpace.

This PR carries the info calculated into MIR by adding it into AAMDnodes</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the following PR of
https://github.com/llvm/llvm-project/pull/136553 which calculate
NoaliasAddrSpace.

This PR carries the info calculated into MIR by adding it into AAMDnodes</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Introduce callee_type metadata</title>
<updated>2025-07-18T21:40:54+00:00</updated>
<author>
<name>Prabhu Rajasekaran</name>
<email>prabhukr@google.com</email>
</author>
<published>2025-07-18T21:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=921c6dbecaf49e3ed24b94802f094cd7f61f1873'/>
<id>921c6dbecaf49e3ed24b94802f094cd7f61f1873</id>
<content type='text'>
Introduce `callee_type` metadata which will be attached to the indirect
call instructions.

The `callee_type` metadata will be used to generate `.callgraph` section
described in this RFC:
https://lists.llvm.org/pipermail/llvm-dev/2021-July/151739.html

Reviewers: morehouse, petrhosek, nikic, ilovepi

Reviewed By: nikic, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/87573
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce `callee_type` metadata which will be attached to the indirect
call instructions.

The `callee_type` metadata will be used to generate `.callgraph` section
described in this RFC:
https://lists.llvm.org/pipermail/llvm-dev/2021-July/151739.html

Reviewers: morehouse, petrhosek, nikic, ilovepi

Reviewed By: nikic, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/87573
</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Remove an unnecessary cast (NFC) (#146464)</title>
<updated>2025-07-01T14:32:29+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-07-01T14:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7622bf9d1270f28aa95d83cca71501367ad5bad2'/>
<id>7622bf9d1270f28aa95d83cca71501367ad5bad2</id>
<content type='text'>
The destructor does not return anything.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The destructor does not return anything.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][PGO] Use constants rather than free strings for metadata labels (#145721)</title>
<updated>2025-06-25T23:20:10+00:00</updated>
<author>
<name>Mircea Trofin</name>
<email>mtrofin@google.com</email>
</author>
<published>2025-06-25T23:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=82cbd68504e6206ec40a5b41ea14aa6a4988e6fe'/>
<id>82cbd68504e6206ec40a5b41ea14aa6a4988e6fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
