summaryrefslogtreecommitdiff
path: root/lib/LTO
AgeCommit message (Collapse)Author
2017-12-28[LTO] Simplify code. No functionality change intended.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321531 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-28Avoid int to string conversion in Twine or raw_ostream contexts.Benjamin Kramer
Some output changes from uppercase hex to lowercase hex, no other functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321526 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18Fix more inconsistent line endings. NFC.Dimitry Andric
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-16[LTO] Make processing of combined module more consistentVitaly Buka
Summary: 1. Use stream 0 only for combined module. Previously if combined module was not processes ThinLTO used the stream for own output. However small changes in input, could trigger combined module and shuffle outputs making life of llvm::LTO harder. 2. Always process combined module and write output to stream 0. Processing empty combined module is cheap and allows llvm::LTO users to avoid implementing processing which is already done in llvm::LTO. Subscribers: mehdi_amini, inglorion, eraman, hiraditya Differential Revision: https://reviews.llvm.org/D41267 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-15[ThinLTO] Disallow multiple prevailing defsEugene Leviant
https://reviews.llvm.org/D41291 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320825 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-15[LLVMgold] Don't set undefined symbol as prevailingEugene Leviant
Differential revision: https://reviews.llvm.org/D41113 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320794 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13Remove redundant includes from lib/LTO.Michael Zolotukhin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320623 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17Fix a bunch more layering of CodeGen headers that are in TargetDavid Blaikie
All these headers already depend on CodeGen headers so moving them into CodeGen fixes the layering (since CodeGen depends on Target, not the other way around). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16LTO: clarify why we need to gracefully handle sys::fs::rename failuresBob Haarman
Reviewers: pcc, rafael Reviewed By: pcc Subscribers: mehdi_amini, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D40094 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318362 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-15Use TempFile in lto caching.Rafael Espindola
This requires a small change to TempFile: allowing a discard after a failed keep. With this the cache now handles signals and reuses a fd instead of reopening the file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318322 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10LTO: don't fatal when value for cache key already existsBob Haarman
Summary: LTO/Caching.cpp uses file rename to atomically set the value for a cache key. On Windows, this fails when the destination file already exists. Previously, LLVM would report_fatal_error in such cases. However, because the old and the new value for the cache key are supposed to be equivalent, it actually doesn't matter which one we keep. This change makes it so that failing the rename when an openable file with the desired name already exists causes us to report success instead of fataling. Reviewers: pcc, hans Subscribers: mehdi_amini, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39874 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317899 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-04[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.Sean Fertile
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local. Originally commited as r317374, but reverted in r317395 to update some missed tests. Differential Revision: https://reviews.llvm.org/D35702 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317408 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-04Revert "[LTO][ThinLTO] Use the linker resolutions to mark global values ..."Sean Fertile
Changes more tests then expected on one of the build bots. reverting to investigate. This reverts https://llvm.org/svn/llvm-project/llvm/trunk@317374 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317395 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.Sean Fertile
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local. Differential Revision: https://reviews.llvm.org/D35702 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03Add llvm::for_each as a range-based extensions to <algorithm> and make use ↵Aaron Ballman
of it in some cases where it is a more clear alternative to std::for_each. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01LTO: Apply global DCE to ThinLTO modules at LTO opt level 0.Peter Collingbourne
This is necessary because DCE is applied to full LTO modules. Without this change, a reference from a dead ThinLTO global to a dead full LTO global will result in an undefined reference at link time. This problem is only observable when --gc-sections is disabled, or when targeting COFF, as the COFF port of lld requires all symbols to have a definition even if all references are dead (this is consistent with link.exe). This change also adds an EliminateAvailableExternally pass at -O0. This is necessary to handle the situation on Windows where a non-prevailing copy of a linkonce_odr function has an SEH filter function; any such filters must be DCE'd because they will contain a call to the llvm.localrecover intrinsic, passing as an argument the address of the function that the filter belongs to, and llvm.localrecover requires this function to be defined locally. Fixes PR35142. Differential Revision: https://reviews.llvm.org/D39484 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31LTOModule::isBitcodeFile() shouldn't assert when returning false.Nico Weber
Fixes a bunch of assert-on-invalid-bitcode regressions after 315483. Expected<> calls assertIsChecked() in its dtor, and operator bool() only calls setChecked() if there's no error. So for functions that don't return an error itself, the Expected<> version needs explicit code to disarm the error that the ErrorOr<> code didn't need. https://reviews.llvm.org/D39437 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317010 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-28[SimplifyCFG] use pass options and remove the latesimplifycfg passSanjay Patel
This is no-functional-change-intended. This is repackaging the functionality of D30333 (defer switch-to-lookup-tables) and D35411 (defer folding unconditional branches) with pass parameters rather than a named "latesimplifycfg" pass. Now that we have individual options to control the functionality, we could decouple when these fire (but that's an independent patch if desired). The next planned step would be to add another option bit to disable the sinking transform mentioned in D38566. This should also make it clear that the new pass manager needs to be updated to limit simplifycfg in the same way as the old pass manager. Differential Revision: https://reviews.llvm.org/D38631 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316835 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24[raw_fd_ostream] report actual error in error messagesBob Haarman
Summary: Previously, we would emit error messages like "IO failure on output stream". This change causes use to include information about what actually went wrong, e.g. "No space left on device". Reviewers: sunfish, rnk Reviewed By: rnk Subscribers: mehdi_amini, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39203 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316404 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11Convert the last uses of ErrorOr in include/llvm/Object.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315483 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03LTO: Improve error reporting when adding a cache entry.Peter Collingbourne
Move error handling code next to the code that returns the error, and change the error message in order to distinguish it from a similar error message elsewhere in this file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314745 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-02Move the stripping of invalid debug info from the Verifier to AutoUpgrade.Adrian Prantl
This came out of a recent discussion on llvm-dev (https://reviews.llvm.org/D38042). Currently the Verifier will strip the debug info metadata from a module if it finds the dbeug info to be malformed. This feature is very valuable since it allows us to improve the Verifier by making it stricter without breaking bcompatibility, but arguable the Verifier pass should not be modifying the IR. This patch moves the stripping of broken debug info into AutoUpgrade (UpgradeDebugInfo to be precise), which is a much better location for this since the stripping of malformed (i.e., produced by older, buggy versions of Clang) is a (harsh) form of AutoUpgrade. This change is mostly NFC in nature, the one big difference is the behavior when LLVM module passes are introducing malformed debug info. Prior to this patch, a NoAsserts build would have printed a warning and stripped the debug info, after this patch the Verifier will report a fatal error. I believe this behavior is actually more desirable anyway. Differential Revision: https://reviews.llvm.org/D38184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314699 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-23[Support] Rename tool_output_file to ToolOutputFile, NFCReid Kleckner
This class isn't similar to anything from the STL, so it shouldn't use the STL naming conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17Revert "[ThinLTO] Avoid archive member collisions with old API"Johan Engelen
This reverts commit r313488, because it breaks compilation on Android and breaks llvm-lto. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313489 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17[ThinLTO] Avoid archive member collisions with old APIJohan Engelen
Summary: ld64 on OSX uses the old ThinLTOCodegenerator API. When two modules have the same name in an archive (valid archive), a name collision happens for the modules' buffer identifiers. This PR resolves this, by suffixing the module name with an increasing number such that the identifiers are guaranteed to be unique. For a similar fix in LLD, see https://reviews.llvm.org/D25495 Reviewers: mehdi_amini, tejohnson Reviewed By: mehdi_amini Subscribers: inglorion, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D37961 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313488 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352 Vivek Pandya
It enables OptimizationRemarkEmitter::allowExtraAnalysis and MachineOptimizationRemarkEmitter::allowExtraAnalysis to return true not only for -fsave-optimization-record but when specific remarks are requested with command line options. The diagnostic handler used to be callback now this patch adds a class DiagnosticHandler. It has virtual method to provide custom diagnostic handler and methods to control which particular remarks are enabled. However LLVM-C API users can still provide callback function for diagnostic handler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313390 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15This reverts r313381Vivek Pandya
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352 Vivek Pandya
It enables OptimizationRemarkEmitter::allowExtraAnalysis and MachineOptimizationRemarkEmitter::allowExtraAnalysis to return true not only for -fsave-optimization-record but when specific remarks are requested with command line options. The diagnostic handler used to be callback now this patch adds a class DiagnosticHandler. It has virtual method to provide custom diagnostic handler and methods to control which particular remarks are enabled. However LLVM-C API users can still provide callback function for diagnostic handler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313382 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11LowerTypeTests: Add import/export support for targets without absolute ↵Peter Collingbourne
symbol constants. The rationale is the same as for r312967. Differential Revision: https://reviews.llvm.org/D37408 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312968 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11WholeProgramDevirt: Add import/export support for targets without absolute ↵Peter Collingbourne
symbol constants. Not all targets support the use of absolute symbols to export constants. In particular, ARM has a wide variety of constant encodings that cannot currently be relocated by linkers. So instead of exporting the constants using symbols, export them directly in the summary. The values of the constants are left as zeroes on targets that support symbolic exports. This may result in more cache misses when targeting those architectures as a result of arbitrary changes in constant values, but this seems somewhat unavoidable for now. Differential Revision: https://reviews.llvm.org/D37407 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312967 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-07LTO: Remove unnecessary Windows support code.Peter Collingbourne
I empirically verified that open files can in fact be renamed on Windows with sys::fs::rename, so remove the incorrect code and comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312683 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05LTO: Try to open cache files before renaming them.Peter Collingbourne
It appears that a potential race between the cache client and the cache pruner that I thought was unlikely actually happened in practice [1]. Try to avoid the race condition by opening the temporary file before renaming it. Do this only on non-Windows platforms because we cannot rename open files on Windows using the sys::fs::rename function. [1] https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.memory%2FLinux_CFI%2F1610%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout Differential Revision: https://reviews.llvm.org/D37410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312567 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-09Fix thinlto cache key computation for cfi-icall.Evgeniy Stepanov
Summary: Fixed PR33966. CFI code generation for users (not just callers) of a function depends on whether this function has a jumptable entry or not. This information needs to be encoded in of thinlto cache key. We filter the jumptable list against functions that are actually referenced in the current module. Subscribers: mehdi_amini, inglorion, eraman, hiraditya Differential Revision: https://reviews.llvm.org/D36346 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310536 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-03Delete Default and JITDefault code modelsRafael Espindola
IMHO it is an antipattern to have a enum value that is Default. At any given piece of code it is not clear if we have to handle Default or if has already been mapped to a concrete value. In this case in particular, only the target can do the mapping and it is nice to make sure it is always done. This deletes the two default enum values of CodeModel and uses an explicit Optional<CodeModel> when it is possible that it is unspecified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309911 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02Fix the bug that parseAAPipeline is not invoked in runNewPMPasses in release ↵Dehao Chen
compiler. Summary: The logic is guarded by "assert". Reviewers: davidxl, davide, chandlerc Reviewed By: davide, chandlerc Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36195 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309787 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02Update the new PM pipeline to make ICP aware if it is SamplePGO build.Dehao Chen
Summary: In ThinLTO backend compile, OPTOptions are not set so that the ICP in ThinLTO backend does not know if it is a SamplePGO build, in which profile count needs to be annotated directly on call instructions. This patch cleaned up the PGOOptions handling logic and passes down PGOOptions to ThinLTO backend. Reviewers: chandlerc, tejohnson, davidxl Reviewed By: chandlerc Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36052 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309780 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19LTO: Export functions referenced by the CFI jump table.Peter Collingbourne
If the LowerTypeTests pass decides to add a function to a jump table for CFI, it will add its name to the set cfiFunctionDefs, which among other things will cause the function to be renamed in the ThinLTO backend. One other thing that we must do with such functions is to not internalize them, because the jump table in the full LTO object will contain a reference to the actual function body in the ThinLTO object. This patch handles that by ensuring that we export any functions whose names appear in the cfiFunctionDefs set. Fixes PR33831. Differential Revision: https://reviews.llvm.org/D35605 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308504 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-10Use DenseMap instead std::map for GVSummaryMapTy.Dehao Chen
Summary: This speeds-up thin-link by ~47% for large programs. Reviewers: tejohnson Reviewed By: tejohnson Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D35148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307578 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06[LTO] Fix the interaction between linker redefined symbols and ThinLTODavide Italiano
This is the same as r304719 but for ThinLTO. The substantial difference is that in this case we don't have whole visibility, just the summary. In the LTO case, when we got the resolution for the input file we could just see if the linker told us whether a symbol was linker redefined (using --wrap or --defsym) and switch the linkage directly for the GV. Here, we have the summary. So, we record that the linkage changed from <whatever it was> to $weakany to prevent IPOs across this symbol boundaries and actually just switch the linkage at FunctionImport time. This patch should also fixes the lld bits (as all the scaffolding for communicating if a symbol is linker redefined should be there & should be the same), but I'll make sure to add some tests there as well. Fixes PR33192. Differential Revision: https://reviews.llvm.org/D35064 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307303 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30[ORE] Unify spelling as "diagnostics hotness"Brian Gesiak
Summary: To enable profile hotness information in diagnostics output, Clang takes the option `-fdiagnostics-show-hotness` -- that's "diagnostics", with an "s" at the end. Clang also defines `CodeGenOptions::DiagnosticsWithHotness`. LLVM, on the other hand, defines `LLVMContext::getDiagnosticHotnessRequested` -- that's "diagnostic", not "diagnostics". It's a small difference, but it's confusing, typo-inducing, and frustrating. Add a new method with the spelling "diagnostics", and "deprecate" the old spelling. Reviewers: anemet, davidxl Reviewed By: anemet Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D34864 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30[LTO] Remove values from non-prevailing comdatsTeresa Johnson
Summary: When linking a regular LTO module, if it has any non-prevailing values (dropped to available_externally) in comdats, we need to do more than just remove those values from their comdat. We also remove all values from that comdat, so as to avoid leaving an incomplete comdat. This is necessary in case we are compiling in mixed regular and ThinLTO mode, since the resulting regularLTO native object is always linked into the final binary first. We need to prevent the linker from selecting an incomplete comdat that was not the prevailing copy. Fixes PR32980. Reviewers: pcc, rafael Subscribers: mehdi_amini, david2050, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D34803 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-22[ThinLTO] Remove unnecessary include of Linker.h (NFC)Teresa Johnson
The ModuleLinker is no longer used by ThinLTO, so this is not needed. Patch by Benoit Belley <Benoit.Belley@autodesk.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306028 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15Silence warning with assertions disabled.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305485 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15Apply summary-based dead stripping to regular LTO modules with summaries.Peter Collingbourne
If a regular LTO module has a summary index, then instead of linking it into the combined regular LTO module right away, add it to the combined summary index and associate it with a special module that represents the combined regular LTO module. Any such modules are linked during LTO::run(), at which time we use the results of summary-based dead stripping to control whether to link prevailing symbols. Differential Revision: https://reviews.llvm.org/D33922 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305482 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-12IR: Replace the "Linker Options" module flag with "llvm.linker.options" ↵Peter Collingbourne
named metadata. The new metadata is easier to manipulate than module flags. Differential Revision: https://reviews.llvm.org/D31349 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-08Object: Factor out the code for creating the irsymtab for an arbitrary ↵Peter Collingbourne
bitcode file. This code now lives in lib/Object. The idea is that it can now be reused by IRObjectFile among other things. Differential Revision: https://reviews.llvm.org/D31921 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304958 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06Sort the remaining #include lines in include/... and lib/....Chandler Carruth
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304787 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05Symbols re-defined with -wrap and -defsym need to be excluded from inter-Dmitry Mikulin
procedural optimizations to prevent dropping symbols and allow the linker to process re-directs. PR33145: --wrap doesn't work with lto. Differential Revision: https://reviews.llvm.org/D33621 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304719 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02Move summary dead stripping before regular LTO.Evgeniy Stepanov
This way dead stripping results are recorded in combined summary and can be used in regular LTO passes. Differential Revision: https://reviews.llvm.org/D33615 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304577 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01[ThinLTO] Move -lto-use-new-pm to llvm-lto2, and change it to -use-new-pm.Tim Shen
Summary: As we teach Clang to use ThinkLTO + new PM, it's good for the users to inject through Config, instead of setting a flag in the LTOBackend library. Move the flag to llvm-lto2. As it moves to llvm-lto2, a new name -use-new-pm seems simpler and as clear. Reviewers: davide, tejohnson Subscribers: mehdi_amini, Prazek, inglorion, eraman, chandlerc, llvm-commits Differential Revision: https://reviews.llvm.org/D33799 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304492 91177308-0d34-0410-b5e6-96231b3b80d8