summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-pdbdump: Simplify. NFC.Rui Ueyama2015-11-032-29/+14
| | | | llvm-svn: 251873
* Restore "Support for ThinLTO function importing and symbol linking."Teresa Johnson2015-11-034-3/+125
| | | | | | | This restores commit r251837, with the new library dependence added to llvm-link/Makefile to address bot failures. llvm-svn: 251866
* Allow llvm-nm’s single letter command line flags to be grouped.Kevin Enderby2015-11-021-18/+22
| | | | | | | | | | Which is needed if we want to replace darwin’s nm(1) with llvm-nm as there are many uses of grouped flags. The added test case is one specific case that is in real use. rdar://23337419 llvm-svn: 251864
* Revert "Support for ThinLTO function importing and symbol linking."Teresa Johnson2015-11-023-124/+2
| | | | | | | | | | | | | | | | | | | | This reverts commit r251837, due to a number of bot failures of the form: /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.obj/tools/llvm-link/Release+Asserts/llvm-link.o:llvm-link.cpp:function loadIndex(llvm::LLVMContext&, llvm::Module const*): error: undefined reference to 'llvm::object::FunctionIndexObjectFile::create(llvm::MemoryBufferRef, llvm::LLVMContext&, llvm::Module const*, bool)' /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.obj/tools/llvm-link/Release+Asserts/llvm-link.o:llvm-link.cpp:function loadIndex(llvm::LLVMContext&, llvm::Module const*): error: undefined reference to 'llvm::object::FunctionIndexObjectFile::takeIndex()' I'm not sure why these are happening - I added Object to the requred libraries in tools/llvm-link/LLVMBuild.txt and the LLVM_LINK_COMPONENTS in tools/llvm-link/CMakeLists.txt. Confirmed for my build that these symbols come out of libLLVMObject.a. What am I missing? llvm-svn: 251841
* Support for ThinLTO function importing and symbol linking.Teresa Johnson2015-11-023-2/+124
| | | | | | | | | | | | | | | | | | | | | Summary: Support for necessary linkage changes and symbol renaming during ThinLTO function importing. Also includes llvm-link support for manually importing functions and associated llvm-link based tests. Note that this does not include support for intelligently importing metadata, which is currently imported duplicate times. That support will be in the follow-on patch, and currently is ignored by the tests. Reviewers: dexonsmith, joker.eph, davidxl Subscribers: tobiasvk, tejohnson, llvm-commits Differential Revision: http://reviews.llvm.org/D13515 llvm-svn: 251837
* MachO: support tvOS and watchOS version min commands in llvm-objdumpTim Northover2015-11-021-7/+22
| | | | llvm-svn: 251834
* Clang format a few prior patches (NFC)Teresa Johnson2015-11-023-15/+22
| | | | | | | I had clang formatted my earlier patches using the wrong style. Reformatted with the LLVM style. llvm-svn: 251812
* This doesn't need a object::Archive::child_iterator.Rafael Espindola2015-11-021-2/+2
| | | | llvm-svn: 251796
* [PGO] Value profiling (index format) code cleanup and testingXinliang David Li2015-11-021-5/+9
| | | | | | | | | | | | | | | | | 1. Added a set of public interfaces in InstrProfRecord class to access (read/write) value profile data. 2. Changed IndexedProfile reader and writer code to use the newly defined interfaces and hide implementation details. 3. Added a couple of unittests for value profiling: - Test new interfaces to get and set value profile data - Test value profile data merging with various scenarios. No functional change is expected. The new interfaces will also make it possible to change on-disk format of value prof data to be more compact (to be submitted). llvm-svn: 251771
* Make a few definitions static. NFC.Rafael Espindola2015-11-011-5/+6
| | | | llvm-svn: 251759
* Use Child instead of child_iterator in the archive writer.Rafael Espindola2015-11-011-4/+3
| | | | | | | We never need to pass end(). This will also remove some complication once we start adding error checking. llvm-svn: 251758
* This can take a const reference. NFC.Rafael Espindola2015-10-311-1/+1
| | | | llvm-svn: 251753
* Simplify handling of archive Symbol tables.Rafael Espindola2015-10-311-7/+2
| | | | | | We only need to store a StringRef. llvm-svn: 251748
* Implemented the code to make llvm-nm’s -g option work.Kevin Enderby2015-10-301-0/+3
| | | | | | | | | | | | | While llvm-nm parses the -g option and has help that describes it as: -extern-only - Show only external symbols There is no code in the program to use the boolean valve it sets from the command line. rdar://23261095 llvm-svn: 251718
* Let the users of LLVMSymbolizer decide whether they want to symbolize ↵Alexey Samsonov2015-10-301-3/+4
| | | | | | | | | | | inlined frames. Introduce LLVMSymbolizer::symbolizeInlinedCode() instead of switching on PrintInlining option passed to the constructor. This will be needed once we retrun structured data (instead of std::string) from LLVMSymbolizer and move printing logic out. llvm-svn: 251675
* ARM: support .watchos_version_min and .tvos_version_min.Tim Northover2015-10-281-30/+38
| | | | | | | | These MachO file directives are used by linkers and other tools to provide compatibility information, much like the existing .ios_version_min and .macosx_version_min. llvm-svn: 251569
* Prefer ranlib mode over ar mode.Ed Schouten2015-10-271-2/+2
| | | | | | | | | | | | | | | | | For CloudABI's toolchain I have a symlink that goes from <target>-ar and <target>-ranlib to LLVM's ar binary, to mimick GNU Binutils' naming scheme. The problem is that if we're targetting ARM64, the name of the ranlib executable is aarch64-unknown-cloudabi-ranlib. This already contains the string "ar". Let's move the "ranlib" test above the "ar" test. It's not that likely that we're going to see operating systems or harwdare architectures that are called "ranlib". Reviewed by: rafael Differential Revision: http://reviews.llvm.org/D14123 llvm-svn: 251413
* [CMake] Get rid of LLVM_DYLIB_EXPORT_ALL, and make it the default, add ↵Chris Bieneman2015-10-271-40/+41
| | | | | | | | | | | | | | | | | | | libLLVM-C on darwin to cover the C API needs. Summary: We've had a lot of discussion in the past about the meaningful and useful default behaviors for the llvm-shlib tool. The original implementation was heavily geared toward Apple's use, and I think that was wrong. This patch seeks to correct that. I've removed the LLVM_DYLIB_EXPORT_ALL variable and made libLLVM export everything by default. I've also added a new target that is only built on Darwin for libLLVM-C as a library that re-exports the LLVM-C API. This library is not built on Linux because ELF doesn't support re-export libraries in the same way MachO does. Reviewers: chapuni, resistor, bogner, axw Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13842 llvm-svn: 251411
* Add an (optional) identification block in the bitcodeMehdi Amini2015-10-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Processing bitcode from a different LLVM version can lead to unexpected behavior. The LLVM project guarantees autoupdating bitcode from a previous minor revision for the same major, but can't make any promise when reading bitcode generated from a either a non-released LLVM, a vendor toolchain, or a "future" LLVM release. This patch aims at being more user-friendly and allows a bitcode produce to emit an optional block at the beginning of the bitcode that will contains an opaque string intended to describe the bitcode producer information. The bitcode reader will dump this information alongside any error it reports. The optional block also includes an "epoch" number, monotonically increasing when incompatible changes are made to the bitcode. The reader will reject bitcode whose epoch is different from the one expected. Differential Revision: http://reviews.llvm.org/D13666 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 251325
* Move parts of llvm-symbolizer tool into LLVMSymbolize library.Alexey Samsonov2015-10-265-798/+3
| | | | | | | | | | | | Summary: See http://lists.llvm.org/pipermail/llvm-dev/2015-October/091624.html Reviewers: echristo Subscribers: llvm-commits, aizatsky Differential Revision: http://reviews.llvm.org/D13998 llvm-svn: 251316
* Simplify boolean conditional return statements in tools/llvm-symbolizer.Rafael Espindola2015-10-241-3/+1
| | | | | | Patch by Richard. llvm-svn: 251216
* Simplify boolean expressions in tools/llvm-objdump.Rafael Espindola2015-10-241-2/+2
| | | | | | Patch by Richard. llvm-svn: 251215
* Add a RAW mode to StringTableBuilder.Rafael Espindola2015-10-231-4/+4
| | | | | | | | | | | | In this mode it just tries to tail merge the strings without imposing any other format constrains. It will not, for example, add a null byte between them. Also add support for keeping a tentative size and offset if we decide to not optimize after all. This will be used shortly in lld for merging SHF_STRINGS sections. llvm-svn: 251153
* Test commit: fix typo in comment.Oleg Ranevskyy2015-10-231-1/+1
| | | | llvm-svn: 251122
* [llvm-readobj] Don't cast qualifiers away. Now gcc is happy again.Davide Italiano2015-10-231-7/+8
| | | | | | Reported by: mikael.holmen at ericsson.com llvm-svn: 251117
* [JIT] Towards a working small memory model.Davide Italiano2015-10-211-0/+55
| | | | | | | | | | This commit introduces an option, --preallocate, so that we can get memory upfront and use it in small memory model tests (in order to get reliable results). Differential Revision: http://reviews.llvm.org/D13630 llvm-svn: 250956
* Backing out commit r250906 as it broke lld.Kevin Enderby2015-10-218-124/+30
| | | | llvm-svn: 250908
* This removes the eating of the error in Archive::Child::getSize() when the ↵Kevin Enderby2015-10-218-30/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | characters in the size field in the archive header for the member is not a number. To do this we have all of the needed methods return ErrorOr to push them up until we get out of lib. Then the tools and can handle the error in whatever way is appropriate for that tool. So the solution is to plumb all the ErrorOr stuff through everything that touches archives. This include its iterators as one can create an Archive object but the first or any other Child object may fail to be created due to a bad size field in its header. Thanks to Lang Hames on the changes making child_iterator contain an ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add operator overloading for * and -> . We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash” and using report_fatal_error() to move the error checking will cause the program to stop, neither of which are really correct in library code. There are still some uses of these that should be cleaned up in this library code for other than the size field. Also corrected the code where the size gets us to the “at the end of the archive” which is OK but past the end of the archive will return object_error::parse_failed now. The test cases use archives with text files so one can see the non-digit character, in this case a ‘%’, in the size field. llvm-svn: 250906
* [llvm-cov] Adjust column widths for function and file reportsVedant Kumar2015-10-211-9/+13
| | | | | | | | Previously, we only expanded function and filename column widths when rendering file reports. This commit makes the change for function reports as well. llvm-svn: 250900
* Revert "Add missing #include, found by modules build."Mehdi Amini2015-10-211-82/+8
| | | | | | | | | | | This reverts commit r250239. It seems unwanted changes got committed here, and part of the patch does not seem correct. For instance RoundUpToAlignment() is called without its returned value actually used. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 250882
* bugpoint: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-203-56/+47
| | | | | | | | This is the last of the implicit ilist iterator conversions in LLVM. Still up for debate whether we let these bitrot back: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html llvm-svn: 250852
* llvm-diff: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-201-2/+2
| | | | llvm-svn: 250842
* Make class final to pacify -Wnon-virtual-dtor.Manuel Klimek2015-10-201-1/+1
| | | | llvm-svn: 250805
* Pass FunctionInfoIndex by reference to WriteFunctionSummaryToFile (NFC)Teresa Johnson2015-10-192-2/+2
| | | | | | Implemented suggestion by dblakie in review for r250704. llvm-svn: 250723
* [Orc] Add support for emitting indirect stubs directly into the JIT target'sLang Hames2015-10-192-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory, rather than representing the stubs in IR. Update the CompileOnDemand layer to use this functionality. Directly emitting stubs is much cheaper than building them in IR and codegen'ing them (see below). It also plays well with remote JITing - stubs can be emitted directly in the target process, rather than having to send them over the wire. The downsides are: (1) Care must be taken when resolving symbols, as stub symbols are held in a separate symbol table. This is only a problem for layer writers and other people using this API directly. The CompileOnDemand layer hides this detail. (2) Aliases of function stubs can't be symbolic any more (since there's no symbol definition in IR), but must be converted into a constant pointer expression. This means that modules containing aliases of stubs cannot be cached. In practice this is unlikely to be a problem: There's no benefit to caching such a module anyway. On balance I think the extra performance is more than worth the trade-offs: In a simple stress test with 10000 dummy functions requiring stubs and a single executed "hello world" main function, directly emitting stubs reduced user time for JITing / executing by over 90% (1.5s for IR stubs vs 0.1s for direct emission). llvm-svn: 250712
* Convert gold-plugin unnecessary unique_ptr into local (NFC)Teresa Johnson2015-10-191-3/+3
| | | | llvm-svn: 250704
* Fix required library for r250699 to BitWriter instead of BitReader.Teresa Johnson2015-10-192-2/+2
| | | | | | This should fix the mingw3 bot failure. llvm-svn: 250703
* llvm-lto support for generating combined function indexesTeresa Johnson2015-10-193-1/+68
| | | | | | | | | | | | | | | | | Summary: This patch adds support to llvm-lto that mirrors the support added by r249270 to the gold plugin. This enables better testing of combined index generation for ThinLTO. Added a new test, and this support will be used in the test in D13515. Reviewers: joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13847 llvm-svn: 250699
* Make a bunch of static arrays const.Craig Topper2015-10-181-32/+38
| | | | llvm-svn: 250642
* StreamWriter: List basic types instead of derived ones in HexNumberMatthias Braun2015-10-171-8/+11
| | | | | | | | This avoids problems with different (u)intXX definition on different platforms. Specifically this fixes a case on OS/X which had uint64_t defined as unsigned long long. llvm-svn: 250589
* Speculative fix for GCC buildReid Kleckner2015-10-161-8/+11
| | | | llvm-svn: 250585
* [llvm-symbolizer] Use the export table if no symbols are presentReid Kleckner2015-10-162-0/+45
| | | | | | | | This lets us make guesses about symbols in third party DLLs without debug info, like MSVCR120.dll or kernel32.dll. dbghelp does the same thing. llvm-svn: 250582
* [llvm-readobj] Teach ELFDumper about symbol versioning.Davide Italiano2015-10-163-6/+106
| | | | | | Differential Revision: http://reviews.llvm.org/D13824 llvm-svn: 250575
* [llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.Davide Italiano2015-10-151-0/+4
| | | | llvm-svn: 250464
* [CMake] [Darwin] Add support for generating Xcode-compatible toolchains that ↵Chris Bieneman2015-10-151-0/+72
| | | | | | | | | | | | | | | | | | | xcodebuild and xcrun can search Summary: Sometimes you want to install a custom compiler and use it like the system compiler without overriding the system compiler. This patch lets you create xctoolchains that the darwin command line tools can use. To use this patch set LLVM_CREATE_XCODE_TOOLCHAIN=On in your CMake invocation and build the `install-code-toolchain` target. After installation you can set the envar EXTERNAL_TOOLCHAINS_DIR to your installed Toolchains directory, and the TOOLCHAINS envar to the toolchain identifier (ex org.llvm.3.8.0svn). This will then cause /usr/bin/clang to call your newly installed clang. Reviewers: Bigcheese, bogner Subscribers: tobiasfar, llvm-commits Differential Revision: http://reviews.llvm.org/D13605 llvm-svn: 250450
* Make windows.h less evil.Benjamin Kramer2015-10-151-0/+3
| | | | llvm-svn: 250386
* [llvm-pdbdump] Remove oddly placed parens that MSVC doesn't likeBenjamin Kramer2015-10-151-1/+1
| | | | llvm-svn: 250385
* Speculatively unbreak Windows buildDavid Majnemer2015-10-151-2/+2
| | | | | | | | <windows.h> defines macros named min and max in conflict with <algorithm>. Prevent macro expansion by wrapping std::min in parenthesis. llvm-svn: 250383
* [llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDBDavid Majnemer2015-10-151-7/+275
| | | | | | | | | A PDB can be thought of as a very simple file system. It is occasionally illuminating to see the contents of the underlying files. Differential Revision: http://reviews.llvm.org/D13674 llvm-svn: 250356
* [bugpoint] llvm-gcc doesn't exist anymore ...Davide Italiano2015-10-151-8/+1
| | | | | | ... so this comment is stale. Remove it. Range-loopify while here. llvm-svn: 250354
OpenPOWER on IntegriCloud