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<br><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 18, 2018, 12:59 PM Alberto Barbaro <<a href="mailto:barbaro.alberto@gmail.com">barbaro.alberto@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi David,<div dir="auto">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?</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 18, 2018, 12:55 David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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: <a href="https://llvm.org/docs/tutorial/BuildingAJIT1.html" rel="noreferrer" target="_blank">https://llvm.org/docs/tutorial/BuildingAJIT1.html</a><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 18, 2018, 5:53 AM Alberto Barbaro via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi all,<div dir="auto">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?</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>