<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-ir-dce.h, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-09-24T06:47:30+00:00</updated>
<entry>
<title>Remove unnecessary Load and Store pair (#8433)</title>
<updated>2025-09-24T06:47:30+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-09-24T06:47:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9c2024a7509baae921083d49a56e1321c51f00ec'/>
<id>urn:sha1:9c2024a7509baae921083d49a56e1321c51f00ec</id>
<content type='text'>
This commit removes unnecessary Load and Store pairs in IR.

When the IR is like
```
let %1 = var
let %2 = load(%ptr)
store(%1 %2)
```
This PR will replace all uses of %1 with %ptr.
And the load and store instructions will be removed.

But I found that there can be cases where %2 might be still used later
in other IRs.
For these cases, the removal of load instruction relies on DCE.

---------

Co-authored-by: slangbot &lt;ellieh+slangbot@nvidia.com&gt;</content>
</entry>
<entry>
<title>format</title>
<updated>2024-10-29T06:49:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21'/>
<id>urn:sha1:f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21</id>
<content type='text'>
* format

* Minor test fixes

* enable checking cpp format in ci</content>
</entry>
<entry>
<title>Assorted auto-diff enhancements for increased performance &amp; more streamlined auto-diff results (#5394)</title>
<updated>2024-10-28T19:47:58+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2024-10-28T19:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b61be5e6fb7fe1c4ec8228cdf73f49f11e5a0ac9'/>
<id>urn:sha1:b61be5e6fb7fe1c4ec8228cdf73f49f11e5a0ac9</id>
<content type='text'>
* Various AD enhancements

* Fix issue with pt-loop test

* Update pt-loop.slang

* More fixes for perf. Final minimal context test now passes.

* Fix issue with loop-elimination pass not running after dce

* Try fix wgpu test by removing select operator

* Disable wgpu

* Delete out.wgsl

* Remove comments

* Update slang-ir-util.cpp

* Fix header relative paths for slang-embed

* Disbale wgpu for a few other tests

* Better way of determining which params to ignore for side-effects

* Update slang-ir-dce.cpp

* Fix issue with circular reference from previous AD pass being left behind for the next AD pass

* Update slang-ir-dce.cpp</content>
</entry>
<entry>
<title>Add option to preserve shader parameter declaration in output SPIRV. (#4344)</title>
<updated>2024-06-12T16:27:14+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-06-12T16:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fa8c11ebe8f9b1bf2174a5a4dbe92a34c16811c8'/>
<id>urn:sha1:fa8c11ebe8f9b1bf2174a5a4dbe92a34c16811c8</id>
<content type='text'>
* Add option to preserve shader parameter declarations in output.

* Add test.</content>
</entry>
<entry>
<title>Add options to speedup compilation. (#4240)</title>
<updated>2024-05-29T18:14:22+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-05-29T18:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=83f176ba8a3bae5533470aed6a90663653f894b8'/>
<id>urn:sha1:83f176ba8a3bae5533470aed6a90663653f894b8</id>
<content type='text'>
* Add options to speedup compilation.

* Fix.

* Plumb options to DCE pass.

* Revert debug change.

* Fix regressions.

* More optimizations.

* more cleanup and fixes.

* remove comment.

* Fixes.

* Another fix.

* Fix errors.

* Fix errors.

* Add comments.</content>
</entry>
<entry>
<title>Separate primal computations from unzipped function into an explicit function. (#2569)</title>
<updated>2022-12-19T19:47:19+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-12-19T19:47:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=216dfba0af66210a46ef0df18beb73d975fdf727'/>
<id>urn:sha1:216dfba0af66210a46ef0df18beb73d975fdf727</id>
<content type='text'>
Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Specialize generic/existential calls within generic functions. (#2294)</title>
<updated>2022-06-25T20:05:35+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-06-25T20:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=62d16a23b0ecd72dc624abd7e10b373c40adaa90'/>
<id>urn:sha1:62d16a23b0ecd72dc624abd7e10b373c40adaa90</id>
<content type='text'>
* Expose internals of dce and use it to implement call graph walk.

* Specialize calls in generic functions.

* Fix clang error.

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Improved SCCP, inlining and resource specialization passes, legalize `ImageSubscript` for GLSL (#2146)</title>
<updated>2022-02-26T04:49:31+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-02-26T04:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c31577953d5041c82375c22d847c2eba06106c58'/>
<id>urn:sha1:c31577953d5041c82375c22d847c2eba06106c58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* Removed strip pass from emit as no longer needed (#1114)</title>
<updated>2019-11-07T18:51:46+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-11-07T18:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=99c295477fa1f6c5ce47e0d1c8fb3eea9d5e5f98'/>
<id>urn:sha1:99c295477fa1f6c5ce47e0d1c8fb3eea9d5e5f98</id>
<content type='text'>
* If obfuscate is enabled do strip on Layout
* Add option to keep insts that have layout decoration (else DCE strips layout)
* Add NameHint back in lowering - as strip now correctly removes. We may want NameHints in some stages even with obfuscation (for error messages in IR passes), as long as they are removed appropriately at the end</content>
</entry>
<entry>
<title>Strip IR after front-end steps are done (#1092)</title>
<updated>2019-10-24T19:18:34+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2019-10-24T19:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=58ad4b1a9ca43098a071c42bd752a4a48405bf0e'/>
<id>urn:sha1:58ad4b1a9ca43098a071c42bd752a4a48405bf0e</id>
<content type='text'>
* Strip IR after front-end steps are done

The main feature of this change is to unconditonally strip out the `IRHighLevelDeclDecoration`s in an IR module once the "mandatory" IR passes in the front end have run. This ensures that later IR passes (e.g., code emission) *cannot* rely on AST-level information to get their job done.

Since I was already writing a pass to remove some instructions at the end of the front-end passes, I went ahead and also made the `-obfuscate` flag apply to the front-end IR generation by causing it to strip `IRNameHintDecoration`s while it is doing the other stripping. With this, the main identifying information left in IR modules (other than semantics and entry-point names) is mangled name strings for imported/exported symbols.

A few other things got changes along the way:

* Removed the `.expected` file for one of the tests, where that file seemingly shouldn't have been checked in at all.

* Updated the signature of the DCE pass both so that it doesn't require a back-end compile request (it wasn't using it anyway), and so that it takes some options to decide whether to keep symbols marked `[export(...)]` alive (the front-end wants to keep these, while back-end passes currently need to be able to eliminate them).

* Moved the `obfuscateCode` flag from the back-end compile request to the base class shared between front- and back-end requests, and updated the options and repro logic to set both as needed. An obvious improvement in the future would be to have the front- and back-end requests share these settings by referencing a single common object in the end-to-end case, rather than each having their own copy.

* Removed logic that was keeping layout instructions alive in DCE, even if they weren't used. This seems to have been a vestige of an intermediate step between AST and IR layout.

* fixup: add the new files
</content>
</entry>
</feed>
