[flang-commits] [flang] [flang] Fix fir.call setCalleeFromCallable (PR #187124)

via flang-commits flang-commits at lists.llvm.org
Wed Mar 18 02:32:14 PDT 2026


https://github.com/jeanPerier commented:

What is the use case for switching mode between direct and indirect?

The falling through is an implementation choice that you can only switch callee with a callee of the same mode (rational is simplicity). This is similar to what is happening with the LLVM func operation (which is the only other one from MLIR that support indirect and direct call with the same operation, the MLIR func dialect uses different operation, so trying to change direct/indirect mode on the func dialect with setCalleeFromCallable cannot work).

I am not opposed to having the ability to do this (it is probably better to have it at the operation level so that when someone add attributes that needs to be adapted when switching modes, they update the helper), but beware that only fir.call will support it, and not the CallInterface operation in general (func or llvm dialect call operations).

https://github.com/llvm/llvm-project/pull/187124


More information about the flang-commits mailing list