[PATCH] D23488: ThinLTO: add early "dead-stripping" on the Index

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 11:29:48 PST 2016


mehdi_amini added inline comments.


================
Comment at: lib/LTO/LTO.cpp:341
+  GlobalRes.VisibleToRegularLTOPartition |=
+      (Partition == GlobalResolution::RegularLTO);
 }
----------------
tejohnson wrote:
> mehdi_amini wrote:
> > It is not clear to me how the `VisibleToRegularLTOPartition` is computed here, it seems that for partition to be 0 (RegularLTO) the symbol has to be used or defined in LTO but not used or defined in ThinLTO?
> This will be called for each partition it is referenced from. Partition 0 is always regular LTO, ThinLTO modules are partitions 1 and higher. So if this is ever called for Partition 0 then we have a reference in regular LTO. See the callsites in add*LTO
I misread the assignment as `=` instead of `|=`.


https://reviews.llvm.org/D23488





More information about the llvm-commits mailing list