summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objdump] Allow --disassemble-functions to take demangled namesYuanfang Chen2019-06-221-9/+10
| | | | | | | | | | | | | The --disassemble-functions switch takes demangled names when --demangle is specified, otherwise the switch takes mangled names. https://bugs.llvm.org/show_bug.cgi?id=41908 Reviewers: jhenderson, grimar, MaskRay, rupprecht Differential Revision: https://reviews.llvm.org/D63524 llvm-svn: 364121
* [llvm-objdump] Move --start-address >= --stop-address check out of theYuanfang Chen2019-06-221-3/+3
| | | | | | | | | | | | | | | | | | | | -d code. Summary: Move it into `main` function so the checking is effective for all actions user may do with llvm-objdump; notably, -r and -s in addition to existing -d. Match GNU behavior. Reviewers: jhenderson, grimar, MaskRay, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63631 llvm-svn: 364118
* [llvm-lipo] Implement -thinShoaib Meenai2019-06-212-4/+85
| | | | | | | | | | Creates thin output file of specified arch_type from the fat input file. Patch by Anusha Basana <anushabasana@fb.com> Differential Revision: https://reviews.llvm.org/D63341 llvm-svn: 364107
* [MCA][Bottleneck Analysis] Teach how to compute a critical sequence of ↵Andrea Di Biagio2019-06-212-39/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instructions based on the simulation. This patch teaches the bottleneck analysis how to identify and print the most expensive sequence of instructions according to the simulation. Fixes PR37494. The goal is to help users identify the sequence of instruction which is most critical for performance. A dependency graph is internally used by the bottleneck analysis to describe data dependencies and processor resource interferences between instructions. There is one node in the graph for every instruction in the input assembly sequence. The number of nodes in the graph is independent from the number of iterations simulated by the tool. It means that a single node of the graph represents all the possible instances of a same instruction contributed by the simulated iterations. Edges are dynamically "discovered" by the bottleneck analysis by observing instruction state transitions and "backend pressure increase" events generated by the Execute stage. Information from the events is used to identify critical dependencies, and materialize edges in the graph. A dependency edge is uniquely identified by a pair of node identifiers plus an instance of struct DependencyEdge::Dependency (which provides more details about the actual dependency kind). The bottleneck analysis internally ranks dependency edges based on their impact on the runtime (see field DependencyEdge::Dependency::Cost). To this end, each edge of the graph has an associated cost. By default, the cost of an edge is a function of its latency (in cycles). In practice, the cost of an edge is also a function of the number of cycles where the dependency has been seen as 'contributing to backend pressure increases'. The idea is that the higher the cost of an edge, the higher is the impact of the dependency on performance. To put it in another way, the cost of an edge is a measure of criticality for performance. Note how a same edge may be found in multiple iteration of the simulated loop. The logic that adds new edges to the graph checks if an equivalent dependency already exists (duplicate edges are not allowed). If an equivalent dependency edge is found, field DependencyEdge::Frequency of that edge is incremented by one, and the new cost is cumulatively added to the existing edge cost. At the end of simulation, costs are propagated to nodes through the edges of the graph. The goal is to identify a critical sequence from a node of the root-set (composed by node of the graph with no predecessors) to a 'sink node' with no successors. Note that the graph is intentionally kept acyclic to minimize the complexity of the critical sequence computation algorithm (complexity is currently linear in the number of nodes in the graph). The critical path is finally computed as a sequence of dependency edges. For edges describing processor resource interferences, the view also prints a so-called "interference probability" value (by dividing field DependencyEdge::Frequency by the total number of iterations). Examples of critical sequence computations can be found in tests added/modified by this patch. On output streams that support colored output, instructions from the critical sequence are rendered with a different color. Strictly speaking the analysis conducted by the bottleneck analysis view is not a critical path analysis. The cost of an edge doesn't only depend on the dependency latency. More importantly, the cost of a same edge may be computed differently by different iterations. The number of dependencies is discovered dynamically based on the events generated by the simulator. However, their number is not fixed. This is especially true for edges that model processor resource interferences; an interference may not occur in every iteration. For that reason, it makes sense to also print out a "probability of interference". By construction, the accuracy of this analysis (as always) is strongly dependent on the simulation (and therefore the quality of the information available in the scheduling model). That being said, the critical sequence effectively identifies a performance criticality. Instructions from that sequence are expected to have a very big impact on performance. So, users can take advantage of this information to focus their attention on specific interactions between instructions. In my experience, it works quite well in practice, and produces useful output (in a reasonable amount time). Differential Revision: https://reviews.llvm.org/D63543 llvm-svn: 364045
* [binutils] Add response file option to help and docsJames Henderson2019-06-217-0/+20
| | | | | | | | | | | | | | | | | | | | | Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036
* [llvm-dwarfdump] Remove unnecessary explicit -h behaviourJames Henderson2019-06-211-7/+0
| | | | | | | | | | | | | | | | | --help and -h are automatically supported by the command-line parser, unless overridden by the tool. The behaviour of the PrintHelpMessage being used for -h prior to this patch is subtly different to that provided by --help automatically (it omits certain elements of help text and options, such as --help-list), so overriding the default is not desirable, without good reason. This patch removes the explicit specification of -h and its behaviour, so that the default behaviour is used. Reviewed by: hintonda Differential Revision: https://reviews.llvm.org/D63565 llvm-svn: 364029
* Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFCFangrui Song2019-06-212-11/+7
| | | | llvm-svn: 364006
* [llvm-objcopy][MachO] Rebuild the symbol/string table in the writerSeiya Nuta2019-06-217-76/+136
| | | | | | | | | | | | | | | | Summary: Build the string table using StringTableBuilder, reassign symbol indices, and update symbol indices in relocations to allow adding/modifying/removing symbols from the object. Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap Subscribers: mgorny, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63309 llvm-svn: 364000
* [yaml2obj] - Convert `ELFState<ELFT>::addSymbols` method to `toELFSymbols` ↵George Rimar2019-06-201-47/+44
| | | | | | | | | | | | | | helper. NFCI. ELFState<ELFT>::addSymbols method looks a bit strange. User code have to create the destination symbols vector outside, add a null symbol and then pass it to addSymbols when it seems the more natural logic is to isolate all work with symbols inside some function, build the list right there and return it. Differential revision: https://reviews.llvm.org/D63493 llvm-svn: 363930
* [llvm-nm] Generalize ELF symbol types 'N' and 'n'Fangrui Song2019-06-201-12/+7
| | | | | | | | Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D63588 llvm-svn: 363918
* [llvm-objdump] Switch between ARM/Thumb based on mapping symbols.Eli Friedman2019-06-201-29/+80
| | | | | | | | | | | | | | | The ARMDisassembler changes allow changing between ARM and Thumb mode based on the MCSubtargetInfo, rather than the Target, which simplifies the other changes a bit. I'm not really happy with adding more target-specific logic to tools/llvm-objdump/, but there isn't any easy way around it: the logic in question specifically applies to disassembling an object file, and that code simply isn't located in lib/Target, at least at the moment. Differential Revision: https://reviews.llvm.org/D60927 llvm-svn: 363903
* [llvm-readobj] Match GNU output for DT_RPATH and DT_RUNPATH when dumping ↵Yuanfang Chen2019-06-191-24/+11
| | | | | | | | | | | | | | dynamic symbol table. Reviewers: jhenderson, grimar, MaskRay, rupprecht, espindola Subscribers: emaste, nemanjai, arichardson, kbarton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63347 llvm-svn: 363868
* [llvm-objdump] Remove unnecessary indentation when dumping ELF data.Yuanfang Chen2019-06-191-3/+1
| | | | | | | | | | | | Reviewers: MaskRay, jhenderson, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63393 llvm-svn: 363858
* [yaml2obj/obj2yaml] - Make RawContentSection::Info Optional<>George Rimar2019-06-192-4/+11
| | | | | | | | This allows to customize this field for "implicit" sections properly. Differential revision: https://reviews.llvm.org/D63487 llvm-svn: 363777
* vs integration: bump version nbrHans Wennborg2019-06-191-1/+1
| | | | llvm-svn: 363769
* Revert r359557 "vs integration: vs2019 support"Hans Wennborg2019-06-191-7/+7
| | | | | | | | | | Turns out this worked on my machine because I still had VS2017 installed, but it didn't actually work in general. Since the extension is unmaintained and MS is doing their own LLVM toolset integration for VS2019, let's just revert. llvm-svn: 363768
* Test commit accessYuanfang Chen2019-06-191-0/+1
| | | | llvm-svn: 363763
* Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-usedMichael Trent2019-06-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | Summary: Historically llvm-objdump prints the path to a dylib as well as the dylib's compatibility version and current version number. This change extends this information by adding the kind of dylib load: weak, reexport, etc. rdar://51383512 Reviewers: pete, lhames Reviewed By: pete Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62866 llvm-svn: 363746
* [PDB] Ignore .debug$S subsections with high bit setReid Kleckner2019-06-181-0/+5
| | | | | | | | Some versions of the Visual C++ 2015 runtime have line tables with the subsection kind of 0x800000F2. In cvinfo.h, 0x80000000 is documented to be DEBUG_S_IGNORE. This appears to implement the intended behavior. llvm-svn: 363724
* [llvm-readobj] Allow --hex-dump/--string-dump to dump multiple sectionsFangrui Song2019-06-183-106/+117
| | | | | | | | | | | | | | | | | | 1) `-x foo` currently dumps one `foo`. This change makes it dump all `foo`. 2) `-x foo -x foo` currently dumps `foo` twice. This change makes it dump `foo` once. In addition, if foo has section index 9, `-x foo -x 9` dumps `foo` once. 3) Give a warning instead of an error if `foo` does not exist. The new behaviors match GNU readelf. Also, print a new line as a separator between two section dumps. GNU readelf uses two lines, but one seems good enough. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D63475 llvm-svn: 363683
* [MCA] Slightly refactor the bottleneck analysis view. NFCIAndrea Di Biagio2019-06-183-71/+92
| | | | | | | | | | | This patch slightly refactors data structures internally used by the bottleneck analysis to track data and resource dependencies. This patch also updates methods used to print out information about dependency edges when in debug mode. This is the last of a sequence of commits done in preparation for an upcoming patch that fixes PR37494. No functional change intended. llvm-svn: 363677
* [llvm-objdump] Tidy up AMDGCNPrettyPrinterFangrui Song2019-06-181-13/+13
| | | | llvm-svn: 363650
* [llvm-strip] Error when using stdin twiceAlex Brachet2019-06-183-4/+27
| | | | | | | | | | | | | | | | Summary: Implements bug [[ https://bugs.llvm.org/show_bug.cgi?id=42204 | 42204 ]]. llvm-strip now warns when the same input file is used more than once, and errors when stdin is used more than once. Reviewers: jhenderson, rupprecht, espindola, alexshap Reviewed By: jhenderson, rupprecht Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63122 llvm-svn: 363638
* [Remarks] Extend -fsave-optimization-record to specify the formatFrancis Visoiu Mistrih2019-06-174-2/+24
| | | | | | | | | Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
* [llvm-objdump] Use %08 instead of %016 to print leading addresses for 32-bit ↵Fangrui Song2019-06-171-7/+6
| | | | | | | | | | binaries Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D63398 llvm-svn: 363539
* [yaml2obj][MachO] Don't fill dummy data for virtual sectionsSeiya Nuta2019-06-171-3/+15
| | | | | | | | | | | | | | | | | | | Summary: Currently, MachOWriter::writeSectionData writes dummy data (0xdeadbeef) to fill section data areas in the file even if the section is a virtual one. Since virtual sections don't occupy any space in the file, writing dummy data could results the "OS.tell() - fileStart <= Sec.offset" assertion failure. This patch fixes the bug by simply not writing any dummy data for virtual sections. Reviewers: beanz, jhenderson, rupprecht, alexshap Reviewed By: alexshap Subscribers: compnerd, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62991 llvm-svn: 363525
* [llvm-objcopy] Add elf32-sparc and elf32-sparcel targetSeiya Nuta2019-06-171-0/+3
| | | | | | | | | | | | | | | | | | | Summary: The "sparc"/"sparcel" architectures appears in ArchMap (used by -B option) but not in OutputFormatMap (used by -I/-O option). Add their targets into OutputFormatMap for consistency. Note that AFAIK there're no targets for 32-bit little-endian SPARC ("elf32-sparcel") in GNU binutils. Reviewers: espindola, alexshap, rupprecht, jhenderson, compnerd, jakehehrlich Reviewed By: jhenderson, compnerd, jakehehrlich Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63238 llvm-svn: 363524
* [objcopy] Error when --preserve-dates is specified with standard streamsAlex Brachet2019-06-151-2/+12
| | | | | | | | | | | | | | | | Summary: llvm-objcopy/strip now error when -p is specified when reading from stdin or writing to stdout Reviewers: jhenderson, rupprecht, espindola, alexshap Reviewed By: jhenderson, rupprecht Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63090 llvm-svn: 363485
* Reland: [Remarks] Refactor optimization remarks setupFrancis Visoiu Mistrih2019-06-144-90/+59
| | | | | | | | * Add a common function to setup opt-remarks * Rename common options to the same names * Add error types to distinguish between file errors and regex errors llvm-svn: 363415
* Revert "Revert r363377: [yaml2obj] - Allow setting custom section types for ↵George Rimar2019-06-141-2/+6
| | | | | | | | | | | | | | | | | | | | implicit sections." LLD test case will be fixed in a following commit. Original commit message: [yaml2obj] - Allow setting custom section types for implicit sections. We were hardcoding the final section type for sections that are usually implicit. The patch fixes that. This also fixes a few issues in existent test cases and removes one precompiled object. Differential revision: https://reviews.llvm.org/D63267 llvm-svn: 363401
* Revert r363377: [yaml2obj] - Allow setting custom section types for implicit ↵Rui Ueyama2019-06-141-6/+2
| | | | | | | | | sections. This reverts commit r363377 because lld's ELF/invalid/undefined-local-symbol-in-dso.test test started failing after this commit. llvm-svn: 363394
* [docs][llvm-dwarfdump] Make the --show-parents and --show-children help text ↵James Henderson2019-06-141-2/+2
| | | | | | | | | | | | | | | | | | and docs more consistent and correct The docs and help text for --show-parents and --show-children were a bit inconsistent. The help text claimed they had an effect when "=<offset>" was used, whereas the doc said it had an effect when "--find" or "--name" were used. This change changes the doc to mention "=<offset>" and removes this reference from the help text, to avoid having a very long description in the help text (it still says "when selectively printing entries"). Reviewed by: JDevlieghere, aprantl Differential Revision: https://reviews.llvm.org/D63275 llvm-svn: 363380
* [yaml2obj] - Allow setting custom section types for implicit sections.George Rimar2019-06-141-2/+6
| | | | | | | | | | | | We were hardcoding the final section type for sections that are usually implicit. The patch fixes that. This also fixes a few issues in existent test cases and removes one precompiled object. Differential revision: https://reviews.llvm.org/D63267 llvm-svn: 363377
* [llvm-readobj] Don't abort printing of dynamic table if string reference is ↵James Henderson2019-06-141-25/+37
| | | | | | | | | | | | | | | | | invalid If dynamic table is missing, output "dynamic strtab not found'. If the index is out of range, output "Invalid Offset<..>". https://bugs.llvm.org/show_bug.cgi?id=40807 Reviewed by: jhenderson, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D63084 Patch by Yuanfang Chen. llvm-svn: 363374
* [llvm-readobj] - Do not fail to dump the object which has wrong type of ↵George Rimar2019-06-141-7/+21
| | | | | | | | | | | | | | | | | | | | | | .shstrtab. Imagine we have object that has .shstrtab with type != SHT_STRTAB. In this case, we fail to dump the object, though GNU readelf dumps it without any issues and warnings. This patch fixes that. It adds a code to ELFDumper.cpp which is based on the implementation of getSectionName from the ELF.h: https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L608 https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L431 https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L539 The difference is that all non critical errors are ommitted what allows us to improve the dumping on a tool side. Also, this opens a road for a follow-up that should allow us to dump the section headers, but drop the section names in case if .shstrtab is completely absent and/or broken. Differential revision: https://reviews.llvm.org/D63266 llvm-svn: 363371
* [yaml2obj] - Allow setting the custom Address for .strtabGeorge Rimar2019-06-141-3/+2
| | | | | | | | | | | | | Despite the fact that .strtab is non-allocatable, there is no reason to disallow setting the custom address for it. The patch also adds a test case showing we can set any address we want for other implicit sections. Differential revision: https://reviews.llvm.org/D63137 llvm-svn: 363368
* [yaml2obj] - Allow setting cutom Flags for implicit sections.George Rimar2019-06-142-10/+16
| | | | | | | | | With this patch we get ability to set any flags we want for implicit sections defined in YAML. Differential revision: https://reviews.llvm.org/D63136 llvm-svn: 363367
* [llvm-objcopy] Remove no-op flush of errsAlex Brachet2019-06-141-1/+0
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Subscribers: jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63313 llvm-svn: 363354
* [llvm-objcopy] Changed command line parsing errorsAlex Brachet2019-06-142-19/+19
| | | | | | | | | | | | | | | | Summary: Tidied up errors during command line parsing to be more consistent with the rest of llvm-objcopy errors. Reviewers: jhenderson, rupprecht, espindola, alexshap Reviewed By: jhenderson, rupprecht Subscribers: emaste, arichardson, MaskRay, llvm-commits, jakehehrlich Tags: #llvm Differential Revision: https://reviews.llvm.org/D62973 llvm-svn: 363350
* [AMDGPU] gfx1011/gfx1012 targetsStanislav Mekhanoshin2019-06-141-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D63307 llvm-svn: 363344
* Revert "[Remarks] Refactor optimization remarks setup"Francis Visoiu Mistrih2019-06-144-59/+90
| | | | | | | | This reverts commit 6e6e3af55bb97e1a4c97375c15a2b0099120c5a7. This breaks greendragon. llvm-svn: 363343
* [llvm-objcopy] Fix sparc target endiannessSeiya Nuta2019-06-131-1/+2
| | | | | | | | | | | | | | | | Summary: AFAIK, the "sparc" target is big endian and the target for 32-bit little-endian SPARC is denoted as "sparcel". This patch fixes the endianness of "sparc" target and adds "sparcel" target for 32-bit little-endian SPARC. Reviewers: espindola, alexshap, rupprecht, jhenderson Reviewed By: jhenderson Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63251 llvm-svn: 363336
* [Remarks] Refactor optimization remarks setupFrancis Visoiu Mistrih2019-06-134-90/+59
| | | | | | | | * Add a common function to setup opt-remarks * Rename common options to the same names * Add error types to distinguish between file errors and regex errors llvm-svn: 363328
* [llvm-objcopy] Implement IHEX readerEugene Leviant2019-06-135-49/+302
| | | | | | | This is the final part of IHEX format support in llvm-objcopy Differential revision: https://reviews.llvm.org/D62583 llvm-svn: 363243
* Sanitize llvm-extract -help outputSerge Guelton2019-06-121-37/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filter out irrelevant options New output: OVERVIEW: llvm extractor USAGE: llvm-extract [options] <input bitcode file> OPTIONS: Generic Options: --help - Display available options (--help-hidden for more) --help-list - Display list of available options (--help-list-hidden for more) --version - Display the version of this program llvm-extract Options: --alias=<alias> - Specify alias to extract --bb=<function:bb> - Specify <function, basic block> pairs to extract --delete - Delete specified Globals from Module -f - Enable binary output on terminals --func=<function> - Specify function to extract --glob=<global> - Specify global to extract -o=<filename> - Specify output filename --ralias=<ralias> - Specify alias(es) to extract using a regular expression --recursive - Recursively extract all called functions --rfunc=<rfunction> - Specify function(s) to extract using a regular expression --rglob=<rglobal> - Specify global(s) to extract using a regular expression Differential Revision: https://reviews.llvm.org/D62511 llvm-svn: 363201
* [llvm-readobj] Fix output interleaving issue caused by using multiple ↵Jordan Rupprecht2019-06-124-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | streams at the same time. Summary: Use llvm::fouts() as the default stream for outputing. No new stream should be constructed to output at the same time. https://bugs.llvm.org/show_bug.cgi?id=42140 Reviewers: jhenderson, grimar, MaskRay, phosek, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63115 Patch by Yuanfang Chen! llvm-svn: 363198
* StackProtector: Use PointerMayBeCapturedMatt Arsenault2019-06-121-0/+1
| | | | | | | | | | | | | | | | This was using its own, outdated list of possible captures. This was at minimum not catching cmpxchg and addrspacecast captures. One change is now any volatile access is treated as capturing. The test coverage for this pass is quite inadequate, but this required removing volatile in the lifetime capture test. Also fixes some infrastructure issues to allow running just the IR pass. Fixes bug 42238. llvm-svn: 363169
* [Legacy LTO] Fix build bots: r363140: Fix export nameBen Dunbobbin2019-06-121-1/+1
| | | | llvm-svn: 363151
* Share /machine: handling code with llvm-cvtres tooNico Weber2019-06-121-28/+11
| | | | | | | | | | | | | | r363016 let lld-link and llvm-lib share the /machine: parsing code. This lets llvm-cvtres share it as well. Making llvm-cvtres depend on llvm-lib seemed a bit strange (it doesn't need llvm-lib's dependencies on BinaryFormat and BitReader) and I couldn't find a good place to put this code. Since it's just a few lines, put it in lib/Object for now. Differential Revision: https://reviews.llvm.org/D63120 llvm-svn: 363144
* [ThinLTO]LTO]Legacy] Fix dependent libraries support by adding querying of ↵Ben Dunbobbin2019-06-123-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the IRSymtab Dependent libraries support for the legacy api was committed in a broken state (see: https://reviews.llvm.org/D60274). This was missed due to the painful nature of having to integrate the changes into a linker in order to test. This change implements support for dependent libraries in the legacy LTO api: - I have removed the current api function, which returns a single string, and added functions to access each dependent library specifier individually. - To reduce the testing pain, I have made the api functions as thin as possible to maximize coverage from llvm-lto. - When doing ThinLTO the system linker will load the modules lazily when scanning the input files. Unfortunately, when modules are lazily loaded there is no access to module level named metadata. To fix this I have added api functions that allow querying the IRSymtab for the dependent libraries. I hope to expand the api in the future so that, eventually, all the information needed by a client linker during scan can be retrieved from the IRSymtab. Differential Revision: https://reviews.llvm.org/D62935 llvm-svn: 363140
OpenPOWER on IntegriCloud