[MLIR][DialectConversion] convertFuncOpTypes of the function conversion patterns does not update arg attributes
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
When using populateFunctionOpInterfaceTypeConversionPattern or similar functions that call to convertFuncOpTypes, if multiple parameters get expanded to more than a single new value, the argument attributes of the function will no longer line up properly.
Example:
```mlir
func.func @some_func(%arg0: i64 {my_attr = 0 : i32}, %arg1: i64 {my_attr = 1 : i32}) {
func.return
}
```
If we use the function op conversion to make these 32 bit integers, we could end up with the following:
```mlir
func.func @some_func(%arg0_0: i32 {my_attr = 0 : i32}, %arg0_1: i32 {my_attr = 1 : i32}, %arg1_0: i32, %arg1_1: i32) {
func.return
}
```
Where the argument attribute of the original %arg1 is now attached to an argument associated with %arg0.
Contributor guide
Assessment
This issue has not been assessed yet.