[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-02-02 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 132701. vitalybuka added a comment. skip full LTO objects https://reviews.llvm.org/D42680 Files: clang/include/clang/CodeGen/BackendUtil.h clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CodeGenAction.cpp clang/test/CodeGen/thinlto_backend.ll

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D42680#991938, @pcc wrote: > This doesn't seem right to me. In a mixed full/thin LTO link the full LTO > module would be compiled during the indexing phase. We don't want to compile > it again in the backend as it could lead at best to dupl

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. This doesn't seem right to me. In a mixed full/thin LTO link the full LTO module would be compiled during the indexing phase. We don't want to compile it again in the backend as it could l

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM (minor comment fix in test needed) Comment at: clang/test/CodeGen/thinlto_backend.ll:23 +; Ensure we don't fail with index and non-ThinLTO object file, and run

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: pcc, tejohnson. Herald added subscribers: eraman, inglorion, mehdi_amini. Sometimes -flto=thin can produce regular LTO object files. Then backend may receive them with -fthinlto-index= flag. Previous behavior was to report error in this