[PATCH] D14914: Add a FunctionImporter helper to perform summary-based cross-module function importing

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 21:18:44 PST 2015


joker.eph added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:51
@@ +50,3 @@
+  auto &Module = ModuleMap[FileName];
+  if (!Module)
+    Module = loadFile(FileName, Context);
----------------
tejohnson wrote:
> Sorry, is Y the module we are importing from or to in your example? If we are importing into it, we only load it once. If we are importing foo() and bar() from it, then yes, without caching the modules in between imports Y needs to be loaded twice, but only one function is parsed/materialized on each load. It is a time vs memory tradeoff that we'll have to evaluate.
> 
> Let me know if I didn't understand your scenario though.
I think we're on the same page here :)


http://reviews.llvm.org/D14914





More information about the llvm-commits mailing list