[LLVMdev] GCModuleInfo and MCJIT

Gaël Thomas gael.thomas00 at gmail.com
Wed Dec 18 09:45:29 PST 2013


Hi!

I have now a more precise question, I hope that this time, someone
will be able to help me :)

I'm now able to find the gc meta data. To find this data, I simply
register a GCMetadataPrinter (just like during an AOT compilation). A
GCMetadataprinter is called at the end of the compilation of a module
after having assigned the slots to the live roots. I have almost
everything except that at this step, a collection point (aka safepoint
in the GC world) is describe by:
* a MCSymbol, which indicates the location of a safepoint (basically
the instruction pointer that follows the safepoint)
* a list of live roots, each one is described by an offset relative to
the frame pointer.

Now, I would like to find the concrete address of the MCSymbol. And I
don't know how I could find this information. When I generate the
assembly, I don't have the actual location of the function (I
manipulate the AsmPrinter but it's not directly the object file). And
after having loaded the object file, I don't know how I could find the
concrete address of the MCSymbol. When I call
mcjit->getGlobalValueAddress("safepoint-symb"), mcjit is unable to
find it in the object file.

Any idea?
Gaël











2013/12/15 Gaël Thomas <gael.thomas00 at gmail.com>:
> Hi all,
>
> So, MCJIT is working with vmkit, that's great. However, I need to
> retrieve the GCModuleInfo and the MachineCodeEmitter used during the
> compilation process. And I don't know how I should proceed? I'm trying
> to understand how they are preserved with the old jit, but I have to
> say that I'm a little bit lost because I haven't a global view of the
> code... So, any help would be greatly appreciated!
>
> See you,
> Gaël
>
>
>
>
>
>
>
> --
> -------------------------------------------------------------------
> Gaël Thomas, Associate Professor, UPMC
> http://pagesperso-systeme.lip6.fr/Gael.Thomas/
> -------------------------------------------------------------------



-- 
-------------------------------------------------------------------
Gaël Thomas, Associate Professor, UPMC
http://pagesperso-systeme.lip6.fr/Gael.Thomas/
-------------------------------------------------------------------




More information about the llvm-dev mailing list