summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/gold
Commit message (Collapse)AuthorAgeFilesLines
...
* [gold] Test that we handle invalid directory correctly.Davide Italiano2016-09-092-0/+9
| | | | | | | | | I had this test sitting around for a while but always forgot to commit. Rafael reviewed it a while ago. Differential Revision: https://reviews.llvm.org/D19207 llvm-svn: 281109
* [gold] Fix test accidentally regressed for newer goldTeresa Johnson2016-08-293-1/+18
| | | | | | | | | | | | With r279911 I accidentally regressed the gold/X86/start-lib-common.ll test for newer golds (v1.12+) that honor the --start-lib/--end-lib. Remove the alignment which should not be there to make this work with both old and new gold linkers. Additionally, now that we have a subdirectory for v1.12+ gold tests, copy this test there and check specifically for the v1.12+ behavior. llvm-svn: 279977
* [LTO] Don't create a new common unless merged has different sizeTeresa Johnson2016-08-272-4/+4
| | | | | | | | | | | | | | | | | Summary: This addresses a regression in common handling from the new LTO API in r278338. Only create a new common if the size is different. The type comparison against an array type fails when the size is different but not an array. GlobalMerge does not handle the array types as well and we lose some global merging opportunities. Reviewers: mehdi_amini Subscribers: junbuml, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23955 llvm-svn: 279911
* [ThinLTO/gold] Add caching support to gold-pluginTeresa Johnson2016-08-242-0/+27
| | | | | | | | | | | | | | Summary: With support now in the new LTO API for caching (r279576), add optional ThinLTO caching in the gold-plugin. Reviewers: mehdi_amini Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23836 llvm-svn: 279631
* Tentatively fix gold-plugin test: ThinLTO objects start at offset 0 now.Mehdi Amini2016-08-241-1/+1
| | | | | | Annoyingly, incremental builds don't detect these kind of issue. llvm-svn: 279612
* [gold/ThinLTO] Restore ThinLTO file management in gold pluginTeresa Johnson2016-08-201-0/+10
| | | | | | | | | | | | | | | | | | Summary: The gold-plugin changes added along with the new LTO API in r278338 had the effect of removing the management of the PluginInputFile that ensured the files weren't released back to gold until the backend threads were complete. Add back the old file handling. Fixes PR29020. Reviewers: mehdi_amini Subscribers: mehdi_amini, llvm-commits, hjl.tools Differential Revision: https://reviews.llvm.org/D23721 llvm-svn: 279356
* [gold] Fix new gold test to specify emulation modeTeresa Johnson2016-08-201-0/+1
| | | | | | Add emulation mode option for new test added in r279023. llvm-svn: 279355
* Fix tests in llvm/test/tools/gold/X86 to satisfy r279014.NAKAMURA Takumi2016-08-197-9/+9
| | | | | | They would unexpectedly pass if test/tools/gold/X86/Output had outputs of previous tests. llvm-svn: 279214
* Fix bot failure due to new testTeresa Johnson2016-08-181-1/+1
| | | | | | | I had updated the output file name but not the corresponding nm based check before submitting as r279023. This should fix the bot failures llvm-svn: 279025
* [ThinLTO] Keep common symbols in ThinLTO modulesTeresa Johnson2016-08-182-0/+51
| | | | | | | | | | | | | | | | | | | | Summary: Skip the merging of common symbols for ThinLTO modules, they will be merged by the final native object link. Trying to merge the symbols and add to a combined module will incorrectly enable the common symbol to be internalized in the ThinLTO module. Additionally, we will not want to create a combined module for ThinLTO distributed builds. This fixes failures in 7 cpu2006 benchmarks from the new LTO API in ThinLTO mode. Reviewers: mehdi_amini Subscribers: pcc, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23637 llvm-svn: 279023
* [LTO] Change addSaveTemps API: do not add dot to the supplied prefix pathMehdi Amini2016-08-181-3/+3
| | | | | | | | | | | | | | | | Summary: It does not play well with directories (end up with a bunch of hidden files). Also, do not strip the 0 suffix for the first task, especially since 0 can be used by ThinLTO as well now. Reviewers: tejohnson Subscribers: mehdi_amini, pcc, llvm-commits Differential Revision: https://reviews.llvm.org/D23612 llvm-svn: 279014
* Restore "Resolution-based LTO API."Teresa Johnson2016-08-1117-97/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores commit r278330, with fixes for a few bot failures: - Fix a late change I had made to the save temps output file that I missed due to existing files sitting on my disk - Fix a bunch of Windows bot failures with "ambiguous call to overloaded function" due to confusion between llvm::make_unique vs std::make_unique (preface the new make_unique calls with "llvm::") - Attempt to fix a modules bot failure by adding a missing include to LTO/Config.h. Original change: Resolution-based LTO API. Summary: This introduces a resolution-based LTO API. The main advantage of this API over existing APIs is that it allows the linker to supply a resolution for each symbol in each object, rather than the combined object as a whole. This will become increasingly important for use cases such as ThinLTO which require us to process symbol resolutions in a more complicated way than just adjusting linkage. Patch by Peter Collingbourne. Reviewers: rafael, tejohnson, mehdi_amini Subscribers: lhames, tejohnson, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D20268 llvm-svn: 278338
* Revert "Resolution-based LTO API."Teresa Johnson2016-08-1117-112/+97
| | | | | | | | | | This reverts commit r278330. I made a change to the save temps output that is causing issues with the bots. Didn't realize this because I had older output files sitting on disk in my test output directory. llvm-svn: 278331
* Resolution-based LTO API.Teresa Johnson2016-08-1117-97/+112
| | | | | | | | | | | | | | | | | | | | | | Summary: This introduces a resolution-based LTO API. The main advantage of this API over existing APIs is that it allows the linker to supply a resolution for each symbol in each object, rather than the combined object as a whole. This will become increasingly important for use cases such as ThinLTO which require us to process symbol resolutions in a more complicated way than just adjusting linkage. Patch by Peter Collingbourne. Reviewers: rafael, tejohnson, mehdi_amini Subscribers: lhames, tejohnson, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D20268 Address review comments llvm-svn: 278330
* Capture stderr when checking for gold versionTeresa Johnson2016-07-291-3/+5
| | | | | | | On MacOS the ld version is emitted to stderr, resulting in lots of messages in the ninja check output. llvm-svn: 277092
* [test/gold] Add gold test subdirectory tests needing v1.12 (or higher)Teresa Johnson2016-07-273-0/+63
| | | | | | | | | | | | | | | | Summary: As discussed in the review for D22677, added a subdirectory to enable tests that require at least version 1.12 of gold. Add an initial test requiring this version. Reviewers: davidxl, mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D22827 llvm-svn: 276860
* [ThinLTO/gold] Remove thin archive part of new test due to bot failuresTeresa Johnson2016-07-221-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | I am getting a bot failure from the thin archive part of this test: From http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/40468/steps/test_llvm/logs/LLVM%20%3A%3A%20tools__gold__X86__thinlto_emit_linked_objects.ll: Command Output (stderr): -- /home/bb/cmake-llvm-x86_64-linux/build/./bin/llvm-ar: creating /home/bb/cmake-llvm-x86_64-linux/build/test/tools/gold/X86/Output/thinlto_emit_linked_objects.ll.tmp2.a /usr/bin/ld.gold: internal error in add_writer, at ../../gold/token.h:124 -- This appears to be an issue with an older version of gold. The test case passes for me locally when I use the gold v1.12 I was testing with, but when I tried the gold installed on my system which is v1.11 I get the same error. Remove the thin archive version of the test, since there isn't a way to predicate it on gold version. llvm-svn: 276453
* [ThinLTO/gold] Support for getting list of included objects from goldTeresa Johnson2016-07-222-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In the distributed backend case, the ThinLink step and the final native object link are separate processes. This can be problematic when archive libraries are involved in the link (e.g. via --start-lib/--end-lib pairs). The linker only includes objects from libraries when there is a strong reference to them, and depending on the intervening ThinLTO backend processes' importing/inlining, the strong references may appear different in the two link steps. See D22356 and D22467 for two scenarios where this causes issues. To ensure that the final link includes the same objects, this patch adds support for an "=filename" form of the thinlto-index-only plugin option, in which case objects gold included in the link are emitted to the given filename. This should be used as input to the final link (e.g. via the @filename option to gold), instead of listing all the objects within --start-lib/--end-lib pairs again. Note that the support for the gold callback that identifies included objects was added in gold version 1.12. Reviewers: davidxl, mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D22677 llvm-svn: 276450
* [ThinLTO/gold] Perform index-based weak/linkonce resolutionTeresa Johnson2016-07-142-0/+124
| | | | | | | | | | | | | | | | | | | | Summary: Invoke the weak/linkonce symbol resolution support (already used by libLTO) that operates via the summary index. This ensures prevailing linkonce are kept, by making them weak, and marks preempted copies as available_externally when possible. With this change, the older support for keeping the prevailing linkonce (by changing their symbol resolution) is removed. Reviewers: mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: http://reviews.llvm.org/D22302 llvm-svn: 275474
* [ThinLTO/gold] Enable symbol resolution in distributed backend caseTeresa Johnson2016-07-131-2/+0
| | | | | | | | | | | | | | | | While testing a follow-on change to enable index-based symbol resolution and internalization in the distributed backends, I realized that a test case change I made in r275247 was only required because we were not analyzing symbols in the claimed files in thinlto-index-only mode. In the fixed test case there should be no internalization because we are linking in -shared mode, so f() is in fact exported, which is detected properly when we analyze symbols in thinlto-index-only mode. Note that this is not (yet) a correctness issue (because we are not yet performing the index-based linkage optimizations in the distributed backends - that's coming in a follow-on patch). llvm-svn: 275277
* [ThinLTO/gold] ThinLTO internalization fixesTeresa Johnson2016-07-132-0/+9
| | | | | | | | | | | Internalization was missing cases where we originally had a local symbol that was promoted eagerly but not actually exported. This is because we were only internalizing the set of global (non-local) symbols that were PREVAILAING_DEF_IRONLY. Instead, collect the set of global symbols that are referenced outside of a single IR file, and skip internalization for those. llvm-svn: 275247
* [gold] Really fix test to run on non x86 platforms.Arnaud A. de Grandmaison2016-06-281-1/+1
| | | | | | Address post-commit comment from H.J. Lu. llvm-svn: 274000
* [gold] Fix test to not assume it runs on x86 hardware.Arnaud A. de Grandmaison2016-06-271-0/+2
| | | | llvm-svn: 273854
* IR: New representation for CFI and virtual call optimization pass metadata.Peter Collingbourne2016-06-241-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitset metadata currently used in LLVM has a few problems: 1. It has the wrong name. The name "bitset" refers to an implementation detail of one use of the metadata (i.e. its original use case, CFI). This makes it harder to understand, as the name makes no sense in the context of virtual call optimization. 2. It is represented using a global named metadata node, rather than being directly associated with a global. This makes it harder to manipulate the metadata when rebuilding global variables, summarise it as part of ThinLTO and drop unused metadata when associated globals are dropped. For this reason, CFI does not currently work correctly when both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable globals, and fails to associate metadata with the rebuilt globals. As I understand it, the same problem could also affect ASan, which rebuilds globals with a red zone. This patch solves both of those problems in the following way: 1. Rename the metadata to "type metadata". This new name reflects how the metadata is currently being used (i.e. to represent type information for CFI and vtable opt). The new name is reflected in the name for the associated intrinsic (llvm.type.test) and pass (LowerTypeTests). 2. Attach metadata directly to the globals that it pertains to, rather than using the "llvm.bitsets" global metadata node as we are doing now. This is done using the newly introduced capability to attach metadata to global variables (r271348 and r271358). See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html Differential Revision: http://reviews.llvm.org/D21053 llvm-svn: 273729
* Add a test for r273022.Rafael Espindola2016-06-181-0/+14
| | | | llvm-svn: 273073
* IR: Introduce local_unnamed_addr attribute.Peter Collingbourne2016-06-142-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a local_unnamed_addr attribute is attached to a global, the address is known to be insignificant within the module. It is distinct from the existing unnamed_addr attribute in that it only describes a local property of the module rather than a global property of the symbol. This attribute is intended to be used by the code generator and LTO to allow the linker to decide whether the global needs to be in the symbol table. It is possible to exclude a global from the symbol table if three things are true: - This attribute is present on every instance of the global (which means that the normal rule that the global must have a unique address can be broken without being observable by the program by performing comparisons against the global's address) - The global has linkonce_odr linkage (which means that each linkage unit must have its own copy of the global if it requires one, and the copy in each linkage unit must be the same) - It is a constant or a function (which means that the program cannot observe that the unique-address rule has been broken by writing to the global) Although this attribute could in principle be computed from the module contents, LTO clients (i.e. linkers) will normally need to be able to compute this property as part of symbol resolution, and it would be inefficient to materialize every module just to compute it. See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html for earlier discussion. Part of the fix for PR27553. Differential Revision: http://reviews.llvm.org/D20348 llvm-svn: 272709
* Add triple to input file.Rafael Espindola2016-06-131-0/+1
| | | | | | Patch by H.J. Lu. llvm-svn: 272563
* [ThinLTO/gold] Enable summary-based internalizationTeresa Johnson2016-06-095-0/+62
| | | | | | | | | | | | Summary: Enable existing summary-based importing support in the gold-plugin. Reviewers: mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: http://reviews.llvm.org/D21080 llvm-svn: 272239
* Linker: teach the IR mover to return llvm::Error.Peter Collingbourne2016-05-272-0/+12
| | | | | | | | | This will be needed in order to consistently return an Error to clients of the API being developed in D20268. Differential Revision: http://reviews.llvm.org/D20550 llvm-svn: 270967
* [ThinLTO/gold] Handle bitcode archivesTeresa Johnson2016-05-263-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several changes were required for ThinLTO links involving bitcode archive static libraries. With this patch clang/llvm bootstraps with ThinLTO and gold. The first is that the gold callbacks get_input_file and release_input_file can normally be used to get file information for each constituent bitcode file within an archive. However, these interfaces lock the underlying file and can't be for each archive constituent for ThinLTO backends where we get all the input files up front and don't release any until after the backend threads complete. However, it is sufficient to only get and release once per file, and then each consituent bitcode file can be accessed via get_view. This required saving some information to identify which file handle is the "leader" for each claimed file sharing the same file descriptor, and other information so that get_input_file isn't necessary later when processing the backends. Second, the module paths in the index need to distinguish between different constituent bitcode files within the same archive file, otherwise they will all end up with the same archive file path. Do this by appending the offset within the archive for the start of the bitcode file, returned by get_input_file when we claim each bitcode file, and saving that along with the file handle. Third, rather than have the function importer try to load a file based on the module path identifier (which now contains a suffix to distinguish different bitcode files within an archive), use a custom module loader. This is the same approach taken in libLTO, and I am using the support refactored into the new LTO.h header in r270509. The module loader parses the bitcode files out of the memory buffers returned from gold via the get_view callback and saved in a map. This also means that we call the function importer directly, rather than add it to the pass pipeline (which was in the plan to do already for other reasons). Reviewers: pcc, joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D20559 llvm-svn: 270814
* [ThinLTO] Use semicolon to separate path prefix replacementReid Kleckner2016-05-171-1/+1
| | | | | | | | | | | | | | | | Summary: Colons can appear in Windows paths after drive letters. Both colon and semicolon are valid characters in filenames, but neither are very common. Semicolon seems just as good, and makes the test pass on Windows. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D20332 llvm-svn: 269798
* [ThinLTO] Option to control path of distributed backend filesTeresa Johnson2016-05-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add support to control where files for a distributed backend (the individual index files and optional imports files) are created. This is invoked with a new thinlto-prefix-replace option in the gold plugin and llvm-lto. If specified, expects a string of the form "oldprefix:newprefix", and instead of generating these files in the same directory path as the corresponding bitcode file, will use a path formed by replacing the bitcode file's path prefix matching oldprefix with newprefix. Also add a new replace_path_prefix helper to Path.h in libSupport. Depends on D19636. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19644 llvm-svn: 269771
* [ThinLTO] Add option to emit imports files for distributed backendsTeresa Johnson2016-05-101-0/+27
| | | | | | | | | | | | | | | | | | | | | Summary: Add support for emission of plaintext lists of the imported files for each distributed backend compilation. Used for distributed build file staging. Invoked with new gold-plugin thinlto-emit-imports-files option, which is only valid with thinlto-index-only (i.e. for distributed builds), or from llvm-lto with new -thinlto-action=emitimports value. Depends on D19556. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19636 llvm-svn: 269067
* Restore "[ThinLTO] Emit individual index files for distributed backends"Teresa Johnson2016-05-101-1/+35
| | | | | | | | | | | | | | | | | | | This restores commit r268627: Summary: When launching ThinLTO backends in a distributed build (currently supported in gold via the thinlto-index-only plugin option), emit an individual index file for each backend process as described here: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html ... Differential Revision: http://reviews.llvm.org/D19556 Address msan failures by avoiding std::prev on map.end(), the theory is that this is causing issues due to some known UB problems in __tree. llvm-svn: 269059
* Revert "[ThinLTO] Emit individual index files for distributed backends"Vitaly Buka2016-05-051-35/+1
| | | | | | | | | MemorySanitizer: use-of-uninitialized-value in lib/Bitcode/Writer/BitcodeWriter.cpp:364:70 http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12544/steps/check-llvm%20msan/logs/stdio This reverts commit 0c4a898ea550699d1b2f4fe3767251c8f9a48d52. llvm-svn: 268660
* [ThinLTO] Emit individual index files for distributed backendsTeresa Johnson2016-05-051-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When launching ThinLTO backends in a distributed build (currently supported in gold via the thinlto-index-only plugin option), emit an individual index file for each backend process as described here: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html The individual index file encodes the summary and module information required for implementing the importing/exporting decisions made for a given module in the thin link step. This is in place of the current mechanism that uses the combined index to make importing decisions in each back end independently. It is an enabler for doing global summary based optimizations in the thin link step (which will be recorded in the individual index files), and reduces the size of the index that must be sent to each backend process, and the amount of work to scan it in the backends. Rather than create entirely new ModuleSummaryIndex structures (and all the included unique_ptrs) for each backend index file, a map is created to record all of the GUID and summary pointers needed for a particular index file. The IndexBitcodeWriter walks this map instead of the full index (hiding the details of managing the appropriate summary iteration in a new iterator subclass). This is more efficient than walking the entire combined index and filtering out just the needed summaries during each backend bitcode index write. Depends on D19481. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19556 llvm-svn: 268627
* Remove size 1 from check as that isn't part of what the test is meant to be ↵Kristof Beyls2016-04-271-1/+1
| | | | | | | | | | | | | testing. This test also runs on e.g. ARM-native builds when the X86 backend is also built. This test produces code for the default instruction set, even though it is in a "X86" sub-directory. Given that this test doesn't seem to be testing anything architecture-specific, it seems it's best to adapt the check to not check for an architecture-dependent value (the size of the function), rather than hard-code the test to target x86. llvm-svn: 267722
* [ThinLTO] Use valueid instead of bitcode offsets in combined index fileTeresa Johnson2016-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With the removal of support for lazy parsing of combined index summary records (e.g. r267344), we no longer need to include the summary record bitcode offset in the VST entries for definitions. Change the combined index format to be similar to the per-module index format in using value ids to cross-reference from the summary record to the VST entry (rather than the summary record bitcode offset to cross-reference in the other direction). The visible changes are: 1) Add the value id to the combined summary records 2) Remove the summary offset from the combined VST records, which has the following effects: - No longer need the VST_CODE_COMBINED_GVDEFENTRY record, as all combined index VST entries now only contain the value id and corresponding GUID. - No longer have duplicate VST entries in the case where there are multiple definitions of a symbol (e.g. weak/linkonce), as they all have the same value id and GUID. An implication of #2 above is that in order to hook up an alias to the correct aliasee based on the value id of the aliasee recorded in the combined index alias record, we need to scan the entries in the index for that GUID to find the one from the same module (i.e. the case where there are multiple entries for the aliasee). But the reader no longer has to maintain a special map to hook up the alias/aliasee. Reviewers: joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19481 llvm-svn: 267712
* [gold] Fix linkInModule and extend common.ll test.Evgeniy Stepanov2016-04-254-9/+29
| | | | | | | | | | Fix early exit from linkInModule. IRMover::move returns false on success and true on error. Add a few more cases of merged common linkage variables with different sizes and alignments. llvm-svn: 267437
* Also check the IR.Rafael Espindola2016-04-241-0/+4
| | | | llvm-svn: 267367
* Add a test for how we handle protected visibility.Rafael Espindola2016-04-242-0/+22
| | | | llvm-svn: 267366
* llvm/test/tools/gold/X86/thinlto.ll: Possible fix corresponding to r267318.NAKAMURA Takumi2016-04-241-0/+1
| | | | llvm-svn: 267334
* [gold] Gate value name discarding under save-tempsTeresa Johnson2016-04-233-10/+6
| | | | | | | | | | | | | | Summary: This removes a couple of flags added to control this behavior, and simply keeps all value names when save-temps is specified. Reviewers: rafael Subscribers: llvm-commits, pcc, davide Differential Revision: http://reviews.llvm.org/D19384 llvm-svn: 267279
* Re-enable "[gold-plugin] Disable name for values other than GlobalValue"Teresa Johnson2016-04-203-0/+38
| | | | | | | | | | This restores r266871 with a fix for gold tests relying on the value names, when using a release compiler, by adding a way to disable the default discarding. Update affected tests to use the new mechanism so that value names are preserved as expected, regardless of how the compiler was built. llvm-svn: 266881
* Revert "[gold-plugin] Disable name for values other than GlobalValue"Teresa Johnson2016-04-201-35/+0
| | | | | | | | This reverts commit r266871. Setting the default based on the NDEBUG flag is causing test failures. Need to figure out whether to change this approach or update tests. llvm-svn: 266872
* [gold-plugin] Disable name for values other than GlobalValueTeresa Johnson2016-04-201-0/+35
| | | | | | | | | | | | | | | Summary: Applies Mehdi's optimization (r263086) to disable value names other than for GlobalValues to LTO/ThinLTO performed via the gold-plugin, in the same manner as it is applied in libLTO. Reviewers: rafael, joker-eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19269 llvm-svn: 266871
* Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as ↵Mehdi Amini2016-04-192-2/+2
| | | | | | | "external_weak") From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266752
* [PR27284] Reverse the ownership between DICompileUnit and DISubprogram.Adrian Prantl2016-04-152-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently each Function points to a DISubprogram and DISubprogram has a scope field. For member functions the scope is a DICompositeType. DIScopes point to the DICompileUnit to facilitate type uniquing. Distinct DISubprograms (with isDefinition: true) are not part of the type hierarchy and cannot be uniqued. This change removes the subprograms list from DICompileUnit and instead adds a pointer to the owning compile unit to distinct DISubprograms. This would make it easy for ThinLTO to strip unneeded DISubprograms and their transitively referenced debug info. Motivation ---------- Materializing DISubprograms is currently the most expensive operation when doing a ThinLTO build of clang. We want the DISubprogram to be stored in a separate Bitcode block (or the same block as the function body) so we can avoid having to expensively deserialize all DISubprograms together with the global metadata. If a function has been inlined into another subprogram we need to store a reference the block containing the inlined subprogram. Attached to https://llvm.org/bugs/show_bug.cgi?id=27284 is a python script that updates LLVM IR testcases to the new format. http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266446
* Move summary creation out of llvm-as into optMehdi Amini2016-04-123-5/+5
| | | | | | | | | | | | | | | | | | Summary: Let keep llvm-as "dumb": it converts textual IR to bitcode. This commit removes the dependency from llvm-as to libLLVMAnalysis. We'll add back summary in llvm-as if we get to a textual representation for it at some point. In the meantime, opt seems like a better place for that. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19032 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266131
* [gold] Save bitcode for module partitions (save-temps + split codegen).Evgeniy Stepanov2016-04-061-0/+6
| | | | llvm-svn: 265583
OpenPOWER on IntegriCloud