encoding.duplicate
← encoding dialect
Create another local owner of an encoding value. The duplicate preserves the encoding role and facts while receiving a distinct SSA identity for dependent types.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
UniqueIdentity, StorageRelation |
| Interfaces |
ValueDuplication |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
sources |
any |
variadic |
— |
| Result |
duplicates |
any |
variadic |
— |
Verification constraints
ClosedValueTuple(sources)
ClosedValueTuple(duplicates)
VariadicValuesMatch(duplicates, sources)
Examples
%copy = encoding.duplicate %layout : encoding<layout>
%copy = encoding.duplicate %schema : encoding<schema>