[cfe-dev] What llvm class does the clang use instead of llvm::ExecutionEngine?

Sean Silva silvas at purdue.edu
Thu Oct 25 10:29:37 PDT 2012


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

On Thu, Oct 25, 2012 at 7:29 AM, Journeyer J. Joh
<oosaprogrammer at gmail.com> wrote:
> 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
> --
> ----------------------------------------
> Journeyer J. Joh
> o o s a p r o g r a m m e r
> a t
> g m a i l  d o t  c o m
> ----------------------------------------
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list