<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Analysis/DXILMetadataAnalysis.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>[DirectX] Emit `hlsl.wavesize` function attribute as entry property metadata (#165624)</title>
<updated>2025-11-05T17:18:49+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-11-05T17:18:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6312d2751144bd53af7ef56798cbe60aa8b2fb56'/>
<id>6312d2751144bd53af7ef56798cbe60aa8b2fb56</id>
<content type='text'>
This pr adds support for emitting the `hlsl.wavesize` function attribute
as an entry property metadata for a compute shader.

It follows the implementation of `hlsl.numthreads`.

- Collects the wave range information from the function attribute in
`DXILMetadataAnalysis`
- Introduce the `WaveRange` property tag
- Emit a `WaveSize` or `WaveRange` metadata (depending on shader model)
in `DXILTranslateMetadata`
- Add tests for valid/invalid scenarios
- Updates the base `PSVInfo` to reflect the min/max wave lane counts

Resolves #70118</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr adds support for emitting the `hlsl.wavesize` function attribute
as an entry property metadata for a compute shader.

It follows the implementation of `hlsl.numthreads`.

- Collects the wave range information from the function attribute in
`DXILMetadataAnalysis`
- Introduce the `WaveRange` property tag
- Emit a `WaveSize` or `WaveRange` metadata (depending on shader model)
in `DXILTranslateMetadata`
- Add tests for valid/invalid scenarios
- Updates the base `PSVInfo` to reflect the min/max wave lane counts

Resolves #70118</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM] Cleanup pass initialization for Analysis passes (#135858)</title>
<updated>2025-04-21T19:36:34+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-04-21T19:36:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=99e4b3927c5b8700b818ca2436f3c8394245e97c'/>
<id>99e4b3927c5b8700b818ca2436f3c8394245e97c</id>
<content type='text'>
- Do not call pass initialization from pass constructors.
- Instead, pass initialization should happen in the `initializeAnalysis`
function.
- https://github.com/llvm/llvm-project/issues/111767</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Do not call pass initialization from pass constructors.
- Instead, pass initialization should happen in the `initializeAnalysis`
function.
- https://github.com/llvm/llvm-project/issues/111767</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>[DXIL] Consume Metadata Analysis information in passes (#108034)</title>
<updated>2024-09-23T23:00:20+00:00</updated>
<author>
<name>S. Bharadwaj Yadavalli</name>
<email>Bharadwaj.Yadavalli@microsoft.com</email>
</author>
<published>2024-09-23T23:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3734fa8c724ce2af2f69886ca97c05c6c3717c34'/>
<id>3734fa8c724ce2af2f69886ca97c05c6c3717c34</id>
<content type='text'>
- Changed `DXILTranslateMetadata::translateMetadata()` to consume DXIL
Metadata Analysis information. Subsumed into `DXILTranslateMetedata.cpp`
the functionality in `DXILMetadata.*` files - that are hence deleted.
- Changed `DXILPrepare` pass to consume DXIL Metadata Analysis
information.
- Renamed `ModuleMetadataInfo::ShaderStage` to
`ModuleMetadataInfo::ShaderProfile` to better convey what it represents.
- Updated `unknown` target shader stage specification in triples of a
couple of tests.
- Added new tests for additional verification of `DXILTranslateMetadata`
pass functionality.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Changed `DXILTranslateMetadata::translateMetadata()` to consume DXIL
Metadata Analysis information. Subsumed into `DXILTranslateMetedata.cpp`
the functionality in `DXILMetadata.*` files - that are hence deleted.
- Changed `DXILPrepare` pass to consume DXIL Metadata Analysis
information.
- Renamed `ModuleMetadataInfo::ShaderStage` to
`ModuleMetadataInfo::ShaderProfile` to better convey what it represents.
- Updated `unknown` target shader stage specification in triples of a
couple of tests.
- Added new tests for additional verification of `DXILTranslateMetadata`
pass functionality.</pre>
</div>
</content>
</entry>
<entry>
<title>[DXIL][Analysis] Collect Function properties in Metadata Analysis (#105728)</title>
<updated>2024-08-31T21:56:06+00:00</updated>
<author>
<name>S. Bharadwaj Yadavalli</name>
<email>Bharadwaj.Yadavalli@microsoft.com</email>
</author>
<published>2024-08-31T21:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8aa8c0590c09a52737787ed7c35befa3fbede231'/>
<id>8aa8c0590c09a52737787ed7c35befa3fbede231</id>
<content type='text'>
Basic infrastructure to collect Function properties in Metadata Analysis
- Add a `SmallVector` of entry properties to the metadata information.
- Add a structure to represent function properties. Currently
`numthreads` and shader kind properties of shader entry functions are
represented.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Basic infrastructure to collect Function properties in Metadata Analysis
- Add a `SmallVector` of entry properties to the metadata information.
- Add a structure to represent function properties. Currently
`numthreads` and shader kind properties of shader entry functions are
represented.</pre>
</div>
</content>
</entry>
<entry>
<title>[DXIL][Analysis] Add validator version to info collected by Module Metadata Analysis  (#104828)</title>
<updated>2024-08-20T14:35:30+00:00</updated>
<author>
<name>S. Bharadwaj Yadavalli</name>
<email>Bharadwaj.Yadavalli@microsoft.com</email>
</author>
<published>2024-08-20T14:35:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=74f5ee4ffe89da4a0e9c762c69f8a68536fbf754'/>
<id>74f5ee4ffe89da4a0e9c762c69f8a68536fbf754</id>
<content type='text'>
Add Validator Version to information collected by Module Metadata
Analysis pass. An earlier change (#104040) added a default hardcoded
value for validator version to be associated with DXIL module created
during HLSL source compilation.

Add tests to verify validator version info collected
 - Updated existing tests
 - Added a test with validator version specified in DXIL metadata</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Validator Version to information collected by Module Metadata
Analysis pass. An earlier change (#104040) added a default hardcoded
value for validator version to be associated with DXIL module created
during HLSL source compilation.

Add tests to verify validator version info collected
 - Updated existing tests
 - Added a test with validator version specified in DXIL metadata</pre>
</div>
</content>
</entry>
<entry>
<title>[DXIL][Analysis] Add DXILMetadataAnalysis pass (#102079)</title>
<updated>2024-08-12T17:51:09+00:00</updated>
<author>
<name>S. Bharadwaj Yadavalli</name>
<email>Bharadwaj.Yadavalli@microsoft.com</email>
</author>
<published>2024-08-12T17:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=03e6675fc78783d0d0b0a784eccbd5ff19de23a2'/>
<id>03e6675fc78783d0d0b0a784eccbd5ff19de23a2</id>
<content type='text'>
DXIL Metadata Analysis passes (one for legacy PM and one for new PM)
that collect following DXIL module metadata information in a structure
are added.
1. Shader Model version
2. DXIL version 
3. Shader Stage

Information collected using the legacy pass is verified by adding
additional test commands to existing metadata test sources.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DXIL Metadata Analysis passes (one for legacy PM and one for new PM)
that collect following DXIL module metadata information in a structure
are added.
1. Shader Model version
2. DXIL version 
3. Shader Stage

Information collected using the legacy pass is verified by adding
additional test commands to existing metadata test sources.</pre>
</div>
</content>
</entry>
</feed>
