[llvm-dev] How to add instructions to a Module at runtime?
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Sun Nov 18 10:20:11 PST 2018
As far as LLVM is concerned, yeah. Though if you have that small amount of
code it might be quicker to interpret it directly rather than going all the
way into/through llvm
On Sun, Nov 18, 2018, 12:59 PM Alberto Barbaro <barbaro.alberto at gmail.com
wrote:
> 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/bc67874b/attachment.html>
More information about the llvm-dev
mailing list