[NFC] Refactor inline structs pass to prepare for handling more "remaining uses"#218
Merged
tim-hoffman merged 4 commits intomainfrom Nov 17, 2025
Merged
Conversation
e71c786 to
db1bf09
Compare
iangneal
approved these changes
Nov 17, 2025
Contributor
iangneal
left a comment
There was a problem hiding this comment.
LGTM, just a note for the future.
| // Find the write op that stores the created value | ||
| if (writeOp.getVal() == writtenValue) { | ||
| if (foundWrite) { | ||
| // Note: There is no reason for a subcomponent to be stored to more than one field. |
Contributor
There was a problem hiding this comment.
It seems we don't have this as a semantic check, since code like this is produced by the zirgen frontend and doesn't cause issues in the up-to-date llzk-opt. We might want to consider either adding one (if we want this to always be enforced) or adding a transformation pass for it.
Contributor
There was a problem hiding this comment.
(Just a note for later, I know that's not the purpose of this PR).
raghav198
pushed a commit
that referenced
this pull request
Nov 20, 2025
…ining uses" (#218) * add debug output, clarify docs, fix typos * refactoring to prepare for handling more "remaining uses" * update debug output with new function names
raghav198
added a commit
that referenced
this pull request
Dec 9, 2025
* Registered new transformation pass * Concatenation pass works * deleted comments * Basic inlining complete * Fixed issue calling @Product * Refactoring, added root-struct option * Aligning subfunctions * Refactor to make struct inlining available on demand (#212) * For now, fail when we can't align some calls * [NFC] Refactor inline structs pass to prepare for handling more "remaining uses" (#218) * add debug output, clarify docs, fix typos * refactoring to prepare for handling more "remaining uses" * update debug output with new function names * Brought back LightweightSignalEquivalenceAnalysis * Added testcase * Shankara/pcl include fix (#221) * used the wrong cmake flag when guarding PCL imports * Added libAnalysis to CMake * Removed libAnalysis from CMake * Namespacing * Namespacing * Put analysis back * Link `LLZKAnalysis` in `LLZKTransforms` (#225) also explicitly link LLZKDialect in the dialects that use it to fix linker error that surfaced as a result * remove redundant "add_dependencies" from cmake (#226) * clang-format * Changelog * FORMAT * Addressing comments * update manual build instructions to build clang dependency * Addressing comments * Add missing headers to `llzk-tblgen` lib (#239) * Refactor to add calleeContainsWitnessGen() and getSingleResultTypeOfWitnessGen() instead of overloading ...Compute() * nit * revert --------- Co-authored-by: Raghav Malik <raghav@veridise.com> Co-authored-by: Timothy Hoffman <4001421+tim-hoffman@users.noreply.github.com> Co-authored-by: shankarapailoor <shankarapailoor@gmail.com> Co-authored-by: Tim Hoffman <timothy.hoffman@veridise.com>
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.
No Functional Changes
Preparing to fix a bug found in
llzk-inline-structspass... RefactoringhandleRemainingUses()into a class to more clearly split up implementation into functions and avoid passing around the common data. Also added some debug output, clarified/added some documentation, and fixed a couple typos.Empty changelog because it's only private API and doc changes.