Is there any way to define custom calling convention without modifying llvm source code?

I want to define a function with custom abi, but I don’t want to support an llvm fork. Is there any way, I can do it, without modifying llvm?

That’s not possible at the moment.

I think it would be interesting to add support for it, though, similar to how we support custom attributes (which are just strings) and custom syncscopes (which are also just strings registered with the LLVMContext).

Adding that would mean a bit of work in upstream, but once that work has been done, you can do whatever you like with calling conventions without maintaining an LLVM fork.

Ok, thanks :slight_smile: