summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-symbolizer] Print out non-address lines verbatim.Mike Aizatsky2016-01-071-13/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D15876 llvm-svn: 257115
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-075-44/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r252532 added support for reporting the monolithic library when LLVM_BUILD_LLVM_DYLIB is used. This would only be done if the individual components were not found, and the dynamic library is found. This diff extends this as follows: - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared library, even if all component libraries exist. - Two flags, --link-shared and --link-static are introduced to provide explicit guidance. If --link-shared is passed and the shared library does not exist, an error results. Additionally, changed the expected shared library names from (e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an installation (and then only in CMake builds I think?), and not in the build tree; this breaks usage of llvm-config during builds, e.g. by llvm-go. Reviewers: DiamondLovesYou, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15033 llvm-svn: 257003
* [llvm-objdump] Mark noreturn function as such.Davide Italiano2015-12-292-2/+4
| | | | | | Match attribute in the header to make MSVC happy. llvm-svn: 256560
* [llvm-objdump] Use stderr and not stdout for fatal errors.Davide Italiano2015-12-251-2/+2
| | | | llvm-svn: 256423
* llvm-dwarfdump: Add support for dumping .dSYM bundles.Adrian Prantl2015-12-231-2/+43
| | | | | | | | This replicates the logic of Darwin dwarfdump for manually opening up .dSYM bundles without introducing any new dependencies. <rdar://problem/20491670> llvm-svn: 256350
* [llvm-readobj] Use stderr and not stdout for error messages.Davide Italiano2015-12-231-2/+2
| | | | llvm-svn: 256347
* Disable use list order on the gold plugin.Rafael Espindola2015-12-221-1/+1
| | | | | | | | | It turns out that his is *really* slow. With this change the link of clang with plugin-opt=emit-llvm goes from 41 to 26 seconds. We can add an option to enable it again if needed. llvm-svn: 256302
* [MC, COFF] Support link /incremental conditionallyDavid Majnemer2015-12-213-7/+14
| | | | | | | | | | | | | | | | Today, we always take into account the possibility that object files produced by MC may be consumed by an incremental linker. This results in us initialing fields which vary with time (TimeDateStamp) which harms hermetic builds (e.g. verifying a self-host went well) and produces sub-optimal code because we cannot assume anything about the relative position of functions within a section (call sites can get redirected through incremental linker thunks). Let's provide an MCTargetOption which controls this behavior so that we can disable this functionality if we know a-priori that the build will not rely on /incremental. llvm-svn: 256203
* [llvm-objdump] Use appropriate helper. NFC.Davide Italiano2015-12-211-2/+1
| | | | llvm-svn: 256156
* [llvm-objdump] Move COFF function to where it belongs.Davide Italiano2015-12-203-50/+51
| | | | | | | Ideally much more stuff should be moved out of llvm-objdump.cpp, but that will happen later. llvm-svn: 256118
* [PGO] Improve Indexed Profile Reader efficiency Xinliang David Li2015-12-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the support of value profiling added, the Indexed prof reader gets less efficient. The prof reader initialization used to be just reading the file header, but with VP support added, initialization needs to walk through all profile keys of ondisk hash table resulting in very poor locality and large memory increase (keys are stored together with the profile data in the mapped profile buffer). Even worse, when the reader is used by the compiler (not llvm-profdata too), the penalty becomes very high as compilation of each single module requires touching profile data buffer for the whole program. In this patch, the icall target values (MD5hash) are no longer eargerly converted back to name strings when the data is read into memory. New interface is added to to profile reader so that InstrProfSymtab can be lazily created for Indexed profile reader on-demand. Creating of the symtab is intended to be used by llvm-profdata tool for symbolic dumping of VP data. It can be used with compiler (for legacy out of tree uses) too but not recommended due to compile time and memory reasons mentioned above. Some other cleanups are also included: Function Addr to md5 map is now consolated into InstrProfSymtab. InstrProfStringtab is no longer used and eliminated. llvm-svn: 256114
* [llvm-objdump] Fail early if we can't parse the object header.Davide Italiano2015-12-191-4/+5
| | | | llvm-svn: 256108
* Assert that we have all use/users in the getters.Rafael Espindola2015-12-191-3/+12
| | | | | | | | | | | | | | An error that is pretty easy to make is to use the lazy bitcode reader and then do something like if (V.use_empty()) The problem is that uses in unmaterialized functions are not accounted for. This patch adds asserts that all uses are known. llvm-svn: 256105
* Deprecate a few C APIs.Rafael Espindola2015-12-183-13/+38
| | | | | | | | | | | | | This deprecates: * LLVMParseBitcode * LLVMParseBitcodeInContext * LLVMGetBitcodeModuleInContext * LLVMGetBitcodeModule They are replaced with the functions with a 2 suffix which do not record a diagnostic. llvm-svn: 256065
* Delete dead code: only functions are materializable.Rafael Espindola2015-12-181-4/+0
| | | | llvm-svn: 256052
* Use a lambda to reduce code duplication.Rafael Espindola2015-12-181-23/+15
| | | | llvm-svn: 256050
* [sancov] IWYU fix: add proper header inclusion.Alexey Samsonov2015-12-181-0/+1
| | | | llvm-svn: 256040
* 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
OpenPOWER on IntegriCloud