StaticCompiler.jl icon indicating copy to clipboard operation
StaticCompiler.jl copied to clipboard

How to handle multidispatch in the StaticCompiler

Open kylincaster opened this issue 1 year ago • 1 comments

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

kylincaster avatar May 20 '24 00:05 kylincaster

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

minecraft2048 avatar Sep 28 '24 02:09 minecraft2048