Misc enhancements to LTO:
authorShuxin Yang <shuxin.llvm@gmail.com>
Mon, 12 Aug 2013 18:29:43 +0000 (18:29 +0000)
committerShuxin Yang <shuxin.llvm@gmail.com>
Mon, 12 Aug 2013 18:29:43 +0000 (18:29 +0000)
commit67d135ae40b121a138e334a175d0e02dbb54eeca
tree8e7ef892ab3d66802b5f53af56ba6a36a5911742
parent353476cbbb80881a754a90abc13851a884a4e26c
Misc enhancements to LTO:

  1. Add some helper classes for partitions. They are designed in a
     way such that the top-level LTO driver will not see much difference
     with or without partitioning.

  2. Introduce work-dir. Now all intermediate files generated during
     LTO phases will be saved under work-dir. User can specify the workdir
     via -lto-workdir=/path/to/dir. By default the work-dir will be
     erased before linker exit. To keep the workdir, do -lto-keep, or -lto-keep=1.

    TODO: Erase the workdir, if the linker exit prematurely.
      We are currently not able to remove directory on signal. The support
      routines simply ignore directory.

  3. Add one new API lto_codegen_get_files_need_remove().
     Linker and LTO plugin will communicate via this API about which files
    (including directories) need to removed before linker exit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188188 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm-c/lto.h
tools/gold/gold-plugin.cpp
tools/lto/CMakeLists.txt
tools/lto/LTOCodeGenerator.cpp
tools/lto/LTOCodeGenerator.h
tools/lto/LTOPartition.cpp [new file with mode: 0644]
tools/lto/LTOPartition.h [new file with mode: 0644]
tools/lto/LTOPostIPODriver.cpp [new file with mode: 0644]
tools/lto/LTOPostIPODriver.h [new file with mode: 0644]
tools/lto/lto.cpp
tools/lto/lto.exports