<div dir="ltr"><div dir="ltr">Hi Fāng-ruì,<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">In LLVM 12.0 ORCv1 will be removed entirely? :)</blockquote><div><br></div><div>Better late than never, right? ;)</div><div><br></div><div>It turns out several clients were relying on the OrcV1 removable code feature and I didn't want to force them onto OrcV2 without a solution for that. So far I'm happy with how the OrcV2 removable code prototype is shaping up -- assuming we don't discover any major issues with the idea I do hope to remove OrcV1 before LLVM 12 is released.</div><div><br></div><div>-- Lang.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 14, 2020 at 10:41 AM Fāng-ruì Sòng <<a href="mailto:maskray@google.com">maskray@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On <a href="https://llvm.org/docs/ORCv2.html#transitioning-from-orcv1-to-orcv2" rel="noreferrer" target="_blank">https://llvm.org/docs/ORCv2.html#transitioning-from-orcv1-to-orcv2</a><br>
<br>
> "The majority of the ORCv1 layers and utilities were renamed with a ‘Legacy’ prefix in LLVM 8.0, and have deprecation warnings attached in LLVM 9.0. In LLVM 10.0 ORCv1 will be removed entirely.<br>
<br>
In LLVM 12.0 ORCv1 will be removed entirely? :)   (Noticed while<br>
looking at <a href="https://github.com/ClickHouse/ClickHouse/issues/13281" rel="noreferrer" target="_blank">https://github.com/ClickHouse/ClickHouse/issues/13281</a> )<br>
<br>
On Mon, Sep 14, 2020 at 10:26 AM Lang Hames via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Oh, I almost forgot: The "orcv1-removal-with-remote-tpc" also contains a next step towards breaking Orc up into distinct libraries.<br>
><br>
> Chris Bieneman started this process on the mainline a while back by moving some of the Orc error types into a separate OrcError library (Thanks Chris!). The orcv1-removal-with-remote-tpc branch takes this further.<br>
><br>
> (1) It adds a new OrcTargetProcess library that contains code specific to JIT execution. E.g. runAsMain, in-process eh-frame registration code, and the OrcRPCTPCServer type.<br>
> (2) It renames OrcError to OrcShared. This will be a home for types that are shared between Orc and OrcTargetProcess. It's likely to me mostly headers, but may contain some code snippets.<br>
><br>
> This break-up isn't fully implemented in the branch yet: Orc still depends directly on OrcTargetProcess in places. This is just incomplete work, not by design.<br>
><br>
> Eventually I hope to decouple Orc (and JITLink) from ExecutionEngine entirely. With the removal of OrcV1 this should be much easier: The main changes will be a substitute types for JITTargetAddress and JITEvaluatedSymbol (we can come up with better names for them while we're at it), and moving RTDyldObjectLinkingLayer from ORC to RuntimeDyld.<br>
><br>
> Thoughts on the break-up (and any of the topics from the weekly mail) are very welcome.<br>
><br>
> Finally, correcting the typo above -- the final example should have been:<br>
><br>
> target-machine% llvm-jitlink-executor listen=localhost:20000<br>
> jit-machine% llvm-jitlink -oop-executor-connect localhost:20000 hello-world.o<br>
> hello world!<br>
><br>
> -- Lang.<br>
><br>
> On Sun, Sep 13, 2020 at 11:01 PM Lang Hames <<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>> wrote:<br>
>><br>
>> Hi All,<br>
>><br>
>> Everything is landing all at once, just not in the mainline... yet.<br>
>><br>
>> As discussed in <a href="http://lists.llvm.org/pipermail/llvm-dev/2020-September/144885.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2020-September/144885.html</a>: OrcV1 will be removed very soon. I have posted a branch with the removal, "orcv1-removal", in my llvm fork at <a href="https://github.com/lhames/llvm-project" rel="noreferrer" target="_blank">https://github.com/lhames/llvm-project</a>.<br>
>><br>
>> In addition to removing OrcV1, the orcv1-removal branch also contains a prototype of the removable code feature. I'm going to discuss this at greater length over the next couple of weeks, but if anyone's interested in playing with the prototype I'd recommend starting with the ResourceTracker class in <a href="https://github.com/lhames/llvm-project/commit/de6f6d57d3e955b998f82ab6e610da41fcb09492" rel="noreferrer" target="_blank">https://github.com/lhames/llvm-project/commit/de6f6d57d3e955b998f82ab6e610da41fcb09492</a>.<br>
>><br>
>> Finally, adding removable code unblocked another prototype I've been working on: an OrcRPC based TargetProcessControl implementation. I've added that to the "orcv1-removal-with-remote-tpc" branch at <a href="https://github.com/lhames/llvm-project" rel="noreferrer" target="_blank">https://github.com/lhames/llvm-project</a>. The easiest way to start playing with this feature is via the new llvm-jitlink options: -oop-executor, and -oop-executor-connect. The -oop-executor option will fork and exec the llvm-jitlink-executor program and connect to it via open file descriptors (similar to how lli-child-target works). The -oop-executor-connect option will connect to a listening llvm-jitlink-executor process via TCP, but otherwise behaves the same. E.g.<br>
>><br>
>> % llvm-jitlink -oop-executor hello-world.o<br>
>> hello world!<br>
>><br>
>> target-machine% llvm-jitlink-executor listen=localhost:20000<br>
>> jit-machine% llvm-jitlink -oop-executor-connect localhost:2000 hello-world.o<br>
>> hello world!<br>
>><br>
>> How all this works is left as an exercise for the reader this week. I can start providing explanations in my next update.<br>
>><br>
>> -- Lang.<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
<br>
<br>
-- <br>
宋方睿<br>
</blockquote></div>