[PATCH] D72486: Add ThinLtoJIT example
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 20:42:45 PST 2020
lhames added a comment.
I need to check this out and play around with it a bit to wrap my head around it, especially the performance tuning issues. This is very exciting though!
Heads up: I probably broke this with ce2207abaf9 <https://reviews.llvm.org/rGce2207abaf9a925b35f15ef92aaff6b301ba6d22>, but you just need to switch to using std::make_unique to construct the IRCompiler (see e.g. fixes in 98e55477558 <https://reviews.llvm.org/rG98e55477558a823b1045b54d5a09681a3c0b819a>).
================
Comment at: llvm/examples/ThinLtoJIT/ThinLtoJIT.cpp:258
+ CompileThreads->async([MU, &JD]() { MU->doMaterialize(JD); });
+ }
+ });
----------------
sgraenitz wrote:
> @lhames: It looks like the session lock is a major bottleneck and not dispatching "trivial" modules to threads seems to help reducing the pressure. Do you think that's reasonable?
>
> Are MaterializationUnit types meant to be distinguishable by type? Would it benefit from `isa<>`/`cast<>` support?
>
Yes! I ran in to the same problem when developing our demo for the 2018 developer’s meeting.
I posted https://reviews.llvm.org/D39111 as a solution to distinguishing MUs by type, but haven’t had time to land it yet. Maybe it’s time to start making some noise on that review again.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72486/new/
https://reviews.llvm.org/D72486
More information about the llvm-commits
mailing list