File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/librustc_codegen_llvm/back Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,23 @@ fn thin_lto(
509509 // (Note that globally, the export set is just the inverse of the
510510 // import set.)
511511 //
512+ // For further justification of why the above is necessary and sufficient,
513+ // see the LLVM blog post on ThinLTO:
514+ //
515+ // http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html
516+ //
517+ // which states the following:
518+ //
519+ // ```quote
520+ // any particular ThinLTO backend must be redone iff:
521+ //
522+ // 1. The corresponding (primary) module’s bitcode changed
523+ // 2. The list of imports into or exports from the module changed
524+ // 3. The bitcode for any module being imported from has changed
525+ // 4. Any global analysis result affecting either the primary module
526+ // or anything it imports has changed.
527+ // ```
528+ //
512529 // This strategy means we can always save the computed imports as
513530 // canon: when we reuse the post-ThinLTO version, condition (3.)
514531 // ensures that the current import set is the same as the previous
You can’t perform that action at this time.
0 commit comments