llvm / llvm/llvm-project

[MLIR][DialectConversion] convertFuncOpTypes of the function conversion patterns does not update arg attributes

Open
#203,380 1 comment 0 reactions 0 assignees View on GitHub
mlir
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.