This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Allow literal structs to replaceImmediateSubElements
ClosedPublic

Authored by Mogball on Oct 21 2022, 3:04 PM.

Details

Summary

SubElementInterfaces forbids all mutable types and attributes from
implementing replaceImmediateSubElements. However, this prohibits
literal structs, which are immutable, from implementing that function.
This patch defers the decision on whether to support
replaceImmediateSubElements to the individual types/attributes.

Depends on D136505

Diff Detail

Event Timeline

Mogball created this revision.Oct 21 2022, 3:04 PM
Herald added a project: Restricted Project. · View Herald Transcript
Mogball requested review of this revision.Oct 21 2022, 3:04 PM
rriddle accepted this revision.Oct 21 2022, 3:07 PM

This LGTM with the addition of a Note on the interface definition of replaceImmediateSubElements that mutable things aren't supported (given that this now places the onus on the attribute/type to detect when it should fail).

This revision is now accepted and ready to land.Oct 21 2022, 3:07 PM
Mogball updated this revision to Diff 469788.Oct 21 2022, 3:12 PM

add note to interface doc

This revision was landed with ongoing or failed builds.Oct 21 2022, 3:13 PM
This revision was automatically updated to reflect the committed changes.