summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ubsan] lit changes for lld testing, future lto testing.Roman Lebedev2017-12-0112-21/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 llvm-svn: 319525
* GlobalISel: Enable the legalization of G_MERGE_VALUES and G_UNMERGE_VALUESVolkan Keles2017-12-0110-53/+193
| | | | | | | | | | | | | | Summary: LegalizerInfo assumes all G_MERGE_VALUES and G_UNMERGE_VALUES instructions are legal, so it is not possible to legalize vector operations on illegal vector types. This patch fixes the problem by removing the related check and adding default actions for G_MERGE_VALUES and G_UNMERGE_VALUES. Reviewers: qcolombet, ab, dsanders, aditya_nandakumar, t.p.northover, kristof.beyls Reviewed By: dsanders Subscribers: rovka, javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D39823 llvm-svn: 319524
* [libcxx] Support getentropy as a source of randomness for std::random_devicePetr Hosek2017-12-012-2/+29
| | | | | | | | | | Use this source use on Fuchsia where this is the oficially way to obtain randomness. This could be also used on other platforms that already support getentropy such as *BSD or Linux. Differential Revision: https://reviews.llvm.org/D40319 llvm-svn: 319523
* Recommit rL319407: [SROA] enable splitting for non-whole-alloca loads and storesHiroshi Inoue2017-12-014-35/+109
| | | | | | Recommiting once reverted patch rL319407 after adding a check for bit vector size to avoid failures in some build bots. llvm-svn: 319522
* [X86] Custom legalize v2i32 gathers via widening rather than promoting.Craig Topper2017-12-013-108/+131
| | | | | | | | The default legalization for v2i32 is promotion to v2i64. This results in a gather that reads 64-bit elements rather than 32. If one of the elements is near a page boundary this can cause an illegal access that can fault. We also miscalculate the scale for the gather which is an even worse problem, but we probably could have found a separate way to fix that. llvm-svn: 319521
* [X86][SelectionDAG] Make sure we explicitly sign extend the index when type ↵Craig Topper2017-12-013-25/+65
| | | | | | | | promoting the index of scatter and gather. Type promotion makes no guarantee about the contents of the promoted bits. Since the gather/scatter instruction will use the bits to calculate addresses, we need to ensure they aren't garbage. llvm-svn: 319520
* [X86] Add another v2i32 gather test case with v2i64 index that wasn't sign ↵Craig Topper2017-12-011-32/+81
| | | | | | extended. llvm-svn: 319519
* Add an additional test for r319503.Rui Ueyama2017-12-011-0/+55
| | | | llvm-svn: 319518
* [lld] Switch to add_llvm_install_targetsShoaib Meenai2017-12-011-8/+4
| | | | | | | | This adds install-*-stripped targets that strip during installation. Differential Revision: https://reviews.llvm.org/D40688 llvm-svn: 319517
* ClangASTContext::ParseClassTemplateDecl doesn't always succeed.Jim Ingham2017-12-011-1/+11
| | | | | | | | | When it does, it returns a NULL ClassTemplateDecl. Don't use it if it is NULL... <rdar://problem/35672107> llvm-svn: 319516
* Include AddLLVM needed for tests in the right contextPetr Hosek2017-12-012-5/+7
| | | | | | | | | | AddLLVM is needed for several functions that are used in tests and as such needs to be included from the right context which previously wasn't the case. Differential Revision: https://reviews.llvm.org/D40280 llvm-svn: 319515
* [X86] Add a DAG combine to simplify masks for AVX2 gather instructions.Craig Topper2017-12-012-40/+27
| | | | | | AVX2 gathers only use the upper bit of the mask allowing us to simplify sign_extend_inreg to a shift left. llvm-svn: 319514
* [c++2a] P0515R3: Support for overloaded operator<=>.Richard Smith2017-12-0110-3/+61
| | | | | | No CodeGen support for MSABI yet, we don't know how to mangle this there. llvm-svn: 319513
* clang-format.Rui Ueyama2017-12-013-5/+5
| | | | llvm-svn: 319512
* [cmake] Expose opt-viewer availabilityAdam Nemet2017-12-011-0/+1
| | | | | | This will be used in https://github.com/apple/swift/pull/12938 llvm-svn: 319511
* [WebAssembly] Update MC tests now that hidden attr is supportedSam Clegg2017-12-013-7/+14
| | | | | | | | | | | | Summary: Support was added in rL319488 but these tests were not updated. Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish Differential Revision: https://reviews.llvm.org/D40693 llvm-svn: 319510
* [c++2a] P0515R3: lexer support for new <=> token.Richard Smith2017-12-015-0/+106
| | | | llvm-svn: 319509
* Revert "Merge .xdata into .rdata by default"Reid Kleckner2017-12-013-27/+28
| | | | | | | This reverts commit r318699, it is breaking 32-bit SEH handlers in Chromium. llvm-svn: 319508
* Add flag to ArchiveWriter to test GNU64 format more efficientlyJake Ehrlich2017-12-012-5/+15
| | | | | | | | | | | | | | | | | | | | | | | Even with the sparse file optimizations the SYM64 test can still be painfully slow. This unnecessarily slows down devs. It's critical that we test that the switch to the SYM64 format occurs at 4GB but there isn't any better of a way to fake the size of the file than sparse files. This change introduces a flag that allows the cutoff to be arbitrarily set to whatever power of two is desired. The flag is hidden as it really isn't meant to be used outside this one test. This is unfortunate but appears necessary, at least until the average hard drive is much faster. The changes to the test require some explanation. Prior to this change we knew that the SYM64 format was being used because the file was simply too large to have validly handled this case if the SYM64 format were not used. To ensure that the SYM64 format is still being used I am grepping the file for "SYM64". Without changing the filename however this would be pointless because "SYM64" would occur in the file either way. So the filename of the test is also changed in order to avoid this issue. Differential Revision: https://reviews.llvm.org/D40632 llvm-svn: 319507
* [WebAssembly] Fix typosSam Clegg2017-12-013-6/+6
| | | | | | | | Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40691 llvm-svn: 319506
* Mark all library options as hidden.Zachary Turner2017-12-0126-89/+90
| | | | | | | | | | | | | | | | | These command line options are not intended for public use, and often don't even make sense in the context of a particular tool anyway. About 90% of them are already hidden, but when people add new options they forget to hide them, so if you were to make a brand new tool today, link against one of LLVM's libraries, and run tool -help you would get a bunch of junk that doesn't make sense for the tool you're writing. This patch hides these options. The real solution is to not have libraries defining command line options, but that's a much larger effort and not something I'm prepared to take on. Differential Revision: https://reviews.llvm.org/D40674 llvm-svn: 319505
* Add lldb-test.Zachary Turner2017-12-017-0/+650
| | | | | | | | | | | | | | | | | | | | | This is basically a proof-of-concept and starting point for having a testing-centric tool in LLDB. I'm sure this leaves a lot of room to be desired, but this at least allows us to have something to build on. Right now there is only one command, the `module-sections` command, and I created this command not because it was particularly special, but because it addressed an immediate use case and was extremely simple. Run the tool as `lldb-test module-sections <path-to-object>`. Feel free to add testing related stuff to your heart's content after this goes in. Implementing the commands themselves takes some work, but once they're there they can be reused without writing any code and result in very easy to use and maintain tests. Differential Revision: https://reviews.llvm.org/D40636 llvm-svn: 319504
* Make .gnu.hash section smaller.Rui Ueyama2017-11-302-31/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our on-disk hash table was unnecessarily large. The cost of collision is not high in the .gnu.hash table because each symbol in the .gnu.hash table has a hash value with it. So, for each collided symbol, the dynamic linker just compares an integer, which is pretty cheap. This patch increases the load factor by about 8. Here's a comparison. $ readelf --histogram libclangSema.so.6.0.0svn-new-lld Histogram for `.gnu.hash' bucket list length (total of 582 buckets): Length Number % of total Coverage 0 11 ( 1.9%) 1 35 ( 6.0%) 1.5% 2 93 ( 16.0%) 9.5% 3 108 ( 18.6%) 23.4% 4 121 ( 20.8%) 44.1% 5 86 ( 14.8%) 62.6% 6 63 ( 10.8%) 78.8% 7 38 ( 6.5%) 90.2% 8 18 ( 3.1%) 96.4% 9 6 ( 1.0%) 98.7% 10 3 ( 0.5%) 100.0% $ readelf --histogram libclangSema.so.6.0.0svn-old-lld Histogram for `.gnu.hash' bucket list length (total of 4093 buckets): Length Number % of total Coverage 0 1498 ( 36.6%) 1 1545 ( 37.7%) 37.7% 2 712 ( 17.4%) 72.5% 3 251 ( 6.1%) 90.9% 4 66 ( 1.6%) 97.3% 5 16 ( 0.4%) 99.3% 6 5 ( 0.1%) 100.0% $ readelf --histogram libclangSema.so.6.0.0svn-bfd Histogram for `.gnu.hash' bucket list length (total of 1004 buckets): Length Number % of total Coverage 0 92 ( 9.2%) 1 227 ( 22.6%) 9.8% 2 266 ( 26.5%) 32.6% 3 222 ( 22.1%) 61.2% 4 115 ( 11.5%) 81.0% 5 55 ( 5.5%) 92.8% 6 21 ( 2.1%) 98.2% 7 6 ( 0.6%) 100.0% $ readelf --histogram libclangSema.so.6.0.0svn-gold Histogram for `.gnu.hash' bucket list length (total of 2053 buckets): Length Number % of total Coverage 0 671 ( 32.7%) 1 709 ( 34.5%) 30.4% 2 470 ( 22.9%) 70.7% 3 141 ( 6.9%) 88.9% 4 54 ( 2.6%) 98.2% 5 5 ( 0.2%) 99.2% 6 3 ( 0.1%) 100.0% Differential Revision: https://reviews.llvm.org/D40683 llvm-svn: 319503
* docs/GettingStarted.rst: Update the list of release versions and tagsHans Wennborg2017-11-301-26/+5
| | | | llvm-svn: 319502
* AMDGPU: Use carry-less adds in FI eliminationMatt Arsenault2017-11-303-28/+68
| | | | llvm-svn: 319501
* We had a situation where a kext was inlined into the kernel,Jason Molenda2017-11-301-0/+10
| | | | | | | | | | | | but still listed in the kernel's kext table with the kernel binary UUID. This resulted in the kernel text section being loaded at the kext address and problems ensuing. Instead, if there is a kext with the same UUID as the kernel, lldb should skip over it. <rdar://problem/35757689> llvm-svn: 319500
* [libc++abi] Add install-cxxabi-stripped targetShoaib Meenai2017-11-301-0/+6
| | | | | | | | | | | | LLVM is gaining install-*-stripped targets to perform stripped installs, and in order for this to be useful for install-distribution, all potential distribution components should have stripped installation targets. LLVM has a function to create these install targets, but since we can't use LLVM CMake functions in libc++abi, let's do it manually. Differential Revision: https://reviews.llvm.org/D40681 llvm-svn: 319499
* [libunwind] Switch to add_llvm_install_targetsShoaib Meenai2017-11-301-5/+3
| | | | | | | | | This gains us the install-unwind-stripped target, to perform stripping during installation. Differential Revision: https://reviews.llvm.org/D40685 llvm-svn: 319498
* [clangd] Logger implicitly adds newlineSam McCall2017-11-305-18/+16
| | | | llvm-svn: 319497
* [clangd] Log file compile commandsSam McCall2017-11-301-0/+3
| | | | llvm-svn: 319496
* Update website to mention that you still need ↵Richard Smith2017-11-301-1/+2
| | | | | | -frelaxed-template-template-args to enable the corresponding C++17 feature in Clang 5. llvm-svn: 319495
* ThinLTOBitcodeWriter: Try harder to discard unused references to the merged ↵Peter Collingbourne2017-11-302-3/+13
| | | | | | | | | | | | | | | | | | | module. If the thin module has no references to an internal global in the merged module, we need to make sure to preserve that property if the global is a member of a comdat group, as otherwise promotion can end up adding global symbols to the comdat, which is not allowed. This situation can arise if the external global in the thin module has dead constant users, which would cause use_empty() to return false and would cause us to try to promote it. To prevent this from happening, discard the dead constant users before asking whether a global is empty. Differential Revision: https://reviews.llvm.org/D40593 llvm-svn: 319494
* Simplify the DenseSet used for hashing CodeView records.Zachary Turner2017-11-302-102/+64
| | | | | | | | | | | | | | This was storing the hash alongside the key so that the hash doesn't need to be re-computed every time, but in doing so it was allocating a structure to keep the key size small in the DenseMap. This is a noble goal, but it also leads to a pointer indirection on every probe, and this cost of this pointer indirection ends up being higher than the cost of having a slightly larger entry in the hash table. Removing this not only simplifies the code, but yields a small but noticeable performance improvement in the type merging algorithm. llvm-svn: 319493
* [lldb] A few minor fixes in TaskPoolAlexander Shaposhnikov2017-11-303-6/+25
| | | | | | | | | | | | | 1. Move TaskPool into the namespace lldb_private. 2. Add missing std::move in TaskPoolImpl::Worker. 3. std::thread::hardware_concurrency may return 0, handle this case correctly. Differential revision: https://reviews.llvm.org/D40587 Test plan: make check-all llvm-svn: 319492
* AMDGPU: Use gfx9 carry-less add/sub instructionsMatt Arsenault2017-11-3029-292/+631
| | | | llvm-svn: 319491
* XOR the frame pointer with the stack cookie when protecting the stackReid Kleckner2017-11-309-22/+206
| | | | | | | | | | | | Summary: This strengthens the guard and matches MSVC. Reviewers: hans, etienneb Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits Differential Revision: https://reviews.llvm.org/D40622 llvm-svn: 319490
* [clang] Use add_llvm_install_targetsShoaib Meenai2017-11-305-31/+17
| | | | | | | | | | Use this function to create the install targets rather than doing so manually, which gains us the `-stripped` install targets to perform stripped installations. Differential Revision: https://reviews.llvm.org/D40675 llvm-svn: 319489
* Add visibility flag to Wasm symbol flagsSam Clegg2017-11-307-4/+52
| | | | | | | | | | | | | | The LLVM "hidden" flag needs to be passed through the Wasm intermediate objects in order for the linker to apply it to the final Wasm object. The corresponding change in LLD is here: https://github.com/WebAssembly/lld/pull/14 Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40442 llvm-svn: 319488
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-11-305-288/+374
| | | | | | minor fixes (NFC). llvm-svn: 319487
* Add missing test. NFC.Rafael Espindola2017-11-302-0/+18
| | | | | | | | | | We had no tests for what PROVIDE should do if there is a shared symbol with the same name. In both bfd and our existing implementation PROVIDE wins. Add a test for that. llvm-svn: 319486
* [CUDA] Tweak CUDA wrappers to make cuda-9 work with libc++Artem Belevich2017-11-301-0/+6
| | | | | | | | | CUDA-9 headers check for specific libc++ version and ifdef out some of the definitions we need if LIBCPP_VERSION >= 3800. Differential Revision: https://reviews.llvm.org/D40198 llvm-svn: 319485
* [msan] Fix return type of mbrtowcVitaly Buka2017-11-302-8/+11
| | | | | | | | | | | | Summary: Fixes https://github.com/google/oss-fuzz/issues/1009 Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40676 llvm-svn: 319484
* [memcpyopt] Commit file missed in r319482.Dan Gohman2017-11-301-0/+6
| | | | | | | This change was meant to be included with r319482 but was accidentally omitted. llvm-svn: 319483
* [memcpyopt] Teach memcpyopt to optimize across basic blocksDan Gohman2017-11-304-3/+198
| | | | | | | | | | | | This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows it to eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%. Fixes PR28958. Differential Revision: https://reviews.llvm.org/D38374 llvm-svn: 319482
* [InlineCost] Prefer getFunction() to two calls to getParent().Davide Italiano2017-11-301-3/+3
| | | | | | Improves clarity, also slightly cheaper. NFCI. llvm-svn: 319481
* [llvm] Add stripped installation targetsShoaib Meenai2017-11-305-54/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | CMake's generated installation scripts support `CMAKE_INSTALL_DO_STRIP` to enable stripping the installed binaries. LLVM's build system doesn't expose this option to the `install-` targets, but it's useful in conjunction with `install-distribution`. Add a new function to create the install targets, which creates both the regular install target and a second install target that strips during installation. Change the creation of all installation targets to use this new function. Stripping doesn't make a whole lot of sense for some installation targets (e.g. the LLVM headers), but consistency doesn't hurt. I'll make other repositories (e.g. clang, compiler-rt) use this in a follow-up, and then add an `install-distribution-stripped` target to actually accomplish the end goal of creating a stripped distribution. I don't want to do that step yet because the creation of that target would depend on the presence of the `install-*-stripped` target for each distribution component, and the distribution components from other repositories will be missing that target right now. Differential Revision: https://reviews.llvm.org/D40620 llvm-svn: 319480
* [Documentation] Style fixes for Objective-C checks documentation to follow ↵Eugene Zelenko2017-11-306-32/+29
| | | | | | | | | | C/C++ example. Release Notes should just repeat first sentence from documentation. Remove duplicated entry from Release Notes. llvm-svn: 319479
* [clangd] New conventions for JSON-marshalling functions, centralize machinerySam McCall2017-11-307-479/+411
| | | | | | | | | | | | | | | | | | Summary: - JSON<->Obj interface is now ADL functions, so they play nicely with enums - recursive vector/map parsing and ObjectMapper moved to JSONExpr and tested - renamed (un)parse to (de)serialize, since text -> JSON is called parse - Protocol.cpp gets a bit shorter Sorry for the giant patch, it's prety mechanical though Reviewers: ilya-biryukov Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D40596 llvm-svn: 319478
* [Hexagon] Implement HexagonSubtarget::useAA()Krzysztof Parzyszek2017-11-302-1/+14
| | | | llvm-svn: 319477
* [Hexagon] Fix wrong check in test/CodeGen/Hexagon/newvaluejump-solo.mirKrzysztof Parzyszek2017-11-301-1/+1
| | | | llvm-svn: 319476
OpenPOWER on IntegriCloud