interface name changed after scalehls?

The left is original code, and the port name C,A,B is translated to v0,v1,v2 what's the purpose?
For now, we don't have a mechanism to represent the "name" of C variables in the IR. One possible approach is retaining them as string attributes attached to function operations.
" retaining them as string attributes" how-to? is there an example?
For example, see the following IR:
func @test_gemm(%arg0: f32 {hlscpp.var_name = "alpha"}, %arg1: f32 {hlscpp.var_name = "beta"}, %arg2: memref<32x32xf32> {hlscpp.var_name = "A"}, %arg3: memref<32x32xf32> {hlscpp.var_name = "B"}, %arg4: memref<32x32xf32> {hlscpp.var_name = "C"}) {
affine.for %arg5 = 0 to 32 {
... ...
}
return
}
This feature requires at least two PRs:
- In
mlir-clangduring parsing the C program, store the variable name as an attribute attached to the defining operation of the variable. - In
emit-hlscpp, support to parse the "var_name" attribute and emit it as the name of an variable rather than a auto-generated name like v0, v1, v2, etc.
so complex for ordinary developer :- ( it will be hard for people to use it
@Oxygen-Chu MLIR itself is complex, but powerful 😄 Based on my understanding, the C/C++ emission is just for the integration with downstream tools, such as Vivado HLS. From the IR point of view, we have the "mlir::Value" structure to represent and manipulate variables in the program -- which can support any desired program transformation and analysis for us.