[llvm-dev] How to add instructions to a Module at runtime?

Alberto Barbaro via llvm-dev
Sun, 18 Nov 2018 17:59:21 -0000

Hi David,
Thanks for your answer. Just to clarify, I would like to create 2 3
instructions put them in a function and execute them. Do you still think
the JIT would be the best option?

Thanks

On Sun, Nov 18, 2018, 12:55 David Blaikie <dblaikie at gmail.com wrote:

> If you're looking to execute code at runtime (within th eam process -
or
> across a network etc - as the one that compiles that code (rather than
> writing an executable/object code to dusk etc)) sounds like you're
looking
> for a JIT. Here's some info on how to use/write a JIT using llvm:
> https://llvm.org/docs/tutorial/BuildingAJIT1.html
>
> On Sun, Nov 18, 2018, 5:53 AM Alberto Barbaro via llvm-dev <
> llvm-dev at lists.llvm.org wrote:
>
>> Hi all,
>> I'm trying to understand how the Module object works more in
details, so
>> suppose I've an empty module and I'd like to know if it is
possible to add
>> instructions at runtime and execute it. Is it possible to do it? Any
>> suggestion on how?
>>
>> Thanks
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20181118/2b3fe1ed/attachment.html>