[PATCH] D26467: [ThinLTO] Only promote exported locals as marked in index

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 08:57:44 PST 2016


mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: lib/Transforms/Utils/FunctionImportUtils.cpp:80
+    // it must be promoted, so unconditionally promote all values in the
+    // importing module.
+    return true;
----------------
tejohnson wrote:
> mehdi_amini wrote:
> > why can't we just promote what is needed?
> See the comment just above this - when we are importing we may not have a summary in the distributed backend case (we only get the summaries for things we want to import as defs, not all references in the module). At the worst, though, we will simply promote some values that are never referenced after import, so it won't affect the resulting module. 
> See the comment just above this - when we are importing we may not have a summary in the distributed backend case (we only get the summaries for things we want to import as defs, not all references in the module).

That's annoying.

> At the worst, though, we will simply promote some values that are never referenced after import, so it won't affect the resulting module.

Sure, but I'm still not fan: it means we can't catch error at this stage.


https://reviews.llvm.org/D26467





More information about the llvm-commits mailing list