How to handle multidispatch in the StaticCompiler
Multidispatch is the core feature of Julia. Therefore, handling functions that use multidispatch is inevitable. Unfortunately, the current generate_obj function cannot handle multidispatch. The generated library resembles a C-like library rather than a C++-like one.
Therefore, I propose adding name mangling similar to the Itanium C++ ABI to support multiple function symbols in the object file. This task may be very difficult and would require an in-depth modification of StaticCompiler.
Thank you for any suggestions in advance.
Kylin
Upstream GPUCompiler supports some some sort of Itanium ABI name mangling: https://github.com/JuliaGPU/GPUCompiler.jl/blob/master/src/mangling.jl
https://github.com/JuliaGPU/GPUCompiler.jl/pull/632
It will be nice if we can set StaticCompiler existing mangler to GPUCompiler mangler