[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds
Teresa Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 11:24:02 PDT 2018
tejohnson created this revision.
tejohnson added a reviewer: pcc.
Herald added subscribers: eraman, inglorion, mehdi_amini.
The clang driver option -save-temps was not passed to the LTO config,
so when invoking the ThinLTO backends via clang during distributed
builds there was no way to get LTO to save temp files.
Getting this to work with ThinLTO distributed builds also required
changing the driver to avoid a separate compile step to emit unoptimized
bitcode when the input was already bitcode under -save-temps. Not only is
this unnecessary in general, it is problematic for ThinLTO backends since
the temporary bitcode file to the backend would not match the module path
in the combined index, leading to incorrect ThinLTO backend index-based
optimizations.
Repository:
rC Clang
https://reviews.llvm.org/D45217
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen/BackendUtil.cpp
lib/Driver/Driver.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/thinlto_backend.ll
test/Driver/thinlto_backend.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45217.140832.patch
Type: text/x-patch
Size: 8540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180403/2bb4db2b/attachment.bin>
More information about the cfe-commits
mailing list