handle heterogeneous arrays in flattening pass - #660
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74c9383a7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf4ba11ae4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44d8aafd08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d350c0c4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5483b9f86e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0414c2294
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
llzk-lib/lib/Dialect/Polymorphic/Transforms/FlatteningPass.cpp
Lines 1964 to 1969 in bf67a58
When the partially instantiated function contains a flat call to a sibling function in the original template, the cloned template contains only the remaining parameters, copied expressions, and newFunc; it does not contain that sibling. The flat callee consequently resolves relative to the new template and becomes an unknown symbol, so applyBodyConversions() rejects an otherwise valid partial instantiation. Copy referenced sibling functions recursively or rewrite such callees to a path that still resolves in the original template.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
it already has a failure though
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 755ef86fa9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (OpOperand &use : result.getUses()) { | ||
| Operation *user = use.getOwner(); |
There was a problem hiding this comment.
Validate unifiable-cast consumers before replacing reads
When a generic array read feeds poly.unifiable_cast to an independently concrete type, this dispatch falls through without checking the cast. For example, a read replaced with Cell<0> may validly have been cast from generic Cell<#id> to Cell<1> before scalarization; replacing its input makes the cast operands non-unifiable, and UnifiableCastOp::verify() then rejects the transformed IR. Fresh evidence after the other consumer-specific fixes is that the reviewed helper still has no UnifiableCastOp branch; reject the replacement when the concrete input cannot unify with the cast result.
Useful? React with 👍 / 👎.
| for (OpOperand &use : result.getUses()) { | ||
| Operation *user = use.getOwner(); |
There was a problem hiding this comment.
Check array writes before refining member reads
When a generic MemberReadOp feeds an array.write whose destination has an independently concrete element type, this consumer is ignored. A read that initially unifies with both Cell<0> from the refined member and a destination requiring Cell<1> is retagged to Cell<0>, leaving the unchanged array write invalid. Fresh evidence beyond the existing call/initializer guards is that this loop still has no WriteArrayOp case; decline the member refinement unless the destination element type accepts refinedType.
Useful? React with 👍 / 👎.
Summary
Update flattening pass to create a series of flattened structs for an array of heterogeneous structs.
Related issues
Fixes #296