What are the implications for
- portability (defiant convention: does it really matter at the LLVM level when invoked only in a C library or OS library function).
- link time
- Optimization
I would like to compile the toy language with LLVM because of all the hard parts that are already present (optimization, object code generation), but I am struggling with a concept that I would like to keep if it is worth it: library files must be redistributable, used both static and general libs (for linking in the general case, the real one or the dll will be generated when the last application is connected), portable. I believe this will reduce some of the compilation time (since native code generation and possibly optimization is done once, in the final binary link time). I assume that the linker will take care of calling the convention (if possible) and converting it to a shared library if necessary. In an expanded add-on, perhaps LLVM could be used to not reference,and use LLVM JIT to run the generated bytecode directly, completely removing link time when writing code.
Does this sound
- doable?
- Is it worth it? I know that C / C ++ communication time is relatively long, which is problematic with frequent rebuilding. As for optimizing the free link time (
/GLand cfr -flto, since it will be essentially LLVM byte code linked together, which will then be converted to its own binary file).
This may be a vague question, if I need to clarify something, please ask.
source
share