Skip to content

[FIRRTL] Utils: fix getValueByFieldID for open aggregates.#10016

Merged
dtzSiFive merged 1 commit intollvm:mainfrom
dtzSiFive:fix/get-value-by-fieldid-open-agg
Mar 23, 2026
Merged

[FIRRTL] Utils: fix getValueByFieldID for open aggregates.#10016
dtzSiFive merged 1 commit intollvm:mainfrom
dtzSiFive:fix/get-value-by-fieldid-open-agg

Conversation

@dtzSiFive
Copy link
Contributor

Use Open indexing ops for open aggregates.

.Case<BundleType, OpenBundleType>([&](auto bundle) {
.Case<BundleType>([&](auto bundle) {
auto index = bundle.getIndexForFieldID(fieldID);
value = SubfieldOp::create(builder, value, index);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be convenient for these sorts of things to have AggTy::IndexingOp_t or something, then all these cases could be collapsed (in the source).

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

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

LGTM

@dtzSiFive dtzSiFive merged commit 31f0142 into llvm:main Mar 23, 2026
8 checks passed
@dtzSiFive dtzSiFive deleted the fix/get-value-by-fieldid-open-agg branch March 23, 2026 21:59
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.

2 participants