<div dir="ltr">As far as i know, optimizations can only be done on a module level.<div>If you compile and pass modules to the object-linking-layer, you won't be able to perform any optimizations.</div><div>Thus, what you could do is:<br>- merge the generated modules into a big monolithic module</div><div>- repeatedly perform optimization passes eg. inlining</div><div>- copy new functions into a new module ( so you don't re-compile and re-link the same functions)</div><div>- compile and link new module</div><div><br></div><div><br></div><img width="0" height="0" class="mailtrack-img" src="https://mailtrack.io/trace/mail/891a1a84af623a4c722c5c3d503d62c16d6607e8.png?u=931501"></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-20 17:44 GMT+00:00 Christian Schafmeister via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Is it possible to inline functions compiled from C++ code into generated code that is fed, Module by Module, into the ORC JIT?</div><div><br></div><div>I'd like to add a Module compiled from C++ code into the JIT and then as I add later modules, functions from the first module are inlined in the later ones.</div><div><br></div><div>I already do this for file compilation/linking in my Common Lisp compiler “Clasp” (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__github.com_drmeister_clasp&d=DwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=sSykZW5nIEBIoQEQoyEQF3iTvIwIffdEAf9FkbyVYz0&s=ao0EQZ_k7esDdMap8YjoO52BiKyMRHBv7PG4XJdrBOc&e=" target="_blank">github.com/drmeister/clasp</a>).</div><div><br></div><div>I have followed the new ORC Kaleidoscope demo and set up the ORC layers to do optimization and compilation but the examples are all for function optimization and do not describe inlining.</div><div><br></div><div>Christian Schafmeister</div><div><div style="word-wrap:break-word"><div>Professor, Chemistry Department</div><div>Temple University</div><div><a href="mailto:meister@temple.edu" target="_blank">meister@temple.edu</a></div></div></div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>