[llvm-dev] Eager compilation and relocatable dynamic linkable code-generation

Rajesh S R via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 17 18:08:58 PDT 2019


Hi all,
I am following the LLVM JIT tutorial API based on:
https://llvm.org/docs/tutorial/BuildingAJIT1.html

I have 2 independent questions:
1. The tutorial mentions that "*will defer compilation of the module until
any of its definitions is looked up*".

Does that mean to force eager compilation, i have to keep track of all
functions added to the Module and do a lookup? I want the module to be
compiled fully after I do add module to compile_layer. What is the best way
to achieve this? Or should I not use ORC API at all?

2. I want to compile on one process and want to ship the machine code to
another process and load it for execution (with no lazy compilation where
an uncompiled function will trigger compilation to remote process which as
I understand is what the tutorial talks about). This means we need to
generate position-independent code and may need dynamic linking to resolve
any unknown function call based on symbol name. What is the best way to
achieve this? Is there some code pointers?

Thanks!

Rajesh S R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190717/b5883e7f/attachment.html>


More information about the llvm-dev mailing list