Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings target switch intrinsic asm #4727

Merged

Conversation

venkataram-nv
Copy link
Collaborator

@venkataram-nv venkataram-nv commented Jul 23, 2024

Handles #4720

Also adds a fix to skip generating IR for empty target switches. Previously this would result in generating an unreachable block, which would have necessitated special handling for target switches.

@venkataram-nv venkataram-nv added the pr: non-breaking PRs without breaking changes label Jul 23, 2024
@venkataram-nv venkataram-nv self-assigned this Jul 23, 2024
@venkataram-nv venkataram-nv force-pushed the warnings-target-switch-intrinsic-asm branch from 7e373a1 to 5f3eb0f Compare July 23, 2024 22:00
@venkataram-nv venkataram-nv marked this pull request as ready for review July 24, 2024 00:22
@@ -16,23 +16,8 @@ struct ReachabilityContext
ReachabilityContext() = default;
ReachabilityContext(IRGlobalValueWithCode* code);

bool isInstReachable(IRInst* from, IRInst* to);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can revert this change and move isInstReachable to its original place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can but after switching to getBlock calls we would also need to #include "slang-ir-util.h" in slang-ir-reachabilty.h is that fine?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I see, moving it here is fine.

@csyonghe csyonghe merged commit 93a3ba8 into shader-slang:master Jul 31, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants