summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* Drop materializeAllPermanently.Rafael Espindola2015-12-182-2/+2
| | | | | | | | This inlines materializeAll into the only caller (materializeAllPermanently) and renames materializeAllPermanently to just materializeAll. llvm-svn: 256024
* Revert "Improve DWARFDebugFrame::parse to also handle __eh_frame."Pete Cooper2015-12-183-21/+259
| | | | | | | | This reverts commit r256008. Its breaking multiple buildbots, although works for me locally. llvm-svn: 256013
* Improve DWARFDebugFrame::parse to also handle __eh_frame.Pete Cooper2015-12-183-259/+21
| | | | | | | | | | | | | | | LLVM MC has single methods which can handle the output of EH frame and DWARF CIE's and FDE's. This code improves DWARFDebugFrame::parse to do the same for parsing. This also allows llvm-objdump to support the --dwarf=frames option which objdump supports. This option dumps the .eh_frame section using the new code in DWARFDebugFrame::parse. http://reviews.llvm.org/D15535 Reviewed by Rafael Espindola. llvm-svn: 256008
* Add a test for LLVMGetBitcodeModule.Rafael Espindola2015-12-183-10/+25
| | | | llvm-svn: 255985
* Reorganize the C API headers to improve build times.Eric Christopher2015-12-181-0/+1
| | | | | | | | | Type specific declarations have been moved to Type.h and error handling routines have been moved to ErrorHandling.h. Both are included in Core.h so nothing should change for projects directly including the headers, but transitive dependencies may be affected. llvm-svn: 255965
* [ThinLTO] Metadata linking for imported functionsTeresa Johnson2015-12-171-7/+42
| | | | | | | | | | | | | | | | | | | | | | | 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
* [llvm-objdump] Use report_fatal_error() for a more uniform error handling.Davide Italiano2015-12-171-29/+13
| | | | llvm-svn: 255871
* Change linkInModule to take a std::unique_ptr.Rafael Espindola2015-12-163-7/+8
| | | | | | | Passing in a std::unique_ptr should help find errors when the module is used after being linked into another module. llvm-svn: 255842
* [PGO] Handle and report overflow during profile merge for all types of dataNathan Slingerland2015-12-161-1/+5
| | | | | | | | | | | | Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user. Reviewers: davidxl, dnovillo, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15547 llvm-svn: 255825
* Use LLVM style variable name (NFC)Teresa Johnson2015-12-161-4/+4
| | | | | | Fixes variable name from r255779. llvm-svn: 255824
* [CMake] Adding llvm-profdata to the list of tools clang needs.Chris Bieneman2015-12-161-2/+4
| | | | | | Bootstrapping clang to generate PGO data (patches coming soon), requires llvm-profdata targets to be generated before clang. llvm-svn: 255794
* Reland "[llvm-readobj] Simplify usage of -codeview flag"Reid Kleckner2015-12-163-7/+16
| | | | | | Relands r255790 with fixed tests. llvm-svn: 255793
* Revert "[llvm-readobj] Simplify usage of -codeview flag"Reid Kleckner2015-12-163-16/+7
| | | | | | This reverts commit r255790. llvm-svn: 255791
* [llvm-readobj] Simplify usage of -codeview flagReid Kleckner2015-12-163-7/+16
| | | | llvm-svn: 255790
* Add RAII wrapper for gold plugin file managementTeresa Johnson2015-12-161-23/+31
| | | | | | Suggested in review of r255256. llvm-svn: 255779
* [sancov] blacklist support.Mike Aizatsky2015-12-161-5/+48
| | | | | | | | | | Summary: Using the blacklist the user can filter own unwanted functions from all outputs. By default blacklist contains "fun:__sancov*" line. Differential Revision: http://reviews.llvm.org/D15364 llvm-svn: 255732
* [llvm-objdump/MachODump] Shrink code a little bit. NFC.Davide Italiano2015-12-151-4/+1
| | | | llvm-svn: 255701
* [llvm-profdata] Add support for weighted merge of profile data (2nd try)Nathan Slingerland2015-12-151-18/+58
| | | | | | | | | | | | | | | | | | | | Summary: This change adds support for specifying a weight when merging profile data with the llvm-profdata tool. Weights are specified by using the --weighted-input=<weight>,<filename> option. Input files not specified with this option (normal positional list after options) are given a default weight of 1. 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: davidxl, dnovillo, bogner, silvas Subscribers: silvas, davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D15306 llvm-svn: 255659
* Use CmpInst::Predicate instead of 'unsigned short' in some places. NFCCraig Topper2015-12-151-1/+2
| | | | llvm-svn: 255623
* [llvm-readobj] s/FunctionName/LinkageName/ for codeview dumpingReid Kleckner2015-12-151-7/+7
| | | | | | | The symbol being printed in this field comes from the main symbol table, not 0xF1 subsection. Use LinkageName to make that a lot clearer. llvm-svn: 255596
* sancov: coverage can be reported by multiple functions.Mike Aizatsky2015-12-141-10/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D15430 llvm-svn: 255582
* Use diagnostic handler in the LLVMContextRafael Espindola2015-12-144-25/+13
| | | | | | | | | | | | | | | | 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
* Factor out some duplication. NFC.Pete Cooper2015-12-141-44/+20
| | | | llvm-svn: 255569
* Start implementing FDE dumping when printing the eh_frame.Pete Cooper2015-12-141-5/+107
| | | | | | | | | | This code adds some simple decoding of the FDE's in an eh_frame. There's still more to be done in terms of error handling and verification. Also, we need to be able to decode the CFI's. llvm-svn: 255550
* Print the eh_frame section in MachoDump.Pete Cooper2015-12-141-1/+180
| | | | | | | | | | | | | | This is the start of work to dump the contents of the eh_frame section. It currently emits CIE entries. FDE entries will come later. It also needs improved error checking which will follow soon. http://reviews.llvm.org/D15502 Reviewed by Kevin Enderby and Lang Hames. llvm-svn: 255546
* Fix formatting. NFC.Diego Novillo2015-12-141-8/+5
| | | | llvm-svn: 255541
* [IR] Remove terminatepadDavid Majnemer2015-12-141-1/+0
| | | | | | | | | | | | | It turns out that terminatepad gives little benefit over a cleanuppad which calls the termination function. This is not sufficient to implement fully generic filters but MSVC doesn't support them which makes terminatepad a little over-designed. Depends on D15478. Differential Revision: http://reviews.llvm.org/D15479 llvm-svn: 255522
* [llvm-dwp] Deduplicate type unitsDavid Blaikie2015-12-141-6/+12
| | | | | | | | It's O(N^2) because it does a simple walk through the existing types to find duplicates, but that will be fixed in a follow-up commit to use a mapping data structure of some kind. llvm-svn: 255482
* [llvm-objdump/MachoDump] Simplify.Davide Italiano2015-12-121-7/+3
| | | | llvm-svn: 255443
* [IR] Reformulate LLVM's EH funclet IRDavid Majnemer2015-12-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we have successfully implemented a funclet-oriented EH scheme on top of LLVM IR, our scheme has some notable deficiencies: - catchendpad and cleanupendpad are necessary in the current design but they are difficult to explain to others, even to seasoned LLVM experts. - catchendpad and cleanupendpad are optimization barriers. They cannot be split and force all potentially throwing call-sites to be invokes. This has a noticable effect on the quality of our code generation. - catchpad, while similar in some aspects to invoke, is fairly awkward. It is unsplittable, starts a funclet, and has control flow to other funclets. - The nesting relationship between funclets is currently a property of control flow edges. Because of this, we are forced to carefully analyze the flow graph to see if there might potentially exist illegal nesting among funclets. While we have logic to clone funclets when they are illegally nested, it would be nicer if we had a representation which forbade them upfront. Let's clean this up a bit by doing the following: - Instead, make catchpad more like cleanuppad and landingpad: no control flow, just a bunch of simple operands; catchpad would be splittable. - Introduce catchswitch, a control flow instruction designed to model the constraints of funclet oriented EH. - Make funclet scoping explicit by having funclet instructions consume the token produced by the funclet which contains them. - Remove catchendpad and cleanupendpad. Their presence can be inferred implicitly using coloring information. N.B. The state numbering code for the CLR has been updated but the veracity of it's output cannot be spoken for. An expert should take a look to make sure the results are reasonable. Reviewers: rnk, JosephTremoulet, andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D15139 llvm-svn: 255422
* [llvm-objdump/MachODump] Reduce code duplication.Davide Italiano2015-12-111-69/+41
| | | | llvm-svn: 255380
* [dsymutil] Ignore absolute symbols in the debug mapFrederic Riss2015-12-111-3/+14
| | | | | | | | | | | | Quoting from the comment added to the code: // Objective-C on i386 uses artificial absolute symbols to // perform some link time checks. Those symbols have a fixed 0 // address that might conflict with real symbols in the object // file. As I cannot see a way for absolute symbols to find // their way into the debug information, let's just ignore those. llvm-svn: 255350
* [ThinLTO] Release files in gold plugin during combined index (take 2)Teresa Johnson2015-12-101-4/+2
| | | | | | | Ensure we release the files even when they don't hold a function index summary section, by restructuring the control flow a little bit. llvm-svn: 255256
* Slit lib/Linker in two.Rafael Espindola2015-12-101-157/+97
| | | | | | | | | | | | | | | | 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
* [ThinLTO] Release files read when creating combined index in gold pluginTeresa Johnson2015-12-091-0/+3
| | | | | | | This wasn't causing an issue since at HEAD we exit the linker completely after creating the combined index. llvm-svn: 255156
* [llvm-dwp] Sink debug_types.dwo emission into the code parsing the type ↵David Blaikie2015-12-091-15/+27
| | | | | | | | | | signatures (NFC) This is a preliminary change towards deduplicating type units based on their signatures. Next change will skip emission of types when their signature has already been seen. llvm-svn: 255154
* Delay context construction to when/if it is needed in gold plugin (NFC)Teresa Johnson2015-12-091-3/+3
| | | | llvm-svn: 255146
* clang-format order of gold-plugin includes (NFC)Teresa Johnson2015-12-091-2/+2
| | | | llvm-svn: 255144
* Fix the order of destructors in LibLTOCodeGeneratorSteven Wu2015-12-091-0/+4
| | | | | | | | | | | | | | | | Summary: The order of destructors in LTOCodeGenerator gets changed in r254696. It is possible for LTOCodeGenerator to have a MergedModule created in the OwnedContext, in which case the module must be destructed before the context. Reviewers: rafael, dexonsmith Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D15346 llvm-svn: 255092
* Simplify testMergedProgram.Rafael Espindola2015-12-091-26/+19
| | | | | | It now receives and returns std::unique_ptr. llvm-svn: 255087
* Simplify memory management. NFC.Rafael Espindola2015-12-091-79/+72
| | | | | | | This passes std::unique_ptr to predicates that are expected to delete their argument. llvm-svn: 255086
* Return std::unique_ptr from SplitFunctionsOutOfModule. NFC.Rafael Espindola2015-12-093-30/+25
| | | | llvm-svn: 255084
* Simplify memory management. NFC.Rafael Espindola2015-12-091-11/+10
| | | | llvm-svn: 255082
* Simplify memory management a bit. NFC.Rafael Espindola2015-12-091-9/+8
| | | | llvm-svn: 255079
* Return a std::unique_ptr from CloneModule. NFC.Rafael Espindola2015-12-083-22/+22
| | | | llvm-svn: 255078
* [llvm-objdump/MachO] Don't cut'n'paste the same code over and over.Davide Italiano2015-12-083-21/+10
| | | | | | Use the appropriate helper instead. llvm-svn: 254990
* Let llvm-lto installed. A few tests in clang/test are using it.NAKAMURA Takumi2015-12-071-2/+0
| | | | llvm-svn: 254963
* fix 'the the '; NFCSanjay Patel2015-12-072-2/+2
| | | | llvm-svn: 254928
* [Orc] Removing traces of takeOwnershipOfBuffers left after r251560.Lang Hames2015-12-071-12/+0
| | | | | | Patch by Joshua Gerrard. Thanks Joshua! llvm-svn: 254919
* [llvm-objdump/MachoDump] Make code much more concise.Davide Italiano2015-12-071-20/+5
| | | | llvm-svn: 254888
OpenPOWER on IntegriCloud