summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [Orc] Rename IndirectStubsManagerBase to IndirectStubsManager.Lang Hames2015-12-061-1/+2
| | | | | | No functional change. llvm-svn: 254885
* [llvm-readobj] report_error() does not return, so we can simplify.Davide Italiano2015-12-051-6/+2
| | | | llvm-svn: 254868
* [llvm-dwp] Add coverage for both the presence and absence of type units, and ↵David Blaikie2015-12-051-5/+7
| | | | | | fix/remove the emission of a broken tu_index when no type units are present llvm-svn: 254833
* [llvm-dwp] clang-format this to catch anything I've missed along the wayDavid Blaikie2015-12-051-12/+13
| | | | llvm-svn: 254828
* [llvm-dwp] Support debug_tu_indexDavid Blaikie2015-12-051-53/+110
| | | | llvm-svn: 254827
* [opt] Fix run-twice option for non-idempotent passesKeno Fischer2015-12-051-7/+11
| | | | | | | | | | Cloning the module was supposed to guard against the possibility that the passes may be non-idempotent. However, for some reason I decided to put that AFTER the passes had already run on the module, defeating the point entirely. Fix that by moving up the CloneModule as is done in llc. llvm-svn: 254819
* [opt] Fix sanitizer complaints about r254774Keno Fischer2015-12-051-5/+8
| | | | | | | | `Out` can be null if no output is requested, so move any access to it inside the conditional. Thanks to Justin Bogner for finding this. llvm-svn: 254804
* Add TransformUtils to list of required libraries for llcDerek Schuff2015-12-043-2/+3
| | | | | | This dependency was added in r254774 llvm-svn: 254786
* Always pass a diagnostic handler to the linker.Rafael Espindola2015-12-043-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | Before this patch the diagnostic handler was optional. If it was not passed, the one in the LLVMContext was used. That is probably not a pattern we want to follow. If each area has an optional callback, there is a sea of callbacks and it is hard to follow which one is called. Doing this also found cases where the callback is a nice addition, like testing that no errors or warnings are reported. The other option is to always use the diagnostic handler in the LLVMContext. That has a few problems * To implement the C API we would have to set the diag handler and then set it back to the original value. * Code that creates the context might be far away from code that wants the diagnostics. I do have a patch that implements the second option and will send that as an RFC. llvm-svn: 254777
* [llc/opt] Add an option to run all passes twiceKeno Fischer2015-12-042-9/+91
| | | | | | | | | | | | | | | | | | | | Summary: Lately, I have submitted a number of patches to fix bugs that only occurred when using the same pass manager to compile multiple modules (generally these bugs are failure to reset some persistent state). Unfortunately I don't think there is currently a way to test that from the command line. This adds a very simple flag to both llc and opt, under which the tools will simply re-run their respective pass pipelines using the same pass manager on (a clone of the same module). Additionally, we verify that both outputs are bitwise the same. Reviewers: yaron.keren Subscribers: loladiro, yaron.keren, kcc, llvm-commits Differential Revision: http://reviews.llvm.org/D14965 llvm-svn: 254774
* [llvm-dwp] Implement the required on-disk probed hash tableDavid Blaikie2015-12-041-5/+16
| | | | llvm-svn: 254770
* Fix llvm-readobj build on Windows, match noreturn attribute on reportError ↵Reid Kleckner2015-12-041-1/+2
| | | | | | in headers llvm-svn: 254769
* [llvm-dwp] Include the debug_line.dwo sectionDavid Blaikie2015-12-041-0/+1
| | | | | | | | | | | | This probably shouldn't be generated in the .dwo file for CUs, only for TUs, but it's in the sample .dwos (generated by clang) so dwp should reflect that. Arguably the DWP tool could be smart enough to know that the CUs shouldn't need a debug_line.dwo section and skip that even when it's legitimately generated for TUs, but that's a bit more off-book. llvm-svn: 254767
* [llvm-readobj] reportError() never returns. Mark with the correct attribute.Davide Italiano2015-12-041-1/+1
| | | | llvm-svn: 254752
* [llvm-readobj/ELF] Simplify Verdef handling.Davide Italiano2015-12-041-7/+1
| | | | llvm-svn: 254751
* fixing MakefileMike Aizatsky2015-12-041-1/+2
| | | | llvm-svn: 254749
* adding MC dependencies in hopes to pacify the hexagon build.Mike Aizatsky2015-12-041-0/+2
| | | | llvm-svn: 254745
* sancov -not-covered-functions.Mike Aizatsky2015-12-042-88/+305
| | | | | | | | | | | | Summary: The command prints out list of functions that were not entered. To do this, addresses are first converted to function locations. Set operations are used for function locations. Differential Revision: http://reviews.llvm.org/D14889 review llvm-svn: 254742
* [llvm-dwp] Retrieve the DWOID from the CU for the cu_index entryDavid Blaikie2015-12-041-2/+61
| | | | llvm-svn: 254731
* Modernize the C++ APIs for creating LTO modules.Rafael Espindola2015-12-042-33/+86
| | | | | | | | | | | | | | | | This is a continuation of r253367. These functions return is owned by the caller, so they return std::unique_ptr now. The call can fail, so the return is wrapped in ErrorOr. They have a context where to report diagnostics, so they don't need to take a string out parameter. With this there are no call to getGlobalContext in lib/LTO. llvm-svn: 254721
* Move a call to getGlobalContext out of lib/LTO.Rafael Espindola2015-12-042-3/+4
| | | | llvm-svn: 254696
* [Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager.Lang Hames2015-12-042-2/+2
| | | | | | | | | This class is turning into a useful interface, rather than an implementation detail, so I'm dropping the 'Base' suffix. No functional change. llvm-svn: 254693
* Revert "[llvm-profdata] Add support for weighted merge of profile data"Nathan Slingerland2015-12-041-54/+16
| | | | | | | | This reverts commit b7250858d96b8ce567681214273ac0e62713c661. Reverting in order to investigate Windows test failure. llvm-svn: 254687
* Simplify the error handling in llvm-lto a bit.Rafael Espindola2015-12-041-36/+37
| | | | llvm-svn: 254675
* [llvm-profdata] Add support for weighted merge of profile dataNathan Slingerland2015-12-041-16/+54
| | | | | | | | | | | | | | | | | | This change adds support for an optional weight when merging profile data with the llvm-profdata tool. Weights are specified by adding an option ':<weight>' suffix to the input file names. Adding support for arbitrary weighting of input profile data allows for relative importance to be placed on the input data from multiple training runs. Both sampled and instrumented profiles are supported. Reviewers: dnovillo, bogner, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14547 llvm-svn: 254669
* [llvm-objdump] Use report_fatal_error() if we can't find a target.Davide Italiano2015-12-031-8/+2
| | | | llvm-svn: 254654
* Rename Set variable to be pluralMehdi Amini2015-12-031-3/+3
| | | | | | | Thanks Sean Silva for catching this. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 254584
* Remove "ExportingModule" from ThinLTO Index (NFC)Mehdi Amini2015-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | There is no real reason the index has to have the concept of an exporting Module. We should be able to have one single unique instance of the Index, and it should be read-only after creation for the whole ThinLTO processing. The linker plugin should be able to process multiple modules (in parallel or in sequence) with the same index. The only reason the ExportingModule was present seems to be to implement hasExportedFunctions() that is used by the Module linker to decide what to do with the current Module. For now I replaced it with a query to the map of Modules path to see if this module was declared in the Index and consider that if it is the case then it is probably exporting function. On the long term the Linker interface needs to evolve and this call should not be needed anymore. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 254581
* [llvm-dwp] Include only the non-empty columns in the cu_indexDavid Blaikie2015-12-021-7/+15
| | | | llvm-svn: 254555
* [llvm-dwp] Emit a rather fictional debug_cu_indexDavid Blaikie2015-12-021-22/+81
| | | | | | | | | | | | | | This is very rudimentary support for debug_cu_index, but it is enough to allow llvm-dwarfdump to find the offsets for contributions and correctly dump debug_info. It will need to actually find the real signature of the unit and build the real hash table with the right number of buckets, as per the DWP specification. It will also need to be expanded to cover the tu_index as well. llvm-svn: 254489
* Change ModuleLinker to take a set of GlobalValues to import instead of a ↵Mehdi Amini2015-12-021-1/+4
| | | | | | | | | | | | single one For efficiency reason, when importing multiple functions for the same Module, we can avoid reparsing it every time. Differential Revision: http://reviews.llvm.org/D15102 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 254486
* Use references now that it is natural to do so.Rafael Espindola2015-12-014-11/+11
| | | | | | | The linker never takes ownership of a module or changes which module it is refering to, making it natural to use references. llvm-svn: 254449
* [llvm-dwp] Deduplicate strings in the debug_str.dwo sectionDavid Blaikie2015-12-011-14/+20
| | | | | | | Also, ensure that references to those strings in debug_str_offsets.dwo correctly refer to the deduplicated strings. llvm-svn: 254441
* [llvm-dwp] Correctly update debug_str_offsets.dwo when linking dwo filesDavid Blaikie2015-12-011-17/+68
| | | | | | | | | | This doesn't deduplicate strings in the debug_str section, nor does it properly wire up the index so that debug_info can /find/ these strings, but it does correct the str_offsets specifically. Follow up patches to address those related/next issues. llvm-svn: 254431
* Introduce a range version of std::any_of, and use it in SCEVSanjoy Das2015-12-011-6/+3
| | | | | | | | | | Reviewers: dblaikie, pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15063 llvm-svn: 254390
* [llvm-dwp] Add missing Makefile for the old configure+make buildDavid Blaikie2015-12-011-0/+18
| | | | llvm-svn: 254358
* [llvm-dwp] Initial partial prototypeDavid Blaikie2015-12-011-1/+143
| | | | | | | | | | | | | | | | | | | This just concatenates the common DWP sections without doing any of the fancy DWP things like: 1) update str_offsets 2) deduplicating strings 3) merging/creating cu/tu_index Patches for these will follow shortly. (also not sure about target triple/object file type for this tool - do I really need a whole triple just to write an object file that contains purely static/hardcoded bytes in each section? & I guess I should just pick it based on the first input, maybe, rather than hardcoding for now - but we only produce .dwo on ELF platforms with objcopy for now anyway) llvm-svn: 254355
* llvm-dwp: Initial layoutDavid Blaikie2015-12-015-1/+40
| | | | llvm-svn: 254354
* Simplify the linking of recursive data.Rafael Espindola2015-11-271-2/+2
| | | | | | | | Now the ValueMapper has two callbacks. The first one maps the declaration. The ValueMapper records the mapping and then materializes the body/initializer. llvm-svn: 254209
* [bugpoint] Fix "Alias must point to a definition" problemsHal Finkel2015-11-263-4/+41
| | | | | | | | | | | | | | | | | | GlobalAliases may reference function definitions, but not function declarations. bugpoint would sometimes create invalid IR by deleting a function's body (thus mutating a function definition into a declaration) without first 'fixing' any GlobalAliases that reference that function definition. This change iteratively prevents that issue. Before deleting a function's body, it scans the module for GlobalAliases which reference that function. When found, it eliminates them using replaceAllUsesWith. Fixes PR20788. Patch by Nick Johnson! llvm-svn: 254171
* Fix a use-after-free in `llvm-config`.Richard Diamond2015-11-251-10/+10
| | | | | | | | | | | | | | | Summary: This could happen if `GetComponentNames` is true, because `Name` from `VisitComponent` would reference a stack instance of `std::string` in `ComputeLibsForComponents`. Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14913 llvm-svn: 254108
* Don't create implicit comdats.Rafael Espindola2015-11-231-2/+0
| | | | | | comdats are explicitly represented for some time now. llvm-svn: 253924
* [RuntimeDyld] Don't allocate unnecessary stub buffer spaceSanjoy Das2015-11-231-0/+14
| | | | | | | | | | | | | | Summary: For relocation types that are known to not require stub functions, there is no need to allocate extra space for the stub functions. Reviewers: lhames, reames, maksfb Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14676 llvm-svn: 253920
* [PGO] Add --text option for llvm-profdata show|merge commandsXinliang David Li2015-11-231-37/+70
| | | | | | | | | | | | | | The new option is similar to the SampleProfile dump option. - dump raw/indexed format into text profile format - merge the profile and output into text profile format. Note that Value Profiling data text format is not yet designed. That functionality will be added later. Differential Revision: http://reviews.llvm.org/D14894 llvm-svn: 253913
* [ThinLTO] Deduplicate function index loading into shared helper (NFC)Teresa Johnson2015-11-232-50/+5
| | | | | | | | Add a shared helper routine to read the function index from a file and create/return the function index object. Use it in llvm-link and llvm-lto. llvm-svn: 253903
* Remove unused function parameter (NFC)Teresa Johnson2015-11-231-5/+3
| | | | llvm-svn: 253889
* [llvm-rtdyld] Refactor to reduce indentation.Davide Italiano2015-11-221-5/+4
| | | | | | Suggested by: David Blaikie. llvm-svn: 253808
* [ThinLTO] Handle bitcode without function summary sections gracefullyTeresa Johnson2015-11-212-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several fixes to the handling of bitcode files without function summary sections so that they are skipped during ThinLTO processing in llvm-lto and the gold plugin when appropriate instead of aborting. 1 Don't assert when trying to add a FunctionInfo that doesn't have a summary attached. 2 Skip FunctionInfo structures that don't have attached function summary sections when trying to create the combined function summary. 3 In both llvm-lto and gold-plugin, check whether a bitcode file has a function summary section before trying to parse the index, and skip the bitcode file if it does not. 4 Fix hasFunctionSummaryInMemBuffer in BitcodeReader, which had a bug where we returned to early while looking for the summary section. Also added llvm-lto and gold-plugin based tests for cases where we don't have function summaries in the bitcode file. I verified that either the first couple fixes described above are enough to avoid the crashes, or fixes 1,3,4. But have combined them all here for added robustness. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D14903 llvm-svn: 253796
* [llvm-rtdyld] Fail early if we can't load dynamic libraries.Davide Italiano2015-11-211-3/+2
| | | | llvm-svn: 253767
* [llvm-rtdyld] Turn assertion into errors, it seems more appropriate.Davide Italiano2015-11-211-4/+8
| | | | llvm-svn: 253766
OpenPOWER on IntegriCloud