[PATCH] D72486: Add ThinLtoJIT example

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 19 12:12:40 PST 2020


sgraenitz marked 2 inline comments as done.
sgraenitz added a comment.

If you want to build this patch, please apply D72301 <https://reviews.llvm.org/D72301> before. I will try and make it work without it soon.



================
Comment at: llvm/examples/ThinLtoJIT/ThinLtoJIT.cpp:258
+          CompileThreads->async([MU, &JD]() { MU->doMaterialize(JD); });
+        }
+      });
----------------
@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?



================
Comment at: llvm/examples/ThinLtoJIT/ThinLtoModuleIndex.cpp:54
+  if (VI.getSummaryList().size() > 1) {
+    LLVM_DEBUG(dbgs() << "SummaryList with multiple entries!\n");
+  }
----------------
@tejohnson In which cases does the summary list for a global value have more than 1 entry? Is it reasonable to always refer to the first one (while this is a work in progress)? I am currently limited to sources in C and never see it happen.


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