Hello list,
I have a simple question.
Q: What llvm class does the clang use instead of llvm::ExecutionEngine?
I am studying clang and llvm tutorial.
In the llvm tutorial, a functional language - kaleidoscope - is explained.
For kaleidoscope, llvm::ExecutionEngine is used to JIT.
So I searched it in clang. But the class is not used in clang at all.
llvm::ExecutionEngine is for JIT compilation and Interpreter.
So I want to know then in clang what is used instead of llvm::ExecutionEngine.
I am looking in the source code but I welcome some help if possible.
Thank you in advance.
Best regards
Clang's codegen generates an llvm::Module with all the relevant code.
Once that is made, there are a number of LLVM API's which can be used
to operate on it, one of which is the ExecutionEngine API's which will
execute it; however, Clang doesn't JIT, so it really doesn't need
that, as you observed. The main function you want to look at for what
Clang does with the Module is clang::EmitBackendOutput() in
clang/lib/CodeGen/BackendUtil.cpp.
You may want to look at llc (in $LLVM_ROOT/tools/llc/) for a simpler
example of the same general idea.
-- Sean Silva
Hi Sean Silva,
This time also you.
Thank you. I appreciate your help.
Sincerely
Journeyer