Skip to content

Remove redundant iterations from inliner passes#6639

Merged
s-perron merged 3 commits into
KhronosGroup:mainfrom
Jmangles:jrobinson/inliner-optimization
Apr 27, 2026
Merged

Remove redundant iterations from inliner passes#6639
s-perron merged 3 commits into
KhronosGroup:mainfrom
Jmangles:jrobinson/inliner-optimization

Conversation

@Jmangles
Copy link
Copy Markdown
Contributor

Implemented in both the exhaustive/opaque inliner even though it appears the opaque one is not fully functional.

In my benchmark tests I found it reduced the time needed to run the exhaustive pass by 50% on average with the shaders I was testing with.

Also fixes two bugs in the opaque inliner. One is from not updating the parent of each new block and the other for debug. These could be split into another PR if desired but it's still pretty small overall.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 15, 2026

CLA assistant check
All committers have signed the CLA.

…iner having a potential stale reference by not updating parent for blocks. Fix for opaque inliner not fixing debug declares like exhaustive pass.
@Jmangles Jmangles force-pushed the jrobinson/inliner-optimization branch from 5fba3a6 to 23c92f6 Compare April 15, 2026 15:12
Copy link
Copy Markdown
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. I'm trying to think of any situation where the previous instruction could be invalidated. I don't think it can.

@s-perron
Copy link
Copy Markdown
Collaborator

I think the smoke test failures were because you branch was behind. I push changes to merge the latest main. I also ran clang-format to fix the formatting.

@s-perron s-perron enabled auto-merge (squash) April 27, 2026 13:00
@s-perron s-perron merged commit 5f7bbe7 into KhronosGroup:main Apr 27, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants