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

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 13 23:57:48 PDT 2016


mehdi_amini created this revision.
mehdi_amini added reviewers: tejohnson, davidxl.
mehdi_amini added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

Using the linker-supplied list of "preserved" symbols, we can compute
the list of "dead" symbols, i.e. the one that are not reachable from
a "preserved" symbol transitively on the reference graph.
Right now we are using this information to mark these functions as
non-eligible for import.

The impact is two folds:

- Reduction of compile time: we don't import these functions anywhere
  or import the function these symbols are calling.
- The limited number of import/export leads to better internalization.

https://reviews.llvm.org/D23488

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  include/llvm/Transforms/IPO/FunctionImport.h
  lib/LTO/ThinLTOCodeGenerator.cpp
  lib/Transforms/IPO/FunctionImport.cpp
  test/ThinLTO/X86/Inputs/deadstrip.ll
  test/ThinLTO/X86/deadstrip.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23488.67971.patch
Type: text/x-patch
Size: 13146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160814/288754a9/attachment.bin>


More information about the llvm-commits mailing list