Hi is there a way for renaming functions?
i have for example this:
func @x () {
return
}
and would like to change it to
func @x_1 () {
return
}
Hi is there a way for renaming functions?
i have for example this:
func @x () {
return
}
and would like to change it to
func @x_1 () {
return
}
Thanks a lot!. i am looking to not only rename the function but all the use cases. i tried using something like:
for (auto & user : functionOp->getUsers()){
SymbolTable::setSymbolName(user, functionName);
}
SymbolTable::setSymbolName(functionOp, functionName);
The MLIR syntax is
func @x() {
return
}
func @main () {
call @x() : () -> ()
call @x() : () -> ()
call @x() : () -> ()
call @x() : () -> ()
return
}
functionOp->getUsers()
is iterating through the SSA def-use, you need to us SymbolTable::getSymbolUses
to traverse symbolic uses.