Skip to content

Commit

Permalink
Expand comment to justify not checking if all the exports are green.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Apr 20, 2020
1 parent 1abfd4a commit 19e5a65
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/librustc_codegen_llvm/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,23 @@ fn thin_lto(
// (Note that globally, the export set is just the inverse of the
// import set.)
//
// For further justification of why the above is necessary and sufficient,
// see the LLVM blog post on ThinLTO:
//
// http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html
//
// which states the following:
//
// ```quote
// any particular ThinLTO backend must be redone iff:
//
// 1. The corresponding (primary) module’s bitcode changed
// 2. The list of imports into or exports from the module changed
// 3. The bitcode for any module being imported from has changed
// 4. Any global analysis result affecting either the primary module
// or anything it imports has changed.
// ```
//
// This strategy means we can always save the computed imports as
// canon: when we reuse the post-ThinLTO version, condition (3.)
// ensures that the current import set is the same as the previous
Expand Down

0 comments on commit 19e5a65

Please sign in to comment.