[stinkytofu] Implement legalizeImplicitSpecialRegisters function#7268
Merged
Conversation
c1ff11f to
b6136c1
Compare
cycheng
approved these changes
May 12, 2026
182efe8 to
6c872c9
Compare
darrenhsieh-amd
requested changes
May 12, 2026
6c872c9 to
45514ab
Compare
darrenhsieh-amd
approved these changes
May 12, 2026
for handling implicit special registers (SCC, VCC, EXEC) in instructions And, use both in ToStinkyTofuUtils and StinkyBuildImplicitDependencyPass
45514ab to
d773a6f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (69.24%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #7268 +/- ##
========================================
Coverage 64.36% 64.36%
========================================
Files 603 603
Lines 112196 112196
Branches 15498 15498
========================================
Hits 72205 72205
Misses 34724 34724
Partials 5267 5267
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Implicit registers, eg. SCC, VCC, and EXEC must be attached to instruction's src/dest list so the def-use chain builder sees those dependencies. Today this only happens in the rocisa → stinkytofu converter, so any
StinkyInstructioncreated via another path — most notably stinkytofu-opt parsing assembly text, but also instructions created inside legalization passes — is missing its implicit special registers.Technical Details
legalizeImplicitSpecialRegisters(StinkyInstruction*, uint32_t wavefrontSize)inLegalizationUtils.{hpp,cpp}.ToStinkyTofuUtils.cppnow calls the helper instead of the inline if-chain — behavior unchanged for the rocisa path.StinkyBuildImplicitDependencyPassruns the helper on every instruction in every basic block, in addition to its existing LDS/MemTokenData handling.stinkytofu-opt(and any other pipeline that builds IR outside the rocisa converter) gets correct implicit SCC/VCC/EXEC operands by simply addingStinkyBuildImplicitDependencyPass.Test Plan
Test Result
Submission Checklist