summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* [JIT] TrivialMemoryManager: Fail if we can't allocate memory.Davide Italiano2015-10-151-2/+8
| | | | | | | | | | | | | TrivialMemoryManager currently doesn't check the return type of AllocateRWX -- and returns a 'null' MemoryBlock to its caller. As pointed out by Lang, this exposes some serious issues with the MemoryManager interface. There's, in fact, no way to report back an error to clients rather than aborting in case memory can't be allocated. Eventually the interface will grow to support this, but for now, fail sooner rather than later. Differential Revision: http://reviews.llvm.org/D13627 llvm-svn: 250350
* [Bugpoint] Use 'CC' instead of 'GCC' for variable naming.Davide Italiano2015-10-146-149/+149
| | | | | | | | | | We now use clang by default and fallback to gcc when requested. With this commit, names reflect reality. No functional change intended. Discussed with: Rafael Espindola. llvm-svn: 250321
* [Bugpoint] Use clang by default.Davide Italiano2015-10-141-2/+9
| | | | | | | | | | We now rely on gcc only if either of the following is true: 1) -gcc option is passed by the user 2) clang is not found in the default path. Differential Revision: http://reviews.llvm.org/D13642 llvm-svn: 250318
* [llvm-readobj/ELF] Print GNU Hash sectionIgor Kudrin2015-10-144-0/+44
| | | | | | | | Add a new command line switch, -gnu-hash-table, to print the content of that section. Differential Revision: http://reviews.llvm.org/D13696 llvm-svn: 250291
* [CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libLTO and ↵Chris Bieneman2015-10-142-2/+2
| | | | | | | | libLLVM. This is to match autoconf where LLVM_SUBMIT_SUBVERSION is usually set to ${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}. llvm-svn: 250277
* Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We usedRichard Smith2015-10-141-3/+3
| | | | | | | to get away with this because llvm/Support/GCOV.h was an implementation detail of the llvm-gcov tool, but it's now being used by FDO. llvm-svn: 250258
* [CMake] Add compatibility and current versioning to libLTO to match autoconf ↵Chris Bieneman2015-10-131-0/+10
| | | | | | | | support. This also adds LLVM_LTO_VERSION_OFFSET to support functional equivalence to autoconf. llvm-svn: 250245
* [CMake] libLLVM's compatibility version should be 1.Chris Bieneman2015-10-131-1/+1
| | | | | | This is in matching with the autoconf build system. llvm-svn: 250244
* Add missing #include, found by modules build.Richard Smith2015-10-131-8/+82
| | | | llvm-svn: 250239
* [uselistorder] Insert blank line, NFCVedant Kumar2015-10-131-0/+1
| | | | llvm-svn: 250231
* [llvm-symbolizer] Add -print-address optionHemant Kulkarni2015-10-121-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D13518 llvm-svn: 250086
* [llvm-symbolizer] Reverting r250067Colin LeMahieu2015-10-121-8/+0
| | | | llvm-svn: 250072
* [llvm-symbolizer] Add -print-address optionHemant Kulkarni2015-10-121-0/+8
| | | | | | Differential Revision http://reviews.llvm.org/D13518 llvm-svn: 250067
* [llvm-rtdyld] General modernization/cleanup in preparation for (bigger) changes.Davide Italiano2015-10-121-19/+14
| | | | llvm-svn: 250004
* [Bugpoint] Get rid of dead code. No functional change.Davide Italiano2015-10-111-19/+0
| | | | llvm-svn: 249999
* [llvm-rtdyld] Use range-based loop. NFC.Davide Italiano2015-10-101-2/+2
| | | | llvm-svn: 249923
* Fix a bugs in the Mach-O disassembler when disassembling from aKevin Enderby2015-10-101-57/+66
| | | | | | | | | | malformed Mach-O file that caused a crash. This was because of an assert where the code was incorrectly attempting to parse relocation entries off of the sections and the filetype was not an MH_OBJECT. rdar://22983603 llvm-svn: 249921
* Fix use of uninitialized bool, found by ubsan in portion ofRichard Smith2015-10-091-6/+10
| | | | | | test/tools/llvm-objdump/malformed-machos.test added in r249845. llvm-svn: 249909
* [CMake] If LLVM_DYLIB_EXPORT_ALL is On don't generate an export list at all, ↵Chris Bieneman2015-10-091-18/+10
| | | | | | | | just export the world. This should resolve Bug 24157 - CMake built shared library does not export all public symbols llvm-svn: 249862
* Fixed two bugs in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-091-0/+20
| | | | | | | | | | | from malformed Mach-O files that caused crashes. The first because the offset in a dyld bind table entry was out of range. The second because their was no image info section and the routine printing it did not have the need check to see the section did not exist. rdar://22983603 llvm-svn: 249845
* [dsymutil] Prevent warningFrederic Riss2015-10-091-1/+2
| | | | llvm-svn: 249836
* Address review comments, remove error case and return 0 instead as required ↵Reid Kleckner2015-10-091-2/+1
| | | | | | by tests llvm-svn: 249785
* [llvm-symbolizer] Make --relative-address work with DWARF contextsReid Kleckner2015-10-092-2/+22
| | | | | | | | | | | | | | | | Summary: Previously the relative address flag only affected PDB debug info. Now both DIContext implementations always expect to be passed virtual addresses. llvm-symbolizer is now responsible for adding ImageBase to module offsets when --relative-offset is passed. Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12883 llvm-svn: 249784
* Fix a bug in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-081-0/+2
| | | | | | | | | from malformed Mach-O files that caused a crash because of a section header had a size that extended past the end of the file. rdar://22983603 llvm-svn: 249768
* [dsymutil] Try to find lipo first besides dsymutil before looking up the PATH.Frederic Riss2015-10-083-6/+12
| | | | | | | | Even if we don't have it in PATH, lipo should usually exist in the same directory as dsymutil. Keep the fallback looking up the PATH, it's very useful when testing a non-installed executable. llvm-svn: 249762
* Re-apply r249644: Handle inline stacks in gcov-encoded sample profiles.Diego Novillo2015-10-081-1/+7
| | | | | | | | | | | | | This fixes memory allocation problems by making the merge operation keep the profile readers around until the merged profile has been emitted. This is needed to prevent the inlined function names to disappear from the function profiles. Since all the names are kept as references, once the reader disappears, the names are also deallocated. Additionally, XFAIL on big-endian architectures. The test case uses a gcov file generated on a little-endian system. llvm-svn: 249724
* Fix a bug in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-081-3/+9
| | | | | | | from malformed Mach-O files that caused a crash because of loops in the class meta data. llvm-svn: 249700
* Support for llvm-bcanalyzer dumping of record array strings.Teresa Johnson2015-10-081-1/+24
| | | | | | | | | | | | | | | | | | Summary: Adds support for automatically detecting and printing strings represented by Array abbrev operands, analogous to the string dumping performed for Blob abbrev operands. Enhanced the ThinLTO combined index test to check for the appropriate module and function strings. Reviewers: dexonsmith, joker.eph, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13553 llvm-svn: 249695
* Stop linking all target libraries in llvm-nm and llvm-objdump.Pete Cooper2015-10-073-3/+7
| | | | | | | | | | llvm-nm only needs the target to parse module level assembly in bitcode. It doesn't need a disassembler or codegen. llvm-objdump needs to be able to disassemble a file, but doesn't need asm parsers or codegen. This reduces the sizes of these tools by a few MB each, depending on how many backends are linked in. llvm-svn: 249632
* [Orc] Enable user supplied partitioning functors in the CompileOnDemand layer.Lang Hames2015-10-071-1/+8
| | | | | | | | Previously the CompileOnDemand layer always created single-function partitions. In theory this new API allows for more interesting partitions, though this has not been well tested yet. llvm-svn: 249623
* Fix Clang-tidy modernize-use-nullptr warnings in source directories and ↵Hans Wennborg2015-10-062-11/+11
| | | | | | | | | | generated files; other minor cleanups. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13321 llvm-svn: 249482
* Fix two bugs in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | from malformed Mach-O files that caused crashes. We recently got about 700 malformed Mach-O files which we have been using the improve the robustness of tools that deal with reading data from object files. These resulted in about 20 small bug fixes to the darwin based tools. The goal here is to also improve the robustness of llvm-objdump and this is the first two fixes. In talking with Tim Northover the approach we thought might be best is to: 1) Only include tests for the malformed Mach-O files that cause crashes (not all 700+ tests). 2) The test should only contain the command line option that caused the crash and not all the others that don’t matter. 3) There should be only one line for the FileCheck that is past the point of the crash if possible and if possible indicates the malformation. Again the goal is to fix crashes and not so much care about how the printing of malformed data comes out. Tim also suggested if we really wanted to add test cases for all 700+ malformed Mach-O files putting them in the regression tests might be an option. But many of these do not cause crashes. llvm-svn: 249479
* dsymutil: Don't prune forward declarations inside of an imported TAG_moduleAdrian Prantl2015-10-051-6/+11
| | | | | | | | if there exists not definition for the type. For this to work, we need to clone the imported modules before building the decl context chains of the DIEs in the non-skeleton CUs. llvm-svn: 249362
OpenPOWER on IntegriCloud