summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/IRMover.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ThinLTO] Rename variables used in metadata linking (NFC)Teresa Johnson2015-12-301-2/+4
| | | | | | | | As suggested in review for r255909, rename MDMaterialized to AllowTemps, and identify the name of the boolean flag being set in calls to saveMetadataList. llvm-svn: 256653
* Ensure MDNode used as key in metadata linking map cannot be RAUWedTeresa Johnson2015-12-301-0/+17
| | | | | | | | | | | | As suggested in review for r255909, add a way to ensure that temporary MD used as keys in the MetadataToID map during ThinLTO importing are not RAUWed. Add support for marking an MDNode as not replaceable. Clear the new CanReplace flag when adding a temporary MD node to the MetadataToID map and clear it when destroying the map. llvm-svn: 256648
* Rename MDValue* to Metadata* (NFC)Teresa Johnson2015-12-291-10/+10
| | | | | | | Renamed MDValue* to Metadata*, and MDValueToValIDMap to MetadataToIDs, as per review for r255909. llvm-svn: 256593
* Handle empty Subprogram list when linking metadata.Teresa Johnson2015-12-221-1/+1
| | | | | | | | Use an iterator that handles an empty subprogram list. Fixes PR25915. llvm-svn: 256224
* Drop support for dematerializing.Rafael Espindola2015-12-181-1/+0
| | | | | | | It was only used on lib/Linker and the use was "dead" since it was used on a function the IRMover had just moved. llvm-svn: 256019
* Rename variables to reflect linker split (NFC)Teresa Johnson2015-12-181-18/+18
| | | | | | | | Renamed variables to be more reflective of whether they are an instance of Linker, IRLinker or ModuleLinker. Also fix a stale comment. llvm-svn: 256011
* [ThinLTO/LTO] Don't link in unneeded metadataTeresa Johnson2015-12-181-0/+107
| | | | | | | | | | | | | | | | | | | | Summary: Third patch split out from http://reviews.llvm.org/D14752. Only map in needed DISubroutine metadata (imported or otherwise linked in functions and other DISubroutine referenced by inlined instructions). This is supported for ThinLTO, LTO and llvm-link --only-needed, with associated tests for each one. Depends on D14838. Reviewers: dexonsmith, joker.eph Subscribers: davidxl, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D14843 llvm-svn: 256003
* [ThinLTO] Metadata linking for imported functionsTeresa Johnson2015-12-171-26/+184
| | | | | | | | | | | | | | | | | | | | | | | Summary: Second patch split out from http://reviews.llvm.org/D14752. Maps metadata as a post-pass from each module when importing complete, suturing up final metadata to the temporary metadata left on the imported instructions. This entails saving the mapping from bitcode value id to temporary metadata in the importing pass, and from bitcode value id to final metadata during the metadata linking postpass. Depends on D14825. Reviewers: dexonsmith, joker.eph Subscribers: davidxl, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D14838 llvm-svn: 255909
* Use diagnostic handler in the LLVMContextRafael Espindola2015-12-141-11/+6
| | | | | | | | | | | | | | | | This patch converts code that has access to a LLVMContext to not take a diagnostic handler. This has a few advantages * It is easier to use a consistent diagnostic handler in a single program. * Less clutter since we are not passing a handler around. It does make it a bit awkward to implement some C APIs that return a diagnostic string. I will propose new versions of these APIs and deprecate the current ones. llvm-svn: 255571
* Fix another case where the linkage was not set.Rafael Espindola2015-12-101-1/+1
| | | | llvm-svn: 255272
* Slit lib/Linker in two.Rafael Espindola2015-12-101-0/+1398
A linker normally has two stages: symbol resolution and "moving stuff". In lib/Linker there is the complication of lazy linking some globals, but it was still far more mixed than it needed to. This splits the linker into a lower level IRMover and the linker proper. The IRMover just takes a list of globals to move and a callback that lets the user control what is lazy linked. The main motivation is that now tools/gold (and soon lld) can use their own symbol resolution to instruct IRMover what to do. llvm-svn: 255254
OpenPOWER on IntegriCloud