[LLVMdev] Dynamic (JIT) type resolution
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Nov 6 16:03:17 PST 2007
BGB wrote:
> maybe a tradeoff is possible:
> the function to get the offset is replaced by a function pointer and a stub
> (avoiding many of the general problems involved with using
> self-modifying-code).
>
For me there are no problems of self-modifying code (the LLVM jit
already does it)
> the fist time it is called, the function pointer points to 'stub A', which
> calls the function to lookup the slot offset,
> this function then stores the value in a variable, and updates the function
> pointer to point to 'stub B'.
>
> 'stub B', simply returns the value stored in the variable.
>
>
>
That's again what I want to avoid. This is my current implementation,
and I _really_ would like to avoid unnecessary calls once the type is
resolved.
> this should not be too difficult to implement I would think (albeit
> admittedly I still don't know a whole lot about LLVM).
>
> hope this is of some use, in any case.
>
>
>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list